mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-25 19:13:26 -06:00
hw/i386/intel_iommu: Fix index calculation in vtd_interrupt_remap_msi()
The values in "addr" are populated locally in this function in host
endian byte order, so we must not swap the index_l field here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230802135723.178083-5-thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
(cherry picked from commit fcd8027423
)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
4f558fd185
commit
e0711f74b2
1 changed files with 1 additions and 1 deletions
|
@ -3458,7 +3458,7 @@ static int vtd_interrupt_remap_msi(IntelIOMMUState *iommu,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
index = addr.addr.index_h << 15 | le16_to_cpu(addr.addr.index_l);
|
index = addr.addr.index_h << 15 | addr.addr.index_l;
|
||||||
|
|
||||||
#define VTD_IR_MSI_DATA_SUBHANDLE (0x0000ffff)
|
#define VTD_IR_MSI_DATA_SUBHANDLE (0x0000ffff)
|
||||||
#define VTD_IR_MSI_DATA_RESERVED (0xffff0000)
|
#define VTD_IR_MSI_DATA_RESERVED (0xffff0000)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue