qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>
Cc: "Alex Williamson" <alex.williamson@redhat.com>,
	"Pierre Morel" <pmorel@linux.ibm.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, "Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH for-5.2] s390x/pci: fix endianness issues
Date: Tue, 17 Nov 2020 20:21:51 +0100	[thread overview]
Message-ID: <6a1b2ba1-642a-9cee-4d7d-2c1e4ea826ed@redhat.com> (raw)
In-Reply-To: <20201117171340.1289659-1-cohuck@redhat.com>

On 17/11/2020 18.13, Cornelia Huck wrote:
> zPCI control blocks are big endian, we need to take care that we
> do proper accesses in order not to break tcg guests on little endian
> hosts.
> 
> Fixes: 28dc86a07299 ("s390x/pci: use a PCI Group structure")
> Fixes: 9670ee752727 ("s390x/pci: use a PCI Function structure")
> Fixes: 1e7552ff5c34 ("s390x/pci: get zPCI function info from host")

This fixes the problem with my old Fedora 28 under TCG, too, but... do we
really want to store this information in big endian on the QEMU side (e.g.
in the QTAILQ lists)? ... that smells like trouble again in the future...

I think it would be better if we rather replace all those memcpy() functions
in the patches that you cited in the "Fixes:" lines above with code that
changes the endianess when we copy the date from QEMU space to guest space
and vice versa. What do you think?

 Thomas



  parent reply	other threads:[~2020-11-17 19:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 17:13 [PATCH for-5.2] s390x/pci: fix endianness issues Cornelia Huck
2020-11-17 17:59 ` Philippe Mathieu-Daudé
2020-11-17 18:19   ` Matthew Rosato
2020-11-17 18:30     ` Philippe Mathieu-Daudé
2020-11-17 18:39       ` Thomas Huth
2020-11-17 18:49         ` Philippe Mathieu-Daudé
2020-11-17 19:23           ` Thomas Huth
2020-11-17 19:20 ` Matthew Rosato
2020-11-17 19:21 ` Thomas Huth [this message]
2020-11-17 19:49   ` Matthew Rosato
2020-11-18  7:49     ` Cornelia Huck
  -- strict thread matches above, loose matches on Subject: below --
2020-11-18  8:51 Cornelia Huck
2020-11-18  8:53 ` Cornelia Huck
2020-11-18  9:38 ` Thomas Huth
2020-11-18 10:19   ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a1b2ba1-642a-9cee-4d7d-2c1e4ea826ed@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=philmd@redhat.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).