[libvirt] [PATCH 3/9] qemu: rename qemuDomainAssignARMVirtioMMIOAddresses()

Andrea Bolognani abologna at redhat.com
Thu May 17 13:48:46 UTC 2018


On Tue, 2018-05-15 at 12:53 +0200, Lubomir Rintel wrote:
> Having a MMIO VirtIO interface is not specific to ARM. RISC-V can use it
> too.
> 
> Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
> ---
>  src/qemu/qemu_domain_address.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
> index b7c82cb6f1..87e1dc3bd2 100644
> --- a/src/qemu/qemu_domain_address.c
> +++ b/src/qemu/qemu_domain_address.c
> @@ -477,8 +477,8 @@ qemuDomainHasVirtioMMIODevices(virDomainDefPtr def)
>  
>  
>  static void
> -qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def,
> -                                       virQEMUCapsPtr qemuCaps)
> +qemuDomainAssignVirtioMMIOAddresses(virDomainDefPtr def,
> +                                    virQEMUCapsPtr qemuCaps)
>  {
>      if (def->os.arch != VIR_ARCH_ARMV7L &&
>          def->os.arch != VIR_ARCH_AARCH64)
> @@ -2927,7 +2927,7 @@ qemuDomainAssignAddresses(virDomainDefPtr def,
>      if (qemuDomainAssignS390Addresses(def, qemuCaps) < 0)
>          return -1;
>  
> -    qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps);
> +    qemuDomainAssignVirtioMMIOAddresses(def, qemuCaps);
>  
>      if (qemuDomainAssignPCIAddresses(def, qemuCaps, driver, obj) < 0)
>          return -1;

Agreed on this second hunk, as having a more generic name is
definitely appropriate; however, the existing function has some
Arm-specific logic that doesn't apply to RISC-V, so you should
introduce a RISC-V variant and have the generic function call
either based on the guest architecture.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list