Skip to contentSkip to conversation

kvm-s390: minor fixes

PATCH In review Christian Borntraeger 2 participants 4 messages Aug 29, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover kvm-s390: minor fixes

Hello Avi,

here are two small fixes against kvm.git

[PATCH 1/2] kvm-s390: Rework facility bits [PATCH 2/2] kvm-s390: change help text of guest Kconfig

Patch 1 fixes potential problems with newer machines and Patch 2 is a trivial help text change. I think both patches should be ok for 2.6.27.

Christian

#1 lore raw

PATCH 1/2 kvm-s390: Rework facility bits

From: Christian Borntraeger <[email protected]>

Heiko Carstens pointed out, that its safer to activate working facilities instead of disabling problematic facilities. The new code uses the host facility bits and masks it with known good ones.

---
 arch/s390/kvm/priv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kvm/priv.c +2 -2
Index: kvm/arch/s390/kvm/priv.c
===================================================================
@@ -157,8 +157,8 @@ static int handle_stfl(struct kvm_vcpu *
 	int rc;
 
 	vcpu->stat.instruction_stfl++;
-	facility_list &= ~(1UL<<24); /* no stfle */
-	facility_list &= ~(1UL<<23); /* no large pages */
+	/* only pass the facility bits, which we can handle */
+	facility_list &= 0xfe00fff3;
 
 	rc = copy_to_guest(vcpu, offsetof(struct _lowcore, stfl_fac_list),
 			   &facility_list, sizeof(facility_list));
#2 lore raw

PATCH 2/2 kvm-s390: change help text of guest Kconfig

In reply to Christian Borntraeger

The current help text for CONFIG_S390_GUEST is not very helpful. Lets add more text.

---
 arch/s390/Kconfig |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/s390/Kconfig +5 -2
Index: kvm/arch/s390/Kconfig
===================================================================
@@ -564,13 +564,16 @@ config ZFCPDUMP
 	  Refer to <file:Documentation/s390/zfcpdump.txt> for more details on this.
 
 config S390_GUEST
-bool "s390 guest support (EXPERIMENTAL)"
+bool "s390 guest support for KVM (EXPERIMENTAL)"
 	depends on 64BIT && EXPERIMENTAL
 	select VIRTIO
 	select VIRTIO_RING
 	select VIRTIO_CONSOLE
 	help
-	  Select this option if you want to run the kernel under s390 linux
+	  Select this option if you want to run the kernel as a guest under
+	  the KVM hypervisor. This will add detection for KVM as well  as a
+	  virtio transport. If KVM is detected, the virtio console will be
+	  the default console.
 endmenu
 
 source "net/Kconfig"
#3 lore raw
In reply to Christian Borntraeger
Quoted 11 lines · Christian Borntraeger

Hello Avi,

here are two small fixes against kvm.git

[PATCH 1/2] kvm-s390: Rework facility bits [PATCH 2/2] kvm-s390: change help text of guest Kconfig

Patch 1 fixes potential problems with newer machines and Patch 2 is a trivial help text change. I think both patches should be ok for 2.6.27.

Applied both, and will queue for 2.6.27.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.