[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v2 7/9] s390x/pci: fence off instructions fo
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH RFC v2 7/9] s390x/pci: fence off instructions for non-pci |
Date: |
Wed, 19 Jul 2017 09:38:04 +0200 |
[restored cc: list]
On Wed, 19 Jul 2017 11:21:30 +0800
Yi Min Zhao <address@hidden> wrote:
> 在 2017/7/18 下午10:24, Cornelia Huck 写道:
> > If a guest running on a machine without zpci issues a pci instruction,
> > throw them an exception.
> >
> > Signed-off-by: Cornelia Huck <address@hidden>
> > ---
> > target/s390x/kvm.c | 54
> > +++++++++++++++++++++++++++++++++++++++++-------------
> > 1 file changed, 41 insertions(+), 13 deletions(-)
> >
> > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> > index 880eccd58a..60688888c3 100644
> > --- a/target/s390x/kvm.c
> > +++ b/target/s390x/kvm.c
> > @@ -1191,7 +1191,11 @@ static int kvm_clp_service_call(S390CPU *cpu, struct
> > kvm_run *run)
> > {
> > uint8_t r2 = (run->s390_sieic.ipb & 0x000f0000) >> 16;
> >
> > - return clp_service_call(cpu, r2);
> > + if (s390_has_feat(S390_FEAT_ZPCI)) {
> > + return clp_service_call(cpu, r2);
> > + } else {
> > + return -1;
> > + }
> Hi Conny,
>
> Should we use a global value to store s390_has_feat(S390_FEAT_ZPCI)?
> I'm not sure it's a good idea.
>
> Yi Min
s390_has_feat() should be fast enough after the first time it has been
called, as the cpu is cached, so I don't think it's worth it.
- Re: [Qemu-devel] [PATCH RFC v2 4/9] s390x/pci: do not advertise pci on non-pci builds, (continued)
- [Qemu-devel] [PATCH RFC v2 1/9] kvm: remove hard dependency on pci, Cornelia Huck, 2017/07/18
- [Qemu-devel] [PATCH RFC v2 5/9] s390x/ccw: create s390 phb conditionally, Cornelia Huck, 2017/07/18
- [Qemu-devel] [PATCH RFC v2 7/9] s390x/pci: fence off instructions for non-pci, Cornelia Huck, 2017/07/18
- [Qemu-devel] [PATCH RFC v2 8/9] s390x/kvm: msi route fixup for non-pci, Cornelia Huck, 2017/07/18
- [Qemu-devel] [PATCH RFC v2 9/9] s390x: refine pci dependencies, Cornelia Huck, 2017/07/18