qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH-for-5.2] hw/s390x/pci: Fix endianness issue
@ 2020-11-17 12:01 Philippe Mathieu-Daudé
  2020-11-17 12:54 ` Cornelia Huck
  2020-11-17 13:00 ` Peter Maydell
  0 siblings, 2 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-17 12:01 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Pierre Morel, Matthew Rosato, David Hildenbrand,
	Cornelia Huck, Richard Henderson, Alex Williamson, Halil Pasic,
	Christian Borntraeger, qemu-s390x, Philippe Mathieu-Daudé

Fix an endianness issue reported by Cornelia:

> s390x tcg guest on x86, virtio-pci devices are not detected. The
> relevant feature bits are visible to the guest. Same breakage with
> different guest kernels.
> KVM guests and s390x tcg guests on s390x are fine.

Fixes: 28dc86a0729 ("s390x/pci: use a PCI Group structure")
Reported-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
RFC because review-only patch, untested
---
 hw/s390x/s390-pci-inst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 58cd041d17f..cfb54b4d8ec 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -305,7 +305,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_t ra)
         ClpReqQueryPciGrp *reqgrp = (ClpReqQueryPciGrp *)reqh;
         S390PCIGroup *group;
 
-        group = s390_group_find(reqgrp->g);
+        group = s390_group_find(ldl_p(&reqgrp->g));
         if (!group) {
             /* We do not allow access to unknown groups */
             /* The group must have been obtained with a vfio device */
-- 
2.26.2



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

end of thread, other threads:[~2020-11-17 18:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-17 12:01 [RFC PATCH-for-5.2] hw/s390x/pci: Fix endianness issue Philippe Mathieu-Daudé
2020-11-17 12:54 ` Cornelia Huck
2020-11-17 13:00 ` Peter Maydell
2020-11-17 13:12   ` Philippe Mathieu-Daudé
2020-11-17 13:17     ` Cornelia Huck
2020-11-17 13:23   ` Pierre Morel
2020-11-17 13:31     ` Cornelia Huck
2020-11-17 14:02       ` Matthew Rosato
2020-11-17 14:13         ` Cornelia Huck
2020-11-17 14:34           ` Matthew Rosato
2020-11-17 15:17             ` Cornelia Huck
2020-11-17 16:01               ` Matthew Rosato
2020-11-17 16:43                 ` Cornelia Huck
2020-11-17 18:28             ` Thomas Huth
2020-11-17 13:36     ` Peter Maydell

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).