[libvirt] [PATCH v3 4/9] qemu: RISC-V machines have no PCI

Lubomir Rintel posted 9 patches 7 years, 5 months ago
Only 8 patches received!
[libvirt] [PATCH v3 4/9] qemu: RISC-V machines have no PCI
Posted by Lubomir Rintel 7 years, 5 months ago
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 src/qemu/qemu_domain_address.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 6c540a8094..551883e989 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -2157,7 +2157,9 @@ static bool
 qemuDomainSupportsPCI(virDomainDefPtr def,
                       virQEMUCapsPtr qemuCaps)
 {
-    if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
+    if ((def->os.arch != VIR_ARCH_ARMV7L) &&
+        (def->os.arch != VIR_ARCH_AARCH64) &&
+        !ARCH_IS_RISCV(def->os.arch))
         return true;
 
     if (STREQ(def->os.machine, "versatilepb"))
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 4/9] qemu: RISC-V machines have no PCI
Posted by Andrea Bolognani 7 years, 5 months ago
On Wed, 2018-08-22 at 11:15 +0200, Lubomir Rintel wrote:
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
>  src/qemu/qemu_domain_address.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
> index 6c540a8094..551883e989 100644
> --- a/src/qemu/qemu_domain_address.c
> +++ b/src/qemu/qemu_domain_address.c
> @@ -2157,7 +2157,9 @@ static bool
>  qemuDomainSupportsPCI(virDomainDefPtr def,
>                        virQEMUCapsPtr qemuCaps)
>  {
> -    if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
> +    if ((def->os.arch != VIR_ARCH_ARMV7L) &&
> +        (def->os.arch != VIR_ARCH_AARCH64) &&
> +        !ARCH_IS_RISCV(def->os.arch))
>          return true;
>  
>      if (STREQ(def->os.machine, "versatilepb"))

Someday we should really rewrite this function.
But today is not that day.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list