qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/2] s390x/ais: enable ais when migration is


From: David Hildenbrand
Subject: Re: [Qemu-devel] [PATCH v2 1/2] s390x/ais: enable ais when migration is available
Date: Tue, 26 Sep 2017 15:43:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

> +    /* try enable the AIS facility */
> +    test_attr.group = KVM_DEV_FLIC_AISM_ALL;
> +    if (!ioctl(flic_state->fd, KVM_HAS_DEVICE_ATTR, test_attr)) {
> +            kvm_vm_enable_cap(kvm_state, KVM_CAP_S390_AIS, 0);
> +    }
> +
>      return;
>  fail:
>      error_propagate(errp, errp_local);
> @@ -578,7 +584,7 @@ static void kvm_s390_flic_reset(DeviceState *dev)
>  
>      flic_disable_wait_pfault(flic);
>  
> -    if (fs->ais_supported) {
> +    if (s390_has_feat(S390_FEAT_ADAPTER_INT_SUPPRESSION)) {

I don't remember if a reset is trigger on realization. Most probably
not, but it could be.

Would it hurt if the following code would not get called if the flic
hasn't been used yet? (possible reset before cpu model has been
initialized) - are kvm_s390_modify_ais_mode() calls required before ais
can be used for the first time?

If so, we could add a manual reset after the cpu model has been initialized.

>          for (isc = 0; isc <= MAX_ISC; isc++) {
>              rc = kvm_s390_modify_ais_mode(fs, isc, SIC_IRQ_MODE_ALL);
>              if (rc) {
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 75d4f30..1d4bb73 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -1,7 +1,7 @@
>  /*
>   * Channel subsystem base support.
>   *
> - * Copyright 2012 IBM Corp.
> + * Copyright IBM Corp. 2012, 2017
>   * Author(s): Cornelia Huck <address@hidden>
>   *
>   * This work is licensed under the terms of the GNU GPL, version 2 or (at
> @@ -672,7 +672,7 @@ void css_adapter_interrupt(CssIoAdapterType type, uint8_t 
> isc)
>      }
>  
>      trace_css_adapter_interrupt(isc);
> -    if (fs->ais_supported) {
> +    if (s390_has_feat(S390_FEAT_ADAPTER_INT_SUPPRESSION)) {
>          if (fsc->inject_airq(fs, type, isc, adapter->flags)) {
>              error_report("Failed to inject airq with AIS supported");
>              exit(1);
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index fafbc6d..98c82c2 100644
> --- a/hw/s390x/s390-virtio-ccw.c

Looks much better to me now.

-- 

Thanks,

David



reply via email to

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