Patchwork [v2] KVM: PPC: Not optimizing MSR_CE and MSR_ME with paravirt.

login
register
mail settings
Submitter Bharat Bhushan
Date May 21, 2012, 9:21 a.m.
Message ID <1337592113-6650-1-git-send-email-bharat.bhushan@freescale.com>
Download mbox | patch
Permalink /patch/160339/
State New
Headers show

Comments

Bharat Bhushan - May 21, 2012, 9:21 a.m.
If there is pending critical or machine check interrupt then guest
would like to capture it when guest enable MSR.CE and MSR_ME respectively.
Also as mostly MSR_CE and MSR_ME are updated with rfi/rfci/rfmii
which anyway traps so removing the the paravirt optimization for MSR.CE
and MSR.ME.

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
---
 v2:
 - Subject description corrected.

 Documentation/virtual/kvm/ppc-pv.txt |    2 --
 arch/powerpc/kernel/kvm_emul.S       |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)
Alexander Graf - May 22, 2012, 10:09 a.m.
On 21.05.2012, at 11:21, Bharat Bhushan wrote:

> If there is pending critical or machine check interrupt then guest
> would like to capture it when guest enable MSR.CE and MSR_ME respectively.
> Also as mostly MSR_CE and MSR_ME are updated with rfi/rfci/rfmii
> which anyway traps so removing the the paravirt optimization for MSR.CE
> and MSR.ME.
> 
> Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>

Thanks, applied to kvm-ppc-next.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt
index 6e7c370..4911cf9 100644
--- a/Documentation/virtual/kvm/ppc-pv.txt
+++ b/Documentation/virtual/kvm/ppc-pv.txt
@@ -109,8 +109,6 @@  The following bits are safe to be set inside the guest:
 
   MSR_EE
   MSR_RI
-  MSR_CR
-  MSR_ME
 
 If any other bit changes in the MSR, please still use mtmsr(d).
 
diff --git a/arch/powerpc/kernel/kvm_emul.S b/arch/powerpc/kernel/kvm_emul.S
index 62ceb2a..e100ff3 100644
--- a/arch/powerpc/kernel/kvm_emul.S
+++ b/arch/powerpc/kernel/kvm_emul.S
@@ -122,7 +122,7 @@  kvm_emulate_mtmsrd_len:
 	.long (kvm_emulate_mtmsrd_end - kvm_emulate_mtmsrd) / 4
 
 
-#define MSR_SAFE_BITS (MSR_EE | MSR_CE | MSR_ME | MSR_RI)
+#define MSR_SAFE_BITS (MSR_EE | MSR_RI)
 #define MSR_CRITICAL_BITS ~MSR_SAFE_BITS
 
 .global kvm_emulate_mtmsr