Re: [PATCH 2/5] qemu-kvm: msix: Only invoke msix_handle_mask_update on changes

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

 



On 2011-10-18 15:49, Michael S. Tsirkin wrote:
> On Tue, Oct 18, 2011 at 03:20:43PM +0200, Michael S. Tsirkin wrote:
>> Ah. Right. Good catch. It's probably best to just make that
>> state be !enabled || masked. Like the below? (compiled only):
>>
>> --->
>>
>> msix: track function masked in pci device state
>>
>> Only go over the table when function is masked.
>> This optimization is not really important for qemu.git but helps
>> qemu-kvm.git.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
> 
> ...
> 
>> diff --git a/hw/pci.h b/hw/pci.h
>> index 86a81c8..da4c9c3 100644
>> --- a/hw/pci.h
>> +++ b/hw/pci.h
>> @@ -178,6 +178,8 @@ struct PCIDevice {
>>      unsigned *msix_entry_used;
>>      /* Region including the MSI-X table */
>>      uint32_t msix_bar_size;
>> +    /* MSIX function mask set or MSIX disabled */
>> +    bool msix_function_masked;
>>      /* Version id needed for VMState */
>>      int32_t version_id;
> 
> BTW, since code checks msix_function_masked consistently,
> this also covers the case your other patch addressed,
> where there's a table access while msix is disabled, right?

Looks like. Not sure about potential side effects of this change to
msi_is_masked, but conceptually there should be none.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux