Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread Chao Gao
On Thu, Apr 05, 2018 at 11:08:59AM +0100, George Dunlap wrote: >On 04/05/2018 10:59 AM, Roger Pau Monné wrote: >> On Thu, Apr 05, 2018 at 10:52:09AM +0100, George Dunlap wrote: >>> On 04/05/2018 10:46 AM, Roger Pau Monné wrote: On Thu, Apr 05, 2018 at 10:40:37AM +0100, George Dunlap wrote:

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread Chao Gao
On Thu, Apr 05, 2018 at 12:25:26PM +0100, Roger Pau Monné wrote: >On Thu, Apr 05, 2018 at 07:00:41PM +0800, Chao Gao wrote: >> On Thu, Apr 05, 2018 at 10:34:39AM +0100, Roger Pau Monné wrote: >> >On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: >> >> diff --git a/xen/arch/x86/msi.c

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread Chao Gao
On Thu, Apr 05, 2018 at 10:34:39AM +0100, Roger Pau Monné wrote: >On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: >> ... the same page with other registers which are not relevant to MSI-X. Xen >> marks pages where PBA resides as read-only. When assigning such devices to >> guest, device

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread George Dunlap
On 04/05/2018 10:59 AM, Roger Pau Monné wrote: > On Thu, Apr 05, 2018 at 10:52:09AM +0100, George Dunlap wrote: >> On 04/05/2018 10:46 AM, Roger Pau Monné wrote: >>> On Thu, Apr 05, 2018 at 10:40:37AM +0100, George Dunlap wrote: On 04/05/2018 10:34 AM, Roger Pau Monné wrote: > On Wed, Apr

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread Roger Pau Monné
On Thu, Apr 05, 2018 at 10:52:09AM +0100, George Dunlap wrote: > On 04/05/2018 10:46 AM, Roger Pau Monné wrote: > > On Thu, Apr 05, 2018 at 10:40:37AM +0100, George Dunlap wrote: > >> On 04/05/2018 10:34 AM, Roger Pau Monné wrote: > >>> On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: >

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread George Dunlap
On 04/05/2018 10:46 AM, Roger Pau Monné wrote: > On Thu, Apr 05, 2018 at 10:40:37AM +0100, George Dunlap wrote: >> On 04/05/2018 10:34 AM, Roger Pau Monné wrote: >>> On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: ... the same page with other registers which are not relevant to

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread Roger Pau Monné
On Thu, Apr 05, 2018 at 10:40:37AM +0100, George Dunlap wrote: > On 04/05/2018 10:34 AM, Roger Pau Monné wrote: > > On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: > >> ... the same page with other registers which are not relevant to MSI-X. Xen > >> marks pages where PBA resides as

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread George Dunlap
On 04/05/2018 10:34 AM, Roger Pau Monné wrote: > On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: >> ... the same page with other registers which are not relevant to MSI-X. Xen >> marks pages where PBA resides as read-only. When assigning such devices to >> guest, device driver writes

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-05 Thread Roger Pau Monné
On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: > ... the same page with other registers which are not relevant to MSI-X. Xen > marks pages where PBA resides as read-only. When assigning such devices to > guest, device driver writes MSI-X irrelevant registers on those pages would > lead

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-04 Thread Chao Gao
On Wed, Apr 04, 2018 at 04:45:32PM +0100, Roger Pau Monné wrote: >On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: >> ... the same page with other registers which are not relevant to MSI-X. Xen >> marks pages where PBA resides as read-only. When assigning such devices to >> guest, device

Re: [Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-04 Thread Roger Pau Monné
On Wed, Apr 04, 2018 at 11:29:39PM +0800, Chao Gao wrote: > ... the same page with other registers which are not relevant to MSI-X. Xen > marks pages where PBA resides as read-only. When assigning such devices to > guest, device driver writes MSI-X irrelevant registers on those pages would > lead

[Xen-devel] [PATCH] pci: a workaround for nonstandard PCI devices whose PBA shares

2018-04-04 Thread Chao Gao
... the same page with other registers which are not relevant to MSI-X. Xen marks pages where PBA resides as read-only. When assigning such devices to guest, device driver writes MSI-X irrelevant registers on those pages would lead to an EPT violation and the guest is destroyed because no handler