Re: [PATCH 04/13] KVM: Drop kvm_arch_create_memslot()

Janosch Frank
2019-09-12T11:31:55Z

[-- Attachment #1.1: Type: text/plain, Size: 941 bytes --]

On 9/11/19 8:50 PM, Sean Christopherson wrote:
> Remove kvm_arch_create_memslot() now that all arch implementations are
> effectively nops. Explicitly free an allocated-but-unused dirty bitmap
> instead of relying on kvm_free_memslot() now that setting a memslot can
> no longer fail after arch code has allocated memory. In practice
> this was already true, e.g. architectures that allocated memory via
> kvm_arch_create_memslot() never failed kvm_arch_prepare_memory_region()
> and vice versa, but removing kvm_arch_create_memslot() eliminates the
> potential for future code to stealthily change behavior.
>
> Eliminating the error path's reliance on kvm_free_memslot() paves the
> way for simplify kvm_free_memslot(), i.e. dropping its @dont param.
>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Please either split or adopt the patch title to include the freeing.
I'd go for splitting.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]