qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-8.1 0/6] Fix endianness issues in the intel-iommu device
@ 2023-08-02 13:57 Thomas Huth
  2023-08-02 13:57 ` [PATCH 1/6] hw/i386/intel_iommu: Fix trivial endianness problems Thomas Huth
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Thomas Huth @ 2023-08-02 13:57 UTC (permalink / raw)
  To: Michael S. Tsirkin, Peter Xu
  Cc: Jason Wang, Richard Henderson, qemu-devel,
	Daniel P . Berrangé, qemu-stable, Paolo Bonzini

The intel-iommu device is currently unusable on big endian hosts.
When doing something like this on a s390x host:

 wget https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/x86_64/images/Fedora-Server-KVM-38-1.6.x86_64.qcow2
 ./qemu-system-x86_64 -M q35 -device intel-iommu -m 2G \
        -hda ~/Fedora-Server-KVM-38-1.6.x86_64.qcow2 -trace "vtd_*"

... the guest kernel crashes during boot, complaining about some
problems with the iommu, and you can see clearly in the traces that
some values are wrong when compared to running this on a x86 host.

After spending quite some time hunting down the problems one by one,
I think I now found them all - at least I can successfully boot the
above kernel after I applied these patches.

Thomas Huth (6):
  hw/i386/intel_iommu: Fix trivial endianness problems
  hw/i386/intel_iommu: Fix endianness problems related to
    VTD_IR_TableEntry
  hw/i386/intel_iommu: Fix struct VTDInvDescIEC on big endian hosts
  hw/i386/intel_iommu: Fix index calculation in
    vtd_interrupt_remap_msi()
  hw/i386/x86-iommu: Fix endianness issue in
    x86_iommu_irq_to_msi_message()
  include/hw/i386/x86-iommu: Fix struct X86IOMMU_MSIMessage for big
    endian hosts

 hw/i386/intel_iommu_internal.h |  9 ++++++
 include/hw/i386/intel_iommu.h  | 50 ++++++++++++++++++----------------
 include/hw/i386/x86-iommu.h    | 50 ++++++++++++++++++----------------
 hw/i386/intel_iommu.c          | 23 ++++++++++------
 hw/i386/x86-iommu.c            |  2 +-
 5 files changed, 76 insertions(+), 58 deletions(-)

-- 
2.39.3



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-02 21:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 13:57 [PATCH for-8.1 0/6] Fix endianness issues in the intel-iommu device Thomas Huth
2023-08-02 13:57 ` [PATCH 1/6] hw/i386/intel_iommu: Fix trivial endianness problems Thomas Huth
2023-08-02 21:13   ` Philippe Mathieu-Daudé
2023-08-02 13:57 ` [PATCH 2/6] hw/i386/intel_iommu: Fix endianness problems related to VTD_IR_TableEntry Thomas Huth
2023-08-02 13:57 ` [PATCH 3/6] hw/i386/intel_iommu: Fix struct VTDInvDescIEC on big endian hosts Thomas Huth
2023-08-02 21:16   ` Philippe Mathieu-Daudé
2023-08-02 13:57 ` [PATCH 4/6] hw/i386/intel_iommu: Fix index calculation in vtd_interrupt_remap_msi() Thomas Huth
2023-08-02 21:12   ` Philippe Mathieu-Daudé
2023-08-02 13:57 ` [PATCH 5/6] hw/i386/x86-iommu: Fix endianness issue in x86_iommu_irq_to_msi_message() Thomas Huth
2023-08-02 21:16   ` Philippe Mathieu-Daudé
2023-08-02 13:57 ` [PATCH 6/6] include/hw/i386/x86-iommu: Fix struct X86IOMMU_MSIMessage for big endian hosts Thomas Huth
2023-08-02 15:36 ` [PATCH for-8.1 0/6] Fix endianness issues in the intel-iommu device Peter Xu
2023-08-02 15:37 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).