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

Re: [Xen-devel] [PATCH v3] interrupts: allow guest to set/clear MSI-X mask bit



>>> On 14.08.13 at 18:18, Joby Poriyath <joby.poriyath@xxxxxxxxxx> wrote:

A few coding style issues:

> +    /* Do not allow guest to modify MSIX control bit if it is masked 
> +     * by Xen. We'll only handle the case where Xen thinks that
> +     * bit is unmasked, but hardware has silently masked the bit
> +     * (in case of SR-IOV VF reset, etc).
> +     */

The /* goes on its own line.

> +    if ( desc->msi_desc->msi_attrib.masked )
> +        goto unlock;
> +
> +    /* The mask bit is the only defined bit in the word. But we 
> +     * ought to preserve the reserved bits. Clearing the reserved 
> +     * bits can result in undefined behaviour (see PCI Local Bus
> +     * Specification revision 2.3).
> +     */

Same here.

>      orig = readl(virt);
> -    val &= ~PCI_MSIX_VECTOR_BITMASK;
> -    val |= orig & PCI_MSIX_VECTOR_BITMASK;
> +    val &= PCI_MSIX_VECTOR_BITMASK;
> +    val |= ( orig & ~PCI_MSIX_VECTOR_BITMASK );

The parentheses are bogus here anyway, but it you insist on
having them, there's at least shouldn't be blanks immediately
inside them.

Jan


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


 


Rackspace

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