diff options
author | Thomas Huth <thuth@redhat.com> | 2023-08-02 15:57:22 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-08-03 16:16:17 -0400 |
commit | 37cf5cecb039a063c0abe3b51ae30f969e73aa84 (patch) | |
tree | 0e74085257751005af18fd084f3776e7aee12515 /hw/i386/x86-iommu.c | |
parent | fcd8027423300b201b37842b88393dc5c6c8ee9e (diff) |
hw/i386/x86-iommu: Fix endianness issue in x86_iommu_irq_to_msi_message()
The values in "msg" are assembled in host endian byte order (the other
field are also not swapped), so we must not swap the __addr_head here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230802135723.178083-6-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>
Diffstat (limited to 'hw/i386/x86-iommu.c')
-rw-r--r-- | hw/i386/x86-iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c index 01d11325a6..726e9e1d16 100644 --- a/hw/i386/x86-iommu.c +++ b/hw/i386/x86-iommu.c @@ -63,7 +63,7 @@ void x86_iommu_irq_to_msi_message(X86IOMMUIrq *irq, MSIMessage *msg_out) msg.redir_hint = irq->redir_hint; msg.dest = irq->dest; msg.__addr_hi = irq->dest & 0xffffff00; - msg.__addr_head = cpu_to_le32(0xfee); + msg.__addr_head = 0xfee; /* Keep this from original MSI address bits */ msg.__not_used = irq->msi_addr_last_bits; |