[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] x86/spec-ctrl: Knobs for STIBP and PSFD, and follow hardware STIBP hint
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 30 Jun 2022 18:40:37 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cKS1QyhNxme7N0Fa1uomyyNeEeioVy2n4cZCZD/R160=; b=QEwvNrMvs74jVKFtU9pEivfcc18zwp19qMsq+Ol4r4i1Wia3RNvo/5r7qIb4VFLQI5r33ueWJDcSmvjEgnZZYveR/GQ5e73dQS4JYqrD2sCJzUGiG4g/HCoAzq5SR04VJn674q/nznkE/Tf9WbdDYo7Aq0LPR+o1yMOFJFf6z6XL6+N2VZfHVnhdcEYTSwtVEWaYeQBT5Jmq1Qxj6MFlBUhzkQMxQcL4k7CXe1NLaYXfLAMkxZSCLHnznSOzNRDIsrB4e8SH/zYayCa5kw/0HcI/3/11tVwK6kwXMKl0NqO92zjbq6DFxSdbap/gPkw3Z8Wxq7ehCR/gs3k8vGJNrA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IqsAPW1LKZQbYwkzBM7R/EIuIIxNsLV8LjvZ/P8wvVQSKbgtxHoC48ieKd/ws+OYJVXGNr12hqHMsGwIvWEj76nsTWcZd9SQfTUcuG7LqfRcleladwI6zAyxKBH9gnuC7eNGpm0eYiNACiadj3pRwQ8IPp6H/11Yg0Q//S5QGSAGED0LIBmD6G+DM4fTkqevC9l+oRlVYDy7yRYjyxqNu/xgDqZghY3EL4TbXg2aQwSQQZvLa2CETpn1P/U/X+kwSOse92BRq9HJNQNCQfZhvgAQsEg++PrxHmFl+y5ovgUXGJapUuD0sKb1jW2dKkknTuZnFpGvC2UWY2yOKj4/gw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 30 Jun 2022 16:40:51 +0000
- Ironport-data: A9a23:23MFNKxRrhPO9lOZEGR6t+dDxyrEfRIJ4+MujC+fZmUNrF6WrkVWm DBMDz+HOKyDZ2DxeNp1aozloRlVsJ6Gm9U2SVM//iAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX1JZS5LwbZj2NY22oDhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NplhJyKU14WHvX2urojaz9pAwhDJZVI0eqSSZS/mZT7I0zuVVLJmq0rKX5seIoS96BwHH1E8 uEeJHYVdBefiumqwbW9DO5xmsAkK8qtN4Qa0p1i5WiBUbB6HtaeHuOTvYQwMDQY36iiGd7EY MUUc3x3ZQnoaBxTIFYHTpk5mY9Eg1GgLGYI9QrJ/sLb5UDz9yts/YbxOePtWd7WZP9EuEKl/ 2PJqjGR7hYycYb3JSC+2mKhgKrDkD32XKoWFaak7bh6jVuL3GsRBRYKE1yhrpGRqGSzRtZeI Ew84Tc1oO4580nDZsb5dw21pjiDpBF0ZjZLO+gz6QXIz7WO5Q+cXzAAVmQYMIdgs9IqTzs30 FPPh8nuGTFkrLySTzSa66uQqjSxfyMSKAfueBM5cOfM2PG7yKlbs/4FZo8L/HKd5jEtJQzN/ g==
- Ironport-hdrordr: A9a23:Lz0i66xN6G1781FFdJ8pKrPxt+skLtp133Aq2lEZdPULSKGlfp GV9sjziyWetN9wYh4dcB67Scy9qFfnhOZICO4qTMyftWjdyRKVxeRZgbcKrAeBJ8STzJ8/6U 4kSdkFNDSSNykEsS+Z2njeLz9I+rDunsGVbKXlvhFQpGlRGt1dBmxCe2Km+yNNNWt77c1TLu vg2iMLnUvXRV0nKuCAQlUVVenKoNPG0LrgfB49HhYirC2Dlymh5rLWGwWRmk52aUIG/Z4StU z+1yDp7KSqtP+2jjfaym/o9pxT3P/s0MFKCsCggtUcbh/slgGrToJ8XKDqhkF9nMifrHIR1P XcqRYpOMp+r1vXY2GOuBPonzLt1T4/gkWSvGOwsD/Gm4jUVTg6A81OicZyaR3C8Xctu9l6ze Ziw3+Zn4A/N2KNoA3No/zzEz16nEu9pnQv1cQJiWZEbIcYYLhN6aQC4UJuFosaFi6S0vFrLA BXNrCT2B9qSyLaU5iA1VMfgOBEH05DVCtue3Jy9fB8iFNt7TNEJ0hx/r1sop5PzuN+d3B+3Z W0Dk1ZrsAxciYoV9MMOA4ge7rCNoWfe2O6DEuiZXLaKYogB1Xh77bK3ZRd3pDYRHVP9up4pK j8
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Jun 29, 2022 at 07:45:08PM +0100, Andrew Cooper wrote:
> STIBP and PSFD are slightly weird bits, because they're both implied by other
> bits in MSR_SPEC_CTRL. Add fine grain controls for them, and take the
> implications into account when setting IBRS/SSBD.
>
> Rearrange the IBPB text/variables/logic to keep all the MSR_SPEC_CTRL bits
> together, for consistency.
>
> However, AMD have a hardware hint CPUID bit recommending that STIBP be set
> unilaterally. This is advertised on Zen3, so follow the recommendation.
> Furthermore, in such cases, set STIBP behind the guest's back for now. This
> has negligible overhead for the guest, but saves a WRMSR on vmentry. This is
> the only default change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks, Roger.
|