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

Re: [PATCH 2/3] x86: Add support for AMD's Automatic IBRS


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 30 May 2023 10:25:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=PpLYpGGB9e+TbEwsNORP02sNNtzPIMRgsx8T5MprrHY=; b=Y2hmC9muMNbBydPYXqUWqBBhdFoMppCWpdiuxZ8Agfd0edLF2k2UDlUFGjx4JRskx2VgGJeXOoT5UHo4rmqoy2sJAQO7rXzNZ/jzQEHC9OZFu+L7k8kGLvMvp9xd6gz3C9p7QZrAGsRPQRbnFv2gb51T33B8j0Thfh4sRWo8Cs8+w9Z6Q7C7FKLr8LOKaKyA0fx2fOsrLOu85aPpczER5npaXJXU/CQZZTnf8jgxKB2dkBUhn70nlWeNMpdfeWiscADTNjuzPikwE/K9azkvQMLbvhJW9I1c6b+1bHu7LsFIJJ7EMzEo3IL+An6MNibk4aleYqr7RsE/u8xNATNxtw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hh3DqetLGB8C2p4BuDNnJgm5p3o4K2BuAlzx4vB7dLTyM3LQot2qoBLOYAKRGKPv/1HnLq8k2KlIiQlSf5tBabxkjpl4HVc4H2OLGNif1TxU/VBpwS1q5d/jl97A84O0aPXyg+cf91yYrHHqW3bpu4MpPjL5ebfxcbn+aGgZOYpEkkvBaMK66NEmEYoYxDjmEA6lhZI7bWqReHT9ucqQKBg3jSFsY8VuRtQzX+YLFyOz8w6Ca8UfOz/ZOFO14BeB+1S5NTbpuBzY758eEtuwZ5/6Xi3HgQE3Zh03aopOH8jcgyH4W4u6+jyfmZkH5rcpebx0tl+DfQqMQbaoLCagpQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 30 May 2023 08:27:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.05.2023 17:00, Alejandro Vallejo wrote:
> --- a/xen/arch/x86/smpboot.c
> +++ b/xen/arch/x86/smpboot.c
> @@ -376,6 +376,9 @@ void start_secondary(void *unused)
>      {
>          wrmsrl(MSR_SPEC_CTRL, default_xen_spec_ctrl);
>          info->last_spec_ctrl = default_xen_spec_ctrl;
> +
> +        if ( cpu_has_auto_ibrs && (default_xen_spec_ctrl & SPEC_CTRL_IBRS) )
> +            write_efer(read_efer() | EFER_AIBRSE);
>      }

Did you consider using trampoline_efer instead, which would then also take
care of the S3 resume path (which otherwise I think you'd also need to
fiddle with)?

Jan



 


Rackspace

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