diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2022-12-16 23:49:48 +0000 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-01 09:07:52 +0000 |
commit | b46f9745b1b5c8dd6ea1bd1361531f966c404f8c (patch) | |
tree | 3a542535cce023b749abf69a1321852ed4a1f204 /target/i386 | |
parent | 28b7ae94a21d37f38f7b68a9f40fa521144898a6 (diff) |
hw/xen: Implement GNTTABOP_query_size
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/kvm/xen-emu.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index d49b6117f1..3b46cab1da 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -1207,7 +1207,21 @@ static bool kvm_xen_hcall_gnttab_op(struct kvm_xen_exit *exit, X86CPU *cpu, } break; } - case GNTTABOP_query_size: + case GNTTABOP_query_size: { + struct gnttab_query_size size; + + qemu_build_assert(sizeof(size) == 16); + if (kvm_copy_from_gva(cs, arg, &size, sizeof(size))) { + err = -EFAULT; + break; + } + + err = xen_gnttab_query_size_op(&size); + if (!err && kvm_copy_to_gva(cs, arg, &size, sizeof(size))) { + err = -EFAULT; + } + break; + } case GNTTABOP_setup_table: case GNTTABOP_copy: case GNTTABOP_map_grant_ref: |