[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17 3/4] amd/ssbd: remove hypervisor SSBD selection
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Fri, 14 Oct 2022 10:17:59 +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=SlnNNg6TyD5S9ZbHSyaEVYakE2qCZoQhS55Ro3auFTc=; b=I3xj0ZhB21SXFolg/5+TefRLAsflrP3k8+ZKcT6aa/XxVANVzUV0D1HWTXoMJgFfXpQmEV8omeo3Y6QjXxXGSrJvMCP5Aar665WTbBtDaWbLyu2SHCWuYfg5Fw4+fDCyy/aJjwOQJza9k2hk8OidjIw51NXZ47i3mNZj17EmiMdCAJqbzkCsGjOI+sXpe+6E+zxa2oxA60Y+KXv4QbclTqdRgfG2Antk33nSnZdUZrTbKgtAqJxrLHep13WqyyW3BpF145uOuhW+7vWvIDssjBb7eTDyqCHYaq8YOByd2Y02MACFxhZQd7rJfSJgUfDH2QEHrHgpwhDpkLZSjjhZkw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IhKHrYg2oBBOysni504evTu4cz/P6+mO1Y6t24sptElJ1tVve/YSlt5xC8QyD8CKTflim0IKqDJuom1CQ5uBGyUV6TnkGE/D78kMKwNgFveIjvCHJyTPrEDQVEG/z/ggcvD/tsMloM6xf4H+SXKCsvyyzAxcofLMulHB0sfyAEguWmczeWMLZL1hlvHhtxSbHMzwStq887AfOeQ6AYcgpsmEe3eFkZ2fDb3Cp+w8ldnCioeMTeFpqynzcjaAwmHtnDMVQoq5+0qhvgdlxy7DjVyqONacwGMRrmxE7ckOpIi4RSfT7LmOA1OVuwLGCzOX56HL5NOwSmCtMFtE9bsTsw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Henry.Wang@xxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 14 Oct 2022 08:18:17 +0000
- Ironport-data: A9a23:Gwi9+qimyW/++j4BdbAoKco8X17brhtdWV5mu6ucuGbUl+iq9fh2pTMDcFHA35ufnh6Jk+R9yDHLOZikrGOzboqUZ7KlaGJhR0l5uglbU/B30HVF8LDmH4j3m4S3p2kRb3rQKsyNEE36syHTNfqalk688f8NVj5fV+GWd1ZQKN4p/ju1B2oyEBVmzF9Hutc95u7GD/nNscv9DWiYHx+EgqHaLzFPIddPzukIWmGu+60GRFH6EYfVnXWu1LbpUJXr2c9Cs5W1GXHsXqv2CUJ1BP5kyK7MxigM0fPW5cofyO6o8Plqx2lnBGrmTE4zQaySS7KAtcQtWSUBgOJLvGnolsRGmx0m9/hM7SQWMWUz7/gcI+OzBQHs/h2FZgt7vA5rcOXNZCF2jfl0ufzyPPZV/jOLe46eE7/5o29wNXEkylX3cDQKjEtCW8Zk0aaroFehplQt3DJwHOCdv8TsawgxCy56n/suSk+RtctuOyw+Z2zNSwjx5c8NO6ruBS18xj41NZzNTVxzBX4/vp3hChoqrFBZiyhTUMXk/G7wY3Ndaq/iFRXFXS9G91TEjRqI88dRh4x3uCS/H0dVjwLGjqhZ/9yjNs8wt3ZFM75VMt0Wj/D8EI4PR9Ye33rqnfcsIIDpZl9269pc7X6ELxwPZIxt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N2Bi23G6pzQGcPu5TKXvR/T1XaXLfZAXtlLNrBWMCW2Z37yDB0XCex1s6Kg+hXIi+2e6QY7ErikVpRRAVhof5TBzqHQ+YjzafvBACO7t0DkyEFddLoKqN8cot3/VKGcBUB3C/dv48JSMkm3Dy/qqMU/f4L4naMGTeDusAW5V5NtJEffzpjmQQrurb8zKHG07/5N9prCkmbNCkcqJu04zyN/YzvvjOYJU8cd6o3/8zEISxapW66MUlnALa3IyRLnrW3Bm5K3YtFPOEEv12dhiDqXx5YxxuSIQJqubU76hHuJV/483fzbS2guB6TqByH+FXxL6wsdukgQC+e71btBB6IAYiXEoGksftN/SYib9lJBJrJLM7ZorwfodLmnjUw68vRrZ4u80zUBj8AH1eW+y4I6jjX5zZwbyj+k8dusEt0smJC0ykpDk56cgcQwfxa0aLX1UrvR2ecAI0KP+kvjNt+vgwTEXu1wv7dUyVWLHVobMHB2Pjl7pDHWrgUBKdg2T+qFhIBG0q+eX3jg+uRYUffxuYphHK6juwtMR+CF2bDG2/Vy+Qamqc/LGZ8kktbxqgyEOHIkN770SY2z/aUH0gL7BRw0EWG9M14591GbBotnW07cGb+vIrBMKLSa6EIPit42gPVMddo3Axr+96QPeaDCSbDx22Pq0d1cR1bMMpGGSxj1/zQZKEFbzxmTOiJ3zg/BfAvRxf66RKgKmz/ioUMuXjGLHlnJqX7opjRYgmZqCVrY3j+RHMsusuu3lMmqJ5aOlJkgpTT
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Oct 13, 2022 at 04:20:45PM +0200, Jan Beulich wrote:
> On 13.10.2022 15:50, Roger Pau Monné wrote:
> > On Wed, Oct 12, 2022 at 10:30:45AM +0200, Jan Beulich wrote:
> >> On 11.10.2022 18:02, Roger Pau Monne wrote:
> >>> @@ -2365,12 +2365,6 @@ On hardware supporting STIBP (Single Thread
> >>> Indirect Branch Predictors), the
> >>> By default, Xen will use STIBP when IBRS is in use (IBRS implies STIBP),
> >>> and
> >>> when hardware hints recommend using it as a blanket setting.
> >>>
> >>> -On hardware supporting SSBD (Speculative Store Bypass Disable), the
> >>> `ssbd=`
> >>> -option can be used to force or prevent Xen using the feature itself.
> >>
> >> Why would we want to take away this level of control? Shouldn't we turn
> >> this
> >> on while in Xen if so requested? Which would then either mean enabling it
> >> on
> >> VMEXIT if a guest has it off, or running with it turned on using the OR of
> >> guest and host settings.
> >
> > Right, but then we need to context switch the value on vm{entry,exit}
> > which is problematic. I could move the context switch code code out
> > of the GIF=0 region, and assume that NMIs executing with the guest
> > selection of SSBD are OK.
> >
> > Alternatively setting ssbd= on the command line could be taken as a
> > value to enforce for the whole system and prevent guest attempts to
> > change it, not exposing VIRT_SSBD, AMD_SSBD or SSBD (haven't
> > looked at whether not exposing the SSBD CPUID related to
> > SPEC_CTRL.SSBD will have impact on other features).
>
> That would be my preference (albeit I'm uncertain about the "not exposing"
> part, as we don't want to misguide guests into thinking they're unsafe or
> can't guarantee safety when requested by user mode code), but ...
For ssbd=1 we could expose the SSBD controls, as the guest trying to
turn it off would have no effect and it would still be protected.
OTOH if the user sets ssbd=0 on the command line then exposing the
SSBD controls to the guest would be misleading, as the guest setting
SSBD will have no effect and thus it won't be protected when it thinks
it is.
Thanks, Roger.
|