From nobody Mon Feb 9 14:15:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639087503595763.3829504847411; Thu, 9 Dec 2021 14:05:03 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-40-lfQ0aleGOcGJX9_XEM20WQ-1; Thu, 09 Dec 2021 17:04:59 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68B148042FB; Thu, 9 Dec 2021 22:04:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BD4D5BE0F; Thu, 9 Dec 2021 22:04:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 745001809CBA; Thu, 9 Dec 2021 22:04:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B9M4XW3012961 for ; Thu, 9 Dec 2021 17:04:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 46B8D1121315; Thu, 9 Dec 2021 22:04:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 41C191121314 for ; Thu, 9 Dec 2021 22:04:33 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 26B108011A5 for ; Thu, 9 Dec 2021 22:04:33 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-170-I6Bs3tbbOlO_0wyrQ7a1rw-1; Thu, 09 Dec 2021 17:04:31 -0500 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-12-4QSGBKDEMAu8xzVkg9aZ6w-1; Thu, 09 Dec 2021 23:04:29 +0100 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com (2603:10a6:208:c5::16) by AM0PR04MB4897.eurprd04.prod.outlook.com (2603:10a6:208:c8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12; Thu, 9 Dec 2021 22:04:28 +0000 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com ([fe80::2491:2b2f:154a:acf3]) by AM0PR04MB4899.eurprd04.prod.outlook.com ([fe80::2491:2b2f:154a:acf3%5]) with mapi id 15.20.4755.025; Thu, 9 Dec 2021 22:04:28 +0000 Received: from localhost (75.169.28.116) by AM6P194CA0102.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 9 Dec 2021 22:04:27 +0000 X-MC-Unique: lfQ0aleGOcGJX9_XEM20WQ-1 X-MC-Unique: I6Bs3tbbOlO_0wyrQ7a1rw-1 X-MC-Unique: 4QSGBKDEMAu8xzVkg9aZ6w-1 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH V2 3/3] qemu: Implement the virDomainSetLaunchSecurityState API Date: Thu, 9 Dec 2021 15:04:15 -0700 Message-ID: <20211209220415.22039-4-jfehlig@suse.com> In-Reply-To: <20211209220415.22039-1-jfehlig@suse.com> References: <20211209220415.22039-1-jfehlig@suse.com> X-ClientProxiedBy: AM6P194CA0102.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::43) To AM0PR04MB4899.eurprd04.prod.outlook.com (2603:10a6:208:c5::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4ef7723e-333e-4d68-97d8-08d9bb5fde9f X-MS-TrafficTypeDiagnostic: AM0PR04MB4897:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: jOVQ0pdLX+fUcDsr7o7ThSqRxvc5BFhJHot9iRMVH8sVbZrYhqMZPtDSB2RhRNH4G/2PIMR5uc+zyJzeBtarBZdYg/gde4sRUqkVyazXf4hXVPTkKJKNQU0v75KZfSDtSEhWy7BDtOL441xwsBNSUffe64sb7C+OCXLqwFMpuP1g9bzCUgYRa3cCv9gqGhAyeLpwGOSq6/YbGmt1gpkbdJ4ZMrKTYO9GGY7TT0LCW+RMckcwzt5akkJe0xjxQ0vbphkYwCkQchwcjoIdwhKkOyaJi41taFKOpeSzV8uyxsYHfszOR++S7bo7gOCQ9HO+MJ0hjAYyazdmmG32K4zc7bHLY1faqWwiH5+DcB1lMIYpWfao/tUTARuRBon2h9A9Ghp1ICB0ramTMAcwpCO19sH9FugL/5IahUG41wlpR8fPYXzy5/rKK1NUZEGDaZlDpUISW8Do3S/UcVkwjnKTFhNqB0NxS0HFjvpARaA8y2oUzPM/ZWAlGJW8bQDgD/Es72ljQOnmpcu+bE7SDiKE20n/viPNvCTwieYRPCT/VywcVgstd326dWeefNUQpI/55ca6GjfZ+dEpOuwAsMIDWQUfWVbiPerXMT6pqVxGtBS9Z1flkdEdNJSuUrcLz6yVkulukipDXnU8pR2VGp9LSVxyRsDrb4Usa9eOL++COo8vbKOj1yU7WqU+S9heVL1kZ1cOfCerWDNKnZot1rPzxwyRFrkZCsd73RAeO/Ho200= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4899.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6666004)(6916009)(83380400001)(186003)(956004)(2616005)(6496006)(26005)(66946007)(66476007)(66556008)(8936002)(36756003)(6486002)(316002)(1076003)(38100700002)(2906002)(508600001)(8676002)(86362001)(5660300002)(145543001)(213903007); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9IW3ib+49Gdo5TvETL23808yHpBG6JFiGK9LgOuRETGZtOWItT+g8edn5Bho?= =?us-ascii?Q?F1qr+DO/I4RC4rjhPWpFuQqRlPcQV9I4BBGRbKun/jO8tQMAdzbs1xkbdXW5?= =?us-ascii?Q?8UW2O//sgu7K8LdLwehF7pFCqjrZ4KW66JPwimseHr4L0SANOqMjsDibzbQe?= =?us-ascii?Q?Mt1MCo97wlvBFs2cgMPiRWaqm0JRmC+lMNpmEme6/84K1zAFKTId3K7zb8LX?= =?us-ascii?Q?WQtQtiQN6wkDQZ+pYfLyS8OsjwZ1dLX/ZL/VuX+UR8oYwi1C3iAJI5ZPr09o?= =?us-ascii?Q?R7lcvEMpgVc7UjfiZNXz4agzVX9RCZarsD58OUgkrwfqwSDTNN1GuyCvn1ab?= =?us-ascii?Q?YnsIgY2qL2g/YclRIi9tv7ZYQH29mzRCDD2pQuJMLKnTjnIbMHew5ioL2Yfd?= =?us-ascii?Q?LTibrzw1RSxthPg0V6WauXJyBestjw61S2hUjg2/JaaIYZXhW7VwaRAjhLuX?= =?us-ascii?Q?3HD7XiT+fc72KEM/0dPuvlc1h/A2gsHBGBG8Ve+dKzLdURqs/iGZjhoLhe3g?= =?us-ascii?Q?ottLXGxqCP8KKcOyUkx5EidhOSKR5AtbJeCqIWVQTA/DSlowiYmk0ApRnXyi?= =?us-ascii?Q?zk//CCsYHFDdtDr7Lok1486qpY+cnp64ZuKN2uIoy3fatVpscyYYsGEToLjN?= =?us-ascii?Q?wHNHwTdwnZ2hnhoDWp87kJM2n4hioB8inZyODcW5ZLILJM1Il+esBheRZjSo?= =?us-ascii?Q?nWw3lq0UbpU6tBnyFw8O/8kTfOBjWDXEgoX768UeUQARZmOTaQ3whPqBXicK?= =?us-ascii?Q?BqGTgur/bk83xiNiOcMzv5h4ceJ4A7DhGin3ilKbge/r5iMbuywdHNdmcKxw?= =?us-ascii?Q?oPAX494jZIaX3xVlQqo6T0hUy9oREsX9Z2XECvpwMbTMTHO8JXiw+w0qpVlb?= =?us-ascii?Q?scXbJv89okrUrkXfxA6J7M390r3Z6vw1Lo+lsQt13hn3dIeWFFxyvhRjdiB4?= =?us-ascii?Q?55UxOBkfNtDvPoO5oTld7tnqNmpaJjojMssROjN6yfAvhC2ZCP9avm/TeyDS?= =?us-ascii?Q?1U9sdyZyPl34nHdaeMfDbLNE5cp9DZaXMIuAd4Oa5TXcAeBjAvPXhp8aVpXU?= =?us-ascii?Q?C/oKErudOgWA3XElY3HC9sc1t0o5xNM9jird6FdMhRRnrmOc1q3CJEWKQ2eR?= =?us-ascii?Q?bQJfKPMP+iwfWlX5hbNY9ez6pp3a0ba3CHWIqk6dyKYKYrDSP8FuKV2Lc6K1?= =?us-ascii?Q?lSj2xDK7ECVfCyLR0q5+o9HlCcDvWkhCEXyu3Bm2lczhjInmo+azDJXz3SBZ?= =?us-ascii?Q?qG4xWrMu8VQY9gv1NngU9Onph0orlJ/XwU5H9Z6JsXDz2qPkqiTBN2KPeU/7?= =?us-ascii?Q?aQPtulqxqgEyxSF8rV5yHhfKOGC8YU+ZGHRfjLLNatggW4WszSRnDHy9crTM?= =?us-ascii?Q?mBISe3+pN3SPRWgJRp3LLvlBtGYXIlo32Gh59IE3zmd3yOgmIsR36aPKoU9F?= =?us-ascii?Q?r6F5mcwOh6pHfZPU0p4MVZug3nDmeiQ65sddRxXsJiyl5CJtIow14ow2A+q9?= =?us-ascii?Q?YKA9rrRBgjwA2LqBsYD6ktgsJcQc2/E7XrF/fMKft84jS2IloK85wPt2K354?= =?us-ascii?Q?Tpa9OkbXGPcbaUSUZtpUF++rQUPjNHQiB4usm0L383Bz1fS2uReD/a3AfdXO?= =?us-ascii?Q?BWB/UMW3tfmqcc16H6fi3II=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ef7723e-333e-4d68-97d8-08d9bb5fde9f X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4899.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 22:04:28.3736 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jzc4DwP8TT0cEgE4TR3TxadOviaj5TTXsJkwyEEz9EvkHUJvumwMM0oeWGom6f6lF1QzvzJcj3EJLnQ7cxRvoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4897 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 1B9M4XW3012961 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1639087504817100001 Content-Type: text/plain; charset="utf-8" Set a launch secret in guest memory using the sev-inject-launch-secret QMP API. Only supported for SEV-enabled guests in a paused state. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 88 ++++++++++++++++++++++++++++++++++++ src/qemu/qemu_monitor.c | 14 ++++++ src/qemu/qemu_monitor.h | 7 +++ src/qemu/qemu_monitor_json.c | 45 ++++++++++++++++++ src/qemu/qemu_monitor_json.h | 6 +++ 5 files changed, 160 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8093b8f69b..b38a246d37 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20042,6 +20042,93 @@ qemuDomainGetLaunchSecurityInfo(virDomainPtr domai= n, return ret; } =20 + +static int +qemuDomainSetLaunchSecurityState(virDomainPtr domain, + virTypedParameterPtr params, + int nparams, + unsigned int flags) +{ + virQEMUDriver *driver =3D domain->conn->privateData; + virDomainObj *vm; + int ret =3D -1; + int rc; + size_t i; + g_autofree char *secrethdr =3D NULL; + g_autofree char *secret =3D NULL; + unsigned long long setaddr =3D 0; + bool hasSetaddr =3D false; + int state; + + virCheckFlags(0, -1); + if (virTypedParamsValidate(params, nparams, + VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_HEADE= R, + VIR_TYPED_PARAM_STRING, + VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET, + VIR_TYPED_PARAM_STRING, + VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_SET_A= DDRESS, + VIR_TYPED_PARAM_ULLONG, + NULL) < 0) + return -1; + + if (!(vm =3D qemuDomainObjFromDomain(domain))) + goto cleanup; + + if (virDomainSetLaunchSecurityStateEnsureACL(domain->conn, vm->def) < = 0) + goto cleanup; + + /* Currently only SEV is supported */ + if (!vm->def->sec || + vm->def->sec->sectype !=3D VIR_DOMAIN_LAUNCH_SECURITY_SEV) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("setting a launch secret is only supported in SEV= -enabled domains")); + goto cleanup; + } + + for (i =3D 0; i < nparams; i++) { + virTypedParameterPtr param =3D ¶ms[i]; + + if (STREQ(param->field, VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_HEAD= ER)) { + secrethdr =3D g_strdup(param->value.s); + } else if (STREQ(param->field, VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECR= ET)) { + secret =3D g_strdup(param->value.s); + } else if (STREQ(param->field, VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECR= ET_SET_ADDRESS)) { + setaddr =3D param->value.ul; + hasSetaddr =3D true; + } + } + + if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) + goto cleanup; + + if (virDomainObjCheckActive(vm) < 0) + goto endjob; + + state =3D virDomainObjGetState(vm, NULL); + if (state !=3D VIR_DOMAIN_PAUSED) { + virReportError(VIR_ERR_OPERATION_INVALID, + "%s", _("domain must be in a paused state")); + goto endjob; + } + + qemuDomainObjEnterMonitor(driver, vm); + rc =3D qemuMonitorSetLaunchSecurityState(QEMU_DOMAIN_PRIVATE(vm)->mon, + secrethdr, secret, setaddr, has= Setaddr); + qemuDomainObjExitMonitor(driver, vm); + if (rc < 0) + goto endjob; + + ret =3D 0; + + endjob: + qemuDomainObjEndJob(driver, vm); + + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static const unsigned int qemuDomainGetGuestInfoSupportedTypes =3D VIR_DOMAIN_GUEST_INFO_USERS | VIR_DOMAIN_GUEST_INFO_OS | @@ -20915,6 +21002,7 @@ static virHypervisorDriver qemuHypervisorDriver =3D= { .domainAuthorizedSSHKeysSet =3D qemuDomainAuthorizedSSHKeysSet, /* 6.1= 0.0 */ .domainGetMessages =3D qemuDomainGetMessages, /* 7.1.0 */ .domainStartDirtyRateCalc =3D qemuDomainStartDirtyRateCalc, /* 7.2.0 */ + .domainSetLaunchSecurityState =3D qemuDomainSetLaunchSecurityState, /*= 8.0.0 */ }; =20 =20 diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 75e0e4ed92..b1de6383f4 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4366,6 +4366,20 @@ qemuMonitorGetSEVMeasurement(qemuMonitor *mon) } =20 =20 +int +qemuMonitorSetLaunchSecurityState(qemuMonitor *mon, + const char *secrethdr, + const char *secret, + unsigned long long setaddr, + bool hasSetaddr) +{ + QEMU_CHECK_MONITOR(mon); + + return qemuMonitorJSONSetLaunchSecurityState(mon, secrethdr, secret, + setaddr, hasSetaddr); +} + + int qemuMonitorGetPRManagerInfo(qemuMonitor *mon, GHashTable **retinfo) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index edc2b01a66..621d785d80 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1445,6 +1445,13 @@ int qemuMonitorBlockdevMediumInsert(qemuMonitor *mon, char * qemuMonitorGetSEVMeasurement(qemuMonitor *mon); =20 +int +qemuMonitorSetLaunchSecurityState(qemuMonitor *mon, + const char *secrethdr, + const char *secret, + unsigned long long setaddr, + bool hasSetaddr); + typedef struct _qemuMonitorPRManagerInfo qemuMonitorPRManagerInfo; struct _qemuMonitorPRManagerInfo { bool connected; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index e00d785c20..f3efc3fe79 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -8216,6 +8216,51 @@ qemuMonitorJSONGetSEVMeasurement(qemuMonitor *mon) } =20 =20 +/** + * Set a launch secret in guest memory + * + * Example JSON: + * + * { "execute" : "sev-inject-launch-secret", + * "data": { "packet-header": "str", "secret": "str", "gpa": "uint64" } } + * + * The guest physical address (gpa) parameter is optional + */ +int +qemuMonitorJSONSetLaunchSecurityState(qemuMonitor *mon, + const char *secrethdr, + const char *secret, + unsigned long long setaddr, + bool hasSetaddr) +{ + g_autoptr(virJSONValue) cmd =3D NULL; + g_autoptr(virJSONValue) reply =3D NULL; + + if (hasSetaddr) { + cmd =3D qemuMonitorJSONMakeCommand("sev-inject-launch-secret", + "s:packet-header", secrethdr, + "s:secret", secret, + "U:gpa", setaddr, + NULL); + } else { + cmd =3D qemuMonitorJSONMakeCommand("sev-inject-launch-secret", + "s:packet-header", secrethdr, + "s:secret", secret, + NULL); + } + if (cmd =3D=3D NULL) + return -1; + + if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) + return -1; + + if (qemuMonitorJSONCheckError(cmd, reply) < 0) + return -1; + + return 0; +} + + /* * Example return data * diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 0984717675..8b9d3a2a77 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -369,6 +369,12 @@ int qemuMonitorJSONSystemWakeup(qemuMonitor *mon); =20 char *qemuMonitorJSONGetSEVMeasurement(qemuMonitor *mon); =20 +int qemuMonitorJSONSetLaunchSecurityState(qemuMonitor *mon, + const char *secrethdr, + const char *secret, + unsigned long long setaddr, + bool hasSetaddr); + int qemuMonitorJSONGetVersion(qemuMonitor *mon, int *major, int *minor, --=20 2.34.1