KVM: x86: Don't assume old/new memslots are non-NULL at memslot commit
authorSean Christopherson <seanjc@google.com>
Mon, 6 Dec 2021 19:54:20 +0000 (20:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:26 +0000 (04:24 -0500)
commit77aedf26fe5d2795cd6aa1a75a8dd62dbac503e6
tree8a61ffaa6fc66ac72bed588431193e5c19096af2
parent07921665a651918350bc6653d4ca8a516a867b4b
KVM: x86: Don't assume old/new memslots are non-NULL at memslot commit

Play nice with a NULL @old or @new when handling memslot updates so that
common KVM can pass NULL for one or the other in CREATE and DELETE cases
instead of having to synthesize a dummy memslot.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <2eb7788adbdc2bc9a9c5f86844dd8ee5c8428732.1638817640.git.maciej.szmigiero@oracle.com>
arch/x86/kvm/x86.c