mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
add copy_from_gva/copy_to_gva functions
there are data transfer between guest virtual space(GVA) & hv(HVA), for example, guest rip fetching during instruction decoding. GVA is address continuous, but its GPA could be only 4K page address continuous, this patch adds copy_from_gva & copy_to_gva functions by doing page walking of GVA to avoid address breaking during accessing GVA. v2: - modify API interface based on new gva2gpa function, err_code added - combine similar code with inline function _copy_gpa - change API name from vcopy_from/to_vm to copy_from/to_gva Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -124,6 +124,10 @@ extern vm_sw_loader_t vm_sw_loader;
|
||||
|
||||
int copy_from_vm(struct vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
int copy_to_vm(struct vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
int copy_from_gva(struct vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code);
|
||||
int copy_to_gva(struct vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code);
|
||||
|
||||
uint32_t create_guest_init_gdt(struct vm *vm, uint32_t *limit);
|
||||
#endif /* !ASSEMBLER */
|
||||
|
Reference in New Issue
Block a user