From: Christoffer Dall <christoffer.dall@linaro.org>
To: kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
patches@linaro.org, Marc Zyngier <marc.zyngier@arm.com>,
Peter Maydell <peter.maydell@linaro.org>,
Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH v3] KVM: Specify byte order for KVM_EXIT_MMIO
Date: Fri, 14 Mar 2014 04:27:56 +0000 [thread overview]
Message-ID: <20140314042756.GA25405@cbox> (raw)
In-Reply-To: <1390926522-18267-1-git-send-email-christoffer.dall@linaro.org>
On Tue, Jan 28, 2014 at 08:28:42AM -0800, Christoffer Dall wrote:
> 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 <marc.zyngier@arm.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> ---
> 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
> --
> 1.8.5.2
>
Any more comments on this one, or can it be applied?
Thanks,
--
Christoffer
WARNING: multiple messages have this Message-ID (diff)
From: Christoffer Dall <christoffer.dall@linaro.org>
To: kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
patches@linaro.org, Marc Zyngier <marc.zyngier@arm.com>,
Peter Maydell <peter.maydell@linaro.org>,
Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH v3] KVM: Specify byte order for KVM_EXIT_MMIO
Date: Thu, 13 Mar 2014 21:27:56 -0700 [thread overview]
Message-ID: <20140314042756.GA25405@cbox> (raw)
In-Reply-To: <1390926522-18267-1-git-send-email-christoffer.dall@linaro.org>
On Tue, Jan 28, 2014 at 08:28:42AM -0800, Christoffer Dall wrote:
> 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 <marc.zyngier@arm.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> ---
> 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
> --
> 1.8.5.2
>
Any more comments on this one, or can it be applied?
Thanks,
--
Christoffer
next prev parent reply other threads:[~2014-03-14 4:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 16:28 [PATCH v3] KVM: Specify byte order for KVM_EXIT_MMIO Christoffer Dall
2014-01-28 16:28 ` Christoffer Dall
2014-01-29 14:31 ` Alexander Graf
2014-01-29 14:31 ` Alexander Graf
2014-02-02 12:50 ` Peter Maydell
2014-02-02 12:50 ` Peter Maydell
2014-02-02 21:02 ` Christoffer Dall
2014-02-02 21:02 ` Christoffer Dall
2014-03-14 4:27 ` Christoffer Dall [this message]
2014-03-14 4:27 ` Christoffer Dall
2014-03-17 19:00 ` Marc Zyngier
2014-03-17 19:00 ` Marc Zyngier
2014-03-29 14:45 ` Paolo Bonzini
2014-03-29 14:45 ` Paolo Bonzini
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=20140314042756.GA25405@cbox \
--to=christoffer.dall@linaro.org \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=marc.zyngier@arm.com \
--cc=patches@linaro.org \
--cc=peter.maydell@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.