Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Alex Williamson
The discussion on this patch seems to have fizzled, with no clear short term solution. Jan gave a Reviewed-by and Michael an Acked-by for this patch. There's work left to do, but I request that we pull in this fix now. Thanks, Alex On Wed, 2012-04-04 at 21:42 -0600, Alex Williamson wrote:

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Avi Kivity
On 04/16/2012 05:03 PM, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. Jan gave a Reviewed-by and Michael an Acked-by for this patch. There's work left to do, but I request that we pull in this fix now. Thanks, I agree (but am

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I think we are in concensus, it's just that there are multiple bugs still left to fix. First, we need to prevent guest from touching command

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Jan Kiszka
On 2012-04-16 17:06, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I think we are in concensus, it's just that there are multiple bugs still left to fix.

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2012 at 05:10:07PM +0200, Jan Kiszka wrote: On 2012-04-16 17:06, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I think we are in

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Jason Baron
On Mon, Apr 16, 2012 at 06:06:40PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I think we are in concensus, it's just that there are multiple bugs

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Jan Kiszka
On 2012-04-16 18:08, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 05:10:07PM +0200, Jan Kiszka wrote: On 2012-04-16 17:06, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2012 at 06:13:03PM +0200, Jan Kiszka wrote: On 2012-04-16 18:08, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 05:10:07PM +0200, Jan Kiszka wrote: On 2012-04-16 17:06, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Jan Kiszka
On 2012-04-16 18:36, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 06:13:03PM +0200, Jan Kiszka wrote: On 2012-04-16 18:08, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 05:10:07PM +0200, Jan Kiszka wrote: On 2012-04-16 17:06, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2012 at 06:38:22PM +0200, Jan Kiszka wrote: On 2012-04-16 18:36, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 06:13:03PM +0200, Jan Kiszka wrote: On 2012-04-16 18:08, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 05:10:07PM +0200, Jan Kiszka wrote: On 2012-04-16

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2012 at 12:12:52PM -0400, Jason Baron wrote: On Mon, Apr 16, 2012 at 06:06:40PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Jan Kiszka
On 2012-04-16 19:12, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 06:38:22PM +0200, Jan Kiszka wrote: On 2012-04-16 18:36, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 06:13:03PM +0200, Jan Kiszka wrote: On 2012-04-16 18:08, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Alex Williamson
On Mon, 2012-04-16 at 18:06 +0300, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I think we are in concensus, it's just that there are multiple bugs still

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2012 at 01:07:56PM -0600, Alex Williamson wrote: On Mon, 2012-04-16 at 18:06 +0300, Michael S. Tsirkin wrote: On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: The discussion on this patch seems to have fizzled, with no clear short term solution. I

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-16 Thread Marcelo Tosatti
On Wed, Apr 04, 2012 at 09:42:32PM -0600, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-10 Thread Alex Williamson
On Mon, 2012-04-09 at 11:35 +0300, Avi Kivity wrote: On 04/08/2012 08:37 PM, Jan Kiszka wrote: The core problem is not the ordering. The problem is that the kernel is susceptible to ordering mistakes of userspace. And that is because the kernel panics on PCI errors of devices that are in

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-09 Thread Avi Kivity
On 04/08/2012 08:37 PM, Jan Kiszka wrote: The core problem is not the ordering. The problem is that the kernel is susceptible to ordering mistakes of userspace. And that is because the kernel panics on PCI errors of devices that are in user hands - a critical kernel bug IMHO. Certainly. But

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/05/2012 06:42 AM, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993 [Hardware Error]: APEI

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 04:14:29PM +0300, Avi Kivity wrote: On 04/05/2012 06:42 AM, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 04:17 PM, Michael S. Tsirkin wrote: Don't we FLR the device, which ought to disable MSI on the real device? AFAIK we call pci_reset, which saves device state, does an FLR and then restores the state. I think this might include msi as well. Then that is wrong as well, no?

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 04:18:29PM +0300, Avi Kivity wrote: On 04/08/2012 04:17 PM, Michael S. Tsirkin wrote: Don't we FLR the device, which ought to disable MSI on the real device? AFAIK we call pci_reset, which saves device state, does an FLR and then restores the state. I think

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 04:21 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:18:29PM +0300, Avi Kivity wrote: On 04/08/2012 04:17 PM, Michael S. Tsirkin wrote: Don't we FLR the device, which ought to disable MSI on the real device? AFAIK we call pci_reset, which saves device

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 04:24:11PM +0300, Avi Kivity wrote: On 04/08/2012 04:21 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:18:29PM +0300, Avi Kivity wrote: On 04/08/2012 04:17 PM, Michael S. Tsirkin wrote: Don't we FLR the device, which ought to disable MSI on the

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 04:30 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:24:11PM +0300, Avi Kivity wrote: On 04/08/2012 04:21 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:18:29PM +0300, Avi Kivity wrote: On 04/08/2012 04:17 PM, Michael S. Tsirkin wrote: Don't

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 04:41:27PM +0300, Avi Kivity wrote: On 04/08/2012 04:30 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:24:11PM +0300, Avi Kivity wrote: On 04/08/2012 04:21 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:18:29PM +0300, Avi Kivity wrote: On

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 04:53 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:41:27PM +0300, Avi Kivity wrote: On 04/08/2012 04:30 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:24:11PM +0300, Avi Kivity wrote: On 04/08/2012 04:21 PM, Michael S. Tsirkin wrote: On Sun, Apr

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 05:01:36PM +0300, Avi Kivity wrote: On 04/08/2012 04:53 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:41:27PM +0300, Avi Kivity wrote: On 04/08/2012 04:30 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:24:11PM +0300, Avi Kivity wrote: On

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 05:42 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 05:01:36PM +0300, Avi Kivity wrote: On 04/08/2012 04:53 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:41:27PM +0300, Avi Kivity wrote: On 04/08/2012 04:30 PM, Michael S. Tsirkin wrote: On Sun, Apr

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 06:26:28PM +0300, Avi Kivity wrote: On 04/08/2012 05:42 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 05:01:36PM +0300, Avi Kivity wrote: On 04/08/2012 04:53 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 04:41:27PM +0300, Avi Kivity wrote: On

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 06:46 PM, Michael S. Tsirkin wrote: I'm thinking about this flow: FLR the device for each emulated register read it from the hardware if different from emulated register: update the internal model (for example, disabling MSI in

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 06:50:27PM +0300, Avi Kivity wrote: On 04/08/2012 06:46 PM, Michael S. Tsirkin wrote: I'm thinking about this flow: FLR the device for each emulated register read it from the hardware if different from emulated register:

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Avi Kivity
On 04/08/2012 07:04 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 06:50:27PM +0300, Avi Kivity wrote: On 04/08/2012 06:46 PM, Michael S. Tsirkin wrote: I'm thinking about this flow: FLR the device for each emulated register read it from the

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Jan Kiszka
On 2012-04-08 18:08, Avi Kivity wrote: On 04/08/2012 07:04 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 06:50:27PM +0300, Avi Kivity wrote: On 04/08/2012 06:46 PM, Michael S. Tsirkin wrote: I'm thinking about this flow: FLR the device for each emulated register read it

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 07:37:57PM +0200, Jan Kiszka wrote: On 2012-04-08 18:08, Avi Kivity wrote: On 04/08/2012 07:04 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 06:50:27PM +0300, Avi Kivity wrote: On 04/08/2012 06:46 PM, Michael S. Tsirkin wrote: I'm thinking about this

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Jan Kiszka
On 2012-04-08 20:18, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 07:37:57PM +0200, Jan Kiszka wrote: On 2012-04-08 18:08, Avi Kivity wrote: On 04/08/2012 07:04 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 06:50:27PM +0300, Avi Kivity wrote: On 04/08/2012 06:46 PM, Michael S.

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-08 Thread Michael S. Tsirkin
On Sun, Apr 08, 2012 at 08:39:35PM +0200, Jan Kiszka wrote: On 2012-04-08 20:18, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at 07:37:57PM +0200, Jan Kiszka wrote: On 2012-04-08 18:08, Avi Kivity wrote: On 04/08/2012 07:04 PM, Michael S. Tsirkin wrote: On Sun, Apr 08, 2012 at

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Jan Kiszka
On 2012-04-05 05:42, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993 [Hardware Error]: APEI

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Michael S. Tsirkin
On Wed, Apr 04, 2012 at 09:42:32PM -0600, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Alex Williamson
On Thu, 2012-04-05 at 12:34 +0300, Michael S. Tsirkin wrote: On Wed, Apr 04, 2012 at 09:42:32PM -0600, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]:

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Michael S. Tsirkin
On Thu, Apr 05, 2012 at 08:42:03AM -0600, Alex Williamson wrote: So far so good. + * We especially do not want MSI-X + * enabled since it lives in MMIO space, which is about to get + * disabled. I think we are better off dropping the above, because it's a bug that

[PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-04 Thread Alex Williamson
We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993 [Hardware Error]: APEI generic hardware error status [Hardware Error]: