summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorEddie Dong <eddie.dong@intel.com>2007-07-18 10:34:57 +0200
committerAvi Kivity <avi@qumranet.com>2007-10-13 10:18:25 +0200
commit7017fc3d1a12e30ea7df4992152978a188433457 (patch)
treeebbe0e5852ddd58bddfed389412c86c7692d2724 /drivers/kvm/svm.c
parentKVM: Add support for in-kernel PIC emulation (diff)
downloadlinux-7017fc3d1a12e30ea7df4992152978a188433457.tar.xz
linux-7017fc3d1a12e30ea7df4992152978a188433457.zip
KVM: Define and use cr8 access functions
This patch is to wrap APIC base register and CR8 operation which can provide a unique API for user level irqchip and kernel irqchip. This is a preparation of merging lapic/ioapic patch. Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 2237a594a8ef..57525e7ed28f 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1339,10 +1339,10 @@ static void svm_intr_assist(struct vcpu_svm *svm)
static void kvm_reput_irq(struct vcpu_svm *svm)
{
- struct kvm_vcpu *vcpu = &svm->vcpu;
struct vmcb_control_area *control = &svm->vmcb->control;
- if ((control->int_ctl & V_IRQ_MASK) && !irqchip_in_kernel(vcpu->kvm)) {
+ if ((control->int_ctl & V_IRQ_MASK)
+ && !irqchip_in_kernel(svm->vcpu.kvm)) {
control->int_ctl &= ~V_IRQ_MASK;
push_irq(&svm->vcpu, control->int_vector);
}
@@ -1396,8 +1396,8 @@ static void post_kvm_run_save(struct vcpu_svm *svm,
= (svm->vcpu.interrupt_window_open &&
svm->vcpu.irq_summary == 0);
kvm_run->if_flag = (svm->vmcb->save.rflags & X86_EFLAGS_IF) != 0;
- kvm_run->cr8 = svm->vcpu.cr8;
- kvm_run->apic_base = svm->vcpu.apic_base;
+ kvm_run->cr8 = get_cr8(&svm->vcpu);
+ kvm_run->apic_base = kvm_get_apic_base(&svm->vcpu);
}
/*