aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/arch/x86/hvm/vioapic.c6
-rw-r--r--xen/include/asm-x86/hvm/vioapic.h4
-rw-r--r--xen/include/public/arch-x86/hvm/save.h10
3 files changed, 1 insertions, 19 deletions
diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c
index 403224f828..d3de695c36 100644
--- a/xen/arch/x86/hvm/vioapic.c
+++ b/xen/arch/x86/hvm/vioapic.c
@@ -59,12 +59,10 @@ static unsigned long vioapic_read_indirect(struct hvm_hw_vioapic *vioapic,
| (VIOAPIC_VERSION_ID & 0xff));
break;
-#if !VIOAPIC_IS_IOSAPIC
case VIOAPIC_REG_APIC_ID:
case VIOAPIC_REG_ARB_ID:
result = ((vioapic->id & 0xf) << 24);
break;
-#endif
default:
{
@@ -179,14 +177,12 @@ static void vioapic_write_indirect(
/* Writes are ignored. */
break;
-#if !VIOAPIC_IS_IOSAPIC
case VIOAPIC_REG_APIC_ID:
vioapic->id = (val >> 24) & 0xf;
break;
case VIOAPIC_REG_ARB_ID:
break;
-#endif
default:
{
@@ -227,7 +223,7 @@ static int vioapic_write(
vioapic_write_indirect(vioapic, length, val);
break;
-#if VIOAPIC_IS_IOSAPIC
+#if VIOAPIC_VERSION_ID >= 0x20
case VIOAPIC_REG_EOI:
vioapic_update_EOI(v->domain, val);
break;
diff --git a/xen/include/asm-x86/hvm/vioapic.h b/xen/include/asm-x86/hvm/vioapic.h
index 7721ece46c..f2c17535bf 100644
--- a/xen/include/asm-x86/hvm/vioapic.h
+++ b/xen/include/asm-x86/hvm/vioapic.h
@@ -30,11 +30,7 @@
#include <xen/smp.h>
#include <public/hvm/save.h>
-#if !VIOAPIC_IS_IOSAPIC
#define VIOAPIC_VERSION_ID 0x11 /* IOAPIC version */
-#else
-#define VIOAPIC_VERSION_ID 0x21 /* IOSAPIC version */
-#endif
#define VIOAPIC_EDGE_TRIG 0
#define VIOAPIC_LEVEL_TRIG 1
diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h
index 7a6fbc9821..ac7122e605 100644
--- a/xen/include/public/arch-x86/hvm/save.h
+++ b/xen/include/public/arch-x86/hvm/save.h
@@ -344,12 +344,7 @@ DECLARE_HVM_SAVE_TYPE(PIC, 3, struct hvm_hw_vpic);
* IO-APIC
*/
-#ifdef __ia64__
-#define VIOAPIC_IS_IOSAPIC 1
-#define VIOAPIC_NUM_PINS 24
-#else
#define VIOAPIC_NUM_PINS 48 /* 16 ISA IRQs, 32 non-legacy PCI IRQS. */
-#endif
struct hvm_hw_vioapic {
uint64_t base_address;
@@ -368,13 +363,8 @@ struct hvm_hw_vioapic {
uint8_t trig_mode:1;
uint8_t mask:1;
uint8_t reserve:7;
-#if !VIOAPIC_IS_IOSAPIC
uint8_t reserved[4];
uint8_t dest_id;
-#else
- uint8_t reserved[3];
- uint16_t dest_id;
-#endif
} fields;
} redirtbl[VIOAPIC_NUM_PINS];
};