From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v3] KVM: Specify byte order for KVM_EXIT_MMIO Date: Sat, 29 Mar 2014 15:45:30 +0100 Message-ID: <5336DC8A.8020203@redhat.com> References: <1390926522-18267-1-git-send-email-christoffer.dall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-ppc@vger.kernel.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, Marc Zyngier , Peter Maydell , Alexander Graf To: Christoffer Dall , kvm@vger.kernel.org Return-path: Received: from mail-ee0-f46.google.com ([74.125.83.46]:32800 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554AbaC2Opi (ORCPT ); Sat, 29 Mar 2014 10:45:38 -0400 In-Reply-To: <1390926522-18267-1-git-send-email-christoffer.dall@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: Il 28/01/2014 17:28, Christoffer Dall ha scritto: > The KVM API documentation is not clear about the semantics of the data > field on the mmio struct on the kvm_run struct. > > This has become problematic when supporting ARM guests on big-endian > host systems with guests of both endianness types, because it is unclear > how the data should be exported to user space. > > This should not break with existing implementations as all supported > existing implementations of known user space applications (QEMU and > kvmtools for virtio) only support default endianness of the > architectures on the host side. > > Cc: Marc Zyngier > Cc: Peter Maydell > Cc: Alexander Graf > Signed-off-by: Christoffer Dall > --- > Changes [v2 - v3]: > - Change the semantics and wordings as per Scott's, Avi's, and Ben's > suggestions. > > Changes [v1 - v2]: > - s/host kernel should/host user space should/ > > Documentation/virtual/kvm/api.txt | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt > index 366bf4b..e11f09d 100644 > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -2565,6 +2565,10 @@ executed a memory-mapped I/O instruction which could not be satisfied > by kvm. The 'data' member contains the written data if 'is_write' is > true, and should be filled by application code otherwise. > > +The 'data' member contains, in its first 'len' bytes, the value as it would > +appear if the VCPU performed a load or store of the appropriate width directly > +to the byte array. > + > NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR, > KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding > operations are complete (and guest state is consistent) only after userspace > Applied, thanks! Paolo