From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91857C07E96 for ; Tue, 6 Jul 2021 22:51:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B0EF61C91 for ; Tue, 6 Jul 2021 22:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbhGFWxm (ORCPT ); Tue, 6 Jul 2021 18:53:42 -0400 Received: from mga18.intel.com ([134.134.136.126]:31331 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhGFWxl (ORCPT ); Tue, 6 Jul 2021 18:53:41 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="196488367" X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="196488367" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 15:50:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="627825471" Received: from gupta-dev2.jf.intel.com (HELO gupta-dev2.localdomain) ([10.54.74.119]) by orsmga005.jf.intel.com with ESMTP; 06 Jul 2021 15:50:53 -0700 Date: Tue, 6 Jul 2021 15:51:27 -0700 From: Pawan Gupta To: Eduardo Habkost Cc: Thomas Gleixner , Borislav Petkov , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , x86@kernel.org, "H. Peter Anvin" , "Paul E. McKenney" , Randy Dunlap , Andrew Morton , "Maciej W. Rozycki" , Viresh Kumar , Vlastimil Babka , Tony Luck , Paolo Bonzini , Sean Christopherson , Kyung Min Park , Fenghua Yu , Ricardo Neri , Tom Lendacky , Juergen Gross , Krish Sadhukhan , Kan Liang , Joerg Roedel , Victor Ding , Srinivas Pandruvada , Brijesh Singh , Dave Hansen , Mike Rapoport , Anthony Steinhauser , Anand K Mistry , Andi Kleen , Miguel Ojeda , Nick Desaulniers , Joe Perches , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 4/4] x86/tsx: Add cmdline tsx=fake to not clear CPUID bits RTM and HLE Message-ID: <20210706225127.kyn7amrln6ydfcig@gupta-dev2.localdomain> References: <20210706195233.h6w4cm73oktfqpgz@habkost.net> <20210706211606.ezme3xvwztagbjqy@gupta-dev2.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 06.07.2021 17:19, Eduardo Habkost wrote: >On Tue, Jul 6, 2021 at 5:15 PM Pawan Gupta > wrote: >> >> On 06.07.2021 15:52, Eduardo Habkost wrote: >> >On Wed, Jun 09, 2021 at 02:14:39PM -0700, Pawan Gupta wrote: >> >> On CPUs that deprecated TSX, clearing the enumeration bits CPUID.RTM and >> >> CPUID.HLE may not be desirable in some corner cases. Like a saved guest >> >> would refuse to resume if it was saved before the microcode update >> >> that deprecated TSX. >> > >> >Why is a global option necessary to allow those guests to be >> >resumed? Why can't KVM_GET_SUPPORTED_CPUID always return the HLE >> >and RTM bits as supported when the host CPU has them? >> >> Yes, the global option is unnecessary and this patch was dropped in v2. > >Was the behaviour this patch originally tried to fix changed in v2 as >well? Is it going to be possible to resume a HLE=1,RTM=1 VM on a >TSX_FORCE_ABORT=1 host with no extra kernel command line options >needed? The problem it tried to solve is still present, but the global switch was thought to be unnecessary. I see that Paolo has some suggestions to fix this in the userspace. Thanks, Pawan