diff options
author | Sean Christopherson <[email protected]> | 2023-07-28 18:35:22 -0700 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2023-08-31 14:07:23 -0400 |
commit | c70934e0ab2d2c4bb16bf70c3e3db8c064a1761b (patch) | |
tree | f76d5c210405f0447f7f35a830dbc7399be603fa /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | b271e17defb07560399734c7aefbdd0fc961c601 (diff) |
KVM: x86: Reject memslot MOVE operations if KVMGT is attached
Disallow moving memslots if the VM has external page-track users, i.e. if
KVMGT is being used to expose a virtual GPU to the guest, as KVMGT doesn't
correctly handle moving memory regions.
Note, this is potential ABI breakage! E.g. userspace could move regions
that aren't shadowed by KVMGT without harming the guest. However, the
only known user of KVMGT is QEMU, and QEMU doesn't move generic memory
regions. KVM's own support for moving memory regions was also broken for
multiple years (albeit for an edge case, but arguably moving RAM is
itself an edge case), e.g. see commit edd4fa37baa6 ("KVM: x86: Allocate
new rmap and large page tracking when moving memslot").
Reviewed-by: Yan Zhao <[email protected]>
Tested-by: Yongwei Ma <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions