From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 01EC130EF6B for ; Wed, 11 Feb 2026 15:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770824647; cv=none; b=J3hyQaVMGYDu0V7RrvQvJXrCumi2sUdnSEiJf5vXIAcAwZ709VfPAABAcwnoKtwgTuGFE22x32pFcq+MU8SQyzVU87d5XMw0ozZhnsDX4b599pVmQ/de4UTyuR5uRjyBbV5vu+6yTp4sbxeatX8C47MvG228yW1Fwe5SjtYdmGk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770824647; c=relaxed/simple; bh=GvTQ7X1t9rWdwqwmfS4q3q0vgU0V7zXK7RebluAmI78=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BvTn/I+hj8YYer/j8fABR9hEeMntLiWv1tN7oGamiGOO35uZvKkx02qHUvOopA+r4vkCUO1AJGnfKrqM+C8dnxrsLTMwdtn40JgXb7RNOY50RFGWPwHrSmHoBkXd/OXlSlnNhXqwg8/mYJHDICwr0o2fQw02qQ9+dDr+sb/B4fg= 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=2pVArm6Z; arc=none smtp.client-ip=209.85.216.73 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="2pVArm6Z" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-34e5a9de94bso11994384a91.0 for ; Wed, 11 Feb 2026 07:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770824645; x=1771429445; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=GvTQ7X1t9rWdwqwmfS4q3q0vgU0V7zXK7RebluAmI78=; b=2pVArm6ZXhg6cOvytJYzLYYsa9NxDDLEexQPsfOEsbytF/nBS4WBaPv2TpSsunnWLb YQONpF5fOu/g05eBYN3G49kbYdJLkgYZaFo1upQ98HkJsBvqq1hCCuiO971TUvinCwU4 GYuWJSmRVmFOKS0hjByoY9/xNWqEcf5pUwtUMHkG2QyWk6dSMCI//1t1ei6hs2jme8sK zBeM6xhrZ4wCwup+IHCO0iKEPxtkMY1LEb2ziQxEVpJ6B+JkUESjsNLSMpvytmZU9hoj U7U2Z8MX7Uw9/28uHlwfGxljc8GuhFqjKtrimkIdkfdkyKN+OQ799r4UrLbE3jTbyV8Z dC8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770824645; x=1771429445; h=content-transfer-encoding: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=GvTQ7X1t9rWdwqwmfS4q3q0vgU0V7zXK7RebluAmI78=; b=SAKTzua9P8BJh5iNWhwLx6GzNq2wUQhNqytBT8FSaPmy3nBE3xrI9RCGz8qoy8L9/z CndUh6veXT9lcm+kaQjdQr5L7qYkYqPM/tlmuvPs/AMZXwqcFYa8BSFXHhygR1O7fhmR Ypi6SbmTSLm9qcTgY5vb9YO/o9+AaNbaNHxW6BuMmlEXzDuemMUuFKS1K82XTYSZLENi BCi/TcLKGqhDKwolOd51XwxIHGOJ7qxgq3q0dujzOQjqzDcWiASp8CojkXdn6Sjypbzm gqrbVlugmTwVr6Y9RaqAqhhWGvookdh4UUX/ByTZOUQf6TELy1695J1ojpo6Mk7eHlKx yeqA== X-Forwarded-Encrypted: i=1; AJvYcCUXWWC42zFE/KX9u45pvaRq+yn4aHSOo2K04YTmOwpLCeG0wYTRpRGACTvzdB88wcmjCXDV6VY0Y35BwBQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwjrtjehUOzImyvl9W0OKLNGmYn0mTnXi3aWuP6JZvRuvYBq1g8 X943rtVD5p0fRNCARMGELstNDpYQZBtFrdCjg6Z1G4etasjb9blrP5xSjISNpMgcP4GPvZXtVlV aclThNw== X-Received: from pjbsm7.prod.google.com ([2002:a17:90b:2e47:b0:339:e59f:e26]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:278b:b0:356:2c7b:c013 with SMTP id 98e67ed59e1d1-3567b10b67amr2994667a91.29.1770824645221; Wed, 11 Feb 2026 07:44:05 -0800 (PST) Date: Wed, 11 Feb 2026 07:44:03 -0800 In-Reply-To: <5276256b-9669-46df-8fcd-b216f3d3e45b@citrix.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260211102928.100944-1-ubizjak@gmail.com> <2af5e3a8-f520-40fd-96a5-28555c3e4a5e@citrix.com> <20260211134342.45b7e19e@pumpkin> <5276256b-9669-46df-8fcd-b216f3d3e45b@citrix.com> Message-ID: Subject: Re: [PATCH 1/2] KVM: VMX: Drop obsolete branch hint prefixes from inline asm From: Sean Christopherson To: Andrew Cooper Cc: David Laight , ubizjak@gmail.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, pbonzini@redhat.com, tglx@kernel.org, x86@kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 11, 2026, Andrew Cooper wrote: > On 11/02/2026 1:43 pm, David Laight wrote: > > On Wed, 11 Feb 2026 10:57:31 +0000 > > Andrew Cooper wrote: > > > >>> Remove explicit branch hint prefixes (.byte 0x2e / 0x3e) from VMX > >>> inline assembly sequences. > >>> > >>> These prefixes (CS/DS segment overrides used as branch hints on > >>> very old x86 CPUs) have been ignored by modern processors for a > >>> long time. Keeping them provides no measurable benefit and only > >>> enlarges the generated code. =20 > >> It's actually worse than this. > >> > >> The branch-taken hint has new meaning in Lion Cove cores and later, > >> along with a warning saying "performance penalty for misuse". > >> > >> i.e. "only insert this prefix after profiling". > > Don't they really have much the same meaning as before? >=20 > Architecturally yes, microarchitecturally very much not. >=20 > For a branch known to the predictor, there is no effect.=C2=A0 If a branc= h > unknown to the predictor gets decoded, it triggers a frontend flush and > resteer. >=20 > It is only useful for programs large enough to exceed the working set of > the conditional predictor, and for which certain branches are known to > be ~always taken. >=20 > Putting the prefix on a branch that isn't ~always taken is worse than > not having the prefix in the first place, hence the warning. These branches indeed ~always follow the hinted path (not taken in this cas= e). So it sounds like this definitely isn't stable@ material, and maybe even be= gs the question if dropping the hints is a net positive?