diff options
author | Robert Mustacchi <rm@joyent.com> | 2011-06-03 11:37:58 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2011-06-03 11:37:58 -0700 |
commit | 9f278f28f5b52770a3a5b8ecfe727e650e2b6797 (patch) | |
tree | 93a2528cdfc57a01524736697389be6f816d4e54 | |
parent | c2961b13f6ec3e0e0b41ceac918305c08c31784a (diff) | |
download | illumos-kvm-9f278f28f5b52770a3a5b8ecfe727e650e2b6797.tar.gz |
HVM-281 kvm_lapic_t should be defined in kvm_lapic.h
HVM-282 kvm_lapic_set_vapic_addr definition should match Linux
HVM-283 qemu build is broken
-rw-r--r-- | kvm.h | 12 | ||||
-rw-r--r-- | kvm_coalesced_mmio.h | 4 | ||||
-rw-r--r-- | kvm_lapic.c | 5 | ||||
-rw-r--r-- | kvm_lapic.h | 17 | ||||
-rw-r--r-- | kvm_vmx.c | 1 |
5 files changed, 18 insertions, 21 deletions
@@ -247,18 +247,6 @@ typedef struct fxsave { /* XXX This shouldn't be necessary */ #include "kvm_timer.h" -typedef struct kvm_lapic { - unsigned long base_address; - struct kvm_io_device dev; - struct kvm_timer lapic_timer; - uint32_t divide_count; - struct kvm_vcpu *vcpu; - int irr_pending; - void *regs; - gpa_t vapic_addr; - page_t *vapic_page; -} kvm_lapic_t; - struct vcpu_vmx; struct kvm_user_return_notifier; diff --git a/kvm_coalesced_mmio.h b/kvm_coalesced_mmio.h index 58d7a31..f4b971e 100644 --- a/kvm_coalesced_mmio.h +++ b/kvm_coalesced_mmio.h @@ -44,10 +44,6 @@ extern int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *, extern int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *, struct kvm_coalesced_mmio_zone *); -#else - -#error "CONFIG_KVM_MMIO must be suupported" - #endif /* CONFIG_KVM_MMIO */ #endif /* __KVM_COALESCED_MMIO_H__ */ diff --git a/kvm_lapic.c b/kvm_lapic.c index 54c46ae..a2db3b3 100644 --- a/kvm_lapic.c +++ b/kvm_lapic.c @@ -32,6 +32,7 @@ #include "kvm.h" #include "apicdef.h" #include "kvm_ioapic.h" +#include "kvm_lapic.h" #include "irq.h" int __apic_accept_irq(struct kvm_lapic *, int, int, int, int); @@ -1300,12 +1301,12 @@ kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) } int -kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, struct kvm_vapic_addr *addr) +kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) { if (!irqchip_in_kernel(vcpu->kvm)) return (EINVAL); - vcpu->arch.apic->vapic_addr = addr->vapic_addr; + vcpu->arch.apic->vapic_addr = vapic_addr; return (0); } diff --git a/kvm_lapic.h b/kvm_lapic.h index 1e2ffec..ae54f51 100644 --- a/kvm_lapic.h +++ b/kvm_lapic.h @@ -1,9 +1,20 @@ #ifndef __KVM_X86_LAPIC_H #define __KVM_X86_LAPIC_H +#include "kvm_iodev.h" #include "kvm_timer.h" -struct kvm_vapic_addr; +typedef struct kvm_lapic { + unsigned long base_address; + struct kvm_io_device dev; + struct kvm_timer lapic_timer; + uint32_t divide_count; + struct kvm_vcpu *vcpu; + int irr_pending; + void *regs; + gpa_t vapic_addr; + page_t *vapic_page; +} kvm_lapic_t; extern int kvm_create_lapic(struct kvm_vcpu *); extern void kvm_lapic_reset(struct kvm_vcpu *); @@ -29,7 +40,7 @@ extern int kvm_apic_compare_prio(struct kvm_vcpu *, struct kvm_vcpu *); extern void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8); extern void kvm_lapic_set_base(struct kvm_vcpu *vcpu, uint64_t value); -extern int kvm_lapic_set_vapic_addr(struct kvm_vcpu *, struct kvm_vapic_addr *); +extern int kvm_lapic_set_vapic_addr(struct kvm_vcpu *, gpa_t); extern int kvm_x2apic_msr_write(struct kvm_vcpu *, uint32_t, uint64_t); extern int kvm_x2apic_msr_read(struct kvm_vcpu *, uint32_t, uint64_t *); @@ -48,8 +59,8 @@ extern void kvm_apic_post_state_restore(struct kvm_vcpu *); /* * XXX: needs to be in vmx - */ extern int vm_need_virtualize_apic_accesses(struct kvm *kvm); + */ #endif @@ -32,6 +32,7 @@ #include "kvm.h" #include "apicdef.h" #include "kvm_ioapic.h" +#include "kvm_lapic.h" #include "irq.h" #include "kvm_mmu.h" #include "vmx.h" |