See Intels VT-d Architectures Specification, chapter 5.1.3:
"Maximum number of IRTEs in an Interrupt Remapping Table is 64K."

Hence the max numbers of IRTEs is 65535 so we can limit the index to 16
bits.

Signed-off-by: Mario Mintel <[email protected]>
---
 hypervisor/arch/x86/vtd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/arch/x86/vtd.c b/hypervisor/arch/x86/vtd.c
index 8e076b4b..d0dd4fd8 100644
--- a/hypervisor/arch/x86/vtd.c
+++ b/hypervisor/arch/x86/vtd.c
@@ -556,7 +556,7 @@ static void vtd_init_unit(void *reg_base, void *inv_queue)
        vtd_update_gcmd_reg(reg_base, VTD_GCMD_IRE, 1);
 }
 
-static void vtd_update_irte(unsigned int index, union vtd_irte content)
+static void vtd_update_irte(u16 index, union vtd_irte content)
 {
        const struct vtd_entry inv_int = {
                .lo_word = VTD_REQ_INV_INT | VTD_INV_INT_INDEX |
-- 
2.22.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20190617131321.8585-2-mario.mintel%40st.oth-regensburg.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to