From: Alexander Graf Date: Thu, 24 Apr 2014 13:12:33 +0000 Subject: [PATCH 06/13] KVM: PPC: Book3S PR: Give guest control over MSR_LE Message-Id: <1398345160-4830-7-git-send-email-agraf@suse.de> List-Id: References: <1398345160-4830-1-git-send-email-agraf@suse.de> In-Reply-To: <1398345160-4830-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Cc: kvm@vger.kernel.org, anton@samba.org When we calculate the actual MSR that the guest is running with when in guest context, we take a few MSR bits from the MSR the guest thinks it's using. Add MSR_LE to these bits, so the guest gets full control over its own endianness setting. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/book3s_pr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 9189ac5..8076543 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -249,7 +249,7 @@ static void kvmppc_recalc_shadow_msr(struct kvm_vcpu *vcpu) ulong smsr = vcpu->arch.shared->msr; /* Guest MSR values */ - smsr &= MSR_FE0 | MSR_FE1 | MSR_SF | MSR_SE | MSR_BE; + smsr &= MSR_FE0 | MSR_FE1 | MSR_SF | MSR_SE | MSR_BE | MSR_LE; /* Process MSR values */ smsr |= MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_PR | MSR_EE; /* External providers the guest reserved */ -- 1.8.1.4