Re: [Qemu-devel] [PATCH v5 11/11] pci: Convert msi_init() to Error and fix callers to check it

2016-05-17 Thread Cao jin
I don`t make a difference msi_nonbroken) { -err = msi_init(dev, 0, 1, true, true); +err = msi_init(dev, 0, 1, true, true, _err); if (err < 0) { +error_report_err(local_err); goto msi_error; } } -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH v5 09/11] pci bridge dev: change msi property type

2016-05-17 Thread Cao jin
On 05/15/2016 09:25 PM, Marcel Apfelbaum wrote: On 05/06/2016 07:20 AM, Cao jin wrote: From bit to enum OnOffAuto. cc: Michael S. Tsirkin <m...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <cao

Re: [Qemu-devel] [PATCH v5 10/11] pci core: assert ENOSPC when add capability

2016-05-16 Thread Cao jin
On 05/15/2016 09:10 PM, Marcel Apfelbaum wrote: On 05/06/2016 07:20 AM, Cao jin wrote: ENOSPC is programming error, assert it for debugging. +/* out of PCI config space should be programming error */ 'is', not 'should be' Will fix it. Thank You, Marcel. I guess I should put

[Qemu-devel] [PATCH] ICH9: fix typo

2016-05-16 Thread Cao jin
Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- it is 4th attempt to send this patch... because of it wasn't delivered correctly by eggs.gnu.org hw/isa/lpc_ich9.c | 4 ++-- include/hw/i386/ich9.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/isa/lp

Re: [Qemu-devel] [PATCH] pci_register_bar: cleanup

2016-05-11 Thread Cao jin
Hi, Since it has been Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> for almost 2 months, is it forgot to put into upstream? On 03/25/2016 05:25 PM, Paolo Bonzini wrote: On 25/03/2016 07:49, Cao jin wrote: place relevant code tegother, make the code easier to read Sign

Re: [Qemu-devel] [PATCH v2] qdev: Clean up around properties

2016-05-11 Thread Cao jin
For mjt`s information: it has been Reviewed-by: Markus Armbruster <arm...@redhat.com> On 05/10/2016 08:52 PM, Paolo Bonzini wrote: Just comments, so Cc: qemu-triv...@nongnu.org On 17/04/2016 09:45, Cao jin wrote: include: 1. remove unnecessary declaration of static function

Re: [Qemu-devel] [PATCH v5 04/11] mptsas: change .realize function name

2016-05-05 Thread Cao jin
forget to cc some maintainers On 05/06/2016 12:20 PM, Cao jin wrote: All the other devices` .realize function name are xxx_realize, except this one. cc: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...

Re: [Qemu-devel] [PATCH v5 02/11] change pvscsi_init_msi() type to void

2016-05-05 Thread Cao jin
forget to cc some maintainers On 05/06/2016 12:20 PM, Cao jin wrote: Nobody use its return value, so change the type to void. cc: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Dmitry Fleytman <dmi...@daynix.com> Reviewed-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-b

Re: [Qemu-devel] [PATCH v5 03/11] megasas: Fix

2016-05-05 Thread Cao jin
sorry, forget to cc some maintainers On 05/06/2016 12:20 PM, Cao jin wrote: msi_init returns non-zero value on both failure and success. cc: Hannes Reinecke <h...@suse.de> cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/

[Qemu-devel] [PATCH v5 04/11] mptsas: change .realize function name

2016-05-05 Thread Cao jin
All the other devices` .realize function name are xxx_realize, except this one. cc: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/scsi/mptsas.c | 4 ++-- 1 file changed, 2 insertio

[Qemu-devel] [PATCH v5 10/11] pci core: assert ENOSPC when add capability

2016-05-05 Thread Cao jin
ENOSPC is programming error, assert it for debugging. cc: Michael S. Tsirkin <m...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/pci/pci.c | 6 ++ 1 file cha

[Qemu-devel] [PATCH v5 06/11] intel-hda: change msi property type

2016-05-05 Thread Cao jin
>From uint32 to enum OnOffAuto. cc: Gerd Hoffmann <kra...@redhat.com> cc: Michael S. Tsirkin <m...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/audi

[Qemu-devel] [PATCH v5 11/11] pci: Convert msi_init() to Error and fix callers to check it

2016-05-05 Thread Cao jin
suse.de> cc: Paolo Bonzini <pbonz...@redhat.com> cc: Alex Williamson <alex.william...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- the affected device is modified in thi

[Qemu-devel] [PATCH v5 01/11] fix some coding style problems

2016-05-05 Thread Cao jin
Jason Wang <jasow...@redhat.com> cc: Michael S. Tsirkin <m...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/net/vmxnet3.c | 2 +- hw/pci-bridge/i

[Qemu-devel] [PATCH v5 08/11] megasas: change msi/msix property type

2016-05-05 Thread Cao jin
>From bit to enum OnOffAuto. cc: Hannes Reinecke <h...@suse.de> cc: Paolo Bonzini <pbonz...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/scsi/megasas.c | 28 +++- 1 file ch

[Qemu-devel] [PATCH v5 05/11] usb xhci: change msi/msix property type

2016-05-05 Thread Cao jin
>From bit to enum OnOffAuto. cc: Gerd Hoffmann <kra...@redhat.com> cc: Michael S. Tsirkin <m...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/usb/hcd-xhc

[Qemu-devel] [PATCH v5 00/11] Add param Error ** for msi_init()

2016-05-05 Thread Cao jin
<h...@suse.de> cc: Paolo Bonzini <pbonz...@redhat.com> cc: Alex Williamson <alex.william...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Cao jin (11): fix some coding style problems change pvscsi_init_msi() type to

[Qemu-devel] [PATCH v5 03/11] megasas: Fix

2016-05-05 Thread Cao jin
msi_init returns non-zero value on both failure and success. cc: Hannes Reinecke <h...@suse.de> cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/scsi/megasas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h

[Qemu-devel] [PATCH v5 09/11] pci bridge dev: change msi property type

2016-05-05 Thread Cao jin
>From bit to enum OnOffAuto. cc: Michael S. Tsirkin <m...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> cc: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- Actually, I am not quite sure this device need this c

[Qemu-devel] [PATCH v5 07/11] mptsas: change msi property type

2016-05-05 Thread Cao jin
>From uint32 to enum OnOffAuto, and give it a shorter name. cc: Paolo Bonzini <pbonz...@redhat.com> cc: Markus Armbruster <arm...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/scsi/mptsas.c | 4 ++-- hw/scsi/mptsas.h | 3 ++- 2 files changed, 4 inser

[Qemu-devel] [PATCH v5 02/11] change pvscsi_init_msi() type to void

2016-05-05 Thread Cao jin
Nobody use its return value, so change the type to void. cc: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Dmitry Fleytman <dmi...@daynix.com> Reviewed-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/scsi/vmw_pvscsi.c | 4

Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

2016-04-29 Thread Cao jin
t have msi property, and when msi_init fail, they all will use intx. One thing need to be confirmed: whether they need a msi property or not? -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH] ICH9: fix typo

2016-04-18 Thread Cao jin
hi mst, please ingore this one, I find more small fix like this, I will pack all these into one On 04/18/2016 03:24 PM, Cao jin wrote: Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- include/hw/i386/ich9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PATCH] ICH9: fix typo

2016-04-18 Thread Cao jin
Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- include/hw/i386/ich9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index d04dcdc..abf84ed 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -35,7

[Qemu-devel] [PATCH v2] qdev: Clean up around properties

2016-04-17 Thread Cao jin
include: 1. remove unnecessary declaration of static function 2. fix inconsistency between comment and function name, and typo OOM->QOM 2. update comments of functions, use uniform format(GTK-Doc style) Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- changelog: 1. Use uniform comme

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-04-15 Thread Cao jin
error information * * Add a static QOM property to @dev for qdev property @prop. * On error, store error in @errp. */ Paolo, is it correct? Yes, it is. You can add also "The type of the QOM property is derived from prop->info", which is what Cao Jin really wanted to convey

Re: [Qemu-devel] [PATCH] smbios: fix typo

2016-04-14 Thread Cao jin
hi, this is a typo patch, could I get confirmed? For your quick reference: System Management BIOS (SMBIOS) Reference Specification, version 3.0.0. chapter 5.2.1 & 5.2.2 On 04/09/2016 05:13 PM, Cao jin wrote: ping? On 03/29/2016 05:57 PM, Cao jin wrote: sorry mjt, I intended to cc

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-04-12 Thread Cao jin
error information * * Add a static QOM property to @dev for qdev property @prop. * On error, store error in @errp. */ Paolo, is it correct? Cao jin, is it an improvement? Yes, better, save the unnecessary pains to analyse the property type for me:) -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

2016-04-11 Thread Cao jin
default to 'off'? It seem most device have it on, a few have it off. Thanks, Marcel -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

2016-04-10 Thread Cao jin
return directly. So in this version, mptsas is updated I don't see a "msi" properties on PCIDevice class or VirtioPCIClass, are you sure we have an msi switch for most of the PCI devices? My bad, I didn`t limit the range. I mean the devices who will call msi_init, they mostly have msi(or msix, or both) property -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-04-09 Thread Cao jin
ame, _abort); I will do more analyse before v2. -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH v4 3/5] megasas: bugfix

2016-04-09 Thread Cao jin
On 04/08/2016 03:16 PM, Markus Armbruster wrote: Please use a more descriptive title. Suggest "megasas: Fix Cao jin <caoj.f...@cn.fujitsu.com> writes: msi_init returns non-zero value on both failure and success This is a sentence, should end with a period. Bug's impact? Here

Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

2016-04-09 Thread Cao jin
On 04/09/2016 08:19 PM, Cao jin wrote: Hi Several questions on this topic: 1. How to confirm whether a device model has non-MSI variant? AFAICT, it is these who have msi property. 2. For those have non-MSI variant devices(have msi property), as I see in the code, they all have

Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

2016-04-09 Thread Cao jin
& pvscsi) property as a switch, if it has and is switched on, then msi_init() failure should results in return directly. So in this version, mptsas is updated -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH] correct comment of MemoryHotplugState

2016-04-09 Thread Cao jin
ping? On 03/16/2016 04:00 AM, Eduardo Habkost wrote: On Mon, Mar 14, 2016 at 01:42:06PM +0800, Cao jin wrote: Hi, Is anyone gonna take this one? Not sure which tree this should go. Michael, Igor, if you expect this to go through the Machine Core tree, please let me know. -- Yours

Re: [Qemu-devel] [PATCH] pci_register_bar: cleanup

2016-04-09 Thread Cao jin
Hi, Is it missed to be pulled? On 03/28/2016 01:55 PM, Marcel Apfelbaum wrote: On 03/25/2016 09:49 AM, Cao jin wrote: place relevant code tegother, make the code easier to read /s/tegother/together Since is already reviewed, maybe the maintainer can fix this. Thanks, Marcel Signed

Re: [Qemu-devel] [PATCH] smbios: fix typo

2016-04-09 Thread Cao jin
ping? On 03/29/2016 05:57 PM, Cao jin wrote: sorry mjt, I intended to cc qemu-trivial, now I made it:) On 03/29/2016 05:48 PM, Cao jin wrote: The spec says: "on paragraph (16-byte) boundaries" Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- include/hw/smbios/smbios.h

Re: [Qemu-devel] [PATCH v4 1/5] fix some coding style problems

2016-04-09 Thread Cao jin
On 04/08/2016 02:29 PM, Markus Armbruster wrote: Cao jin <caoj.f...@cn.fujitsu.com> writes: This patch comes along with patch "Add param Error ** for msi_init". What do you want to say with this sentence? I think it could be dropped without loss. According to what I le

[Qemu-devel] [patch v6 11/12] vfio: register aer resume notification handler for aer resume

2016-04-05 Thread Cao jin
From: Chen Fan for supporting aer recovery, host and guest would run the same aer recovery code, that would do the secondary bus reset if the error is fatal, the aer recovery process: 1. error_detected 2. reset_link (if fatal) 3. slot_reset/mmio_enabled 4.

[Qemu-devel] [patch v6 05/12] vfio: refine function vfio_pci_host_match

2016-04-05 Thread Cao jin
From: Chen Fan Signed-off-by: Chen Fan --- hw/vfio/pci.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 0516d94..5b23a86 100644 --- a/hw/vfio/pci.c +++

[Qemu-devel] [patch v6 12/12] vfio: add 'aer' property to expose aercap

2016-04-05 Thread Cao jin
From: Chen Fan add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++

[Qemu-devel] [patch v6 10/12] vfio-pci: pass the aer error to guest

2016-04-05 Thread Cao jin
From: Chen Fan when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, resulting in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and let the

[Qemu-devel] [patch v6 08/12] vfio: add check aer functionality for hotplug device

2016-04-05 Thread Cao jin
From: Chen Fan when function 0 is hot-added, we can check the vfio device whether support hot bus reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/vfio/pci.c

[Qemu-devel] [patch v6 09/12] vfio: vote the function 0 to do host bus reset when aer occurred

2016-04-05 Thread Cao jin
From: Chen Fan Due to all devices assigned to VM on the same way as host if enable aer, so we can easily do the hot reset by selecting the function #0 to do the hot reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 14 ++

[Qemu-devel] [patch v6 06/12] vfio: add check host bus reset is support or not

2016-04-05 Thread Cao jin
From: Chen Fan When assigning a vfio device with AER enabled, we must check whether the device supports a host bus reset (ie. hot reset) as this may be used by the guest OS in order to recover the device from an AER error. QEMU must therefore have the ability to

[Qemu-devel] [patch v6 02/12] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2016-04-05 Thread Cao jin
From: Chen Fan squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31

[Qemu-devel] [patch v6 03/12] vfio: add pcie extended capability support

2016-04-05 Thread Cao jin
From: Chen Fan For vfio pcie device, we could expose the extended capability on PCIE bus. due to add a new pcie capability at the tail of the chain, in order to avoid config space overwritten, we introduce a copy config for parsing extended caps. and rebuild the

[Qemu-devel] [patch v6 07/12] pci: add a pci_function_is_valid callback to check function if valid

2016-04-05 Thread Cao jin
From: Chen Fan PCI hotplug requires that function 0 is added last to close the slot. Since vfio supporting AER, we require that the VM bus contains the same set of devices as the host bus to support AER, we can perform an AER validation test whenever a function 0

[Qemu-devel] [patch v6 04/12] vfio: add aer support for vfio device

2016-04-05 Thread Cao jin
From: Chen Fan Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 85

[Qemu-devel] [patch v6 01/12] vfio: extract vfio_get_hot_reset_info as a single function

2016-04-05 Thread Cao jin
From: Chen Fan the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 66 +++ 1

[Qemu-devel] [patch v6 00/12] vfio-pci: pass the aer error to guest, part2

2016-04-05 Thread Cao jin
From: Chen Fan v5-v6: 1. register resume handler both qemu and kernel to ensure the reset in order. 2. fix the patches 6/12, 7/12 as Alex and MST sugguestion. v4-v5: 1. add back the common function 0 hotplug code in pci core. 2. fix a sporadic

[Qemu-devel] [PATCH v4 3/5] megasas: bugfix

2016-04-05 Thread Cao jin
msi_init returns non-zero value on both failure and success Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> CC: Hannes Reinecke <h...@suse.de> CC: Paolo Bonzini <pbonz...@redhat.com> --- hw/scsi/megasas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h

[Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

2016-04-05 Thread Cao jin
not. Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/audio/intel-hda.c | 11 +++--- hw/ide/ich.c | 2 +- hw/net/vmxnet3.c | 41 +++--- hw/pci-bridge/ioh3420.c| 4 +++- hw/pci-

[Qemu-devel] [PATCH v4 1/5] fix some coding style problems

2016-04-05 Thread Cao jin
This patch comes along with patch "Add param Error ** for msi_init". Add more newlines to make the code block well separated; add more comments for msi_init; and fix a indentation. Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> CC: Dmitry Fleytman <dmi...@daynix.com>

[Qemu-devel] [PATCH v4 2/5] change pvscsi_init_msi() type to void

2016-04-05 Thread Cao jin
Nobody use its return value, so change the type to void Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Dmitry Fleytman <dmi...@daynix.com> --- hw/scsi/vmw_pvscsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) di

[Qemu-devel] [PATCH v4 4/5] mptsas: change .realize function name

2016-04-05 Thread Cao jin
All the other devices` .realize function name are xxx_realize, except this one Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> CC: Paolo Bonzini <pbonz...@redhat.com> --- hw/scsi/mptsas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/mptsas

[Qemu-devel] [PATCH v4 0/5] Add param Error ** for msi_init()

2016-04-05 Thread Cao jin
ject silently. 8. pvscsi: when msi_init fail, it will use INTx. so msi_init failure should not break the realize. Report the error when msi_init fail. 9. vfio-pci: it ignores the config space corruption error, so, catch & report it right there. Cao jin (5): fix some coding style problems

Re: [Qemu-devel] [PULL 10/15] doc/memory: update MMIO section

2016-04-05 Thread Cao jin
On 04/05/2016 05:50 PM, Paolo Bonzini wrote: From: Cao jin <caoj.f...@cn.fujitsu.com> There is no memory_region_io(). And remove a stray '-'. Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> Message-Id: <1459507677-16662-1-git-send-email-caoj.f...@cn.fujitsu.com> Si

[Qemu-devel] [PATCH] doc/memory: update MMIO section

2016-04-01 Thread Cao jin
There is no memory_region_io(). And remove a stray '-'. Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- docs/memory.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/memory.txt b/docs/memory.txt index 97134e1..fddc0d9 100644 --- a/docs/memory.txt +++

Re: [Qemu-devel] [PATCH v3] Add param Error ** for msi_init()

2016-03-31 Thread Cao jin
On 03/30/2016 05:00 PM, Marcel Apfelbaum wrote: On 03/30/2016 07:10 AM, Cao jin wrote: Hi, Yes, I should add more hint message. I don`t quite understand about: /have a "warning only" error type so the reporting party can decide to issue a warning or to fail/ Do you mean s

Re: [Qemu-devel] [PATCH v3] Add param Error ** for msi_init()

2016-03-29 Thread Cao jin
Hi Marcel, Thanks for your quick review for this big fat patch:) please see my comments inline. On 03/30/2016 04:56 AM, Marcel Apfelbaum wrote: On 03/28/2016 01:44 PM, Cao jin wrote: -#define VMXNET3_USE_64BIT (true) -#define VMXNET3_PER_VECTOR_MASK (false) - -static bool

Re: [Qemu-devel] [PATCH] smbios: fix typo

2016-03-29 Thread Cao jin
sorry mjt, I intended to cc qemu-trivial, now I made it:) On 03/29/2016 05:48 PM, Cao jin wrote: The spec says: "on paragraph (16-byte) boundaries" Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- include/hw/smbios/smbios.h | 2 +- 1 file changed, 1 insertion(+), 1 d

[Qemu-devel] [PATCH] smbios: fix typo

2016-03-29 Thread Cao jin
The spec says: "on paragraph (16-byte) boundaries" Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- include/hw/smbios/smbios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/smbios/smbios.h b/include/hw/smbios/smbios.h index 76ccf70

[Qemu-devel] [PATCH v3] Add param Error ** for msi_init()

2016-03-28 Thread Cao jin
config space corruption error, so, catch & report it right there. Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- The patch has been compiled. No further test. hw/audio/intel-hda.c | 11 +++--- hw/ide/ich.c | 2 +- hw/net/vmxnet3.c

[Qemu-devel] [PATCH] pci_register_bar: cleanup

2016-03-25 Thread Cao jin
place relevant code tegother, make the code easier to read Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- hw/pci/pci.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e67664d..f0f41dc 100644 --- a/hw/pci/pci.c ++

Re: [Qemu-devel] [PATCH V4] hw/pxb: add chassis_nr property

2016-03-25 Thread Cao jin
s for your information:) -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-03-25 Thread Cao jin
, int indent) Thanks Paolo, I saw here, and then I thought the property is added and just be printed out, seems for no real benefit("really used"). Now I think I see where I was wrong. Thanks. BTW, is this patch right? -- Yours Sincerely, Cao jin

[Qemu-devel] [PATCH] qdev property: cleanup

2016-03-24 Thread Cao jin
include: 1. remove unnecessary declaration of static function 2. fix inconsistency between comment and function name, and typo OOM->QOM 2. update comment of function Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- A question about legacy property: I don`t see legacy property is re

[Qemu-devel] [patch v5 12/12] vfio: add 'aer' property to expose aercap

2016-03-23 Thread Cao jin
From: Chen Fan add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++

[Qemu-devel] [patch v5 11/12] vfio: device may stuck in D3 when doing aer recovery

2016-03-23 Thread Cao jin
From: Chen Fan when a physical device aer occurred, the device state probably is not in D0 in a short time, if we recover the device quickly. we may stuck in D3 state when force to change device state to D0. we may need to wait for a short time to inject the error

[Qemu-devel] [patch v5 08/12] vfio: add check aer functionality for hotplug device

2016-03-23 Thread Cao jin
From: Chen Fan when function 0 is hot-added, we can check the vfio device whether support hot bus reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/vfio/pci.c

[Qemu-devel] [patch v5 05/12] vfio: refine function vfio_pci_host_match

2016-03-23 Thread Cao jin
From: Chen Fan Signed-off-by: Chen Fan --- hw/vfio/pci.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 0516d94..5b23a86 100644 --- a/hw/vfio/pci.c +++

[Qemu-devel] [patch v5 06/12] vfio: add check host bus reset is support or not

2016-03-23 Thread Cao jin
From: Chen Fan When assigning a vfio device with AER enabled, we must check whether the device supports a host bus reset (ie. hot reset) as this may be used by the guest OS in order to recover the device from an AER error. QEMU must therefore have the ability to

[Qemu-devel] [patch v5 04/12] vfio: add aer support for vfio device

2016-03-23 Thread Cao jin
From: Chen Fan Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 85

[Qemu-devel] [patch v5 10/12] vfio-pci: pass the aer error to guest

2016-03-23 Thread Cao jin
From: Chen Fan when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, resulting in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and let the

[Qemu-devel] [patch v5 02/12] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2016-03-23 Thread Cao jin
From: Chen Fan squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31

[Qemu-devel] [patch v5 01/12] vfio: extract vfio_get_hot_reset_info as a single function

2016-03-23 Thread Cao jin
From: Chen Fan the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 66 +++ 1

[Qemu-devel] [patch v5 07/12] pci: add a pci_function_is_valid callback to check function if valid

2016-03-23 Thread Cao jin
From: Chen Fan PCI hotplug requires that function 0 is added last to close the slot. Since vfio supporting AER, we require that the VM bus contains the same set of devices as the host bus to support AER, we can perform an AER validation test whenever a function 0

[Qemu-devel] [patch v5 09/12] vfio: vote the function 0 to do host bus reset when aer occurred

2016-03-23 Thread Cao jin
From: Chen Fan Due to all devices assigned to VM on the same way as host if enable aer, so we can easily do the hot reset by selecting the function #0 to do the hot reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 14 ++

[Qemu-devel] [patch v5 00/12] vfio-pci: pass the aer error to guest, part2

2016-03-23 Thread Cao jin
From: Chen Fan v4-v5: 1. add back the common function 0 hotplug code in pci core. 2. fix a sporadic device stuck on D3 problem when doing aer recovery. 3. fix patches 5/12 ~ 9/12 as Alex sugguestion. v3-v4: 1. rebase patchset to fit latest master

[Qemu-devel] [patch v5 03/12] vfio: add pcie extended capability support

2016-03-23 Thread Cao jin
From: Chen Fan For vfio pcie device, we could expose the extended capability on PCIE bus. due to add a new pcie capability at the tail of the chain, in order to avoid config space overwritten, we introduce a copy config for parsing extended caps. and rebuild the

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-23 Thread Cao jin
On 03/23/2016 04:12 PM, Markus Armbruster wrote: Cao jin <caoj.f...@cn.fujitsu.com> writes: Really appreciate your review, I just finished reading all the comments and discussion. Seems pci_add_capability2()(commit cd9aa33e introduced) doesn`t follow the new error reporting rule(

Re: [Qemu-devel] [PATCH v2 2/2] hw/pci-bridge: Convert pxb initialization functions to Error

2016-03-23 Thread Cao jin
CE_CLASS(klass); -k->init = pxb_pcie_dev_initfn; +k->realize = pxb_pcie_dev_realize; k->exit = pxb_dev_exitfn; k->vendor_id = PCI_VENDOR_ID_REDHAT; k->device_id = PCI_DEVICE_ID_REDHAT_PXB_PCIE; -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-22 Thread Cao jin
On 03/02/2016 05:13 PM, Markus Armbruster wrote: This got lost over the Christmas break, sorry. Cc'ing Marcel for additional PCI expertise. Cao jin <caoj.f...@cn.fujitsu.com> writes: msi_init() is a supporting function in PCI device initialization, in order to convert .init() to .r

[Qemu-devel] [PATCH v4 07/10] vfio: add check aer functionality for hotplug device

2016-03-21 Thread Cao jin
From: Chen Fan because we make the vfio functions are combined in the same way as on the host for aer, so we can do the aer check when the function 0 was hotplugged. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 45

[Qemu-devel] [PATCH v4 10/10] vfio: add 'aer' property to expose aercap

2016-03-21 Thread Cao jin
From: Chen Fan add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++

[Qemu-devel] [PATCH v4 09/10] vfio-pci: pass the aer error to guest

2016-03-21 Thread Cao jin
From: Chen Fan when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, resulting in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and let the

[Qemu-devel] [PATCH v4 08/10] vfio: vote the function 0 to do host bus reset when aer occurred

2016-03-21 Thread Cao jin
From: Chen Fan Due to all devices assigned to VM on the same way as host if enable aer, so we can easily do the hot reset by selecting the function #0 to do the hot reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 50

[Qemu-devel] [PATCH v4 05/10] vfio: extending function vfio_pci_host_match to support mask func number

2016-03-21 Thread Cao jin
From: Chen Fan Signed-off-by: Chen Fan --- hw/vfio/pci.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 0516d94..8842b7f 100644 ---

[Qemu-devel] [PATCH v4 02/10] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2016-03-21 Thread Cao jin
From: Chen Fan squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31

[Qemu-devel] [PATCH v4 04/10] vfio: add aer support for vfio device

2016-03-21 Thread Cao jin
From: Chen Fan Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 85

[Qemu-devel] [PATCH v4 06/10] vfio: add check host bus reset is support or not

2016-03-21 Thread Cao jin
From: Chen Fan when boot up a VM that assigning vfio devices with aer enabled, we must check the vfio device whether support host bus reset. because when one error occur. OS driver always recover the device by do a bus reset, in order to recover the vfio device,

[Qemu-devel] [PATCH v4 00/10] vfio-pci: pass the aer error to guest, part2

2016-03-21 Thread Cao jin
From: Chen Fan v3-v4: 1. rebase patchset to fit latest master branch. 2. modifying patches 5/10 ~ 8/10 as Alex sugguestion(Thanks). v2-v3: 1. fix patch 4/9, 5/9 as Alex sugguestion. 2. patches 5/9 ~ 8/9 are made to force limiting that all vfio functions

[Qemu-devel] [PATCH v4 03/10] vfio: add pcie extended capability support

2016-03-21 Thread Cao jin
From: Chen Fan For vfio pcie device, we could expose the extended capability on PCIE bus. due to add a new pcie capability at the tail of the chain, in order to avoid config space overwritten, we introduce a copy config for parsing extended caps. and rebuild the

[Qemu-devel] [PATCH v4 01/10] vfio: extract vfio_get_hot_reset_info as a single function

2016-03-21 Thread Cao jin
From: Chen Fan the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 66 +++ 1

Re: [Qemu-devel] [PATCH V4] hw/pxb: add chassis_nr property

2016-03-18 Thread Cao jin
hi On 03/15/2016 07:44 PM, Marcel Apfelbaum wrote: On 03/15/2016 10:00 AM, Cao jin wrote: And I have another personal question: In qemu design, it seems every pci bridge reside in a separate chassis, what`s benefit? why don`t put them all in the main chassis? Please have a look on pci

Re: [Qemu-devel] [PATCH V4] hw/pxb: add chassis_nr property

2016-03-15 Thread Cao jin
DE_UNASSIGNED), +DEFINE_PROP_END_OF_LIST(), +}; And I have another personal question: In qemu design, it seems every pci bridge reside in a separate chassis, what`s benefit? why don`t put them all in the main chassis? -- Yours Sincerely, Cao jin

[Qemu-devel] [patch v3 7/9] vfio: vote the function 0 to do host bus reset when aer occurred

2016-03-14 Thread Cao jin
From: Chen Fan Signed-off-by: Chen Fan --- hw/pci/pci.c | 2 ++ hw/vfio/pci.c| 14 ++ hw/vfio/pci.h| 1 + include/hw/pci/pci_bus.h | 2 ++ 4 files changed, 19 insertions(+) diff

[Qemu-devel] [patch v3 6/9] vfio: add check aer functionality for hotplug device

2016-03-14 Thread Cao jin
From: Chen Fan because we make the vfio functions are combined in the same way as on the host for aer, so we can do the aer check when the function 0 was hotplugged. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 50

[Qemu-devel] [patch v3 5/9] vfio: add check host bus reset is support or not

2016-03-14 Thread Cao jin
From: Chen Fan when boot up a VM that assigning vfio devices with aer enabled, we must check the vfio device whether support host bus reset. because when one error occur. OS driver always recover the device by do a bus reset, in order to recover the vfio device,

<    1   2   3   4   5   6   7   8   9   >