Re: [Xen-devel] [PATCH v3 9/9] vpci/msix: add MSI-X handlers

2017-06-29 Thread Roger Pau Monné
On Thu, Jun 29, 2017 at 12:19:39AM -0600, Jan Beulich wrote: > >>> Roger Pau Monne 06/28/17 5:37 PM >>> > >On Mon, May 29, 2017 at 07:29:29AM -0600, Jan Beulich wrote: > >> >>> On 27.04.17 at 16:35, wrote: > >> > +switch ( offset ) > >> > +{ > >> > +case PCI_MSIX_ENTRY_LOWER_ADDR_OFFS

Re: [Xen-devel] [PATCH v3 9/9] vpci/msix: add MSI-X handlers

2017-06-28 Thread Jan Beulich
>>> Roger Pau Monne 06/28/17 5:37 PM >>> >On Mon, May 29, 2017 at 07:29:29AM -0600, Jan Beulich wrote: >> >>> On 27.04.17 at 16:35, wrote: >> > +switch ( offset ) >> > +{ >> > +case PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET: >> > +*data = entry->addr; >> >> You're not clipping off the

Re: [Xen-devel] [PATCH v3 9/9] vpci/msix: add MSI-X handlers

2017-06-28 Thread Roger Pau Monne
On Mon, May 29, 2017 at 07:29:29AM -0600, Jan Beulich wrote: > >>> On 27.04.17 at 16:35, wrote: > > +static int vpci_msix_control_write(struct pci_dev *pdev, unsigned int reg, > > + union vpci_val val, void *data) > > +{ > > +uint8_t seg = pdev->seg, bus = pde

Re: [Xen-devel] [PATCH v3 9/9] vpci/msix: add MSI-X handlers

2017-05-29 Thread Jan Beulich
>>> On 27.04.17 at 16:35, wrote: > +static int vpci_msix_control_write(struct pci_dev *pdev, unsigned int reg, > + union vpci_val val, void *data) > +{ > +uint8_t seg = pdev->seg, bus = pdev->bus; > +uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pd

[Xen-devel] [PATCH v3 9/9] vpci/msix: add MSI-X handlers

2017-04-27 Thread Roger Pau Monne
Add handlers for accesses to the MSI-X message control field on the PCI configuration space, and traps for accesses to the memory region that contains the MSI-X table. This traps detect attempts from the guest to configure MSI-X interrupts and properly sets them up. Note that accesses to the Table