RE: [PATCH] KVM: PPC: booke: Added DECAR support

2012-05-16 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, May 15, 2012 7:59 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH] KVM: PPC: booke: Added DECAR support On 05/15/2012 09:33 AM, Bharat Bhushan wrote:

Not emulated registers on BOOKE_HV (GS-mode)

2012-05-16 Thread Bhushan Bharat-R65777
Hi Alex, There is below comment in arch/powerpc/kvm/booke_emulate.c /* * NOTE: some of these registers are not emulated on BOOKE_HV (GS-mode). * Their backing store is in real registers, and these functions * will return the wrong result if called for them in another context * (such as

RE: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE with paravirt.

2012-05-16 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Tuesday, May 15, 2012 8:01 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH] KVM: PPC: Not optimizing

RE: Not emulated registers on BOOKE_HV (GS-mode)

2012-05-16 Thread Sethi Varun-B16395
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Bhushan Bharat-R65777 Sent: Wednesday, May 16, 2012 12:58 PM To: Alexander Graf Cc: Wood Scott-B07421; Yoder Stuart-B08248; kvm-ppc@vger.kernel.org Subject: Not emulated

Re: [PATCH] KVM: PPC: booke: Added DECAR support

2012-05-16 Thread Alexander Graf
On 05/16/2012 08:57 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, May 15, 2012 7:59 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH] KVM: PPC: booke: Added DECAR support

Re: Not emulated registers on BOOKE_HV (GS-mode)

2012-05-16 Thread Alexander Graf
On 05/16/2012 11:02 AM, Sethi Varun-B16395 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Bhushan Bharat-R65777 Sent: Wednesday, May 16, 2012 12:58 PM To: Alexander Graf Cc: Wood Scott-B07421; Yoder Stuart-B08248;

[PATCH] KVM: PPC: Book3S HV: Export kvm_hpt_order

2012-05-16 Thread Paul Mackerras
Code in book3s_64_mmu_hv.c, which is in the modular part of HV KVM, needs to access kvm_hpt_order, which is defined in the built-in part. Therefore we need to export it. Signed-off-by: Paul Mackerras pau...@samba.org --- Alex, it's up to you whether you apply this on your kvm-ppc-next branch or

Re: [PATCH] KVM: PPC: Book3S HV: Export kvm_hpt_order

2012-05-16 Thread Alexander Graf
On 05/16/2012 11:17 AM, Paul Mackerras wrote: Code in book3s_64_mmu_hv.c, which is in the modular part of HV KVM, needs to access kvm_hpt_order, which is defined in the built-in part. Therefore we need to export it. Signed-off-by: Paul Mackerraspau...@samba.org --- Alex, it's up to you whether

RE: [PATCH] KVM: PPC: booke: Added DECAR support

2012-05-16 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, May 16, 2012 2:36 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: booke: Added DECAR support On 05/16/2012 08:57 AM, Bhushan Bharat-R65777 wrote:

Re: [PATCH] KVM: PPC: booke: Added DECAR support

2012-05-16 Thread Alexander Graf
On 05/16/2012 11:21 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, May 16, 2012 2:36 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: booke: Added DECAR support On 05/16/2012 08:57

[PATCH] powerpc/kvm: Fix VSID usage in 64-bit PR KVM

2012-05-16 Thread Alexander Graf
From: Benjamin Herrenschmidt b...@kernel.crashing.org The code forgot to scramble the VSIDs the way we normally do and was basically using the proto VSID directly with the MMU. This means that in practice, KVM used random VSIDs that could collide with segments used by other user space programs.

RE: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE with paravirt.

2012-05-16 Thread Sethi Varun-B16395
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, May 16, 2012 2:42 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE

Re: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE with paravirt.

2012-05-16 Thread Alexander Graf
On 05/16/2012 02:27 PM, Sethi Varun-B16395 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, May 16, 2012 2:42 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH]

[PULL 0/5] ppc patch queue 2012-05-16

2012-05-16 Thread Alexander Graf
Hi Avi, There are a few bugs in 3.4 that really should be fixed before people can be all happy and fuzzy about KVM on PowerPC. These fixes are: * fix POWER7 bare metal with PR=y * fix deadlock on HV=y book3s_64 mode in low memory cases * fix invalid MMU scope of PR=y mode on book3s_64,

[PATCH 1/5] KVM: PPC: Book3S: PR: Handle EMUL_ASSIST

2012-05-16 Thread Alexander Graf
In addition to normal priviledged instruction traps, we can also receive emulation assist traps on newer hardware that has the HV bit set. Handle that one the same way as a privileged instruction, including the instruction fetching. That way we don't execute old instructions that we happen to

[PATCH 4/5] powerpc/kvm: Fix VSID usage in 64-bit PR KVM

2012-05-16 Thread Alexander Graf
From: Benjamin Herrenschmidt b...@kernel.crashing.org The code forgot to scramble the VSIDs the way we normally do and was basically using the proto VSID directly with the MMU. This means that in practice, KVM used random VSIDs that could collide with segments used by other user space programs.

[PATCH 3/5] KVM: PPC: Book3S: PR: Fix hsrr code

2012-05-16 Thread Alexander Graf
When jumping back into the kernel to code that knows that it would be using HSRR registers instead of SRR registers, we need to make sure we pass it all information on where to jump to in HSRR registers. Unfortunately, we used r10 to store the information to distinguish between the HSRR and SRR

[PATCH 5/5] KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates

2012-05-16 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org When handling the H_BULK_REMOVE hypercall, we were forgetting to invalidate and unlock the hashed page table entry (HPTE) in the case where the page had been paged out. This fixes it by clearing the first doubleword of the HPTE in that case. This fixes a

[PATCH 2/5] KVM: PPC: Fix PR KVM on POWER7 bare metal

2012-05-16 Thread Alexander Graf
When running on a system that is HV capable, some interrupts use HSRR SPRs instead of the normal SRR SPRs. These are also used in the Linux handlers to jump back to code after an interrupt got processed. Unfortunately, in our jump back to the real host handler after we've done the context switch

Re: [PULL 0/5] ppc patch queue 2012-05-16

2012-05-16 Thread Avi Kivity
On 05/16/2012 04:05 PM, Alexander Graf wrote: Hi Avi, There are a few bugs in 3.4 that really should be fixed before people can be all happy and fuzzy about KVM on PowerPC. These fixes are: * fix POWER7 bare metal with PR=y * fix deadlock on HV=y book3s_64 mode in low memory cases *

[PATCH] KVM: PPC: BookE: Include trap in pt_regs

2012-05-16 Thread Alexander Graf
When reinjecting host interrupt requests in the exit handler code, let's also tell the interrupt handler which interrupt number we're coming from. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff

Re: [PULL 0/5] ppc patch queue 2012-05-16

2012-05-16 Thread Alexander Graf
On 05/16/2012 03:23 PM, Avi Kivity wrote: On 05/16/2012 04:05 PM, Alexander Graf wrote: Hi Avi, There are a few bugs in 3.4 that really should be fixed before people can be all happy and fuzzy about KVM on PowerPC. These fixes are: * fix POWER7 bare metal with PR=y * fix deadlock on

Re: [PULL 0/5] ppc patch queue 2012-05-16

2012-05-16 Thread Avi Kivity
On 05/16/2012 04:28 PM, Alexander Graf wrote: On 05/16/2012 03:23 PM, Avi Kivity wrote: On 05/16/2012 04:05 PM, Alexander Graf wrote: Hi Avi, There are a few bugs in 3.4 that really should be fixed before people can be all happy and fuzzy about KVM on PowerPC. These fixes are: * fix

RE: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE with paravirt.

2012-05-16 Thread Sethi Varun-B16395
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, May 16, 2012 6:18 PM To: Sethi Varun-B16395 Cc: Bhushan Bharat-R65777; kvm-ppc@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: Not optimizing

Re: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE with paravirt.

2012-05-16 Thread Scott Wood
On 05/16/2012 10:13 AM, Sethi Varun-B16395 wrote: Why is MSR[CE] unsafe? MSR=0 * critical interrupt comes in * mtmsr(MSR_CE) -- MSR == MSR_CE * interrupt should be delivered, but host doesn't get notified that MSR_CE is changing * However, we completely ignore critical interrupts in KVM

Re: Not emulated registers on BOOKE_HV (GS-mode)

2012-05-16 Thread Scott Wood
On 05/16/2012 04:13 AM, Alexander Graf wrote: On 05/16/2012 11:02 AM, Sethi Varun-B16395 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Bhushan Bharat-R65777 Sent: Wednesday, May 16, 2012 12:58 PM To: Alexander Graf

Re: Not emulated registers on BOOKE_HV (GS-mode)

2012-05-16 Thread Alexander Graf
On 17.05.2012, at 00:29, Scott Wood scottw...@freescale.com wrote: On 05/16/2012 04:13 AM, Alexander Graf wrote: On 05/16/2012 11:02 AM, Sethi Varun-B16395 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Bhushan

Re: [PATCH v10 3/5] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-05-16 Thread Scott Wood
On 05/08/2012 05:40 AM, Alexander Graf wrote: On 15.03.2012, at 21:52, Stuart Yoder wrote: From: Liu Yu-B13201 yu@freescale.com And add a new flag definition in kvm_ppc_pvinfo to indicate whether the host supports the EV_IDLE hcall. Signed-off-by: Liu Yu yu@freescale.com