From nobody Thu Apr 25 19:12:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1609931576; cv=none; d=zohomail.com; s=zohoarc; b=C9Ud+e+8IbFiL5tx8/EqHIydHNG3zJuKuCQNk1w9t9FjdEPapFX7rCZPzwgll3iDyUDpn20yMzN7O3XW40biBVDUMmb/wUhQ2cDuOc/tI/og5O3IIKWLJUJdQt0OjHUoMXg7cUT7b7VaeTAutZD+NtPtXloaCgseIT4kSOhQgfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609931576; 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=rfieXBZ9Qm190lJbDE2NE8WFIXhvWRyeluNt/R+S+44=; b=N385IofoeLywwXU+bF+ACVR4oF3ckHjVXlPlyKjoj0B+oWo0Dj51hklPmGyne7/xhZ21P8FyS4Aw18NTpkoVG2JHg64pN9Z25pDoZK8U84gFZFacymZ3TeR5WjYIZvajXWx9MHMvqv++G/Rv+qPR9bFxjDRskBajbBd9LRcTFc4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1609931576788762.4951562151603; Wed, 6 Jan 2021 03:12:56 -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-325-ky95bURsO06XbKiihcJKqg-1; Wed, 06 Jan 2021 06:12:53 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C2B010CE7A7; Wed, 6 Jan 2021 11:12:47 +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 12C9E60864; Wed, 6 Jan 2021 11:12: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 BBC4A180954D; Wed, 6 Jan 2021 11:12:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 106BCj68007839 for ; Wed, 6 Jan 2021 06:12:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id 72A1777BF8; Wed, 6 Jan 2021 11:12:45 +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 83B7960864; Wed, 6 Jan 2021 11:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609931575; 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=rfieXBZ9Qm190lJbDE2NE8WFIXhvWRyeluNt/R+S+44=; b=OjJNPt2S9BPeo48TmhiL6mdcWqpCgiEHi6CUJpxZxyYVQMM+WQTQjM4fxSUyEt1Cfa9HoK JCC/d7HUQQkVZ06cAf/79+fDXo0rsaoeRIARH52loXoxDpeqlzoTyxOKOWnDRe8tA88HWz JOkc10oZ503X1nAeCwhe7KXZ1gD6A3E= X-MC-Unique: ky95bURsO06XbKiihcJKqg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2] qemuDomainChangeNet: Check changed virtio network driver options Date: Wed, 6 Jan 2021 12:12:40 +0100 Message-Id: <20210106111240.51995-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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..6371d53871 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