Skip to content

Commit e1bb372

Browse files
gzhai7lijinxia
authored andcommitted
HV: increase UOS VIOAPIC pin count
To avoid UOS virtual GSI sharing Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
1 parent 3efef57 commit e1bb372

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

hypervisor/arch/x86/guest/vioapic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#define IOEOI 0x40
4242

4343
#define REDIR_ENTRIES_HW 120 /* SOS align with native ioapic */
44-
#define REDIR_ENTRIES_UOS 24 /* UOS pins*/
4544
#define RTBL_RO_BITS ((uint64_t)(IOAPIC_RTE_REM_IRR | IOAPIC_RTE_DELIVS))
4645

4746
#define ACRN_DBG_IOAPIC 6
@@ -568,7 +567,7 @@ vioapic_pincount(struct vm *vm)
568567
if (is_vm0(vm))
569568
return REDIR_ENTRIES_HW;
570569
else
571-
return REDIR_ENTRIES_UOS;
570+
return VIOAPIC_RTE_NUM;
572571
}
573572

574573
int vioapic_mmio_access_handler(struct vcpu *vcpu, struct mem_io *mmio,

hypervisor/include/public/acrn_common.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@
6363
#define REQUEST_READ 0
6464
#define REQUEST_WRITE 1
6565

66+
/* IOAPIC device model info */
67+
#define VIOAPIC_RTE_NUM 48 /* vioapic pins */
68+
69+
#if VIOAPIC_RTE_NUM < 24
70+
#error "VIOAPIC_RTE_NUM must be larger than 23"
71+
#endif
72+
6673
/* Generic VM flags from guest OS */
6774
#define SECURE_WORLD_ENABLED (1UL<<0) /* Whether secure world is enabled */
6875

0 commit comments

Comments
 (0)