From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 12/21] KVM: x86: MOV to CR3 can set bit 63 Date: Tue, 10 Feb 2015 17:15:54 +0100 Message-ID: <54DA2EBA.10803@siemens.com> References: <1414922101-17626-1-git-send-email-namit@cs.technion.ac.il> <1414922101-17626-13-git-send-email-namit@cs.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, nadav.amit@gmail.com To: Nadav Amit , pbonzini@redhat.com Return-path: Received: from goliath.siemens.de ([192.35.17.28]:55379 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbbBJQQM (ORCPT ); Tue, 10 Feb 2015 11:16:12 -0500 In-Reply-To: <1414922101-17626-13-git-send-email-namit@cs.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 2014-11-02 10:54, Nadav Amit wrote: > Although Intel SDM mentions bit 63 is reserved, MOV to CR3 can have b= it 63 set. > As Intel SDM states in section 4.10.4 "Invalidation of TLBs and > Paging-Structure Caches": " MOV to CR3. ... If CR4.PCIDE =3D 1 and bi= t 63 of the > instruction=E2=80=99s source operand is 0 ..." >=20 > In other words, bit 63 is not reserved. KVM emulator currently consid= er bit 63 > as reserved. Fix it. >=20 > Signed-off-by: Nadav Amit > --- > arch/x86/include/asm/kvm_host.h | 1 + > arch/x86/kvm/emulate.c | 2 +- > arch/x86/kvm/x86.c | 2 ++ > 3 files changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/k= vm_host.h > index 904535f..dc932d3 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -51,6 +51,7 @@ > | X86_CR0_NW | X86_CR0_CD | X86_CR0_PG)) > =20 > #define CR3_L_MODE_RESERVED_BITS 0xFFFFFF0000000000ULL > +#define CR3_PCID_INVD (1UL << 63) 1ULL (for i386) Paolo, there is no 32-bit test build anymore on your side, right? I was about to drop them from kvm-kmod as well, but at least 2 remained in place and caught this. Jan --=20 Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux