[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:30, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 14/08/13 17:18, Joby Poriyath wrote:
>> +    /* 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).
>> +     */
>> +    if ( desc->msi_desc->msi_attrib.masked )
>> +        goto unlock;
> 
> If Xen wants the msi masked, or the guest wants the msi masked then you
> must set the masked bit, else must clear it.
> 
> The root cause of this whole issue is that Xen doesn't actually know
> what state the mask bit is in; it only knows its intention.
> 
> Therefore, goto unlock is incorrect here.  By this point, we must write
> the bit one way or another.

I disagree - the flag getting cleared under our feet would be a
severe problem. Adding a respective WARN_ON() or ASSERT()
might be a good idea.

The flag getting set without our knowledge, otoh, is not a
problem, and can be dealt with by the code as is.

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®.