From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxclT-0007HB-6R for qemu-devel@nongnu.org; Thu, 19 Jun 2014 09:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxclN-0001A8-2l for qemu-devel@nongnu.org; Thu, 19 Jun 2014 09:52:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxclM-00019z-Qo for qemu-devel@nongnu.org; Thu, 19 Jun 2014 09:52:25 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5JDqNMa015488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Jun 2014 09:52:23 -0400 From: Marcel Apfelbaum Date: Thu, 19 Jun 2014 16:52:18 +0300 Message-Id: <1403185941-19561-1-git-send-email-marcel.a@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] hw/pcie: better hotplug/hotunplug support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Hotplug triggers both 'present detect change' and 'attention button pressed'. Hotunplug starts by triggering 'attention button pressed', then waits for the OS to power off the device and only then detaches it. patch 1/3: trivial debug message fix patch 2/3: enable 'power controller' to receive power events from guests patch 3/3: the actual hotplug/hotunplug implementation. Tested with Linux and Windows guests and with an e1000 with "PCIe" capability. Notes: Windows requires devices to be pci express in order to enable hotplug functionality, so we need to think about converting virtio devices to pci express. Linux outputs a "Surprise Removal/Addition" info message because we trigger 2 events in the same time, however this warning can be disregarded or a kernel patch submitted for our scenario. Marcel Apfelbaum (3): hw/pcie: corrected a debug message hw/pcie: implement power controller functionality hw/pcie: better hotplug/hotunplug support hw/pci/pcie.c | 37 ++++++++++++++++++++++++++++++------- include/hw/pci/pcie_regs.h | 2 ++ 2 files changed, 32 insertions(+), 7 deletions(-) -- 1.8.3.1