Re: [PATCH 12/21] KVM: x86: MOV to CR3 can set bit 63

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-11-02 10:54, Nadav Amit wrote:
> Although Intel SDM mentions bit 63 is reserved, MOV to CR3 can have bit 63 set.
> As Intel SDM states in section 4.10.4 "Invalidation of TLBs and
> Paging-Structure Caches": " MOV to CR3. ... If CR4.PCIDE = 1 and bit 63 of the
> instruction’s source operand is 0 ..."
> 
> In other words, bit 63 is not reserved. KVM emulator currently consider bit 63
> as reserved. Fix it.
> 
> Signed-off-by: Nadav Amit <namit@xxxxxxxxxxxxxxxxx>
> ---
>  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(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_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))
>  
>  #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

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux