All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	Richard Henderson <rth@twiddle.net>,
	Fei Li <sherrylf@linux.vnet.ibm.com>,
	Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 08/11] s390x/flic: introduce modify_ais_mode callback
Date: Wed, 12 Jul 2017 17:07:13 +0200	[thread overview]
Message-ID: <20170712170713.1f5cf6b2@dhcp-192-215.str.redhat.com> (raw)
In-Reply-To: <1499864265-144136-9-git-send-email-borntraeger@de.ibm.com>

On Wed, 12 Jul 2017 14:57:42 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> From: Fei Li <sherrylf@linux.vnet.ibm.com>
> 
> In order to emulate the adapter interruption suppression (AIS)
> facility properly, the guest needs to be able to modify the AIS mask.
> Interrupt suppression will be handled via the flic (for kvm, via a
> recently introduced kernel backend; for !kvm, in the flic code), so
> let's introduce a method to change the mode via the flic interface.
> 
> Co-authored-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
> Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
> Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  hw/intc/s390_flic.c          | 37 ++++++++++++++++++++++++++++++++++++-
>  hw/intc/s390_flic_kvm.c      | 36 ++++++++++++++++++++++++++++++++++++
>  include/hw/s390x/s390_flic.h |  9 ++++++++-
>  3 files changed, 80 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
> index d3938b3..ce7f355 100644
> --- a/hw/intc/s390_flic.c
> +++ b/hw/intc/s390_flic.c
> @@ -79,15 +79,47 @@ static int qemu_s390_clear_io_flic(S390FLICState *fs, uint16_t subchannel_id,
>      return -ENOSYS;
>  }
>  
> +static int qemu_s390_modify_ais_mode(S390FLICState *fs, uint8_t isc,
> +                                     uint16_t mode)
> +{
> +    QEMUS390FLICState *flic  = QEMU_S390_FLIC(fs);
> +
> +    switch (mode) {
> +    case SIC_IRQ_MODE_ALL:
> +        flic->simm &= ~AIS_MODE_MASK(isc);
> +        flic->nimm &= ~AIS_MODE_MASK(isc);
> +        break;
> +    case SIC_IRQ_MODE_SINGLE:
> +        flic->simm |= AIS_MODE_MASK(isc);
> +        flic->nimm &= ~AIS_MODE_MASK(isc);

Can we have some documentation about the meaning of simm/nimm in qemu?
The one from the patch description of the respective kernel patch would
be fine.

> +        break;
> +    default:
> +        return -EINVAL;
> +    }
> +
> +    return 0;
> +}
> +
>

(...)

> @@ -406,6 +427,7 @@ typedef struct KVMS390FLICStateClass {
>  
>  static void kvm_s390_flic_realize(DeviceState *dev, Error **errp)
>  {
> +    S390FLICState *fs = S390_FLIC_COMMON(dev);
>      KVMS390FLICState *flic_state = KVM_S390_FLIC(dev);
>      struct kvm_create_device cd = {0};
>      struct kvm_device_attr test_attr = {0};
> @@ -438,6 +460,7 @@ static void kvm_s390_flic_realize(DeviceState *dev, Error **errp)
>      flic_state->clear_io_supported = !ioctl(flic_state->fd,
>                                              KVM_HAS_DEVICE_ATTR, test_attr);
>  
> +    fs->ais_supported = false;

The patch actually enabling this for kvm is in the next batch of
patches, I assume?

>      return;
>  fail:
>      error_propagate(errp, errp_local);

  reply	other threads:[~2017-07-12 15:07 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 12:57 [Qemu-devel] [PATCH 00/11] pending s390 patches part 1 Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 01/11] s390x/kvm: Rework cmma management Christian Borntraeger
2017-07-12 13:49   ` Cornelia Huck
2017-07-13  5:37     ` Janosch Frank
2017-07-12 12:57 ` [Qemu-devel] [PATCH 02/11] linux-headers: update to 4.13-rc0 Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 03/11] s390x/migration: Storage attributes device Christian Borntraeger
2017-07-12 14:09   ` Thomas Huth
2017-07-13  7:11     ` Christian Borntraeger
2017-07-13  7:32       ` Cornelia Huck
2017-07-13  7:35       ` Thomas Huth
2017-07-13  7:45         ` Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 04/11] s390x/migration: Monitor commands for storage attributes Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 05/11] s390x/cpumodel: clean up spacing and comments Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 06/11] s390x/cpumodel: provide compat handling for new cpu features Christian Borntraeger
2017-07-12 14:51   ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 07/11] s390x: add flags field for registering I/O adapter Christian Borntraeger
2017-07-12 15:00   ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 08/11] s390x/flic: introduce modify_ais_mode callback Christian Borntraeger
2017-07-12 15:07   ` Cornelia Huck [this message]
2017-07-13  7:12     ` Christian Borntraeger
2017-07-13  7:27       ` Cornelia Huck
2017-07-13  7:35         ` Christian Borntraeger
2017-07-13  7:47           ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 09/11] s390x/flic: introduce inject_airq callback Christian Borntraeger
2017-07-12 15:12   ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 10/11] s390x/sic: realize SIC handling Christian Borntraeger
2017-07-12 13:40   ` Thomas Huth
2017-07-12 15:40     ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt Christian Borntraeger
2017-07-12 14:26   ` Thomas Huth
2017-07-13  8:08     ` Christian Borntraeger
2017-07-13  8:18       ` Thomas Huth
2017-07-13  8:46   ` Cornelia Huck
2017-07-12 13:31 ` [Qemu-devel] [PATCH 00/11] pending s390 patches part 1 Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170712170713.1f5cf6b2@dhcp-192-215.str.redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sherrylf@linux.vnet.ibm.com \
    --cc=zyimin@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.