From nobody Mon Feb 9 10:47:44 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 1640057169292122.81003093884681; Mon, 20 Dec 2021 19:26:09 -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-478-T1_a-687Mxe97_NH8SMMMQ-1; Mon, 20 Dec 2021 22:26:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 88E0A3D9D; Tue, 21 Dec 2021 03:26:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 68D83798AB; Tue, 21 Dec 2021 03:26:00 +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 38B524BB7C; Tue, 21 Dec 2021 03:26:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BL3Nbhq024207 for ; Mon, 20 Dec 2021 22:23:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id D38792166B4C; Tue, 21 Dec 2021 03:23:37 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC96A2166B4A for ; Tue, 21 Dec 2021 03:23:35 +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 EF2BB101A52D for ; Tue, 21 Dec 2021 03:23:34 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-464-onqkROOMPlmzAJ8o8mt3RQ-1; Mon, 20 Dec 2021 22:23:33 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2056.outbound.protection.outlook.com [104.47.14.56]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-33-TSoodK1PO2GiOL-iuD4MEA-1; Tue, 21 Dec 2021 04:23:31 +0100 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com (2603:10a6:208:c5::16) by AM9PR04MB7490.eurprd04.prod.outlook.com (2603:10a6:20b:2d9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Tue, 21 Dec 2021 03:23:30 +0000 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com ([fe80::2491:2b2f:154a:acf3]) by AM0PR04MB4899.eurprd04.prod.outlook.com ([fe80::2491:2b2f:154a:acf3%6]) with mapi id 15.20.4801.020; Tue, 21 Dec 2021 03:23:30 +0000 X-MC-Unique: T1_a-687Mxe97_NH8SMMMQ-1 X-MC-Unique: onqkROOMPlmzAJ8o8mt3RQ-1 X-MC-Unique: TSoodK1PO2GiOL-iuD4MEA-1 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH V4 2/6] remote: Add RPC support for the virDomainSetLaunchSecurityState API Date: Mon, 20 Dec 2021 20:23:16 -0700 Message-ID: <20211221032320.3601-3-jfehlig@suse.com> In-Reply-To: <20211221032320.3601-1-jfehlig@suse.com> References: <20211221032320.3601-1-jfehlig@suse.com> X-ClientProxiedBy: AM5PR0502CA0005.eurprd05.prod.outlook.com (2603:10a6:203:91::15) 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: d3e26852-75dc-4322-6e95-08d9c43142cc X-MS-TrafficTypeDiagnostic: AM9PR04MB7490:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:116 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: duwtC1/pz3zwAMtopyKKTN8f+EsP0jP+e2y5DuITlkJE8tKZvWU0s0MxN6wIa+DD5LqhwC4PK85VTtXh2Pikn3kOD5bCs9uwZwNoDSYaMv66ZsGfZjceR4CJxxXwGiDMS3FvDIDpRVSEdV1E+N/zgckJFFcHpREzzhssf35Zq+MwywdRs46Ud5L0i8MrRnvVlAZtWEN1L8oxf+MGYayC9fqrShHVGrY0wH4G5d9GnLJ23Xycwt2CuOj+NqHZL7gYBRYO/dR+7ww0lB/QT0yj+ap0e4aSdn7Q8pJfo3X2Afl6Z0mNQlfFOIN/pAltHy7ZO3Q/QBSgSfp/JpO5htOo24DOZUNwf3j2lTTZgCQrMUWldaMT/SdBeQdRsNpWnVBVSpFxRX2CpAWvTNEpUAJUZx3qNG7WKuArWTGCjRJmKFDr8z1hJkp201qdxK+KKt2aJA52dAHtDiKQl3IeZaB8hTW2eofn1GYiS+niirjBAOUPe7YBY3Y0e859LYqaZ10gl+ndvCHUAc2kCD6Kd5d4yu3/7VeLXCInO5+uiuPz5Nz4jqLXHe/svqJxwGZouqkWHT3i1G0Edq/lpE0HjBKe9at+b/G2omABEWinVxaxgt08IwsQXQy98sVAmTp6fSEm41ScGvkT/Q4nabi9dLYvGXqxJ9kOwGettetNQ6vHA5hj5ydfg5nE/x8fhi0mnGZVAe7JT1LO7yIS/A9zroNewkOUVQq8lw987DLMm3VVaDA= 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)(6486002)(450100002)(66946007)(26005)(66556008)(186003)(66476007)(316002)(4326008)(86362001)(8676002)(2616005)(83380400001)(8936002)(6512007)(1076003)(5660300002)(6506007)(508600001)(6916009)(2906002)(36756003)(38100700002)(145543001)(213903007); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?eHKk+TvdR6MsWiBlKnZ0WebKg6XFlywDheQ/OQRCjXkpt64mkODTfhFNunJ6?= =?us-ascii?Q?aI5FeV8/J8LsPjXebTmcFZBYrR48gUwcR93TDas6uI8wDZ4ZuH1DBEt62ZAk?= =?us-ascii?Q?0Vdu6ccUCUKWM6W/avrH/fUSKnC4vmTYwr9A/wK3p9y5WEZtWuZHvffQ3Ydy?= =?us-ascii?Q?QxEBeWxnCdMb05Q+/alFAB6cJKF5GLKUc21fbwnY+Em0H1zaAb3WmQY1yoJp?= =?us-ascii?Q?dW1pvXxgKUJPD0CqRb+nayoM2aUUd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-ascii?Q?K15GTtia2Np2aj8BQt8kOn4FMVRAKhqfSRmm4uj/MyCFJQOVYPR71z7g8gCQ?= =?us-ascii?Q?U1LBCaRXKxCAR7shiAXevtxq2X0FjLWeo0yTS8AMrqEQnh5vg3hKdzsk4yC5?= =?us-ascii?Q?EhFP9Oncr42aQ1sFuOFBejmWx88dgIUiJqH49tjjbuTD/qXEPapIsds0/j3Z?= =?us-ascii?Q?B3nivND+I65nc05Sn5y+/tGwliHuLBLUgJrImtaKl6Y9GyRVBt8bX9fcPrwt?= =?us-ascii?Q?PZqFk6Khg70qbjS+DNt8BYqk3SHrtcoA/lv60jks0dZ1j4b/umEyFRFZNWGF?= =?us-ascii?Q?5g5t/cuFhtLEqOeIfsmbp06ekUD4Kl2QosOs5X3jw55qSxU+HUgchloFJrgc?= =?us-ascii?Q?K4+JDu8/wB8nltg2NO0MYZBTsnBSu5XzgtaJAp49v+xczSkkRTiPGmAxLqu3?= =?us-ascii?Q?PeTf2/YFahHlsvpOcm0HnilHpZkhi0qJF4yWrZq3QUMJI7yCzb6l/ab+PG2L?= =?us-ascii?Q?fMwW9TsuULE2xrgTXcCHImo=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3e26852-75dc-4322-6e95-08d9c43142cc X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4899.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 03:23:30.5271 (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: RP/GtV8cRmmw/NLSLzfGmJnEBHEVbsUgZd38hPFtszulr4JKUJwy+4CDluIPGyReQ8LgJ06ULyqUDdSAEb3Feg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7490 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.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 1BL3Nbhq024207 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.14 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1640057169733100001 Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrang=C3=A9 --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 17 ++++++++++++++++- src/remote_protocol-structs | 9 +++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 5b179a927d..5b7ccfaebd 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8600,6 +8600,7 @@ static virHypervisorDriver hypervisor_driver =3D { .domainAuthorizedSSHKeysSet =3D remoteDomainAuthorizedSSHKeysSet, /* 6= .10.0 */ .domainGetMessages =3D remoteDomainGetMessages, /* 7.1.0 */ .domainStartDirtyRateCalc =3D remoteDomainStartDirtyRateCalc, /* 7.2.0= */ + .domainSetLaunchSecurityState =3D remoteDomainSetLaunchSecurityState, = /* 8.0.0 */ }; =20 static virNetworkDriver network_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 60010778ca..4f13cef662 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -272,6 +272,9 @@ const REMOTE_NODE_SEV_INFO_MAX =3D 64; /* Upper limit on number of launch security information entries */ const REMOTE_DOMAIN_LAUNCH_SECURITY_INFO_PARAMS_MAX =3D 64; =20 +/* Upper limit on number of launch security state entries */ +const REMOTE_DOMAIN_LAUNCH_SECURITY_STATE_PARAMS_MAX =3D 64; + /* Upper limit on number of parameters describing a guest */ const REMOTE_DOMAIN_GUEST_INFO_PARAMS_MAX =3D 2048; =20 @@ -3642,6 +3645,12 @@ struct remote_domain_get_launch_security_info_ret { remote_typed_param params; }; =20 +struct remote_domain_set_launch_security_state_args { + remote_nonnull_domain dom; + remote_typed_param params; + unsigned int flags; +}; + /* nwfilter binding */ =20 struct remote_nwfilter_binding_lookup_by_port_dev_args { @@ -6905,5 +6914,11 @@ enum remote_procedure { * @generate: both * @acl: none */ - REMOTE_PROC_DOMAIN_EVENT_MEMORY_DEVICE_SIZE_CHANGE =3D 438 + REMOTE_PROC_DOMAIN_EVENT_MEMORY_DEVICE_SIZE_CHANGE =3D 438, + + /** + * @generate: both + * @acl: domain:write + */ + REMOTE_PROC_DOMAIN_SET_LAUNCH_SECURITY_STATE =3D 439 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index dbef4ace79..d88176781d 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -3005,6 +3005,14 @@ struct remote_domain_get_launch_security_info_ret { remote_typed_param * params_val; } params; }; +struct remote_domain_set_launch_security_state_args { + remote_nonnull_domain dom; + struct { + u_int params_len; + remote_typed_param * params_val; + } params; + u_int flags; +}; struct remote_nwfilter_binding_lookup_by_port_dev_args { remote_nonnull_string name; }; @@ -3680,4 +3688,5 @@ enum remote_procedure { REMOTE_PROC_NODE_DEVICE_IS_ACTIVE =3D 436, REMOTE_PROC_NETWORK_CREATE_XML_FLAGS =3D 437, REMOTE_PROC_DOMAIN_EVENT_MEMORY_DEVICE_SIZE_CHANGE =3D 438, + REMOTE_PROC_DOMAIN_SET_LAUNCH_SECURITY_STATE =3D 439, }; --=20 2.34.1