Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-11-14 Thread Tian, Kevin
[Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI > when using posted interrupts > > On Fri, Nov 08, 2019 at 02:25:05AM +, Tian, Kevin wrote: > > > From: Roger Pau Monné [mailto:roger@citrix.com] > > > Sent: Monday, November 4, 2019 5:47 PM > > &

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-11-08 Thread Roger Pau Monné
On Fri, Nov 08, 2019 at 02:25:05AM +, Tian, Kevin wrote: > > From: Roger Pau Monné [mailto:roger@citrix.com] > > Sent: Monday, November 4, 2019 5:47 PM > > > > On Sat, Nov 02, 2019 at 07:48:06AM +, Tian, Kevin wrote: > > > > From: Roger Pau Monné [mailto:roger@citrix.com] > > > >

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-11-07 Thread Tian, Kevin
> From: Roger Pau Monné [mailto:roger@citrix.com] > Sent: Monday, November 4, 2019 5:47 PM > > On Sat, Nov 02, 2019 at 07:48:06AM +, Tian, Kevin wrote: > > > From: Roger Pau Monné [mailto:roger@citrix.com] > > > Sent: Thursday, October 31, 2019 11:23 PM > > > > > > On Thu, Oct 31,

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-11-04 Thread Roger Pau Monné
On Sat, Nov 02, 2019 at 07:48:06AM +, Tian, Kevin wrote: > > From: Roger Pau Monné [mailto:roger@citrix.com] > > Sent: Thursday, October 31, 2019 11:23 PM > > > > On Thu, Oct 31, 2019 at 07:52:23AM -0700, Joe Jin wrote: > > > On 10/31/19 1:01 AM, Jan Beulich wrote: > > > > On 30.10.2019

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-11-02 Thread Tian, Kevin
> From: Roger Pau Monné [mailto:roger@citrix.com] > Sent: Thursday, October 31, 2019 11:23 PM > > On Thu, Oct 31, 2019 at 07:52:23AM -0700, Joe Jin wrote: > > On 10/31/19 1:01 AM, Jan Beulich wrote: > > > On 30.10.2019 19:01, Joe Jin wrote: > > >> On 10/30/19 10:23 AM, Roger Pau Monné wrote:

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-31 Thread Roger Pau Monné
On Thu, Oct 31, 2019 at 07:52:23AM -0700, Joe Jin wrote: > On 10/31/19 1:01 AM, Jan Beulich wrote: > > On 30.10.2019 19:01, Joe Jin wrote: > >> On 10/30/19 10:23 AM, Roger Pau Monné wrote: > >>> On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: > On 10/30/19 1:24 AM, Roger Pau Monné

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-31 Thread Joe Jin
On 10/31/19 7:56 AM, Jan Beulich wrote: > On 31.10.2019 15:52, Joe Jin wrote: >> On 10/31/19 1:01 AM, Jan Beulich wrote: >>> On 30.10.2019 19:01, Joe Jin wrote: On 10/30/19 10:23 AM, Roger Pau Monné wrote: > On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: >> On 10/30/19 1:24

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-31 Thread Jan Beulich
On 31.10.2019 15:52, Joe Jin wrote: > On 10/31/19 1:01 AM, Jan Beulich wrote: >> On 30.10.2019 19:01, Joe Jin wrote: >>> On 10/30/19 10:23 AM, Roger Pau Monné wrote: On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: > On 10/30/19 1:24 AM, Roger Pau Monné wrote: >> Can you try

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-31 Thread Joe Jin
On 10/31/19 1:01 AM, Jan Beulich wrote: > On 30.10.2019 19:01, Joe Jin wrote: >> On 10/30/19 10:23 AM, Roger Pau Monné wrote: >>> On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: On 10/30/19 1:24 AM, Roger Pau Monné wrote: > Can you try to add the following debug patch on top of

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-31 Thread Jan Beulich
On 30.10.2019 19:01, Joe Jin wrote: > On 10/30/19 10:23 AM, Roger Pau Monné wrote: >> On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: >>> On 10/30/19 1:24 AM, Roger Pau Monné wrote: Can you try to add the following debug patch on top of the existing one and report the output

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-30 Thread Joe Jin
On 10/30/19 10:23 AM, Roger Pau Monné wrote: > On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: >> On 10/30/19 1:24 AM, Roger Pau Monné wrote: >>> Can you try to add the following debug patch on top of the existing >>> one and report the output that you get on the Xen console? >> >>

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2019 at 09:38:16AM -0700, Joe Jin wrote: > On 10/30/19 1:24 AM, Roger Pau Monné wrote: > > Can you try to add the following debug patch on top of the existing > > one and report the output that you get on the Xen console? > > Applied debug patch and run the test again, not of any

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-30 Thread Joe Jin
On 10/30/19 1:24 AM, Roger Pau Monné wrote: > Can you try to add the following debug patch on top of the existing > one and report the output that you get on the Xen console? Applied debug patch and run the test again, not of any log printed, attached Xen log on serial console, seems

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-30 Thread Roger Pau Monné
On Tue, Oct 29, 2019 at 05:20:18PM -0700, Joe Jin wrote: > Hi Roger & Jan, > > I got my test env back, and back the patch to stable-4.12, run same > test, I still seen original issue, guest kernel printed error: > > kernel:do_IRQ: 20.114 No irq handler for vector (irq -1) > > After that, pass

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-29 Thread Joe Jin
Hi Roger & Jan, I got my test env back, and back the patch to stable-4.12, run same test, I still seen original issue, guest kernel printed error: kernel:do_IRQ: 20.114 No irq handler for vector (irq -1) After that, pass through infiniband VF stopped to work. My patch as below, please check:

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-14 Thread Joe Jin
On 10/9/19 6:35 AM, Jan Beulich wrote: > On 09.10.2019 14:52, Roger Pau Monne wrote: >> When using posted interrupts and the guest migrates MSI from vCPUs Xen >> needs to flush any pending PIRR vectors on the previous vCPU, or else >> those vectors could get wrongly injected at a later point when

Re: [Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-09 Thread Jan Beulich
On 09.10.2019 14:52, Roger Pau Monne wrote: > When using posted interrupts and the guest migrates MSI from vCPUs Xen > needs to flush any pending PIRR vectors on the previous vCPU, or else > those vectors could get wrongly injected at a later point when the MSI > fields are already updated. > >

[Xen-devel] [PATCH v2] x86/passthrough: fix migration of MSI when using posted interrupts

2019-10-09 Thread Roger Pau Monne
When using posted interrupts and the guest migrates MSI from vCPUs Xen needs to flush any pending PIRR vectors on the previous vCPU, or else those vectors could get wrongly injected at a later point when the MSI fields are already updated. Rename sync_pir_to_irr to vlapic_sync_pir_to_irr and