qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f36d4f: vfio/pci: Add support for mmapping su


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] f36d4f: vfio/pci: Add support for mmapping sub-page MMIO B...
Date: Tue, 02 Nov 2021 05:44:16 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f36d4fb85f41604038386e1eb4295acd7d372d86
      
https://github.com/qemu/qemu/commit/f36d4fb85f41604038386e1eb4295acd7d372d86
  Author: Kunkun Jiang <jiangkunkun@huawei.com>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio/pci: Add support for mmapping sub-page MMIO BARs after live migration

We can expand MemoryRegions of sub-page MMIO BARs in
vfio_pci_write_config() to improve IO performance for some
devices. However, the MemoryRegions of destination VM are
not expanded any more after live migration. Because their
addresses have been updated in vmstate_load_state()
(vfio_pci_load_config) and vfio_sub_page_bar_update_mapping()
will not be called.

This may result in poor performance after live migration.
So iterate BARs in vfio_pci_load_config() and try to update
sub-page BARs.

Reported-by: Nianyao Tang <tangnianyao@huawei.com>
Reported-by: Qixin Gan <ganqixin@huawei.com>
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Link: https://lore.kernel.org/r/20211027090406.761-2-jiangkunkun@huawei.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>


  Commit: e4b34708388b20f1ceb55f1d563d8da925a32424
      
https://github.com/qemu/qemu/commit/e4b34708388b20f1ceb55f1d563d8da925a32424
  Author: Kunkun Jiang <jiangkunkun@huawei.com>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M hw/vfio/common.c

  Log Message:
  -----------
  vfio/common: Add a trace point when a MMIO RAM section cannot be mapped

The MSI-X structures of some devices and other non-MSI-X structures
may be in the same BAR. They may share one host page, especially in
the case of large page granularity, such as 64K.

For example, MSIX-Table size of 82599 NIC is 0x30 and the offset in
Bar 3(size 64KB) is 0x0. vfio_listener_region_add() will be called
to map the remaining range (0x30-0xffff). If host page size is 64KB,
it will return early at 'int128_ge((int128_make64(iova), llend))'
without any message. Let's add a trace point to inform users like commit
5c08600547c0 ("vfio: Use a trace point when a RAM section cannot be DMA mapped")
did.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Link: https://lore.kernel.org/r/20211027090406.761-3-jiangkunkun@huawei.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>


  Commit: 844d6dfc3e48a8d404b03ea815868fd01c6f7317
      
https://github.com/qemu/qemu/commit/844d6dfc3e48a8d404b03ea815868fd01c6f7317
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-11-02 (Tue, 02 Nov 2021)

  Changed paths:
    M hw/vfio/common.c
    M hw/vfio/pci.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/alex.williamson/tags/vfio-update-20211101.0' into staging

VFIO update 2021-11-01

 * Re-enable expanded sub-page BAR mappings after migration (Kunkun Jiang)

 * Trace dropped listener sections due to page alignment (Kunkun Jiang)

# gpg: Signature made Mon 01 Nov 2021 03:48:28 PM EDT
# gpg:                using RSA key 42F6C04E540BD1A99E7B8A90239B9B6E3BB08B22
# gpg:                issuer "alex.williamson@redhat.com"
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full]
# gpg:                 aka "Alex Williamson <alex@shazbot.org>" [full]
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>" [full]
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>" 
[full]

* remotes/alex.williamson/tags/vfio-update-20211101.0:
  vfio/common: Add a trace point when a MMIO RAM section cannot be mapped
  vfio/pci: Add support for mmapping sub-page MMIO BARs after live migration

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/8cb41fda78c7...844d6dfc3e48



reply via email to

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