[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Intended behavior/usage of SSBD setting


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 20 Oct 2022 13:01:39 +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=abG0llaJ4lf+ZHf60Txqxj+V4pUUt/WOv1efd66UfDg=; b=VnAoF866FJGnOSP/B1nyYWm/+nnPewyVU6q/yEYln7JLqjV32YncXzFWaafbcUFCpnxdr72EqmYfRoehMTtqQdgahst7uEiDMVJcw08TgTRjFfbCtuhZS/CvE5WNnwJbYlGZXO2j0i45GWjCPGR12NWLGMFG1uMbqXIhDB++qPehgY9qAE/0fqybebdFDTIck5I4aZtbZwQZ32AoB2IRzW+xv7NM7tEPCSP7sq6zUh3kNpmu0Fku6F/qisK9KW9cqYlBhxx5s4+KnzdSwC+QdH78UHBGdB9kyCKpbZgXeltT75g1z9nwBYzc3RPSxatC2JPk3Bn2QGudalL+xtw5zw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h4yk2h6uwvlkhyexMjIH7jk1w3bOSAhj/A2upPdCKU+/8HR5hPpHzxGOQXFUZ+8F64rI+UM2KFwPbY5A/jJ8i/DEzNWd2NhN4BN+tvdyA6J4GckwkW/QZ0g++3PLqgAG5L6f5JESm+6svzAGeMNIc82fMiwWS5OGBrBkdff1+OwvosGx0IIYwljyPJi+YBDEySme3gXSv/Dw+qVJraSwVqvDtp8HHP0NZd3yXq8faGqi5mth3t7QguoMNl+thBYEJogeFFLwsWblymlk/UNitAY7/47ntGgELKsRE4fRNa5Uilv60a5azV/p2ZNfdHEq6fHFVu3UEWVIhu/VAfmnAg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Thu, 20 Oct 2022 11:02:08 +0000
  • Ironport-data: A9a23:zHIY1q876vLgltsH4J1UDrUDl3+TJUtcMsCJ2f8bNWPcYEJGY0x3n GQWUG6EPqreYzHxctF3O4u0o05TvpfUnYJkSQZv+Cw8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOC6UIYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9Suv/rRC9H5qyo4mpA5ARmPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0sp1EWNyz LtfFAsIcyve2+iKwrmVT+Y506zPLOGzVG8ekldJ6GiASNwAEdXESaiM4sJE1jAtgMwIBezZe 8cSdTtoalLHfgFLPVAUTpk5mY9EhFGmK2Ee9A3T+PpxujaDpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+toijz2bSRwHmTtIQ6NbCS+vM1hVOowH0YBgMNd2aGhtPksxvrMz5YA wlOksY0loAi+UruQtTjUhmQpH+fogVaS9dWC/c96gyG1uzT+QnxLmoOQyNFadcmnNQrXjFs3 ViM9+4FHhRqubyRDHibprGdqGrrPTBPdDFSIygZUQEC/t/v5pkpiQ7CRcpiF6jzicDpHTb3w HaBqy1Wa6gvsPPnHp6TpTjv6w9AbLCQJuLpzm07hl6Y0z4=
  • Ironport-hdrordr: A9a23:EXVSV66k7bfgYfk6QgPXwSGBI+orL9Y04lQ7vn2ZFiY5TiXIra qTdaogviMc6Ax/ZJjvo6HkBEClewKkyXcV2/h2AV7GZmXbUQSTTL2KgbGSoAEIeBeOjNK1t5 0QFJSWYeeYZTYasS+T2njCLz9K+qjizEnHv5a98587JjsaE52Ioj0JfzqzIwlTfk1rFJA5HJ 2T6o5uoCehQ20eaoCeCmMeV+bOitXXnNa+CCR2cCIP2U2rt3eF+bT6Gx+X0lM3VC5O+64r9S zgnxbi7quunvmnwlv31nPV7b5RhNz9o+EzcPCku4wwEHHBmwyobINuV/mruy00mvim7BIQnN zFs34bTrROwkKUWlvwjQrm2gHm3jprwWTl00WkjXzqptG8bC4mCuJa7LgpOSfx2g4FhpVRwa hL12WWu958FhXbhhnw4NDOSlVDile0m3w/iuQe5kYvGbf2UIUh4LD3wXklXKvpREnBmc8a+a hVfYjhDc9tABmnhyuzhBgg/DSuNk5DbytuDHJy+/B96AIm40yR/3FoufD3oU1wiK7Va6M0lN gsYZ4Y5o1mf4sxUZ9XItsnbI+eNlHtKCi8Tl56Z26XYp06Bw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

As part of some follow up improvements to my VIRT_SPEC_CTRL series we
have been discussing what the usage of SSBD should be for the
hypervisor itself.  There's currently a `spec-ctrl=ssbd` option [0],
that has an out of date description, as now SSBD is always offered to
guests on AMD hardware, either using SPEC_CTRL or VIRT_SPEC_CTRL.

It has been pointed out by Andrew that toggling SSBD on AMD using
VIRT_SPEC_CTRL or the non-architectural way (MSR_AMD64_LS_CFG) can
have a high impact on performance, and hence switching it on every
guest <-> hypervisor context switch is likely a very high
performance penalty.

It's been suggested that it could be more appropriate to run Xen with
the guest SSBD selection on those systems, however that clashes with
the current intent of the `spec-ctrl=ssbd` option.

I hope I have captured the expressed opinions correctly in the text
above.

I see two ways to solve this:

 * Keep the current logic for switching SSBD on guest <-> hypervisor
   context switch, but only use it if `spec-ctrl=ssbd` is set on the
   command line.

 * Remove the logic for switching SSBD on guest <-> hypervisor context
   switch, ignore setting of `spec-ctrl=ssbd` on those systems and run
   hypervisor code with the guest selection of SSBD.

Which has raised me the question of whether there's an use case
for always running hypervisor code with SSBD enabled, or that's no
longer relevant if we always offer guests a way for them to toggle the
setting when required.

I would like to settle on a way forward, so we can get this fixed
before 4.17.

Thanks, Roger.

[0] 
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html#spec-ctrl-x86



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.