From nobody Mon Feb 9 02:13:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1585066543; cv=none; d=zohomail.com; s=zohoarc; b=f2/Zyh2PDc0mA7CxsECXrEe2H+KDxzodlqgPBo1wuMw9Lh5LC39y90Z/m5DuZpQZJbPZyvNlg7V12jYcpouIQHN+fNri3x+HK2v/r33p3gMIikP1Ne5gpivIXqJ50js7r0u362m1AawUImRwJceDbnLPH3lf4P3qm/8umonfSMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585066543; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lJ4R/C6zf0Ox6ahT75iJ28JMB7+IZKMCUaXy3GnjDRo=; b=F7TZD9VzD+G4gzjKSlSlDJHaNPq8rNtUjw3k7fqa56SKSbwm6cK9klvxy8dAhY3OwQJSIxHW6tCUKdQnr5h3cetz/HRbiy6AMfNJJeOIQCd9DVsuiZ7jrNxxedYV+oaG/OH8MiCJHaLW4fa2+gDDWlqf1auAviBl0TeQ5tYpgyo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585066543326182.0740749107822; Tue, 24 Mar 2020 09:15:43 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-108-2OtUHHkgMHa7qxnes-rG2A-1; Tue, 24 Mar 2020 12:15:38 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E88D88024CE; Tue, 24 Mar 2020 16:15: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 B356A5C554; Tue, 24 Mar 2020 16:15: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 59B4B18089D8; Tue, 24 Mar 2020 16:15:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02OGFQYV029514 for ; Tue, 24 Mar 2020 12:15:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5E9D9D961B; Tue, 24 Mar 2020 16:15:26 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 581B4DBF03 for ; Tue, 24 Mar 2020 16:15:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE520800298 for ; Tue, 24 Mar 2020 16:15:23 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-409-QnbZOhRyMjyzZy_ctxlliw-1; Tue, 24 Mar 2020 12:15:18 -0400 Received: by mail-wm1-f65.google.com with SMTP id g62so4192013wme.1 for ; Tue, 24 Mar 2020 09:15:18 -0700 (PDT) Received: from localhost.localdomain (public-gprs375156.centertel.pl. [37.47.96.181]) by smtp.gmail.com with ESMTPSA id r17sm762028wrx.46.2020.03.24.09.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 09:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585066541; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lJ4R/C6zf0Ox6ahT75iJ28JMB7+IZKMCUaXy3GnjDRo=; b=dvedYTvzbK9TsxxuNUqT1X5dMYGzYHEk+x+i1eCrdyVtAaybNKX72LYLkH0Oj9613eLZEy WJRxhCGVnGSb47KK6w7ykMHrfZahs4VMWl2LTMWy9ztzXfs7S4yhVhb6Zm7VhSEN8TZetJ /bU9dl5yS11HCM1a71WtQ7DIN9QoysQ= X-MC-Unique: 2OtUHHkgMHa7qxnes-rG2A-1 X-MC-Unique: QnbZOhRyMjyzZy_ctxlliw-1 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:mime-version:content-transfer-encoding; bh=rZ+0+oR1UfzqLXMgKE62eDFt9eNPIrg+Rb4snmZ5jaw=; b=J/O/iu0IrQKmFmW08B2oJSXDlPfiDKqhWT1urE05orsg4KeSrBhjhhLnOyXLeAT8// uhXOYjasQmZgB36YNsBv17riA+vC2B+aiJlDHbVZVWKrcIgLd0QdR7MFMo1g1diZpAao /IW1T6JbEYQIRrQvjcHoOxrxOkTqkBzlCNHllTsp8faMz98lp2wBcnw6KJSYNQcTPaGT j0APVZknB7bnvotfzdP1k6SqiN9gyDBBKg2QXE/0O9wk/HLG90x/6E+htumqWHhK+IKi 6DhJftIEQdyRXxcW13GXaUmPzrIrzOxVkV5yH77LZn+dVYErHPunBqeFORVEjszlYaC+ mZGw== X-Gm-Message-State: ANhLgQ0F1YmUPisi6tPyhxUPkrUd0ntCGfa1oEN1qsnsTNYWZ1GAVJ8P qY7+qYBhOQ3f43JlpoWDGjyBkKykgQk= X-Google-Smtp-Source: ADFU+vsFI+qyqaoVMMVErG5wh0No7ah33cu/5GWZM/+fU0i9BPHIaRsnYBekMMmwarH09j8VOedfpw== X-Received: by 2002:a1c:6285:: with SMTP id w127mr6757061wmb.133.1585066516999; Tue, 24 Mar 2020 09:15:16 -0700 (PDT) From: Rafael Fonseca To: libvir-list@redhat.com Subject: [PATCH 4/7] vmx: vmware: move video default logic to driver Date: Tue, 24 Mar 2020 17:14:33 +0100 Message-Id: <20200324161436.2138755-5-r4f4rfs@gmail.com> In-Reply-To: <20200324161436.2138755-1-r4f4rfs@gmail.com> References: <20200324161436.2138755-1-r4f4rfs@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02OGFQYV029514 X-loop: libvir-list@redhat.com Cc: Rafael Fonseca X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The logic setting a device default should be in the post parse function of individual driver code. Signed-off-by: Rafael Fonseca --- src/conf/domain_conf.c | 2 -- src/vmware/vmware_driver.c | 4 ++++ src/vmx/vmx.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e6a3500b7a..53bc791e10 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15728,8 +15728,6 @@ virDomainVideoDefaultType(const virDomainDef *def) return VIR_DOMAIN_VIDEO_TYPE_VBOX; =20 case VIR_DOMAIN_VIRT_VMWARE: - return VIR_DOMAIN_VIDEO_TYPE_VMVGA; - case VIR_DOMAIN_VIRT_VZ: case VIR_DOMAIN_VIRT_PARALLELS: case VIR_DOMAIN_VIRT_XEN: diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 32c81b13a0..d5dd6e4f5e 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -137,6 +137,10 @@ vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr d= ev G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) { + if (dev->type =3D=3D VIR_DOMAIN_DEVICE_VIDEO && + dev->data.video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_DEFAULT) + dev->data.video->type =3D VIR_DOMAIN_VIDEO_TYPE_VMVGA; + return 0; } =20 diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 6c6ef7acf3..b1fd1181eb 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -548,6 +548,10 @@ virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr = dev G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) { + if (dev->type =3D=3D VIR_DOMAIN_DEVICE_VIDEO && + dev->data.video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_DEFAULT) + dev->data.video->type =3D VIR_DOMAIN_VIDEO_TYPE_VMVGA; + return 0; } =20 --=20 2.25.1