qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/4] xen/MSI-X: latch MSI-X table writes


From: Jan Beulich
Subject: Re: [Qemu-devel] [PATCH v2 1/4] xen/MSI-X: latch MSI-X table writes
Date: Mon, 07 Dec 2015 08:57:11 -0700

>>> On 07.12.15 at 13:41, <address@hidden> wrote:
> On Tue, 24 Nov 2015, Jan Beulich wrote:
>> @@ -332,6 +334,13 @@ static int xen_pt_msix_update_one(XenPCI
>>  
>>      pirq = entry->pirq;
> 
> I know that in your opinion is superfluous, nonetheless could you please
> add 2-3 lines of in-code comment right here, to explain what you are
> doing with the check?  Something like:
> 
> /*
>  * Update the entry addr and data to the latest values only when the
>  * entry is masked or they are all masked, as required by the spec.
>  * Addr and data changes while the MSI-X entry is unmasked will be
>  * delayed until the next masking->unmasking.
>  */
> 
> 
>> +    if (pirq == XEN_PT_UNASSIGNED_PIRQ || s->msix->maskall ||
>> +        (vec_ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT)) {
>> +        entry->addr = entry->latch(LOWER_ADDR) |
>> +                      ((uint64_t)entry->latch(UPPER_ADDR) << 32);
>> +        entry->data = entry->latch(DATA);
>> +    }

Adding a comment like this is fine of course, namely if it helps
acceptance.

Jan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]