From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAH71-0000VH-8j for qemu-devel@nongnu.org; Mon, 03 Feb 2014 05:50:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAH6w-0003HW-H4 for qemu-devel@nongnu.org; Mon, 03 Feb 2014 05:50:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAH6w-0003HN-4l for qemu-devel@nongnu.org; Mon, 03 Feb 2014 05:50:42 -0500 From: Igor Mammedov Date: Mon, 3 Feb 2014 11:44:56 +0100 Message-Id: <1391424301-22703-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v4 0/5] pc: make ACPI pcihp more reusable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@amazon.com, mst@redhat.com changes since v3: - keep "acpi-pci-hotplug-with-bridge-support" property and pass its value to acpi_pcihp_init() to init internal .legacy_piix field. changes since v2: - rename 'use_acpi_pci_hotplug' field to 'legacy_piix' and corresponding properties - drop excessive checks for legacy mode - rework legacy vmstate handling to use AcpiPciHpPciStatus[0] structure which reduced acpi/piix4.c by another 50 LOC - move legacy initialization to pcihp.c changes since v1: - add BSEL property to root bus when in compatibility mode as result dropped "hw:acpi:pcihp: assume root PCI bus if bus has no ACPI_PCIHP_PROP_BSEL property" - rebasing on top of "pcihp: reduce number of device check events" added patch 3/4. Reuses new pcihp code for handling legacy PCI hotplug in acpi/piix4_pm, which significantly reduces code duplication between piix4_pm and pcihp reducing codebase by ~200 LOC. It also allows cleaner rebase of generic hotplug refactoring, by not increasing code duplication since it will need to be done only for pcihp. Git tree for testing based on mst's PCI tree: https://github.com/imammedo/qemu/commits/pcihp_cleanup_v4 Igor Mammedov (5): pcihp: replace enable|disable_device() with oneliners pcihp: make PCI hotplug mmio handlers indifferent to PCI_HOTPLUG_ADDR pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug pcihp: remove unused AcpiPciHpPciStatus.device_present field hw:piix4:acpi: reuse pcihp code for legacy PCI hotplug hw/acpi/pcihp.c | 68 ++++++++------- hw/acpi/piix4.c | 210 ++++------------------------------------------- include/hw/acpi/pcihp.h | 5 +- 3 files changed, 55 insertions(+), 228 deletions(-)