Re: [PATCH v2 1/4] KVM: add spinlock optimization framework

From: Cornelia Huck
Date: Tue Aug 08 2017 - 03:43:44 EST


On Tue, 8 Aug 2017 09:34:14 +0200
Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:

> On 08/08/2017 06:05, Longpeng(Mike) wrote:
> > return 1;
> > diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
> > index ce865bd..4ea8c38 100644
> > --- a/arch/s390/kvm/diag.c
> > +++ b/arch/s390/kvm/diag.c
> > @@ -150,7 +150,7 @@ static int __diag_time_slice_end(struct kvm_vcpu *vcpu)
> > {
> > VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
> > vcpu->stat.diagnose_44++;
> > - kvm_vcpu_on_spin(vcpu);
> > + kvm_vcpu_on_spin(vcpu, kvm_arch_vcpu_in_kernel(vcpu));
> > return 0;
> > }
> >
>
> IIUC, diag is a privileged instruction so this an also be "true".
>
> Paolo

Yes, indeed.