All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Clear VMCS if reusing after vcpu reset
@ 2007-04-30  6:09 Tian, Kevin
  2007-04-30  6:41 ` Keir Fraser
  2007-04-30  7:12 ` Keir Fraser
  0 siblings, 2 replies; 10+ messages in thread
From: Tian, Kevin @ 2007-04-30  6:09 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

Clear whole page when VMCS is reused due to cpu hotplug.
construct_vmcs doesn't take care of all fields and some stale
content may make hardware unhappy.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

Thanks,
Kevin

[-- Attachment #2: vmcs_clear_for_vcpu_reset.patch --]
[-- Type: application/octet-stream, Size: 821 bytes --]

Clear whole page when VMCS is reused due to cpu hotplug.
construct_vmcs doesn't take care of all fields and some stale
content may make hardware unhappy.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

diff -r d6973889288f -r ce3cbcacd650 xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c	Thu Apr 19 14:03:10 2007 -0400
+++ b/xen/arch/x86/hvm/vmx/vmcs.c	Thu Apr 19 14:13:16 2007 -0400
@@ -468,10 +468,14 @@ int vmx_create_vmcs(struct vcpu *v)
     {
         if ( (v->arch.hvm_vmx.vmcs = vmx_alloc_vmcs()) == NULL )
             return -ENOMEM;
-
-        __vmx_clear_vmcs(v);
-    }
-
+    }
+    else
+    {
+        memset(v->arch.hvm_vmx.vmcs, 0, PAGE_SIZE);
+        v->arch.hvm_vmx.vmcs->vmcs_revision_id = vmcs_revision_id;
+    }
+
+    __vmx_clear_vmcs(v);
     construct_vmcs(v);
 
     return 0;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-05-11 12:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30  6:09 [PATCH] Clear VMCS if reusing after vcpu reset Tian, Kevin
2007-04-30  6:41 ` Keir Fraser
2007-04-30  6:45   ` Tian, Kevin
2007-04-30  6:48     ` Li, Xin B
2007-04-30  7:00     ` Keir Fraser
2007-04-30  7:12 ` Keir Fraser
2007-04-30  7:19   ` Tian, Kevin
2007-04-30  7:25     ` Keir Fraser
2007-04-30  7:32       ` Tian, Kevin
2007-05-11 12:33         ` question about blktap tgh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.