The guest policy from an IGVM file never actually made it to the platform
before launch. The callback that was supposed to forward it ran after
LAUNCH_START, so it did nothing and the guest was launched with the
default policy instead of the one requested by the file.

The policy is part of the attestation report, so this quietly breaks
attestation: the resulting measurement does not match what the IGVM file
was built for.

Patches 1 to 3 are cleanups needed to get there: dropping an overloaded
callback, moving the SNP ID block handling and giving the policy
properties proper accessors. Patch 4 is the actual fix.

One thing worth calling out: if a policy is also passed on the command
line and it differs from the IGVM one, we now return an error instead of
silently picking one over the other.

Signed-off-by: Luigi Leonardi <[email protected]>
---
Luigi Leonardi (4):
      sev: rename set_guest_policy to set_id_block and remove dead policy code
      igvm: move set_id_block call into the SNP ID block directive handler
      i386/sev: convert the guest policy properties to custom accessors
      igvm/sev: forward the IGVM guest policy to the platform before launch

 backends/confidential-guest-support.c       |  17 ++-
 backends/igvm.c                             |  85 +++++++------
 include/system/confidential-guest-support.h |  28 +++--
 target/i386/sev.c                           | 181 ++++++++++++++++------------
 4 files changed, 174 insertions(+), 137 deletions(-)
---
base-commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
change-id: 20260831-fix_igvm_policy-0b92de52dd6a

Best regards,
-- 
Luigi Leonardi <[email protected]>


Reply via email to