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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE2CEC3DA6F for ; Fri, 25 Aug 2023 18:21:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbjHYSU3 (ORCPT ); Fri, 25 Aug 2023 14:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbjHYSUX (ORCPT ); Fri, 25 Aug 2023 14:20:23 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0663EC for ; Fri, 25 Aug 2023 11:20:20 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-1bf703dd1c0so13113305ad.0 for ; Fri, 25 Aug 2023 11:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692987620; x=1693592420; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=EQn+lc9Zn9XQ9J939oDe/ZcA4NWd+xpmQ6kTnC/ITQA=; b=ws86JAcoda3XzSJO73gtptr9My13oPIx4loG2uk2nrWH0yQfh8pP3Mt0W2hurKkT7Q IcauStdfn5PQrQeCAuEQIM8Imchqal5U9z8CZthlhD961TzbImZbqgomYawc4bwJYkBG TFGkEiR2H53dtHyBE1+mvxk+62OZaVTncwQued3b/qYxtsPy/DtpZX3nPulhQ7HfuH4T yQs4++FqjC83WknrI7WaWu4apuivDC4YOacvcstDPn/NyFcBs3VKhQSUZK1gTT05068J Q5mDumIDx//Mj0IxZl/2yUmceN1KzWBXhR69APL+iDg8WV77/kLsLbLPbLZHgdb15m8B elPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692987620; x=1693592420; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EQn+lc9Zn9XQ9J939oDe/ZcA4NWd+xpmQ6kTnC/ITQA=; b=DRNswaDH1BjRmXRiCY/cfXRdOAC9aSvkb0cCw30mUOwmMYHN4FnwLY7i1ZRy9+UKQ8 18fHJFSK/IrWVnwDRPzqBgGBLZYaPtnKOVqcCmxzwLgCjgJbNy3RPckBMcfhAH+Ybw/c 5sV6oiShHlZoSrZZFkFN8oLjpR/b+o9pvgHYii8wFRl1j+ptDapCJ2aNe9DH/A2lnzhH xx65Ctbl/IrXy0yXw5uxlBxgfDv8DFXtdFcJS85tOCMCMX/ajq6UQRelw5eGQSrTkT6w nz0CfRdsaxaIQOT6PPvl9f1U02U8+jH81qKaU9Qm4MdrkE9KQ5udnZ/oYvm5ysS6lDTa qSKA== X-Gm-Message-State: AOJu0Ywcbe9q5fYrvVrQSBmxzcCWx/LIgBoqnPU/2W4xjUnGgGc8r3XN Kl0elYS1/BHsZ65sbCgF/mUJ73KYfIk= X-Google-Smtp-Source: AGHT+IHaZkT3UCDUR4FJK+7KkAqvSQP4EsmwBiNQCBQNc/ZUnLKehyozd6tfrcwQ56d65v2f7hjd0Qzf2UE= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:903:234e:b0:1b8:80c9:a98e with SMTP id c14-20020a170903234e00b001b880c9a98emr6970330plh.13.1692987620459; Fri, 25 Aug 2023 11:20:20 -0700 (PDT) Date: Fri, 25 Aug 2023 11:20:18 -0700 In-Reply-To: Mime-Version: 1.0 References: Message-ID: Subject: Re: [PATCH 05/23] KVM: x86: Add SBPB support From: Sean Christopherson To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , Peter Zijlstra , Babu Moger , Paolo Bonzini , David.Kaplan@amd.com, Andrew Cooper , Nikolay Borisov , gregkh@linuxfoundation.org, Thomas Gleixner Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 25, 2023, Josh Poimboeuf wrote: > Add support for the AMD Selective Branch Predictor Barrier (SBPB) by > advertising the CPUID bit and handling PRED_CMD writes accordingly. Same as the other patch, please call out that not doing the "standard" F(SBPB) is intentional, e.g. Note, like SRSO_NO and IBPB_BRTYPE before it, advertise support for SBPB even if it's not enumerated by in the raw CPUID. Some CPUs that gained support via a uCode patch don't report SBPB via CPUID (the kernel forces the flag). And again, feel free to take this through tip if this should go in 6.6. Turns out our Milan systems have the SBPB fun, so I was able to actually test this, including the emulated WRMSR handling (KVM allows forcing emulation via a magic prefix). I have a KVM-Unit-Test patch that I'll post next week. Thanks Josh! Acked-by: Sean Christopherson > Co-developed-by: Sean Christopherson > Signed-off-by: Sean Christopherson > Signed-off-by: Josh Poimboeuf