From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Wanpeng Li <wanpeng.li@hotmail.com>
Subject: Re: [PATCH v7 2/4] KVM: X86: Add Paravirt TLB Shootdown
Date: Thu, 30 Nov 2017 16:17:16 +0100 [thread overview]
Message-ID: <20171130151715.GB1399@flask> (raw)
In-Reply-To: <1512021674-9880-3-git-send-email-wanpeng.li@hotmail.com>
2017-11-29 22:01-0800, Wanpeng Li:
> From: Wanpeng Li <wanpeng.li@hotmail.com>
> ---
> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> @@ -498,6 +498,34 @@ static void __init kvm_apf_trap_init(void)
> update_intr_gate(X86_TRAP_PF, async_page_fault);
> }
>
> +static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask);
> +
> +static void kvm_flush_tlb_others(const struct cpumask *cpumask,
> + const struct flush_tlb_info *info)
> +{
> + u8 state;
> + int cpu;
> + struct kvm_steal_time *src;
> + struct cpumask *flushmask = this_cpu_cpumask_var_ptr(__pv_tlb_mask);
> +
> + cpumask_copy(flushmask, cpumask);
Is it impossible to call this function before the allocation?
I was guessing that early_initcall might allow us to avoid a (static)
condition as there is no point in calling when there are no others, but
expected the worst ...
thanks.
next prev parent reply other threads:[~2017-11-30 15:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 6:01 [PATCH v7 0/4] KVM: X86: Add Paravirt TLB Shootdown Wanpeng Li
2017-11-30 6:01 ` [PATCH v7 1/4] KVM: X86: Add vCPU running/preempted state Wanpeng Li
2017-11-30 6:01 ` [PATCH v7 2/4] KVM: X86: Add Paravirt TLB Shootdown Wanpeng Li
2017-11-30 7:53 ` Wanpeng Li
2017-11-30 15:17 ` Radim Krčmář [this message]
2017-12-01 0:55 ` Wanpeng Li
2017-11-30 6:01 ` [PATCH v7 3/4] KVM: X86: introduce invalidate_gpa argument to tlb flush Wanpeng Li
2017-11-30 6:01 ` [PATCH v7 4/4] KVM: X86: Add flush_on_enter before guest enter Wanpeng Li
2017-12-05 11:36 ` [PATCH v7 0/4] KVM: X86: Add Paravirt TLB Shootdown Wanpeng Li
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=20171130151715.GB1399@flask \
--to=rkrcmar@redhat.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=wanpeng.li@hotmail.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