[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 8/9] vpci/msi: add MSI handlers



On Tue, Jun 27, 2017 at 05:44:23AM -0600, Jan Beulich wrote:
> >>> Roger Pau Monne <roger.pau@xxxxxxxxxx> 06/27/17 12:23 PM >>>
> >On Fri, May 26, 2017 at 09:26:03AM -0600, Jan Beulich wrote:
> >> > +static int vpci_msi_address_upper_write(struct pci_dev *pdev, unsigned 
> >> > int reg,
> >> > +                                        union vpci_val val, void *data)
> >> > +{
> >> > +    struct vpci_msi *msi = data;
> >> > +
> >> > +    /* Clear high part. */
> >> > +    msi->address &= ~GENMASK(63, 32);
> >> > +    msi->address |= (uint64_t)val.double_word << 32;
> >> 
> >> Is the value written here actually being used for anything other than
> >> for reading back (also applicable to the high bits of the low half of the
> >> address)?
> >
> >It's used in a arch-specific way. But Xen needs to store it anyway, so
> >the guest can read back whatever it writes. I have no idea what ARM
> >might store here.
> 
> Hmm, I'm concerned you may introduce incorrect behavior here if the value
> written is other than expected. But perhaps not much of a problem as long
> as all this is Dom0 only.

IMHO if Xen needs to check this value for sanity it should be done in
the arch specific handler (vpci_msi_arch_enable), when the domain
tries to enable MSI. In any case, we can cross this bridge when we get
to enabling all this for DomUs.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.