Re: [PATCH] x86/sev-es: Replace open-coded hlt-loop with sev_es_terminate()

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

 



On Thu, Mar 17, 2022 at 02:19:13PM -0700, Peter Gonda wrote:
> Replace the hlt loop in handle_vc_boot_ghcb() with an
> sev_es_terminate(). The hlt gives the system no indication the guest is
> unhappy. The termination request will signal there was an error during
> VC handling during boot.
> 
> 
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Cc: Tom Lendacky <thomas.lendacky@xxxxxxx>
> Cc: Brijesh Singh <brijesh.singh@xxxxxxx>
> Cc: Joerg Roedel <jroedel@xxxxxxx>
> Cc: x86@xxxxxxxxxx
> Cc: kvm@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Signed-off-by: Peter Gonda <pgonda@xxxxxxxxxx>
> ---
>  arch/x86/kernel/sev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
> index e6d316a01fdd..ae87fbf27724 100644
> --- a/arch/x86/kernel/sev.c
> +++ b/arch/x86/kernel/sev.c
> @@ -1425,6 +1425,5 @@ bool __init handle_vc_boot_ghcb(struct pt_regs *regs)
>  fail:
>  	show_regs(regs);
>  
> -	while (true)
> -		halt();
> +	sev_es_terminate(GHCB_SEV_ES_GEN_REQ);

Reviewed-by: Joerg Roedel <jroedel@xxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux