From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm/arm64: KVM: MMIO support for BE guest
Date: Wed, 30 Oct 2013 17:11:28 +0000 [thread overview]
Message-ID: <52713DC0.8040703@arm.com> (raw)
In-Reply-To: <CAAhSdy0UdzKz8sKBgbZFQFWAAiC59PWcvc+-w8o=3Hsx+4UkaQ@mail.gmail.com>
On 30/10/13 17:06, Anup Patel wrote:
> On Wed, Oct 30, 2013 at 1:58 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 2013-10-30 01:10, Anup Patel wrote:
>>>
>>> On Wed, Oct 30, 2013 at 12:19 AM, Marc Zyngier <marc.zyngier@arm.com>
>>> wrote:
>>>>
>>>> Do the necessary byteswap when host and guest have different
>>>> views of the universe. Actually, the only case we need to take
>>>> care of is when the guest is BE. All the other cases are naturally
>>>> handled.
>>>
>>>
>>> You might want to handle the case where we have LE guest on BE host
>>> because for ARM64 kernel we might have lot of people interested in
>>> running host kernel in BE mode with KVM enabled.
>>
>>
>> What makes you think it is not handled already?
>
> What I understood here is that you are trying to ensure that MMIO data
> passed to/from user space (i.e. QEMU or KVMTOOL) is host endian
> using vcpu_data_guest_to_host() and vcpu_data_host_to_guest(). This
> makes lot of sense for having all combinations of host and guest endianness.
>
> If the above is correct then I see an issue in vcpu_data_guest_to_host() and
> vcpu_data_host_to_guest() for LE guest on BE host because this patch does
> endianness conversion for BE VCPUs only in vcpu_data_guest_to_host() and
> vcpu_data_host_to_guest(). If we have LE guest on BE host then these
> functions won't do any endianness conversion.
And no conversion is exactly what we want. MMIO is always LE.
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2013-10-30 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 18:49 [PATCH v2] arm/arm64: KVM: MMIO support for BE guest Marc Zyngier
2013-10-30 1:10 ` Anup Patel
2013-10-30 8:28 ` Marc Zyngier
2013-10-30 17:06 ` Anup Patel
2013-10-30 17:11 ` Marc Zyngier [this message]
2013-10-30 17:19 ` Anup Patel
2013-10-30 17:48 ` Marc Zyngier
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=52713DC0.8040703@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).