Re: [kvm-devel] [PATCH 2/2] KVM: Clean up VMCLEAR/VMPTRLD code on VMX
Gregory Haskins wrote: Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- Dropped - I don't see a problem with the current code. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 2/2] KVM: Clean up VMCLEAR/VMPTRLD code on VMX
Gregory Haskins wrote: Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/vmx.c | 71 +++-- 1 files changed, 58 insertions(+), 13 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 96837d6..86f1eea 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -191,6 +191,20 @@ static struct kvm_msr_entry *find_msr_entry(struct kvm_vcpu *vcpu, u32 msr) return NULL; } +static void vmcs_load(struct vmcs *vmcs) +{ + u64 phys_addr = __pa(vmcs); + u8 error; + + asm volatile (ASM_VMX_VMPTRLD_RAX ; setna %0 + : =g(error) : a(phys_addr), m(phys_addr) + : cc); + + if (error) + printk(KERN_ERR kvm: vmptrld %p/%llx fail\n, +vmcs, phys_addr); +} I don't believe this instruction fails under normal conditions, but we should terminate the guest cleanly in such cases, rather than just doing printk(). Jun --- Intel Open Source Technology Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 2/2] KVM: Clean up VMCLEAR/VMPTRLD code on VMX
On Fri, 2007-07-27 at 17:09 -0700, Nakajima, Jun wrote: Gregory Haskins wrote: Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/vmx.c | 71 +++-- 1 files changed, 58 insertions(+), 13 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 96837d6..86f1eea 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -191,6 +191,20 @@ static struct kvm_msr_entry *find_msr_entry(struct kvm_vcpu *vcpu, u32 msr) return NULL; } +static void vmcs_load(struct vmcs *vmcs) +{ + u64 phys_addr = __pa(vmcs); + u8 error; + + asm volatile (ASM_VMX_VMPTRLD_RAX ; setna %0 + : =g(error) : a(phys_addr), m(phys_addr) + : cc); + + if (error) + printk(KERN_ERR kvm: vmptrld %p/%llx fail\n, + vmcs, phys_addr); +} I don't believe this instruction fails under normal conditions, but we should terminate the guest cleanly in such cases, rather than just doing printk(). Note that this was just a verbatim move of existing code. I don't disagree with your assessment...its just that its not the right place for a change like that. If you want to submit a further patch, that would certainly be appreciated. Jun --- Intel Open Source Technology Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel