]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: do mask out upper bits of PAE CR3
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Jul 2017 16:54:38 +0000 (18:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jul 2017 16:57:45 +0000 (18:57 +0200)
commitd0a557d8ca3e0bf36f1dd0f440cc1f5c3d32914c
tree6e141e2fb56dfd3c6f856d8e3d7e5bdcfae8aff3
parentf3a313f4e40d20c11462b4a5367dfc220b970cb3
KVM: x86: do mask out upper bits of PAE CR3

This reverts the change of commit d84414be5349ec0a07a65c995f76ca1068314766,
as the behavior it modified was intended.

The VM is running in 32-bit PAE mode, and Table 4-7 of the Intel manual
says:

Table 4-7. Use of CR3 with PAE Paging
Bit Position(s) Contents
4:0 Ignored
31:5 Physical address of the 32-Byte aligned
page-directory-pointer table used for linear-address
translation
63:32 Ignored (these bits exist only on processors supporting
the Intel-64 architecture)

To placate the static checker, write the mask explicitly as an
unsigned long constant instead of using a 32-bit unsigned constant.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: d84414be5349ec0a07a65c995f76ca1068314766
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c