Re: [Qemu-devel] [PATCH 2/4] acpi/gpe: expand bits of gpe register

2013-05-21 Thread Isaku Yamahata
Why? And it breaks pointer operation like cur = ar-gpe.sts + addr; thanks, On Wed, May 22, 2013 at 11:46:35AM +0800, liguang wrote: Signed-off-by: liguang lig.f...@cn.fujitsu.com --- hw/acpi/core.c |8 hw/acpi/ich9.c |2 +- hw/acpi/piix4.c

Re: [Qemu-devel] [PATCH 2/4] acpi/gpe: expand bits of gpe register

2013-05-23 Thread Isaku Yamahata
On Wed, May 22, 2013 at 01:37:41PM +0800, li guang wrote: 在 2013-05-22三的 14:28 +0900,Isaku Yamahata写道: Why? And it breaks pointer operation like the fact is I can't guess why gpe-sts is defined uint8_t but the real hardware is 32-bit width. Which section of ACPI spec? I expand

Re: [Qemu-devel] [RFC PATCH v1: 11/12] mc: register MC qemu-file functions and expose MC tunable capability

2013-10-23 Thread Isaku Yamahata
Since more integer parameters would come in the future, so how about set_migrate_parameter similar to set_migrate_capability? It sets integer value, while set_migrate_capability sets bool value. thanks, On Mon, Oct 21, 2013 at 01:14:21AM +, mrhi...@linux.vnet.ibm.com wrote: From: Michael

[Qemu-devel] [PATCH] migration: ram_handle_compressed

2013-09-18 Thread Isaku Yamahata
ram_handle_compressed() should be aware size TARGET_PAGE_SIZE migration-rdma can call it with larger size. Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- arch_init.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/arch_init.c b

Re: [Qemu-devel] [PATCH] migration: ram_handle_compressed

2013-09-20 Thread Isaku Yamahata
On Wed, Sep 18, 2013 at 02:08:40PM +0200, Juan Quintela wrote: Isaku Yamahata yamah...@private.email.ne.jp wrote: ram_handle_compressed() should be aware size TARGET_PAGE_SIZE migration-rdma can call it with larger size. Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp

[Qemu-devel] [PATCH v2] migration: ram_handle_compressed

2013-09-20 Thread Isaku Yamahata
ram_handle_compressed() should be aware of size TARGET_PAGE_SIZE. migration-rdma can call it with larger size. Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- changes v1 - v2: - don't loop --- arch_init.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff

Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}

2013-09-20 Thread Isaku Yamahata
On Wed, Sep 18, 2013 at 10:28:51AM -0400, Michael R. Hines wrote: On 09/03/2013 10:32 PM, Isaku Yamahata wrote: Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/migration-rdma.c b

[Qemu-devel] [PATCH v3 1/2] arch_init: make is_zero_page accept size

2013-09-20 Thread Isaku Yamahata
Later is_zero_page will be used for non TARGET_PAGE_SIZE range. And rename it to is_zero_range as it isn't page size any more. Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- arch_init.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch_init.c b

[Qemu-devel] [PATCH v3 2/2] migration: ram_handle_compressed

2013-09-20 Thread Isaku Yamahata
ram_handle_compressed() should be aware of size TARGET_PAGE_SIZE. migration-rdma can call it with larger size. Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- Changes v2 - v3: - use is_zero_range() changes v1 - v2: - don't loop --- arch_init.c | 11 ++- 1 file changed

Re: [Qemu-devel] [PATCH 2/2] rdma: simplify qemu_rdma_register_and_get_keys()

2013-09-20 Thread Isaku Yamahata
On Wed, Sep 18, 2013 at 11:01:16AM -0400, Michael R. Hines wrote: The value of chunk_end changes based on whether or not the value of block-is_ram_block is true of false. When is block-is_ram_block set to false? Looking at __qemu_rdma_add_block() and qemu_rdma_init_ram_blocks(), is_ram_block

[Qemu-devel] [PATCH 2/3] rdma: qemu_rdma_post_send_control uses wrongly RDMA_WRID_MAX

2013-08-01 Thread Isaku Yamahata
RDMA_WRID_CONTROL should be used. And remove related work around. Cc: Michael R. Hines mrhi...@us.ibm.com Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration-rdma.c b

[Qemu-devel] [PATCH 3/3] rdma: use RDMA_WRID_READY

2013-08-01 Thread Isaku Yamahata
Cc: Michael R. Hines mrhi...@us.ibm.com Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration-rdma.c b/migration-rdma.c index 67069d2..871f9cd 100644 --- a/migration-rdma.c +++ b

[Qemu-devel] [PATCH 0/3] rdma fixes and clean ups

2013-08-01 Thread Isaku Yamahata
Small fixes/clean up to rdma. found through code review. Isaku Yamahata (3): rdma: don't use negative index to array rdma: qemu_rdma_post_send_control uses wrongly RDMA_WRID_MAX rdma: use RDMA_WRID_READY migration-rdma.c | 43 +++ 1 file changed

[Qemu-devel] [PATCH 1/3] rdma: don't use negative index to array

2013-08-01 Thread Isaku Yamahata
Cc: Michael R. Hines mrhi...@us.ibm.com Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/migration-rdma.c b/migration-rdma.c index 4828738..edbae9f 100644

[Qemu-devel] [PATCH] rdma: memory leak RDMAContext::host

2013-08-03 Thread Isaku Yamahata
It is allocated by g_strdup(), so needs to be freed. Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/migration-rdma.c b/migration-rdma.c index 4828738..2c15d95 100644 --- a/migration-rdma.c +++ b/migration

Re: [Qemu-devel] [PATCH 0/3] rdma fixes and clean ups

2013-08-03 Thread Isaku Yamahata
On Fri, Aug 02, 2013 at 09:40:58AM -0400, Michael R. Hines mrhi...@linux.vnet.ibm.com wrote: On 08/01/2013 11:56 PM, Isaku Yamahata wrote: Small fixes/clean up to rdma. found through code review. Isaku Yamahata (3): rdma: don't use negative index to array rdma

[Qemu-devel] [PATCH 3/3] rdma: check if RDMAControlHeader::len match transferred byte

2013-08-06 Thread Isaku Yamahata
RDMAControlHeader::len is provided from remote, so check if the value match the actual transferred byte_len. Cc: Michael R. Hines mrhi...@us.ibm.com Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c | 32 ++-- 1 file changed, 22

[Qemu-devel] [PATCH 2/3] rdma: validate RDMAControlHeader::len

2013-08-06 Thread Isaku Yamahata
RMDAControlHeader::len is provided from remote, so validate it. Cc: Michael R. Hines mrhi...@us.ibm.com Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c |5 + 1 file changed, 5 insertions(+) diff --git a/migration-rdma.c b/migration-rdma.c index 6721266

[Qemu-devel] [PATCH 0/3] rdma: validate remote provided RDMAControlHeader::len

2013-08-06 Thread Isaku Yamahata
RDMAControlHeader::len is remote-provided. So validate the value before use. Isaku Yamahata (3): rdma: use resp.len after validation in qemu_rdma_registration_stop rdma: validate RDMAControlHeader::len rdma: check if RDMAControlHeader::len match transferred byte migration-rdma.c | 44

[Qemu-devel] [PATCH 1/3] rdma: use resp.len after validation in qemu_rdma_registration_stop

2013-08-06 Thread Isaku Yamahata
resp.len is given from remote host. So should be validated before use. Otherwise memcpy can access beyond the buffer. Cc: Michael R. Hines mrhi...@us.ibm.com Signed-off-by: Isaku Yamahata yamah...@private.email.ne.jp --- migration-rdma.c |7 +++ 1 file changed, 3 insertions(+), 4

Re: [Qemu-devel] [RFC PATCH v1: 11/12] mc: register MC qemu-file functions and expose MC tunable capability

2013-11-07 Thread Isaku Yamahata
On Wed, Nov 06, 2013 at 11:34:25AM -0500, Michael R. Hines mrhi...@linux.vnet.ibm.com wrote: On 10/23/2013 07:00 AM, Isaku Yamahata wrote: Since more integer parameters would come in the future, so how about set_migrate_parameter similar to set_migrate_capability? It sets integer value, while

Re: [Qemu-devel] Postcopy codebase status?

2013-12-11 Thread Isaku Yamahata
. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK -- Isaku Yamahata isaku.yamah...@gmail.com

[Qemu-devel] [PATCH v4 00/15] pcie port switch emulators

2010-10-17 Thread Isaku Yamahata
reviews. changes v1 - v2: - update msi - dropped already pushed out patches. - added msix patches. Isaku Yamahata (15): pci: make pci_del_capability() update for w1cmask pci: introduce helper functions to clear/set bits in configuration space pci: use pci_clear_bit_word

[Qemu-devel] [PATCH v4 10/15] pcie port: define struct PCIEPort/PCIESlot and helper functions

2010-10-17 Thread Isaku Yamahata
.) and helper functions for it. helper functions for chassis, slot - PCIESlot conversion. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - Initialize prefetchable memory base/limit registers correctly. They must support 64bit. - compilation adjustment. Changes v2 - v3

[Qemu-devel] [PATCH v4 01/15] pci: make pci_del_capability() update for w1cmask

2010-10-17 Thread Isaku Yamahata
When deleting pci capability, w1cmask should be 0 to make those registers writablein addition to wmask. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index abddc6d..e3462a9 100644

[Qemu-devel] [PATCH v4 12/15] x3130: pcie upstream port

2010-10-17 Thread Isaku Yamahata
Implement TI x3130 pcie upstream port switch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Chnages v3 - v4: - rename pcie_upstream - x3130_upstream. - compilation adjustment. Changes v2 - v3: - compilation adjustment. --- Makefile.objs |2 +- hw/xio3130_upstream.c | 188

[Qemu-devel] [PATCH v4 13/15] x3130: pcie downstream port

2010-10-17 Thread Isaku Yamahata
Implement TI x3130 pcie downstream port switch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - rename: pcie_downstream - x3130_downstream - compilation adjustment. Changes v2 - v3: - compilation adjustment. --- Makefile.objs |2 +- hw

[Qemu-devel] [PATCH v4 14/15] pcie/hotplug: introduce pushing attention button command

2010-10-17 Thread Isaku Yamahata
glue pcie_push_attention_button command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie_port.c | 82 +++ qemu-monitor.hx | 14 + sysemu.h|4 +++ 3 files changed, 100 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH v4 08/15] pcie: helper functions for pcie capability and extended capability

2010-10-17 Thread Isaku Yamahata
This patch implements helper functions for pci express capability and pci express extended capability allocation. NOTE: presence detection depends on pci_qdev_init() change. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - various clean up - dropped pcie_notify

[Qemu-devel] [PATCH v4 02/15] pci: introduce helper functions to clear/set bits in configuration space

2010-10-17 Thread Isaku Yamahata
This patch introduces helper functions to clear/set bits in configuration space. pci_{clear_set, clear, set}_bit_{byte, word, long, quad}(). They will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci.h | 72

[Qemu-devel] [PATCH v4 11/15] ioh3420: pcie root port in X58 ioh

2010-10-17 Thread Isaku Yamahata
Implements pcie root port switch in intel X58 ioh whose device id is 0x3420. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - rename pcie_root - ioh3420 - compilation adjustment. Changes v2 - v3: - compilation adjustment. --- Makefile.objs |1 + hw/ioh3420.c

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

2010-10-17 Thread Isaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - s/PCIE_AER/PCIEAER/g for structure names. - compilation adjustment. Changes v2 - v3: - compilation adjustment. --- hw/pcie_aer.c | 84

[Qemu-devel] [PATCH v4 03/15] pci: use pci_clear_bit_word() in pci_device_reset()

2010-10-17 Thread Isaku Yamahata
use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index e3462a9..5954476 100644 --- a/hw/pci.c +++ b/hw/pci.c

[Qemu-devel] [PATCH v4 09/15] pcie/aer: helper functions for pcie aer capability

2010-10-17 Thread Isaku Yamahata
This patch implements helper functions for pcie aer capability which will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - various naming fixes. - use pci bit operation helper function - eliminate errmsg function pointer - replace pci_shift_xxx

[Qemu-devel] [PATCH v4 06/15] msi: implements msi

2010-10-17 Thread Isaku Yamahata
implements msi related functions. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - use pci_set_bit_xxx helper function. - make nr_vectors, vector unsigned int. - introduce PCI_MSI_VECTORS_MAX. - fix undefined bit operations. - eliminate msi_set_pending(). Changes v2

[Qemu-devel] [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset()

2010-10-17 Thread Isaku Yamahata
lower 4bits of base/limit register is RO, and should not be modified on reset. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci_bridge.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c index 638e3b3..7229610

[Qemu-devel] [PATCH v4 07/15] pcie: add pcie constants to pcie_regs.h

2010-10-17 Thread Isaku Yamahata
add pcie constants to pcie_regs.h. Those constants should go to Linux pci_regs.h and then the file should go away eventually. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - removed copyright notice as requested. Changes v2 - v3: - moved out pcie constants from pcie.c

[Qemu-devel] [PATCH v4 04/15] pci: record which is written into pci configuration space

2010-10-17 Thread Isaku Yamahata
record which is written into pci configuration space. introduce helper function to zero PCIDevice::written. They will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci.c | 10 ++ hw/pci.h |5 + 2 files changed, 15 insertions(+), 0 deletions(-) diff

[Qemu-devel] Re: [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset()

2010-10-18 Thread Isaku Yamahata
On Mon, Oct 18, 2010 at 08:22:24AM +0200, Michael S. Tsirkin wrote: On Mon, Oct 18, 2010 at 12:17:46PM +0900, Isaku Yamahata wrote: lower 4bits of base/limit register is RO, and should not be modified on reset. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci_bridge.c

[Qemu-devel] Re: [PATCH v4 04/15] pci: record which is written into pci configuration space

2010-10-18 Thread Isaku Yamahata
On Mon, Oct 18, 2010 at 07:38:53AM +0200, Michael S. Tsirkin wrote: On Mon, Oct 18, 2010 at 12:17:45PM +0900, Isaku Yamahata wrote: record which is written into pci configuration space. introduce helper function to zero PCIDevice::written. They will be used later. Signed-off-by: Isaku

[Qemu-devel] Re: [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset()

2010-10-18 Thread Isaku Yamahata
On Mon, Oct 18, 2010 at 09:08:09AM +0200, Michael S. Tsirkin wrote: The spec says the lower bits are read-only and they have its meaning. Yes. but my question is why even touch io base/io limit at all in this function? It looks like guest can not rely on these being 0 after reset. Oh, now

[Qemu-devel] [PATCH 0/2] pciinit: fix overflow when bar allocation

2010-10-18 Thread Isaku Yamahata
, and the second patch fixes the overflow case with pci_region. Isaku Yamahata (2): pci: introduce pci_region to manage pci io/memory/prefmemory regions. pciinit: use pci_region functions. Makefile |3 +- src/pci_region.c | 70 +++ src/pciinit.c| 122

[Qemu-devel] [PATCH 1/2] pci: introduce pci_region to manage pci io/memory/prefmemory regions.

2010-10-18 Thread Isaku Yamahata
This patch adds helper functions to manage pci area. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Makefile |3 +- src/pci_region.c | 70 ++ src/util.h | 15 +++ 3 files changed, 87 insertions(+), 1

[Qemu-devel] [PATCH 2/2] pciinit: use pci_region functions.

2010-10-18 Thread Isaku Yamahata
This patch cleans up pci region allocation with pci_region. Now it is aware of overflow. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- src/pciinit.c | 122 - 1 files changed, 60 insertions(+), 62 deletions(-) diff --git a/src

[Qemu-devel] Re: [SeaBIOS] [PATCH 1/2] pci: introduce pci_region to manage pci io/memory/prefmemory regions.

2010-10-18 Thread Isaku Yamahata
On Mon, Oct 18, 2010 at 11:55:08AM +0200, Michael S. Tsirkin wrote: +static u32 pci_region_alloc_align(struct pci_region *r, u32 size, u32 align) +{ +if (r-cur_end == PCI_REGION_DISABLED) { +return 0; +} So is special value PCI_REGION_DISABLED or cur_end? cur_end

[Qemu-devel] [PATCH v5 04/14] pci/bridge: fix pci_bridge_reset()

2010-10-19 Thread Isaku Yamahata
-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - drop the lines in pci_bridge_reset() - introduced two functions to reset base/limit registers. --- hw/pci_bridge.c | 57 +++--- hw/pci_bridge.h |2 + 2 files changed, 51 insertions

[Qemu-devel] [PATCH v5 13/14] pcie/hotplug: introduce pushing attention button command

2010-10-19 Thread Isaku Yamahata
glue pcie_push_attention_button command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie_port.c | 82 +++ qemu-monitor.hx | 14 + sysemu.h|4 +++ 3 files changed, 100 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH v5 02/14] pci: introduce helper function to handle msi-x and msi.

2010-10-19 Thread Isaku Yamahata
this patch implements helper functions to handle msi-x and msi uniformly. They will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci.c | 19 +++ hw/pci.h |3 +++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw

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

2010-10-19 Thread Isaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - s/PCIE_AER/PCIEAER/g for structure names. - compilation adjustment. Changes v2 - v3: - compilation adjustment. --- hw/pcie_aer.c | 84

[Qemu-devel] [PATCH v5 01/14] pci: introduce helper functions to test-and-{clear, set} mask in configuration space

2010-10-19 Thread Isaku Yamahata
This patch introduces helper functions to test-and-{clear, set} mask in configuration space. pci_{byte, word, long, quad}_test_and_{clear, set}_mask(). They will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pci.h | 70

[Qemu-devel] [PATCH v5 03/14] pci: use pci_word_test_and_clear_mask() in pci_device_reset()

2010-10-19 Thread Isaku Yamahata
use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5 - use pci_word_test_and_clear_mask() --- hw/pci.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index

[Qemu-devel] [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
by following reviews. changes v1 - v2: - update msi - dropped already pushed out patches. - added msix patches. Isaku Yamahata (14): pci: introduce helper functions to test-and-{clear, set} mask in configuration space pci: introduce helper function to handle msi-x and msi. pci: use

[Qemu-devel] [PATCH v5 11/14] x3130: pcie upstream port

2010-10-19 Thread Isaku Yamahata
Implement TI x3130 pcie upstream port switch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - remove flr related stuff. This will be addressed at the next phase. - use pci_xxx_test_and_xxx_mask(). Chnages v3 - v4: - rename pcie_upstream - x3130_upstream

[Qemu-devel] [PATCH v5 08/14] pcie/aer: helper functions for pcie aer capability

2010-10-19 Thread Isaku Yamahata
This patch implements helper functions for pcie aer capability which will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - use pci_xxx_test_and_xxx_mask() - rewrote PCIDevice::written bits. - eliminated pcie_aer_notify() - introduced PCIExpressDevice

[Qemu-devel] [PATCH v5 06/14] pcie: add pcie constants to pcie_regs.h

2010-10-19 Thread Isaku Yamahata
add pcie constants to pcie_regs.h. Those constants should go to Linux pci_regs.h and then the file should go away eventually. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - removed copyright notice as requested. Changes v2 - v3: - moved out pcie constants from pcie.c

[Qemu-devel] [PATCH v5 07/14] pcie: helper functions for pcie capability and extended capability

2010-10-19 Thread Isaku Yamahata
This patch implements helper functions for pci express capability and pci express extended capability allocation. NOTE: presence detection depends on pci_qdev_init() change. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - dropped FLR related members

[Qemu-devel] [PATCH v5 05/14] msi: implements msi

2010-10-19 Thread Isaku Yamahata
implements msi related functions. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - use pci_xxx_test_and_clear/set_mask(). Changes v3 - v4: - use pci_set_bit_xxx helper function. - make nr_vectors, vector unsigned int. - introduce PCI_MSI_VECTORS_MAX. - fix undefined

[Qemu-devel] [PATCH v5 12/14] x3130: pcie downstream port

2010-10-19 Thread Isaku Yamahata
Implement TI x3130 pcie downstream port switch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - use pci_xxx_test_and_xxx_mask(). - removed flr related stuff. Changes v3 - v4: - rename: pcie_downstream - x3130_downstream - compilation adjustment. Changes v2 - v3

[Qemu-devel] [PATCH v5 09/14] pcie port: define struct PCIEPort/PCIESlot and helper functions

2010-10-19 Thread Isaku Yamahata
.) and helper functions for it. helper functions for chassis, slot - PCIESlot conversion. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - use pci_xxx_test_and_xxx_mask() Changes v3 - v4: - Initialize prefetchable memory base/limit registers correctly. They must support 64bit

[Qemu-devel] [PATCH v5 10/14] ioh3420: pcie root port in X58 ioh

2010-10-19 Thread Isaku Yamahata
Implements pcie root port switch in intel X58 ioh whose device id is 0x3420. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - use pci_xxx_test_and_xxx_mask() Changes v3 - v4: - rename pcie_root - ioh3420 - compilation adjustment. Changes v2 - v3: - compilation

[Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
Isaku Yamahata (14): pci: introduce helper functions to test-and-{clear, set} mask in configuration space pci: introduce helper function to handle msi-x and msi. pci: use pci_word_test_and_clear_mask() in pci_device_reset() pci/bridge: fix pci_bridge_reset() msi

[Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
On Tue, Oct 19, 2010 at 01:51:31PM +0200, Michael S. Tsirkin wrote: On Tue, Oct 19, 2010 at 06:06:27PM +0900, Isaku Yamahata wrote: On uncorrectable error status register in pcie_aer_write_config(). The register is RW1CS, so making it writable and test-and-clear doesn't work. Sure

[Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
On Tue, Oct 19, 2010 at 07:06:55PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 20, 2010 at 12:19:47AM +0900, Isaku Yamahata wrote: On Tue, Oct 19, 2010 at 01:51:31PM +0200, Michael S. Tsirkin wrote: On Tue, Oct 19, 2010 at 06:06:27PM +0900, Isaku Yamahata wrote: On uncorrectable error

[Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
━ From: Isaku Yamahata [mailto:yamah...@valinux.co.jp] To: Michael S. Tsirkin [mailto:m...@redhat.com] Cc: qemu-devel@nongnu.org, skand...@cisco.com, etmar...@cisco.com, we...@cisco.com, ad...@khaleel.us Sent: Tue, 19 Oct 2010 08:55

[Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
On Wed, Oct 20, 2010 at 12:40:49AM +0200, Michael S. Tsirkin wrote: I think I suggested once a good way to implement this: - always make the bits w1c - after config write: if MHR is enabled, and you see that error log is not empty and that bit is 0, this means that someone has

[Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators

2010-10-19 Thread Isaku Yamahata
working on qemu-kvm, though on a little bit old code base. Great news. I'd like to have a look at the code. thanks, Wei On 10/19/10 3:39 PM, Isaku Yamahata yamah...@valinux.co.jp wrote: On Tue, Oct 19, 2010 at 11:07:34AM -0500, Adnan Khaleel wrote: Are all these patches going

[Qemu-devel] [PATCH v6 06/12] x3130: pcie downstream port

2010-10-20 Thread Isaku Yamahata
Implement TI x3130 pcie downstream port switch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v5 - v6: - compilation adjustment. - eliminate aer bits. Changes v4 - v5: - use pci_xxx_test_and_xxx_mask(). - removed flr related stuff. Changes v3 - v4: - rename: pcie_downstream

[Qemu-devel] [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-20 Thread Isaku Yamahata
glue pcie_push_attention_button command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie_port.c | 82 +++ qemu-monitor.hx | 14 + sysemu.h|4 +++ 3 files changed, 100 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH v6 00/12] pcie port switch emulators

2010-10-20 Thread Isaku Yamahata
patches. Isaku Yamahata (12): pcie: comment on hpev_intx pci/bridge: fix pci_bridge_reset() pcie port: define struct PCIEPort/PCIESlot and helper functions ioh3420: pcie root port in X58 ioh x3130: pcie upstream port x3130: pcie downstream port pcie/hotplug: introduce pushing

[Qemu-devel] [PATCH v6 03/12] pcie port: define struct PCIEPort/PCIESlot and helper functions

2010-10-20 Thread Isaku Yamahata
.) and helper functions for it. helper functions for chassis, slot - PCIESlot conversion. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v4 - v5: - use pci_xxx_test_and_xxx_mask() Changes v3 - v4: - Initialize prefetchable memory base/limit registers correctly. They must support 64bit

[Qemu-devel] [PATCH v6 04/12] ioh3420: pcie root port in X58 ioh

2010-10-20 Thread Isaku Yamahata
Implements pcie root port switch in intel X58 ioh whose device id is 0x3420. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v5 - v6: - compilation adjustment. - eliminated aer bits. Changes v4 - v5: - use pci_xxx_test_and_xxx_mask() Changes v3 - v4: - rename pcie_root

[Qemu-devel] [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability

2010-10-20 Thread Isaku Yamahata
This patch implements helper functions for pcie aer capability which will be used later. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Chnages v5 - v6: - cleaned up pcie_aer_write_config(). - enum definition. Changes v4 - v5: - use pci_xxx_test_and_xxx_mask() - rewrote PCIDevice

[Qemu-devel] [PATCH v6 05/12] x3130: pcie upstream port

2010-10-20 Thread Isaku Yamahata
Implement TI x3130 pcie upstream port switch. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v5 - v6: - compilation adjustment. - delete aer bits. Changes v4 - v5: - remove flr related stuff. This will be addressed at the next phase. - use pci_xxx_test_and_xxx_mask

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

2010-10-20 Thread Isaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v3 - v4: - s/PCIE_AER/PCIEAER/g for structure names. - compilation adjustment. Changes v2 - v3: - compilation adjustment. --- hw/pcie_aer.c | 84

[Qemu-devel] [PATCH v6 02/12] pci/bridge: fix pci_bridge_reset()

2010-10-20 Thread Isaku Yamahata
-by: Isaku Yamahata yamah...@valinux.co.jp --- Changes v5 - v6: - pci_bridge_disable_base_limit() Changes v4 - v5: - drop the lines in pci_bridge_reset() - introduced two functions to reset base/limit registers. --- hw/pci_bridge.c | 48 ++-- hw

[Qemu-devel] [PATCH v6 10/12] ioh3420: support aer

2010-10-20 Thread Isaku Yamahata
Add aer support. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/ioh3420.c | 52 ++-- 1 files changed, 46 insertions(+), 6 deletions(-) diff --git a/hw/ioh3420.c b/hw/ioh3420.c index 1f340d3..09c94f9 100644 --- a/hw/ioh3420.c +++ b

[Qemu-devel] [PATCH v6 12/12] x3130/downstream: support aer.

2010-10-20 Thread Isaku Yamahata
add aer support. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/xio3130_downstream.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c index a44e188..9087c0b 100644 --- a/hw/xio3130_downstream.c

[Qemu-devel] [PATCH v6 01/12] pcie: comment on hpev_intx

2010-10-20 Thread Isaku Yamahata
document hpev_intx. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie.h | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/pcie.h b/hw/pcie.h index 68327d8..2871e27 100644 --- a/hw/pcie.h +++ b/hw/pcie.h @@ -65,7 +65,15 @@ struct PCIExpressDevice

[Qemu-devel] [PATCH v6 11/12] x3130/upstream: support aer

2010-10-20 Thread Isaku Yamahata
add aer support. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/xio3130_upstream.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c index d9d637f..36ed4b1 100644 --- a/hw/xio3130_upstream.c +++ b/hw

[Qemu-devel] Re: [PATCH v6 02/12] pci/bridge: fix pci_bridge_reset()

2010-10-20 Thread Isaku Yamahata
On Wed, Oct 20, 2010 at 10:49:20AM +0200, Michael S. Tsirkin wrote: On Wed, Oct 20, 2010 at 05:18:51PM +0900, Isaku Yamahata wrote: The default value of base/limit registers aren't specified in the spec. So pci_bridge_reset() shouldn't touch them. Instead, introduced two functions to reset

[Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-20 Thread Isaku Yamahata
On Wed, Oct 20, 2010 at 12:00:11PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 20, 2010 at 05:18:56PM +0900, Isaku Yamahata wrote: glue pcie_push_attention_button command. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp So as a high level command, I think we need to think about

[Qemu-devel] Re: [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability

2010-10-20 Thread Isaku Yamahata
Thank you for detailed review. On Wed, Oct 20, 2010 at 11:56:16AM +0200, Michael S. Tsirkin wrote: +static uint32_t aer_log_del(PCIEAERLog *aer_log) +{ +uint32_t i = aer_log-consumer; +aer_log-consumer = aer_log_next(aer_log-consumer, aer_log-log_max); +return i; +}

[Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-21 Thread Isaku Yamahata
On Thu, Oct 21, 2010 at 10:02:37AM +0200, Michael S. Tsirkin wrote: On Thu, Oct 21, 2010 at 12:46:33PM +0900, Isaku Yamahata wrote: On Wed, Oct 20, 2010 at 12:00:11PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 20, 2010 at 05:18:56PM +0900, Isaku Yamahata wrote: glue

[Qemu-devel] Re: [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability

2010-10-21 Thread Isaku Yamahata
On Thu, Oct 21, 2010 at 10:07:01AM +0200, Michael S. Tsirkin wrote: On Thu, Oct 21, 2010 at 02:15:24PM +0900, Isaku Yamahata wrote: Thank you for detailed review. On Wed, Oct 20, 2010 at 11:56:16AM +0200, Michael S. Tsirkin wrote: +static uint32_t aer_log_del(PCIEAERLog *aer_log

Re: [Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-24 Thread Isaku Yamahata
On Fri, Oct 22, 2010 at 04:38:49PM +0200, Michael S. Tsirkin wrote: On Fri, Oct 22, 2010 at 01:35:47PM +0200, Markus Armbruster wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Oct 20, 2010 at 05:18:56PM +0900, Isaku Yamahata wrote: glue pcie_push_attention_button command

Re: [Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-24 Thread Isaku Yamahata
On Mon, Oct 25, 2010 at 06:15:37AM +0200, Michael S. Tsirkin wrote: On Mon, Oct 25, 2010 at 12:29:57PM +0900, Isaku Yamahata wrote: On Fri, Oct 22, 2010 at 04:38:49PM +0200, Michael S. Tsirkin wrote: On Fri, Oct 22, 2010 at 01:35:47PM +0200, Markus Armbruster wrote: Michael S. Tsirkin m

[Qemu-devel] Re: [PATCH RFC] msi: remove range checks

2010-10-25 Thread Isaku Yamahata
Seems good. For consistency, the range check in msix_write_config() should be also removed. On Mon, Oct 25, 2010 at 08:07:25AM +0200, Michael S. Tsirkin wrote: config write handlers should be idempotent. So no need for range checks. Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

[Qemu-devel] Re: [PATCH RFC] pcie: clean up hot plug notification

2010-10-25 Thread Isaku Yamahata
On Mon, Oct 25, 2010 at 08:46:38AM +0200, Michael S. Tsirkin wrote: On Mon, Oct 25, 2010 at 03:44:01PM +0900, Isaku Yamahata wrote: On Mon, Oct 25, 2010 at 07:49:41AM +0200, Michael S. Tsirkin wrote: Simplify logic for hotplug notification, by tracking state of the logical interrupt

Re: [Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-25 Thread Isaku Yamahata
On Mon, Oct 25, 2010 at 07:55:57AM +0200, Michael S. Tsirkin wrote: On Mon, Oct 25, 2010 at 02:53:16PM +0900, Isaku Yamahata wrote: On Mon, Oct 25, 2010 at 06:15:37AM +0200, Michael S. Tsirkin wrote: On Mon, Oct 25, 2010 at 12:29:57PM +0900, Isaku Yamahata wrote: On Fri, Oct 22, 2010

[Qemu-devel] Re: [PATCH RFC] pcie: clean up hot plug notification

2010-10-25 Thread Isaku Yamahata
On Mon, Oct 25, 2010 at 07:49:41AM +0200, Michael S. Tsirkin wrote: Simplify logic for hotplug notification, by tracking state of the logical interrupt condition. We then simply use this variable to make the interrupt decision, according to spec. API is made cleaner as we no longer force

[Qemu-devel] Re: [PATCH rfc] pcie: get rid of range checks

2010-10-25 Thread Isaku Yamahata
Some comments below. On Mon, Oct 25, 2010 at 07:05:51AM +0200, Michael S. Tsirkin wrote: config cycle operations should be idempotent, so there's no need to complicate code with range checks. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Untested. Pls comment. hw/pcie.c |

Re: [Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command

2010-10-26 Thread Isaku Yamahata
On Mon, Oct 25, 2010 at 04:02:36PM +0900, Isaku Yamahata wrote: What I am also saying is that the same command should be able to work for pci and express I think. I see. Then, I think that the slot numbering needs to be discussed. Yes. More concretely, it's what type

[Qemu-devel] [PATCH 0/6] pcie: fixes for pci branch

2010-10-27 Thread Isaku Yamahata
This patch series fixes isseus which introduced by 5704608988972359473ce609f9e4884808115b58 cd870502e228f8f028f93fb585ae3b208fcb46c7 4b78560503a802eae3663ace9f9cf080319e7265 Isaku Yamahata (6): pcie: fix pcie_cap_slot_write_config(). pcie/slot: fix hotplug_event_notify(). pcie/slot: clean

[Qemu-devel] [PATCH 1/6] pcie: fix pcie_cap_slot_write_config().

2010-10-27 Thread Isaku Yamahata
-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie.c | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/pcie.c b/hw/pcie.c index 0385f53..64cc003 100644 --- a/hw/pcie.c +++ b/hw/pcie.c @@ -19,6 +19,7 @@ */ #include sysemu.h +#include

[Qemu-devel] [PATCH 3/6] pcie/slot: clean up of hotplug_event_notify().

2010-10-27 Thread Isaku Yamahata
remove redundant return and blank line from hotplug_event_notify(). Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/pcie.c b/hw/pcie.c index 3c52849..37d7457 100644 --- a/hw/pcie.c +++ b/hw/pcie.c

[Qemu-devel] [PATCH 2/6] pcie/slot: fix hotplug_event_notify().

2010-10-27 Thread Isaku Yamahata
This patch fixes the miscondition to trigger slot event which is introduced by cd870502e228f8f028f93fb585ae3b208fcb46c7. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pcie.c b/hw/pcie.c index

[Qemu-devel] [PATCH 4/6] pcie/slot: factor out the logic to update hotplug event status.

2010-10-27 Thread Isaku Yamahata
This patch factors out the hot plug event logic. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/pcie.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/pcie.c b/hw/pcie.c index 37d7457..97d17fa 100644 --- a/hw/pcie.c +++ b/hw/pcie.c @@ -139,9

[Qemu-devel] [PATCH 5/6] pcie/slot: fix save/load

2010-10-27 Thread Isaku Yamahata
This patch fixes save/load of pcie slot which was broken by cd870502e228f8f028f93fb585ae3b208fcb46c7. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/ioh3420.c|1 + hw/pcie.c |7 +++ hw/pcie.h |1 + hw/xio3130_downstream.c

[Qemu-devel] [PATCH 6/6] msix: remove range checks.

2010-10-27 Thread Isaku Yamahata
Same as 4b78560503a802eae3663ace9f9cf080319e7265 config write handlers should be idempotent. So no need for range checks. Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/msix.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index

[Qemu-devel] Re: [PATCH] msi: minor cleanups

2010-10-27 Thread Isaku Yamahata
Looks good. On Wed, Oct 27, 2010 at 04:30:03PM +0200, Michael S. Tsirkin wrote: Comment fixup (tell what it does not what it does not do), typo fix, whitespace fix. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/msi.c |7 +++ 1 files changed, 3 insertions(+), 4

  1   2   3   4   5   6   7   8   9   10   >