[Qemu-devel] [PATCH 2/3] piix_pci: eliminate PIIX3State::pci_irq_levels

2011-03-17 Thread Isaku Yamahata
PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/piix_pci.c | 31 +-- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/hw/piix_pci.c b

[Qemu-devel] [PATCH 0/3] piix_pci: optimize irq data path

2011-03-17 Thread Isaku Yamahata
is set and see if the pic pins is asserted by checking the bitmaps. When irq routing is changed, rebuild the bitmap and re-assert pic pins. Isaku Yamahata (3): pci: add accessor function to get irq levels piix_pci: eliminate PIIX3State::pci_irq_levels piix_pci: optimize set irq path hw/pci.c

[Qemu-devel] [PATCH 1/3] pci: add accessor function to get irq levels

2011-03-17 Thread Isaku Yamahata
Introduce accessor function to know INTx levels. It will be used later by q35. Although piix_pci tracks the intx line levels, it can be eliminated by this helper function. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci.c |7 +++ hw/pci.h |1 + 2 files changed, 8

[Qemu-devel] Re: [PATCH 04/26] pci: add accessor function to get irq levels

2011-03-16 Thread Isaku Yamahata
On Thu, Mar 17, 2011 at 07:29:09AM +0200, Michael S. Tsirkin wrote: > On Wed, Mar 16, 2011 at 06:29:15PM +0900, Isaku Yamahata wrote: > > Introduce accessor function to know INTx levels. > > It will be used later by q35. > > Although piix_pci tracks the intx line levels,

Re: [Qemu-devel] Re: [PATCH 07/26] pci/p2pbr: generic pci p2p bridge

2011-03-16 Thread Isaku Yamahata
On Thu, Mar 17, 2011 at 07:17:18AM +0200, Michael S. Tsirkin wrote: > > Anyway this patch isn't very critical. I think the available choice is > > > > - this patch > > - modify the patch to use 14 arguments function. > > Thus we can save much more lines. > > - Add one more p2p bridge code which

Re: [Qemu-devel] v2 revamp acpitable parsing and allow to specify complete (headerful) table

2011-03-16 Thread Isaku Yamahata
Ouch. You already clean it up. Here is my diff from your patch. Can you please merged into the patch? changes are - eliminate unaligned access - error report - replace magic number with symbolic constants - unconverted strtol(base=10) Signed-off-by: Isaku Yamahata --- qemu-acpi-load-other-0/hw

Re: [Qemu-devel] RFC: ACPI table loading

2011-03-16 Thread Isaku Yamahata
The behavior seems reasonable. So I cleaned it up for upstream merge. thanks, >From cd336e50ebda63ecd84f8172dcf4d4456059d615 Mon Sep 17 00:00:00 2001 Message-Id: From: Isaku Yamahata Date: Thu, 17 Mar 2011 12:28:52 +0900 Subject: [PATCH] acpi: rewamp acpitable parsing, and allow specify

Re: [Qemu-devel] Re: [PATCH 07/26] pci/p2pbr: generic pci p2p bridge

2011-03-16 Thread Isaku Yamahata
On Wed, Mar 16, 2011 at 11:34:42PM +0200, Michael S. Tsirkin wrote: > On Wed, Mar 16, 2011 at 06:29:18PM +0900, Isaku Yamahata wrote: > > Create generic pci p2p bridge device which can be customized > > via properties like vendor id/device id and so on. > > With this, we can

Re: [Qemu-devel] ACPI table loading [was: q35 chipset support for native pci express support]

2011-03-16 Thread Isaku Yamahata
On Wed, Mar 16, 2011 at 01:12:27PM +0300, Michael Tokarev wrote: > 16.03.2011 12:29, Isaku Yamahata wrote: > > This patch series adds basic q35 chipset support for native pci express > > support. Some bios related patches are still needed. > > For those who want to try it,

[Qemu-devel] [PATCH 12/26] usb/uhci: generalize initialization

2011-03-16 Thread Isaku Yamahata
generalize initialization to make vendir/device id customizable. Signed-off-by: Isaku Yamahata --- hw/usb-uhci.c | 87 - 1 files changed, 43 insertions(+), 44 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index b384e1d

[Qemu-devel] [PATCH 19/26] pc/piix_pci: factor out smram/pam logic

2011-03-16 Thread Isaku Yamahata
Factor out smram/pam logic for later use. Which will be used by q35 too. Signed-off-by: Isaku Yamahata --- Makefile.target |2 +- hw/pam.c| 128 +++ hw/pam.h| 96 + hw/piix_pci.c

[Qemu-devel] [PATCH 15/26] smbus_eeprom: consolidate smbus eeprom creation

2011-03-16 Thread Isaku Yamahata
consolidate smbus initialization for pc_piix, mips_malta and mips_fulong. Signed-off-by: Isaku Yamahata Cc: Aurelien Jarno Cc: Huacai Chen Signed-off-by: Isaku Yamahata --- hw/mips_fulong2e.c |9 + hw/mips_malta.c| 12 ++-- hw/pc_piix.c | 10 ++ hw

[Qemu-devel] [PATCH 08/26] apb_pci: simplify apb_pci.c by using pci_p2pbr

2011-03-16 Thread Isaku Yamahata
apply pci_p2pbr for apb_pci.c. Cc: Michael S. Tsirkin Cc: Blue Swirl Signed-off-by: Isaku Yamahata --- hw/apb_pci.c | 63 - 1 files changed, 27 insertions(+), 36 deletions(-) diff --git a/hw/apb_pci.c b/hw/apb_pci.c index c56ea9a

[Qemu-devel] [PATCH 05/26] piix_pci: eliminate PIIX3State::pci_irq_levels

2011-03-16 Thread Isaku Yamahata
PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. Signed-off-by: Isaku Yamahata --- hw/piix_pci.c | 31 +-- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index

[Qemu-devel] [PATCH 07/26] pci/p2pbr: generic pci p2p bridge

2011-03-16 Thread Isaku Yamahata
Create generic pci p2p bridge device which can be customized via properties like vendor id/device id and so on. With this, we can avoid to create many pci p2p bridge which only differs in those ids. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- Makefile.objs |2 +- hw

[Qemu-devel] [PATCH 22/26] acpi, acpi_piix: factor out PM1a EVT logic

2011-03-16 Thread Isaku Yamahata
factor out ACPI PM1a EVT logic. Later this will be used by ich9 acpi. Signed-off-by: Isaku Yamahata --- hw/acpi.c | 37 + hw/acpi.h | 13 + hw/acpi_piix4.c | 52 3 files

[Qemu-devel] [PATCH 25/26] pci_ids: add intel 82801BA pci-to-pci bridge id and PCI_CLASS_SERIAL_SMBUS

2011-03-16 Thread Isaku Yamahata
Adds pci id constants which will be used by q35. Signed-off-by: Isaku Yamahata --- hw/pci_ids.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/pci_ids.h b/hw/pci_ids.h index 9daea23..a597a7b 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h @@ -30,6 +30,7 @@ #define

[Qemu-devel] [PATCH 23/26] acpi, acpi_piix: factor out PM1_CNT logic

2011-03-16 Thread Isaku Yamahata
factor out ACPI PM1_CNT logic. This will be used by ich9 acpi. Signed-off-by: Isaku Yamahata --- hw/acpi.c | 49 + hw/acpi.h | 14 ++ hw/acpi_piix4.c | 40 ++-- 3 files changed, 69

[Qemu-devel] [PATCH 04/26] pci: add accessor function to get irq levels

2011-03-16 Thread Isaku Yamahata
Introduce accessor function to know INTx levels. It will be used later by q35. Although piix_pci tracks the intx line levels, it can be eliminated by this helper function. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci.c |7 +++ hw/pci.h |1 + 2 files changed, 8

[Qemu-devel] [PATCH 09/26] dec_pci: simplify dec_pci.c by using pci_p2pbr

2011-03-16 Thread Isaku Yamahata
apply pci_p2pbr for dec_pci.c. Cc: Michael S. Tsirkin Cc: Blue Swirl Signed-off-by: Isaku Yamahata --- hw/dec_pci.c | 49 ++--- 1 files changed, 14 insertions(+), 35 deletions(-) diff --git a/hw/dec_pci.c b/hw/dec_pci.c index 3cc4f04..fbd1363

[Qemu-devel] [PATCH 00/26] q35 chipset support for native pci express support

2011-03-16 Thread Isaku Yamahata
braces. Changes from v1: - make patches full bisectable - typo s/allocte/allocate/ - some minor fixes - dropped a merged patch Isaku Yamahata (26): pci: replace the magic, 256, for the maximum of slot pci: add opaque argument to pci_map_irq_fn pci: introduce pci_swizzle_map_irq_fn() for stand

[Qemu-devel] [PATCH 24/26] acpi, acpi_piix: factor out GPE logic

2011-03-16 Thread Isaku Yamahata
factor out ACPI GPE logic. Later it will be used by ICH9 ACPI. Signed-off-by: Isaku Yamahata --- hw/acpi.c | 66 ++ hw/acpi.h | 17 ++ hw/acpi_piix4.c | 95 ++ 3 files changed, 108

[Qemu-devel] [PATCH 01/26] pci: replace the magic, 256, for the maximum of slot

2011-03-16 Thread Isaku Yamahata
Introduce symbol PCI_SLOT_MAX for the maximum of slot. and replace the magic, 256. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci.h |1 + hw/pci_internals.h |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index

[Qemu-devel] [PATCH 21/26] acpi, acpi_piix: factor out PM_TMR logic

2011-03-16 Thread Isaku Yamahata
factor out PM_TMR logic. Later This will be used by ich9 acpi. Signed-off-by: Isaku Yamahata --- hw/acpi.c | 45 + hw/acpi.h | 24 hw/acpi_piix4.c | 45 - 3 files

[Qemu-devel] [PATCH 03/26] pci: introduce pci_swizzle_map_irq_fn() for standardized interrupt pin swizzle

2011-03-16 Thread Isaku Yamahata
introduce pci_swizzle_map_irq_fn() for interrupt pin swizzle which is standardized. PCI bridge swizzle is common logic, by introducing this function duplicated swizzle logic will be avoided later. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci.c | 18 ++ hw

[Qemu-devel] [PATCH 20/26] pc, i440fx: simply i440fx initialization

2011-03-16 Thread Isaku Yamahata
simply i440fx initialization by eliminating i440fx_init_memory_mappings(). Signed-off-by: Isaku Yamahata --- hw/pc.h |2 +- hw/pc_piix.c |8 +--- hw/piix_pci.c | 15 ++- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/hw/pc.h b/hw/pc.h index

[Qemu-devel] [PATCH 02/26] pci: add opaque argument to pci_map_irq_fn

2011-03-16 Thread Isaku Yamahata
Pass opaque argument to pci_map_irq_fn like pci_set_irq_fn. ICH9 irq routing is not static, but configurable by chipset configuration registers, so the corresponding irq mapping function of pci_map_irq_fn needs to know the pointer to ich9. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata

[Qemu-devel] [PATCH 14/26] ide: consolidate drive_get(IF_IDE)

2011-03-16 Thread Isaku Yamahata
factor out ide initialization to call drive_get(IF_IDE) Signed-off-by: Isaku Yamahata --- hw/ide.h |3 +++ hw/ide/core.c | 14 ++ hw/mips_fulong2e.c |9 + hw/mips_malta.c| 10 +- hw/mips_r4k.c | 10 +- hw/pc_piix.c

[Qemu-devel] [PATCH 18/26] ioapic: move ioapic_init() from pc_piix.c to pc.c

2011-03-16 Thread Isaku Yamahata
ioapic isn't piix specific. And q35 pc will use it. So move ioapic_init() from pc_piix.c to common place, pc.c. Signed-off-by: Isaku Yamahata --- hw/pc.c | 16 hw/pc.h |2 ++ hw/pc_piix.c | 16 3 files changed, 18 insertions(+), 16 dele

[Qemu-devel] [PATCH 11/26] ahci: add ide device initialization helper

2011-03-16 Thread Isaku Yamahata
Introduce a helper function which initialize ahci port with ide device It will be used by q35 support later. Cc: Alexander Graf Signed-off-by: Isaku Yamahata --- hw/ide.h |3 +++ hw/ide/ahci.c | 15 +++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 16/26] pc, pc_piix: split out allocating isa irqs

2011-03-16 Thread Isaku Yamahata
Factor out the logic of allocating isa irqs. This simplifies the pc initialization and will reduce the code duplication of q35 pc initialization. Signed-off-by: Isaku Yamahata --- hw/pc.c | 16 ++-- hw/pc.h |2 +- hw/pc_piix.c |8 +--- 3 files changed, 16

[Qemu-devel] [PATCH 17/26] pc, pc_piix: split out pc nic initialization

2011-03-16 Thread Isaku Yamahata
Factor out pc nic initialization. This simplifies the pc initialization and will reduce the code duplication of q35 pc initialization. Signed-off-by: Isaku Yamahata --- hw/pc.c | 15 +++ hw/pc.h |1 + hw/pc_piix.c |9 + 3 files changed, 17 insertions

[Qemu-devel] [PATCH 10/26] ide/ahci/ich: use qdev.reset

2011-03-16 Thread Isaku Yamahata
use DeviceInfo::reset callback instead of qemu_register_reset(). With this patch, its reset is done before parent pci device's reset. Cc: Alexander Graf Signed-off-by: Isaku Yamahata --- hw/ide/ich.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ide/

[Qemu-devel] [PATCH 13/26] usb/uhci: add ich9 usb uhci id's device

2011-03-16 Thread Isaku Yamahata
add uhci device which has ich9 device id. Signed-off-by: Isaku Yamahata --- hw/pci_ids.h |2 ++ hw/usb-uhci.c |8 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/pci_ids.h b/hw/pci_ids.h index ea3418c..9daea23 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h

[Qemu-devel] [PATCH 06/26] pci_bridge: add helper function to convert PCIBridge into PCIDevice

2011-03-16 Thread Isaku Yamahata
pci_bridge_to_pci() which converts PCIBridge into PCIDevice which will be used later by pci_p2pbr. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci_bridge.c |6 ++ hw/pci_bridge.h |1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/pci_bridge.c b

[Qemu-devel] [PATCH] ioapic: when switches to level trigger mode, interrupts raised repeatedly.

2011-03-16 Thread Isaku Yamahata
gt; [] ? dev_change_flags+0x1c/0x51 > [] ? devinet_ioctl+0x26e/0x594 > [] ? inet_ioctl+0x92/0xaa > [] ? T.1003+0x13/0x32 > [] ? sock_ioctl+0x1f2/0x1ff > [] ? do_vfs_ioctl+0x498/0x4e7 > [] ? sock_alloc_file+0xb3/0x115 > [] ? fd_install+0x31/0x5d > [] ? sys_ioctl+0x42/0x

Re: [Qemu-devel] Re: EFI console stopped working in Qemu 0.14.0

2011-03-02 Thread Isaku Yamahata
Added CC to Tristan. I doubt that he is still interested in EFI, though. On Thu, Mar 03, 2011 at 04:46:34PM +0900, Isaku Yamahata wrote: > > Seabios has the patch to address the similar issue with > the changeset of b82a1e49fc0e72fb9bf1a642d6aa707345b0f398, > which enabl

Re: [Qemu-devel] Re: EFI console stopped working in Qemu 0.14.0

2011-03-02 Thread Isaku Yamahata
~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)); > pci_word_test_and_clear_mask(dev->config + PCI_STATUS, > pci_get_word(dev->wmask + PCI_STATUS) | > pci_get_word(dev->w1cmask + PCI_STATUS)); > > So probably th

Re: [Qemu-devel] Re: EFI console stopped working in Qemu 0.14.0

2011-03-02 Thread Isaku Yamahata
obably the problem is in EFI BIOS. But I was not able to find > its source code. Anyone knows how is it built? > > Best regards, > Artyom. > > > Isaku Yamahata wrote: >> On Thu, Mar 03, 2011 at 12:03:53PM +0900, Isaku Yamahata wrote: >> >

Re: [Qemu-devel] Re: EFI console stopped working in Qemu 0.14.0

2011-03-02 Thread Isaku Yamahata
On Thu, Mar 03, 2011 at 12:03:53PM +0900, Isaku Yamahata wrote: > Hi. Thank you for reporting. > Can you elaborate on the changeset that you pointed out and > your work around? > > Regarding to the changeset, it had the issue, but I suppose > 80376c3fc2c38fdd45354e4b0eb4503

Re: [Qemu-devel] Re: EFI console stopped working in Qemu 0.14.0

2011-03-02 Thread Isaku Yamahata
nel if it was >> properly configured on used disk image. The only effect is that >> neither VGA nor >> serial console is not functioning. After short investigation I have >> discovered >> that this functionality was broken by this commit: >> >> commit

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-03-01 Thread Isaku Yamahata
>> When enabling sci, those bits are checked and raise sci if necessary. > >>> > >>> Any comments on this? > >>> Anyway the current pci hotplug-related commands are somewhat broken, > >>> and needs clean up with multifunction hotplug support which is

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-28 Thread Isaku Yamahata
On Tue, Mar 01, 2011 at 02:58:44PM +0800, Wen Congyang wrote: > At 03/01/2011 12:11 PM, Isaku Yamahata Write: > > Hi. > > > > I don't suppose that just introducing pending bits solve the issue. > > Your test only use single hot plug/unplug. How about mixing of m

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-28 Thread Isaku Yamahata
Anyway the current pci hotplug-related commands are somewhat broken, and needs clean up with multifunction hotplug support which is on my todo list. thanks On Mon, Feb 28, 2011 at 10:52:40AM +0800, Wen Congyang wrote: > Hi Markus Armbruster > > At 02/23/2011 04:30 PM, Markus Armbruster W

Re: [Qemu-devel] [PATCH 08/58] vmstate: be able to store/save a pci device from a pointer

2011-02-24 Thread Isaku Yamahata
On Thu, Feb 24, 2011 at 06:57:05PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > hw/hw.h |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/hw/hw.h b/hw/hw.h > index 0dfc053..f874dd0 100644 > --- a/hw/hw.h > +++ b/hw/hw.h > @@ -609,6 +609,14

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-22 Thread Isaku Yamahata
On Tue, Feb 22, 2011 at 06:36:20PM +0100, William Dauchy wrote: > `qdev_free` when unplug a pci device > It resolves a bug when detaching/attaching a network device > > # virsh detach-interface dom0 network --mac 52:54:00:f6:84:ba > Interface detached successfully > > # virsh attach-interfac

[Qemu-devel] Re: [PATCH 2/3] AMD IOMMU support

2011-02-03 Thread Isaku Yamahata
On Fri, Feb 04, 2011 at 01:24:14AM +0200, Eduard - Gabriel Munteanu wrote: > This initializes the AMD IOMMU and creates ACPI tables for it. > > Signed-off-by: Eduard - Gabriel Munteanu > --- > src/acpi.c | 84 > > src/config.h |

[Qemu-devel] Re: [PATCH v2 0/5] pci/pcie: implement ARI enable bit correctly

2011-01-27 Thread Isaku Yamahata
On Thu, Jan 27, 2011 at 10:42:53AM +0200, Michael S. Tsirkin wrote: > On Thu, Jan 27, 2011 at 03:56:34PM +0900, Isaku Yamahata wrote: > > Changes v1 -> v2: > > - dropped PCI_DEVFN_MAX > > - use uint8_t for devfn instead of int > > - move pcie_check_slot into p

[Qemu-devel] [PATCH v2 2/5] pci: use devfn for pci_find_device() instead of (slot, fn) pair

2011-01-26 Thread Isaku Yamahata
(slot, fn) pair is somewhat confusing because of ARI. So use devfn for pci_find_device() instead of (slot, fn). Signed-off-by: Isaku Yamahata --- hw/pci-hotplug.c |5 +++-- hw/pci.c |4 ++-- hw/pci.h |2 +- hw/pci_host.c|2 +- hw/pcie_host.c |3 +-- 5

[Qemu-devel] [PATCH v2 1/5] pci: replace the magic, 256, for the maximum of devfn

2011-01-26 Thread Isaku Yamahata
Introduce symbol PCI_DEVFN_MAX for the maximum of devfn and replace the magic, 256. Signed-off-by: Isaku Yamahata --- hw/pci.h |1 + hw/pci_internals.h |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 0d2753f..aa5f912 100644 --- a

[Qemu-devel] [PATCH v2 5/5] pci: use uint8_t for devfn_min

2011-01-26 Thread Isaku Yamahata
use uint8_t for devfn_min instead of int. Signed-off-by: Isaku Yamahata --- hw/pci.c |6 +++--- hw/pci.h |6 +++--- hw/pci_internals.h |2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index e25bf7a..6725f50 100644 --- a/hw

[Qemu-devel] [PATCH v2 4/5] pci: use PCI_SLOT in pci_get_bus_devfn()

2011-01-26 Thread Isaku Yamahata
use PCI_SLOT in pci_get_bus_devfn(). Signed-off-by: Isaku Yamahata --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 471d4d7..e25bf7a 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -558,7 +558,7 @@ PCIBus *pci_get_bus_devfn(int *devfnp

[Qemu-devel] [PATCH v2 3/5] pci/pcie: make pci_find_device() ARI aware.

2011-01-26 Thread Isaku Yamahata
make pci_find_device() ARI aware. Signed-off-by: Isaku Yamahata --- hw/pci.c |6 ++ hw/pci.h | 42 ++ hw/pcie.c | 13 - hw/pcie.h |1 - 4 files changed, 48 insertions(+), 14 deletions(-) diff --git a/hw/pci.c b/hw/pci.c

[Qemu-devel] [PATCH v2 0/5] pci/pcie: implement ARI enable bit correctly

2011-01-26 Thread Isaku Yamahata
Changes v1 -> v2: - dropped PCI_DEVFN_MAX - use uint8_t for devfn instead of int - move pcie_check_slot into pci.h and made it static inline - minor clean ups Isaku Yamahata (5): pci: replace the magic, 256, for the maximum of devfn pci: use devfn for pci_find_device() instead of (slot,

[Qemu-devel] Re: [PATCH] pci: w1cmask[PCI_BRIDGE_CONTROL] initialized incorrectly

2011-01-26 Thread Isaku Yamahata
On Wed, Jan 26, 2011 at 03:57:15PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 26, 2011 at 10:53:42PM +0900, Isaku Yamahata wrote: > > On Wed, Jan 26, 2011 at 03:46:01PM +0200, Michael S. Tsirkin wrote: > > > On Wed, Jan 26, 2011 at 10:17:48PM +0900, Isaku Yamahata wrote: >

[Qemu-devel] [PATCH] pci: typo in pcibus_get_dev_path()

2011-01-26 Thread Isaku Yamahata
This patch fixes typo in pcibus_get_dev_path(). Without this patch, the result of pcibus_get_dev_path() isn't unique. Signed-off-by: Isaku Yamahata --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index d2a0cee..b3d8ba5 100644 ---

[Qemu-devel] Re: [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id()

2011-01-26 Thread Isaku Yamahata
I sent the patch out too early. I found the issue is in pcibus_get_dev_path(). Sorry for noise. On Wed, Jan 26, 2011 at 07:04:51AM -0700, Alex Williamson wrote: > On Wed, 2011-01-26 at 18:45 +0900, Isaku Yamahata wrote: > > This patch unbreaks 7685ee6abcb939104801f84b3fe9645412528088.

[Qemu-devel] Re: [PATCH] pci: w1cmask[PCI_BRIDGE_CONTROL] initialized incorrectly

2011-01-26 Thread Isaku Yamahata
On Wed, Jan 26, 2011 at 03:46:01PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 26, 2011 at 10:17:48PM +0900, Isaku Yamahata wrote: > > The bit should be writable, not w1c. > > > > 3.2.5.18 bridge control register > > bit 11 Discard Timer SERR# Enable > > >

[Qemu-devel] Re: [PATCH] pci: w1cmask[PCI_BRIDGE_CONTROL] initialized incorrectly

2011-01-26 Thread Isaku Yamahata
the Primary Discard Timer or Secondary Discard Timer expires and a Delayed Transaction On Wed, Jan 26, 2011 at 02:09:59PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 26, 2011 at 06:45:27PM +0900, Isaku Yamahata wrote: > > pci_init_wmask_bridge() incorrectly set w1cmask[PCI_BRIDG

[Qemu-devel] [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id()

2011-01-26 Thread Isaku Yamahata
Williamson Signed-off-by: Isaku Yamahata --- savevm.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index fcd8db4..cd29eb8 100644 --- a/savevm.c +++ b/savevm.c @@ -1126,7 +1126,6 @@ int register_savevm_live(DeviceState *dev, } else {

[Qemu-devel] [PATCH 1/3] pci: replace the magic, 256, for the maximum of devfn

2011-01-26 Thread Isaku Yamahata
Introduce symbol PCI_DEVFN_MAX for the maximum of devfn and replace the magic, 256. Signed-off-by: Isaku Yamahata --- hw/pci.h |2 ++ hw/pci_internals.h |2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 0d2753f..ffb04e8 100644

[Qemu-devel] [PATCH] pci: w1cmask[PCI_BRIDGE_CONTROL] initialized incorrectly

2011-01-26 Thread Isaku Yamahata
pci_init_wmask_bridge() incorrectly set w1cmask[PCI_BRIDGE_CONTROL]. This patch removes the line otherwise the assert(!(wmask & w1cmask)) in pci_default_write_config() is hit. Signed-off-by: Isaku Yamahata --- hw/pci.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --g

[Qemu-devel] [PATCH 3/3] pci/pcie: make pci_find_device() ARI aware.

2011-01-26 Thread Isaku Yamahata
make pci_find_device() ARI aware. Signed-off-by: Isaku Yamahata --- hw/pci.c |6 ++ hw/pcie.c | 33 + hw/pcie.h |2 +- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index ac16029..daba310 100644 --- a/hw/pci.c

[Qemu-devel] [PATCH 0/3] pci/pcie: implement ARI enable bit correctly

2011-01-26 Thread Isaku Yamahata
This patch series implements ARI enable bit in root/downstream port correctly. Isaku Yamahata (3): pci: replace the magic, 256, for the maximum of devfn pci: use devfn for pci_find_device() instead of (slot, fn) pair pci/pcie: make pci_find_device() ARI aware. hw/pci-hotplug.c |5

[Qemu-devel] [PATCH 2/3] pci: use devfn for pci_find_device() instead of (slot, fn) pair

2011-01-26 Thread Isaku Yamahata
(slot, fn) pair is somewhat confusing because of ARI. So use devfn for pci_find_device() instead of (slot, fn). Signed-off-by: Isaku Yamahata --- hw/pci-hotplug.c |5 +++-- hw/pci.c |5 +++-- hw/pci.h |2 +- hw/pci_host.c|2 +- hw/pcie_host.c |3 +-- 5

Re: [Qemu-devel] [PATCH V9 16/16] acpi-piix4: Add Xen hypercall for sleep state.

2011-01-25 Thread Isaku Yamahata
On Tue, Jan 25, 2011 at 02:29:20PM +, anthony.per...@citrix.com wrote: > From: Anthony PERARD > > Signed-off-by: Anthony PERARD > --- > hw/acpi_piix4.c |4 > hw/xen.h|2 ++ > xen-all.c |7 +++ > xen-stub.c |4 > 4 files changed, 17 insertions

[Qemu-devel] Re: [PATCH] pci/pcie: make pci_find_device() ARI aware.

2011-01-24 Thread Isaku Yamahata
On Sun, Jan 23, 2011 at 05:57:53PM +0200, Michael S. Tsirkin wrote: > On Sat, Jan 22, 2011 at 01:39:57AM +0900, Isaku Yamahata wrote: > > On Fri, Jan 21, 2011 at 04:29:41PM +0200, Michael S. Tsirkin wrote: > > > On Fri, Jan 21, 2011 at 07:44:16PM +0900, Isaku Yamahata wrote: >

[Qemu-devel] [PATCH] loader: memory leak in rom_add_file() on error path

2011-01-24 Thread Isaku Yamahata
fix memory leak in rom_add_file(). Signed-off-by: Isaku Yamahata --- hw/loader.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 35d792e..6cba8c5 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -618,6 +618,8 @@ int rom_add_file(const char

[Qemu-devel] [PATCH] pci: memory leak of PCIDevice::rom_file

2011-01-24 Thread Isaku Yamahata
PCIDevice::rom_file is leaked. PCIDevice::rom_file is allocated in pci_qdev_init(), but not freed anywhere. free it in qemu_unregister_device(). Signed-off-by: Isaku Yamahata --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index b8f5385

Re: [Qemu-devel] Re: [PATCH] audio: consolidate audio_init()

2011-01-23 Thread Isaku Yamahata
On Sun, Jan 23, 2011 at 04:50:34PM +0100, Andreas Färber wrote: > Am 21.01.2011 um 23:27 schrieb malc: > >> On Fri, 21 Jan 2011, Blue Swirl wrote: >> >>> On Fri, Jan 21, 2011 at 10:53 AM, Isaku Yamahata >>> wrote: >>>> consolidate audio_init()

[Qemu-devel] Re: [PATCH] pci/pcie: make pci_find_device() ARI aware.

2011-01-21 Thread Isaku Yamahata
On Fri, Jan 21, 2011 at 04:29:41PM +0200, Michael S. Tsirkin wrote: > On Fri, Jan 21, 2011 at 07:44:16PM +0900, Isaku Yamahata wrote: > > On Thu, Jan 20, 2011 at 04:15:48PM +0200, Michael S. Tsirkin wrote: > > > On Thu, Jan 20, 2011 at 03:57:39PM +0900, Isaku Yamahata w

[Qemu-devel] [PATCH] monitor: use after free in do_wav_capture()

2011-01-21 Thread Isaku Yamahata
use after free in do_wav_capture() on the error path. Signed-off-by: Isaku Yamahata --- monitor.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index d291158..cab5f20 100644 --- a/monitor.c +++ b/monitor.c @@ -2511,6 +2511,7 @@ static void

[Qemu-devel] [PATCH] mips_fulong: remove bogus HAS_AUDIO

2011-01-21 Thread Isaku Yamahata
remove bogus HAS_AUDIO according to 738012bec4c67e697e766edadab3f522c552a04d. Cc: Blue Swirl Cc: Huacai Chen Cc: Aurelien Jarno Signed-off-by: Isaku Yamahata --- hw/mips_fulong2e.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/hw/mips_fulong2e.c b/hw

[Qemu-devel] [PATCH] audio: consolidate audio_init()

2011-01-21 Thread Isaku Yamahata
consolidate audio_init() and remove references to shoundhw. Cc: Blue Swirl Signed-off-by: Isaku Yamahata --- arch_init.c | 35 ++- arch_init.h |1 + hw/mips_jazz.c | 24 ++-- hw/mips_malta.c | 23 ++- hw

[Qemu-devel] Re: [PATCH] pci/pcie: make pci_find_device() ARI aware.

2011-01-21 Thread Isaku Yamahata
On Thu, Jan 20, 2011 at 04:15:48PM +0200, Michael S. Tsirkin wrote: > On Thu, Jan 20, 2011 at 03:57:39PM +0900, Isaku Yamahata wrote: > > make pci_find_device() ARI aware. > > > > Signed-off-by: Isaku Yamahata > > --- > > hw/pci.c |7 +++ > &g

[Qemu-devel] [PATCH 3/3] msix: simply write config

2011-01-19 Thread Isaku Yamahata
use pci_device_deassert_intx(). Signed-off-by: Isaku Yamahata --- hw/msix.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index e123082..daaf9b7 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -159,7 +159,6 @@ void msix_write_config(PCIDevice *dev

[Qemu-devel] [PATCH 0/3] pci: disable intx on flr/bus reset

2011-01-19 Thread Isaku Yamahata
So far pci_device_reset() is used for system reset. In that case, interrupt controller is also reset so that all irq is are deasserted. But now pci bus reset/flr is supported, and in that case irq needs to be disabled explicitly. Isaku Yamahata (3): pci: deassert intx on reset. msi: simply

[Qemu-devel] [PATCH 2/3] msi: simply write config a bit.

2011-01-19 Thread Isaku Yamahata
use pci_device_deassert_intx(). Signed-off-by: Isaku Yamahata --- hw/msi.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index f03f519..3dc3a24 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -255,7 +255,6 @@ void msi_write_config(PCIDevice *dev

[Qemu-devel] [PATCH 1/3] pci: deassert intx on reset.

2011-01-19 Thread Isaku Yamahata
deassert intx on device reset. So far pci_device_reset() is used for system reset. In that case, interrupt controller is reset at the same time so that all irq is are deasserted. But now pci bus reset/flr is supported, and in that case irq needs to be disabled explicitly. Signed-off-by: Isaku

[Qemu-devel] [PATCH] pci: make pci_bus_new() aware of pci domain

2011-01-19 Thread Isaku Yamahata
This patch makes pci bus creation aware of pci domain. Signed-off-by: Isaku Yamahata --- hw/pci.c | 19 ++- hw/pci.h |7 --- hw/piix_pci.c |2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 86af0ee..e1e7b25

[Qemu-devel] [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()

2011-01-19 Thread Isaku Yamahata
use qemu_malloc() instead of direct use of malloc(). Signed-off-by: Isaku Yamahata --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 851f350..86af0ee 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -2053,7 +2053,7 @@ static char

[Qemu-devel] [PATCH] pci/pcie: make pci_find_device() ARI aware.

2011-01-19 Thread Isaku Yamahata
make pci_find_device() ARI aware. Signed-off-by: Isaku Yamahata --- hw/pci.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 8d0e3df..851f350 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1596,11 +1596,18 @@ PCIBus *pci_find_bus(PCIBus *bus

Re: [Qemu-devel] [PATCH 0/8] misc cleanups for x86_64 disabling config settings

2011-01-13 Thread Isaku Yamahata
How about creating stub functions instead of #ifdefs? something like pc-stubs.c #ifndef CONFIG_VMWARE_VGA pci_vmsvga_init() { error ... } #endif #ifndef CONFIG_... ... On Wed, Jan 12, 2011 at 11:34:29PM -0700, David Ahern wrote: > David Ahern (8): > fix 'no such file' error from make_d

[Qemu-devel] Re: [PATCH repost] pci: fix migration device path for devices behind nested bridges

2010-12-24 Thread Isaku Yamahata
The code looks good. Regarding to the format itself, I don't have strong opinion about it. What cames into my mind while I'm looking at the code is, Does BusInfo have to have two path functions? get_dev_path and get_fw_dev_path. Right now only pci supplies get_dev_path, on the other hand get_fw_de

[Qemu-devel] [PATCH v11 5/5] pcie/aer: use fw device path as fallback for aer injection command

2010-12-23 Thread Isaku Yamahata
pcie_aer_inject command: When qdev id failed, try fw device path as fallback. Signed-off-by: Isaku Yamahata --- hmp-commands.hx |7 ++- hw/pcie_aer.c | 12 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8d84ddc

[Qemu-devel] [PATCH v11 1/5] qdev: export qdev_find_recursive() for later use

2010-12-23 Thread Isaku Yamahata
This patch exports qdev_find_recursive() for later use. Signed-off-by: Isaku Yamahata --- hw/qdev.c |2 +- hw/qdev.h |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 4747c67..31eb464 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -548,7 +548,7

[Qemu-devel] [PATCH v11 3/5] pcie/aer: glue aer error injection into qemu monitor

2010-12-23 Thread Isaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata --- Change v10 -> v11: - use qdev id Changes v9 -> v10: - use fw device path - error path - pci-stub.c for CONFIG_PCI=n Changes v8 -> v9: - revise error code Changes v7 -> v8: - use domain:slot.func:slot.func.

[Qemu-devel] [PATCH v11 2/5] pci: introduce a helper function to convert qdev id to PCIDevice

2010-12-23 Thread Isaku Yamahata
This patch introduce a helper function to get PCIDevice from qdev id. This function will be used later. Signed-off-by: Isaku Yamahata --- hw/pci.c | 35 +++ hw/pci.h |1 + 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c

[Qemu-devel] [PATCH v11 0/5] pcie/aer: glue inject aer error into hmp

2010-12-23 Thread Isaku Yamahata
This patch series introduces hmp command to inject aer error. Now fw device path is used to specify pci function. Changes v10 -> v11: - use qdev id and use fw dev path as fallback Isaku Yamahata (5): qdev: export qdev_find_recursive() for later use pci: introduce a helper function to conv

[Qemu-devel] [PATCH v11 4/5] pci: introduce a parser for fw device path to pci device

2010-12-23 Thread Isaku Yamahata
Introduce a function to parse fw device path to pci device. the format is /p...@{, }/[]@,/.../[]@, = "i" = = slot number in hex = func number in hex Signed-off-by: Isaku Yamahata --- hw/pci.c | 129 ++ hw/pci.h |2

[Qemu-devel] Re: [PATCH 2/3] pci: introduce a parser for fw device path to pci device

2010-12-23 Thread Isaku Yamahata
On Wed, Dec 22, 2010 at 02:03:55PM +0200, Michael S. Tsirkin wrote: > On Wed, Dec 22, 2010 at 08:36:40PM +0900, Isaku Yamahata wrote: > > On Wed, Dec 22, 2010 at 01:04:43PM +0200, Michael S. Tsirkin wrote: > > > On Wed, Dec 22, 2010 at 07:54:49PM +0900, Isaku Yamahata wrote: &

[Qemu-devel] Re: [PATCH 2/3] pci: introduce a parser for fw device path to pci device

2010-12-22 Thread Isaku Yamahata
On Wed, Dec 22, 2010 at 01:04:43PM +0200, Michael S. Tsirkin wrote: > On Wed, Dec 22, 2010 at 07:54:49PM +0900, Isaku Yamahata wrote: > > Introduce a function to parse fw device path to pci device. > > the format is > > /p...@{, > > }/[]@,/.../[]@, > > > &g

[Qemu-devel] [PATCH 1/3] build, pci: remove QMP dependency on core PCI code

2010-12-22 Thread Isaku Yamahata
by introducing pci-stub.c, eliminate QMP dependency on core PCI code rquired by query-pci command. Signed-off-by: Isaku Yamahata --- Makefile.objs |4 +--- Makefile.target |2 ++ hw/pci-stub.c | 37 + 3 files changed, 40 insertions(+), 3

[Qemu-devel] [PATCH 3/3] pcie/aer: glue aer error injection into qemu monitor

2010-12-22 Thread Isaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata --- Changes v9 -> v10: - use fw device path - error path - pci-stub.c for CONFIG_PCI=n Changes v8 -> v9: - revise error code Changes v7 -> v8: - use domain:slot.func:slot.func...:slot.func instead of domain:bus:

[Qemu-devel] [PATCH 2/3] pci: introduce a parser for fw device path to pci device

2010-12-22 Thread Isaku Yamahata
Introduce a function to parse fw device path to pci device. the format is /p...@{, }/[]@,/.../[]@, = "i" = = slot number in hex = func number in hex Signed-off-by: Isaku Yamahata --- hw/pci.c | 128 ++ hw/pci.h |2

[Qemu-devel] [PATCH 0/3] pcie/aer: glue inject aer error into hmp

2010-12-22 Thread Isaku Yamahata
This patch series introduces hmp command to inject aer error. Now fw device path is used to specify pci function. Isaku Yamahata (3): build, pci: remove QMP dependency on core PCI code pci: introduce a parser for fw device path to pci device pcie/aer: glue aer error injection into qemu

[Qemu-devel] Re: PCIe Transaction handling in Qemu

2010-12-22 Thread Isaku Yamahata
On Tue, Dec 21, 2010 at 02:24:29PM -0600, Adnan Khaleel wrote: > Hello, Hi. > I have a question regarding how Qemu PCIe devices handle Config Transactions > vs > Memory Transactions (assuming the PCI device is setup to act > as PCI_BASE_ADDRESS_SPACE_MEMORY). > > I'm using portions of hw/cirr

Re: [Qemu-devel] Re: [PATCH] pci: disable migration of p2p bridge

2010-12-22 Thread Isaku Yamahata
On Wed, Dec 22, 2010 at 08:27:17AM +0200, Michael S. Tsirkin wrote: > On Wed, Dec 22, 2010 at 12:13:43PM +0900, Isaku Yamahata wrote: > > Right now pcibus_get_dev_path() isn't migration save because > > bus number/secondary bus number are set by guest OS. > > So it can&#

[Qemu-devel] [PATCH] pcie: add flr support

2010-12-21 Thread Isaku Yamahata
support flr. Signed-off-by: Isaku Yamahata --- hw/pci.c|6 +- hw/pci.h|1 + hw/pcie.c | 11 +-- hw/pcie.h |2 -- hw/xio3130_downstream.c |2 +- hw/xio3130_upstream.c |3 --- 6 files changed, 12

[Qemu-devel] [PATCH] pc/piix: fix mismerge of b1aeb92666d2fde413c34578b3b42bbfe5f2a506

2010-12-21 Thread Isaku Yamahata
The change set of b1aeb92666d2fde413c34578b3b42bbfe5f2a506 in pci branch was mismerged. The compatibility should be kept for 0.13, not for 0.14. Signed-off-by: Isaku Yamahata --- hw/pc_piix.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/pc_piix.c b/hw

<    2   3   4   5   6   7   8   9   10   11   >