Re: [Qemu-devel] [PATCH v10 0/8] the reset of msix_init series

2017-04-28 Thread Cao jin
Hi Michael, I rebased this patchset against upstream, find no conflicts. Hope it is time to merge it. On 03/06/2017 04:10 PM, Cao jin wrote: > Michael, > Is this series ok for 2.9? > -- Sincerely, Cao jin

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-06 Thread Cao jin
t;> or there's little point to doing it at all. Thanks, >> >> Alex > > Some things can be tested within a VM. What would you > say would be sufficient on a VM and what has to be > tested on bare metal? > Does the "bare metal" here mean something like XenServer? -- Sincerely, Cao jin

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-06 Thread Cao jin
On 04/06/2017 03:38 AM, Alex Williamson wrote: > On Wed, 5 Apr 2017 16:54:33 +0800 > Cao jin wrote: > >> Sorry for late. Distracted by other problem for a while. >> >> On 03/31/2017 02:16 AM, Alex Williamson wrote: >>>

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-06 Thread Cao jin
On 04/06/2017 05:56 AM, Michael S. Tsirkin wrote: > On Wed, Apr 05, 2017 at 04:54:33PM +0800, Cao jin wrote: >> Apparently, I don't have experience to induce non-fatal error, device >> error is more of a chance related with the environment(temperature, >> humidity, etc)

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-05 Thread Cao jin
ting sheet? I don't think it's too much to ask for a >>> commit log to include evidence or discussion about how a feature is >>> actually a benefit to implement. >> >> Seems rather self evident but ok. So something like >> >> With this patch,

Re: [Qemu-devel] [PATCH v3 2/3] vfio pci: new function to init AER capability

2017-03-28 Thread Cao jin
On 03/25/2017 06:12 AM, Alex Williamson wrote: > On Thu, 23 Mar 2017 17:09:22 +0800 > Cao jin wrote: > > This is not a sufficiently trivial patch to leave the commit log empty. > >> Signed-off-by: Dou Liyang >> Signed-off-by: Cao jin >> --- >> +

Re: [Qemu-devel] [PATCH v3 3/3] vfio-pci: process non fatal error of AER

2017-03-28 Thread Cao jin
On 03/25/2017 06:12 AM, Alex Williamson wrote: > On Thu, 23 Mar 2017 17:09:23 +0800 > Cao jin wrote: > >> Make use of the non fatal error eventfd that the kernel module provide >> to process the AER non fatal error. Fatal error still goes into the >> legacy w

Re: [Qemu-devel] [PATCH v3 1/3] pcie aer: verify if AER functionality is available

2017-03-28 Thread Cao jin
On 03/25/2017 06:12 AM, Alex Williamson wrote: > On Thu, 23 Mar 2017 17:09:21 +0800 > Cao jin wrote: > >> For devices which support AER function, verify it can work or not in the >> system: >> 1. AER capable device is a PCIe device, it can't be plugged into PC

Re: [Qemu-devel] [PATCH v3 0/3] vfio-pci: support recovery of AER non fatal error

2017-03-28 Thread Cao jin
On 03/25/2017 06:12 AM, Alex Williamson wrote: > On Thu, 23 Mar 2017 17:09:20 +0800 > Cao jin wrote: > >> v3 changelog: >> 1. Address all comments from MST in patch 3, include remove the flag >>pci_aer_non_fatal & passive_reset, also the boilerplate code.

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-03-28 Thread Cao jin
On 03/25/2017 06:12 AM, Alex Williamson wrote: > On Thu, 23 Mar 2017 17:07:31 +0800 > Cao jin wrote: > > A more appropriate patch subject would be: > > vfio-pci: Report correctable errors and slot reset events to user > Correctable? It is confusing to me. Correctabl

[Qemu-devel] [PATCH v3 2/3] vfio pci: new function to init AER capability

2017-03-23 Thread Cao jin
Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 41 - hw/vfio/pci.h | 1 + 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 332f41d..3d0d005 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio

[Qemu-devel] [PATCH v3 0/3] vfio-pci: support recovery of AER non fatal error

2017-03-23 Thread Cao jin
v3 changelog: 1. Address all comments from MST in patch 3, include remove the flag pci_aer_non_fatal & passive_reset, also the boilerplate code. The corresponding kernel patch is v6. Test: Test with func1 passthroughed while func0 doesn't have user. Cao jin (3): pcie aer: veri

[Qemu-devel] [PATCH v3 3/3] vfio-pci: process non fatal error of AER

2017-03-23 Thread Cao jin
will trigger an interrupt to signal guest, then guest driver will do the recovery. Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 202 + hw/vfio/pci.h | 2 + linux-headers/linux/vfio.h | 2 + 3 files

[Qemu-devel] [PATCH v3 1/3] pcie aer: verify if AER functionality is available

2017-03-23 Thread Cao jin
For devices which support AER function, verify it can work or not in the system: 1. AER capable device is a PCIe device, it can't be plugged into PCI bus 2. If root port doesn't support AER, then there is no need to expose the AER capability Signed-off-by: Dou Liyang Signed-off-b

[Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-03-23 Thread Cao jin
happen if a slot reset is requested by a driver (other than vfio) bound to another device function in the same slot. This will cause our device to lose its state so report this event to userspace. Signed-off-by: Michael S. Tsirkin Signed-off-by: Cao jin --- v6 changelog: Address all the co

Re: [Qemu-devel] [PATCH v2 3/3] vfio-pci: process non fatal error of AER

2017-03-22 Thread Cao jin
On 03/22/2017 09:27 PM, Michael S. Tsirkin wrote: > On Wed, Mar 22, 2017 at 06:36:52PM +0800, Cao jin wrote: >> Make use of the non fatal error eventfd that the kernel module provide >> to process the AER non fatal error. Fatal error still goes into the >> legacy way whi

Re: [Qemu-devel] [PATCH v5] vfio error recovery: kernel support

2017-03-22 Thread Cao jin
On 03/22/2017 09:10 PM, Michael S. Tsirkin wrote: > Minor comments on commit log below. > > On Wed, Mar 22, 2017 at 06:34:23PM +0800, Cao jin wrote: >> From: "Michael S. Tsirkin" >> > >> Signed-off-by: Michael S. Tsirkin >> Signed-off-by:

[Qemu-devel] [PATCH v2 2/3] vfio pci: new function to init AER capability

2017-03-22 Thread Cao jin
Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 41 - hw/vfio/pci.h | 1 + 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 332f41d..3d0d005 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio

[Qemu-devel] [PATCH v2 1/3] pcie aer: verify if AER functionality is available

2017-03-22 Thread Cao jin
For devices which support AER function, verify it can work or not in the system: 1. AER capable device is a PCIe device, it can't be plugged into PCI bus 2. If root port doesn't support AER, then there is no need to expose the AER capability Signed-off-by: Dou Liyang Signed-off-b

[Qemu-devel] [PATCH v2 3/3] vfio-pci: process non fatal error of AER

2017-03-22 Thread Cao jin
will trigger an interrupt to signal guest, then guest driver will do the recovery. Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 247 + hw/vfio/pci.h | 4 + linux-headers/linux/vfio.h | 2 + 3 files

[Qemu-devel] [PATCH v2 0/3] vfio-pci: support recovery of AER non fatal error

2017-03-22 Thread Cao jin
v2 changelog: Add the boilerplate code for new eventfd in patch 3. The corresponding kernel patch is v5. Test: Test with func1 passthroughed while func0 doesn't have user. Cao jin (3): pcie aer: verify if AER functionality is available vfio pci: new function to init AER capability vfi

[Qemu-devel] [PATCH v5] vfio error recovery: kernel support

2017-03-22 Thread Cao jin
ling user twice via the same legacy error trigger. For the original design and discussion, refer: https://www.spinics.net/lists/linux-virtualization/msg29843.html Signed-off-by: Michael S. Tsirkin Signed-off-by: Cao jin --- v5 changelog: 1. Add another new eventfd passive_reset_trigger &

Re: [Qemu-devel] [PATCH] vfio pci: kernel support of error recovery only for non fatal error

2017-03-21 Thread Cao jin
On 03/20/2017 10:30 PM, Alex Williamson wrote: > On Mon, 20 Mar 2017 20:50:39 +0800 > Cao jin wrote: > >> Sorry for late. >> >> On 03/14/2017 06:06 AM, Alex Williamson wrote: >>> On Mon, 27 Feb 2017 15:28:43 +0800 >>> Cao jin wrote: &

Re: [Qemu-devel] [PATCH] vfio pci: kernel support of error recovery only for non fatal error

2017-03-20 Thread Cao jin
Sorry for late. On 03/14/2017 06:06 AM, Alex Williamson wrote: > On Mon, 27 Feb 2017 15:28:43 +0800 > Cao jin wrote: > >> 0. What happens now (PCIE AER only) >>Fatal errors cause a link reset. >>Non fatal errors don't. >>All errors stop

Re: [Qemu-devel] [PATCH 0/3] vfio-pci: support recovery of AER non fatal error

2017-03-07 Thread Cao jin
ping On 02/27/2017 03:30 PM, Cao jin wrote: > This is nearly new design of the feature, so re-number the verion from 0. > > About The test: > Hardware problem(unsteady) still occurs like before. The test server is in > another country spot A, and my contact of the country located

[Qemu-devel] [PATCH v10] msix: rename and create a wrapper

2017-03-07 Thread Cao jin
Rename msix_init to msix_validate_and_init which doesn't assert; New a wrapper msix_init to assert programming error. CC: Alex Williamson CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Signed-off-by: Cao jin --- revert the modification in msix_init_exclusive_bar() h

Re: [Qemu-devel] [PATCH v10 1/8] msix: Rename and create a wrapper

2017-03-07 Thread Cao jin
On 03/07/2017 03:44 PM, Markus Armbruster wrote: > Uh, two weeks since your posted this already. I apologize for taking so > long to review. > > Cao jin writes: > >> Rename msix_init to msix_validate_and_init, and use it from vfio which >> might get a reasona

Re: [Qemu-devel] [PATCH v10 0/8] the reset of msix_init series

2017-03-06 Thread Cao jin
Michael, Is this series ok for 2.9? -- Sincerely, Cao jin On 02/25/2017 04:26 PM, Cao jin wrote: > v10 changelog: > 1. drop the unliked patch, introduce a new patch 1 according to mst's > comments. > 2. base on the new patch, remove the following statements > >

[Qemu-devel] [PATCH v4] vfio error recovery: kernel support

2017-02-27 Thread Cao jin
rspace runs anyway, so we are not making things much worse. Suggestion 2: detect this and invoke err_trigger to stop VM. Patch below implements Suggestion 2. Signed-off-by: Cao jin --- Inherit from MST's v3. v4 changelog: 1. Tiny modification on commit message. 2. Remove unrelated

Re: [Qemu-devel] [PATCH] vfio pci: kernel support of error recovery only for non fatal error

2017-02-27 Thread Cao jin
On 02/28/2017 12:16 AM, Michael S. Tsirkin wrote: > On Mon, Feb 27, 2017 at 03:28:43PM +0800, Cao jin wrote: >> Subject: Re: [PATCH] vfio pci: kernel support of error recovery only for non >> fatal error > > Don't make the subject so long. This is why I had >

[Qemu-devel] [PATCH 2/3] vfio pci: new function to init AER capability

2017-02-26 Thread Cao jin
Enable AER opportunistically. Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 41 - hw/vfio/pci.h | 1 + 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 332f41d..3d0d005 100644

[Qemu-devel] [PATCH 3/3] vfio-pci: process non fatal error of AER

2017-02-26 Thread Cao jin
will trigger an interrupt to signal guest, then, the guest driver will do the recovery. Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 139 + hw/vfio/pci.h | 2 + linux-headers/linux/vfio.h | 1 + 3

[Qemu-devel] [PATCH 1/3] pcie aer: verify if AER functionality is available

2017-02-26 Thread Cao jin
For devices which support AER, verify it can work or not in the system: 1. AER capable device is a PCIe device, it can't be plugged into PCI bus 2. If root port doesn't support AER, then there is no need to expose the AER capability Signed-off-by: Dou Liyang Signed-off-by: Cao ji

[Qemu-devel] [PATCH 0/3] vfio-pci: support recovery of AER non fatal error

2017-02-26 Thread Cao jin
host link reset. The test result shows: non fatal error recovery is good; fatal error recovery has same result with what Alex find before(guest kernel crash), because guest device driver's error_detected() access the MMIO registers, get all F's. Cao jin (3): pcie aer: verif

[Qemu-devel] [PATCH] vfio pci: kernel support of error recovery only for non fatal error

2017-02-26 Thread Cao jin
e not making things much worse. Suggestion 2: detect this and invoke err_trigger to stop VM. Patch below implements Suggestion 2. Suggested-by: Michael S. Tsirkin Signed-off-by: Cao jin --- drivers/vfio/pci/vfio_pci.c | 38 +++-- drivers/vf

[Qemu-devel] [PATCH v10 7/8] msi_init: convert assert to return -errno

2017-02-25 Thread Cao jin
Reviewed-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/pci/msi.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci/msi.c b/hw/pci/msi.c index a87b2278a373..af3efbe525ce 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -201,9

[Qemu-devel] [PATCH v10 8/8] megasas: remove unnecessary megasas_use_msix()

2017-02-25 Thread Cao jin
Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Hannes Reinecke Signed-off-by: Cao jin --- hw/scsi/megasas.c | 19

[Qemu-devel] [PATCH v10 0/8] the reset of msix_init series

2017-02-25 Thread Cao jin
CC: Alex Williamson CC: Markus Armbruster CC: Marcel Apfelbaum Cao jin (8): msix: Rename and create a wrapper megasas: change behaviour of msix switch hcd-xhci: change behaviour of msix switch megasas: undo the overwrites of msi user configuration vmxnet3: fix reference leak issue

[Qemu-devel] [PATCH v10 6/8] vmxnet3: remove unnecessary internal msix flag

2017-02-25 Thread Cao jin
Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/net/vmxnet3.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 81ab131e4a47..a3ed77f04b7c 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v10 4/8] megasas: undo the overwrites of msi user configuration

2017-02-25 Thread Cao jin
Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Reviewed-by: Hannes Reinecke Signed-off-by: Cao

[Qemu-devel] [PATCH v10 1/8] msix: Rename and create a wrapper

2017-02-25 Thread Cao jin
. Tsirkin Signed-off-by: Cao jin --- hw/pci/msix.c | 30 +- hw/vfio/pci.c | 12 ++-- include/hw/pci/msix.h | 5 + 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index bb54e8b0ac37..2b7541ab2c8d

[Qemu-devel] [PATCH v10 2/8] megasas: change behaviour of msix switch

2017-02-25 Thread Cao jin
: Markus Armbruster Acked-by: Marcel Apfelbaum Reviewed-by: Hannes Reinecke Signed-off-by: Cao jin --- hw/scsi/megasas.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index e3d59b7c83c7..eab480da354e 100644 --- a

[Qemu-devel] [PATCH v10 3/8] hcd-xhci: change behaviour of msix switch

2017-02-25 Thread Cao jin
Signed-off-by: Cao jin --- hw/usb/hcd-xhci.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 28dd2f2c9a97..4551a3758b3e 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3554,12 +3554,14 @@ static

[Qemu-devel] [PATCH v10 5/8] vmxnet3: fix reference leak issue

2017-02-25 Thread Cao jin
Armbruster Reviewed-by: Dmitry Fleytman Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/net/vmxnet3.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index e13a798b3b00..81ab131e4a47 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c

Re: [Qemu-devel] seek help for AER

2017-02-21 Thread Cao jin
On 02/22/2017 12:07 AM, Alex Williamson wrote: > On Tue, 21 Feb 2017 18:21:53 +0800 > Cao jin wrote: > >> Hi, >> >> First, sorry for such a long time delay on the AER job. I was on 12 days >> holiday, and start to work on the patch 2 weeks ago, because I use a

[Qemu-devel] seek help for AER

2017-02-21 Thread Cao jin
Network Connection | \-00.1 Intel Corporation 82576 Gigabit Network Connection -- Sincerely, Cao jin

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Cao jin
rchive/html/qemu-devel/2017-01/msg01418.html -- Sincerely, Cao jin > Signed-off-by: Peter Xu > --- > hw/pci/pcie.c | 15 --- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c > index cbd4bb4..e0e6f6a 100644 > --

Re: [Qemu-devel] [PATCH RFC] vfio error recovery: kernel support

2017-01-24 Thread Cao jin
On 01/21/2017 01:01 AM, Michael S. Tsirkin wrote: > On Fri, Jan 20, 2017 at 06:13:22PM +0800, Cao jin wrote: >> >> >> On 01/20/2017 04:16 AM, Michael S. Tsirkin wrote: >>> This is a design and an initial patch for kernel side for AER >>> support in VFIO

Re: [Qemu-devel] [PATCH RFC] vfio error recovery: kernel support

2017-01-20 Thread Cao jin
t; > Aside: we currently return PCI_ERS_RESULT_DISCONNECT when device > is not attached. This seems bogus, likely based on the confusing name. > We probably should return PCI_ERS_RESULT_CAN_RECOVER. > > The following patch does not change that. > > Signed-off-by: Michael S. Tsirkin > > -

Re: [Qemu-devel] [PATCH RFC v11 3/4] vfio-pci: pass the aer error to guest

2017-01-19 Thread Cao jin
On 01/19/2017 06:31 AM, Alex Williamson wrote: > On Sat, 31 Dec 2016 17:13:07 +0800 > Cao jin wrote: > >> From: Chen Fan >> >> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c >> index 76a8ac3..9861f72 100644 >> --- a/hw/vfio/pci.c >> +++ b/hw/vfio

Re: [Qemu-devel] [PATCH RFC v11 4/4] vfio: add 'aer' property to expose aercap

2017-01-19 Thread Cao jin
On 01/19/2017 06:36 AM, Alex Williamson wrote: > On Sat, 31 Dec 2016 17:13:08 +0800 > Cao jin wrote: > >> From: Chen Fan >> >> Add 'aer' property, let user choose whether expose the aer capability >> or not. > > But that's not what it do

Re: [Qemu-devel] [PATCH RFC v11 2/4] vfio: new function to init aer cap for vfio device

2017-01-19 Thread Cao jin
On 01/19/2017 06:09 AM, Alex Williamson wrote: > On Sat, 31 Dec 2016 17:13:06 +0800 > Cao jin wrote: > >> From: Chen Fan >> >> Introduce new function to initilize AER capability registers >> for vfio-pci device. >> >> Signed-off-by: Chen Fan &

Re: [Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-19 Thread Cao jin
On 01/18/2017 11:21 PM, Michael S. Tsirkin wrote: > On Wed, Jan 18, 2017 at 02:29:19PM +0800, Cao jin wrote: >> >> >> On 01/18/2017 12:01 AM, Michael S. Tsirkin wrote: >>> On Tue, Jan 17, 2017 at 02:50:38PM +0800, Cao jin wrote: >>>> forget to cc mainta

Re: [Qemu-devel] [PATCH RFC v11 0/4] vfio-pci: pass non-fatal error to guest

2017-01-18 Thread Cao jin
menon exists even without this patchset -- Sincerely, Cao jin

Re: [Qemu-devel] [PATCH RFC v11 0/4] vfio-pci: pass non-fatal error to guest

2017-01-18 Thread Cao jin
On 01/19/2017 05:43 AM, Alex Williamson wrote: > On Sat, 31 Dec 2016 17:13:04 +0800 > Cao jin wrote: > >> As previous discussion suggest, we could take a step back to handle non-fatal >> error first, this will make this patchset much more thinner, because we could >>

Re: [Qemu-devel] [PATCH v2] vfio/pci: Support error recovery

2017-01-18 Thread Cao jin
On 01/19/2017 05:32 AM, Alex Williamson wrote: > On Tue, 10 Jan 2017 17:11:01 +0200 > "Michael S. Tsirkin" wrote: > >> On Tue, Jan 10, 2017 at 07:46:17PM +0800, Cao jin wrote: >>> >>> >>> On 01/10/2017 07:04 AM, Michael S. Tsirkin wrote: &g

Re: [Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-17 Thread Cao jin
On 01/18/2017 12:01 AM, Michael S. Tsirkin wrote: > On Tue, Jan 17, 2017 at 02:50:38PM +0800, Cao jin wrote: >> forget to cc maintainers in this new patch >> >> On 01/17/2017 02:18 PM, Cao jin wrote: >>> Doesn't do it for megasas & hcd-xhci, later patch

Re: [Qemu-devel] [PATCH v2] vfio/pci: Support error recovery

2017-01-17 Thread Cao jin
Alex, Do you have any comments on this version & and the qemu parts? -- Sincerely, Cao jin On 12/31/2016 05:15 PM, Cao jin wrote: > Support serious device error recovery > > Signed-off-by: Cao jin > --- > drivers/vfio/pci/vfio

Re: [Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-16 Thread Cao jin
forget to cc maintainers in this new patch On 01/17/2017 02:18 PM, Cao jin wrote: > Doesn't do it for megasas & hcd-xhci, later patches will fix them. > > Signed-off-by: Cao jin > --- > hw/net/e1000e.c| 4 > hw/net/rocker/rocker.c | 5 + >

[Qemu-devel] [PATCH v9 07/11] megasas: undo the overwrites of msi user configuration

2017-01-16 Thread Cao jin
Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/scsi/megasas.c

[Qemu-devel] [PATCH v9 06/11] hcd-xhci: change behaviour of msix switch

2017-01-16 Thread Cao jin
Signed-off-by: Cao jin --- hw/usb/hcd-xhci.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index fe64dd8525c7..aaca57cb5f1f 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3636,12 +3636,14

[Qemu-devel] [PATCH v9 09/11] vmxnet3: remove unnecessary internal msix flag

2017-01-16 Thread Cao jin
Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/net/vmxnet3.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 45e125e92c8a..af39965c8cc2 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v9 08/11] vmxnet3: fix reference leak issue

2017-01-16 Thread Cao jin
Armbruster Reviewed-by: Dmitry Fleytman Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/net/vmxnet3.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index a433cc017cb1..45e125e92c8a 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v9 05/11] megasas: change behaviour of msix switch

2017-01-16 Thread Cao jin
: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/scsi/megasas.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 095dba8b36de..14d6e0c6d565 100644 --- a/hw/scsi/megasas.c +++ b/hw

[Qemu-devel] [PATCH v9 10/11] msi_init: convert assert to return -errno

2017-01-16 Thread Cao jin
Reviewed-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/pci/msi.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci/msi.c b/hw/pci/msi.c index a87b2278a373..af3efbe525ce 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -201,9

[Qemu-devel] [PATCH v9 03/11] pci: Convert msix_init() to Error and fix callers

2017-01-16 Thread Cao jin
Williamson CC: Markus Armbruster CC: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/block/nvme.c| 2 +- hw/misc/ivshmem.c | 8 hw/net/e1000e.c| 2 +- hw/net/rocker/rocker.c | 4 +++- hw/net/vmxnet3.c | 2 +- hw/pci/msix.

[Qemu-devel] [PATCH v9 11/11] megasas: remove unnecessary megasas_use_msix()

2017-01-16 Thread Cao jin
Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Hannes Reinecke Signed-off-by: Cao jin --- hw/scsi/megasas.c | 19

[Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-16 Thread Cao jin
Doesn't do it for megasas & hcd-xhci, later patches will fix them. Signed-off-by: Cao jin --- hw/net/e1000e.c| 4 hw/net/rocker/rocker.c | 5 + hw/net/vmxnet3.c | 6 +- hw/virtio/virtio-pci.c | 13 +++-- 4 files changed, 21 insertions(+), 7

[Qemu-devel] [PATCH v9 02/11] hcd-xhci: check & correct param before using it

2017-01-16 Thread Cao jin
calling it after msi_init(). CC: Gerd Hoffmann CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/usb/hcd-xhci.c | 37 ++--- 1 file changed, 18 inserti

[Qemu-devel] [PATCH v9 00/11] Convert msix_init() to error

2017-01-16 Thread Cao jin
s Armbruster CC: Marcel Apfelbaum Cao jin (11): msix: Follow CODING_STYLE hcd-xhci: check & correct param before using it pci: Convert msix_init() to Error and fix callers msix: check msix_init's return value megasas: change behaviour of msix switch hcd-xhci: change behaviour o

[Qemu-devel] [PATCH v9 01/11] msix: Follow CODING_STYLE

2017-01-16 Thread Cao jin
CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 0ec1cb14fc60

Re: [Qemu-devel] [PATCH v8 00/10] Convert msix_init() to error

2017-01-13 Thread Cao jin
On 01/13/2017 04:22 PM, Markus Armbruster wrote: > Cao jin writes: > >> Only a tiny modification in patch "megasas: remove unnecessary >> megasas_use_msix()" to fix a megasas issue. > > Please have a look at Michael's review in > Message-ID: <

[Qemu-devel] [PATCH v8 07/10] vmxnet3: fix reference leak issue

2017-01-12 Thread Cao jin
Armbruster Reviewed-by: Dmitry Fleytman Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/net/vmxnet3.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index a433cc017cb1..45e125e92c8a 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v8 08/10] vmxnet3: remove unnecessary internal msix flag

2017-01-12 Thread Cao jin
Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/net/vmxnet3.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 45e125e92c8a..af39965c8cc2 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v8 03/10] pci: Convert msix_init() to Error and fix callers to check it

2017-01-12 Thread Cao jin
Hannes Reinecke Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/block/nvme.c| 5 - hw/misc/ivshmem.c | 8 hw/net/e1000e.c| 6 +- hw/net/rocker/rocker.c | 7 ++- hw/net/vmxnet3.c | 8 ++-- hw/pci/msix.

[Qemu-devel] [PATCH v8 10/10] megasas: remove unnecessary megasas_use_msix()

2017-01-12 Thread Cao jin
Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Signed-off-by: Cao jin --- hw/scsi/megasas.c | 19 ++- 1 file changed, 6 insertions(+), 13

[Qemu-devel] [PATCH v8 04/10] megasas: change behaviour of msix switch

2017-01-12 Thread Cao jin
: Markus Armbruster Reviewed-by: Hannes Reinecke Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/scsi/megasas.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index a946424ab234..14d6e0c6d565 100644

[Qemu-devel] [PATCH v8 05/10] hcd-xhci: change behaviour of msix switch

2017-01-12 Thread Cao jin
Signed-off-by: Cao jin --- hw/usb/hcd-xhci.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 153b006ca01b..aaca57cb5f1f 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3636,12 +3636,14

[Qemu-devel] [PATCH v8 06/10] megasas: undo the overwrites of msi user configuration

2017-01-12 Thread Cao jin
Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Hannes Reinecke Acked-by: Marcel Apfelbaum Signed-off-by: Cao

[Qemu-devel] [PATCH v8 09/10] msi_init: convert assert to return -errno

2017-01-12 Thread Cao jin
Reviewed-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/pci/msi.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci/msi.c b/hw/pci/msi.c index a87b2278a373..af3efbe525ce 100644 --- a/hw/pci/msi.c

[Qemu-devel] [PATCH v8 00/10] Convert msix_init() to error

2017-01-12 Thread Cao jin
tap,id=mynet0 -device vmxnet3,netdev=mynet0 --monitor stdio /home/pino/vm/FedoraWorkStatsion23-x86_64.img CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Alex Williamson CC: Markus Armbruster CC: Mar

[Qemu-devel] [PATCH v8 02/10] hcd-xhci: check & correct param before using it

2017-01-12 Thread Cao jin
calling it after msi_init(). CC: Gerd Hoffmann CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/usb/hcd-xhci.c | 37 ++--- 1 file changed, 18 insertions(+), 19

[Qemu-devel] [PATCH v8 01/10] msix: Follow CODING_STYLE

2017-01-12 Thread Cao jin
CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 0ec1cb14fc60

[Qemu-devel] [PATCH] doc/usb2: fix typo

2017-01-11 Thread Cao jin
Signed-off-by: Cao jin --- docs/usb2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usb2.txt b/docs/usb2.txt index c7a445afcd55..b9e75480737c 100644 --- a/docs/usb2.txt +++ b/docs/usb2.txt @@ -19,7 +19,7 @@ the controller so the USB 2.0 bus gets a individual name

Re: [Qemu-devel] [PATCH RFC] migration: set cpu throttle value by workload

2017-01-11 Thread Cao jin
advance. -- Sincerely, Cao jin On 12/29/2016 05:16 PM, Chao Fan wrote: > This RFC PATCH is my demo about the new feature, here is my POC mail: > https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg00646.html > > When migration_bitmap_sync executed, get the time and re

Re: [Qemu-devel] [PATCH v7 00/10] Convert msix_init() to error

2017-01-11 Thread Cao jin
On 01/10/2017 05:45 AM, Michael S. Tsirkin wrote: > On Mon, Nov 14, 2016 at 03:25:30PM +0800, Cao jin wrote: >> v7 changelog: >> 1. fix the segfaut bug in patch 2. So drop the all the R-b of it, >>please take a look, there is detailed description in the patch. >>

Re: [Qemu-devel] [PATCH v2] vfio/pci: Support error recovery

2017-01-10 Thread Cao jin
On 01/10/2017 11:11 PM, Michael S. Tsirkin wrote: > On Tue, Jan 10, 2017 at 07:46:17PM +0800, Cao jin wrote: >> >> >> On 01/10/2017 07:04 AM, Michael S. Tsirkin wrote: >>> On Sat, Dec 31, 2016 at 05:15:36PM +0800, Cao jin wrote: >>>> Support ser

Re: [Qemu-devel] [PATCH v2] vfio/pci: Support error recovery

2017-01-10 Thread Cao jin
On 01/10/2017 07:04 AM, Michael S. Tsirkin wrote: > On Sat, Dec 31, 2016 at 05:15:36PM +0800, Cao jin wrote: >> Support serious device error recovery > > serious? > Sorry for my poor vocabulary if it confuses people. I wanted to express the meaning that: vfio-pci actuall

Re: [Qemu-devel] [PATCH] pcie: remove duplicate assertion

2017-01-10 Thread Cao jin
On 01/10/2017 06:37 AM, Michael S. Tsirkin wrote: > On Fri, Dec 23, 2016 at 10:16:30AM +0800, Cao jin wrote: >> "size >= 8" connote "size > 0" >> >> Signed-off-by: Cao jin > > Isn't the point to check for overflows? > Make sense.

Re: [Qemu-devel] [PATCH v4 2/2] pcie_aer: support configurable AER capa version

2017-01-09 Thread Cao jin
On 01/10/2017 11:27 AM, Michael S. Tsirkin wrote: > On Wed, Dec 21, 2016 at 04:21:31PM +0800, Cao jin wrote: >> From: Dou Liyang >> >> Now, AER capa version is fixed to v2, if assigned device isn't v2, >> then this value will be inconsistent between guest a

[Qemu-devel] [PATCH v2] vfio/pci: Support error recovery

2016-12-31 Thread Cao jin
Support serious device error recovery Signed-off-by: Cao jin --- drivers/vfio/pci/vfio_pci.c | 70 +++-- drivers/vfio/pci/vfio_pci_private.h | 2 ++ 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers

[Qemu-devel] [PATCH RFC v11 4/4] vfio: add 'aer' property to expose aercap

2016-12-31 Thread Cao jin
From: Chen Fan Add 'aer' property, let user choose whether expose the aer capability or not. Should disable aer feature by default, because only non-fatal error is supported now. Signed-off-by: Chen Fan Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 2

[Qemu-devel] [PATCH RFC v11 2/4] vfio: new function to init aer cap for vfio device

2016-12-31 Thread Cao jin
From: Chen Fan Introduce new function to initilize AER capability registers for vfio-pci device. Signed-off-by: Chen Fan Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 87 +++ hw/vfio/pci.h | 3 +++ 2 files

[Qemu-devel] [PATCH RFC v11 3/4] vfio-pci: pass the aer error to guest

2016-12-31 Thread Cao jin
ned-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/vfio/pci.c | 50 ++ 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 76a8ac3..9861f72 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2470,21 +24

[Qemu-devel] [PATCH v11 1/4] pcie_aer: support configurable AER capa version

2016-12-31 Thread Cao jin
From: Dou Liyang Now, AER capa version is fixed to v2, if assigned device is actually v1, this value will be inconsistent between guest and host Signed-off-by: Dou Liyang Signed-off-by: Cao jin --- hw/net/e1000e.c| 3 ++- hw/pci-bridge/ioh3420.c| 2 +- hw/pci

[Qemu-devel] [PATCH RFC v11 0/4] vfio-pci: pass non-fatal error to guest

2016-12-31 Thread Cao jin
As previous discussion suggest, we could take a step back to handle non-fatal error first, this will make this patchset much more thinner, because we could drop all the configuration restriction related patches. FYI: patch 1 has been cherry picked into another series, and wait to be merged first,

Re: [Qemu-devel] [RFC]virtio-blk: add disk-name device property

2016-12-29 Thread Cao jin
As I know, this is not a good way to submit a patch. You need to read the guideline first: http://wiki.qemu.org/Contribute/SubmitAPatch -- Sincerely, Cao jin On 12/30/2016 10:41 AM, Junkang Fu wrote: >>From 74e913fc41ea98d1dde692175f1e3fb6729342aa Mon Sep 17 00:00:00 2001 > From: &qu

[Qemu-devel] [PATCH v2] doc/pcie: correct command line examples

2016-12-28 Thread Cao jin
Nit picking: Multi-function PCI Express Root Ports should mean that 'addr' property is mandatory, and slot is optional because it defaults to 0, and 'chassis' is mandatory for 2nd & 3rd root port because it defaults to 0 too. Bonus: fix a typo(2->3) Signed-off-by: C

Re: [Qemu-devel] [PATCH] doc/pcie: correct command line examples

2016-12-28 Thread Cao jin
On 12/28/2016 11:21 PM, Andrew Jones wrote: > On Wed, Dec 28, 2016 at 03:24:30PM +0200, Marcel Apfelbaum wrote: >> On 12/27/2016 09:40 AM, Cao jin wrote: >>> Nit picking: Multi-function PCI Express Root Ports should mean that >>> 'addr' property is mandator

Re: [Qemu-devel] vfio/pci: guest error recovery proposal

2016-12-27 Thread Cao jin
gh we told user "Please collect any data possible and then kill the guest", I still don't know how to save any possible data. For example, if user is editing document, vm_stop caused by a device fatal error will destroy user's effort. -- Sincerely, Cao jin > > Results: > The adv

  1   2   3   4   5   6   7   8   9   >