Skip to contentSkip to conversation

PPC BookE patches

GIT PULL New Alexander Graf 3 participants 5 messages Oct 10, 2010 – Oct 14, 2010 1 message not in the archive

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

Hi Marcelo / Avi,

Scott has found some bugs in the BookE implementation of KVM, so please pull the fixes for them to the kvm tree.

The following changes since commit 3c4504636ab1ff41ec162980bf85121aee14e58f:
Huang Ying (1):
KVM: MCE: Send SRAR SIGBUS directly

are available in the git repository at:

git://github.com/agraf/linux-2.6.git kvm-ppc-next

Scott Wood (3):
KVM: PPC: BookE: Load the lower half of MSR
KVM: PPC: BookE: fix sleep with interrupts disabled
KVM: PPC: e500: Call kvm_vcpu_uninit() before kvmppc_e500_tlb_uninit().

 arch/powerpc/kvm/booke_interrupts.S |    2 +-
 arch/powerpc/kvm/e500.c             |    2 +-
 arch/powerpc/kvm/timing.c           |    2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
#1 lore raw

PATCH 1/3 KVM: PPC: BookE: Load the lower half of MSR

From: Scott Wood <[email protected]>

This was preventing the guest from setting any bits in the hardware MSR which aren't forced on, such as MSR[SPE].

---
 arch/powerpc/kvm/booke_interrupts.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kvm/booke_interrupts.S +1 -1
index 0498469..1cc471f 100644
@@ -416,7 +416,7 @@ lightweight_exit:
 	lwz	r3, VCPU_PC(r4)
 	mtsrr0	r3
 	lwz	r3, VCPU_SHARED(r4)
-	lwz	r3, VCPU_SHARED_MSR(r3)
+	lwz	r3, (VCPU_SHARED_MSR + 4)(r3)
 	oris	r3, r3, KVMPPC_MSR_MASK@h
 	ori	r3, r3, KVMPPC_MSR_MASK@l
 	mtsrr1	r3
Signature · 1 line
1.6.0.2
#2 lore raw

PATCH 2/3 KVM: PPC: BookE: fix sleep with interrupts disabled

In reply to Alexander Graf

From: Scott Wood <[email protected]>

It is not legal to call mutex_lock() with interrupts disabled. This will assert with debug checks enabled.

If there's a real need to disable interrupts here, it could be done after the mutex is acquired -- but I don't see why it's needed at all.

---
 arch/powerpc/kvm/timing.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/powerpc/kvm/timing.c +0 -2
index 46fa04f..a021f58 100644
@@ -35,7 +35,6 @@ void kvmppc_init_timing_stats(struct kvm_vcpu *vcpu)
 	int i;
 
 	/* pause guest execution to avoid concurrent updates */
-	local_irq_disable();
 	mutex_lock(&vcpu->mutex);
 
 	vcpu->arch.last_exit_type = 0xDEAD;
@@ -51,7 +50,6 @@ void kvmppc_init_timing_stats(struct kvm_vcpu *vcpu)
 	vcpu->arch.timing_last_enter.tv64 = 0;
 
 	mutex_unlock(&vcpu->mutex);
-	local_irq_enable();
 }
 
 static void add_exit_timing(struct kvm_vcpu *vcpu, u64 duration, int type)
Signature · 1 line
1.6.0.2

A message that is not in the archive (sent off-list or not yet received): 1286707477-24676-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org

#4 lore raw

PATCH 3/3 KVM: PPC: e500: Call kvm_vcpu_uninit() before kvmppc_e500_tlb_uninit().

From: Scott Wood <[email protected]>

The VCPU uninit calls some TLB functions, and the TLB uninit function frees the memory used by them.

---
 arch/powerpc/kvm/e500.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kvm/e500.c +1 -1
index 71750f2..e3768ee 100644
@@ -138,8 +138,8 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
 	struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);
 
 	free_page((unsigned long)vcpu->arch.shared);
-	kvmppc_e500_tlb_uninit(vcpu_e500);
 	kvm_vcpu_uninit(vcpu);
+	kvmppc_e500_tlb_uninit(vcpu_e500);
 	kmem_cache_free(kvm_vcpu_cache, vcpu_e500);
 }
 
Signature · 1 line
1.6.0.2
#5 lore raw
In reply to a message not in the archive
Quoted 9 lines · Alexander Graf

Hi Marcelo / Avi,

Scott has found some bugs in the BookE implementation of KVM, so please pull the fixes for them to the kvm tree.

The following changes since commit 3c4504636ab1ff41ec162980bf85121aee14e58f:
Huang Ying (1):
KVM: MCE: Send SRAR SIGBUS directly

Quoted 9 lines

are available in the git repository at:

   git://github.com/agraf/linux-2.6.git kvm-ppc-next

Scott Wood (3):
KVM: PPC: BookE: Load the lower half of MSR
KVM: PPC: BookE: fix sleep with interrupts disabled
KVM: PPC: e500: Call kvm_vcpu_uninit() before kvmppc_e500_tlb_uninit().

Pulled, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function