Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705265
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | David Hildenbrand <david@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] KVM: implement spinlock optimization logic for arm/s390 |
| Date | Mon, 07 Aug 2017 11:00:01 +0200 |
| Message-ID | <ubM3f-5YJ-7@gated-at.bofh.it> (permalink) |
| References | <ubLTz-5V4-11@gated-at.bofh.it> <ubLTB-5V4-35@gated-at.bofh.it> |
| Dmarc-Filter | OpenDMARC Filter v1.3.2 mx1.redhat.com 08A606E809 |
| Authentication-Results | ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com |
| Authentication-Results | ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com |
| Organization | Red Hat GmbH |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Language | en-US |
| Content-Transfer-Encoding | 7bit |
| X-Scanned-By | MIMEDefang 2.79 on 10.5.11.11 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 07 Aug 2017 08:52:13 +0000 (UTC) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 57 |
| X-Original-Cc | 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 |
| X-Original-Date | Mon, 7 Aug 2017 10:52:07 +0200 |
| X-Original-Message-ID | <c3db20bd-aa38-f0d1-30d3-dbcbe85e2688@redhat.com> |
| X-Original-References | <1502095466-21312-1-git-send-email-longpeng2@huawei.com> <1502095466-21312-4-git-send-email-longpeng2@huawei.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1705265 |
Show key headers only | View raw
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?)
--
Thanks,
David
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] KVM: optimize the kvm_vcpu_on_spin "Longpeng(Mike)" <longpeng2@huawei.com> - 2017-08-07 10:50 +0200
[PATCH 3/3] KVM: implement spinlock optimization logic for arm/s390 "Longpeng(Mike)" <longpeng2@huawei.com> - 2017-08-07 10:50 +0200
Re: [PATCH 3/3] KVM: implement spinlock optimization logic for arm/s390 David Hildenbrand <david@redhat.com> - 2017-08-07 11:00 +0200
Re: [PATCH 3/3] KVM: implement spinlock optimization logic for arm/s390 "Longpeng (Mike)" <longpeng2@huawei.com> - 2017-08-07 11:00 +0200
[PATCH 1/3] KVM: add spinlock-exiting optimize framework "Longpeng(Mike)" <longpeng2@huawei.com> - 2017-08-07 10:50 +0200
Re: [PATCH 1/3] KVM: add spinlock-exiting optimize framework David Hildenbrand <david@redhat.com> - 2017-08-07 11:00 +0200
Re: [PATCH 1/3] KVM: add spinlock-exiting optimize framework "Longpeng (Mike)" <longpeng2@huawei.com> - 2017-08-07 11:10 +0200
csiph-web