From nobody Sat May 11 19:51:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 164944017903021.750204108274602; Fri, 8 Apr 2022 10:49:39 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-93-BZkjoM_sNQO3wMuboo3s5w-1; Fri, 08 Apr 2022 13:49:27 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F2D1718A6589; Fri, 8 Apr 2022 17:49:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4850B40317B; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 09F001940344; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C77D71940341 for ; Fri, 8 Apr 2022 17:49:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A1B74432467; Fri, 8 Apr 2022 17:49:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CD44432460 for ; Fri, 8 Apr 2022 17:49:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 7F2C98039D7 for ; Fri, 8 Apr 2022 17:49:19 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-651-XwXGkO8TP2ufbagblXr7YA-1; Fri, 08 Apr 2022 13:49:17 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238EMqEo009873 for ; Fri, 8 Apr 2022 10:49:16 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6p1yp13w-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:16 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:12 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:12 +0000 X-MC-Unique: BZkjoM_sNQO3wMuboo3s5w-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: XwXGkO8TP2ufbagblXr7YA-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 1/8] Make NVRAM a virStorageSource type. Date: Fri, 8 Apr 2022 10:48:44 -0700 Message-Id: <20220408174851.1077477-2-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 11a6f9b9-c6c7-4133-abe6-08da1988176a X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: yN1vuxWWQWxIJZv/WktB6TfkMh99hmFeKdO6LTuUkMZ2VtK4OC2LJjoal/igPuZKPc7NHJqzb4lM2Bd5TPJgQ+9+G0id55IlubiH+wvZj/WXCp2iDXJnx+YtfLUx4mRBwdJ48Bkbxvhhor5Ne++Pq6lNtdha669KyPVe0/vfZRxmAGWOKMhFZ+O8wrLgA+FG4j4RZUG/HcnSceHYaA3xaPU+kHI2xVZHi6XVGzWrYY6dkZiW3EUNDQ02P1NNgyrTtG23xQwNfHRhMY5SR3avMSHfv+MCAcDHcGJMIbFNVZ2d3XmIYanwGPI+CWPZybqpGN6oXYxSzRXYbE2jR6U33bdI6nQgnKLe5XmgtgsVLbQs7kiy70msDWoJsg2NrtdxUbTQH7AkxWNgdcig2pQrdMszp+nJt+9cyncDcCxYeJzshgtF1p2qjQFhHW++qcRnow3H/mbnkMGuwE7M8jqAcc+6olTzPQE5gRdvn4SkFPAs7bFE9IL/o4DnSfG9AMZNgzK41y88cHW22arcvYdYzP/NzQK2v+MuSd1lr995kT8B8zyqyKlvaRnrYTucyYGBBFCKr1u9qhFvhS2KWHZ1hrXsgPWdv34N+ZdiGR9QTU1c7CwFWydgWsSQk7PoXkxeckQLXO5/iBZ21GJsAD/Q7R2xnkt7q9CQazOV0Vj18MPZ6SY6ODybds3YkYOwGGLtoTfeAKR5RLgS6csaW2xJxA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(30864003)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?36Z73vIvysZfkxPbnkWB2eF0kK22/kSraI0OhjXMVIYYNmYXdqGUgpNDj4Lo?= =?us-ascii?Q?GbMK8w4kQPezPU+5ZxT1v4tp5zhk0Na0L/sYcd5T5ZMRo4RFWbjsM3qF8FMd?= =?us-ascii?Q?Jn0flvLiLCtKfm6PK7lZo6R4pirf/GlgxTEPc7ErqF1891oIV3WCME86xGe1?= =?us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TJrkXU5Yhau/04773mAxp+Ooqu5c510?= =?us-ascii?Q?JSVlOIGz1zSMZam9CQjKCbjj0gcrQdnDDyX6m/MN5hJsIpJkMCyGXlWEDd/S?= =?us-ascii?Q?lTR+PYsmSEXh5NP7zkzWXFeQ2ij8dohzdSBCxfA93HwkjS2zLpd+m7/WwYpq?= =?us-ascii?Q?ruUe6HACX9P+pCNwxq+OngNZxki6Ku3bNH5gtQdtP0y1jjPHEuJwLoTTRnwF?= =?us-ascii?Q?qd722Ymf69m5xRH4zLaEgRCmVxSMmg3yxs0qtYgH/ZPPbmWVxFgitTyZqE5x?= =?us-ascii?Q?reZGzHW/oSGNxOsH2FFlvRqjxtrQOHk25kveKzf1WauDskf6NfZAdyDkZRVf?= =?us-ascii?Q?BBdA1DbT+/uXtx8LfcZS12IgEGraMrCTFUPYuc0CwxqahMD9rZmHTzyJjsci?= =?us-ascii?Q?45eukERI0ZVjjMyUhabYmlRq3b0dpNSN6O6ZXej1oZCLdadv0AnJqXrqCl+L?= =?us-ascii?Q?qRN98S8zjR1GEkWer2hw0+E9bLX1dUerQ10nJCM6cFNVoMUVG5WbrkVmUSjG?= =?us-ascii?Q?7tXjUvECBkf36HkYMZNA2qgr3xYhCPsIAsGrfSvwjmE4IoHLp4eiVPiXtbOc?= =?us-ascii?Q?7+uNw+Ru26jV5W0nD948bTU0eFaB4Qlg5YXw+afYk9t2s9IaZbDdazegVj37?= =?us-ascii?Q?bQxkqBfZl5IIvJemhF2Ycb0I59gfHtaReM0dBTiYtF7a4pElNgPFmQMVtXhf?= =?us-ascii?Q?byyckXdlw4XEwBKHLzoqHqhWRd3Gzbo=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11a6f9b9-c6c7-4133-abe6-08da1988176a X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:12.7178 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4GeAki8ZXtEEEV4El0lof2hJLaPwq1fs+l6PZtX9UYWMP5/wYfy+vW/lSOxrCVSspk1jvG/9bsm4/FRm0eeNm3ZsuhbvI+4uIx67hNSrhOg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: q--lzl2La4eQOmBuzhlWsKPRtQyvPA34 X-Proofpoint-GUID: q--lzl2La4eQOmBuzhlWsKPRtQyvPA34 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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: 1649440179898100001 Content-Type: text/plain; charset="utf-8" Currently, libvirt allows only local filepaths to specify a NVRAM disk. Since, VMs can migrate across hosts, so making it to virStorageSource type would help in uninturrupted access NVRAM disks over network. Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- src/conf/domain_conf.c | 13 ++++++++++--- src/conf/domain_conf.h | 2 +- src/qemu/qemu_cgroup.c | 3 ++- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_domain.c | 14 ++++++++------ src/qemu/qemu_driver.c | 5 +++-- src/qemu/qemu_firmware.c | 17 ++++++++++++----- src/qemu/qemu_namespace.c | 5 +++-- src/qemu/qemu_process.c | 5 +++-- src/security/security_dac.c | 6 ++++-- src/security/security_selinux.c | 6 ++++-- src/security/virt-aa-helper.c | 5 +++-- src/vbox/vbox_common.c | 2 +- 13 files changed, 55 insertions(+), 30 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5dd269b283..b83c2f0e6a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3540,7 +3540,7 @@ virDomainLoaderDefFree(virDomainLoaderDef *loader) return; =20 g_free(loader->path); - g_free(loader->nvram); + virObjectUnref(loader->nvram); g_free(loader->nvramTemplate); g_free(loader); } @@ -18266,7 +18266,11 @@ virDomainDefParseBootLoaderOptions(virDomainDef *d= ef, fwAutoSelect) < 0) return -1; =20 - def->os.loader->nvram =3D virXPathString("string(./os/nvram[1])", ctxt= ); + if (virXPathNode("./os/nvram[1]", ctxt)) { + def->os.loader->nvram =3D g_new0(virStorageSource, 1); + def->os.loader->nvram->path =3D virXPathString("string(./os/nvram[= 1])", ctxt); + def->os.loader->nvram->type =3D VIR_STORAGE_TYPE_FILE; + } if (!fwAutoSelect) def->os.loader->nvramTemplate =3D virXPathString("string(./os/nvra= m[1]/@template)", ctxt); =20 @@ -26971,7 +26975,10 @@ virDomainLoaderDefFormat(virBuffer *buf, virXMLFormatElementInternal(buf, "loader", &loaderAttrBuf, &loaderChil= dBuf, false, false); =20 virBufferEscapeString(&nvramAttrBuf, " template=3D'%s'", loader->nvram= Template); - virBufferEscapeString(&nvramChildBuf, "%s", loader->nvram); + if (loader->nvram) { + if (loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE) + virBufferEscapeString(&nvramChildBuf, "%s", loader->nvram->pat= h); + } virXMLFormatElementInternal(buf, "nvram", &nvramAttrBuf, &nvramChildBu= f, false, false); } =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 694491cd63..eecee1075c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2234,7 +2234,7 @@ struct _virDomainLoaderDef { virTristateBool readonly; virDomainLoader type; virTristateBool secure; - char *nvram; /* path to non-volatile RAM */ + virStorageSource *nvram; char *nvramTemplate; /* user override of path to master nvram */ }; =20 diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index aa0c927578..d46c9ff36a 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -581,7 +581,8 @@ qemuSetupFirmwareCgroup(virDomainObj *vm) return -1; =20 if (vm->def->os.loader->nvram && - qemuSetupImagePathCgroup(vm, vm->def->os.loader->nvram, false) < 0) + vm->def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + qemuSetupImagePathCgroup(vm, vm->def->os.loader->nvram->path, fals= e) < 0) return -1; =20 return 0; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bb45954108..1393d4fc22 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9648,7 +9648,7 @@ qemuBuildDomainLoaderPflashCommandLine(virCommand *cm= d, =20 if (loader->nvram) { virBufferAddLit(&buf, "file=3D"); - virQEMUBuildBufferEscapeComma(&buf, loader->nvram); + virQEMUBuildBufferEscapeComma(&buf, loader->nvram->path); virBufferAsprintf(&buf, ",if=3Dpflash,format=3Draw,unit=3D%d", uni= t); =20 virCommandAddArg(cmd, "-drive"); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a4334de158..70e96cc5a5 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4663,8 +4663,12 @@ qemuDomainDefPostParse(virDomainDef *def, } =20 if (virDomainDefHasOldStyleROUEFI(def) && - !def->os.loader->nvram) - qemuDomainNVRAMPathFormat(cfg, def, &def->os.loader->nvram); + (!def->os.loader->nvram || !def->os.loader->nvram->path)) { + if (!def->os.loader->nvram) + def->os.loader->nvram =3D g_new0(virStorageSource, 1); + def->os.loader->nvram->type =3D VIR_STORAGE_TYPE_FILE; + qemuDomainNVRAMPathFormat(cfg, def, &def->os.loader->nvram->path); + } =20 if (qemuDomainDefAddDefaultDevices(driver, def, qemuCaps) < 0) return -1; @@ -11349,11 +11353,9 @@ qemuDomainInitializePflashStorageSource(virDomainO= bj *vm) =20 =20 if (def->os.loader->nvram) { - pflash1 =3D virStorageSourceNew(); - pflash1->type =3D VIR_STORAGE_TYPE_FILE; + if (!(pflash1 =3D virStorageSourceCopy(def->os.loader->nvram, fals= e))) + return -1; pflash1->format =3D VIR_STORAGE_FILE_RAW; - pflash1->path =3D g_strdup(def->os.loader->nvram); - pflash1->readonly =3D false; pflash1->nodeformat =3D g_strdup("libvirt-pflash1-format"); pflash1->nodestorage =3D g_strdup("libvirt-pflash1-storage"); } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8c0e36e9b2..2b2bd8d20c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6615,8 +6615,9 @@ qemuDomainUndefineFlags(virDomainPtr dom, } } =20 - if (vm->def->os.loader && vm->def->os.loader->nvram) { - nvram_path =3D g_strdup(vm->def->os.loader->nvram); + if (vm->def->os.loader && vm->def->os.loader->nvram && + vm->def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE) { + nvram_path =3D g_strdup(vm->def->os.loader->nvram->path); } else if (vm->def->os.firmware =3D=3D VIR_DOMAIN_OS_DEF_FIRMWARE_EFI)= { qemuDomainNVRAMPathFormat(cfg, vm->def, &nvram_path); } diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 51223faadf..6556a613a8 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1192,13 +1192,16 @@ qemuFirmwareEnableFeatures(virQEMUDriver *driver, VIR_FREE(def->os.loader->nvramTemplate); def->os.loader->nvramTemplate =3D g_strdup(flash->nvram_template.f= ilename); =20 - if (!def->os.loader->nvram) - qemuDomainNVRAMPathFormat(cfg, def, &def->os.loader->nvram); + if (!def->os.loader->nvram) { + def->os.loader->nvram =3D g_new0(virStorageSource, 1); + def->os.loader->nvram->type =3D VIR_STORAGE_TYPE_FILE; + qemuDomainNVRAMPathFormat(cfg, def, &def->os.loader->nvram->pa= th); + } =20 VIR_DEBUG("decided on firmware '%s' template '%s' NVRAM '%s'", def->os.loader->path, def->os.loader->nvramTemplate, - def->os.loader->nvram); + def->os.loader->nvram->path); break; =20 case QEMU_FIRMWARE_DEVICE_KERNEL: @@ -1364,8 +1367,12 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, * its path in domain XML) but no template for NVRAM was * specified and the varstore doesn't exist ... */ if (!virDomainDefHasOldStyleROUEFI(def) || - def->os.loader->nvramTemplate || - (!reset_nvram && virFileExists(def->os.loader->nvram))) + def->os.loader->nvramTemplate) + return 0; + + if (!reset_nvram && def->os.loader->nvram && + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE + && virFileExists(def->os.loader->nvram->path)) return 0; =20 /* ... then we want to consult JSON FW descriptors first, diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c index 23681b14a4..18a24635ad 100644 --- a/src/qemu/qemu_namespace.c +++ b/src/qemu/qemu_namespace.c @@ -572,8 +572,9 @@ qemuDomainSetupLoader(virDomainObj *vm, case VIR_DOMAIN_LOADER_TYPE_PFLASH: *paths =3D g_slist_prepend(*paths, g_strdup(loader->path)); =20 - if (loader->nvram) - *paths =3D g_slist_prepend(*paths, g_strdup(loader->nvram)= ); + if (loader->nvram && + loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE) + *paths =3D g_slist_prepend(*paths, g_strdup(loader->nvram-= >path)); break; =20 case VIR_DOMAIN_LOADER_TYPE_NONE: diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 2e11d24be2..e53a26c6fd 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4472,7 +4472,8 @@ qemuPrepareNVRAM(virQEMUDriver *driver, struct qemuPrepareNVRAMHelperData data; =20 if (!loader || !loader->nvram || - (virFileExists(loader->nvram) && !reset_nvram)) + loader->nvram->type !=3D VIR_STORAGE_TYPE_FILE || + (virFileExists(loader->nvram->path) && !reset_nvram)) return 0; =20 master_nvram_path =3D loader->nvramTemplate; @@ -4504,7 +4505,7 @@ qemuPrepareNVRAM(virQEMUDriver *driver, data.srcFD =3D srcFD; data.srcPath =3D master_nvram_path; =20 - if (virFileRewrite(loader->nvram, + if (virFileRewrite(loader->nvram->path, S_IRUSR | S_IWUSR, cfg->user, cfg->group, qemuPrepareNVRAMHelper, diff --git a/src/security/security_dac.c b/src/security/security_dac.c index e9e316551e..66c36c57a3 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -1971,7 +1971,8 @@ virSecurityDACRestoreAllLabel(virSecurityManager *mgr, } =20 if (def->os.loader && def->os.loader->nvram && - virSecurityDACRestoreFileLabel(mgr, def->os.loader->nvram) < 0) + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + virSecurityDACRestoreFileLabel(mgr, def->os.loader->nvram->path) <= 0) rc =3D -1; =20 if (def->os.kernel && @@ -2182,8 +2183,9 @@ virSecurityDACSetAllLabel(virSecurityManager *mgr, } =20 if (def->os.loader && def->os.loader->nvram && + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && virSecurityDACSetOwnership(mgr, NULL, - def->os.loader->nvram, + def->os.loader->nvram->path, user, group, true) < 0) return -1; =20 diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 6f02baf2ce..1b6b67e8c7 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -2806,7 +2806,8 @@ virSecuritySELinuxRestoreAllLabel(virSecurityManager = *mgr, } =20 if (def->os.loader && def->os.loader->nvram && - virSecuritySELinuxRestoreFileLabel(mgr, def->os.loader->nvram, tru= e) < 0) + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + virSecuritySELinuxRestoreFileLabel(mgr, def->os.loader->nvram->pat= h, true) < 0) rc =3D -1; =20 if (def->os.kernel && @@ -3212,8 +3213,9 @@ virSecuritySELinuxSetAllLabel(virSecurityManager *mgr, /* This is different than kernel or initrd. The nvram store * is really a disk, qemu can read and write to it. */ if (def->os.loader && def->os.loader->nvram && + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && secdef && secdef->imagelabel && - virSecuritySELinuxSetFilecon(mgr, def->os.loader->nvram, + virSecuritySELinuxSetFilecon(mgr, def->os.loader->nvram->path, secdef->imagelabel, true) < 0) return -1; =20 diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 1f1cce8b3d..d4eb8b08c9 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1006,8 +1006,9 @@ get_files(vahControl * ctl) if (vah_add_file(&buf, ctl->def->os.loader->path, "rk") !=3D 0) goto cleanup; =20 - if (ctl->def->os.loader && ctl->def->os.loader->nvram) - if (vah_add_file(&buf, ctl->def->os.loader->nvram, "rwk") !=3D 0) + if (ctl->def->os.loader && ctl->def->os.loader->nvram && + ctl->def->os.loader->nvram->type =3D VIR_STORAGE_TYPE_FILE) + if (vah_add_file(&buf, ctl->def->os.loader->nvram->path, "rwk") != =3D 0) goto cleanup; =20 for (i =3D 0; i < ctl->def->ngraphics; i++) { diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 34e555644c..214d5e84b8 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -992,7 +992,7 @@ vboxSetBootDeviceOrder(virDomainDef *def, struct _vboxD= river *data, VIR_DEBUG("def->os.loader->path %s", def->os.loader->path); VIR_DEBUG("def->os.loader->readonly %d", def->os.loader->readonly); VIR_DEBUG("def->os.loader->type %d", def->os.loader->type); - VIR_DEBUG("def->os.loader->nvram %s", def->os.loader->nvram); + VIR_DEBUG("def->os.loader->nvram->path %s", def->os.loader->nvram-= >path); } VIR_DEBUG("def->os.bootloader %s", def->os.bootloader); VIR_DEBUG("def->os.bootloaderArgs %s", def->os.bootloaderArgs); --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 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=none dis=none) header.from=nutanix.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 164944020433725.791609932718643; Fri, 8 Apr 2022 10:50:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-WqWsoCLrPOG6D_4T-q3n5g-1; Fri, 08 Apr 2022 13:49:28 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8186833964; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86567145B990; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1EE4B1940349; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 518371940341 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 46F2B1402427; Fri, 8 Apr 2022 17:49:20 +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 41F9C145B98E for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 23830804181 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-WJDU1jyrM8qW7EGkXFEFJQ-1; Fri, 08 Apr 2022 13:49:17 -0400 Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238E5g5x014798 for ; Fri, 8 Apr 2022 10:49:16 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6m19694p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:16 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:13 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:13 +0000 X-MC-Unique: WqWsoCLrPOG6D_4T-q3n5g-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: WJDU1jyrM8qW7EGkXFEFJQ-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 2/8] Add support to parse/format virStorageSource type NVRAM Date: Fri, 8 Apr 2022 10:48:45 -0700 Message-Id: <20220408174851.1077477-3-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40ee0b37-9f06-4b3d-2f0a-08da198817b2 X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: 0n3LkH+iAp/i3POItwQHaS8JASQvJdb/A9HRhlqaDPEWMGUVV84X1W+6Ykd0hdF5NitWs2fLiZn7z5kf3n3ltN2zbUBHvEGxlQlNZBmxVhiF5Bo8QFeQ9rqxr1gWEUqeWInIxEwGtm8v1q+WqDHAzBvvgDzX1+eKkmXFNWp7pnRhEg1LmCUHeATOE1dJCpY+iv1SGaKJfoQJBH7P+aBlgpRd3UNHr9d6MMIbRrP5Llv29k5popuAozEB6DuPeumXwkVIqNnnpxQm5M5t4mfjq7IEe7A1CPizqlwNkbjFCmqcU61WnVG52zH1XtZExrGudICPLcnANwURW0z0VouioHRBfQQ2eIrovA1/yUw6IvPIUMhoNukEUZ3dpgi/di93BW8tqkIWYdYMiFk96wqD7xcozgXfJKEZ+C9QZ38KkI6Fri94rmMw0VaUi30pEoj+2APOCKjFzyzl5vkxTe3pGOwTn8ly54hFASs7pLHi2Qb/VNrb35XVVV9OuTcveTqJVrjJUqhV92MHa1+p14ratr4IjykBkTOzDRwTKaXo33SI+gOfVe2+Q+x4OL7w1ZlnZG6wJUwtagAuO2BVFIRXc142aIbctCPSl9pknMIkIAnL25ma1XVQ4688K/pxS8o/bBPm73pT1ewx4A5CBXrOPhQ25Sn+vBWPv3s6a8dk2pAqigeZ6BjMmQxlSk/davKYHAN5C1sJmWmhLakJ0XEh0g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FJd8ESeZKUeQ6AswqBeR/wlPdxUY1ZFEQ8zPQeTSETtnhs/hKF/4emNMDfdp?= =?us-ascii?Q?06H663MrSciUb2qwnbfolKXsRCEc+kgJ6Z0ug1W3X+zaH/2G2oth8BR3CIrZ?= =?us-ascii?Q?Sx72N/Yvk9ehF5AYtOj9lTj6lpV/m9QaFjV1YoDsfvdZB7VKyKx1RKX1+fQt?= =?us-ascii?Q?sRpqR6gjLAYdowrtU4Re2a6zC96FamoVE3l+wDJp+4Rghl1z/xL1KT2QAxG1?= =?us-ascii?Q?ftQysBD1/DsJYGsTBmMk1dBuBzG80mMtDAvKeoSuxp3/DYodeGmvbyLVVL2Q?= =?us-ascii?Q?A6XlQEiaZZipYGgGf5pVWMR+q8LVWrp8Rtq7W4SB6uueSmK95cCQHBI33A/5?= =?us-ascii?Q?u/Aw5RPBdMc5hJmBNtxL5Ggw9YSP7t8j15czDcakLTHPtuqS6bSwYM1nmou9?= =?us-ascii?Q?b7s22LD7YvAnJz296Zk7uQQDaLWNQHWgIHYzNXbHH3Ni6xtR/caEDKjODjDy?= =?us-ascii?Q?KyHGvPgIsgMC53C3Bhz96QJnDf0NIAclr9ENQWcFPa0AwvkBqzCuZ95R1BhC?= =?us-ascii?Q?oOnvHyWHiwITanH6YeQfkb1tuyJB24VDtShHwlK3o11VWaW0rivwHCPWahyU?= =?us-ascii?Q?NxDuXW4OXGBzJW7W2EpTKApU5uFhGghJDZO3KNXbSzH3lIme0G1kEpQFmUQr?= =?us-ascii?Q?ikTKR009mt7EvxQZhKJsY+hTDUfSbZfbXbY9ps4xv46ZVt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xVs5gBMO1rYMr0dHZFQby6VproArgAnhgu4yIAK27YlB?= =?us-ascii?Q?e672qfhG45Xc9JBG1OWQl6DbPZp86nCukBIReXlJ4Un37M0rFHn5RYxidvpN?= =?us-ascii?Q?3bKudNhvZkEaowFYwZWRCsTklvMjKpBdQR/lXJlsEr8BWyLaviyR7/j39qi5?= =?us-ascii?Q?lzQlLytdIIJ43dDbGCbJj9/FfEhxD7w=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40ee0b37-9f06-4b3d-2f0a-08da198817b2 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:13.1708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JS/r8eeasaeaYjy9dXQt8KY0u3vXEMaAza6SfnG5GTPPbIU/JxALyJUHmov9cJa8MRnb2oTF1RLbAiHzffLbC6kxm3oyw7Vbyd71uo2fGPE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: Wb77LP41EDAdvboYZYr31g_LZF787xk0 X-Proofpoint-GUID: Wb77LP41EDAdvboYZYr31g_LZF787xk0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.85 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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: 1649440206017100005 Content-Type: text/plain; charset="utf-8" This patch introduces the logic to support remote NVRAM and adds 'type' attribute to nvram element. Sample XML with new annotation: or Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- src/conf/domain_conf.c | 81 +++++++++++++++++++++++++++++++++------- src/qemu/qemu_firmware.c | 6 +++ 2 files changed, 74 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b83c2f0e6a..bc8c7e0d6f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17866,6 +17866,42 @@ virDomainLoaderDefParseXML(xmlNodePtr node, } =20 =20 +static int +virDomainNvramDefParseXML(virStorageSource *nvram, + xmlXPathContextPtr ctxt, + virDomainXMLOption *opt, + unsigned int flags) +{ + g_autofree char *nvramType =3D NULL; + xmlNodePtr source; + + nvramType =3D virXPathString("string(./os/nvram/@type)", ctxt); + + /* if nvramType=3D=3DNULL read old-style, else + * if there's a type, read new style */ + if (!nvramType) { + nvram->type =3D VIR_STORAGE_TYPE_FILE; + nvram->path =3D virXPathString("string(./os/nvram[1])", ctxt); + return 0; + } else { + if ((nvram->type =3D virStorageTypeFromString(nvramType)) <=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown disk type '%s'"), nvramType); + return -1; + } + source =3D virXPathNode("./os/nvram/source[1]", ctxt); + if (!source) { + virReportError(VIR_ERR_XML_ERROR, + _("Missing source element with nvram type '%s'"= ), + nvramType); + return -1; + } + return virDomainStorageSourceParse(source, ctxt, nvram, flags, opt= ); + } + return 0; +} + + static int virDomainSchedulerParseCommonAttrs(xmlNodePtr node, virProcessSchedPolicy *policy, @@ -18251,7 +18287,9 @@ virDomainDefParseBootFirmwareOptions(virDomainDef *= def, =20 static int virDomainDefParseBootLoaderOptions(virDomainDef *def, - xmlXPathContextPtr ctxt) + xmlXPathContextPtr ctxt, + virDomainXMLOption *xmlopt, + unsigned int flags) { xmlNodePtr loader_node =3D virXPathNode("./os/loader[1]", ctxt); const bool fwAutoSelect =3D def->os.firmware !=3D VIR_DOMAIN_OS_DEF_FI= RMWARE_NONE; @@ -18268,8 +18306,10 @@ virDomainDefParseBootLoaderOptions(virDomainDef *d= ef, =20 if (virXPathNode("./os/nvram[1]", ctxt)) { def->os.loader->nvram =3D g_new0(virStorageSource, 1); - def->os.loader->nvram->path =3D virXPathString("string(./os/nvram[= 1])", ctxt); - def->os.loader->nvram->type =3D VIR_STORAGE_TYPE_FILE; + + if (virDomainNvramDefParseXML(def->os.loader->nvram, + ctxt, xmlopt, flags) < 0) + return -1; } if (!fwAutoSelect) def->os.loader->nvramTemplate =3D virXPathString("string(./os/nvra= m[1]/@template)", ctxt); @@ -18324,7 +18364,9 @@ virDomainDefParseBootAcpiOptions(virDomainDef *def, =20 static int virDomainDefParseBootOptions(virDomainDef *def, - xmlXPathContextPtr ctxt) + xmlXPathContextPtr ctxt, + virDomainXMLOption *xmlopt, + unsigned int flags) { /* * Booting options for different OS types.... @@ -18342,7 +18384,7 @@ virDomainDefParseBootOptions(virDomainDef *def, if (virDomainDefParseBootFirmwareOptions(def, ctxt) < 0) return -1; =20 - if (virDomainDefParseBootLoaderOptions(def, ctxt) < 0) + if (virDomainDefParseBootLoaderOptions(def, ctxt, xmlopt, flags) <= 0) return -1; =20 if (virDomainDefParseBootAcpiOptions(def, ctxt) < 0) @@ -18358,7 +18400,7 @@ virDomainDefParseBootOptions(virDomainDef *def, case VIR_DOMAIN_OSTYPE_UML: virDomainDefParseBootKernelOptions(def, ctxt); =20 - if (virDomainDefParseBootLoaderOptions(def, ctxt) < 0) + if (virDomainDefParseBootLoaderOptions(def, ctxt, xmlopt, flags) <= 0) return -1; =20 break; @@ -19649,7 +19691,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt, if (virDomainDefClockParse(def, ctxt) < 0) return NULL; =20 - if (virDomainDefParseBootOptions(def, ctxt) < 0) + if (virDomainDefParseBootOptions(def, ctxt, xmlopt, flags) < 0) return NULL; =20 /* analysis of the disk devices */ @@ -26949,9 +26991,11 @@ virDomainHugepagesFormat(virBuffer *buf, virBufferAddLit(buf, "\n"); } =20 -static void +static int virDomainLoaderDefFormat(virBuffer *buf, - virDomainLoaderDef *loader) + virDomainLoaderDef *loader, + virDomainXMLOption *xmlopt, + unsigned int flags) { g_auto(virBuffer) loaderAttrBuf =3D VIR_BUFFER_INITIALIZER; g_auto(virBuffer) loaderChildBuf =3D VIR_BUFFER_INITIALIZER; @@ -26976,10 +27020,20 @@ virDomainLoaderDefFormat(virBuffer *buf, =20 virBufferEscapeString(&nvramAttrBuf, " template=3D'%s'", loader->nvram= Template); if (loader->nvram) { - if (loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE) + if (loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE) { virBufferEscapeString(&nvramChildBuf, "%s", loader->nvram->pat= h); + virXMLFormatElementInternal(buf, "nvram", &nvramAttrBuf, &nvra= mChildBuf, false, false); + } else { + virBufferEscapeString(&nvramAttrBuf, " type=3D'%s'", virStorag= eTypeToString(loader->nvram->type)); + if (virDomainDiskSourceFormat(&nvramChildBuf, loader->nvram, "= source", 0, + 0, false, flags, true, xmlopt) <= 0) { + return -1; + } + virXMLFormatElementInternal(buf, "nvram", &nvramAttrBuf, &nvra= mChildBuf, false, true); + } } - virXMLFormatElementInternal(buf, "nvram", &nvramAttrBuf, &nvramChildBu= f, false, false); + + return 0; } =20 static void @@ -28180,8 +28234,9 @@ virDomainDefFormatInternalSetRootName(virDomainDef = *def, if (def->os.initgroup) virBufferAsprintf(buf, "%s\n", def->os.init= group); =20 - if (def->os.loader) - virDomainLoaderDefFormat(buf, def->os.loader); + if (def->os.loader && + virDomainLoaderDefFormat(buf, def->os.loader, xmlopt, flags) < 0) + return -1; virBufferEscapeString(buf, "%s\n", def->os.kernel); virBufferEscapeString(buf, "%s\n", diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 6556a613a8..22ad7d42a1 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1375,6 +1375,12 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, && virFileExists(def->os.loader->nvram->path)) return 0; =20 + + if (!reset_nvram && def->os.loader->nvram && + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_NETWORK && + def->os.loader->nvram->path) + return 0; + /* ... then we want to consult JSON FW descriptors first, * but we don't want to fail if we haven't found a match. */ needResult =3D false; --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 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=none dis=none) header.from=nutanix.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 1649440211672149.98539968617513; Fri, 8 Apr 2022 10:50:11 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-7c6mYn0yOGiBOzTOaLEKWg-1; Fri, 08 Apr 2022 13:49:35 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4B5D1280B070; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EB4240E80E0; Fri, 8 Apr 2022 17:49:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 72536194035F; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 94D29194034C for ; Fri, 8 Apr 2022 17:49:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8335C814B; Fri, 8 Apr 2022 17:49:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CFF49D51 for ; Fri, 8 Apr 2022 17:49:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 F19031C08DD2 for ; Fri, 8 Apr 2022 17:49:18 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-177-YB4JFUUeNueDIiYuxHBd5w-1; Fri, 08 Apr 2022 13:49:16 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238EMqEn009873 for ; Fri, 8 Apr 2022 10:49:15 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6p1yp13w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:15 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:13 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:13 +0000 X-MC-Unique: 7c6mYn0yOGiBOzTOaLEKWg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: YB4JFUUeNueDIiYuxHBd5w-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 3/8] Validate remote store NVRAM Date: Fri, 8 Apr 2022 10:48:46 -0700 Message-Id: <20220408174851.1077477-4-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bdffdc21-5f31-4a62-bcbf-08da198817f2 X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: dCBq+nJ16s7pqpJvMxNuhaLfwczMmJwxfz2CEtzaTHh+Sl884DrK1g2LG/fuqumabBSdv/FiuZltalGF1suQJ0wEOFDAkRWdUtVOYaqubdzJOIZzyMSkljTLuyoHdY5HHZ14CH/G+KLrPgS9+qPn7XvKMPShBeU1ao0Vu+oKoMkgyKeUE2s6YJIt8wrnyZq3hr/sJWvPTgfcYSUKKozaSZeW1xOVH1Gl110HYsO37OSKcWO/bYEHg2+5xB7TF7Xjm+aWQ8BQKuZK7+PN/VLjbDiUPJ590NNVCXwl+rIhFIpZRp7u3dUso85xWl4/+czgkSGfOtg/eNitogrp9zjYtdsoyQFdaYuQ6eCqg7V6z0oCLE9mT6mIz2OtQm4JhWuosA0wVajPO87koXhXoTglcW9lXVZGWzz3PCuBXZ1ZKdMeNxQiW8i4eC9ndn7xRjHudtOiJ955WZx85yqu8v3s5ZcURf5rzhkGqudoabIxsjtc17nSpAhnhOHHSC7Br7SWuxM2dkeEerHzvdiBa+zEB8pJep0MaxOdTuQD5dCZgLvwH2V6QSbWADcXeor1B3RHOxdYZgy/SMrj74F3CLignF8Xylo6J1jwXoZuQAhOBBvV86lpFHnpE6nvZmUw/tNDpuGIWnyqJvOgokrq9+B3LhWyXdaAHCjR+5AlDj2jfK/h1PfsO0CxZPp+KOLfpK9d X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?dUIHvT6D2NS49iZ5Vy9VH0q1JDzhCkmMZmCDsKNQv9YGo97Y9LokSPkDcnAT?= =?us-ascii?Q?G8Vh746xMWyMF/lbUtI0I6qWjmlYLwVsQPJzySlwMmOUNunD5DoDrEObWbeo?= =?us-ascii?Q?003qHovQ5nYLBLcsnO2qKyhs9G0exybQKCIlbaHOd1b+elYe6tVGj0YjB9IB?= =?us-ascii?Q?NC9Xn1LCuKUQ1XH/4Xipk75swTxm0J9xjvj7GhXXDXjXCqdauG81owg3r66K?= =?us-ascii?Q?dkngTzY5WJNyX9nyg+5kvIWMrYpZsbX9OM8rYlddPIdXf+Zm4/BI+C7fnEqZ?= =?us-ascii?Q?pdEz8rD4KS6fgsIRtzNFUux2zv+So9pWZHMSTRXx/ANU9VoVWC1D1A+T3eLU?= =?us-ascii?Q?K/jWpC2HRPJTCrKcjDOIEfIO23aURvdawhWN+KTdD5tz0M6iNKn9ELcAKbgW?= =?us-ascii?Q?tLS2j4p7VUi0PC+/g5yPI9AIA8HPPNqGHniWzlvwTM7cbA0XweZKhHWBnKLe?= =?us-ascii?Q?Vzkxm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JtVh5qElfbiXYm2GVvM?= =?us-ascii?Q?ExUmdLZz43usbqsmYTo8cUa+e/I43KAVEBPvbxZ1IyaXGhxwErSqvwXsYOaI?= =?us-ascii?Q?4WkIpKj+A2B0rOhpcEeI0ggfbtnu9XOlcEGc68tnv3/yg10OsXD5XLkPTxx3?= =?us-ascii?Q?fso+8zyfRUNK50FhR6HqR+Lc7hIzglW44bvIp6XjvA+RDtk8T3MDZrX+DItS?= =?us-ascii?Q?Qrm5vbjghEYZSjb+4RJrZveCg2KVDJhKGVMu3GTqW1m/+gwLE6XiUrxyDqNc?= =?us-ascii?Q?250uF7WCFoKmgkm7A8J0WynM3n7+XZcKfgR6wncmxD+GhLGg1brNY7pji/oD?= =?us-ascii?Q?z8B4zLEYioIazOYCikZ5mgntELnJdOXdCiLPr9F6RQeQtYRxH+VeHERqdNAu?= =?us-ascii?Q?dOtPtJykEvwdm+8C/y4NfViX/lZXrGk=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdffdc21-5f31-4a62-bcbf-08da198817f2 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:13.5939 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SGjNEytCzYdNmRXcpZNy3u/t1MrZQBwScDiLa8me1CQFPd23NjJgvHWNU5IsSEGoDUOj0bBGhWP7qLN5MOox/TkpqbC+wqFFc714cf7p3tA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: kPLEia56LDHVOykE8qs0Ztk62QsXd13U X-Proofpoint-GUID: kPLEia56LDHVOykE8qs0Ztk62QsXd13U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.79 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: 1649440212213100001 Content-Type: text/plain; charset="utf-8" Remote store NVRAM feature is being enabled only if it supports 'blockdev' capability. Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- src/qemu/qemu_validate.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 96f5427678..2a961b1f50 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -611,6 +611,25 @@ qemuValidateDomainDefBoot(const virDomainDef *def) } =20 =20 +static int +qemuValidateDomainDefNvram(const virDomainDef *def, + virQEMUCaps *qemuCaps) +{ + if (def->os.loader && def->os.loader->nvram) { + if (def->os.loader->nvram->type !=3D VIR_STORAGE_TYPE_FILE && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("This Qemu does not support 'blockdev' capabi= lity " + "for remote store NVRAM. NVRAM type other tha= n " + "'file' is not supported with this QEMU")); + return -1; + } + } + + return 0; +} + + /** * qemuValidateDefGetVcpuHotplugGranularity: * @def: domain definition @@ -1185,6 +1204,9 @@ qemuValidateDomainDef(const virDomainDef *def, if (qemuValidateDomainDefBoot(def) < 0) return -1; =20 + if (qemuValidateDomainDefNvram(def, qemuCaps) < 0) + return -1; + if (qemuValidateDomainVCpuTopology(def, qemuCaps) < 0) return -1; =20 --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 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=none dis=none) header.from=nutanix.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 16494402134081017.39915701368; Fri, 8 Apr 2022 10:50:13 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-653-lU4TSuwSNpmb7cPa_o8j1A-1; Fri, 08 Apr 2022 13:49:33 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34B02833966; Fri, 8 Apr 2022 17:49:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15C44403171; Fri, 8 Apr 2022 17:49:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DD6071940344; Fri, 8 Apr 2022 17:49:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 79C251940349 for ; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6C5EA2167D63; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63FD12166BDD for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 29A5A85A5A8 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-424-knhZuzrFNfaFqVMFWFgYig-1; Fri, 08 Apr 2022 13:49:18 -0400 Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238E5g60014798 for ; Fri, 8 Apr 2022 10:49:17 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6m19694p-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:17 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:14 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:14 +0000 X-MC-Unique: lU4TSuwSNpmb7cPa_o8j1A-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: knhZuzrFNfaFqVMFWFgYig-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 4/8] Cleanup diskSourceNetwork and diskSourceFile schema Date: Fri, 8 Apr 2022 10:48:47 -0700 Message-Id: <20220408174851.1077477-5-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1680b688-b378-4485-b6fb-08da19881830 X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: 2hMfxuxZrOX/V3YHjcQ+pGkWUBjSKUdy2d0yGjdmSL1K/v4gByiANlD2NkeN5tJHbYLIA2cFUmBahH5yQfdTW+9IvrDT2qGOJx5FTSQoP8V6B/N7oGmjr17x5h7adPTDEdSxekPkQ6xalm6+6r+mu9N+RbSJVdmAP9abSzkKsFS5+cq+7Usf3klLkKMny55uDsoJpRju0Gpf6LMhty9enjpbyULqNbGCvL2jUF9NAMeiezfT3hjUY+C3vfn6qZSvNbEhoo8IhhHlHF12EgVDGD2m4IJcx1iG/wiN4XnE5Zy24n/xTcKoOcfDPczGOPiMqhtgRPFXhfcANwFr9DPxzJSH9sx0FvDJIpTPb+lNZU40B7TxtfNSP21B77gtbAzvrTfKVQl8sv/zoFlikBXNdyUaZplYqRmYSDrk5NktAIKdst9xJ5xFyGaubTd/TqXsUkU1176HXOQqAxUOxaC7yrPFjNQ6bZRCfkKIw/YnmxL0w9knM6YDdBPQKOdG+cx3DjyIQ/7hVzXDqifuno+ZSR4PX9LuSlejwldhqciuL2LBffeZkIMrivGi+9dhHexKs8MLe3xJ7TTpHmtuu7wrYuRnpVl5PYbrj/QU+rxjMOEfhJP1kiCNaDVoGmxu25B8DgwtjDhEddmwGyajd8gTE7YVNgX9MusWaQQpJfcFSxMR51z11x5pkf3eeyip/j+O5gB3SVr+oAWG0ut3gzxxaw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?aqZDbh9rS/ZLI+qBoSw5ke76hc5VbMQsIJwl3eULu82MigB8HyLSNFYrnBaR?= =?us-ascii?Q?IVCKasvaAUb+jyow296PjHEyOwkkTSv0pqc6TWWhqkGP1bOKWpoWbegZNZCF?= =?us-ascii?Q?/8+jPenbFvBwiB+4UFX3wrKUHd2kRbnIF+2xZHARmFtYuEEgdBR9p6Ygf9Bl?= =?us-ascii?Q?IYfNlN1R4AqW7Ojy2Sil1TcfwcVGEKnze7TA2n+QfMQbLshqZ4d71RHJhCm7?= =?us-ascii?Q?BWBF15rTK3RnVdi5skDjTMBUI4jhCPTiNvqQVK3VNJE18tgbM7vqnMCsgKHl?= =?us-ascii?Q?Ig9J1ZLkvMrqkOEofWBW0ngQ3FNnf2vlNYrk8IU9I6wQHe/9CtM0b1sqHtZH?= =?us-ascii?Q?zvw/qty8u7cliMaK4seh/G9U/DWWPmjIf+I3r72mSOgx4vxVxQt2+BGY+4AQ?= =?us-ascii?Q?JscxtpNgJIhy0i9q8TKNe3VPbOcoEfiCAX4LzqAEXYZLnz0UG5doE9ZdI0MJ?= =?us-ascii?Q?7byEeTUf7N6F0HFKdhFvzILFU0rMhCC1IyrCXcNoXtl7oorooLF6ehyZjfZK?= =?us-ascii?Q?TK9XavCCJ1mN5eL4vkbjE1R4IHhQ5vvfUND82YezyIX4RGMqIAB4jK9OBkyv?= =?us-ascii?Q?419rlYC5cXyvzgme2pHiUrgLNn1c9tjINw0uaf1098nMGl0zW1Z39n3Z49Ep?= =?us-ascii?Q?0Bx11vDjSmaNDhZ1vxK4GdjyCnHH+qsSKbssFIW0/G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VpgQU7N8WT4ECJsH2DxTB2LcWkH9oBOGdpuoPK12XCzM4RhP/DqY?= =?us-ascii?Q?UWRzxY1EnuJEbl4GxZKC+MQMkqMpY+IbvMgdWHzvSM4yuASuWA1j53+50pU2?= =?us-ascii?Q?tW/z0qYyBj+PaxPvIcy4TJJv8Q9RzXR3iiNqvN1xY5qH2nlk6Ij7p4AZBgM3?= =?us-ascii?Q?pC3kWYv35cCnsoK91ldtr4KN0UgPVS4=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1680b688-b378-4485-b6fb-08da19881830 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:14.0001 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eUnHE7P1rBZ9CepxeDpf9GqajAWikq8HuAVRgyGn4ELdI2MCz1/Ezd2CtaRZzKUKLxhVrF7uRR1Sa2VEboTgxdVx72aWjUgOyPbVXWqFAH4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: YQNAvSZsJPdY3enohcEUTif8Rh-vTS2H X-Proofpoint-GUID: YQNAvSZsJPdY3enohcEUTif8Rh-vTS2H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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: 1649440214082100003 Content-Type: text/plain; charset="utf-8" Moving diskSourceNetwork and diskSourceFile's Source definition under 'define' element, so that it will be easier to reuse it at multiple places. Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- src/conf/schemas/domaincommon.rng | 60 +++++++++++++++++-------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index c0c14fe558..58eb9670d4 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -1724,6 +1724,31 @@ =20 + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1731,28 +1756,7 @@ - - - - - - - - - - - - - - - - - - - - - - + =20 @@ -2147,10 +2151,7 @@ =20 - - - network - + @@ -2165,6 +2166,13 @@ =20 + + + network + + + + volume --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1649440205233969.2444720571402; Fri, 8 Apr 2022 10:50:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-528-pszEYV7NMLChN5L040Vrbg-1; Fri, 08 Apr 2022 13:49:28 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F009786B8B4; Fri, 8 Apr 2022 17:49:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA76640BB4F; Fri, 8 Apr 2022 17:49:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AB58D1940372; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B7C6E1940341 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9C6A1141511B; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97BE81415107 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 7C039801E67 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-Sor50D-lM8iisqgjL3Ynng-1; Fri, 08 Apr 2022 13:49:18 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238EMqEq009873 for ; Fri, 8 Apr 2022 10:49:17 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6p1yp13w-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:17 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:14 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:14 +0000 X-MC-Unique: pszEYV7NMLChN5L040Vrbg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: Sor50D-lM8iisqgjL3Ynng-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 5/8] Update XML schema to support network backed NVRAM Date: Fri, 8 Apr 2022 10:48:48 -0700 Message-Id: <20220408174851.1077477-6-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 79d2ce03-b697-4518-d7a7-08da19881875 X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: aZOblp/wW66fi0MwQqeC4G7fkidmJRthQL4yfmW13SQxlnPIsNoEuNNq0+A68emsOd6oWtMie9y1h1yN44SEOHcKtOosIwrd2LFhxnqazqDt6wYocAnn13Z0wjcy4+LEmR1u5DIxE9gR0JSdl2foxme4CLb/qc31c0xGHsuS4usPahhw5hjRF5+Ytjadw5q1q8MMjUfsVf7FmBAsJpfFY55TmPkylfn20GGFU9mX5vTHMkHSiQXY03CaJDqVnWZS8W4LRzN7kx1RvGXltIkWTWwVEpNrxeVYBhUC8FVTqOgAufCnpZqzxgJvyKk+xnZGFwQFogDi2IxtZT/jWShppxscl1N3IM+JgejRD3dx4jyQqeSqC754TXBCsMrYFkOKlfgnCXpXEc6nP33mhodHPAO0lmWtXdgFHQAyq6cMpgUuSJZSMy3oH8OINXOrnsqhdztsa/aJMnbNKw/B/UFDLLyV+i6yvYmoQAXNC+UIK7J+MpCU5wTOiyB/xIzVkYb725Qd6v2uOK7Sw+nTGAFSxiObiFtSfxTs7xhFE7/j0Cm6KNB/Vt+DUjygNJVKz4mCzzDTbt1IowYN+WtatoCOFXIMTv7t784rhiRtaccdCCUd6EYtjoUpCyqr1p06xEP8JVov2ECemTDAIbc5df1UY776FdDcRcHQ9D60TX51Pam4YL6jb3Hhn3NHBXYa3VKFSWfviEmssDGdXdzb//ncFg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(15650500001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lXU3Vz85/xPNudP9mgy26MfqMs/5P+/MOSV/ryIfZ+H9XvjlKcEYWV+SurRx?= =?us-ascii?Q?jXQnY8ejrU+WutF01dT1aS2NnINJxcot2m63zqkdvbtFV2VWp8If4vwrvi5J?= =?us-ascii?Q?X1DVsqroVFPuc5NEmw665ANwQIUl+5jw/t/KGFiZEgxWEWh+yf1wFYc5tXKn?= =?us-ascii?Q?QU/KPmIF/pTp/V/rfGVmYLsOtuzbMXjLqsrIfTRI+AiwjwK7/ywWGIEAg/U9?= =?us-ascii?Q?1TGW3zA5RmAO+UDrGvqRuQ10RWi9qzS1usLMQO5KaJpwpyNhfDjAiYn2n0HC?= =?us-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ltIGEDFkRHUVpnwe+R5Ew4OS1Qft8fpnlv43z4jVe?= =?us-ascii?Q?VFDc+pus221xVi1X8uu708gPtEIMqFGM7nzmfNuYn3XbafDpd5Rr8kOK4ZNU?= =?us-ascii?Q?NDaqOPNXge4LPKE3DGT4PX7hk/CDNJLgsVyLdJ7r/CeJ7cnie+gI9HYRSc1o?= =?us-ascii?Q?EEl53L9DbxS2wIvaOypV/Xuh0XuCJScKTkUm7vnccZj3I5tLpbZv58obLy3M?= =?us-ascii?Q?JITXaiWb6cZ2RqnA+GJ+Sv4ycOwaTQcaAol2ekpKdIyleWyWcZ+wtlpFSLS7?= =?us-ascii?Q?JjIaPt13sEG0ccigtEFyeSmQi8krQFcpcZbtSGbM79z53bkXrkbEhXbNJKhg?= =?us-ascii?Q?ODOz1bNO0Jt4l+a7ZbNE95BePYfkh3800R8XasWt+l8MokqSuulrbzE92zXZ?= =?us-ascii?Q?H2G5ODTHiOtIiwLakbgTbwmR+Jk8CNx8TX5fviDpX/mOIaiW5zAmz92K4hGn?= =?us-ascii?Q?PT4QPMng3f3USLfcT4nelMQR+T5vQUKl9KGYpNPQX/5QqXEv8r/Xj+8F8ULc?= =?us-ascii?Q?Up8fEHEp07QPo7uijQVr+fn9cqTVquQDCpObTp7d+qcP6MhmLXNXkvi/Zj0y?= =?us-ascii?Q?CQFqkYNeeMXLWX9yfmesmZu7bD5RChY=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79d2ce03-b697-4518-d7a7-08da19881875 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:14.4687 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Rs5HjZ189cJeNu8DaeRAgKm3xYg/FRb0vq6PYBQWnrq6twlr9db6yLh9/sEK0Om6wRQUPIwpTRMZawY9mKY6Wj2zb75sMRirZSY3zv9d3KQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: kdy3wolqrJIbHOzHqMJnllhPciPfyuQk X-Proofpoint-GUID: kdy3wolqrJIbHOzHqMJnllhPciPfyuQk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.85 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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: 1649440205971100003 Content-Type: text/plain; charset="utf-8" This patch updates NVRAM element schema to support network backed NVRAM. It introduces 'type' attribute to NVRAM element. Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- src/conf/schemas/domaincommon.rng | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 58eb9670d4..cd61d00b33 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -333,7 +333,25 @@ - + + + file + network + + + + + + + + + + + + + + + --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 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=none dis=none) header.from=nutanix.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 1649440203226538.2516359360035; Fri, 8 Apr 2022 10:50:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-368-8vGHARWIOyCUZ1P4HdNuXg-1; Fri, 08 Apr 2022 13:49:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 635FE80C8D9; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4948840CFD06; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E39E2194034D; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4CBD01940357 for ; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3E4C3432467; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 39E27432460 for ; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 1D5B4801E67 for ; Fri, 8 Apr 2022 17:49:21 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-RpMogZ-8OuKS157JSykcpw-1; Fri, 08 Apr 2022 13:49:19 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238EMqEr009873 for ; Fri, 8 Apr 2022 10:49:18 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6p1yp13w-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:17 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:15 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:15 +0000 X-MC-Unique: 8vGHARWIOyCUZ1P4HdNuXg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: RpMogZ-8OuKS157JSykcpw-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 6/8] Update NVRAM documentation Date: Fri, 8 Apr 2022 10:48:49 -0700 Message-Id: <20220408174851.1077477-7-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d130b14d-60b1-404e-e3ad-08da198818c6 X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: 3TR4H6tL1pwb2TUlw7ktrSw/pONieUEzCjRxQTcRti5g0Ny1Cyy0RKRjbmEP69+EouBChilmjA69vX/oMm6F2YF6FnuaNyfjymNs83u8HybZ28scX5Ey776GNywkhbYcTX14XM9Jhzx12iKXNHZl4esCrmy0FRliP7K7ztFc9ybiuBBIB7wATtdZaAJuhiYvH9Ny/VhW8KAYWbGhXmVHNnReQdBcWi85IvkpDDd+J7SfuCXPv7ga5kT2BH1pVWncs0jAQEKXMFPFn428v1JP8fK60gG0H2lnCRPs5RSEGplWlpLJzzFRmh4U3/plwxvxOt16lc+r6EYHYtLQ+FMVYdsEiL8GOXv7emMR8Cb8qqsTzbB4qp9jynbZf5cIDtbeLFn2FlRcO3bAn4HAr4xxPlmknOlhlfG4zqKfGUwmZ/z4sdZCBcYHXyYhDDIKC+GZ+4diNYcdjtJza0O+6cWXXccWBFyErPI3uLURbthPLNRDvEtpe/twrx0QQ4+cJfI9CvAlY8IL5UaWzF5yzGpg3dJMEkTzIjDI1miqjTwvSNMeolNv4KLVFvkH55A+miHEDXcT2zOALN2Q8gprV4ntyFjwZqZocbV/lI+0w+FUaE9LzGlAtLcqvZ3Dp5rW+heMj0cypUq6O/SBr8sub8TLb80aV9nmi4yT+X7tfLTeD5vQD2mLNvAxqXrjeO8j0gLLEd0RqqF/JSPjPby/WLtk5g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSp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VbK?= =?us-ascii?Q?b94L5WkSieXrw12bnD7lzvA7rmndYyM=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: d130b14d-60b1-404e-e3ad-08da198818c6 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:15.0155 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8h3moW0nd6U2tka19lrdWnvVuU2KMdGi9vKdMN0+FpcZiE2HWKQ7ddfrbv54f3PbHk0F8PpItMIDJbUF1gJYaT5PRD7GNBrtChM4r9wyCkQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: owlMli45XYhni5wcLv5Qq600OBDdYWGv X-Proofpoint-GUID: owlMli45XYhni5wcLv5Qq600OBDdYWGv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: 1649440203991100001 Content-Type: text/plain; charset="utf-8" Updating the doc as now NVRAM can be remote as well. Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- docs/formatdomain.rst | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 24fbfd8670..53361c7996 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -141,6 +141,31 @@ harddisk, cdrom, network) determining where to obtain/= find the boot image. ... =20 + + ... + + hvm + /usr/share/OV= MF/OVMF_CODE.fd + + + + + ... + + + ... + + hvm + /usr/share/OV= MF/OVMF_CODE.fd + + + + + + + + ... + ... @@ -222,14 +247,16 @@ harddisk, cdrom, network) determining where to obtain= /find the boot image. :since:`Since 2.1.0` ``nvram`` Some UEFI firmwares may want to use a non-volatile memory to store some - variables. In the host, this is represented as a file and the absolute = path - to the file is stored in this element. Moreover, when the domain is sta= rted - up libvirt copies so called master NVRAM store file defined in ``qemu.c= onf``. - If needed, the ``template`` attribute can be used to per domain overrid= e map - of master NVRAM stores from the config file. Note, that for transient d= omains - if the NVRAM file has been created by libvirt it is left behind and it = is - management application's responsibility to save and remove file (if nee= ded to - be persistent). :since:`Since 1.2.8` + variables. They can be present on host or on some network storage. + In the host, this is represented as a file and the absolute path + to the file is stored in this element. On network storage, + this can be accessed by providing network path. Moreover, when the doma= in + is started up libvirt copies so called master NVRAM store file defined + in ``qemu.conf``. If needed, the ``template`` attribute can be used to = per + domain override map of master NVRAM stores from the config file. Note, = that + for transient domains if the NVRAM file has been created by libvirt + it is left behind and it is management application's responsibility to + save and remove file (if needed to be persistent). :since:`Since 1.2.8` ``boot`` The ``dev`` attribute takes one of the values "fd", "hd", "cdrom" or "network" and is used to specify the next boot device to consider. The --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 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=none dis=none) header.from=nutanix.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 1649440204140293.62123885644996; Fri, 8 Apr 2022 10:50:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-iuHQY4mXOeaW3nq0D2UHeA-1; Fri, 08 Apr 2022 13:49:32 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D978282B7F5; Fri, 8 Apr 2022 17:49:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 461E9432467; Fri, 8 Apr 2022 17:49:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7A7791940372; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8EAFF1940341 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 812D7401E2B; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C12D403176 for ; Fri, 8 Apr 2022 17:49:20 +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 5F7E4282B7E8 for ; Fri, 8 Apr 2022 17:49:20 +0000 (UTC) Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-616-AwkikYYAMdKr_jZZf-rpAQ-1; Fri, 08 Apr 2022 13:49:18 -0400 Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238E5g61014798 for ; Fri, 8 Apr 2022 10:49:18 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6m19694p-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:18 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:15 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:15 +0000 X-MC-Unique: iuHQY4mXOeaW3nq0D2UHeA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: AwkikYYAMdKr_jZZf-rpAQ-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 7/8] Add unit test for network backed NVRAM Date: Fri, 8 Apr 2022 10:48:50 -0700 Message-Id: <20220408174851.1077477-8-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4e06c6b-50b0-4e67-bcce-08da19881915 X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: QsO6BqWbfD4l9YrOAjNWzfqzL8qLWOFHs3/LKNW0IabbQNcwUGnPNlIGgwwEZ4f0aAhq+udlc14S+S6fiM0785EwRBi2SZJ2+jcIDii/5ku6548B1tJRJXDBmIzKVN17ZpXpG5oBvvrbWHzWtqfJ95/K0suw44W6yg1zwHHsCRmkw/nj00dYP0hdFmgw9PuuHPXy0TadZuvAMf4VobiSjuZYk1KhIwHZeJP3vH8/w94Y89xXz1k4mbmdebk6KITEbv2VeRCMNIaea7gEH5UPfSUHvO0/EQrHaO8jv4bop4UF0/Wad8RkuYQgFIGOyFWL4ypDEidsMgdLi/+8DC2ZHV9LCI7izdnTujdsrgZOCXxbqVNK6LUG6UYSpJQEoa0fJW/Z9gnV0Aj5nIC1AaWx2QZd/8ZV+zr1N/3jznZai9u14adzMJqkxIDHpk5bJqOFR3pBfOaDgZqm6mJ22+q+HR3tfzWIZMF7MDQBelVdpRwPJeGa1cBq3dCHE/oMfUZ7wXf4Ndz0RWcOzMR5smYJLmqmKHdPf/v4EZFgoMFPyX8ZElOVYPk+H9jaI4Tmf3z73he20XHkdYK9p/4VTeGS5MUxjzrW+1QQAwDJq9rQslveYfUPB0bIBZvhzWZZUkLX2z+yNAQEE6JnTrzRUMgqTgru++bVzIAs3D3ZsjOymBOKXwjZC6th01sCXBe0TQ0KRTT/LBAZpByTb5qwEQGalg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5qle3OsdHA1z2vM7wEXtOD6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atorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4e06c6b-50b0-4e67-bcce-08da19881915 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:15.5166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CjrWRfzUVjOkPtj5wV6yC8BR2nyqWxBbfBkzzYsl++D2IAcle3j9Bj3flMvFMzvVEQrHVkwDNWxSPVawVVHOq0IkbFRTXoj/pVZBBaLvYAg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: eOlrqtskC5L_HqDn0T-hOURJ29SsDElW X-Proofpoint-GUID: eOlrqtskC5L_HqDn0T-hOURJ29SsDElW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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: 1649440205993100004 Content-Type: text/plain; charset="utf-8" This patch adds unit test for network backed NVRAM Example: Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- .../bios-nvram-network.x86_64-latest.args | 37 +++++++++++++++++++ tests/qemuxml2argvdata/bios-nvram-network.xml | 25 +++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 63 insertions(+) create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.x86_64-latest= .args create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.xml diff --git a/tests/qemuxml2argvdata/bios-nvram-network.x86_64-latest.args b= /tests/qemuxml2argvdata/bios-nvram-network.x86_64-latest.args new file mode 100644 index 0000000000..f8a4ff812c --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-network.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-test-bios \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-test-bios/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-test-bios/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-test-bios/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dtest-bios,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-test-bios/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","nod= e-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}'= \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver"= :"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"iscsi","portal":"example.com:6000","target":"iqn.201= 3-07.com.example:iscsi-nopool","lun":0,"transport":"tcp","node-name":"libvi= rt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver= ":"raw","file":"libvirt-pflash1-storage"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,pflash0=3Dlibvirt-pflash0-form= at,pflash1=3Dlibvirt-pflash1-format,memory-backend=3Dpc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}= ' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 362d1fc1-df7d-193e-5c18-49a71bd1da66 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot menu=3Don,strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/bios-nvram-network.xml b/tests/qemuxml2= argvdata/bios-nvram-network.xml new file mode 100644 index 0000000000..ffc590ddfa --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-network.xml @@ -0,0 +1,25 @@ + + test-bios + 362d1fc1-df7d-193e-5c18-49a71bd1da66 + 1048576 + 1048576 + 1 + + hvm + /usr/share/OVMF/OVMF_CODE.fd<= /loader> + + + + + + + + + + + + + + /usr/bin/qemu-system-x86_64 + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ed41b7a7a2..7700ed6cb1 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1198,6 +1198,7 @@ mymain(void) QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_VIRTIO_SCSI); DO_TEST_CAPS_LATEST("bios-nvram-template"); + DO_TEST_CAPS_LATEST("bios-nvram-network"); =20 /* Make sure all combinations of ACPI and UEFI behave as expected */ DO_TEST_NOCAPS("q35-acpi-uefi"); --=20 2.25.1 From nobody Sat May 11 19:51:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1649440173925159.61417771429956; Fri, 8 Apr 2022 10:49:33 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-ADBIS3nlMk6Mcdz0o2ZKsQ-1; Fri, 08 Apr 2022 13:49:31 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 18C8D280B06C; Fri, 8 Apr 2022 17:49:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9254145B990; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 697001940376; Fri, 8 Apr 2022 17:49:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D3217193F50A for ; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C5993404778D; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C08664047D29 for ; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 A28A3282B801 for ; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-246-T_zaGL1kOnWMFU2P3cLd4A-1; Fri, 08 Apr 2022 13:49:21 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238EMqEs009873 for ; Fri, 8 Apr 2022 10:49:19 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6p1yp13w-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:19 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:16 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:16 +0000 X-MC-Unique: ADBIS3nlMk6Mcdz0o2ZKsQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: T_zaGL1kOnWMFU2P3cLd4A-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 8/8] Add unit test to support new 'file' type NVRAM Date: Fri, 8 Apr 2022 10:48:51 -0700 Message-Id: <20220408174851.1077477-9-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c703321a-5529-4f63-ef8b-08da1988196d X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: q0pZJijpoXb8AwB/2LyVRL+xVrWOlIPY97k+rlEU/9GPiSoF8eutzBmU2yhpfVn3OHCr5BwLn3Gtgzajb2tyx03foefjE08MOttGMyvFcVjFHA5WsrZ7qORRMsgX5OIGQSHrWkoVG1vkKkp91TKwpeWazvWy1H/DtgMFgJnw6qujxIbvrgRLqm6SvKQG6tcXKI/hH7xGuPhhuqVl6XguITl1HYKS6Oonr+qIoZqJWoZI+tQANdTdJfGQFHSMxd1t2nn7s0Le6WQC8Y4LfeWwO6WoJ1rXoCWKPCSl6ctbTcK9Tw6I5LUxJ2CH7Q4WYH8mqzrRjYEXY3NtdMThUgDKqnG9dQNN01+93qclWLhmcf+A9pqpm2M+WtZNwJN6ub0Lzi8x+994mtnwKoPKGMwO17oBYWgy14R/WZ9ONwsBxpIMd2Fxrkz7oCcVp3NrG/1y00YZQHy32v2LuSn045GkoJMHP5pEYjY24/o03XWDD1VzmQBKqmudtKhSN86kAHgjv5seogE+H2FOpvliUULNdgyOWs6dL509VrJ3nvlq2AGZH8ZvZn050/Vhk510gMigp0ppoKGgVC2EqEtgsZp8nSuOKvKiOPqAWtXJRKKVpJ+Pf0uyR3lW/GYIcZ3FUFFozJkaCt1m8bYExHA9buC7julo+aZh2dCLZ0C+wnTZ8mv21jctI7hjD/zGhrTleuirQOPSvtn9FNm0WH6d23/Scw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ygpI1MqLeglNLHhrNorhVmFZWaD0tdx/xhTnjzUJ6KwNRVj1W8DSqyKHl5+g?= =?us-ascii?Q?rv973IsSfoYZ89n18SSnf8lqy/CncAy2/IZHJ8fEeFyTRc+Itm3Vsp/tZCRL?= =?us-ascii?Q?NTVf6Uxcoh+w4eXCEz6/8m2HUn3FTGEPgtsKHRpJuINdREdMUxotl9N1KxGp?= =?us-ascii?Q?tvU22niPvS3ktA0bEYbb7b+lBAxu4PNR9xC+kcfktwbXz3hW8rPJwmahwDM2?= =?us-ascii?Q?w2ez21RQQdZ4ueWwydSA1ax1xctwCbqQRFauMTKc7FRKCijr/ewNy1wzBRnS?= =?us-ascii?Q?znLA0GGkHb3INN5ujnxQjCLmVQ+lk9lHaJBzizRVUP4WE/jQh11DEAqM+QLJ?= =?us-ascii?Q?H2SVQSNChvkvrcfo7ZJ9r3w3BCQBOC01BU44KCJlBKLyDjRcE87ova0wUCfS?= =?us-ascii?Q?B/qjlTuyugT21OJRPN3u13BwQEnLsOa0FIGxGN9oWQS8zNVc6LTrVT005d7J?= =?us-ascii?Q?5taEwvCy/0yfeV6CstQSRloSHoEivsGSe8jpKAZsIWV9za1NoiNS4eoD3sQh?= =?us-ascii?Q?fjqGRn+SG2tir+tEickBUH8P4VDX6moaM2OARjCtw3hBWDni1Ntfrkn3JaOx?= =?us-ascii?Q?ay6p61beYGp/UhWj4oX7kEK5BS7Y4eOPhDQdDUx0eNFJC/WwweX2Uwgjmaf3?= =?us-ascii?Q?pV7zP/0P2pI20wvfu9Fwm73XJ3SacQnakwHt6svkbBgkbhpCdd2Dn/F6kHC1?= =?us-ascii?Q?Lb9s1ah2qa4uxOF1IGRTkduizMHGTXDenJdop3eVVf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mhoZeHS77Z9TCr+bZ45y8GvcA/N10gMX?= =?us-ascii?Q?kdTTkkl5SXndREpUO33sN3OohIyOARg+zfm7ewGMKb+NcawpPDSVxPCgrOdS?= =?us-ascii?Q?waRkZEYjjZMuVrb+3eiKbwBSRvjVXmk=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: c703321a-5529-4f63-ef8b-08da1988196d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:16.1102 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tz+7NJs++AumbRdeWuvbybG5mxgjbucSyol3a9YC2NC5L2PM0RHLD659VoR1VF5G0PV9IwxsXzNMUSK5UPPIX4xGHGZR8/XnECGZtPUkZ9g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: GaXwEZH1K-wYW_BViFaL1TxWl7NMbGJv X-Proofpoint-GUID: GaXwEZH1K-wYW_BViFaL1TxWl7NMbGJv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe 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.84 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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: 1649440175859100007 Content-Type: text/plain; charset="utf-8" This patch adds an unit test to test xml when NVRAM type 'file' is provided. Example: Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- .../bios-nvram-file.x86_64-latest.args | 37 +++++++++++++++++++ tests/qemuxml2argvdata/bios-nvram-file.xml | 23 ++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 61 insertions(+) create mode 100644 tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.ar= gs create mode 100644 tests/qemuxml2argvdata/bios-nvram-file.xml diff --git a/tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args b/te= sts/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args new file mode 100644 index 0000000000..4b0aec7539 --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-test-bios \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-test-bios/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-test-bios/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-test-bios/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dtest-bios,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-test-bios/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","nod= e-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}'= \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver"= :"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/nvram/guest_VARS.= fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"= unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver= ":"raw","file":"libvirt-pflash1-storage"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,pflash0=3Dlibvirt-pflash0-form= at,pflash1=3Dlibvirt-pflash1-format,memory-backend=3Dpc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}= ' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 362d1fc1-df7d-193e-5c18-49a71bd1da66 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot menu=3Don,strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/bios-nvram-file.xml b/tests/qemuxml2arg= vdata/bios-nvram-file.xml new file mode 100644 index 0000000000..8df9412112 --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-file.xml @@ -0,0 +1,23 @@ + + test-bios + 362d1fc1-df7d-193e-5c18-49a71bd1da66 + 1048576 + 1048576 + 1 + + hvm + /usr/share/OVMF/OVMF_CODE.fd<= /loader> + + + + + + + + + + + + /usr/bin/qemu-system-x86_64 + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7700ed6cb1..0c9881e483 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1199,6 +1199,7 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST_CAPS_LATEST("bios-nvram-template"); DO_TEST_CAPS_LATEST("bios-nvram-network"); + DO_TEST_CAPS_LATEST("bios-nvram-file"); =20 /* Make sure all combinations of ACPI and UEFI behave as expected */ DO_TEST_NOCAPS("q35-acpi-uefi"); --=20 2.25.1