From: Rusty Russell <rusty@rustcorp.com.au> To: Marc Zyngier <marc.zyngier@arm.com> Cc: "linux-arm-kernel\@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "kvmarm\@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>, "kvm\@vger.kernel.org" <kvm@vger.kernel.org>, "Michael S. Tsirkin" <mst@redhat.com>, Pawel Moll <Pawel.Moll@arm.com> Subject: Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts Date: Thu, 17 Oct 2013 10:57:06 +1030 [thread overview] Message-ID: <87zjq891yd.fsf@rustcorp.com.au> (raw) In-Reply-To: <525BE53C.6010100@arm.com> Marc Zyngier <marc.zyngier@arm.com> writes: > On 14/10/13 09:21, Rusty Russell wrote: >> Marc Zyngier <marc.zyngier@arm.com> writes: >>> This small patch series adds just enough kernel infrastructure and >>> fixes to allow a BE guest to use virtio-mmio on a LE host, provided >>> that the host actually supports such madness. >>> >>> This has been tested on arm64, with some fixes to KVM and a set of >>> changes to kvmtool, both which I am posting separately. >> >> OK, so I already have a patch which supports config space accessors. >> I've posted the series below, and since you want it, I'll put it in >> virtio-next after more testing and rebasing... > > Yes, that's definitely something I'd like to see being merged, as it > would allow me to drop a significant chunk of changes. OK, I've just put them into virtio-next. >> But we won't be using feature bits for endianness, since we're defining >> endian in the 1.0 spec (whether LE-everywhere or LE-for-mmio-and-PCI is >> still debated). Since we need to guess for backwards compat anyway, >> let's keep doing this until v1.0? > > When is 1.0 going to happen? When will actual implementation of drivers > and devices show up in my favourite platform emulation? 1.0 won't be finalized until early next year. We aim to publish the first draft next month, but noone should finalize implementations until the feedback process is complete. > Having a grand plan for the future is great, but I need something > working right now, or at least fairly soonish... And I need it to be > backward compatible, as none of the above is going to show up overnight. Well, mmio BE won't work at all right now due to the signature check being wrong in Linux. So there are two choices: (1) fix it, and use heuristics to figure out if the guest is BE, or (2) say there's no BE mmio, and wait for 1.0. I don't know what your timeline is: you might need to chat with Pawel internally. BTW, for qemu and PPC (though virtio-pci, not mmio) I look at the guest interrupt delivery endian bit upon any virtio device reset to guess endian. Since Linux guests reset the device before doing anything else, this works well, and supports crazy stuff like "kexec a kernel in the other endian". >> (Yeah, I made this mess with "native endian". I promise I have learnt >> my lesson). > > Paracetamol bill coming you way... ;-) Now I just have to figure out where to send my equivalent bill... Cheers, Rusty.
WARNING: multiple messages have this Message-ID (diff)
From: rusty@rustcorp.com.au (Rusty Russell) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts Date: Thu, 17 Oct 2013 10:57:06 +1030 [thread overview] Message-ID: <87zjq891yd.fsf@rustcorp.com.au> (raw) In-Reply-To: <525BE53C.6010100@arm.com> Marc Zyngier <marc.zyngier@arm.com> writes: > On 14/10/13 09:21, Rusty Russell wrote: >> Marc Zyngier <marc.zyngier@arm.com> writes: >>> This small patch series adds just enough kernel infrastructure and >>> fixes to allow a BE guest to use virtio-mmio on a LE host, provided >>> that the host actually supports such madness. >>> >>> This has been tested on arm64, with some fixes to KVM and a set of >>> changes to kvmtool, both which I am posting separately. >> >> OK, so I already have a patch which supports config space accessors. >> I've posted the series below, and since you want it, I'll put it in >> virtio-next after more testing and rebasing... > > Yes, that's definitely something I'd like to see being merged, as it > would allow me to drop a significant chunk of changes. OK, I've just put them into virtio-next. >> But we won't be using feature bits for endianness, since we're defining >> endian in the 1.0 spec (whether LE-everywhere or LE-for-mmio-and-PCI is >> still debated). Since we need to guess for backwards compat anyway, >> let's keep doing this until v1.0? > > When is 1.0 going to happen? When will actual implementation of drivers > and devices show up in my favourite platform emulation? 1.0 won't be finalized until early next year. We aim to publish the first draft next month, but noone should finalize implementations until the feedback process is complete. > Having a grand plan for the future is great, but I need something > working right now, or at least fairly soonish... And I need it to be > backward compatible, as none of the above is going to show up overnight. Well, mmio BE won't work at all right now due to the signature check being wrong in Linux. So there are two choices: (1) fix it, and use heuristics to figure out if the guest is BE, or (2) say there's no BE mmio, and wait for 1.0. I don't know what your timeline is: you might need to chat with Pawel internally. BTW, for qemu and PPC (though virtio-pci, not mmio) I look at the guest interrupt delivery endian bit upon any virtio device reset to guess endian. Since Linux guests reset the device before doing anything else, this works well, and supports crazy stuff like "kexec a kernel in the other endian". >> (Yeah, I made this mess with "native endian". I promise I have learnt >> my lesson). > > Paracetamol bill coming you way... ;-) Now I just have to figure out where to send my equivalent bill... Cheers, Rusty.
next prev parent reply other threads:[~2013-10-17 3:58 UTC|newest] Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-11 14:36 [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts Marc Zyngier 2013-10-11 14:36 ` Marc Zyngier 2013-10-11 14:36 ` [PATCH 1/3] virtio: let the guest report its endianess if advertized by the host Marc Zyngier 2013-10-11 14:36 ` Marc Zyngier 2013-10-11 14:36 ` [PATCH 2/3] virtio: mmio: fix signature checking for BE guests Marc Zyngier 2013-10-11 14:36 ` Marc Zyngier 2013-10-14 8:46 ` Pawel Moll 2013-10-14 8:46 ` Pawel Moll 2013-10-14 9:11 ` Rusty Russell 2013-10-14 9:11 ` Rusty Russell 2013-11-05 3:36 ` Rusty Russell 2013-11-05 3:36 ` Rusty Russell 2013-11-05 10:45 ` Pawel Moll 2013-11-05 10:45 ` Pawel Moll 2013-11-07 0:36 ` Rusty Russell 2013-11-07 0:36 ` Rusty Russell 2013-10-11 14:36 ` [PATCH 3/3] virtio: mmio: access configuration space as little-endian Marc Zyngier 2013-10-11 14:36 ` Marc Zyngier 2013-10-14 8:44 ` Pawel Moll 2013-10-14 8:44 ` Pawel Moll 2013-10-12 18:28 ` [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts Michael S. Tsirkin 2013-10-12 18:28 ` Michael S. Tsirkin 2013-10-14 8:24 ` Marc Zyngier 2013-10-14 8:24 ` Marc Zyngier 2013-10-14 8:59 ` Michael S. Tsirkin 2013-10-14 8:59 ` Michael S. Tsirkin 2013-10-14 9:04 ` Pawel Moll 2013-10-14 9:04 ` Pawel Moll 2013-10-14 10:46 ` Michael S. Tsirkin 2013-10-14 10:46 ` Michael S. Tsirkin 2013-10-14 10:50 ` Pawel Moll 2013-10-14 10:50 ` Pawel Moll 2013-10-14 23:02 ` Rusty Russell 2013-10-14 23:02 ` Rusty Russell 2013-10-14 9:13 ` Rusty Russell 2013-10-14 9:13 ` Rusty Russell 2013-10-14 8:21 ` Rusty Russell 2013-10-14 8:21 ` Rusty Russell 2013-10-14 12:36 ` Marc Zyngier 2013-10-14 12:36 ` Marc Zyngier 2013-10-14 12:51 ` Michael S. Tsirkin 2013-10-14 12:51 ` Michael S. Tsirkin 2013-10-17 0:27 ` Rusty Russell [this message] 2013-10-17 0:27 ` Rusty Russell 2013-10-14 13:03 ` Paolo Bonzini 2013-10-14 13:03 ` Paolo Bonzini 2013-10-14 13:10 ` Alexander Graf 2013-10-14 13:10 ` Alexander Graf 2013-10-14 13:13 ` Paolo Bonzini 2013-10-14 13:13 ` Paolo Bonzini 2013-10-14 13:24 ` Marc Zyngier 2013-10-14 13:24 ` Marc Zyngier 2013-10-14 13:29 ` Paolo Bonzini 2013-10-14 13:29 ` Paolo Bonzini 2013-10-14 13:39 ` Alexander Graf 2013-10-14 13:39 ` Alexander Graf 2013-10-14 13:49 ` Marc Zyngier 2013-10-14 13:49 ` Marc Zyngier 2013-10-14 14:05 ` Michael S. Tsirkin 2013-10-14 14:05 ` Michael S. Tsirkin 2013-10-14 14:13 ` Marc Zyngier 2013-10-14 14:13 ` Marc Zyngier 2013-10-14 14:16 ` Alexander Graf 2013-10-14 14:16 ` Alexander Graf 2013-10-14 14:52 ` Marc Zyngier 2013-10-14 14:52 ` Marc Zyngier 2013-10-14 14:56 ` Paolo Bonzini 2013-10-14 14:56 ` Paolo Bonzini 2013-10-14 15:12 ` Marc Zyngier 2013-10-14 15:12 ` Marc Zyngier 2013-10-14 15:22 ` Paolo Bonzini 2013-10-14 15:22 ` Paolo Bonzini 2013-10-14 15:36 ` Marc Zyngier 2013-10-14 15:36 ` Marc Zyngier 2013-10-14 16:50 ` Paolo Bonzini 2013-10-14 16:50 ` Paolo Bonzini 2013-10-14 17:10 ` Michael S. Tsirkin 2013-10-14 17:10 ` Michael S. Tsirkin 2013-10-14 23:23 ` Rusty Russell 2013-10-14 23:23 ` Rusty Russell 2013-10-15 6:38 ` Michael S. Tsirkin 2013-10-15 6:38 ` Michael S. Tsirkin 2013-10-15 9:19 ` Marc Zyngier 2013-10-15 9:19 ` Marc Zyngier 2013-10-14 15:45 ` Anup Patel 2013-10-14 15:45 ` Anup Patel
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=87zjq891yd.fsf@rustcorp.com.au \ --to=rusty@rustcorp.com.au \ --cc=Pawel.Moll@arm.com \ --cc=kvm@vger.kernel.org \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=marc.zyngier@arm.com \ --cc=mst@redhat.com \ /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: linkBe 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.