diff options
author | Avi Kivity <avi@redhat.com> | 2010-10-21 06:20:32 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:23:31 -0500 |
commit | afe9e66f8233e33e16fcc5b855070e45978f919e (patch) | |
tree | 7cbd0aca2d8d8aefee7997e2aaf2358c5462f840 /arch/x86/kvm/svm.c | |
parent | 13c34e073bec75aa4c8d1bb80c10fd7291f3423a (diff) |
KVM: SVM: Move svm->host_gs_base into a separate structure
More members will join it soon.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 80354965f7fd..a217978b370f 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -124,7 +124,9 @@ struct vcpu_svm { | |||
124 | u64 next_rip; | 124 | u64 next_rip; |
125 | 125 | ||
126 | u64 host_user_msrs[NR_HOST_SAVE_USER_MSRS]; | 126 | u64 host_user_msrs[NR_HOST_SAVE_USER_MSRS]; |
127 | u64 host_gs_base; | 127 | struct { |
128 | u64 gs_base; | ||
129 | } host; | ||
128 | 130 | ||
129 | u32 *msrpm; | 131 | u32 *msrpm; |
130 | 132 | ||
@@ -1353,14 +1355,14 @@ static void svm_guest_debug(struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg) | |||
1353 | static void load_host_msrs(struct kvm_vcpu *vcpu) | 1355 | static void load_host_msrs(struct kvm_vcpu *vcpu) |
1354 | { | 1356 | { |
1355 | #ifdef CONFIG_X86_64 | 1357 | #ifdef CONFIG_X86_64 |
1356 | wrmsrl(MSR_GS_BASE, to_svm(vcpu)->host_gs_base); | 1358 | wrmsrl(MSR_GS_BASE, to_svm(vcpu)->host.gs_base); |
1357 | #endif | 1359 | #endif |
1358 | } | 1360 | } |
1359 | 1361 | ||
1360 | static void save_host_msrs(struct kvm_vcpu *vcpu) | 1362 | static void save_host_msrs(struct kvm_vcpu *vcpu) |
1361 | { | 1363 | { |
1362 | #ifdef CONFIG_X86_64 | 1364 | #ifdef CONFIG_X86_64 |
1363 | rdmsrl(MSR_GS_BASE, to_svm(vcpu)->host_gs_base); | 1365 | rdmsrl(MSR_GS_BASE, to_svm(vcpu)->host.gs_base); |
1364 | #endif | 1366 | #endif |
1365 | } | 1367 | } |
1366 | 1368 | ||