From nobody Mon May 13 10:31:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1609926464; cv=none; d=zohomail.com; s=zohoarc; b=JkKVZGLz9bUglP3zTWTVtBCtJ7BCg9sXYbRw0dz3FBNEluAQ6EI6CugsU6pp6feDrLGPjgNpiQwGhgRHNUsukQ4vf5dI63WnIq4JOuhIph+rwyzbvtdYbhpiPtLoLgi7AD36su8d3FsYlgQ9JvDGZeL4lInNkoodibPjnVXPY+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609926464; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=imVRRkOFZN04W/pQd39dex/xnFBGPOeAMmC0Wz3YbbY=; b=H1cRY/kNLi2z9UL9MuguQnW1BN1RXEaHy6X1A65ZwaeG5NZ7AqwJkAQ2rQi4JXxTvkavUcD3kIR/utAb8IXwjoBHNekm+C0wSvz/ukQ2Yqvt1ps7vj4S7o3f9k1rckAjh6WNO4qNv+7mXihY/kdJpHwOV05sDzSHKzfP1y+ZkCY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1609926464498560.9863113745498; Wed, 6 Jan 2021 01:47:44 -0800 (PST) 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-430-_wHvBU1MPW2pe2b2ShsHyg-1; Wed, 06 Jan 2021 04:47:40 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9608E744; Wed, 6 Jan 2021 09:47:34 +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 3515B18400; Wed, 6 Jan 2021 09:47:33 +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 2172A180954D; Wed, 6 Jan 2021 09:47:28 +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 1069lRi7031724 for ; Wed, 6 Jan 2021 04:47:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id CDAF510023AF; Wed, 6 Jan 2021 09:47:27 +0000 (UTC) Received: from work.redhat.com (ovpn-112-168.ams2.redhat.com [10.36.112.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE5A81002393; Wed, 6 Jan 2021 09:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609926463; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=imVRRkOFZN04W/pQd39dex/xnFBGPOeAMmC0Wz3YbbY=; b=N1FQuxVxQIiXHbeZNA/fbc7yDDodqY1FMQGubHVX8wbEoIGwuYDj5y8Ngasyr7kbzsyFTI 0GZwJnR7ZHQSDxf/eNdJYCD+QaIUL62MNO2J8VNA/ogu1PfOBWn0Q0Vcy3pP64VFZY4z9L c8bgL+LZmSDPi3ZhUeV/+BuvhUiM8G0= X-MC-Unique: _wHvBU1MPW2pe2b2ShsHyg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH] qemuDomainChangeNet: Check changed virtio network driver options Date: Wed, 6 Jan 2021 10:47:23 +0100 Message-Id: <20210106094723.37394-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Changes to a virtio network device such as ... were quietly dismissed by `virsh update-device ... --live`. Signed-off-by: Tim Wiederhake Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_hotplug.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 57635cd419..c385bde4bf 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -3600,6 +3600,16 @@ qemuDomainChangeNet(virQEMUDriverPtr driver, goto cleanup; } =20 + if (!!olddev->virtio !=3D !!newdev->virtio || + (!!olddev->virtio && !!newdev->virtio && + (olddev->virtio->iommu !=3D newdev->virtio->iommu || + olddev->virtio->ats !=3D newdev->virtio->ats || + olddev->virtio->packed !=3D newdev->virtio->packed))) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("cannot modify virtio network device driver optio= ns")); + goto cleanup; + } + /* data: this union will be examined later, after allocating new actua= ldev */ /* virtPortProfile: will be examined later, after allocating new actua= ldev */ =20 --=20 2.26.2