Received: from eggs.gnu.org ([208.118.235.92]:44573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhVhE-0004vG-R9 for qemu-devel@nongnu.org; Tue, 28 May 2013 22:01:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhVh6-0007K4-Ic for qemu-devel@nongnu.org; Tue, 28 May 2013 22:01:00 -0400 Received: from indium.canonical.com ([91.189.90.7]:60258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhVh6-0007Jy-AB for qemu-devel@nongnu.org; Tue, 28 May 2013 22:00:52 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1UhVh5-0006Bu-Ek for ; Wed, 29 May 2013 02:00:51 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 5C4B62E8080 for ; Wed, 29 May 2013 02:00:51 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 29 May 2013 01:53:52 -0000 From: Yongjie Ren <1185228@bugs.launchpad.net> Sender: bounces@canonical.com References: <20130529015352.14306.58857.malonedeb@soybean.canonical.com> Message-Id: <20130529015352.14306.58857.malonedeb@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1185228] [NEW] 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 Public bug reported: 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 does= n'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 none = /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" >/de= v/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/rhe= l6u4.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 /dev/= pts/8'. ** Affects: qemu Importance: Undecided Status: New -- = 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: New 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