Received: by 10.213.65.68 with SMTP id h4csp261180imn; Sat, 24 Mar 2018 21:22:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELtLeBXt+PK2seziEyZzeTUOdeIeKUKbAmLE7BIPhFRH2dzPLmSNpB6P1c834v8g40ASiaik X-Received: by 10.101.82.203 with SMTP id z11mr25222438pgp.245.1521951723700; Sat, 24 Mar 2018 21:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521951723; cv=none; d=google.com; s=arc-20160816; b=q2Dv4/THzln7YCG4eqkR9onoYAZVkoU49ZxEbk3RVpVYuk7t66Tj9NSwnngG4pItYn A68XQAalKXGJevu/72PbpFvjffNowxssfmfukpI6ePTdYtJBL7EHY1JWY22dyQtw7BnP 4udWYnGxCAmhzcji05vH0eAW1GhlRx0fU7Xv0BBoXL8dZ8M5PcFGlmIhrf7kNfFVuKmY IS8RU7gBSmo7HU1JcxxXF5W3y8rE02pRZhyGaefXxXQ69+BnSE2VQZK2h6Vctn9JyRfB kLHUc+uxULPHmvLbZuxBT6O1/hdMsCG8D6O1ZjlZZXeaDpz245PySkXbFi5s1BE/TekS ruJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=d+JTVYasm6nTfh1FtfmQgqo+2hI4UpTDDBgFoC8avk4=; b=i70ejLHMZyEjl/qnFzRrdiYPOdmm7usDuUj6aonyHUIKOZcSHyNgaZ5HeyjoO0jWLh ZMm/PMCMKjQQa9KG4iqFfhI96lfrf4j/hPJ/x9DJ+S9t0NXiyW8MT238u7kbQSGf5+hX P1L+ECuo0seZDO66qmA8jpkM7rgttjWY85M+Hvyvx5/QsWEyklbJWVTtmEaweG6lLzk2 7ng71mTgMyM3LFVJZ6mIgUgUm3HJhLKrEE4DiyY4Jt1zN4aTvWrYORK+aPeHFR32qRq+ obUVEHkqY1wy8WEE+paoazEBsNWp4RWjulsMp6zQYX5vKAF2fJGyovSZWhAfbPcannLw 69+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Hhkgj5GQ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si12242344plc.53.2018.03.24.21.21.49; Sat, 24 Mar 2018 21:22:03 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Hhkgj5GQ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbeCYETf (ORCPT + 99 others); Sun, 25 Mar 2018 00:19:35 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:33711 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbeCYETe (ORCPT ); Sun, 25 Mar 2018 00:19:34 -0400 Received: by mail-pl0-f66.google.com with SMTP id c11-v6so9858907plo.0; Sat, 24 Mar 2018 21:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d+JTVYasm6nTfh1FtfmQgqo+2hI4UpTDDBgFoC8avk4=; b=Hhkgj5GQqn2P+A7+iggVmJ1CucHx6g5fZFGV7vdjmXTUAt2Z/z4fQRxAVJYx2cIkWM mY+Ijx2XCAkl8DGsrvctWp+wuG50bzDsqSpnHE7XQ31N0zn/0AYlzfww5zMh2SOUueOz 8j19H7J5Y8pa4krpQ3JWh2EJ6pGrVtidU0Aiz2tgJqV1ZaNdrCcVQLpwVcK7mTHA58kc +zGxVAhSDoJTrzajJWDRVPawPFHkCKkoBIeyOGCWEB5ZHCrk2TAasOotyKrwjfGht3pB A8tA0J84i/6dV3zDLla5h4OvxZH7gIseJAWAYstakk+wBvfzSsjKJazcT+n5AiGMETX6 f7fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d+JTVYasm6nTfh1FtfmQgqo+2hI4UpTDDBgFoC8avk4=; b=gbtIKgjGUBbTk1gvvXxlzrwvVxlZ0IEF/tSmPAA3Qyx2sP7lID/4sVRBxqAPu+97Hj ukaPqd1I0RDySAIhnt/sdZUUUW7TYIZpOhrCckjNz5yG0fv+dtC1M0O/HD5TKMc0PKhG BleJ5i65ATeZNn6/MTettU1W/CAnsk1JutjPxHekEInCr1SpCY0/QWfK/YgITBmp/tOm 9x6rIb2QxGGzvZtzpNFSQxsR+Y4cdrF6D+DVMXN+mpXRRJ2iejuqZM9tow3K2UeI4fkk wrdbWJP5FrybnlBEtHkgiewDQoackbNiCS72DxhWWf/emWnkI/tRIy2JXDGD6fs6JR3Y 60KQ== X-Gm-Message-State: AElRT7HiDWEQu0jVRu2VnCoY9vfzACN1aDgVp3GK8PO5RpMGwWtcQRg2 rlTm7y/SZKycCpVJ39kdjMXdQg== X-Received: by 2002:a17:902:6b85:: with SMTP id p5-v6mr3619913plk.66.1521951573446; Sat, 24 Mar 2018 21:19:33 -0700 (PDT) Received: from localhost.localdomain ([45.248.77.205]) by smtp.googlemail.com with ESMTPSA id a67sm21768894pgc.6.2018.03.24.21.19.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Mar 2018 21:19:32 -0700 (PDT) From: Wanpeng Li X-Google-Original-From: Wanpeng Li To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PATCH 2/2] KVM: X86: Fix disable pv tlb flush when steal time is enabled Date: Sat, 24 Mar 2018 21:18:35 -0700 Message-Id: <1521951515-5139-1-git-send-email-wanpengli@tencent.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wanpeng Li PV TLB FLUSH can be turned on when steal time is enabled. The condition reverse when the patch is sent out for several rounds review by mistake. This patch fixes it. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li --- arch/x86/kernel/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 31ac585..4f859cc 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -555,7 +555,7 @@ static void __init kvm_guest_init(void) if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) && !kvm_para_has_hint(KVM_HINTS_DEDICATED) && - !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) + kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others; if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) @@ -651,7 +651,7 @@ static __init int kvm_setup_pv_tlb_flush(void) if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) && !kvm_para_has_hint(KVM_HINTS_DEDICATED) && - !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { + kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { for_each_possible_cpu(cpu) { zalloc_cpumask_var_node(per_cpu_ptr(&__pv_tlb_mask, cpu), GFP_KERNEL, cpu_to_node(cpu)); -- 2.7.4