qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 8/9] s390x/kvm: msi route fixup for non-pci


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v3 8/9] s390x/kvm: msi route fixup for non-pci
Date: Wed, 26 Jul 2017 09:09:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 25.07.2017 17:33, Cornelia Huck wrote:
> If we don't provide pci, we cannot have a pci device for which we
> have to translate to adapter routes: just return -ENODEV.
> 
> Signed-off-by: Cornelia Huck <address@hidden>
> ---
>  target/s390x/kvm.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index dc3f940b95..fb3e21a3a4 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -2424,6 +2424,11 @@ int kvm_arch_fixup_msi_route(struct 
> kvm_irq_routing_entry *route,
>      uint32_t idx = data >> ZPCI_MSI_VEC_BITS;
>      uint32_t vec = data & ZPCI_MSI_VEC_MASK;
>  
> +    if (!s390_has_feat(S390_FEAT_ZPCI)) {
> +        DPRINTF("fixup_msi_route on non-pci machine?!\n");
> +        return -ENODEV;
> +    }
> +
>      pbdev = s390_pci_find_dev_by_idx(s390_get_phb(), idx);
>      if (!pbdev) {
>          DPRINTF("add_msi_route no dev\n");
> 

Is this additional check really needed here? I'd rather expect
s390_pci_find_dev_by_idx() to return NULL here already, so we should
already be fine, shouldn't we?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]