Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1605442
| Path | csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.szaf.org!news.unit0.net!news.panservice.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | David Hildenbrand <david@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 3/3] KVM: x86: correct async page present tracepoint |
| Date | Tue, 21 Mar 2017 10:00:02 +0100 |
| Message-ID | <tnnO2-Sm-19@gated-at.bofh.it> (permalink) |
| References | <tnjAJ-6z6-5@gated-at.bofh.it> <tnjAJ-6z6-9@gated-at.bofh.it> |
| X-Original-To | Wanpeng Li <kernellwp@gmail.com>, linux-kernel@vger.kernel.org, kvm@vger.kernel.org |
| Dmarc-Filter | OpenDMARC Filter v1.3.2 mx1.redhat.com 24FFAC04B946 |
| Authentication-Results | ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com |
| Authentication-Results | ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=david@redhat.com |
| Dkim-Filter | OpenDKIM Filter v2.11.0 mx1.redhat.com 24FFAC04B946 |
| Organization | Red Hat GmbH |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Scanned-By | MIMEDefang 2.79 on 10.5.11.16 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 21 Mar 2017 08:57:10 +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 | 55 |
| X-Original-Cc | Paolo Bonzini <pbonzini@redhat.com>, Radim Krčmář <rkrcmar@redhat.com>, Wanpeng Li <wanpeng.li@hotmail.com> |
| X-Original-Date | Tue, 21 Mar 2017 09:57:07 +0100 |
| X-Original-Message-ID | <d6c2bf41-15f3-5ac6-56fe-d5cc3aea1572@redhat.com> |
| X-Original-References | <1490069935-6232-1-git-send-email-wanpeng.li@hotmail.com> <1490069935-6232-3-git-send-email-wanpeng.li@hotmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1605442 |
Show key headers only | View raw
On 21.03.2017 05:18, Wanpeng Li wrote:
> From: Wanpeng Li <wanpeng.li@hotmail.com>
>
> After async pf setup successfully, there is a broadcast wakeup w/ special
> token 0xffffffff which tells vCPU that it should wake up all processes
> waiting for APFs though there is no real process waiting at the moment.
>
> The async page present tracepoint print prematurely and fails to catch the
> special token setup. This patch fixes it by moving the async page present
> tracepoint after the special token setup.
>
> Before patch:
>
> qemu-system-x86-8499 [006] ...1 5973.473292: kvm_async_pf_ready: token 0x0 gva 0x0
>
> After patch:
>
> qemu-system-x86-8499 [006] ...1 5973.473292: kvm_async_pf_ready: token 0xffffffff gva 0x0
>
Wonder if there is a reason why this is traced before any work is done.
Maybe we should keep that order (by breaking up the if-else).
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Radim Krčmář <rkrcmar@redhat.com>
> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
> ---
> arch/x86/kvm/x86.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 1faf620..e27eb7f 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -8566,11 +8566,11 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu,
> {
> struct x86_exception fault;
>
> - trace_kvm_async_pf_ready(work->arch.token, work->gva);
> if (work->wakeup_all)
> work->arch.token = ~0; /* broadcast wakeup */
> else
> kvm_del_async_pf_gfn(vcpu, work->arch.gfn);
> + trace_kvm_async_pf_ready(work->arch.token, work->gva);
>
> if ((vcpu->arch.apf.msr_val & KVM_ASYNC_PF_ENABLED) &&
> !apf_put_user(vcpu, KVM_PV_REASON_PAGE_READY)) {
>
--
Thanks,
David
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/3] KVM: nVMX: Fix nested VPID vmx exec control Wanpeng Li <kernellwp@gmail.com> - 2017-03-21 05:30 +0100
[PATCH v2 3/3] KVM: x86: correct async page present tracepoint Wanpeng Li <kernellwp@gmail.com> - 2017-03-21 05:30 +0100
Re: [PATCH v2 3/3] KVM: x86: correct async page present tracepoint David Hildenbrand <david@redhat.com> - 2017-03-21 10:00 +0100
Re: [PATCH v2 1/3] KVM: nVMX: Fix nested VPID vmx exec control Paolo Bonzini <pbonzini@redhat.com> - 2017-03-21 17:30 +0100
csiph-web