WSL2-Linux-Kernel/arch/s390
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
..
appldata Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2008-12-28 12:49:40 -08:00
boot [PATCH] use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh 2005-06-23 09:45:07 -07:00
crypto crypto: api - Fix module load deadlock with fallback algorithms 2009-02-26 14:06:31 +08:00
hypfs zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
include/asm [S390] Fix hypervisor detection for KVM 2009-03-26 15:24:09 +01:00
kernel [S390] Fix hypervisor detection for KVM 2009-03-26 15:24:09 +01:00
kvm [S390] Fix hypervisor detection for KVM 2009-03-26 15:24:09 +01:00
lib [S390] Dont check for pfn_valid() in uaccess_pt.c 2009-03-18 13:28:13 +01:00
math-emu [S390] remove -traditional 2008-04-30 13:38:44 +02:00
mm [S390] check addressing mode in s390_enable_sie 2009-03-26 15:24:09 +01:00
oprofile Combine instrumentation menus in kernel/Kconfig.instrumentation 2007-10-19 11:53:54 -07:00
Kconfig [CVE-2009-0029] s390: enable system call wrappers 2009-01-14 14:15:17 +01:00
Kconfig.debug [S390] DEBUG_PAGEALLOC support for s390. 2008-02-05 16:50:54 +01:00
Makefile [S390] Add processor type march=z10 and a processor type safety check. 2008-12-25 13:39:12 +01:00
defconfig [S390] Update default configuration. 2009-02-11 10:37:40 +01:00