OSDN Git Service

s390/kvm: diagnose 0x318 sync and reset
authorCollin Walling <walling@linux.ibm.com>
Mon, 22 Jun 2020 15:46:36 +0000 (11:46 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 23 Jun 2020 08:55:33 +0000 (10:55 +0200)
commit23a60f834406c8e3805328b630d09d5546b460c1
treec53c0cbf0698c72c86cb2ef13701be06181adf78
parenta23816f3cdcbffe5dc6e8c331914b3f51b87c2f3
s390/kvm: diagnose 0x318 sync and reset

DIAGNOSE 0x318 (diag318) sets information regarding the environment
the VM is running in (Linux, z/VM, etc) and is observed via
firmware/service events.

This is a privileged s390x instruction that must be intercepted by
SIE. Userspace handles the instruction as well as migration. Data
is communicated via VCPU register synchronization.

The Control Program Name Code (CPNC) is stored in the SIE block. The
CPNC along with the Control Program Version Code (CPVC) are stored
in the kvm_vcpu_arch struct.

This data is reset on load normal and clear resets.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20200622154636.5499-3-walling@linux.ibm.com
[borntraeger@de.ibm.com: fix sync_reg position]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/include/uapi/asm/kvm.h
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/vsie.c
include/uapi/linux/kvm.h