KVM: Fix PDPTR reloading on CR4 writes
commit67e34f302bc4584204f1bcd00caca5be46834546
authorAvi Kivity <avi@redhat.com>
Thu, 6 Aug 2009 17:40:03 +0000 (6 14:40 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:17:24 +0000 (8 20:17 -0700)
treec6a0496ece6a28b23750eb8e9f99ed343d74aa61
parent174289f2746a4f7d74e37f7ce2db640abe7db952
KVM: Fix PDPTR reloading on CR4 writes

(cherry picked from commit a2edf57f510cce6a389cc14e58c6ad0a4296d6f9)

The processor is documented to reload the PDPTRs while in PAE mode if any
of the CR4 bits PSE, PGE, or PAE change.  Linux relies on this
behaviour when zapping the low mappings of PAE kernels during boot.

The code already handled changes to CR4.PAE; augment it to also notice changes
to PSE and PGE.

This triggered while booting an F11 PAE kernel; the futex initialization code
runs before any CR3 reloads and writes to a NULL pointer; the futex subsystem
ended up uninitialized, killing PI futexes and pulseaudio which uses them.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/x86.c