android_kernel_samsung_msm8976/arch/s390/kvm
Christian Borntraeger 92e6ecf392 [S390] Fix hypervisor detection for KVM
Currently we use the cpuid (via STIDP instruction) to recognize LPAR,
z/VM and KVM.
The architecture states, that bit 0-7 of STIDP returns all zero, and
if STIDP is executed in a virtual machine, the VM operating system
will replace bits 0-7 with FF.

KVM should not use FE to distinguish z/VM from KVM for interested
guests. The proper way to detect the hypervisor is the STSI (Store
System Information) instruction, which return information about the
hypervisors via function code 3, selector1=2, selector2=2.

This patch changes the detection routine of Linux to use STSI instead
of STIDP. This detection is earlier than bootmem, we have to use a
static buffer. Since STSI expects a 4kb block (4kb aligned) this
patch also changes the init.data alignment for s390. As this section
will be freed during boot, this should be no problem.

Patch is tested with LPAR, z/VM, KVM on LPAR, and KVM under z/VM.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-03-26 15:24:09 +01:00
..
diag.c [S390] Use unsigned long long for u64 on 64bit. 2009-01-09 12:15:07 +01:00
gaccess.h KVM: s390: Change guestaddr type in gaccess 2008-07-27 11:35:57 +03:00
intercept.c KVM: s390: Fix possible host kernel bug on lctl(g) handling 2008-07-27 11:36:20 +03:00
interrupt.c [S390] Use unsigned long long for u64 on 64bit. 2009-01-09 12:15:07 +01:00
Kconfig
kvm-s390.c [S390] Fix hypervisor detection for KVM 2009-03-26 15:24:09 +01:00
kvm-s390.h
Makefile
priv.c [S390] Use unsigned long long for u64 on 64bit. 2009-01-09 12:15:07 +01:00
sie64a.S
sigp.c KVM: s390: Fix problem state handling in guest sigp handler 2008-11-23 14:34:39 +02:00