Re: [PATCH 2/4] x86/tdx: Use ReportFatalError to report missing SEPT_VE_DISABLE

Sathyanarayanan Kuppuswamy
2022-12-12T16:40:03Z

On 12/12/22 8:10 AM, Dave Hansen wrote:
> On 12/9/22 12:51, Sathyanarayanan Kuppuswamy wrote:
>>>>> + while (1) {
>>>>> + __tdx_hypercall(&args, 0);
>>>>> + }
>>>> Instead of an infinite loop, I'm wondering if the guest should panic after
>>>> retrying for few times.
>>> Hm. What difference would it make?
>> IIUC, the goal of this patch is to report the fatal error to VMM and panic.
>> But, if VMM does not terminate the guest as we expect, rather than trying
>> continuously, isn't it better to panic ourselves? That way the behavior
>> will be similar to what we have currently.
>
> What does "panic ourselves" mean exactly? What is the current behavior
> which that would match?

I meant directly calling panic(). Before this patch, if the SEPT VE DISABLE
attribute was not set, we would call panic(). In this patch, we try to report
the error to VMM and wait for it to terminate the guest in the same case.
But after reporting the error, if VMM does not terminate the guest as expected,
I thought instead of retrying continuously, we can call panic() directly after
some retries.

>

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer