aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c44
1 files changed, 40 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 7f26c3718777..008b7b69581e 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -548,16 +548,47 @@ static void xen_io_delay(void)
548} 548}
549 549
550#ifdef CONFIG_X86_LOCAL_APIC 550#ifdef CONFIG_X86_LOCAL_APIC
551static u32 xen_apic_read(unsigned long reg) 551static u32 xen_apic_read(u32 reg)
552{ 552{
553 return 0; 553 return 0;
554} 554}
555 555
556static void xen_apic_write(unsigned long reg, u32 val) 556static void xen_apic_write(u32 reg, u32 val)
557{ 557{
558 /* Warn to see if there's any stray references */ 558 /* Warn to see if there's any stray references */
559 WARN_ON(1); 559 WARN_ON(1);
560} 560}
561
562static u64 xen_apic_icr_read(void)
563{
564 return 0;
565}
566
567static void xen_apic_icr_write(u32 low, u32 id)
568{
569 /* Warn to see if there's any stray references */
570 WARN_ON(1);
571}
572
573static void xen_apic_wait_icr_idle(void)
574{
575 return;
576}
577
578static u32 xen_safe_apic_wait_icr_idle(void)
579{
580 return 0;
581}
582
583static struct apic_ops xen_basic_apic_ops = {
584 .read = xen_apic_read,
585 .write = xen_apic_write,
586 .icr_read = xen_apic_icr_read,
587 .icr_write = xen_apic_icr_write,
588 .wait_icr_idle = xen_apic_wait_icr_idle,
589 .safe_wait_icr_idle = xen_safe_apic_wait_icr_idle,
590};
591
561#endif 592#endif
562 593
563static void xen_flush_tlb(void) 594static void xen_flush_tlb(void)
@@ -1130,8 +1161,6 @@ static const struct pv_irq_ops xen_irq_ops __initdata = {
1130 1161
1131static const struct pv_apic_ops xen_apic_ops __initdata = { 1162static const struct pv_apic_ops xen_apic_ops __initdata = {
1132#ifdef CONFIG_X86_LOCAL_APIC 1163#ifdef CONFIG_X86_LOCAL_APIC
1133 .apic_write = xen_apic_write,
1134 .apic_read = xen_apic_read,
1135 .setup_boot_clock = paravirt_nop, 1164 .setup_boot_clock = paravirt_nop,
1136 .setup_secondary_clock = paravirt_nop, 1165 .setup_secondary_clock = paravirt_nop,
1137 .startup_ipi_hook = paravirt_nop, 1166 .startup_ipi_hook = paravirt_nop,
@@ -1293,6 +1322,13 @@ asmlinkage void __init xen_start_kernel(void)
1293 pv_apic_ops = xen_apic_ops; 1322 pv_apic_ops = xen_apic_ops;
1294 pv_mmu_ops = xen_mmu_ops; 1323 pv_mmu_ops = xen_mmu_ops;
1295 1324
1325#ifdef CONFIG_X86_LOCAL_APIC
1326 /*
1327 * set up the basic apic ops.
1328 */
1329 apic_ops = &xen_basic_apic_ops;
1330#endif
1331
1296 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { 1332 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
1297 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; 1333 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
1298 pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit; 1334 pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;