diff options
author | Avi Kivity <avi@redhat.com> | 2010-12-05 10:30:00 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:31:15 -0500 |
commit | 9f8fe5043fd26627c2fa2e9a41896885e675000b (patch) | |
tree | e81d03d82d78903bde7c390461d46c8f937cb931 /arch/x86/kvm/mmu.c | |
parent | e49146dce8c3dc6f4485c1904b6587855f393e71 (diff) |
KVM: Replace reads of vcpu->arch.cr3 by an accessor
This allows us to keep cr3 in the VMCS, later on.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a2127f82e786..e558795fccd5 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -2727,13 +2727,13 @@ void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu) | |||
2727 | 2727 | ||
2728 | static void paging_new_cr3(struct kvm_vcpu *vcpu) | 2728 | static void paging_new_cr3(struct kvm_vcpu *vcpu) |
2729 | { | 2729 | { |
2730 | pgprintk("%s: cr3 %lx\n", __func__, vcpu->arch.cr3); | 2730 | pgprintk("%s: cr3 %lx\n", __func__, kvm_read_cr3(vcpu)); |
2731 | mmu_free_roots(vcpu); | 2731 | mmu_free_roots(vcpu); |
2732 | } | 2732 | } |
2733 | 2733 | ||
2734 | static unsigned long get_cr3(struct kvm_vcpu *vcpu) | 2734 | static unsigned long get_cr3(struct kvm_vcpu *vcpu) |
2735 | { | 2735 | { |
2736 | return vcpu->arch.cr3; | 2736 | return kvm_read_cr3(vcpu); |
2737 | } | 2737 | } |
2738 | 2738 | ||
2739 | static void inject_page_fault(struct kvm_vcpu *vcpu, | 2739 | static void inject_page_fault(struct kvm_vcpu *vcpu, |
@@ -3637,7 +3637,7 @@ static int kvm_pv_mmu_write(struct kvm_vcpu *vcpu, | |||
3637 | 3637 | ||
3638 | static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu) | 3638 | static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu) |
3639 | { | 3639 | { |
3640 | (void)kvm_set_cr3(vcpu, vcpu->arch.cr3); | 3640 | (void)kvm_set_cr3(vcpu, kvm_read_cr3(vcpu)); |
3641 | return 1; | 3641 | return 1; |
3642 | } | 3642 | } |
3643 | 3643 | ||