From nobody Sun Feb 8 22:06:21 2026 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507583373934947.7683014391771; Mon, 9 Oct 2017 14:09:33 -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 86F9581DF6; Mon, 9 Oct 2017 21:09:32 +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 41DBA77710; Mon, 9 Oct 2017 21:09:32 +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 9F61118355D8; Mon, 9 Oct 2017 21:09:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v99Ko2Ru022396 for ; Mon, 9 Oct 2017 16:50:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 52C3562468; Mon, 9 Oct 2017 20:50:02 +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 4AEAC62469 for ; Mon, 9 Oct 2017 20:49:59 +0000 (UTC) Received: from mail-qk0-f172.google.com (mail-qk0-f172.google.com [209.85.220.172]) (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 BCACA2579E for ; Mon, 9 Oct 2017 20:49:57 +0000 (UTC) Received: by mail-qk0-f172.google.com with SMTP id b15so22707080qkg.9 for ; Mon, 09 Oct 2017 13:49:57 -0700 (PDT) Received: from dawid-fedora.datto.lan ([47.19.105.250]) by smtp.gmail.com with ESMTPSA id y31sm5505361qta.83.2017.10.09.13.49.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2017 13:49:56 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 86F9581DF6 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 86F9581DF6 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=datto-com.20150623.gappssmtp.com header.i=@datto-com.20150623.gappssmtp.com header.b="XPhjyECo" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BCACA2579E Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dzamirski@datto.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BCACA2579E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datto-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=9JYh3BioyuXiexqYNRPjbuIydRAPwlHa5etzRxmy1wI=; b=XPhjyECol3kVkaTVu8qqScCW1BnT1k4Ca/w8vUWZEfNE1Pp/cprCkJzimy26hi6dMU uFJc/E2BGnNIZ23pMR3q1AZfv/W9bv/UYTRPX+yj0JsI00d+rVfHpFjqXBg9poCEP5iw wiylaU3/EE+oOiT4f+sMefrgkbSEbwUlXSVVSK4s84rC9LuIn//XdE2q//MdiHQsNorZ 5s8uOX4k3v8SwZQfcy6hDxVCyecI5rQYnoSjYp0swg+TYnnnAsrSUVab0jRWm57i6uWd lgRR2GaiHTt2j7yh2QgyZ0exW6ocGmZsMEk1cULFJNjMVnx8JzfPeENVPZSdVN78q/Fd mPGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=9JYh3BioyuXiexqYNRPjbuIydRAPwlHa5etzRxmy1wI=; b=qHjlyDadi3Vkdj0SdbLDe6ubPKtd7ZjsuxJUQmEzyQV65gOg8sh/AltkRkBFjWGKb0 eRq0ZaJnzX6af0S5+crX/Z0wCux4zI/4t2PbUGB8nm40qk76AsP6JJmn6r0d9kxHqZP4 hD02N2BnaZb8hn0cVqazCK0cNylR9g3rfrPcld/g0XzrlqFzAEHz4QLFaIOgrE0GFlhF J3GHDPt4dlFcl9tcZjQHsRuv/yb3R1k7laN38XlrrHaAyuYtzuWRiVyOT4KSoqhlrN9u 7+zcFukulx3kLaoHZ0f77Q59FHi52I+9pbpDTaRXS84iPoI/oFMNYCsLazKuFk5Qy7Aq emdA== X-Gm-Message-State: AMCzsaXrr58eWuyQYDHTbfS0MRI7DTWfqg72U6aE4MR+f3WMptBbcPyI cSgkVnXFw+kATD7fb/M9x6B2Y0qm0nM= X-Google-Smtp-Source: AOwi7QAeAKTyABxBWnXCzepnF7D5q0I9FAvyBtkBrHFyT7Rt+/XoAavryHE85Hh+hntt7SNgHOONOg== X-Received: by 10.55.43.227 with SMTP id r96mr11711460qkr.216.1507582196700; Mon, 09 Oct 2017 13:49:56 -0700 (PDT) From: Dawid Zamirski X-Google-Original-From: Dawid Zamirski To: libvir-list@redhat.com Date: Mon, 9 Oct 2017 16:49:50 -0400 Message-Id: <20171009204954.11382-3-dzrudy@gmail.com> In-Reply-To: <20171009204954.11382-1-dzrudy@gmail.com> References: <20171009204954.11382-1-dzrudy@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 09 Oct 2017 20:49:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 09 Oct 2017 20:49:58 +0000 (UTC) for IP:'209.85.220.172' DOMAIN:'mail-qk0-f172.google.com' HELO:'mail-qk0-f172.google.com' FROM:'dzamirski@datto.com' RCPT:'' X-RedHat-Spam-Score: -2.311 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.220.172 mail-qk0-f172.google.com 209.85.220.172 mail-qk0-f172.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/6] domain: Allow 'model' attribute for ide controller. 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.25]); Mon, 09 Oct 2017 21:09:33 +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" From: Dawid Zamirski The optional values are 'piix3', 'piix4' or 'ich6'. Those will be needed to allow setting IDE controller model in VirtualBox driver. --- docs/schemas/domaincommon.rng | 18 ++++++++++++++++-- src/conf/domain_conf.c | 9 +++++++++ src/conf/domain_conf.h | 9 +++++++++ src/libvirt_private.syms | 2 ++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4dbda6932..c3f1557f0 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1927,12 +1927,11 @@ - + fdc - ide sata ccid @@ -1993,6 +1992,21 @@ + + + + ide + + + + + piix3 + piix4 + ich6 + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 54be9028d..493bf83ff 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -378,6 +378,11 @@ VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_= CONTROLLER_MODEL_USB_LAST, "qemu-xhci", "none") =20 +VIR_ENUM_IMPL(virDomainControllerModelIDE, VIR_DOMAIN_CONTROLLER_MODEL_IDE= _LAST, + "piix3", + "piix4", + "ich6") + VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST, "mount", "block", @@ -9467,6 +9472,8 @@ virDomainControllerModelTypeFromString(const virDomai= nControllerDef *def, return virDomainControllerModelUSBTypeFromString(model); else if (def->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI) return virDomainControllerModelPCITypeFromString(model); + else if (def->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_IDE) + return virDomainControllerModelIDETypeFromString(model); =20 return -1; } @@ -9482,6 +9489,8 @@ virDomainControllerModelTypeToString(virDomainControl= lerDefPtr def, return virDomainControllerModelUSBTypeToString(model); else if (def->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI) return virDomainControllerModelPCITypeToString(model); + else if (def->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_IDE) + return virDomainControllerModelIDETypeToString(model); =20 return NULL; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a42efcfa6..d7f4c3f1e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -748,6 +748,14 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST } virDomainControllerModelUSB; =20 +typedef enum { + VIR_DOMAIN_CONTROLLER_MODEL_IDE_PIIX3, + VIR_DOMAIN_CONTROLLER_MODEL_IDE_PIIX4, + VIR_DOMAIN_CONTROLLER_MODEL_IDE_ICH6, + + VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST +} virDomainControllerModelIDE; + # define IS_USB2_CONTROLLER(ctrl) \ (((ctrl)->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) && \ ((ctrl)->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \ @@ -3231,6 +3239,7 @@ VIR_ENUM_DECL(virDomainControllerModelPCI) VIR_ENUM_DECL(virDomainControllerPCIModelName) VIR_ENUM_DECL(virDomainControllerModelSCSI) VIR_ENUM_DECL(virDomainControllerModelUSB) +VIR_ENUM_DECL(virDomainControllerModelIDE) VIR_ENUM_DECL(virDomainFS) VIR_ENUM_DECL(virDomainFSDriver) VIR_ENUM_DECL(virDomainFSAccessMode) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9243c5591..616b14f82 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -231,6 +231,8 @@ virDomainControllerFindUnusedIndex; virDomainControllerInsert; virDomainControllerInsertPreAlloced; virDomainControllerIsPSeriesPHB; +virDomainControllerModelIDETypeFromString; +virDomainControllerModelIDETypeToString; virDomainControllerModelPCITypeToString; virDomainControllerModelSCSITypeFromString; virDomainControllerModelSCSITypeToString; --=20 2.14.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list