Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7517201ybp; Wed, 16 Oct 2019 09:49:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7ALsyuUpfSR+1Q3DD10WwQusbkzsApsVHguzxaS/TwNF/Qhp5H7sF5doAZYFMeb7FGc70 X-Received: by 2002:a50:d615:: with SMTP id x21mr40630516edi.297.1571244556810; Wed, 16 Oct 2019 09:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571244556; cv=none; d=google.com; s=arc-20160816; b=h9Uub1FEBELTWw511APdQrVYxRXSrX8JKtB5tWcrmSicweIq4DUja7blPzJVSEtuYe 6daHOqpsyv9og7nMGnBbWuVH8WohRznzs9AKZlFY5Csjo/s4PsldMWlMpLfVZcrF3kj8 9MiyFJVcg07gERMM8+E01M4CppKptPRbXGWVYM6ZaaheWTn30GC4uPkOz8khU4/Q6O61 EFAnHX4aml9ULtfzYSsNlF6dqt9za2W+xf9pWuR2X/Y7ZSPDKa/K5J1uiUEqaegf9q3u kwRxgczaOHdRZFxVoaLBS5e2qhlsGu8y3ZpqY0Ouft4n8ykb9vpZLvv9RBhzKdpxg3p5 281Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=L9kHwajoOQqsipjbcfGAWaECbNC0wjnyCVqAQHza7VU=; b=T+4wc740OlLLQ7ZM6oaxfy9tS7IoMM/xkfe6L39t7OpYnpqH11KpbZTG5sx7eXSu3m 4Lpu98fkTI42YaxnkLAlTzVw6JER/6cAByOWTvjaGgwjEuOCZB4aKqywdq5v4LZ8pQ79 mvQbnySCLxD5xQHzpUZeXy2+bU7izeEILxnTsB7c1YtFNFu59m+AflN6CtoAgUmAVQ7z QFaeHNqIK8zCU1jCyYf6o4/iHj5WjE6kx5rjoQv1tofhQGgWU0ij7yY7fpPYluwnee9I NTyIJ4+8Vde6ryAhMxzcuMPtAvUChef0OnyujHcqJlXBno1lHQEVA2LiVmRge2IKBz6x YF/A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si14728931eju.156.2019.10.16.09.48.53; Wed, 16 Oct 2019 09:49:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393482AbfJPPDc (ORCPT + 99 others); Wed, 16 Oct 2019 11:03:32 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50517 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbfJPPDb (ORCPT ); Wed, 16 Oct 2019 11:03:31 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iKkpa-0007KE-6E; Wed, 16 Oct 2019 17:03:18 +0200 Date: Wed, 16 Oct 2019 17:03:17 +0200 (CEST) From: Thomas Gleixner To: David Laight cc: 'Paolo Bonzini' , Xiaoyao Li , Sean Christopherson , Fenghua Yu , Ingo Molnar , Borislav Petkov , H Peter Anvin , Peter Zijlstra , Andrew Morton , Dave Hansen , Radim Krcmar , Ashok Raj , Tony Luck , Dan Williams , Sai Praneeth Prakhya , Ravi V Shankar , linux-kernel , x86 , "kvm@vger.kernel.org" Subject: RE: [PATCH v9 09/17] x86/split_lock: Handle #AC exception for split lock In-Reply-To: <053924e2d08b4744b9fd10337e83ab2d@AcuMS.aculab.com> Message-ID: References: <1560897679-228028-1-git-send-email-fenghua.yu@intel.com> <1560897679-228028-10-git-send-email-fenghua.yu@intel.com> <20190626203637.GC245468@romley-ivt3.sc.intel.com> <20190925180931.GG31852@linux.intel.com> <3ec328dc-2763-9da5-28d6-e28970262c58@redhat.com> <57f40083-9063-5d41-f06d-fa1ae4c78ec6@redhat.com> <3a12810b-1196-b70a-aa2e-9fe17dc7341a@redhat.com> <053924e2d08b4744b9fd10337e83ab2d@AcuMS.aculab.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Oct 2019, David Laight wrote: > For the smt case, can you make #AC enable a property of the process? > Then disable it on the core if either smt process requires it be disabled? That would be feasible if the logic of the TEST_CTRL_MSR would be AND, but it's OR. Thread0 #AC-EN Thread1 #AC-EN #AC enabled on core 0 0 0 1 0 1 0 1 1 1 1 1 So in order to do flips on VMENTER you'd need to IPI the other thread and handle all the interesting corner cases. The 'Rescue SMT' mitigation stuff on top of core scheduling is ugly enough already, but there the state can be transitionally 'unmitigated' while with #AC you run into trouble immediately if the transitional state is ON at the wrong point. Thanks, tglx