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

Re: [PATCH 2/3] x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 14 Jan 2022 12:42:16 +0100
  • 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=nYfUpilo4bKhulzJpESt5zmPDnxBogKMWjnH9flX1Os=; b=hbDZuBrRpxhAgxtX98jMjB3qXcrCeG54YchSd6Rnu7XJr4MtBPa47CfjTZUUx09joQGomQcsfLl7uV1VVr1+fba1P4nrS/wp6XRbLBhb3NztkWwtIBDR82QIP9RYk+gWKCHXrRnWCuYgDK6y3iCaQR9hRDQ8feuZYMgU2SXb1BrJHtA3yUSekQOt1PvVboHr6SmlqQgIVL+hEGlsLnlUZX/x6hLcCH85INOf8FGYYucN8H4FI2qgy+59AwQqRdkX109J7GCIiBbUOGOdBQXqEYCWg07ThiopBXTENGsBTTY+xuRcD6f5sS1C6ndNhgFtTF9/Rf0yKAszQRG4JLGVjQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VmhLWc17c2RObNfY5966wKbF38ckEXj82BQiPiXrUBjrpAEbuyhRRPj3KmvO4lZFS780Bhcp2B/bMbuI2C1iQd1bZTnIcjaDV0V17wvX1CT1UxvB9eq1DMgSqdVGLAP+Y1wda2As1p4JEAJBhKt7phJ06fDImA0j9QN8lNGSR5kKhsqU8PiRIo/z7dZdH1Ey4W8zfbtjcGQhKhFVeV8evrjJXWhUDK0Qu5b//c2qmsDL8X0vP1w8MqvS+RAjN2aCxlboMhcYSJaPIfGAhsKEUg0B9RXwMLpDn5IgfOCNsPnnKsYDSUVFN3B0dj9osBNmQat9lBSIz/0a+Em0+epasw==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Fri, 14 Jan 2022 11:43:06 +0000
  • Ironport-data: A9a23:1V/U/60uDZZumRHZ1/bD5Ud2kn2cJEfYwER7XKvMYLTBsI5bpzICx mRJX2qFPf3ZZWvzfIxxYYnjoBwF7Z6Ay4BhGVZopC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCanAZqTNMEn9700o6wrJh2OaEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhlsFM9 dAVh5uLGCgCP6bJs+1MDzsAKnQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1EnMMsIdOtJIoCknph0SvYHbAtRpWrr6Diu4UAhGxs2Jwm8fD2N uw0SiI2RSX8bQRXfWoaFLlgm7n5mSyqG9FfgA3M/vdmi4TJ9yRzzb6rNtPWc96LQMx9n0CEq 2aA9GP8ajkZOcKez3yZ83uqru7JgS7/HokVEdWQ6fpCkFCVgGsJB3U+RVa95PW0lEO6c9ZeM FAPvDojq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k+FHdb1zdoMgy1knxilNoENuHfBwxv rDoB1E73LJYVYqOU3Jmbi7Sc69qFfnhORICO4qTMqftWjdyRCVxeRZg7cKrAeQeREWmtQtsJ uINpIOdOEYbmIK/PoSgjPIaurIqePvmMvD5Za8854ud3ATV0gJ1XYGNu/xKDwReOApP+tcKH LKjfA32AZINE5nJPhSQRI+Lp3+juyOsKijTQ8NBhYh5gXLpTS06ITiGxzd+hsFSTtAzZor7G CAymXCl+memsD+7iWZ+37Y7pxQltek4txfBPaUgsxQDjn3kA6naKloRrXHljEop+OE7kosjb D30lodFvU2z0mUUnC+oBPr1QWl+DEy60X6wVvdunfnqdyRfkNyN+NxwaZiNjfJ4Uspu99xlI hR2XiCipZRBRTc2Azg+tnhTXhR5wuJiEtntdRWo21UUIMYZrMUh5cY5llpHJAJGz+/wJw7Ed NpENrX6J9tAB2nhkjizypSKeGXLzYO9k/seDlGhiXV6UkYoJlB9TpZ+CRF9U1wsK7USPF/lp L52+pT5fZzp/QtHNFA7dE6MLyK41z2MGLx2V2pUCba/YE8SjrwQs3Mkf4IDN/DQu198HJ1ou WGbG9l
  • Ironport-sdr: FaA+GzfW5mCS8DJ2s/y+pXlPY9YcqQgXejYyAEr8J7x160Lt9HOdU1AQPdixitrwwCuzPUqVAk If/pSE+4z3APwi5qqUJO6nAq4ZDRC1VnqBg858UWtNqMdFHbSeSstQaCIh7qoR824+ANIl1xmT XHYxhrXiO10PIJl8qWMCyudiWpB8/H5NKU7AtYUJbqJcH+YXmDlw51vyHWdITNHQ+lV5lGJ6Tf OKguDxOwmaZLguXFnQOUCq1p+UxDryTfeuRFiM4RyN1Jc9COBXEZcWSe4NpTAepXQkux/HZKzZ AN1vb5CxgRjjc3MW/1Ki9/Sx
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Jan 13, 2022 at 04:38:32PM +0000, Andrew Cooper wrote:
> These were written before Spectre/Meltdown went public, and there was large
> uncertainty in how the protections would evolve.  As it turns out, they're
> very specific to Intel hardware, and not very suitable for AMD.
> 
> Expand and drop the macros.  No change at all for VT-x.
> 
> For AMD, the only relevant piece of functionality is DO_OVERWRITE_RSB,
> although we will soon be adding (different) logic to handle MSR_SPEC_CTRL.
> 
> This has a marginal improvement of removing an unconditional pile of long-nops
> from the vmentry/exit path.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

I wonder however if it would be clearer to define
SPEC_CTRL_ENTRY_FROM_{SVM,VMX} and EXIT macros in spec_ctrl_asm.h
(even if just used in a single place) so that all the related SPEC
macros are in a single file.

Thanks, Roger.



 


Rackspace

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