[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/9] x86/spec-ctrl: Don't use spec_ctrl_{enter,exit}_idle() for S3
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Mon, 31 Jan 2022 11:23:42 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=s2MjfjFAWyDKo5ssvjfuCw5fpGKNmOaql4YUezCmQgQ=; b=aKpV/0SS/Xl7nixM3itbkfcvyY6cGiVk42wbxcATWXIRn8dQ6COytbSQgjVs9EDxd2qzZHqnmpqjpWtM925amnrpdaI9rhqNsfU4CjCbdml89Tt6yAQ6ZIYYqVqu/RUwc7W8H9Eem/m/yR78ofWnIl6WAFHaNSczovEox88ROFAnpfma9IZGZR3pfGsdYT8HbjY9SZBY2VLJ+6fIyBiuT6ek4Xcdxy6I+P+YXkmtFQw0/z8lniiJfcwFYvEEXrZiuCc0Ui5IcOfG06DfuPIja9ZEe5+gltFSA2HplB9UoOW7lONkAL2ZGPY24/Od7F3O9EESnQWIdVK3q+1pKEj0Zg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CnYaFlW+vSD5IVz+5oamv2LQAgz1sk8J3L8+ISkNh/HTe85JCpWmo9Y4fhurGwqzgZbSwQqX48/QYWWoSfwoXovQp++dUwTqtL/qYKGLLMt3mlx4TGmYGPHP6bHxXZZkOenuYC8u39yQJOe5ZFf9RHz8vYI7aYAmo7kFrgh9TxUsHIR6fu8KsD79RJY6i9czvHoNoNmAgx/zbMr9bny9nyma40P8t1lorK6P4hWJf9a3ovKcW6rZjrtdEVt58YYiO1QRPP39K4sQ/8OiAGO/5emLzjZHdffFAPdPAuuQ6iJaZDEzWyA/+9O+dNY1M1l5UEYmi7A1VNwv4Y8ZmrekhA==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 31 Jan 2022 11:23:52 +0000
- Ironport-data: A9a23:k6W0l6LVM1K9oEwPFE+RPJIlxSXFcZb7ZxGr2PjKsXjdYENS3zYPm 2ZKUGCAOKvbY2fwL9ElPYmzo05QvMKEyINnTVBlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUakideSc+EH170Us4wrZg6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB23vI9A5 YsVs6azFwx2EqnpqcIzdUNxRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFFgMg5IdatF4QYonx6lhnSDOo8QICFSKLPjTNd9Glr35gfQ6uDD yYfQSRoSzLaOSwIAAkoNo4Yxtysg3LFIwQN/Tp5ooJoujOOnWSdyoPFINfTP9CHW8hRtkKZv X7duXT0BAkAM96SwibD9Wij7sfQmQvrVYRUE6e3ntZoilCOwm0YCDUNSEC25/K+jyaDt8l3c hJOvHB09O5rqRLtHoKVswCETGCsgD1DavcOS+sA61+GlYbQxje/KE5eZ2sUADA5j/MeSTsv3 16PutrmAz1zrbGYIU6gGqeoQS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8HJ2ALV0gj1XYDNu/yKDwteOAsP+tcKH Po3Lsgm9PWQwVxUi3UPAhmY8Hz4/nw0L72ax8PABAqrCOUiymz1bL8Gx+Emj8DTjJm294ZgC v4uj28wp/mn+Cwyxfa2WOWxY9RgsHdxtxKA9HJotQJKw/rlh2jaO1aKv+/VXEO0aSSAWQR4Z 7xSiQbToJOArTqDziISC7Wqk3dOfAVmiffIBGj8CDeSIfCNU0H4oJ69Pxkm13imhcdVZhHod J2NyjyjesnMTrQ2Cv6/NTGTBdsiw69pmcji/caizhFXZIZc6I5l/1UwKp5KuZJIMvB0vFtLA CuNrCp2N9GNVeBK3zJtGhmx9KhGnw1AxedW0AH/siYySJfknx1x1YRgJV3pAZNyLstD51fo+ jUOKVhk79DCscQcKJmHe8EBc+6EHbETx7AOH+bZV7nCKYEMXTQrIOf2sR52Mi6PJgTiJcikp XIV11V8WY0ZkL1EMWLmIZG9xjcKV/NFAgFCvsukaSRloeMNoYDABfzP2zGyfHQ0Mn3KverLs qOBA==
- Ironport-sdr: EIICFMSgJkg/tIyEZWgWh2Y7lNZum3DWrWBcfZg5vZO4VhN7kuKOWmMDnLDxWseDrOZgN8b+mb w+te4ybaru05W4ckqUUS7yTAjw4wjEduSxMUZpJp0vFeYnxGkCxiS3NDiA7eMKCNKpc/7SoCdA 3SWBFIjAI5EhYo62dU30h1yvoSMILUL/+rahLaQJdsO2cia41UdbOkGCSGA+NztKV4dQo+793t Nhld9rnyXYzsHXRscDgG6GkM6CR71psdNaXI1S8Qt3ag4XvCcOvfKuBFTB88QSvk60OPFMQQQL 1pWmcS7VRAxJ5e9MtwjsiN0i
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYFEslNylcZ92lUUmGXdMcKHF6zqx87mCAgAATCgA=
- Thread-topic: [PATCH v2 4/9] x86/spec-ctrl: Don't use spec_ctrl_{enter,exit}_idle() for S3
On 31/01/2022 10:15, Jan Beulich wrote:
> On 28.01.2022 14:29, Andrew Cooper wrote:
>> 'idle' here refers to hlt/mwait. The S3 path isn't an idle path - it is a
>> platform reset.
>>
>> Conditionally clearing IBRS and flushing the store buffers on the way down is
>> a waste of time.
> I can buy this for the flushing aspect; I'm less certain about the clearing
> of IBRS: Whether the act of clearing is slower than the performance price
> of running with it enabled is unknown, I suppose?
There are a handful of instructions from now until the core is powered
down. The cost of the WRMSR is going to dominate everything else, but
we're still only talking microseconds.
But honestly, the perf aspect isn't relevant. It's wrong to use the
enter/exit idle helpers here.
>> Furthermore, we want to load default_xen_mcu_opt_ctrl unilaterally on the way
>> back up. Currently it happens as a side effect of X86_FEATURE_SC_MSR_IDLE or
>> the next return-to-guest, but that's fragile behaviour.
> I'll assume from your reply that you've adjusted the description as well.
I have, yes.
>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Preferably with the statement above softened a little:
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Thanks.
~Andrew
|