[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STO
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations |
Date: |
Wed, 4 Feb 2015 12:32:11 +1100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Feb 04, 2015 at 08:19:06AM +1100, Paul Mackerras wrote:
> On Tue, Feb 03, 2015 at 05:10:51PM +1100, David Gibson wrote:
> > qemu currently implements the hypercalls H_LOGICAL_CI_LOAD and
> > H_LOGICAL_CI_STORE as PAPR extensions. These are used by the SLOF firmware
> > for IO, because performing cache inhibited MMIO accesses with the MMU off
> > (real mode) is very awkward on POWER.
> >
> > This approach breaks when SLOF needs to access IO devices implemented
> > within KVM instead of in qemu. The simplest example would be virtio-blk
> > using an iothread, because the iothread / dataplane mechanism relies on
> > an in-kernel implementation of the virtio queue notification MMIO.
> >
> > To fix this, an in-kernel implementation of these hypercalls has been made,
> > however, the hypercalls still need to be enabled from qemu. This performs
> > the necessary calls to do so.
> >
> > Signed-off-by: David Gibson <address@hidden>
>
> [snip]
>
> > + ret1 = kvmppc_enable_hcall(kvm_state, H_LOGICAL_CI_LOAD);
> > + if (ret1 != 0) {
> > + fprintf(stderr, "Warning: error enabling H_LOGICAL_CI_LOAD in KVM:"
> > + " %s\n", strerror(errno));
> > + }
> > +
> > + ret2 = kvmppc_enable_hcall(kvm_state, H_LOGICAL_CI_STORE);
> > + if (ret2 != 0) {
> > + fprintf(stderr, "Warning: error enabling H_LOGICAL_CI_STORE in
> > KVM:"
> > + " %s\n", strerror(errno));
> > + }
> > +
> > + if ((ret1 != 0) || (ret2 != 0)) {
> > + fprintf(stderr, "Warning: Couldn't enable H_LOGICAL_CI_* in KVM,
> > SLOF"
> > + " may be unable to operate devices with in-kernel
> > emulation\n");
> > + }
>
> You'll always get these warnings if you're running on an old (meaning
> current upstream) kernel, which could be annoying.
True.
> Is there any way
> to tell whether you have configured any devices which need the
> in-kernel MMIO emulation and only warn if you have?
In theory, I guess so. In practice I can't see how you'd enumerate
all devices that might require kernel intervention without something
horribly invasive.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
pgpmv6p38bdm_.pgp
Description: PGP signature
- [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, David Gibson, 2015/02/03
- Re: [Qemu-devel] [Qemu-ppc] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Nikunj A Dadhania, 2015/02/03
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Paul Mackerras, 2015/02/03
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations,
David Gibson <=
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/02/04
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, David Gibson, 2015/02/04
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/02/04
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, David Gibson, 2015/02/04
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/02/05
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, David Gibson, 2015/02/05
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/02/05
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, David Gibson, 2015/02/05
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/02/06
- Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, David Gibson, 2015/02/09