All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/7] s390x: vfio-ap: guest dedicated crypto adapters
@ 2018-03-15 23:24 Tony Krowiak
  2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 1/7] linux-headers: linux header updates for AP support Tony Krowiak
                   ` (6 more replies)
  0 siblings, 7 replies; 71+ messages in thread
From: Tony Krowiak @ 2018-03-15 23:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-s390x, schwidefsky, heiko.carstens, borntraeger, cohuck,
	david, bjsdjshi, pmorel, alifm, mjrosato, jjherne, pasic,
	eskultet, berrange, alex.williamson, eric.auger, pbonzini,
	peter.maydell, agraf, rth, akrowiak

This patch series is the QEMU counterpart to the KVM/kernel support for 
guest dedicated crypto adapters. The KVM/kernel model is built on the 
VFIO mediated device framework and provides the infrastructure for 
granting exclusive guest access to crypto devices installed on the linux 
host. This patch series introduces a new QEMU command line option, QEMU 
object model and CPU model features to exploit the KVM/kernel model.

See the detailed specifications for AP virtualization provided by this 
patch set in docs/vfio-ap.txt for a more complete discussion of the 
design introduced by this patch series.

v2 -> v3 Change log:
===================
* The corresponding KVM/kernel patch series defined a new device attribute
  to the KVM_S390_VM_CRYPTO attribute group to set interpretive execution
  of AP instructions for the guest. Now, when the vfio-ap device is 
  realized, the KVM_SET_DEVICE_ATTR ioctl is invoked to enable 
  interpretation of AP instructions executed on the guest.

* When the CPU model feature indicating AP instructions are supported for
  the guest (i.e., -cpu xxxx,ap=on), the expectation is that the AP bus 
  will be initialized on the guest. In v2, however; AP instructions were
  intercepted unless a vfio-ap device (i.e., -device vfio-ap,sysfsdev=$path)
  was defined for the guest. Since there were no handlers defined to 
  process intercepted AP instructions, an operation exception was injected
  into the guest causing the AP bus to fail initialization. The v3 version
  adds handlers for intercepted AP instructions that incorporate the 
  following logic:

  If the CPU model indicates AP instructions are installed 
     Set the status response code for the instruction to indicate that
     the APQN contained in the instruction is not valid. This is actually
     true because the AP devices are configured for the guest via the  
     sysfs attribute files of the vfio-ap device, so any APQN would not
     be valid.
   
  Else
     Return an error from the handler. This will cause an operation 
     exception to be injected into the guest in which case the AP bus
     would not initialize. This is the same behavior as exists prior to 
     the introduction of this patch series.

* Miscellaneous code formatting and other trivial changes.

Tony Krowiak (7):
  linux-headers: linux header updates for AP support
  s390x/ap: base Adjunct Processor (AP) object
  s390x/cpumodel: Set up CPU model for AP device support
  s390x/kvm: interface to interpret AP instructions
  s390x/vfio: ap: Introduce VFIO AP device
  s390x/kvm: handle AP instruction interception
  s390: doc: detailed specifications for AP virtualization

 default-configs/s390x-softmmu.mak |    1 +
 docs/vfio-ap.txt                  |  624 +++++++++++++++++++++++++++++++++++++
 hw/s390x/Makefile.objs            |    1 +
 hw/s390x/ap-device.c              |   38 +++
 hw/vfio/Makefile.objs             |    1 +
 hw/vfio/ap.c                      |  229 ++++++++++++++
 include/hw/s390x/ap-device.h      |   44 +++
 include/hw/vfio/vfio-common.h     |    1 +
 linux-headers/asm-s390/kvm.h      |    2 +
 linux-headers/linux/vfio.h        |    2 +
 target/s390x/cpu_features.c       |    3 +
 target/s390x/cpu_features_def.h   |    3 +
 target/s390x/cpu_models.c         |    2 +
 target/s390x/gen-features.c       |    3 +
 target/s390x/kvm.c                |   31 ++
 target/s390x/kvm_s390x.h          |    2 +
 16 files changed, 987 insertions(+), 0 deletions(-)
 create mode 100644 docs/vfio-ap.txt
 create mode 100644 hw/s390x/ap-device.c
 create mode 100644 hw/vfio/ap.c
 create mode 100644 include/hw/s390x/ap-device.h

^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2018-04-12 15:25 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 23:24 [Qemu-devel] [PATCH v3 0/7] s390x: vfio-ap: guest dedicated crypto adapters Tony Krowiak
2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 1/7] linux-headers: linux header updates for AP support Tony Krowiak
2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 2/7] s390x/ap: base Adjunct Processor (AP) object Tony Krowiak
2018-03-16 10:27   ` Pierre Morel
2018-03-16 10:38   ` Pierre Morel
2018-03-16 14:18     ` Tony Krowiak
2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 3/7] s390x/cpumodel: Set up CPU model for AP device support Tony Krowiak
2018-03-16  9:36   ` Pierre Morel
2018-03-16 14:23     ` Tony Krowiak
2018-04-06 14:51   ` Pierre Morel
2018-04-10 13:19     ` Tony Krowiak
2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 4/7] s390x/kvm: interface to interpret AP instructions Tony Krowiak
2018-03-16 10:34   ` Pierre Morel
2018-03-16 10:36   ` Pierre Morel
2018-03-16 14:33     ` Tony Krowiak
2018-03-20 18:02   ` Tony Krowiak
2018-03-26  8:38   ` David Hildenbrand
2018-04-02 18:27     ` Tony Krowiak
2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 5/7] s390x/vfio: ap: Introduce VFIO AP device Tony Krowiak
2018-03-16 10:42   ` Pierre Morel
2018-03-16 13:22     ` Halil Pasic
2018-03-16 15:29       ` Tony Krowiak
2018-03-16 15:36         ` Halil Pasic
2018-03-16 15:53           ` Tony Krowiak
2018-03-16 16:26             ` Halil Pasic
2018-03-27 12:02       ` Cornelia Huck
2018-04-02 17:05         ` Tony Krowiak
2018-04-03 18:53           ` Tony Krowiak
2018-03-16 15:00     ` Tony Krowiak
2018-03-15 23:24 ` [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception Tony Krowiak
2018-03-16  8:03   ` Pierre Morel
2018-03-16 15:31     ` Tony Krowiak
2018-03-26  8:32   ` David Hildenbrand
2018-03-26  8:43     ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-03-26  9:03     ` [Qemu-devel] " Pierre Morel
2018-03-26 12:01       ` Halil Pasic
2018-04-02 16:39         ` Tony Krowiak
2018-04-02 16:36       ` Tony Krowiak
2018-04-03  9:36         ` Cornelia Huck
2018-04-04 11:06           ` Pierre Morel
2018-04-04 13:38           ` Tony Krowiak
2018-04-05 16:38           ` Tony Krowiak
2018-04-05 17:17             ` Halil Pasic
2018-04-06  8:40               ` Cornelia Huck
2018-04-06  9:11                 ` David Hildenbrand
2018-04-06 12:09                   ` Halil Pasic
2018-04-06 12:32                     ` Halil Pasic
2018-04-06 12:37                       ` Daniel P. Berrangé
2018-04-06 16:07             ` Halil Pasic
2018-04-09  9:32               ` Cornelia Huck
2018-04-09 10:37                 ` Halil Pasic
2018-04-09 10:51                   ` Cornelia Huck
2018-04-11 13:20                     ` Tony Krowiak
2018-04-11 13:50                       ` Halil Pasic
2018-04-12 15:24                         ` Tony Krowiak
2018-04-12 15:22                 ` Tony Krowiak
2018-04-04 11:09         ` Pierre Morel
2018-04-04 12:59           ` Tony Krowiak
2018-04-04 13:35             ` Pierre Morel
2018-04-04 13:33           ` Tony Krowiak
2018-04-04 13:43             ` Pierre Morel
2018-04-04 20:12               ` Tony Krowiak
2018-04-05 13:51                 ` Halil Pasic
2018-04-02 15:59     ` Tony Krowiak
2018-04-06 14:08   ` Pierre Morel
2018-04-06 14:42     ` Pierre Morel
2018-03-15 23:25 ` [Qemu-devel] [PATCH v3 7/7] s390: doc: detailed specifications for AP virtualization Tony Krowiak
2018-03-16  9:45   ` Pierre Morel
2018-03-16 10:03   ` Pierre Morel
2018-03-16 15:35     ` Tony Krowiak
2018-04-02 16:46     ` Tony Krowiak

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.