<domain>
...
- <launchSecurity type='sev'>
+ <launchSecurity type='sev' kernelHashes='yes'>
<policy>0x0001</policy>
<cbitpos>47</cbitpos>
<reducedPhysBits>1</reducedPhysBits>
...
</domain>
+``kernelHashes``
+ The optional ``kernelHashes`` attribute indicates whether the
+ hashes of the kernel, ramdisk and command line should be included
+ in the measurement done by the firmware. This is only valid if
+ using direct kernel boot. :since:`Since 8.0.0`
``cbitpos``
The required ``cbitpos`` element provides the C-bit (aka encryption bit)
location in guest page table entry. The value of ``cbitpos`` is hypervisor
unsigned long policy;
int rc;
+ if (virXMLPropTristateBool(ctxt->node, "kernelHashes", VIR_XML_PROP_NONE,
+ &def->kernel_hashes) < 0)
+ return -1;
+
if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("failed to get launch security policy"));
case VIR_DOMAIN_LAUNCH_SECURITY_SEV: {
virDomainSEVDef *sev = &sec->data.sev;
+ if (sev->kernel_hashes != VIR_TRISTATE_BOOL_ABSENT)
+ virBufferAsprintf(&attrBuf, " kernelHashes='%s'",
+ virTristateBoolTypeToString(sev->kernel_hashes));
+
if (sev->haveCbitpos)
virBufferAsprintf(&childBuf, "<cbitpos>%d</cbitpos>\n", sev->cbitpos);
unsigned int cbitpos;
bool haveReducedPhysBits;
unsigned int reduced_phys_bits;
+ virTristateBool kernel_hashes;
};
struct _virDomainSecDef {