OSDN Git Service

KVM: Use "new" memslot's address space ID instead of dedicated param
authorSean Christopherson <seanjc@google.com>
Mon, 6 Dec 2021 19:54:10 +0000 (20:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:19 +0000 (04:24 -0500)
commitce5f0215620c11a5829da7f30bebf3adeeef3345
treefb9e6f195940eae5fb5a1e0b94786641e9019699
parent4e4d30cb9b8740e178731406aa28b96f12c6edbd
KVM: Use "new" memslot's address space ID instead of dedicated param

Now that the address space ID is stored in every slot, including fake
slots used for deletion, use the slot's as_id instead of passing in the
redundant information as a param to kvm_set_memslot().  This will greatly
simplify future memslot work by avoiding passing a large number of
variables around purely to honor @as_id.

Drop a comment in the DELETE path about new->as_id being provided purely
for debug, as that's now a lie.

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: <03189577be214ab8530a4b3a3ee3ed1c2f9e5815.1638817639.git.maciej.szmigiero@oracle.com>
virt/kvm/kvm_main.c