kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Rosato <mjrosato@linux.ibm.com>
To: Pierre Morel <pmorel@linux.ibm.com>, qemu-s390x@nongnu.org
Cc: alex.williamson@redhat.com, schnelle@linux.ibm.com,
	cohuck@redhat.com, thuth@redhat.com, farman@linux.ibm.com,
	richard.henderson@linaro.org, david@redhat.com,
	pasic@linux.ibm.com, borntraeger@linux.ibm.com, mst@redhat.com,
	pbonzini@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [PATCH v7 3/8] s390x/pci: enable for load/store intepretation
Date: Wed, 22 Jun 2022 11:20:14 -0400	[thread overview]
Message-ID: <12e29f2a-8641-7ba0-0dc4-1a7f97a7ca49@linux.ibm.com> (raw)
In-Reply-To: <ea3daac0-875d-dd9d-7ad0-65a0aed2aaed@linux.ibm.com>

On 6/22/22 4:35 AM, Pierre Morel wrote:
> 
> 
> On 6/6/22 22:36, Matthew Rosato wrote:
>> If the ZPCI_OP ioctl reports that is is available and usable, then the
>> underlying KVM host will enable load/store intepretation for any guest
>> device without a SHM bit in the guest function handle.  For a device that
>> will be using interpretation support, ensure the guest function handle
>> matches the host function handle; this value is re-checked every time the
>> guest issues a SET PCI FN to enable the guest device as it is the only
>> opportunity to reflect function handle changes.
>>
>> By default, unless interpret=off is specified, interpretation support 
>> will
>> always be assumed and exploited if the necessary ioctl and features are
>> available on the host kernel.  When these are unavailable, we will 
>> silently
>> revert to the interception model; this allows existing guest 
>> configurations
>> to work unmodified on hosts with and without zPCI interpretation support,
>> allowing QEMU to choose the best support model available.
>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> ---
>>   hw/s390x/meson.build            |  1 +
>>   hw/s390x/s390-pci-bus.c         | 66 ++++++++++++++++++++++++++++++++-
>>   hw/s390x/s390-pci-inst.c        | 16 ++++++++
>>   hw/s390x/s390-pci-kvm.c         | 22 +++++++++++
>>   include/hw/s390x/s390-pci-bus.h |  1 +
>>   include/hw/s390x/s390-pci-kvm.h | 24 ++++++++++++
>>   target/s390x/kvm/kvm.c          |  7 ++++
>>   target/s390x/kvm/kvm_s390x.h    |  1 +
>>   8 files changed, 137 insertions(+), 1 deletion(-)
>>   create mode 100644 hw/s390x/s390-pci-kvm.c
>>   create mode 100644 include/hw/s390x/s390-pci-kvm.h
>>
>> diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build
>> index feefe0717e..f291016fee 100644
>> --- a/hw/s390x/meson.build
>> +++ b/hw/s390x/meson.build
>> @@ -23,6 +23,7 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
>>     's390-skeys-kvm.c',
>>     's390-stattrib-kvm.c',
>>     'pv.c',
>> +  's390-pci-kvm.c',
>>   ))
> 
> Here...
> 
>> diff --git a/hw/s390x/s390-pci-kvm.c b/hw/s390x/s390-pci-kvm.c
>> new file mode 100644
>> index 0000000000..0f16104a74
>> --- /dev/null
>> +++ b/hw/s390x/s390-pci-kvm.c
> 
> ...and here:
> 
> Shouldn't this file go in target/s390x/kvm ?
> 
> 

I wasn't sure tbh, there seems to be precedent to use hw/s390x already 
today for kvm-specific pieces of hardware support (e.g. tod, skeys, pv, 
stattrib) whereas target/s390x/kvm has only kvm.c?

Anyone else have an opinion on this one?



  reply	other threads:[~2022-06-22 15:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 20:36 [PATCH v7 0/8] s390x/pci: zPCI interpretation support Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 1/8] Update linux headers Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 2/8] s390x/pci: add routine to get host function handle from CLP info Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 3/8] s390x/pci: enable for load/store intepretation Matthew Rosato
2022-06-22  8:35   ` Pierre Morel
2022-06-22 15:20     ` Matthew Rosato [this message]
2022-06-06 20:36 ` [PATCH v7 4/8] s390x/pci: don't fence interpreted devices without MSI-X Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 5/8] s390x/pci: enable adapter event notification for interpreted devices Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 6/8] s390x/pci: let intercept devices have separate PCI groups Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 7/8] s390x/pci: reflect proper maxstbl for groups of interpreted devices Matthew Rosato
2022-06-06 20:36 ` [PATCH v7 8/8] s390x/s390-virtio-ccw: add zpcii-disable machine property Matthew Rosato
2022-06-22  8:50   ` Pierre Morel
2022-06-22 15:20     ` Matthew Rosato
2022-06-23 13:50       ` Pierre Morel
2022-06-23 14:26         ` Matthew Rosato

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=12e29f2a-8641-7ba0-0dc4-1a7f97a7ca49@linux.ibm.com \
    --to=mjrosato@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=schnelle@linux.ibm.com \
    --cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).