Received: from eggs.gnu.org ([2001:4830:134:3::10]:38857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7NQy-0005FK-Fd for qemu-devel@nongnu.org; Wed, 16 Jul 2014 07:31:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7NQr-0005Ue-Fx for qemu-devel@nongnu.org; Wed, 16 Jul 2014 07:31:40 -0400 Received: from indium.canonical.com ([91.189.90.7]:55480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7NQr-0005Ua-A6 for qemu-devel@nongnu.org; Wed, 16 Jul 2014 07:31:33 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1X7NQp-0006WL-TX for ; Wed, 16 Jul 2014 11:31:31 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D714E2E80C2 for ; Wed, 16 Jul 2014 11:31:31 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 16 Jul 2014 11:23:59 -0000 From: Paolo Bonzini Sender: bounces@canonical.com References: <20130529015352.14306.58857.malonedeb@soybean.canonical.com> Message-Id: <20140716112400.21492.99847.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1185228] Re: with 'monitor pty', it needs to flush pts device after sending command to it Reply-To: Bug 1185228 <1185228@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is not a bug. What happens is that QEMU echoes the command you type onto the PTY. If you do not do a "cat /dev/pts/8", the PTY's buffer gets full and QEMU stops reading from the PTY until it is emptied. It doesn't happen if you use QMP. ** Changed in: qemu Status: New =3D> Invalid -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1185228 Title: with 'monitor pty', it needs to flush pts device after sending command to it Status in QEMU: Invalid Bug description: Environment: ------------ Host OS (ia32/ia32e/IA64):ia32e Guest OS (ia32/ia32e/IA64):ia32e Guest OS Type (Linux/Windows):Linux kvm.git Commit: 660696d1d16a71e15549ce1bf74953be1592bcd3 qemu.git Commit: 64afc2b4d48fb21e085517c38a59a3f61a11283c Host Kernel Version:3.9.0-rc3 Hardware: SandyBridge Bug detailed description: -------------------------- when creating guest with parameter "-monitor pty", then send command (e.g= . migrate, device_add) to the pts device. If I don't flush the pts device = (e.g. using cat /dev/pts/8) to flush the pts device, the monitor command do= esn't take effect. I know some old qemu (e.g. 1.3) didn't have this issue. = create KVM guest: [root@vt-snb9 ~]# qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 -net non= e /root/cathy/rhel6u4.qcow -monitor pty char device redirected to /dev/pts/8 (label compat_monitor0) VNC server running on `::1:5900' hot plug a PCI device: [root@vt-snb9 ~]# echo "device_add pci-assign,host=3D05:10.0,id=3Dnic" >/= dev/pts/8 (here, the device cannot hot plug to the guest.) if you run command "cat /dev/pts/8", the device will hot plug to the guest. hot remove the device: [root@vt-snb9 ~]# echo "device_del nic">/dev/pts/8 (here, the device cannot hot remove from the guest.) if you run command "cat /dev/pts/8" the device can hot remove from the guest Reproduce steps: ---------------- 1. qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 -net none /root/cathy/r= hel6u4.qcow -monitor pty 2. echo "device_add pci-assign,host=3D05:10.0,id=3Dnic" >/dev/pts/8 (or using 'migrate' command in qemu monitor redirection device /dev/pts/8= ) = Current result: ---------------- device can not hot plug or hot remove from the guest before exec 'cat /de= v/pts/8'. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1185228/+subscriptions