[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170801085106.1d3813ab@gondolin>
Date: Tue, 1 Aug 2017 08:51:06 +0200
From: Cornelia Huck <cohuck@...hat.com>
To: David Hildenbrand <david@...hat.com>
Cc: Christoffer Dall <cdall@...aro.org>,
"Longpeng(Mike)" <longpeng2@...wei.com>, pbonzini@...hat.com,
rkrcmar@...hat.com, agraf@...e.com, borntraeger@...ibm.com,
christoffer.dall@...aro.org, marc.zyngier@....com,
james.hogan@...tec.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, weidong.huang@...wei.com,
arei.gonglei@...wei.com, wangxinxin.wang@...wei.com,
longpeng.mike@...il.com
Subject: Re: [RFC] KVM: optimize the kvm_vcpu_on_spin
On Mon, 31 Jul 2017 19:32:26 +0200
David Hildenbrand <david@...hat.com> wrote:
> This one should work for s390x, no caching (or special access patterns
> like on x86) needed:
>
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -2447,6 +2447,11 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
> return kvm_s390_vcpu_has_irq(vcpu, 0);
> }
>
> +bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu)
> +{
> + return !(vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE);
> +}
> +
> void kvm_s390_vcpu_block(struct kvm_vcpu *vcpu)
> {
> atomic_or(PROG_BLOCK_SIE, &vcpu->arch.sie_block->prog20);
Yes, that should work.
Powered by blists - more mailing lists