mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 09:41:30 +00:00
page walk during copy_from_vm/copy_to_vm
there are data transfer between guest(GPA) & hv(HPA), especially for hypercall from guest. guest should make sure these GPAs are address continous, but hv cannot assure HPAs which mapped to these GPAs are address continous, for example, after enable hugetlb, a contious GPA range could come from two different 2M pages. this patch is handling such case by doing gpa page walking during copy_from_vm & copy_to_vm. Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -139,6 +139,8 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu);
|
||||
typedef int (*vm_sw_loader_t)(struct vm *, struct vcpu *);
|
||||
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);
|
||||
#endif /* !ASSEMBLER */
|
||||
|
||||
#endif /* GUEST_H*/
|
||||
|
||||
Reference in New Issue
Block a user