From: Greg Kurz <gkurz@linux.vnet.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: Michael Neuling <mikey@neuling.org>,
Rusty Russell <rusty@rustcorp.com.au>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
kvm-ppc@vger.kernel.org, "open list:PReP" <qemu-ppc@nongnu.org>,
Paul Mackerras <paulus@samba.org>,
Laurent Dufour <ldufour@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [Qemu-ppc] [RFC] QEMU/KVM PowerPC: virtio and guest endianness
Date: Fri, 4 Oct 2013 15:43:09 +0200 [thread overview]
Message-ID: <20131004154309.1e8aa8e1@bahia.local> (raw)
In-Reply-To: <143D6A15-8585-4405-8E74-C3FFE8CDA7C1@suse.de>
On Fri, 4 Oct 2013 13:43:38 +0200
Alexander Graf <agraf@suse.de> wrote:
> CC'ing qemu-devel - please use qemu-ppc@ only as a tag, every mail
> needs to go to qemu-devel as well.
>
Sure I will.
> On 03.10.2013, at 16:29, Greg Kurz wrote:
> [...]
> > I have searched for an appropriate place to add the polling and I
> > must admit I did not find any... I am no QEMU expert but I suspect
> > we would need some kind of arch specific hook to be called from the
> > virtio code to do this... :-\ I hope I am wrong, please correct me
> > if so.
>
> Just put it into the normal register sync function and call
> cpu_synchronize_state() on virtio reset.
>
Thanks, I will look into that.
>
> We have to decide which scheme to follow. There are 2 way we can /
> should handle registers usually:
>
> a) owned by QEMU
> b) owned by KVM
>
> If they're owned by QEMU, every hypercall needs to go into QEMU which
> then propagates that change through an ioctl back into KVM. If
> they're owned by KVM, QEMU needs to fetch them whenever it needs to
>
> As a general rule of thumb path b is easier to hack up, path a is
> easier to maintain long term. Which is pretty much what you're seeing
> here.
>
Agreed.
> > I have a better feeling for (2) because:
> > - 2-liner patch in KVM
> > - no extra code change in QEMU
> > - already *partially* tested
>
> I don't understand. QEMU would get triggered, then have to propagate
> things back into KVM. We definitely do _not_ want KVM to do magic,
> then tell QEMU to handle a hypercall again.
>
My idea was to have KVM and QEMU be like *co-owners* of the LPCR
register... now I admit it was a bad idea ! :)
> > Also, I understood Rusty is working on the next virtio specification
> > which should address the endian issue: probably not worth to add too
> > many temporary lines in the QEMU code...
>
> Does 3.13 support LE mode? Does 3.13 support the new and shiny virtio
> spec? There's a good chance we'd have to deal with guest kernels that
> can do LE, but not sane virtio.
>
I don't know any details about 3.13 but I guess you are right, it is
unlikely the guests will have it.
> > Of course, I probably lack some essential knowledge that would be
> > more favorable to (1)... so please comment and argue ! :)
>
> I think a 100% QEMU implementation that just goes through all vcpus
> and does a simple SET_ONE_REG for LPCR to set ILE would be the best.
> Anton's patch isn't in Linus' tree yet, right? So all it takes is a
> partial revert of that one to not handle the actual hypercall in KVM.
> And some code in kvmppc_set_lpcr() to also set intr_msr (not changing
> it is a bug today already).
>
>
> Alex
>
>
Thanks for your indications Alex.
Cheers.
--
Greg
next prev parent reply other threads:[~2013-10-04 13:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130925223118.GA2844@iris.ozlabs.ibm.com>
[not found] ` <20130927135930.10288.86526.stgit@nimbus>
[not found] ` <20130927164535.6dbeface@bahia.local>
[not found] ` <20131003162952.4cbf482c@bahia.local>
2013-10-04 11:43 ` [Qemu-devel] [RFC] QEMU/KVM PowerPC: virtio and guest endianness Alexander Graf
2013-10-04 13:43 ` Greg Kurz [this message]
[not found] ` <20131004115302.GA26884@iris.ozlabs.ibm.com>
[not found] ` <46DFE136-500E-4192-BB38-06333A6A0901@suse.de>
2013-10-04 14:08 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2013-10-04 14:19 ` Alexander Graf
2013-10-07 15:23 ` [Qemu-devel] [PATCH 0/2] virtio: guest endianness support Greg Kurz
2013-10-07 15:23 ` [Qemu-devel] [PATCH 1/2] linux-headers: POWER8 partial update Greg Kurz
2013-10-07 15:23 ` [Qemu-devel] [PATCH 2/2] virtio: refresh registers at reset time Greg Kurz
2013-10-15 1:49 ` Rusty Russell
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=20131004154309.1e8aa8e1@bahia.local \
--to=gkurz@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=ldufour@linux.vnet.ibm.com \
--cc=mikey@neuling.org \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rusty@rustcorp.com.au \
/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).