diff options
author | Avi Kivity <avi@redhat.com> | 2010-12-05 17:30:00 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 11:31:15 +0200 |
commit | 9f8fe5043fd26627c2fa2e9a41896885e675000b (patch) | |
tree | e81d03d82d78903bde7c390461d46c8f937cb931 /arch/x86/kvm/kvm_cache_regs.h | |
parent | e49146dce8c3dc6f4485c1904b6587855f393e71 (diff) | |
download | blackbird-op-linux-9f8fe5043fd26627c2fa2e9a41896885e675000b.tar.gz blackbird-op-linux-9f8fe5043fd26627c2fa2e9a41896885e675000b.zip |
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/kvm_cache_regs.h')
-rw-r--r-- | arch/x86/kvm/kvm_cache_regs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/kvm_cache_regs.h b/arch/x86/kvm/kvm_cache_regs.h index 95ac3afa6e6f..a6bf8db326f5 100644 --- a/arch/x86/kvm/kvm_cache_regs.h +++ b/arch/x86/kvm/kvm_cache_regs.h @@ -73,6 +73,11 @@ static inline ulong kvm_read_cr4_bits(struct kvm_vcpu *vcpu, ulong mask) return vcpu->arch.cr4 & mask; } +static inline ulong kvm_read_cr3(struct kvm_vcpu *vcpu) +{ + return vcpu->arch.cr3; +} + static inline ulong kvm_read_cr4(struct kvm_vcpu *vcpu) { return kvm_read_cr4_bits(vcpu, ~0UL); |