qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt
Date: Wed, 12 Jul 2017 16:26:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 12.07.2017 14:57, Christian Borntraeger wrote:
> From: Yi Min Zhao <address@hidden>
> 
> Let's use the new inject_airq callback of flic to inject adapter
> interrupts. For kvm case, if the kernel flic doesn't support the new
> interface, the irq routine remains unchanged. For non-kvm case,
> qemu-flic handles the suppression process.
> 
> Signed-off-by: Yi Min Zhao <address@hidden>
> Signed-off-by: Fei Li <address@hidden>
> Signed-off-by: Christian Borntraeger <address@hidden>
> ---
>  hw/s390x/css.c          | 18 ++++++++++++++++--
>  hw/s390x/s390-pci-bus.c |  2 +-
>  hw/s390x/virtio-ccw.c   |  2 +-
>  include/hw/s390x/css.h  |  2 +-
>  4 files changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 7b82176..ee4ebbf 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -547,12 +547,26 @@ out:
>      return r;
>  }
>  
> -void css_adapter_interrupt(uint8_t isc)
> +void css_adapter_interrupt(CssIoAdapterType type, uint8_t isc)
>  {
> +    S390FLICState *fs = s390_get_flic();
> +    S390FLICStateClass *fsc = S390_FLIC_COMMON_GET_CLASS(fs);
>      uint32_t io_int_word = (isc << 27) | IO_INT_WORD_AI;
> +    IoAdapter *adapter = channel_subsys.io_adapters[type][isc];
> +
> +    if (!adapter) {
> +        return;
> +    }
>  
>      trace_css_adapter_interrupt(isc);
> -    s390_io_interrupt(0, 0, 0, io_int_word);
> +    if (fs->ais_supported) {
> +        if (fsc->inject_airq(fs, type, isc, adapter->flags)) {
> +            fprintf(stderr, "Failed to inject airq with AIS supported\n");

Use error_report() instead?

> +            exit(1);
> +        }
> +    } else {
> +        s390_io_interrupt(0, 0, 0, io_int_word);
> +    }
>  }

 Thomas



reply via email to

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