From: "Longpeng (Mike)" <longpeng2@huawei.com>
To: David Hildenbrand <david@redhat.com>
Cc: <pbonzini@redhat.com>, <rkrcmar@redhat.com>, <agraf@suse.com>,
<borntraeger@de.ibm.com>, <cohuck@redhat.com>,
<christoffer.dall@linaro.org>, <marc.zyngier@arm.com>,
<james.hogan@imgtec.com>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <weidong.huang@huawei.com>,
<arei.gonglei@huawei.com>, <wangxinxin.wang@huawei.com>,
<longpeng.mike@gmail.com>
Subject: Re: [PATCH 3/3] KVM: implement spinlock optimization logic for arm/s390
Date: Mon, 7 Aug 2017 16:54:21 +0800 [thread overview]
Message-ID: <59882ABD.6000501@huawei.com> (raw)
In-Reply-To: <c3db20bd-aa38-f0d1-30d3-dbcbe85e2688@redhat.com>
On 2017/8/7 16:52, David Hildenbrand wrote:
> On 07.08.2017 10:44, Longpeng(Mike) wrote:
>> Implements the kvm_arch_vcpu_spin/preempt_in_kernel() for arm/s390,
>> they needn't cache the result.
>>
>> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
>> ---
>> arch/s390/kvm/kvm-s390.c | 4 ++--
>> virt/kvm/arm/arm.c | 4 ++--
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>> index f78cdc2..49b9178 100644
>> --- a/arch/s390/kvm/kvm-s390.c
>> +++ b/arch/s390/kvm/kvm-s390.c
>> @@ -2449,12 +2449,12 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
>>
>> bool kvm_arch_vcpu_spin_in_kernel(struct kvm_vcpu *vcpu)
>> {
>> - return false;
>> + return !(vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE);
>> }
>>
>> bool kvm_arch_vcpu_preempt_in_kernel(struct kvm_vcpu *vcpu)
>> {
>> - return false;
>> + return !(vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE);
>> }
>>
>> void kvm_s390_vcpu_block(struct kvm_vcpu *vcpu)
>> diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
>> index e45f780..956f025 100644
>> --- a/virt/kvm/arm/arm.c
>> +++ b/virt/kvm/arm/arm.c
>> @@ -418,12 +418,12 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)
>>
>> bool kvm_arch_vcpu_spin_in_kernel(struct kvm_vcpu *vcpu)
>> {
>> - return false;
>> + return vcpu_mode_priv(vcpu);
>> }
>>
>> bool kvm_arch_vcpu_preempt_in_kernel(struct kvm_vcpu *vcpu)
>> {
>> - return false;
>> + return vcpu_mode_priv(vcpu);
>> }
>>
>> /* Just ensure a guest exit from a particular CPU */
>>
>
> Can you split that into two parts? (arm and s390x?)
OK, I'll split in V2. :)
>
--
Regards,
Longpeng(Mike)
prev parent reply other threads:[~2017-08-07 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 8:44 [PATCH 0/3] KVM: optimize the kvm_vcpu_on_spin Longpeng(Mike)
2017-08-07 8:44 ` [PATCH 1/3] KVM: add spinlock-exiting optimize framework Longpeng(Mike)
2017-08-07 8:55 ` David Hildenbrand
2017-08-07 9:04 ` Longpeng (Mike)
2017-08-07 8:44 ` [PATCH 2/3] KVM: X86: implement the logic for spinlock optimization Longpeng(Mike)
2017-08-07 10:45 ` Paolo Bonzini
2017-08-07 12:28 ` Longpeng(Mike)
2017-08-07 13:16 ` Paolo Bonzini
2017-08-07 8:44 ` [PATCH 3/3] KVM: implement spinlock optimization logic for arm/s390 Longpeng(Mike)
2017-08-07 8:52 ` David Hildenbrand
2017-08-07 8:54 ` Longpeng (Mike) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59882ABD.6000501@huawei.com \
--to=longpeng2@huawei.com \
--cc=agraf@suse.com \
--cc=arei.gonglei@huawei.com \
--cc=borntraeger@de.ibm.com \
--cc=christoffer.dall@linaro.org \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=james.hogan@imgtec.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longpeng.mike@gmail.com \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox