Received: by 10.223.164.202 with SMTP id h10csp84429wrb; Thu, 30 Nov 2017 07:18:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMZXdKnF4EbSNlDNcB9exBFw4c/pV2qvu+eBbpPQr4S3SPn0EIAYCVOUBcAchagUYbURULd6 X-Received: by 10.101.90.199 with SMTP id d7mr2641272pgt.265.1512055083032; Thu, 30 Nov 2017 07:18:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512055083; cv=none; d=google.com; s=arc-20160816; b=mBekaKImof6ogB9xW+ANjB2EBKplOCOkf3jEGofT0UVJg5cdcPTACmEWR4pE+SlNO9 poo2ke5eFe3eWbOKgJw96i5rC5XEvky5ZAQsErjX5cKZWAInYKipKDnJ0IUNUAxW4274 mOrcDyLroQEuLicl/mh0FjW4Vx4WTBHQcoVPlUwhIgHcRIAmnJIIVb+ONzqPv3Ae9uI2 8DTRTVaS8QG7moObJIWRhmZGvRx4ddO6ukooIYKosIXdN+CSTEwix/KTBQm+pQmZFBfX hxNttIcgap2kDILemzJanBGmUWGGo7DCdz+oHUZ45ykg7dvbrSV6/s08D1YC/TkOa6Rp WuUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=JUl4al+5lOdHmHU4JClBHcpWzAQWhV84qqAJDeUUYXI=; b=CLv8IZ0uOxvSXLWjB85TDi2qeYd1DY3BB0U+JOnzXbIg4qQaGfXBN/8Q8IZL4Y09Zj Ile6nBExrxCtR9/+qUQJGu1ohkH8jfpTDsX3F9a/wucCePeeqiujsMTo3Bja8S/dUSBs vnY7UImHJV4XG68lC3BJHCygb5DDc9iepq5HcuHFcaFcCIyKJ930PSkdD7Nfmo1BBsn+ 9K1naDwXBdCqnXdNn/mxsb87oysbJ2KCiBUWIvlrYsxqSW7MfADDEKjWOdJqqTTBXq7G /UR5EWLRxPDYtrBYgW8JIBNvN2EWXJd9L8D7cywdCGyv3jCITTmHC94ZXNMBOi2m6X+Q bnGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n82si3401075pfb.222.2017.11.30.07.17.36; Thu, 30 Nov 2017 07:18:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014AbdK3PRW (ORCPT + 99 others); Thu, 30 Nov 2017 10:17:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750742AbdK3PRV (ORCPT ); Thu, 30 Nov 2017 10:17:21 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A8E082101; Thu, 30 Nov 2017 15:17:21 +0000 (UTC) Received: from flask (ovpn-204-21.brq.redhat.com [10.40.204.21]) by smtp.corp.redhat.com (Postfix) with SMTP id DC308620AB; Thu, 30 Nov 2017 15:17:17 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Thu, 30 Nov 2017 16:17:16 +0100 Date: Thu, 30 Nov 2017 16:17:16 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Wanpeng Li Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Peter Zijlstra , Wanpeng Li Subject: Re: [PATCH v7 2/4] KVM: X86: Add Paravirt TLB Shootdown Message-ID: <20171130151715.GB1399@flask> References: <1512021674-9880-1-git-send-email-wanpeng.li@hotmail.com> <1512021674-9880-3-git-send-email-wanpeng.li@hotmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1512021674-9880-3-git-send-email-wanpeng.li@hotmail.com> 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]); Thu, 30 Nov 2017 15:17:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-29 22:01-0800, Wanpeng Li: > From: Wanpeng Li > --- > 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. From 1585476718930220346@xxx Thu Nov 30 07:53:46 +0000 2017 X-GM-THRID: 1585469692856919567 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread