KVM: x86: Shrink the usercopy region of the emulation context
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 18 Feb 2020 23:29:50 +0000 (15:29 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 16:57:53 +0000 (17:57 +0100)
commit06add254c7f3b7f6fdfe04eb028aaabe5b27a734
treef5ef8f264e875f296c534f56ca7793f8a1abfbe3
parent2f728d66e8a7d89d7cb141bf0acb30c61ae7ded5
KVM: x86: Shrink the usercopy region of the emulation context

Shuffle a few operand structs to the end of struct x86_emulate_ctxt and
update the cache creation to whitelist only the region of the emulation
context that is expected to be copied to/from user memory, e.g. the
instruction operands, registers, and fetch/io/mem caches.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/kvm_emulate.h
arch/x86/kvm/x86.c