Re: [PATCH v1] virt: tdx-guest: Add Quote generation support using TSM_REPORTS

From: Kuppuswamy Sathyanarayanan
Date: Sun Sep 10 2023 - 20:10:21 EST




On 9/8/2023 9:19 AM, Dan Williams wrote:
>>> Changes since previous version:
>>> * Used ConfigFS interface instead of IOCTL interface.
>>> * Used polling model for Quote generation and dropped the event notification IRQ support.
>> Can you elaborate why the notification IRQ is dropped?
> Because it was a pile of hacks and non-idiomatic complexity. It can come
> back when / if driver code can treat it like a typical interrupt.

Currently, the VMM assumes that the vCPU that executes the TDG.VP.VMCALL
<SetupEventNotifyInterrupt> hypercall as the target vCPU for event
notification IRQ. To satisfy this assumption, the guest driver that uses
this hypercall/IRQ had to include CPU/IRQ affinity related code changes. This
adds unnecessary complication to the guest driver code without any real
ARCH need or benefit. So we want to modify the GHCI ABI to let TD guest pass
the target CPU as an argument. With this change, we can hide the IRQ related
configuration in the IRQ chip code and let the guest driver treat the
event notification IRQ as a regular interrupt.

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer