From patchwork Tue Mar 8 16:39:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 63696 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2131753lbc; Tue, 8 Mar 2016 08:42:18 -0800 (PST) X-Received: by 10.194.78.148 with SMTP id b20mr29668668wjx.71.1457455338200; Tue, 08 Mar 2016 08:42:18 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id la5si4776118wjb.232.2016.03.08.08.42.17 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Mar 2016 08:42:18 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u28GdY9m017981; Tue, 8 Mar 2016 11:39:35 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.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 u28GdXMb012666 for ; Tue, 8 Mar 2016 11:39:33 -0500 Received: from colepc.redhat.com (ovpn-113-126.phx2.redhat.com [10.3.113.126]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u28GdWco021657; Tue, 8 Mar 2016 11:39:32 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 8 Mar 2016 11:39:30 -0500 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] domain: Remove controller/net address whitelists 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 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Judging by how the whitelist has skewed quite far from the original error message, I think it's better to just drop these. If someone wants to revive this check I suggest implementing it on a per-HV driver basis with PostParse callbacks. --- src/conf/domain_conf.c | 24 ------------------------ 1 file changed, 24 deletions(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d376a2c..ec14577 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7969,17 +7969,6 @@ virDomainControllerDefParseXML(xmlNodePtr node, break; } - if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Controllers must use the 'pci' address type")); - goto error; - } - cleanup: ctxt->node = saved; VIR_FREE(typeStr); @@ -8670,19 +8659,6 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt, goto error; } - /* XXX what about ISA/USB based NIC models - once we support - * them we should make sure address type is correct */ - if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO && - def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Network interfaces must use 'pci' address type")); - goto error; - } - switch (def->type) { case VIR_DOMAIN_NET_TYPE_NETWORK: if (network == NULL) {