qemu-devel
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]