On 07/24/2015 05:41 AM, Jan Beulich wrote:
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1619,10 +1619,23 @@ int nvmx_handle_vmptrld(struct cpu_user_
if ( nvcpu->nv_vvmcxaddr == VMCX_EADDR )
{
- nvcpu->nv_vvmcx = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 1);
- if ( nvcpu->nv_vvmcx )
- nvcpu->nv_vvmcxaddr = gpa;
- if ( !nvcpu->nv_vvmcx ||
+ bool_t writable;
+ void *vvmcx = hvm_map_guest_frame_rw(paddr_to_pfn(gpa), 1, &writable);
+
...
@@ -1693,14 +1703,22 @@ int nvmx_handle_vmclear(struct cpu_user_
else
{
/* Even if this VMCS isn't the current one, we must clear it. */
- vvmcs = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 0);
+ bool_t writable;
+
+ vvmcs = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 0, &writable);
Since you replaced 'gpa >> PAGE_SHIFT' with 'paddr_to_pfn(gpa' above,
perhaps it should be replaced here too.
Other than that,
Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel