Message ID | 20200508230823.22956-8-walling@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | s390: Extended-Length SCCB & DIAGNOSE 0x318 | expand |
On Fri, 8 May 2020 19:08:22 -0400 Collin Walling <walling@linux.ibm.com> wrote: > Signed-off-by: Collin Walling <walling@linux.ibm.com> > --- > linux-headers/asm-s390/kvm.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h > index 0138ccb0d8..b661feafdc 100644 > --- a/linux-headers/asm-s390/kvm.h > +++ b/linux-headers/asm-s390/kvm.h > @@ -74,6 +74,7 @@ struct kvm_s390_io_adapter_req { > #define KVM_S390_VM_CRYPTO 2 > #define KVM_S390_VM_CPU_MODEL 3 > #define KVM_S390_VM_MIGRATION 4 > +#define KVM_S390_VM_MISC 5 > > /* kvm attributes for mem_ctrl */ > #define KVM_S390_VM_MEM_ENABLE_CMMA 0 > @@ -171,6 +172,10 @@ struct kvm_s390_vm_cpu_subfunc { > #define KVM_S390_VM_MIGRATION_START 1 > #define KVM_S390_VM_MIGRATION_STATUS 2 > > +/* kvm attributes for KVM_S390_VM_MISC */ > +#define KVM_S390_VM_MISC_ENABLE_DIAG318 0 > +#define KVM_S390_VM_MISC_DIAG318 1 > + > /* for KVM_GET_REGS and KVM_SET_REGS */ > struct kvm_regs { > /* general purpose regs for s390 */ Hm... remind me what the state of the kernel part is?
On 5/13/20 3:05 AM, Cornelia Huck wrote: > On Fri, 8 May 2020 19:08:22 -0400 > Collin Walling <walling@linux.ibm.com> wrote: > >> Signed-off-by: Collin Walling <walling@linux.ibm.com> >> --- >> linux-headers/asm-s390/kvm.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h >> index 0138ccb0d8..b661feafdc 100644 >> --- a/linux-headers/asm-s390/kvm.h >> +++ b/linux-headers/asm-s390/kvm.h >> @@ -74,6 +74,7 @@ struct kvm_s390_io_adapter_req { >> #define KVM_S390_VM_CRYPTO 2 >> #define KVM_S390_VM_CPU_MODEL 3 >> #define KVM_S390_VM_MIGRATION 4 >> +#define KVM_S390_VM_MISC 5 >> >> /* kvm attributes for mem_ctrl */ >> #define KVM_S390_VM_MEM_ENABLE_CMMA 0 >> @@ -171,6 +172,10 @@ struct kvm_s390_vm_cpu_subfunc { >> #define KVM_S390_VM_MIGRATION_START 1 >> #define KVM_S390_VM_MIGRATION_STATUS 2 >> >> +/* kvm attributes for KVM_S390_VM_MISC */ >> +#define KVM_S390_VM_MISC_ENABLE_DIAG318 0 >> +#define KVM_S390_VM_MISC_DIAG318 1 >> + >> /* for KVM_GET_REGS and KVM_SET_REGS */ >> struct kvm_regs { >> /* general purpose regs for s390 */ > > Hm... remind me what the state of the kernel part is? > Kernel code to execute the instruction is in place today. A kernel running on real hardware (or at least LPAR) can successfully execute the instruction if the hardware supports it. The Linux commit is: 4ad78b8651aacf26b3ab6d1e784952eb70469c43 The KVM code is still under review, since most of it needs to align with the QEMU changes as well. Guest kernels executing the instruction rely on both QEMU and KVM support. KVM handles the execution and interception of the instruction, while QEMU handles enabling the instruction (by negotiating with KVM to allow it and then setting the appropriate SCLP bit) and migration of the data. The latest changes to the KVM code is a new IOCTL that allows QEMU to negotiate with KVM to actually enable the diag318 feature. By default, KVM treats the feature as "disabled" unless userspace explicitly asks for it. The KVM discussion is: https://www.spinics.net/lists/kvm/msg215758.html
diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index 0138ccb0d8..b661feafdc 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers/asm-s390/kvm.h @@ -74,6 +74,7 @@ struct kvm_s390_io_adapter_req { #define KVM_S390_VM_CRYPTO 2 #define KVM_S390_VM_CPU_MODEL 3 #define KVM_S390_VM_MIGRATION 4 +#define KVM_S390_VM_MISC 5 /* kvm attributes for mem_ctrl */ #define KVM_S390_VM_MEM_ENABLE_CMMA 0 @@ -171,6 +172,10 @@ struct kvm_s390_vm_cpu_subfunc { #define KVM_S390_VM_MIGRATION_START 1 #define KVM_S390_VM_MIGRATION_STATUS 2 +/* kvm attributes for KVM_S390_VM_MISC */ +#define KVM_S390_VM_MISC_ENABLE_DIAG318 0 +#define KVM_S390_VM_MISC_DIAG318 1 + /* for KVM_GET_REGS and KVM_SET_REGS */ struct kvm_regs { /* general purpose regs for s390 */
Signed-off-by: Collin Walling <walling@linux.ibm.com> --- linux-headers/asm-s390/kvm.h | 5 +++++ 1 file changed, 5 insertions(+)