From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D4333ACA74 for ; Wed, 14 Jan 2026 22:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768428446; cv=none; b=EWq8DRzgGzP71U0mFppa9KvbeQnqj+Bl6dJ9z031SfW5axM2NLo2GEIQ65BIS4zLI3gTRQSB/FFi69IS/MQfZ1/O5yOJbxJhoaQ5lvBCz3co7KWlviSVHNxgbrfgva1ea6H/Uwt3M0jVHSB/Eq9LCtZFNLN9XnjhK1q3IW17w08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768428446; c=relaxed/simple; bh=ElI84M0BIOSftAGLVaXtQEldUGCc1BnYArgvHMyYoKk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=N2jFuGB3FZWvJwQbz+HTWYo6mu/3fkpkkMUNx6OPb2dvI9I+hKJpQpLvFeIhUpyk+BSsrPlAQ0ZF3TitQHwGrHS1BWGgKxBXG+rjT37LbwPD7irXtsDA/AOmiJJ521Gn+XTdjlE2qWqTf7agWS4vBR2NA0S2WFePilyffTeGXZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lggvkHTT; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lggvkHTT" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-29f2381ea85so6786665ad.0 for ; Wed, 14 Jan 2026 14:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768428432; x=1769033232; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=DATGHMH+tRYW0PdOYhPY0pT6PT3USRJNw+EAenWZUkM=; b=lggvkHTTXWatg+m8O6ODY7bpqmWLFpEhqIZIHVjHdZN98ybVpa1ArteiwNiXMFcQoD i4Cs0YTeIgmVgvO3Y7nkTrfoZA63OQ1j4tWmNj43jtXloU85CvPUmLs3aaaUdHfvGNOw 2r4Tts2+MHVSvy6uhb6CDt/pbXDSsrV0sqx7zIKCGQEnuIZc7DGTuGIHXu4tWqmzvjtE W/Fu4HQurj8e3pZGOpgN5O1yNG0+ADSObWz64MLd3HqNBFX33aUSptlNXlWgYn9nGocU w8YNCLO0S+NlcT6RPT08RoLxtymf8KdHA7E4P+36/FVywHXEkSAgA6w7cKkhSZyxaZTf 2M7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768428432; x=1769033232; 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=DATGHMH+tRYW0PdOYhPY0pT6PT3USRJNw+EAenWZUkM=; b=WP5dn6CrFgAFI69lIbvNxf7rHNoVG0+jJIwmjQ6At/ySwzbsxllKlk4limHzR8L+eQ H+l6wb56yH6uOT92ym23CGwbjGweGIV8LaZ05gMMqRMWo5w+dcw8cZDJPm83edihp52r oLMNTU8TxyOBOjDR2YDoSBrCP64ZkJaTffQMBb3jQCJ8yQXUBiprDB3Vu1EwCkElHb0x wxX8nlqvk7hLk6Vwh4q6vkVmITtsRSFVGNZAgItZcROuW9NcmnJem3NEU2Xo7OU8RTZy ETUMZzQtqqoC1zzRGJQjSp0MgIw2bC2xIZa8LV/r1LPVblKk5AhqRTJxS5M7pYeDzVqz VEVw== X-Forwarded-Encrypted: i=1; AJvYcCX+4RzyT4BD6hJa3d9B6teNlbLnoTJNgPNxHJi1GHYU/u5nZCLFhgqUo6rzh25dj7MFg18Lt3CaKTLD3NE=@vger.kernel.org X-Gm-Message-State: AOJu0YwmHYlnUkE6mtLa1u0+Qpn1ori1iq9ZduYZl2ZjcKS5h7y6+zvw Gr+5MlWd8C/tVN97+MO1Bjm+2I5+Gdq3PLKoES/Qvt2D5jOaRkcr2lgzHRjKklUFCBlIzIffMPo FU97X1w== X-Received: from plqs2.prod.google.com ([2002:a17:902:a502:b0:2a5:8c4f:4c6d]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:e78b:b0:29d:65ed:f481 with SMTP id d9443c01a7336-2a599cbac4bmr36340125ad.0.1768428431740; Wed, 14 Jan 2026 14:07:11 -0800 (PST) Date: Wed, 14 Jan 2026 14:07:10 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251215192722.3654335-1-yosry.ahmed@linux.dev> <3rdy3n6phleyz2eltr5fkbsavlpfncgrnee7kep2jkh2air66c@euczg54kpt47> Message-ID: Subject: Re: [PATCH] KVM: SVM: Fix redundant updates of LBR MSR intercepts From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Mon, Dec 15, 2025, Yosry Ahmed wrote: > On Mon, Dec 15, 2025 at 11:38:00AM -0800, Sean Christopherson wrote: > > On Mon, Dec 15, 2025, Yosry Ahmed wrote: > > > On Mon, Dec 15, 2025 at 07:26:54PM +0000, Yosry Ahmed wrote: > > > > svm_update_lbrv() always updates LBR MSRs intercepts, even when they are > > > > already set correctly. This results in force_msr_bitmap_recalc always > > > > being set to true on every nested transition, essentially undoing the > > > > hyperv optimization in nested_svm_merge_msrpm(). > > > > > > > > Fix it by keeping track of whether LBR MSRs are intercepted or not and > > > > only doing the update if needed, similar to x2avic_msrs_intercepted. > > > > > > > > Avoid using svm_test_msr_bitmap_*() to check the status of the > > > > intercepts, as an arbitrary MSR will need to be chosen as a > > > > representative of all LBR MSRs, and this could theoretically break if > > > > some of the MSRs intercepts are handled differently from the rest. > > > > > > > > Also, using svm_test_msr_bitmap_*() makes backports difficult as it was > > > > only recently introduced with no direct alternatives in older kernels. > > > > > > > > Fixes: fbe5e5f030c2 ("KVM: nSVM: Always recalculate LBR MSR intercepts in svm_update_lbrv()") > > > > Cc: stable@vger.kernel.org > > > > Signed-off-by: Yosry Ahmed > > > > > > Sigh.. I had this patch file in my working directory and it was sent by > > > mistake with the series, as the cover letter nonetheless. Sorry about > > > that. Let me know if I should resend. > > > > Eh, it's fine for now. The important part is clarfying that this patch should > > be ignored, which you've already done. > > FWIW that patch is already in Linus's tree so even if someone applies > it, it should be fine. Narrator: it wasn't fine. Please resend this series. The base-commit is garbage because your working tree was polluted with non-public patches, I can't quickly figure out what your "real" base was, and I don't have the bandwidth to manually work through the mess. In the future, please, please don't post patches against a non-public base. It adds a lot of friction on my end, and your series are quite literally the only ones I've had problems with in the last ~6 months.