guest: quick fix for copy_from/to_vm
h_ptr need update from second page walk Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
parent
34445008c2
commit
1b34870824
|
@ -148,6 +148,7 @@ int copy_from_vm(struct vm *vm, void *h_ptr, uint64_t gpa, uint32_t size)
|
|||
g_ptr = HPA2HVA(hpa);
|
||||
memcpy_s(h_ptr, len, g_ptr, len);
|
||||
gpa += len;
|
||||
h_ptr += len;
|
||||
size -= len;
|
||||
} while (size > 0);
|
||||
|
||||
|
@ -176,6 +177,7 @@ int copy_to_vm(struct vm *vm, void *h_ptr, uint64_t gpa, uint32_t size)
|
|||
g_ptr = HPA2HVA(hpa);
|
||||
memcpy_s(g_ptr, len, h_ptr, len);
|
||||
gpa += len;
|
||||
h_ptr += len;
|
||||
size -= len;
|
||||
} while (size > 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue