if (!def)
return;
- switch ((virDomainLaunchSecurity) def->sectype) {
+ switch (def->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
g_free(def->data.sev.dh_cert);
g_free(def->data.sev.session);
&sec->sectype) < 0)
return NULL;
- switch ((virDomainLaunchSecurity) sec->sectype) {
+ switch (sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
if (virDomainSEVDefParseXML(&sec->data.sev, ctxt) < 0)
return NULL;
virBufferAsprintf(&attrBuf, " type='%s'",
virDomainLaunchSecurityTypeToString(sec->sectype));
- switch ((virDomainLaunchSecurity) sec->sectype) {
+ switch (sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
virDomainSEVDefFormat(&attrBuf, &childBuf, &sec->data.sev);
break;
qemuAppendLoadparmMachineParm(&buf, def);
if (def->sec) {
- switch ((virDomainLaunchSecurity) def->sec->sectype) {
+ switch (def->sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT)) {
virBufferAddLit(&buf, ",confidential-guest-support=lsec0");
if (!sec)
return 0;
- switch ((virDomainLaunchSecurity) sec->sectype) {
+ switch (sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
return qemuBuildSEVCommandLine(vm, cmd, &sec->data.sev);
break;
}
if (def->sec) {
- switch ((virDomainLaunchSecurity) def->sec->sectype) {
+ switch (def->sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
if (!supportsSEV) {
VIR_DEBUG("Domain requires SEV, firmware '%s' doesn't support it",
if (!sec)
return 0;
- switch ((virDomainLaunchSecurity) sec->sectype) {
+ switch (sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
VIR_DEBUG("Setting up launch security for SEV");
if (!sec)
return 0;
- switch ((virDomainLaunchSecurity) sec->sectype) {
+ switch (sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
return qemuProcessPrepareSEVGuestInput(vm);
case VIR_DOMAIN_LAUNCH_SECURITY_PV:
return -1;
if (def->sec) {
- switch ((virDomainLaunchSecurity) def->sec->sectype) {
+ switch (def->sec->sectype) {
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SEV_GUEST)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",