From nobody Fri Mar 29 08:53:43 2024 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1556673042; cv=none; d=zoho.com; s=zohoarc; b=IICf4PvWRINwUH6PmWCzgFtD52Ms+PrwQ9i0JJlrgfRW4/yg2ZNLiI4otnqBasPJONmEpFVaGdKlkkztNbI985VUVed6ehn0eWffkiKEZFpe5xmlkZkTfLLK4AYkUerSNMXNNudqfVlCXMfy8uUZNXryoiPtySjAl2W+zd8G0Iw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556673042; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=facX5169dJ32za0eHjvADxPpAJaSMwghs/uJt3Ehn8g=; b=SluoSpHO4QZAo3laF+bOlqLlvGUlynyFBCAZbWQXaz4zOYl9u+PuApU2r6G+/tIdjbAK9wpNAHQ7V0riUTwWOBRdiPavz3P8fLaIHfGlBpl/eOfA4qu1nN7P9BHmxY5ko9mZcinze6Ze4huRkDLj+4IUae4ChH4VnrzPZp5pEeo= ARC-Authentication-Results: i=1; mx.zoho.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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1556673042740326.6954979143078; Tue, 30 Apr 2019 18:10:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33F7D86663; Wed, 1 May 2019 01:10:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1EC801948E; Wed, 1 May 2019 01:10:38 +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 88A1941F3D; Wed, 1 May 2019 01:10:34 +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 x411AWoQ011112 for ; Tue, 30 Apr 2019 21:10:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 959615D705; Wed, 1 May 2019 01:10:32 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 905D0629C0 for ; Wed, 1 May 2019 01:10:30 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (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 A991F83F42 for ; Wed, 1 May 2019 01:10:29 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id j6so18678976qtq.1 for ; Tue, 30 Apr 2019 18:10:29 -0700 (PDT) Received: from localhost.localdomain ([2804:431:b705:9aaf:c065:88d5:535f:688]) by smtp.gmail.com with ESMTPSA id x29sm7643943qta.75.2019.04.30.18.10.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 18:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=zdm/ZtY4pjl/0uAfwD3pQQ0gqHszrg4xx6kOjZP55bE=; b=dJT3d6O/eCJLmpSVpOsWp3DpeysvTmpAgqYOBk9Bm0laUBnkxqr8IuSgdXrctK8Saj RDIpk4pmUJDfVsqOvQDF59+qv0XwcECSgxoz6LUhexdSrroYkN1+g23SBHEJ4vgugN8w AV3LIzfeEUk/JXT7RrIB9A4X+WV/e1Fi3o7QShD0sjZ8RDiN3GAtOZXFCEvWX7JOvno6 kNi0aCarBnzhsoFqHvhkBbR6K1x8R8N9IUSZDtqX9037M6NUnxB9orte9+vM9/PrZC2Q 2K6Ll6SXZ3kl05lyQriNx2qBSytwlJ+nJh/3ihWsOPxFvt6f091U05eQAaq6momucGIR g2ng== 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:mime-version :content-transfer-encoding; bh=zdm/ZtY4pjl/0uAfwD3pQQ0gqHszrg4xx6kOjZP55bE=; b=Az/jthIQP2GlmqzYhgxjg9x81u1w5P5plyotQPIYsCAan4wzvdUUullcJbf8R/W3eV 1kcTkgDGr9Iqh+yejmW0CPq56O9y2QsGV6w8Jdu9Rbmi9Iu4GJKd5GqqohJjonISs9xs 2TeTSVMvqUJyuLvI5J98n/qF06YNj84Nh6AGzkBTiR0KBZjSZedlqGscDQXL+qGjYNct hkWrtXPsSkLPTdk09pjTSpssThAGx9kdGEbaWjwk6YElcEFJrjChjXOFCLljRCeGMoKN VcFIiL+mIiyvBtQ7Ts87e37Ojr/AR2pbb8HjnWxm4fbA6pjTv2ZcCQNnRjhzNgFchdfD 1vPg== X-Gm-Message-State: APjAAAXkZf6GKKQ22qdNJnj7ilXXvjNZrEuRMskCTa2TtMf0T2AK6ZdW 5nWBwE4/O/6iEXM1KO1FPKCwhH+E X-Google-Smtp-Source: APXvYqwjyWIt89sLfauaYH7kTUoBBVqJXKjZWmxg7XM07xrCJQSqxHVKQhjzvNBWWL76g9NFGvjpRg== X-Received: by 2002:a0c:9ac1:: with SMTP id k1mr22184384qvf.36.1556673028571; Tue, 30 Apr 2019 18:10:28 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Tue, 30 Apr 2019 22:10:19 -0300 Message-Id: <20190501011019.18169-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 01 May 2019 01:10:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 01 May 2019 01:10:29 +0000 (UTC) for IP:'209.85.160.194' DOMAIN:'mail-qt1-f194.google.com' HELO:'mail-qt1-f194.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.194 mail-qt1-f194.google.com 209.85.160.194 mail-qt1-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Disable console device detach from live mode. 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 01 May 2019 01:10:40 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Console Char devices cannot be attached as qemuDomainChrRemove() function suggests. After moved to async mode, qemuDomainRemoveChrDevice() is not part of the removal process. So, we need to check if device is able to be detached before calling removal procedures. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1447183 Signed-off-by: Julio Faracco --- src/qemu/qemu_hotplug.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f3c5f44a23..2c65df6d7b 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5844,6 +5844,14 @@ qemuDomainDetachDeviceChr(virQEMUDriverPtr driver, goto cleanup; } =20 + if (tmpChr->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE && + tmpChr->targetType =3D=3D VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIA= L) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("detaching serial console is not supported")); + goto cleanup; + } + + /* guestfwd channels are not really -device rather than * -netdev. We need to treat them slightly differently. */ guestfwd =3D tmpChr->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_CHAN= NEL && --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list