diff options
-rw-r--r-- | drivers/kvm/kvm_main.c | 19 | ||||
-rw-r--r-- | drivers/kvm/x86.c | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index cf163bddfbd3..e8972a82544b 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -556,25 +556,6 @@ unsigned long get_cr8(struct kvm_vcpu *vcpu) | |||
556 | } | 556 | } |
557 | EXPORT_SYMBOL_GPL(get_cr8); | 557 | EXPORT_SYMBOL_GPL(get_cr8); |
558 | 558 | ||
559 | u64 kvm_get_apic_base(struct kvm_vcpu *vcpu) | ||
560 | { | ||
561 | if (irqchip_in_kernel(vcpu->kvm)) | ||
562 | return vcpu->apic_base; | ||
563 | else | ||
564 | return vcpu->apic_base; | ||
565 | } | ||
566 | EXPORT_SYMBOL_GPL(kvm_get_apic_base); | ||
567 | |||
568 | void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data) | ||
569 | { | ||
570 | /* TODO: reserve bits check */ | ||
571 | if (irqchip_in_kernel(vcpu->kvm)) | ||
572 | kvm_lapic_set_base(vcpu, data); | ||
573 | else | ||
574 | vcpu->apic_base = data; | ||
575 | } | ||
576 | EXPORT_SYMBOL_GPL(kvm_set_apic_base); | ||
577 | |||
578 | void fx_init(struct kvm_vcpu *vcpu) | 559 | void fx_init(struct kvm_vcpu *vcpu) |
579 | { | 560 | { |
580 | unsigned after_mxcsr_mask; | 561 | unsigned after_mxcsr_mask; |
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 5a959220410a..c26e3715bee8 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c | |||
@@ -59,6 +59,25 @@ unsigned long segment_base(u16 selector) | |||
59 | } | 59 | } |
60 | EXPORT_SYMBOL_GPL(segment_base); | 60 | EXPORT_SYMBOL_GPL(segment_base); |
61 | 61 | ||
62 | u64 kvm_get_apic_base(struct kvm_vcpu *vcpu) | ||
63 | { | ||
64 | if (irqchip_in_kernel(vcpu->kvm)) | ||
65 | return vcpu->apic_base; | ||
66 | else | ||
67 | return vcpu->apic_base; | ||
68 | } | ||
69 | EXPORT_SYMBOL_GPL(kvm_get_apic_base); | ||
70 | |||
71 | void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data) | ||
72 | { | ||
73 | /* TODO: reserve bits check */ | ||
74 | if (irqchip_in_kernel(vcpu->kvm)) | ||
75 | kvm_lapic_set_base(vcpu, data); | ||
76 | else | ||
77 | vcpu->apic_base = data; | ||
78 | } | ||
79 | EXPORT_SYMBOL_GPL(kvm_set_apic_base); | ||
80 | |||
62 | /* | 81 | /* |
63 | * List of msr numbers which we expose to userspace through KVM_GET_MSRS | 82 | * List of msr numbers which we expose to userspace through KVM_GET_MSRS |
64 | * and KVM_SET_MSRS, and KVM_GET_MSR_INDEX_LIST. | 83 | * and KVM_SET_MSRS, and KVM_GET_MSR_INDEX_LIST. |