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 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?

-- 
MST
--
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