From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152629655129524.48432975082551; Mon, 14 May 2018 04:15:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A6F6553521; Mon, 14 May 2018 11:15:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB14C26574; Mon, 14 May 2018 11:15:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A8162180610F; Mon, 14 May 2018 11:15:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFi9h009740 for ; Mon, 14 May 2018 07:15:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7AC8130012A3; Mon, 14 May 2018 11:15:44 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBCD630001DA; Mon, 14 May 2018 11:15:42 +0000 (UTC) Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC76F30BEE30; Mon, 14 May 2018 11:15:31 +0000 (UTC) Received: by mail-pl0-f68.google.com with SMTP id w19-v6so4570495plq.4; Mon, 14 May 2018 04:15:31 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mg95ttJ2LNbV1+axAKce3QO+Z7xuufayj8GOqXTcJnA=; b=ta3QbwImriFBwe82zp0oWvZczqZTT1l9PGV/PrItEmUxSLz/rZvFE6VCTVxXX9OVFs 4eIBkHZbMr/MPKXxgx6s0x92hS9qqFkSBPS8jl438vRhB1naZ6dNwYOG6RGe2gex+gLI XDiwtpXt3AMQYZjSymGuSiAyqMS6ZnzVHp25pqh/1XwV4iDKacbWL8dcD/Kh0isNilTk vyjLt33+4gy2cEjzyH1eXfyUD6ttzT5Hwpx2VVovUPFtEiv+fJO+GS4IWa+JtoU1xJM3 4OjxJ5lRbJgt2+0bTTnmFUam78vdm6NiUjWYtq1O49h7L+11BVwL6dhUP3Vh5NId3SZB z6qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mg95ttJ2LNbV1+axAKce3QO+Z7xuufayj8GOqXTcJnA=; b=FXOGOiv77ZkIBlXqtVXODvg3BDjSTmvWVQoB6tFGdS1Cqgq7LBOy5uil7Nfb7gMmqa Waz3CDv+cQxT1ihCGxEQznkkKv+wQyuxDADf+RQVx+MQbCorpJZpiqAre/h2prN/okgC akOxMtYV0qXYY2t9w/C0dfGKtoqyZLttXyXpZaK2MYab9eqn0QiszoGzuwobxHxiEjkP jQpiKVRwQBBtAXxAj3pstlrMsbK3AgUD//QvtXNt9lz4uY+22WhNVNRLOq/ILQYjClD1 soqTEbnKmVPI5IYc1bRJIXCtk0tz6p4H0i1MWpkq/8/J0stbR5aJ7ik9CuTY3XRdF9K6 9FhA== X-Gm-Message-State: ALKqPwdPopSQ1dWSNxEBGmhnmSLa82G/yrzCigUFY7fxpm6SEMQNEr/y hIksHBzKMGWP8djPKDBiPeIODw== X-Google-Smtp-Source: AB8JxZqJHhK+EcABPDGfR5TJGnsfx7QPoodHr8MR3w/iNpCn8FVUkVrJRpY7OSunutrQo+iAQSq0TQ== X-Received: by 2002:a17:902:164:: with SMTP id 91-v6mr9580406plb.134.1526296531058; Mon, 14 May 2018 04:15:31 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:11 -0700 Message-Id: <20180514111522.4363-2-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 14 May 2018 11:15:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 14 May 2018 11:15:31 +0000 (UTC) for IP:'209.85.160.68' DOMAIN:'mail-pl0-f68.google.com' HELO:'mail-pl0-f68.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.160.68 mail-pl0-f68.google.com 209.85.160.68 mail-pl0-f68.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 01/12] Schema: Introduce XML schema for network-backed loader and nvram elements. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 14 May 2018 11:15:49 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Today, 'loader' and 'nvram' elements are supposed to be backed by a local d= isk. Given that NVRAM data could be network-backed for high availability, this p= atch defines XML spec for serving loader & nvram disks via the network. Signed-off-by: Prerna Saxena --- docs/schemas/domaincommon.rng | 108 +++++++++++++++++++++++++++++++++++---= ---- 1 file changed, 90 insertions(+), 18 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 0a6b29b..a6207db 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -276,7 +276,42 @@ - + + + + file + network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -287,7 +322,40 @@ - + + + file + network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1494,25 +1562,29 @@ - - - - - - - - - - - - - - - - + =20 + + + + + + + + + + + + + + + + + + + block --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296552480134.46786719217118; Mon, 14 May 2018 04:15:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79606E749E; Mon, 14 May 2018 11:15:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 317F85E7DE; Mon, 14 May 2018 11:15:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DAEED4CAA0; Mon, 14 May 2018 11:15:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFjj5009752 for ; Mon, 14 May 2018 07:15:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 678FB26574; Mon, 14 May 2018 11:15:45 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77E2A26575; Mon, 14 May 2018 11:15:43 +0000 (UTC) Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BDA5D44CF; Mon, 14 May 2018 11:15:32 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id 30-v6so2342601pld.13; Mon, 14 May 2018 04:15:32 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pv65zwtlLk4hIMY2Iyy3vUHHYWDWkKvJGvUB7pliPrk=; b=bxdu4UrO1O31EovHQ9M6pXle9dRk5F2nLSNdUa/lg1Wf+BHOIs1SEneKsu3sllEzFP TDBX4yW1E/LtcVMIEc0KHupyEDxXM52Rq/aSsx1J74kHjMlHMxf85iDMgbTev/mX5EY8 IzNtunWWfB6fPJvznSocHLlb6qmsEHrKgoS6CNPdsuwjDEzz8Jy8OmP8cQdLMrzqECBh dr88eeVmrps1GXKpT3tSrvb19l9Lo0QgAaFuqhZdIyiQE6GJosTC/aOcdv6H+NRrLg9v U9MaEwDAibzNouO3xCsRH7/VqoOVI32g5YQad1cMYkzixM5ohkl5xP9OMSiiTamUvKvC GPFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pv65zwtlLk4hIMY2Iyy3vUHHYWDWkKvJGvUB7pliPrk=; b=rpPrFWjPxcSpZoPmqUI6hZNdMh6lnTLCjUzbVOk7yHVyhShlnlnYnagH0zL9+CSRyw AevgyxQm6TtWY1mw+XpX2UzA0ZKyCS7H5crwSwOinEmlC9Zh+ddndteJK8oy7jIOVycY EzAHyge+2bgI2mhkM6HWOh7paZPFTYTNX6+DMSHeoEg5mb06y/cTuIxQYNlcv4B1AMGC rAgkB8BsNs/6EuHnWpLhArPyTWDzZXTx+1r+s/+UldzdZgPqDtq0UU5uDkBixXCgVvJB V8QzxCv1/O/71ekEtfw22mDTgxXq2iFDiDnyhYTQj/6dbBDy/Jait4vK0s5qf5tv6HFW TInw== X-Gm-Message-State: ALKqPweGwtof+Sme9iENbtLjBMlxLgW1iSjg1ddF8PA6CAkYW6uJGGdL Vuaqev+TJNMWXnwanLHZuQ0/mw== X-Google-Smtp-Source: AB8JxZqpywEteXr2v33UO7+r4Y49e60VC5yN2WE9fwUZbAp7EMxyQ72455OUsNbtGMGmjnQRVoEYjA== X-Received: by 2002:a17:902:8d8e:: with SMTP id v14-v6mr9596228plo.387.1526296531920; Mon, 14 May 2018 04:15:31 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:12 -0700 Message-Id: <20180514111522.4363-3-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 14 May 2018 11:15:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 14 May 2018 11:15:32 +0000 (UTC) for IP:'209.85.160.65' DOMAIN:'mail-pl0-f65.google.com' HELO:'mail-pl0-f65.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.160.65 mail-pl0-f65.google.com 209.85.160.65 mail-pl0-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 02/12] Loader: Add a more elaborate definition. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 14 May 2018 11:15:51 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Augment definition to include virStorageSourcePtr that more comprehensively describes the nature of backing element. Also include flags for annotating if input XML definition is old-style or new-style. Signed-off-by: Prerna Saxena --- src/conf/domain_conf.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 15d228b..bbd021b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1855,15 +1855,22 @@ typedef enum { =20 VIR_ENUM_DECL(virDomainLoader) =20 +struct _virStorageSource; +typedef struct _virStorageSource* virStorageSourcePtr; + typedef struct _virDomainLoaderDef virDomainLoaderDef; typedef virDomainLoaderDef *virDomainLoaderDefPtr; struct _virDomainLoaderDef { - char *path; + virStorageSourcePtr src; int readonly; /* enum virTristateBool */ virDomainLoader type; int secure; /* enum virTristateBool */ - char *nvram; /* path to non-volatile RAM */ + virStorageSourcePtr nvram; /* path to non-voliatile RAM */ char *templt; /* user override of path to master nvram */ + bool oldStyleLoader; /* is this an old-style XML formatting, + * ie, absolute path is directly specified? */ + bool oldStyleNvram; /* is this an old-style XML formatting, + * ie, absolute path is directly specified? */ }; =20 void virDomainLoaderDefFree(virDomainLoaderDefPtr loader); --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296560571219.9451782632218; Mon, 14 May 2018 04:16:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC78E883B1; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A38160927; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 537C14BB79; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFlxf009763 for ; Mon, 14 May 2018 07:15:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22E5C6017B; Mon, 14 May 2018 11:15:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A9DD6017A; Mon, 14 May 2018 11:15:44 +0000 (UTC) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1BB430CA8C1; Mon, 14 May 2018 11:15:33 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id w4-v6so3715196pgq.8; Mon, 14 May 2018 04:15:33 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJMgVCEW37FS7sBqU+gLJUEqCOwf5hcsdFMJHPd29BQ=; b=ZO+nbEdYJWPqdHMcl6kgD1cHoh0J3acXhnB/L6ubV25yvRdwfcp/AMuWc1jBltS1dQ eFYiwUAJA6uUpbgu4YF6PYQjRxZnq4bVO7p0S9QJ86Ln7sPmBKdz4/UxLswAqNck8N1o 9p5mJdm0ck0f43x/z172s+tDySnZ0s3nquzsQzMzEXALDyQpu7WBw9UCe79EoUoKZieT f1SXMPpnhNIMx1FiS3s0QhhPRfFUzu4g1pRFTczpfX9H5Md2y+Swrn4qwjg44hV3pcQT 8a2MzohOZv7oizM86kBFjjHcfAdBYysaGYnp4Q77aehBByV0G8/35TQ53SeoI48VFSrw o3ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vJMgVCEW37FS7sBqU+gLJUEqCOwf5hcsdFMJHPd29BQ=; b=Hjwkh7ezXsT7zOONtnzACjuv6xTseU+qIVmOkY9h3D6VPlmYWh1mHz0ojrBECilhHQ xycSY2NTBBhAu/v1ScCTsGiVMQrOIkUAydv9P6NWDWKzu/riIdAnTrDBEjx8JAyEXi00 idMHw0RrtixpGMGvwd5ncXCMNLuXXBoITa+wnCGRRe35sXU4GTLVHStl6X0w810wvMXE 0paJ7jFNx0bihEEy8tfQ5g5UBb71v2D26dCUs06c4NnxNhV8w2bHOPqUPTzRnYMWIlnq uVeMHZbZ2KrAUcwZdgQ3Fj36lZVQJKj57Mv72oEwxUMFNLi5g7ewLClOULTQ3maLqlGH mBgw== X-Gm-Message-State: ALKqPwelDi5NuZfDxI8DQ7xF4/182OfZb6XnqaQVm5ZyJHuPtT5sFLkr E1sGVBp5AgZg4ZUudj473HiYHQ== X-Google-Smtp-Source: AB8JxZql7hJvRzLJgOjtXxhYzHGPhgBAEMlbYBOvTtbhU+Vme+IGRpIfoQSSseL4G6jH0xfMF2QdTA== X-Received: by 2002:a63:3147:: with SMTP id x68-v6mr8162977pgx.108.1526296532854; Mon, 14 May 2018 04:15:32 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:13 -0700 Message-Id: <20180514111522.4363-4-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 14 May 2018 11:15:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 14 May 2018 11:15:33 +0000 (UTC) for IP:'74.125.83.68' DOMAIN:'mail-pg0-f68.google.com' HELO:'mail-pg0-f68.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.83.68 mail-pg0-f68.google.com 74.125.83.68 mail-pg0-f68.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 03/12] Parse domain XML to generate virDomainLoaderDef & virDomainNvramDef. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 14 May 2018 11:15:59 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch is used to interpret domain XML and store the Loader & Nvram's backing definitions as virStorageSource. It also identifies if input XML used old or new-style declaration. (This will later be used by the formatter). Signed-off-by: Prerna Saxena --- src/conf/domain_conf.c | 131 +++++++++++++++++++++++++++++++++++++++++++++= +--- 1 file changed, 124 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f678e26..be43695 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2884,8 +2884,8 @@ virDomainLoaderDefFree(virDomainLoaderDefPtr loader) if (!loader) return; =20 - VIR_FREE(loader->path); - VIR_FREE(loader->nvram); + virStorageSourceFree(loader->src); + virStorageSourceFree(loader->nvram); VIR_FREE(loader->templt); VIR_FREE(loader); } @@ -17986,17 +17986,62 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDoma= inDefPtr def) =20 static int virDomainLoaderDefParseXML(xmlNodePtr node, + xmlXPathContextPtr ctxt, virDomainLoaderDefPtr loader) { int ret =3D -1; char *readonly_str =3D NULL; char *secure_str =3D NULL; char *type_str =3D NULL; + char *tmp =3D NULL; + xmlNodePtr cur; + xmlXPathContextPtr cur_ctxt =3D ctxt; + + if (VIR_ALLOC(loader->src)) { + goto cleanup; + } + loader->src->type =3D VIR_STORAGE_TYPE_LAST; + loader->oldStyleLoader =3D false; =20 readonly_str =3D virXMLPropString(node, "readonly"); secure_str =3D virXMLPropString(node, "secure"); type_str =3D virXMLPropString(node, "type"); - loader->path =3D (char *) xmlNodeGetContent(node); + + if ((tmp =3D virXMLPropString(node, "backing")) && + (loader->src->type =3D virStorageTypeFromString(tmp)) <=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown loader type '%s'"), tmp); + goto cleanup; + } + VIR_FREE(tmp); + + for (cur =3D node->children; cur !=3D NULL; cur =3D cur->next) { + if (cur->type !=3D XML_ELEMENT_NODE) { + continue; + } + + if (virXMLNodeNameEqual(cur, "source")) { + /* new-style declaration found */ + if (virDomainStorageSourceParse(cur, cur_ctxt, loader->src, 0)= < 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("Error parsing Loader source element")); + goto cleanup; + } + break; + } + } + + /* Old-style absolute path found ? */ + if (loader->src->type =3D=3D VIR_STORAGE_TYPE_LAST) { + if (!(loader->src->path =3D (char *) xmlNodeGetContent(node))) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("missing loader source")); + goto cleanup; + } else { + loader->src->type =3D VIR_STORAGE_TYPE_FILE; + loader->oldStyleLoader =3D true; + } + } =20 if (readonly_str && (loader->readonly =3D virTristateBoolTypeFromString(readonly_str))= <=3D 0) { @@ -18023,13 +18068,81 @@ virDomainLoaderDefParseXML(xmlNodePtr node, } =20 ret =3D 0; - cleanup: + goto exit; +cleanup: + if (loader->src) + VIR_FREE(loader->src); +exit: VIR_FREE(readonly_str); VIR_FREE(secure_str); VIR_FREE(type_str); + return ret; } =20 +static int +virDomainLoaderNvramDefParseXML(xmlNodePtr node, + xmlXPathContextPtr ctxt, + virDomainLoaderDefPtr loader) +{ + int ret =3D -1; + char *tmp =3D NULL; + xmlNodePtr cur; + + if (VIR_ALLOC(loader->nvram)) { + goto cleanup; + } + + loader->nvram->type =3D VIR_STORAGE_TYPE_LAST; + loader->nvram->oldStyleNvram =3D false; + + if ((tmp =3D virXMLPropString(node, "backing")) && + (loader->nvram->type =3D virStorageTypeFromString(tmp)) <=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown nvram type '%s'"), tmp); + goto cleanup; + } + VIR_FREE(tmp); + + for (cur =3D node->children; cur !=3D NULL; cur =3D cur->next) { + if (cur->type !=3D XML_ELEMENT_NODE) { + continue; + } + + if (virXMLNodeNameEqual(cur, "template")) { + loader->templt =3D virXPathString("string(./os/nvram[1]/@templ= ate)", ctxt); + continue; + } + + if (virXMLNodeNameEqual(cur, "source")) { + if (virDomainStorageSourceParse(cur, ctxt, loader->nvram, 0) <= 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("Error parsing nvram source element")); + goto cleanup; + } + ret =3D 0; + } + } + + /* Old-style declaration found */ + if (loader->nvram->type =3D=3D VIR_STORAGE_TYPE_LAST) { + if (!(loader->nvram->path =3D (char *) xmlNodeGetContent(node))) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("missing nvram source")); + goto cleanup; + } else { + loader->nvram->type =3D VIR_STORAGE_TYPE_FILE; + loader->oldStyleNvram =3D true; + ret =3D 0; + } + } + return ret; + +cleanup: + if (loader->nvram) + VIR_FREE(loader->nvram); + return ret; +} =20 static virBitmapPtr virDomainSchedulerParse(xmlNodePtr node, @@ -18422,11 +18535,15 @@ virDomainDefParseBootOptions(virDomainDefPtr def, if (VIR_ALLOC(def->os.loader) < 0) goto error; =20 - if (virDomainLoaderDefParseXML(loader_node, def->os.loader) < = 0) + def->os.loader->src =3D NULL; + def->os.loader->nvram =3D NULL; + if (virDomainLoaderDefParseXML(loader_node, ctxt, def->os.load= er) < 0) goto error; =20 - def->os.loader->nvram =3D virXPathString("string(./os/nvram[1]= )", ctxt); - def->os.loader->templt =3D virXPathString("string(./os/nvram[1= ]/@template)", ctxt); + if ((loader_node =3D virXPathNode("./os/nvram[1]", ctxt)) && + (virDomainLoaderNvramDefParseXML(loader_node, ctxt, + def->os.loader) < 0)) + goto error; } } =20 --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296560349723.1562616827918; Mon, 14 May 2018 04:16:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC16630CE3A4; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 970E230001EE; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 50DB8180124C; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFn0S009779 for ; Mon, 14 May 2018 07:15:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5893D5E7DE; Mon, 14 May 2018 11:15:49 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E702A17D57; Mon, 14 May 2018 11:15:45 +0000 (UTC) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 915C2388832; Mon, 14 May 2018 11:15:34 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id e9-v6so5867623pfi.4; Mon, 14 May 2018 04:15:34 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3eugIJX3/Nq3wSpD8iQg4+OLPInbDjSmQDH8IUIcJmY=; b=OrMEtd3hv3vRArnoimzIp3FmjX+h2sSbmgX6BFT0VlV2c+qnZJBOUCgIHGUaWiKqQN K9pvXn7+FEDxCts44kii+a7X36lV1CUchVISUIiLy23jxOeAhfZxpfBV4M4fujKRAyVF ciVC62ct5pVSw82efx3w0U8HJbtNTGqYTanq2AqTG6djBhso59l3TBxtwMHUdn9D0X/o R6Ga9df5zaO5tIf7710R5YAxCIdoud3f0+8w4rvgfe78LrF/zVHj+6AKMdVGZThELw/a /y8EoXanBbagRZoE2yC7tSsXhMbzeoPlOI5o2BGaWmVEultao51jDKPaMeSETOzIsRTp zGgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3eugIJX3/Nq3wSpD8iQg4+OLPInbDjSmQDH8IUIcJmY=; b=MpHmI+OHq6gGiYVJPnHg1W79uj9SQIQREjZZR/PMbOgBmi2LO4i1Zn9oDYAeMZNw5I w+CDi0c3dEfTa1pJNBc+wbig/r+5BmiV7f2vT6G9gk9KxFBsGotJpt8fA6lp8wjWLjq0 pkwP8soXb67sOoPSUDFOGtn3Q2yOsJeFmxDgGsY8XRVT13RqVeUqIE0lBy2oY5ipsuik hJSgD/agshO0k0rbcA9bHrs6HOoe5wVyBHVtcn1o2EDhD9d4lsOqVjD88ng0bIOAQYug /2+U/zwScXoy2kwcSzV/+p2sLgYRH29pBzCzK6TViylNOw2Ht2C99tU9T1pZoIE3FI2W FyHQ== X-Gm-Message-State: ALKqPwcmMtdCWlt8hTjHvQvF2m382+U+fi7nu359vG7pByT8UgTPORA+ //XGuRScYFBw+lDyozNq9dRZaA== X-Google-Smtp-Source: AB8JxZq8b6OAZPkJM0pp0nvYMGWy1TxGviG1xFJW7/i6pQN/cxY7XaC/17wWtGWk/2SiW81xbppQKQ== X-Received: by 2002:a65:4bc6:: with SMTP id p6-v6mr6762740pgr.24.1526296533833; Mon, 14 May 2018 04:15:33 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:14 -0700 Message-Id: <20180514111522.4363-5-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 14 May 2018 11:15:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 14 May 2018 11:15:34 +0000 (UTC) for IP:'209.85.192.194' DOMAIN:'mail-pf0-f194.google.com' HELO:'mail-pf0-f194.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.696 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.194 mail-pf0-f194.google.com 209.85.192.194 mail-pf0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 04/12] Format the loader source appropriately. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 14 May 2018 11:15:59 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" If the initial XML used the old-style declaration as follows: /path/to/file we format it as was read. However, if it used new-style declaration: The formatter identifies that this is a new-style format and renders it likewise. Signed-off-by: Prerna Saxena --- src/conf/domain_conf.c | 86 ++++++++++++++++++++++++++++++++++++++++++++--= ---- 1 file changed, 76 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index be43695..d59a579 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18094,7 +18094,7 @@ virDomainLoaderNvramDefParseXML(xmlNodePtr node, } =20 loader->nvram->type =3D VIR_STORAGE_TYPE_LAST; - loader->nvram->oldStyleNvram =3D false; + loader->oldStyleNvram =3D false; =20 if ((tmp =3D virXMLPropString(node, "backing")) && (loader->nvram->type =3D virStorageTypeFromString(tmp)) <=3D 0) { @@ -26212,11 +26212,19 @@ virDomainHugepagesFormat(virBufferPtr buf, =20 static void virDomainLoaderDefFormat(virBufferPtr buf, - virDomainLoaderDefPtr loader) + virDomainLoaderDefPtr loader, + unsigned int flags) { const char *readonly =3D virTristateBoolTypeToString(loader->readonly); const char *secure =3D virTristateBoolTypeToString(loader->secure); const char *type =3D virDomainLoaderTypeToString(loader->type); + const char *backing =3D NULL; + + virBuffer attrBuf =3D VIR_BUFFER_INITIALIZER; + virBuffer childBuf =3D VIR_BUFFER_INITIALIZER; + + virBufferSetChildIndent(&childBuf, buf); + =20 virBufferAddLit(buf, "secure) virBufferAsprintf(buf, " secure=3D'%s'", secure); =20 - virBufferAsprintf(buf, " type=3D'%s'>", type); + virBufferAsprintf(buf, " type=3D'%s'", type); + if (loader->src && + loader->src->type < VIR_STORAGE_TYPE_LAST) { + if (!loader->oldStyleLoader) { + /* Format this in the new style, using the + * sub-element */ + if (virDomainStorageSourceFormat(&attrBuf, &childBuf, loader->= src, + flags, 0) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Cannot format loader source")); + goto cleanup; + } + + backing =3D virStorageTypeToString(loader->src->type); + virBufferAsprintf(buf, " backing=3D'%s'>", backing); + + if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < = 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Cannot format loader source")); + goto cleanup; + } + + } else + /* Format this in the old-style, using absolute paths directly= . */ + virBufferAsprintf(buf, ">%s", loader->src->path); + } else + virBufferAddLit(buf, ">\n"); + + virBufferAddLit(buf, "\n"); =20 - virBufferEscapeString(buf, "%s\n", loader->path); if (loader->nvram || loader->templt) { + ignore_value(virBufferContentAndReset(&attrBuf)); + ignore_value(virBufferContentAndReset(&childBuf)); + virBufferSetChildIndent(&childBuf, buf); + virBufferAddLit(buf, "templt); - if (loader->nvram) - virBufferEscapeString(buf, ">%s\n", loader->nvram); - else - virBufferAddLit(buf, "/>\n"); + + if (loader->templt) + virBufferEscapeString(buf, " template=3D'%s'", loader->templt); + + if (loader->nvram) { + backing =3D virStorageTypeToString(loader->nvram->type); + if (!loader->oldStyleNvram) { + if (virDomainStorageSourceFormat(&attrBuf, &childBuf, + loader->nvram, flags, 0) < 0)= { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Cannot format NVRAM source")); + virBufferAddLit(buf, ">\n\n"); + goto cleanup; + } + + virBufferEscapeString(buf, " backing=3D'%s'>", backing); + if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf= ) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Cannot format NVRAM source")); + virBufferAddLit(buf, "\n"); + goto cleanup; + } + } else { + /* old-style NVRAM declaration found */ + virBufferAsprintf(buf, ">%s", loader->nvram->path); + } + virBufferAddLit(buf, "\n\n"); + } } +cleanup: + virBufferFreeAndReset(&attrBuf); + virBufferFreeAndReset(&childBuf); + return; } =20 static void @@ -26899,7 +26965,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, virBufferAsprintf(buf, "%s\n", def->os.init= group); =20 if (def->os.loader) - virDomainLoaderDefFormat(buf, def->os.loader); + virDomainLoaderDefFormat(buf, def->os.loader, flags); virBufferEscapeString(buf, "%s\n", def->os.kernel); virBufferEscapeString(buf, "%s\n", --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296560507271.0954261680125; Mon, 14 May 2018 04:16:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E93EE3002F5B; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CCF920078A9; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 55192180B5AA; Mon, 14 May 2018 11:15:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFpdG009798 for ; Mon, 14 May 2018 07:15:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 232095C542; Mon, 14 May 2018 11:15:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30A205C25E; Mon, 14 May 2018 11:15:47 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C240130CADFB; Mon, 14 May 2018 11:15:35 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id a20-v6so1921443pfo.0; Mon, 14 May 2018 04:15:35 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kLMj1l0Oxe/W2+/T5rH21l46Eqpbb1DmmN6vtCVt91A=; b=fxa5e9gNgWq6vAMFbxnIH2OgaKYM1z2xHiRGS2jw1zmq6a0eMc1pqPphXuQAxhMlVv PKF3Xlon47J/z0CPznuU6YENw9c8KMMIgTy2mUda3dyWYdy6dzMD+v1FqZY/T9sebyv+ DIxqfLcUyS4LIFMn2jbed0nTMa6+LAbOmGcGVJHyzVeou1K3TE/lHv6tUzUd1EE9xSS2 zx3pn1oLit+zXzLmjuy1mUiloIVueP7GE7sRsJsgZdtEk2JFNV63rADYNaQv/gE3L3XI /datE/yUJMRBAM6DAllB/3zO0LwzrlELYPi96nY/fXJ+QDgj00vwTdlB2qqAwZdFWXrz wqLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kLMj1l0Oxe/W2+/T5rH21l46Eqpbb1DmmN6vtCVt91A=; b=QWJ0PHDmYmh1Tt0IWdAatFZCxf9FUvOKbkyH0qalhBVpJaOdFKu189vMtyh8gl95OD kZC40GojoWxTUavPt6w2ogA/uug8Zch2xaCzmD70d2efRx1qRG71VuHDUJdttV67NhLd J20Yfh4/784IKDm12u1UrqZJGNVXNo626g5Hgxv7Uod1vuR8xPlGBxAVHlvOhocetjG5 5eO5NhRhYE0f7LKP/pfw6jSGctAvD6lQUBsf8uKyuvNAmgMlipgLIHD3P3unDbLH4H+x t3QhV8ydCWrUOMBkQgVyuuAXM4S3jAGQQOIF/fS62GQAUq42DfNB/Ch3egRWhx1aRY24 aTYg== X-Gm-Message-State: ALKqPwfxFSn0vih9ZRfJrc8GwXyd808EQ5+B1tcmVdbskrTBUqYdtpoY 7TjJkBtcI3yPaUT1nktta8aJYw== X-Google-Smtp-Source: AB8JxZrZ5YArYee7BJeLdQdq2fQ2NVaTiDKxG+4RXCsgecCWAgSfR/vT4nQ5yfWi0JOKKavCS8uI3Q== X-Received: by 2002:a63:7904:: with SMTP id u4-v6mr685068pgc.143.1526296534701; Mon, 14 May 2018 04:15:34 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:15 -0700 Message-Id: <20180514111522.4363-6-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 14 May 2018 11:15:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 14 May 2018 11:15:36 +0000 (UTC) for IP:'209.85.192.193' DOMAIN:'mail-pf0-f193.google.com' HELO:'mail-pf0-f193.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.696 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.193 mail-pf0-f193.google.com 209.85.192.193 mail-pf0-f193.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 05/12] Plumb the loader source into generation of QEMU command line. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 14 May 2018 11:15:59 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Given that nvram & loader elements can now be backed by a non-local source too, adjust all steps leading to generation of QEMU command line. Signed-off-by: Prerna Saxena --- src/qemu/qemu_cgroup.c | 13 +++++++++---- src/qemu/qemu_command.c | 21 ++++++++++++++++----- src/qemu/qemu_domain.c | 31 +++++++++++++++++++++--------- src/qemu/qemu_driver.c | 7 ++++--- src/qemu/qemu_process.c | 42 ++++++++++++++++++++++++++++---------= ---- src/security/security_dac.c | 6 ++++-- src/security/security_selinux.c | 6 ++++-- 7 files changed, 88 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index d88eb78..2068eb0 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -580,16 +580,21 @@ qemuSetupMemoryCgroup(virDomainObjPtr vm) static int qemuSetupFirmwareCgroup(virDomainObjPtr vm) { + virStorageSourcePtr src =3D NULL; + if (!vm->def->os.loader) return 0; =20 - if (vm->def->os.loader->path && - qemuSetupImagePathCgroup(vm, vm->def->os.loader->path, - vm->def->os.loader->readonly =3D=3D VIR_T= RISTATE_BOOL_YES) < 0) + src =3D vm->def->os.loader->src; + + if (src->type =3D=3D VIR_STORAGE_TYPE_FILE && + qemuSetupImagePathCgroup(vm, src->path, + src->readonly =3D=3D VIR_TRISTATE_BOOL_YE= S) < 0) 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 08f67a4..e9d6e4b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9260,6 +9260,7 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, virDomainLoaderDefPtr loader =3D def->os.loader; virBuffer buf =3D VIR_BUFFER_INITIALIZER; int unit =3D 0; + char *source =3D NULL; =20 if (!loader) return; @@ -9267,7 +9268,7 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, switch ((virDomainLoader) loader->type) { case VIR_DOMAIN_LOADER_TYPE_ROM: virCommandAddArg(cmd, "-bios"); - virCommandAddArg(cmd, loader->path); + virCommandAddArg(cmd, loader->src->path); break; =20 case VIR_DOMAIN_LOADER_TYPE_PFLASH: @@ -9279,9 +9280,14 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, NULL); } =20 + if (qemuGetDriveSourceString(loader->src, NULL, &source) < 0) + break; + virBufferAddLit(&buf, "file=3D"); - virQEMUBuildBufferEscapeComma(&buf, loader->path); - virBufferAsprintf(&buf, ",if=3Dpflash,format=3Draw,unit=3D%d", uni= t); + virQEMUBuildBufferEscapeComma(&buf, source); + free(source); + virBufferAsprintf(&buf, ",if=3Dpflash,format=3Draw,unit=3D%d", + unit); unit++; =20 if (loader->readonly) { @@ -9294,9 +9300,14 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, =20 if (loader->nvram) { virBufferFreeAndReset(&buf); + if (qemuGetDriveSourceString(loader->nvram, NULL, &source) < 0) + break; + virBufferAddLit(&buf, "file=3D"); - virQEMUBuildBufferEscapeComma(&buf, loader->nvram); - virBufferAsprintf(&buf, ",if=3Dpflash,format=3Draw,unit=3D%d",= unit); + virQEMUBuildBufferEscapeComma(&buf, source); + virBufferAsprintf(&buf, ",if=3Dpflash,format=3Draw,unit=3D%d", + unit); + unit++; =20 virCommandAddArg(cmd, "-drive"); virCommandAddArgBuffer(cmd, &buf); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9bb6d8a..2d4e299 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3318,6 +3318,9 @@ qemuDomainDefPostParse(virDomainDefPtr def, * function shall not fail in that case. It will be re-run on VM start= up * with the capabilities populated. */ virQEMUCapsPtr qemuCaps =3D parseOpaque; + virDomainLoaderDefPtr ldr =3D NULL; + char *nvramPath =3D NULL; + int ret =3D -1; =20 if (def->os.bootloader || def->os.bootloaderArgs) { @@ -3332,13 +3335,20 @@ qemuDomainDefPostParse(virDomainDefPtr def, goto cleanup; } =20 - if (def->os.loader && - def->os.loader->type =3D=3D VIR_DOMAIN_LOADER_TYPE_PFLASH && - def->os.loader->readonly =3D=3D VIR_TRISTATE_SWITCH_ON && - !def->os.loader->nvram) { - if (virAsprintf(&def->os.loader->nvram, "%s/%s_VARS.fd", + ldr =3D def->os.loader; + if (ldr && + ldr->type =3D=3D VIR_DOMAIN_LOADER_TYPE_PFLASH && + ldr->readonly =3D=3D VIR_TRISTATE_SWITCH_ON && + !ldr->nvram) { + if (virAsprintf(&nvramPath, "%s/%s_VARS.fd", cfg->nvramDir, def->name) < 0) goto cleanup; + ldr->nvram =3D virStorageSourceNewFromBackingAbsolute(nvramPath); + if (!ldr->nvram) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unable to add NVRAM drive %s"), nvramPath); + goto cleanup; + } } =20 if (qemuDomainDefAddDefaultDevices(def, qemuCaps) < 0) @@ -10494,19 +10504,22 @@ qemuDomainSetupLoader(virQEMUDriverConfigPtr cfg = ATTRIBUTE_UNUSED, =20 VIR_DEBUG("Setting up loader"); =20 - if (loader) { + if (loader && loader->src) { switch ((virDomainLoader) loader->type) { case VIR_DOMAIN_LOADER_TYPE_ROM: - if (qemuDomainCreateDevice(loader->path, data, false) < 0) + if (loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE && + qemuDomainCreateDevice(loader->src->path, data, false) < 0) goto cleanup; break; =20 case VIR_DOMAIN_LOADER_TYPE_PFLASH: - if (qemuDomainCreateDevice(loader->path, data, false) < 0) + if (loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE && + qemuDomainCreateDevice(loader->src->path, data, false) < 0) goto cleanup; =20 if (loader->nvram && - qemuDomainCreateDevice(loader->nvram, data, false) < 0) + loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + qemuDomainCreateDevice(loader->nvram->path, data, false) <= 0) goto cleanup; break; =20 diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c129321..9c491b2 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7540,12 +7540,13 @@ qemuDomainUndefineFlags(virDomainPtr dom, =20 if (vm->def->os.loader && vm->def->os.loader->nvram && - virFileExists(vm->def->os.loader->nvram)) { + vm->def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + virFileExists(vm->def->os.loader->nvram->path)) { if ((flags & VIR_DOMAIN_UNDEFINE_NVRAM)) { - if (unlink(vm->def->os.loader->nvram) < 0) { + if (unlink(vm->def->os.loader->nvram->path) < 0) { virReportSystemError(errno, _("failed to remove nvram: %s"), - vm->def->os.loader->nvram); + vm->def->os.loader->nvram->path); goto endjob; } } else if (!(flags & VIR_DOMAIN_UNDEFINE_KEEP_NVRAM)) { diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 37876b8..e4c05e2 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3994,25 +3994,41 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg, const char *master_nvram_path; ssize_t r; =20 - if (!loader || !loader->nvram || virFileExists(loader->nvram)) + /* return early if either loader is network-backed + * or NVRAM is already specified. + */ + if (!loader || !loader->src || !loader->nvram || + loader->type !=3D VIR_DOMAIN_LOADER_TYPE_PFLASH || + loader->src->type =3D=3D VIR_STORAGE_TYPE_NETWORK || + loader->nvram->type =3D=3D VIR_STORAGE_TYPE_NETWORK) + return 0; + + if (loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + virFileExists(loader->nvram->path)) return 0; =20 master_nvram_path =3D loader->templt; - if (!loader->templt) { + /* Even if a template is not specified, we associate "known" EFI firmw= are + * to their NVRAM templates. + * Ofcourse this only applies to local firmware paths, as it is diffcu= lt + * for libvirt to parse all network paths. + */ + if (!loader->templt && loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE)= { size_t i; for (i =3D 0; i < cfg->nfirmwares; i++) { - if (STREQ(cfg->firmwares[i]->name, loader->path)) { + if (STREQ(cfg->firmwares[i]->name, loader->src->path)) { master_nvram_path =3D cfg->firmwares[i]->nvram; break; } } } =20 - if (!master_nvram_path) { - virReportError(VIR_ERR_OPERATION_FAILED, - _("unable to find any master var store for " - "loader: %s"), loader->path); - goto cleanup; + if (!master_nvram_path && loader->nvram) { + /* There is no template description, but an NVRAM spec + * has already been provided. + * Trust the client to have generated the right spec here + */ + return 0; } =20 if ((srcFD =3D virFileOpenAs(master_nvram_path, O_RDONLY, @@ -4022,13 +4038,13 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg, master_nvram_path); goto cleanup; } - if ((dstFD =3D virFileOpenAs(loader->nvram, + if ((dstFD =3D virFileOpenAs(loader->nvram->path, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, cfg->user, cfg->group, 0)) < 0) { virReportSystemError(-dstFD, _("Failed to create file '%s'"), - loader->nvram); + loader->nvram->path); goto cleanup; } created =3D true; @@ -4046,7 +4062,7 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg, if (safewrite(dstFD, buf, r) < 0) { virReportSystemError(errno, _("Unable to write to file '%s'"), - loader->nvram); + loader->nvram->path); goto cleanup; } } while (r); @@ -4060,7 +4076,7 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg, if (VIR_CLOSE(dstFD) < 0) { virReportSystemError(errno, _("Unable to close file '%s'"), - loader->nvram); + loader->nvram->path); goto cleanup; } =20 @@ -4070,7 +4086,7 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg, * copy the file content. Roll back. */ if (ret < 0) { if (created) - unlink(loader->nvram); + unlink(loader->nvram->path); } =20 VIR_FORCE_CLOSE(srcFD); diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 8938e2d..3febea6 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -1604,7 +1604,8 @@ virSecurityDACRestoreAllLabel(virSecurityManagerPtr m= gr, } =20 if (def->os.loader && def->os.loader->nvram && - virSecurityDACRestoreFileLabel(priv, def->os.loader->nvram) < 0) + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + virSecurityDACRestoreFileLabel(priv, def->os.loader->nvram->path) = < 0) rc =3D -1; =20 return rc; @@ -1732,8 +1733,9 @@ virSecurityDACSetAllLabel(virSecurityManagerPtr mgr, return -1; =20 if (def->os.loader && def->os.loader->nvram && + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && virSecurityDACSetOwnership(priv, NULL, - def->os.loader->nvram, user, group) < 0) + def->os.loader->nvram->path, user, grou= p) < 0) return -1; =20 if (def->os.kernel && diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 5f74ef7..bcda939 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -2459,7 +2459,8 @@ virSecuritySELinuxRestoreAllLabel(virSecurityManagerP= tr mgr, rc =3D -1; =20 if (def->os.loader && def->os.loader->nvram && - virSecuritySELinuxRestoreFileLabel(mgr, def->os.loader->nvram) < 0) + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + virSecuritySELinuxRestoreFileLabel(mgr, def->os.loader->nvram->pat= h) < 0) rc =3D -1; =20 return rc; @@ -2851,8 +2852,9 @@ virSecuritySELinuxSetAllLabel(virSecurityManagerPtr m= gr, /* 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) < 0) return -1; =20 --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296566463927.3851940788953; Mon, 14 May 2018 04:16:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B0648317C67A; Mon, 14 May 2018 11:16:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E6525C88A; Mon, 14 May 2018 11:16:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 047914BB79; Mon, 14 May 2018 11:16:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFpOJ009799 for ; Mon, 14 May 2018 07:15:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 23DA25C88A; Mon, 14 May 2018 11:15:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30AE55C3F7; Mon, 14 May 2018 11:15:47 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C23C109032; Mon, 14 May 2018 11:15:36 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id j20-v6so5858143pff.10; Mon, 14 May 2018 04:15:36 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I/X+5Ftjrz/QZUd9e7jCBLq9A5+g0/phBnrCn/aCpuw=; b=iwIAMNzPfcwv+VD//PBzpoG5iiwnnF7VoHyfT4WzBayu3d9T3ty7VysMdVPR+5yBnm zBYo+fRl2oDQpe7W8swMqtFCa3ztiZzdCUdX/gg9jMM1Oza6pj0rDhguJ80JkkTn2Opx 8gBi1Y3iOracQuqjf1aMkJ+cX46BuMxgSR+39bFrBG/ztOs4RpZbeCB2BAtaVzWOeYMh rrSERWTzKSbV3Vq7WUZmVcI57FI25aNhcGmgeF/lsWH2oUt0yAf+FroO/mdjC6L510Kc qUnQmw4QszWXk1Lf5R/MXuOrZnTJ9wDK87q3YlxHw7/bnFqb4FGZrL5tc8HIS7sbtXur Xc3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=I/X+5Ftjrz/QZUd9e7jCBLq9A5+g0/phBnrCn/aCpuw=; b=juWpT2eCX5BJr7XQ5kz8re3sICD+OD4W1vmTTrQpHedBwGq6szKJP3enHsI49H5q4y e0cc/ezm6HOHDGJvZpqrfyfAYLTo++GrLSWtccIr4EsrPdD6hrznVCeg+L5tt39X9+AB BxqdHS95V3ZvwVP3409njbXJSAj9sVRn3p9896yUwwI8RcoYAq08uTfqVnEdwoSm3O7u 0b4417zEE5UV9DvhXph6rxaU+C8NohINPSoT7c4Ds3rVXbHu2DMUaDuYYI95BsqDeXIB lCdTh2EpyepWYQiJdgQqYzj6ShIC5QVrwPS5wqe+pZPggYtUXLsEZpQ75Dcyhs7re4IL t9fA== X-Gm-Message-State: ALKqPwdmpdL9UprjjJ2mOBVnSeLYpnIE57RuUfnNGXQTIurlZIhxKj8a ly3vvvBgRUGkxWgEC7dFii9PQg== X-Google-Smtp-Source: AB8JxZqQ179PlpdGXd/rnTjDOlceSjYgGGhojToKAPAvtVg+3eCXxVEkmjAMtkU7llFIG5sJPgmGSA== X-Received: by 2002:a63:b51a:: with SMTP id y26-v6mr8289797pge.215.1526296535472; Mon, 14 May 2018 04:15:35 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:16 -0700 Message-Id: <20180514111522.4363-7-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 14 May 2018 11:15:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 14 May 2018 11:15:36 +0000 (UTC) for IP:'209.85.192.195' DOMAIN:'mail-pf0-f195.google.com' HELO:'mail-pf0-f195.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.696 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.195 mail-pf0-f195.google.com 209.85.192.195 mail-pf0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 06/12] Fix the domain def inference logic to correctly account for network-backed pflash devices. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 14 May 2018 11:16:05 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- src/qemu/qemu_parse_command.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 351425f..9b1a86e 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -650,6 +650,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt, int idx =3D -1; int busid =3D -1; int unitid =3D -1; + bool is_firmware =3D false; =20 if (qemuParseKeywords(val, &keywords, @@ -772,6 +773,9 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt, def->bus =3D VIR_DOMAIN_DISK_BUS_VIRTIO; } else if (STREQ(values[i], "xen")) { def->bus =3D VIR_DOMAIN_DISK_BUS_XEN; + } else if (STREQ(values[i], "pflash")) { + def->bus =3D VIR_DOMAIN_DISK_BUS_LAST; + is_firmware =3D true; } else if (STREQ(values[i], "sd")) { def->bus =3D VIR_DOMAIN_DISK_BUS_SD; } @@ -943,8 +947,25 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt, ignore_value(VIR_STRDUP(def->dst, "hda")); } =20 - if (!def->dst) - goto error; + if (!def->dst) { + if (is_firmware && def->bus =3D=3D VIR_DOMAIN_DISK_BUS_LAST) { + if (!dom->os.loader && (VIR_ALLOC(dom->os.loader) < 0)) + goto error; + if (def->src->readonly) { + /* Loader spec */ + dom->os.loader->src =3D def->src; + dom->os.loader->type =3D VIR_DOMAIN_LOADER_TYPE_PFLASH; + } else { + /* NVRAM Spec */ + if (!dom->os.loader->nvram && (VIR_ALLOC(dom->os.loader->n= vram) < 0)) + goto error; + dom->os.loader->nvram =3D def->src; + } + } else { + goto error; + } + } + if (STREQ(def->dst, "xvda")) def->dst[3] =3D 'a' + idx; else @@ -2215,8 +2236,11 @@ qemuParseCommandLine(virCapsPtr caps, } else if (STREQ(arg, "-bios")) { WANT_VALUE(); if (VIR_ALLOC(def->os.loader) < 0 || - VIR_STRDUP(def->os.loader->path, val) < 0) + VIR_ALLOC(def->os.loader->src) < 0 || + VIR_STRDUP(def->os.loader->src->path, val) < 0) goto error; + def->os.loader->src->type =3D VIR_STORAGE_TYPE_FILE; + def->os.loader->type =3D VIR_DOMAIN_LOADER_TYPE_ROM; } else if (STREQ(arg, "-initrd")) { WANT_VALUE(); if (VIR_STRDUP(def->os.initrd, val) < 0) --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296567899678.0438159301821; Mon, 14 May 2018 04:16:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BB073006A93; Mon, 14 May 2018 11:16:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D07660BE7; Mon, 14 May 2018 11:16:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E2773180124C; Mon, 14 May 2018 11:16:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFowg009789 for ; Mon, 14 May 2018 07:15:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1295498F43; Mon, 14 May 2018 11:15:50 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D70098F41; Mon, 14 May 2018 11:15:48 +0000 (UTC) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F3C3C0B7408; Mon, 14 May 2018 11:15:37 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id a20-v6so1921472pfo.0; Mon, 14 May 2018 04:15:37 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P+4ipeJAHQCUtEqjLv5W8b8uyfdw3EIUuZ+bmpr6qVs=; b=S5rXdUjQa79iu56MdhUPOyBcIHTgn9uLR8JG2S54YyXAGJi7pUBkIedBAK+TrHeAAm RdkdoUcANebWJiJnVlY+hb7qIdGKLex647CevEPDsn2tLeHV6iOUJtYb1yCuFWneHqud sL3FNFOI36bwQXzPKlbtyuZSsRpBQKRTHP+99EqFrE6y9mlOJLgcWXGglEtTrEtZbz+h 7dMCbLoyafF5inGtMwDhRyyWl69cyzCte2rFRo1je/JKW7JxkJMcMRxD7wTBr7zt/jAo 7KuCMTzpHI5dG3C7GPUXoHlRJW940SPTXqC57760alMsf+qYU8xwsXJmqkvbXi8tJO59 dXZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P+4ipeJAHQCUtEqjLv5W8b8uyfdw3EIUuZ+bmpr6qVs=; b=m3yKXkrOzyfnhCjw0PR3EWkFjweLoCgeCyVo8VbKJ8sh3BAoC5XwIRdf+1HuKJJEll EVUNlFHfxjXWEvq2BxLRi7XUtWutTYPJj944TWYkaN1C3VtmZBBQJKvV61zDYVHTgXSS A9WHgT19adi4ydUhwzyt1ZbP5LxT+MIg1ULT+ci2IsvP6Nsz4EkxgPdYGFwgvTFa3N25 8bfhLoGZf3rHzLC82MhawYfXDJU2tY5IjAWO7mmtu/pzZwCLUIXakJjrPP0Y0hxYjwXf fXXZsEIXS91GRYw6msN8dnIdebleHAJjJPvsrj8LbInbDP94OzJ+BUUbRcqEAq2VajYk FNew== X-Gm-Message-State: ALKqPweh18COsZ/VAMx+9gI7T92fp2+tPZ3PsYICtKMYWxUHu8/Bcas/ B8Rg8QhE+C1YC7Jxc/+WsJ1w3g== X-Google-Smtp-Source: AB8JxZptc1gfPHcg1VWBNQiYey01Jeyjkj0Yn2+aT7HpC5b0QIMTidwwy/jb5Wz44ryp6NGbYJcL4Q== X-Received: by 2002:a63:7f18:: with SMTP id a24-v6mr8132959pgd.312.1526296536579; Mon, 14 May 2018 04:15:36 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:17 -0700 Message-Id: <20180514111522.4363-8-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 14 May 2018 11:15:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 14 May 2018 11:15:37 +0000 (UTC) for IP:'209.85.192.196' DOMAIN:'mail-pf0-f196.google.com' HELO:'mail-pf0-f196.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.696 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.196 mail-pf0-f196.google.com 209.85.192.196 mail-pf0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 07/12] Bhyve: Fix command line generation to correctly pick up local loader path. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 14 May 2018 11:16:07 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- src/bhyve/bhyve_command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 9413ae5..2b67014 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -518,10 +518,12 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, virCommandAddArgList(cmd, "-s", "0:0,hostbridge", NULL); =20 if (def->os.bootloader =3D=3D NULL && - def->os.loader) { + def->os.loader && + def->os.loader->src && + def->os.loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE) { if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_LPC_BOOTROM)) { virCommandAddArg(cmd, "-l"); - virCommandAddArgFormat(cmd, "bootrom,%s", def->os.loader->path= ); + virCommandAddArgFormat(cmd, "bootrom,%s", def->os.loader->src-= >path); add_lpc =3D true; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296571952985.0205518118811; Mon, 14 May 2018 04:16:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 761FA30BDE22; Mon, 14 May 2018 11:16:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 176125C25E; Mon, 14 May 2018 11:16:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9ABD7180B5B6; Mon, 14 May 2018 11:16:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFpBt009813 for ; Mon, 14 May 2018 07:15:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id CA0A22010CDC; Mon, 14 May 2018 11:15:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C46420155FD; Mon, 14 May 2018 11:15:49 +0000 (UTC) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25A90C107C6C; Mon, 14 May 2018 11:15:38 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id x145-v6so5340924pgx.11; Mon, 14 May 2018 04:15:38 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ssYSQGjMLBTi4GrZ+ZueARlspDEQTfVE8o3MsIWuuvA=; b=M1odqfgQ2DLFtOcHnxsvzDx4U0el24/CripySUlMOWRMUEaX24jmOwSKuTyedDqY+V VB1mTWj7QXdPUwG3PSs5QC+P0XrPnxW3ci3fO+pf7vVP2e/wmR/wCNaIMoKAtisYSFnH ihHwjj02DVaEeSJQngfV1yv8RSP5PBFZ6e9RyediPNHgrvTlkBLG2heL+zZaKr21VOPj fpq+z/shUFbCe299u31VziOl1re95vVIcQ9soGOkk5u1JWgIB52Il8Z+t2Ts7ChEyah6 WDDl/ooV6j0+M9CaJSLjgFQoAgjUeMs7QQQPbf1jEbZVHHnXh/9t45KccvUVN8LIXfY4 hFLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ssYSQGjMLBTi4GrZ+ZueARlspDEQTfVE8o3MsIWuuvA=; b=tjhEL9u6tMqkfgslqzzwlU22O2rKm/Pq2CsqkoXgTGPHaAwRBRjKOQlXVz5CEiT/Ps uPpPfdOP83qkr3hl35DQuJCFmMrYy3EDTDepzTTyVlKcYQpunVAg62rdUijVSx8lUvmu J2STgH1z8tJddHpHmX32jhgTYHcFbITshm4PNdxD3j96oTzD9d8ltgVfnEoCU/9Jy7E9 Q6EtbEzd8oV7y2dgi+uhL37VSTfF53uE57olar/yIWNUwgqrB3pVBV4aKzGWayv1ginS HGjtCKm9yQsfgY1yo1Y5NJ5lYo1BIFds3rfvsXUlC9EiNC1VyeSNxfhGNnY6gSfXiC6n eBBw== X-Gm-Message-State: ALKqPwcgRl7VAFwKtQveaAfVATC7WI59IWFou/Q2dsPWNgSrWYUcT0Gr QYpPl5GdSo29t0XF0i3hnH06cA== X-Google-Smtp-Source: AB8JxZoiTuCqqRK+G68ldb3qNkjlW4h5rFOJtFzQSJ/xcd2y6OtR2H4tzbI1fRRIvXIiRs4pDWupZQ== X-Received: by 2002:a62:c615:: with SMTP id m21-v6mr10019416pfg.232.1526296537455; Mon, 14 May 2018 04:15:37 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:18 -0700 Message-Id: <20180514111522.4363-9-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 14 May 2018 11:15:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 14 May 2018 11:15:38 +0000 (UTC) for IP:'74.125.83.65' DOMAIN:'mail-pg0-f65.google.com' HELO:'mail-pg0-f65.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.83.65 mail-pg0-f65.google.com 74.125.83.65 mail-pg0-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 08/12] virt-aa-helper: Adjust references to loader & nvram elements to correctly parse the virStorageSource types. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 14 May 2018 11:16:11 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- src/security/virt-aa-helper.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index d0f9876..8217d67 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1063,12 +1063,18 @@ get_files(vahControl * ctl) if (vah_add_file(&buf, ctl->def->os.slic_table, "r") !=3D 0) goto cleanup; =20 - if (ctl->def->os.loader && ctl->def->os.loader->path) - if (vah_add_file(&buf, ctl->def->os.loader->path, "rk") !=3D 0) + if (ctl->def->os.loader && + ctl->def->os.loader->src && + ctl->def->os.loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE && + ctl->def->os.loader->src->path) + if (vah_add_file(&buf, ctl->def->os.loader->src->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=3D VIR_STORAGE_TYPE_FILE && + ctl->def->os.loader->nvram->path) + 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++) { --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296573951222.11805851886925; Mon, 14 May 2018 04:16:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 587F6D81B8; Mon, 14 May 2018 11:16:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 226B75D757; Mon, 14 May 2018 11:16:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CE6643FCF9; Mon, 14 May 2018 11:16:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFqix009819 for ; Mon, 14 May 2018 07:15:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7041D1001948; Mon, 14 May 2018 11:15:52 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D33810018F8; Mon, 14 May 2018 11:15:50 +0000 (UTC) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F01C9C0CD16E; Mon, 14 May 2018 11:15:38 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id p14-v6so5859423pfh.9; Mon, 14 May 2018 04:15:38 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wn0pTd2cqTGlr4+6bvdW3CbWOs40+030llYkBOdo20Q=; b=k55pkc1kxFh83gkGbeV2BORe9upaNvd8qOscHqiN6KYqei21JDp2Gmi2spnGzTM8LB M4wjWNiKIAWDDh7C0eXPLR2V+q0sDO3ewjPqGVTdKQvaw0/4msOf0yYdzMEOV8FuuDGM L5pOqcl+LtWKHvpjEz2Omo1G61C+Qk3lj8mE0/xG+jqqiIBTgZpyxiFA+QuBKGGq8j4D qW+T4BUj77VaroA3fXnM2vYgWdlTcer42XyBM6frzAyjEvaJxDxYXWU48GlX96CLaR5R G/F79vdZwqB3ab+rIwNdpNGUeKDPhxVNGGnzTyQ3ZMHKqQjU0mt8X4mxQvSf0GyfPcrG f8gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wn0pTd2cqTGlr4+6bvdW3CbWOs40+030llYkBOdo20Q=; b=Na2HlAyr4h5MBBATNEx0q9FCt3xDqQsgutJlR6aVxuIkdqVlePTbywxNyMwT4H4YiO /YGiFofdmjuMoMc5Uafv952G4O7jUyhw+WfT/doyQVNncHkt+XQJ0nIoIlOplls0OawI t4VGlGKpycVtsaHbPvrDUxgPWBQgTobSlNB1fSdALdrGOhPJAGOoYKhjWqHf/PbsHrni bluabOy7YEAUaZBCXU+J+KMN7v7gMyeii8RHpWIv5/pWPENNl4xGXkeEnE7zcjyYY1hm kEOwYelpLieTJFLcbwt2R2MZr4PcEeqS9uAQDM3tqz/tA3YXQR4kVxWr6iuMerYNnwal qD+g== X-Gm-Message-State: ALKqPwej1QV2lyU5jcNFT3YgFem3hVSOycH3ndCDBUpWGYbINbYWELD8 h+SNWDWSXtVwpTBaBPkJdQItyg== X-Google-Smtp-Source: AB8JxZothnZVcHJEDP5S32Qbdc3m7BihMm5k+QI0l3mMUy7kmg2ag11Kui65M08zHuNgcZb9zi34mA== X-Received: by 2002:a62:469b:: with SMTP id o27-v6mr9959401pfi.124.1526296538326; Mon, 14 May 2018 04:15:38 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:19 -0700 Message-Id: <20180514111522.4363-10-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 14 May 2018 11:15:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 14 May 2018 11:15:39 +0000 (UTC) for IP:'209.85.192.196' DOMAIN:'mail-pf0-f196.google.com' HELO:'mail-pf0-f196.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.696 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.196 mail-pf0-f196.google.com 209.85.192.196 mail-pf0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 09/12] Vbox: Adjust references to 'loader' and 'nvram' elements given that these are now represented by virStorageSourcePtr. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 14 May 2018 11:16:13 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- src/vbox/vbox_common.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 72a24a3..60451a3 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -998,11 +998,16 @@ vboxSetBootDeviceOrder(virDomainDefPtr def, vboxDrive= rPtr data, VIR_DEBUG("def->os.initrd %s", def->os.initrd); VIR_DEBUG("def->os.cmdline %s", def->os.cmdline); VIR_DEBUG("def->os.root %s", def->os.root); - if (def->os.loader) { - VIR_DEBUG("def->os.loader->path %s", def->os.loader->path); + if (def->os.loader && + def->os.loader->src && + def->os.loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE) { + + VIR_DEBUG("def->os.loader->src->path %s", def->os.loader->src-= >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); + if (def->os.loader->nvram && + def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE) + 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 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15262965664611020.8648986471214; Mon, 14 May 2018 04:16:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4BFE3114998; Mon, 14 May 2018 11:16:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC0D460BE7; Mon, 14 May 2018 11:16:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4F0F64CA95; Mon, 14 May 2018 11:16:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFprn009808 for ; Mon, 14 May 2018 07:15:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4732F26576; Mon, 14 May 2018 11:15:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3806F26184; Mon, 14 May 2018 11:15:51 +0000 (UTC) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D60E317F38A; Mon, 14 May 2018 11:15:40 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id l2-v6so5347986pgc.7; Mon, 14 May 2018 04:15:40 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zJPqtXO+FSlLL3w+r4D77DSNeclIwMnwvVofFtutSEM=; b=X2VRM1PRK+PtL118FmMc7TEy0RLDiQlpjM9Nhs/cAJUs8M+jAin/Xk9zBMmDT/bfk5 UQiiGICzmgM95XU+ubTe0l/q9fGy2M/2u2Mx8mPy32kWNbauTOUB0M/xyEu2h66A41oC 7BEylA+aY607x3MftqWnbzekSwBU3Cqj3EPAq8ldXrmUVbWgnJxIdl3JYqhP/rUUdTuU +MMw8SP1K5QaZgyT6OfWvqc6V7W7Rnm0+ydoiBlHMoP8fYlRN606xwpalJDwnFDW0UO+ 9YkeXLsiZ893VmK75/5TfAIVn5JoHxevkImY4BkIyCEvX7auaVfGyt147LoMvPywseof wI5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zJPqtXO+FSlLL3w+r4D77DSNeclIwMnwvVofFtutSEM=; b=pk2e+0D+27JnAZcTop03g5IpTrDm0dnJil1rgDengIsIH5q4OVAXpVJnDgy8fotlen ZHMx8EZfjgidNifOwit2FAKAunyPLbO7RSb+qiO3TcNgQfWsTa8aB7Z6+i1giD/Lh/kN cf2LuNotggUJARShSocmy6rpoHPqD0aZgGDqUi9+/8X085i+QTAfdpcY9+X6fPzFi39x TPDrbgDTIYv+3AXUXQjZfyeM3NHlqm6n2OzFIATvLKCzLqq9FeIEeiaxnYx2INsVsLqW OfShm7YXBoOmn6qUYJnVSvQfdhlBJ/azXAoT/8jpq8/RhmYR8+U33PyU0p+LDQ+FZTHZ gmuA== X-Gm-Message-State: ALKqPwdPPLTwFfWUG0/Ooj0g854UJBz0oOT3P6oVN0+FXOI+F0kryWMd IyWGVSKhRBPDNrpdpkCylOzjjw== X-Google-Smtp-Source: AB8JxZq2NAMYxW19bFXN/xpZ2qbhB/GUKTEu221FVJ1aW/Clp1ijfPiPHtGM5uLlwJfqs+iDEhcXzQ== X-Received: by 2002:a62:b2d0:: with SMTP id z77-v6mr10071566pfl.122.1526296539292; Mon, 14 May 2018 04:15:39 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:20 -0700 Message-Id: <20180514111522.4363-11-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 14 May 2018 11:15:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 14 May 2018 11:15:40 +0000 (UTC) for IP:'74.125.83.68' DOMAIN:'mail-pg0-f68.google.com' HELO:'mail-pg0-f68.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.83.68 mail-pg0-f68.google.com 74.125.83.68 mail-pg0-f68.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 10/12] Xen: Adjust all references to loader & nvram elements given that they are now backed by virStorageSourcePtr X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 14 May 2018 11:16:05 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- src/xenapi/xenapi_driver.c | 4 +++- src/xenconfig/xen_sxpr.c | 19 +++++++++++-------- src/xenconfig/xen_xm.c | 9 ++++++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 42b305d..4070660 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1444,10 +1444,12 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned i= nt flags) char *value =3D NULL; defPtr->os.type =3D VIR_DOMAIN_OSTYPE_XEN; if (VIR_ALLOC(defPtr->os.loader) < 0 || - VIR_STRDUP(defPtr->os.loader->path, "pygrub") < 0) { + VIR_ALLOC(defPtr->os.loader->src) < 0 || + VIR_STRDUP(defPtr->os.loader->src->path, "pygrub") < 0) { VIR_FREE(boot_policy); goto error; } + defPtr->os.loader->src->type =3D VIR_STORAGE_TYPE_FILE; xen_vm_get_pv_kernel(session, &value, vm); if (STRNEQ(value, "")) { if (VIR_STRDUP(defPtr->os.kernel, value) < 0) { diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index e868c05..fd3165c 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -87,15 +87,17 @@ xenParseSxprOS(const struct sexpr *node, int hvm) { if (hvm) { - if (VIR_ALLOC(def->os.loader) < 0) + if ((VIR_ALLOC(def->os.loader) < 0) || + (VIR_ALLOC(def->os.loader->src) < 0)) goto error; - if (sexpr_node_copy(node, "domain/image/hvm/loader", &def->os.load= er->path) < 0) + def->os.loader->src->type =3D VIR_STORAGE_TYPE_FILE; + if (sexpr_node_copy(node, "domain/image/hvm/loader", &def->os.load= er->src->path) < 0) goto error; - if (def->os.loader->path =3D=3D NULL) { - if (sexpr_node_copy(node, "domain/image/hvm/kernel", &def->os.= loader->path) < 0) + if (def->os.loader->src->path =3D=3D NULL) { + if (sexpr_node_copy(node, "domain/image/hvm/kernel", &def->os.= loader->src->path) < 0) goto error; =20 - if (def->os.loader->path =3D=3D NULL) { + if (def->os.loader->src->path =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("domain information incomplete, mis= sing HVM loader")); return -1; @@ -124,7 +126,8 @@ xenParseSxprOS(const struct sexpr *node, /* If HVM kenrel =3D=3D loader, then old xend, so kill off kernel */ if (hvm && def->os.kernel && - STREQ(def->os.kernel, def->os.loader->path)) { + def->os.loader->src && + STREQ(def->os.kernel, def->os.loader->src->path)) { VIR_FREE(def->os.kernel); } /* Drop kernel argument that has no value */ @@ -2259,9 +2262,9 @@ xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def) if (hvm) { char bootorder[VIR_DOMAIN_BOOT_LAST+1]; if (def->os.kernel) - virBufferEscapeSexpr(&buf, "(loader '%s')", def->os.loader= ->path); + virBufferEscapeSexpr(&buf, "(loader '%s')", def->os.loader= ->src->path); else - virBufferEscapeSexpr(&buf, "(kernel '%s')", def->os.loader= ->path); + virBufferEscapeSexpr(&buf, "(kernel '%s')", def->os.loader= ->src->path); =20 virBufferAsprintf(&buf, "(vcpus %u)", virDomainDefGetVcpusMax(= def)); if (virDomainDefHasVcpusOffline(def)) diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c index 8ef68bb..c6a1f03 100644 --- a/src/xenconfig/xen_xm.c +++ b/src/xenconfig/xen_xm.c @@ -47,8 +47,10 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def) const char *boot; =20 if (VIR_ALLOC(def->os.loader) < 0 || - xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0) + VIR_ALLOC(def->os.loader->src) < 0 || + xenConfigCopyString(conf, "kernel", &def->os.loader->src->path= ) < 0) return -1; + def->os.loader->src->type =3D VIR_STORAGE_TYPE_FILE; =20 if (xenConfigGetString(conf, "boot", &boot, "c") < 0) return -1; @@ -481,9 +483,10 @@ xenFormatXMOS(virConfPtr conf, virDomainDefPtr def) if (xenConfigSetString(conf, "builder", "hvm") < 0) return -1; =20 - if (def->os.loader && def->os.loader->path && - xenConfigSetString(conf, "kernel", def->os.loader->path) < 0) + if (def->os.loader && def->os.loader->src && + xenConfigSetString(conf, "kernel", def->os.loader->src->path) = < 0) return -1; + def->os.loader->src->type =3D VIR_STORAGE_TYPE_FILE; =20 for (i =3D 0; i < def->os.nBootDevs; i++) { switch (def->os.bootDevs[i]) { --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296571226183.56640414569927; Mon, 14 May 2018 04:16:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B05F130C4CA5; Mon, 14 May 2018 11:16:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8547B30012A6; Mon, 14 May 2018 11:16:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3B878180B5B4; Mon, 14 May 2018 11:16:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFsL5009843 for ; Mon, 14 May 2018 07:15:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 70170300164E; Mon, 14 May 2018 11:15:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38EB530012A6; Mon, 14 May 2018 11:15:52 +0000 (UTC) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF989230D0C; Mon, 14 May 2018 11:15:40 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id x145-v6so5340985pgx.11; Mon, 14 May 2018 04:15:40 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/5Eqyx8drpUAoULQ+NA4qvUHw+FHT7AtvvQcrdSf/Jc=; b=ElemnHHOnKp4HA9po4EzbPLUK01G9QlBQ9OqGVK7TX5dp24HII14kraodW88FJcG5P QC1Z+tyTyvRIp2FofBgcfLZlp5WgbkMbxrJ7qgvTAm//wJmL6b9NH6zE0NsXXw+BCcJi BfMpjoXdu5R3Z5jUiHXJsiL/PSi2s3DZRBqicsesHOAub58icnEQ/FwHoQY0suzTuiOL POIQCxwdUMlQ6VRUSO6X2r32VqMFE4Lgw/yepcTzvJONbkvsccbcxTKgI+DS26xAedc+ UnVdeO90673JHZEi1/+biI0duYzOXSAgBIFNxXOxXAa5RhTfi6OLdLpQjcSjFP2I4I6M xKiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/5Eqyx8drpUAoULQ+NA4qvUHw+FHT7AtvvQcrdSf/Jc=; b=VqKBwyeJjWgCYCrOCuH5Bfomb679Y3vPYFNEHtQhmP1l9huA1iwizl22W0fG0h9FME SzG2Qo8NvOCRKIIAzZqF9G0MWWhdDea/vGlOFJ0mzUrngthNC3VbzwymWMeKJEaNjuIK lWipYFyDzKw8BkfT83hkRbOmHHJe/uV9ObZoLJOXR9Xp8eGuhCZmwSGxWHQ1CFXPr24y Kn/Vzj1UVXPv+9NrTrow1lLN/ZUclTgCcw0A1SsvdD0AwT28OSbfDaRRqKkBq5OjIUPg XAko0qyu8ty4oOHcxrL7hUPl9qWzzsCCYkYlz2dri4LSchaaEQ87D/qToKIjiMXQwm7G eJeQ== X-Gm-Message-State: ALKqPwe5rHWCSaAkbvGpqAmZ7bn+N1Y0RjmplWHh0dPhsvUvSocbYB6v KD3fHGQ2js0A1px0Losle6O+xw== X-Google-Smtp-Source: AB8JxZpoxxF309EsMSI9IhIRQtKoW8BzK2gx7fSkBuu+uLOyJz1xMj3mvGxIBuHtDgjIClNc0rYfUQ== X-Received: by 2002:a62:32c6:: with SMTP id y189-v6mr10000953pfy.241.1526296540164; Mon, 14 May 2018 04:15:40 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:21 -0700 Message-Id: <20180514111522.4363-12-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 14 May 2018 11:15:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 14 May 2018 11:15:41 +0000 (UTC) for IP:'74.125.83.68' DOMAIN:'mail-pg0-f68.google.com' HELO:'mail-pg0-f68.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.83.68 mail-pg0-f68.google.com 74.125.83.68 mail-pg0-f68.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 11/12] Test: Add a test snippet to evaluate command line generation for loader/nvram specified via virStorageSource X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 14 May 2018 11:16:10 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- tests/qemuxml2argvdata/bios-nvram-network.args | 31 +++++++++++++++++++ tests/qemuxml2argvdata/bios-nvram-network.xml | 42 ++++++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 74 insertions(+) create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.args create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.xml diff --git a/tests/qemuxml2argvdata/bios-nvram-network.args b/tests/qemuxml= 2argvdata/bios-nvram-network.args new file mode 100644 index 0000000..3fc68ef --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-network.args @@ -0,0 +1,31 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name test-bios \ +-S \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-drive file=3D/usr/share/OVMF/OVMF_CODE.fd,if=3Dpflash,format=3Draw,unit= =3D0,\ +readonly=3Don \ +-drive file=3Discsi://example.org:6000/iqn.1992-01.com.example/0,\ +if=3Dpflash,format=3Draw,unit=3D1 \ +-m 1024 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 362d1fc1-df7d-193e-5c18-49a71bd1da66 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-test-bios/monit= or.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot order=3Dc,menu=3Don \ +-usb \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ +-device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ +-device usb-tablet,id=3Dinput0,bus=3Dusb.0,port=3D1 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/bios-nvram-network.xml b/tests/qemuxml2= argvdata/bios-nvram-network.xml new file mode 100644 index 0000000..bad114c --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-network.xml @@ -0,0 +1,42 @@ + + test-bios + 362d1fc1-df7d-193e-5c18-49a71bd1da66 + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-x86_64 + + + +
+ + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ddf567b..7338dba 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -853,6 +853,7 @@ mymain(void) QEMU_CAPS_DEVICE_ISA_SERIAL, QEMU_CAPS_SGA); DO_TEST("bios-nvram", NONE); + DO_TEST("bios-nvram-network", NONE); DO_TEST("bios-nvram-secure", QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_BRIDGE, --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 12:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296578900181.17963008376967; Mon, 14 May 2018 04:16:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4FBB210B1A8; Mon, 14 May 2018 11:16:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 157745D761; Mon, 14 May 2018 11:16:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A55AD3FADE; Mon, 14 May 2018 11:16:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFrlL009828 for ; Mon, 14 May 2018 07:15:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 028F130012A4; Mon, 14 May 2018 11:15:53 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA0C730012A2; Mon, 14 May 2018 11:15:52 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E113A30BEE2C; Mon, 14 May 2018 11:15:41 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id p12-v6so5855218pff.13; Mon, 14 May 2018 04:15:41 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LIARk5L9+tMG7AGTfg0RJtKdh9tMYjWUD3W71RSL5pc=; b=c/qrkvOvC30xxjZ8t96KxxMD2fzp8q7Cq/A1blQy/Ag5HOrtY0rZ5Y5IKK3SKSwGSF E28BVnJhxrw9Lfu1wq5NH1lX+YMVr6+vqgCiwl2rbnn44jYprLUTwPAEBXg2H8QC1x7d j5bvlf6W9sczkHaVZ61dcv++38uSyn0f6x3vVt/bn4M8nn2UA++xmd0JT2Eg/YnoaIcJ zrlm2GEHvZGEkwxKkqz1NXkznJua19v9KqTroweatgZYE+34EPaCKL3zcJKLOjgdne7A OOKeQxjuRCabJSpzIgN2vH4IsnSsfT4zJyuu1GxQ7QsjI7+cBAy3a//cEkZnatcjAuSw Orxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LIARk5L9+tMG7AGTfg0RJtKdh9tMYjWUD3W71RSL5pc=; b=Ms27/K4GmahvFAWYQtgyWsmXU7qHfFGBMH1kWBz4BEQb2SVW0XMFHPyWNSN0AKw+2+ UlSL9xUmSOc+7hNTkGw1q62Ob+/nDhvpQQNOWMBRNuLyOhGHw/po8PH2EH1v/mCWeWEk +Ukakn1hNEomXrtGtkjGDpX+ONRHsQ6VT+CeoPBbjLLQAF2DAEmtOBku7M8+mKrJm055 67wvMcchE40fKmNZT3LbVq2sRZ2VO98yJIhlSo2dj+P4DROXDm9NGtehHTwIXg+rcTH4 Zym4o6i23vq1DOSj5FZgXML1vUwJiioCg6gG+qn4pDgRd3r5RZv6VTL9YfLmWSsinSlx 97YA== X-Gm-Message-State: ALKqPwfvwbQvAOB8aiRB9S3iLtuUpgV3oogu2tkLZoExAdbjWxC5osTj VCogDved1Bttx5giybUNG3iMEw== X-Google-Smtp-Source: AB8JxZrv7ZZkxDQBDDrmp4/EPsh/J5CqYiLCbnPwm71rScgmn0XaHBHwkZ3Y2zMOrSBw5s94OBnWOA== X-Received: by 2002:a62:4ec8:: with SMTP id c191-v6mr9882847pfb.153.1526296541164; Mon, 14 May 2018 04:15:41 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:22 -0700 Message-Id: <20180514111522.4363-13-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 14 May 2018 11:15:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 14 May 2018 11:15:42 +0000 (UTC) for IP:'209.85.192.193' DOMAIN:'mail-pf0-f193.google.com' HELO:'mail-pf0-f193.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.696 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.193 mail-pf0-f193.google.com 209.85.192.193 mail-pf0-f193.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 12/12] Documentation: Add a blurb for the newly added XML snippets for loader and nvram. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 14 May 2018 11:16:17 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- docs/formatdomain.html.in | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index caeb14e..b8cb7ac 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -112,6 +112,20 @@ </os> ... =20 +

Where loader/NVRAM can also be described as:

+ +
+...
+  <loader readonly=3D'yes' secure=3D'no' type=3D'rom' backing=3D'file'&=
gt;
+    <source file=3D'/usr/share/OVMF/OVMF_CODE.fd'/>
+  </loader>
+  <nvram backing=3D'network' template=3D'/usr/share/OVMF/OVMF_VARS.fd'&=
gt;
+    <source protocol=3D'iscsi' name=3D'iqn.2013-07.com.example:iscsi-no=
pool/2'>
+      <host name=3D'example.com' port=3D'3260'/>
+    </source>
+  </nvram>
+...
+
type
The content of the type element specifies the @@ -143,7 +157,15 @@ pflash. Moreover, some firmwares may implement the Secure boot feature. Attribute secure can be used then to control it. - Since 2.1.0
+ Since 2.1.0Sinc= e 4.5.0 + Loader element can also be specified as a remote disk. The attribu= te + backing (accepted values are + file and network)can be used to represent + local absolute paths as well as network-backed disks. The details = of + backing file may be specified as s= torage source + Allowed backing type file replaces the old + specification and extends to all hypervisors that supported it, wh= ile + type network is only supported by QEMU.
nvram
Some UEFI firmwares may want to use a non-volatile memory to sto= re some variables. In the host, this is represented as a file and the @@ -154,7 +176,15 @@ from the config file. Note, that for transient domains if the NVRA= M 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 1.2.8
+ persistent). Since 1.2.8 + Since 4.5.0, attribute + backing(accepted values file + and network)can be used to specify a + storage source + of type file or network. The value filedescribes + absolute NVRAM paths and extends the present specification + for all hypervisors that support this, while + network applies only to QEMU.
boot
The dev attribute takes one of the values "fd", "hd= ", "cdrom" or "network" and is used to specify the next boot device @@ -2707,7 +2737,7 @@
-
source
+
Disk source
Representation of the disk source depends on the disk type attribute value as follows:
--=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list