diff options
author | Avi Kivity <avi@qumranet.com> | 2007-07-17 07:20:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-20 13:16:29 -0400 |
commit | 35f3f28613bc7263949db23a4c7078e425810c8c (patch) | |
tree | 134729d56cf503029e1e667df9bfe30b7410ad3b /drivers/kvm/kvm_main.c | |
parent | 90cb0529dd230548a7f0d6b315997be854caea1b (diff) |
KVM: x86 emulator: implement rdmsr and wrmsr
Allow real-mode emulation of rdmsr and wrmsr. This allows smp Windows to
boot, presumably for its sipi trampoline.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 05f0418f2195..bcbe6835beb4 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -1517,7 +1517,7 @@ EXPORT_SYMBOL_GPL(kvm_get_msr_common); | |||
1517 | * Returns 0 on success, non-0 otherwise. | 1517 | * Returns 0 on success, non-0 otherwise. |
1518 | * Assumes vcpu_load() was already called. | 1518 | * Assumes vcpu_load() was already called. |
1519 | */ | 1519 | */ |
1520 | static int get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata) | 1520 | int kvm_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata) |
1521 | { | 1521 | { |
1522 | return kvm_arch_ops->get_msr(vcpu, msr_index, pdata); | 1522 | return kvm_arch_ops->get_msr(vcpu, msr_index, pdata); |
1523 | } | 1523 | } |
@@ -1595,7 +1595,7 @@ EXPORT_SYMBOL_GPL(kvm_set_msr_common); | |||
1595 | * Returns 0 on success, non-0 otherwise. | 1595 | * Returns 0 on success, non-0 otherwise. |
1596 | * Assumes vcpu_load() was already called. | 1596 | * Assumes vcpu_load() was already called. |
1597 | */ | 1597 | */ |
1598 | static int set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) | 1598 | int kvm_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) |
1599 | { | 1599 | { |
1600 | return kvm_arch_ops->set_msr(vcpu, msr_index, data); | 1600 | return kvm_arch_ops->set_msr(vcpu, msr_index, data); |
1601 | } | 1601 | } |
@@ -2133,7 +2133,7 @@ static __init void kvm_init_msr_list(void) | |||
2133 | */ | 2133 | */ |
2134 | static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data) | 2134 | static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data) |
2135 | { | 2135 | { |
2136 | return set_msr(vcpu, index, *data); | 2136 | return kvm_set_msr(vcpu, index, *data); |
2137 | } | 2137 | } |
2138 | 2138 | ||
2139 | /* | 2139 | /* |
@@ -2617,7 +2617,7 @@ static long kvm_vcpu_ioctl(struct file *filp, | |||
2617 | break; | 2617 | break; |
2618 | } | 2618 | } |
2619 | case KVM_GET_MSRS: | 2619 | case KVM_GET_MSRS: |
2620 | r = msr_io(vcpu, argp, get_msr, 1); | 2620 | r = msr_io(vcpu, argp, kvm_get_msr, 1); |
2621 | break; | 2621 | break; |
2622 | case KVM_SET_MSRS: | 2622 | case KVM_SET_MSRS: |
2623 | r = msr_io(vcpu, argp, do_set_msr, 0); | 2623 | r = msr_io(vcpu, argp, do_set_msr, 0); |