diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-25 13:29:51 +1000 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 10:18:20 +0200 |
commit | c820c2aa27bb5b6069aa708b0a0b44b59a16bfa7 (patch) | |
tree | 4fbf8adca97cafb1f52968fed36963fb36c4254d /drivers/kvm/kvm_svm.h | |
parent | 3ccb8827fb3bd389ed15320da83543d016a94822 (diff) |
KVM: load_pdptrs() cleanups
load_pdptrs can be handed an invalid cr3, and it should not oops.
This can happen because we injected #gp in set_cr3() after we set
vcpu->cr3 to the invalid value, or from kvm_vcpu_ioctl_set_sregs(), or
memory configuration changes after the guest did set_cr3().
We should also copy the pdpte array once, before checking and
assigning, otherwise an SMP guest can potentially alter the values
between the check and the set.
Finally one nitpick: ret = 1 should be done as late as possible: this
allows GCC to check for unset "ret" should the function change in
future.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_svm.h')
0 files changed, 0 insertions, 0 deletions