[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/3] vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address



On 12/13/16 08:21 -0700, Jan Beulich wrote:
On 13.12.16 at 13:16, <haozhong.zhang@xxxxxxxxx> wrote:
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -32,6 +32,18 @@ static DEFINE_PER_CPU(u64 *, vvmcs_buf);

 static void nvmx_purge_vvmcs(struct vcpu *v);

+/*
+ * When a vcpu is out of VMXON region, set its vmxon_region_pa to
+ * INVALID_VMXON_REGION_PA. We cannot use 0, because 0 is also a valid
+ * VMXON region address.
+ */
+#define INVALID_VMXON_REGION_PA (~0UL)

And btw, having looked at patch 2 - any reason you can't simply
re-use VMCX_EADDR here?


I just find INVALID_PADDR defined along with type paddr_t:

typedef unsigned long paddr_t;
#define INVALID_PADDR (~0UL)

Which one, INVALID_PADDR or VMCX_EADDR, would be better?

Thanks,
Haozhong

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.