From: Alexander Graf <agraf@suse.de>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Will Deacon <Will.Deacon@arm.com>,
Pekka Enberg <penberg@kernel.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Greg Kurz <gkurz@linux.vnet.ibm.com>
Subject: Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness
Date: Wed, 07 May 2014 13:49:33 +0200 [thread overview]
Message-ID: <536A1DCD.8000901@suse.de> (raw)
In-Reply-To: <87lhudoogt.fsf@approximate.cambridge.arm.com>
On 05/07/2014 12:46 PM, Marc Zyngier wrote:
> On Wed, May 07 2014 at 11:10:56 am BST, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 7 May 2014 10:52, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>> On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell
>>> <peter.maydell@linaro.org> wrote:
>>>> Current opinion on the qemu-devel thread seems to be that we
>>>> should just define that the endianness of the virtio device is
>>>> the endianness of the guest kernel at the point where the guest
>>>> triggers a reset of the virtio device by writing zero the QueuePFN
>>>> or Status registers.
>>> On AArch32, we only have the CPSR.E bit to select the endiannes. Are we
>>> going to simply explode if the access comes from userspace?
>> There's SCTLR.EE in AArch32, right?
> Indeed, good point.
>
>>> On AArch64, we can either select the kernel endianness, or userspace
>>> endianness. Are we going to go a different route just for the sake of
>>> enforcing kernel access?
>>>
>>> I'm inclined to think of userspace access as a valid use case.
>> I don't actually care much about the details of what we decide; I just
>> want us to be consistent between QEMU and kvmtool and (to the extent
>> that architectural differences permit) consistent between PPC and
>> ARM. At the moment we seem to be heading in gratuitously different
>> directions.
> My point is: is there any good technical reason for deciding not to
> support guest user space access, other than religious matters about the
> latest incarnation of The Holy Virtio Spec?
Yes, because it can't be isolated as per the current spec. User space
has no business in physical addresses. And since so far I haven't heard
of a single case where people on ARM are either
a) nesting virtualization or
b) running different endian user space
I don't think this point is valid. Virtio 1.0 is defined to be little
endian only, so we don't need all that messy magic logic anymore. By the
time people will do nesting or different endian user space we will most
likely be in virtio 1.0 land. Shoehorning in anything in between is just
a waste of time.
If you like to see a constructed case where your logic falls apart, I
can easily give you one too (because the whole thing is just insanely
fragile). Imagine you have nesting. Your L1 guest passes its virtio
device into the L2 guest with idmap. The L1 guest wants to trace MMIO
accesses, so it traps on every access and delivers it on its own. L2 is
LE, L1 is BE. Virtio gets initialized BE even through the guest that
really wants to access it is LE.
Alex
next prev parent reply other threads:[~2014-05-07 11:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 18:17 [PATCH v3 0/9] kvmtool: handle guests of a different endianness Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 1/9] kvmtool: pass trapped vcpu to MMIO accessors Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 2/9] kvmtool: virt_queue configuration based on endianness Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 3/9] kvmtool: sample CPU endianness on virtio-mmio device reset Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 4/9] kvmtool: add queue endianness initializer Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 5/9] kvmtool: convert console backend to support bi-endianness Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 6/9] kvmtool: convert 9p " Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 7/9] kvmtool: convert blk " Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 8/9] kvmtool: convert net " Marc Zyngier
2014-04-24 18:17 ` [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness Marc Zyngier
2014-05-06 14:28 ` Will Deacon
2014-05-06 17:25 ` Marc Zyngier
2014-05-06 18:38 ` Peter Maydell
2014-05-07 9:34 ` Peter Maydell
2014-05-07 9:42 ` Alexander Graf
2014-05-07 9:57 ` Marc Zyngier
2014-05-07 10:11 ` Alexander Graf
2014-05-07 10:30 ` Michael S. Tsirkin
2014-05-07 10:39 ` Marc Zyngier
2014-05-08 1:52 ` Rusty Russell
2014-05-07 9:52 ` Marc Zyngier
2014-05-07 9:55 ` Alexander Graf
2014-05-07 10:19 ` Marc Zyngier
2014-05-07 10:10 ` Peter Maydell
2014-05-07 10:46 ` Marc Zyngier
2014-05-07 11:49 ` Alexander Graf [this message]
2014-05-07 12:16 ` Marc Zyngier
2014-05-07 12:18 ` Peter Maydell
2014-05-07 10:40 ` Greg Kurz
2014-05-07 11:04 ` Marc Zyngier
2014-05-07 12:17 ` Peter Maydell
2014-05-07 12:25 ` Marc Zyngier
2014-05-07 12:27 ` Greg Kurz
2014-05-03 7:07 ` [PATCH v3 0/9] kvmtool: handle guests of a different endianness Pekka Enberg
2014-05-06 13:34 ` Will Deacon
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=536A1DCD.8000901@suse.de \
--to=agraf@suse.de \
--cc=Will.Deacon@arm.com \
--cc=gkurz@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=marc.zyngier@arm.com \
--cc=penberg@kernel.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.