Re: [PATCH 44/67] iommu/amd: KVM: SVM: Infer IsRun from validity of pCPU destination

From: Joerg Roedel
Date: Tue Apr 08 2025 - 08:36:22 EST


On Fri, Apr 04, 2025 at 12:38:59PM -0700, Sean Christopherson wrote:
> @@ -3974,8 +3974,10 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
> APICID_TO_IRTE_DEST_LO(cpu);
> entry->hi.fields.destination =
> APICID_TO_IRTE_DEST_HI(cpu);
> + entry->lo.fields_vapic.is_run = true;
> + } else {
> + entry->lo.fields_vapic.is_run = false;
> }
> - entry->lo.fields_vapic.is_run = is_run;

This change in the calling convention deserves a comment above the
function, describing that cpu < 0 marks the CPU as not running.

Regards,

Joerg