Re: [PATCH 2/7] accel/kvm: Simplify kvm_check_extension()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Jun 2020 12:50:47 +0200
Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> wrote:

> In previous commit we let kvm_check_extension() use the
> global kvm_state. Since the KVMState* argument is now
> unused, drop it.
> 
> Convert callers with this Coccinelle script:
> 
>   @@
>   expression kvm_state, extension;
>   @@
>   -   kvm_check_extension(kvm_state, extension)
>   +   kvm_check_extension(extension)
> 
> Unused variables manually removed:
> - CPUState* in hyperv_enabled()
> - KVMState* in kvm_arm_get_max_vm_ipa_size()
> 
> Inspired-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

🌟💡🌟

> Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
> ---
>  include/sysemu/kvm.h         |  2 +-
>  accel/kvm/kvm-all.c          | 64 ++++++++++++++++++------------------
>  hw/hyperv/hyperv.c           |  2 +-
>  hw/i386/kvm/clock.c          |  2 +-
>  hw/i386/kvm/i8254.c          |  4 +--
>  hw/i386/kvm/ioapic.c         |  2 +-
>  hw/intc/arm_gic_kvm.c        |  2 +-
>  hw/intc/openpic_kvm.c        |  2 +-
>  hw/intc/xics_kvm.c           |  2 +-
>  hw/s390x/s390-stattrib-kvm.c |  2 +-
>  target/arm/kvm.c             | 13 ++++----
>  target/arm/kvm32.c           |  2 +-
>  target/arm/kvm64.c           | 15 ++++-----
>  target/i386/kvm.c            | 61 ++++++++++++++++------------------
>  target/mips/kvm.c            |  4 +--
>  target/ppc/kvm.c             | 34 +++++++++----------
>  target/s390x/cpu_models.c    |  3 +-
>  target/s390x/kvm.c           | 30 ++++++++---------
>  18 files changed, 119 insertions(+), 127 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux