From patchwork Tue May 15 07:37:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 159244 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 35D32B6FBB for ; Tue, 15 May 2012 17:27:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757197Ab2EOH1s (ORCPT ); Tue, 15 May 2012 03:27:48 -0400 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13]:28596 "EHLO tx2outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757113Ab2EOH1s (ORCPT ); Tue, 15 May 2012 03:27:48 -0400 Received: from mail76-tx2-R.bigfish.com (10.9.14.245) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 14.1.225.23; Tue, 15 May 2012 07:27:43 +0000 Received: from mail76-tx2 (localhost [127.0.0.1]) by mail76-tx2-R.bigfish.com (Postfix) with ESMTP id F0A544A0393; Tue, 15 May 2012 07:27:42 +0000 (UTC) X-SpamScore: 3 X-BigFish: VS3(zzzz1202h1082kzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail76-tx2 (localhost.localdomain [127.0.0.1]) by mail76-tx2 (MessageSwitch) id 1337066861481129_15328; Tue, 15 May 2012 07:27:41 +0000 (UTC) Received: from TX2EHSMHS038.bigfish.com (unknown [10.9.14.253]) by mail76-tx2.bigfish.com (Postfix) with ESMTP id 723642000F1; Tue, 15 May 2012 07:27:41 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS038.bigfish.com (10.9.99.138) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 15 May 2012 07:27:47 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.298.5; Tue, 15 May 2012 02:27:45 -0500 Received: from freescale.com ([10.232.15.72]) by az84smr01.freescale.net (8.14.3/8.14.0) with SMTP id q4F7Rf0a006191; Tue, 15 May 2012 00:27:42 -0700 Received: by freescale.com (sSMTP sendmail emulation); Tue, 15 May 2012 13:07:23 +0530 From: Bharat Bhushan To: , CC: Bhushan Bharat-R65777 , Bharat Bhushan Subject: [PATCH] KVM: PPC: Not optimizing MSR_CE and MSR_DE with paravirt. Date: Tue, 15 May 2012 13:07:22 +0530 Message-ID: <1337067442-26625-1-git-send-email-bharat.bhushan@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org From: Bhushan Bharat-R65777 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 --- Documentation/virtual/kvm/ppc-pv.txt | 2 -- arch/powerpc/kernel/kvm_emul.S | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-) 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 e291cf3..3dfa890 100644 --- a/arch/powerpc/kernel/kvm_emul.S +++ b/arch/powerpc/kernel/kvm_emul.S @@ -132,7 +132,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