mbox series

[v2,0/3] KVM: s390: Enable AP instructions for pv-guests

Message ID 20230810124719.2167260-1-seiden@linux.ibm.com
Headers show
Series KVM: s390: Enable AP instructions for pv-guests | expand

Message

Steffen Eiden Aug. 10, 2023, 12:47 p.m. UTC
This series enables general QEMU support for AP pass-through for Secure
Execution guests (pv-guests).

To enable AP-PT on pv-guests QEMU has to turn on the corresponding bits
in the KVM CPU-model[1] if the CPU firmware supports it. However, it
only makes sense to turn on AP-PT if the QEMU user enabled (general) AP
for that guest.

The series consists of three patches:
 1) update kvm-s390 header for this series
 2) small cleanup for kvm_s390_set_attr()
    refactor code to add ap_available() and ap_enabled()
 3) Add UV_CALL CPU model enablement

since v1:

- removed the new features from the default gen16 model
- updated KVM-headers to match KVM series v3 [1]
- applied review comments from Thomas

[1]
https://lore.kernel.org/linux-s390/20230810113255.2163043-1-seiden@linux.ibm.com/#t


Steffen

Steffen Eiden (3):
  linux-headers: update asm-s390/kvm.h
  target/s390x/kvm: Refactor AP functionalities
  target/s390x: AP-passthrough for PV guests

 linux-headers/asm-s390/kvm.h        | 16 +++++
 target/s390x/cpu_features.h         |  1 +
 target/s390x/cpu_features_def.h.inc |  4 ++
 target/s390x/cpu_models.c           |  2 +
 target/s390x/gen-features.c         |  2 +
 target/s390x/kvm/kvm.c              | 97 ++++++++++++++++++++++++++---
 6 files changed, 115 insertions(+), 7 deletions(-)