diff options
Diffstat (limited to 'arch/x86/lguest/boot.c')
-rw-r--r-- | arch/x86/lguest/boot.c | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 50dad44fb542..675ee7a6475e 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -783,14 +783,45 @@ static void lguest_wbinvd(void) | |||
783 | * code qualifies for Advanced. It will also never interrupt anything. It | 783 | * code qualifies for Advanced. It will also never interrupt anything. It |
784 | * does, however, allow us to get through the Linux boot code. */ | 784 | * does, however, allow us to get through the Linux boot code. */ |
785 | #ifdef CONFIG_X86_LOCAL_APIC | 785 | #ifdef CONFIG_X86_LOCAL_APIC |
786 | static void lguest_apic_write(unsigned long reg, u32 v) | 786 | static void lguest_apic_write(u32 reg, u32 v) |
787 | { | 787 | { |
788 | } | 788 | } |
789 | 789 | ||
790 | static u32 lguest_apic_read(unsigned long reg) | 790 | static u32 lguest_apic_read(u32 reg) |
791 | { | 791 | { |
792 | return 0; | 792 | return 0; |
793 | } | 793 | } |
794 | |||
795 | static u64 lguest_apic_icr_read(void) | ||
796 | { | ||
797 | return 0; | ||
798 | } | ||
799 | |||
800 | static void lguest_apic_icr_write(u32 low, u32 id) | ||
801 | { | ||
802 | /* Warn to see if there's any stray references */ | ||
803 | WARN_ON(1); | ||
804 | } | ||
805 | |||
806 | static void lguest_apic_wait_icr_idle(void) | ||
807 | { | ||
808 | return; | ||
809 | } | ||
810 | |||
811 | static u32 lguest_apic_safe_wait_icr_idle(void) | ||
812 | { | ||
813 | return 0; | ||
814 | } | ||
815 | |||
816 | static struct apic_ops lguest_basic_apic_ops = { | ||
817 | .read = lguest_apic_read, | ||
818 | .write = lguest_apic_write, | ||
819 | .write_atomic = lguest_apic_write, | ||
820 | .icr_read = lguest_apic_icr_read, | ||
821 | .icr_write = lguest_apic_icr_write, | ||
822 | .wait_icr_idle = lguest_apic_wait_icr_idle, | ||
823 | .safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle, | ||
824 | }; | ||
794 | #endif | 825 | #endif |
795 | 826 | ||
796 | /* STOP! Until an interrupt comes in. */ | 827 | /* STOP! Until an interrupt comes in. */ |
@@ -990,9 +1021,7 @@ __init void lguest_init(void) | |||
990 | 1021 | ||
991 | #ifdef CONFIG_X86_LOCAL_APIC | 1022 | #ifdef CONFIG_X86_LOCAL_APIC |
992 | /* apic read/write intercepts */ | 1023 | /* apic read/write intercepts */ |
993 | pv_apic_ops.apic_write = lguest_apic_write; | 1024 | apic_ops = &lguest_basic_apic_ops; |
994 | pv_apic_ops.apic_write_atomic = lguest_apic_write; | ||
995 | pv_apic_ops.apic_read = lguest_apic_read; | ||
996 | #endif | 1025 | #endif |
997 | 1026 | ||
998 | /* time operations */ | 1027 | /* time operations */ |