Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 03828b00a2bfa14fb70a423b811b57d463842622
https://github.com/qemu/qemu/commit/03828b00a2bfa14fb70a423b811b57d463842622
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: fix GTT stolen memory size calculation for gen 8+
On gen 8 and later devices, the GTT stolen memory size when GGMS equals
0 is 0 (no preallocated memory) rather than 1MB [1].
[1] 3.1.13, 5th Generation Intel Core Processor Family Datasheet Vol. 2
https://www.intel.com/content/www/us/en/content-details/330835
Fixes: c4c45e943e51 ("vfio/pci: Intel graphics legacy mode assignment")
Reported-By: Alex Williamson <[email protected]>
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 8492a6129c3c581cd6f94a0c11e9c4c5ebbac9dc
https://github.com/qemu/qemu/commit/8492a6129c3c581cd6f94a0c11e9c4c5ebbac9dc
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: remove unsupported device ids
Since e433f208973f ("vfio/igd: return an invalid generation for unknown
devices"), the default return of igd_gen() was changed to unsupported.
There is no need to filter out those unsupported devices.
Reviewed-by: Alex Williamson <[email protected]>
Reviewed-by: Corvin Köhne <[email protected]>
Signed-off-by: Tomita Moeko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 0bb758e97acec8c7bbd1c3d4d61ca20a050ae9b0
https://github.com/qemu/qemu/commit/0bb758e97acec8c7bbd1c3d4d61ca20a050ae9b0
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: align generation with i915 kernel driver
Define the igd device generations according to i915 kernel driver to
avoid confusion, and adjust comment placement to clearly reflect the
relationship between ids and devices.
The condition of how GTT stolen memory size is calculated is changed
accordingly as GGMS is in multiple of 2 starting from gen 8.
Reviewed-by: Corvin Köhne <[email protected]>
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 1e1eac5f3dcd9836088d59ced0ba23337f49eb04
https://github.com/qemu/qemu/commit/1e1eac5f3dcd9836088d59ced0ba23337f49eb04
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: canonicalize memory size calculations
Add helper functions igd_gtt_memory_size() and igd_stolen_size() for
calculating GTT stolen memory and Data stolen memory size in bytes,
and use macros to replace the hardware-related magic numbers for
better readability.
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 183714d8f9406b3d0c6e3daeee2e00e6f4aec9bb
https://github.com/qemu/qemu/commit/183714d8f9406b3d0c6e3daeee2e00e6f4aec9bb
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: add Gemini Lake and Comet Lake device ids
Both Gemini Lake and Comet Lake are gen 9 devices. Many user reports
on internet shows legacy mode of igd passthrough works as qemu treats
them as gen 8 devices by default before e433f208973f ("vfio/igd:
return an invalid generation for unknown devices").
Reviewed-by: Corvin Köhne <[email protected]>
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 960f62770ae4c603f92317166495e4a59cf051fc
https://github.com/qemu/qemu/commit/960f62770ae4c603f92317166495e4a59cf051fc
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: add Alder/Raptor/Rocket/Ice/Jasper Lake device ids
All gen 11 and 12 igd devices have 64 bit BDSM register at 0xC0 in its
config space, add them to the list to support igd passthrough on Alder/
Raptor/Rocket/Ice/Jasper Lake platforms.
Tested legacy mode of igd passthrough works properly on both linux and
windows guests with AlderLake-S GT1 (8086:4680).
Reviewed-by: Corvin Köhne <[email protected]>
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 1a2623b5c9e7cb6c9cc69dd4b467c9cbb1c98877
https://github.com/qemu/qemu/commit/1a2623b5c9e7cb6c9cc69dd4b467c9cbb1c98877
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: add macro for declaring mirrored registers
igd devices have multipe registers mirroring mmio address and pci
config space, more than a single BDSM register. To support this,
the read/write functions are made common and a macro is defined to
simplify the declaration of MemoryRegionOps.
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ clg : Fixed conversion specifier on 32-bit platform ]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: ea652c2beeaec51035f76aeb976af06858ee85ce
https://github.com/qemu/qemu/commit/ea652c2beeaec51035f76aeb976af06858ee85ce
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: emulate GGC register in mmio bar0
The GGC register at 0x50 of pci config space is a mirror of the same
register at 0x108040 of mmio bar0 [1]. i915 driver also reads that
register from mmio bar0 instead of config space. As GGC is programmed
and emulated by qemu, the mmio address should also be emulated, in the
same way of BDSM register.
[1] 4.1.28, 12th Generation Intel Core Processors Datasheet Volume 2
https://www.intel.com/content/www/us/en/content-details/655259
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: f926baa03b7babb8291ea4c1cbeadaf224977dae
https://github.com/qemu/qemu/commit/f926baa03b7babb8291ea4c1cbeadaf224977dae
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: emulate BDSM in mmio bar0 for gen 6-10 devices
A recent commit in i915 driver [1] claims the BDSM register at 0x1080c0
of mmio bar0 has been there since gen 6. Mirror this register to the 32
bit BDSM register at 0x5c in pci config space for gen6-10 devices.
[1]
https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Corvin Köhne <[email protected]>
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 37f05a59e8695df3d1206e7100190e48ec0af847
https://github.com/qemu/qemu/commit/37f05a59e8695df3d1206e7100190e48ec0af847
Author: Tomita Moeko <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/igd.c
Log Message:
-----------
vfio/igd: add x-igd-gms option back to set DSM region size for guest
DSM region is likely to store framebuffer in Windows, a small DSM
region may cause display issues (e.g. half of the screen is black).
Since 971ca22f041b ("vfio/igd: don't set stolen memory size to zero"),
the x-igd-gms option was functionally removed, QEMU uses host's
original value, which is determined by DVMT Pre-Allocated option in
Intel FSP of host bios.
However, some vendors do not expose this config item to users. In
such cases, x-igd-gms option can be used to manually set the data
stolen memory size for guest. So this commit brings this option back,
keeping its old behavior. When it is not specified, QEMU uses host's
value.
When DVMT Pre-Allocated option is available in host BIOS, user should
set DSM region size there instead of using x-igd-gms option.
Signed-off-by: Tomita Moeko <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: d77e85dbd7655cc41af51df74c077d8b31aee93c
https://github.com/qemu/qemu/commit/d77e85dbd7655cc41af51df74c077d8b31aee93c
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/container-base.c
M include/hw/vfio/vfio-container-base.h
Log Message:
-----------
vfio/container: Add dirty tracking started flag
Add a flag to VFIOContainerBase that indicates whether dirty tracking
has been started for the container or not.
This will be used in the following patches to allow dirty page syncs
only if dirty tracking has been started.
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Joao Martins <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 0ae05e087f99a8e4ca84537bdce65d25912d084e
https://github.com/qemu/qemu/commit/0ae05e087f99a8e4ca84537bdce65d25912d084e
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/common.c
M include/hw/vfio/vfio-common.h
Log Message:
-----------
vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic
During dirty page log sync, vfio_devices_all_dirty_tracking() is used to
check if dirty tracking has been started in order to avoid errors. The
current logic checks if migration is in ACTIVE or DEVICE states to
ensure dirty tracking has been started.
However, recently there has been an effort to simplify the migration
status API and reduce it to a single migration_is_running() function.
To accommodate this, refactor vfio_devices_all_dirty_tracking() logic so
it won't use migration_is_active() and migration_is_device(). Instead,
use internal VFIO dirty tracking flags.
As a side effect, now that migration status is no longer used to detect
dirty tracking status, VFIO log syncs are untied from migration. This
will make calc-dirty-rate more accurate as now it will also include VFIO
dirty pages.
While at it, as VFIODevice->dirty_tracking is now used to detect dirty
tracking status, add a comment that states how it's protected.
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Joao Martins <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 6e9df66e8afaa2e2fc98e7a3470edf00ffa16f03
https://github.com/qemu/qemu/commit/6e9df66e8afaa2e2fc98e7a3470edf00ffa16f03
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/common.c
M hw/vfio/container.c
M include/hw/vfio/vfio-common.h
Log Message:
-----------
vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic
During DMA unmap with vIOMMU, vfio_devices_all_running_and_mig_active()
is used to check whether a dirty page log sync of the unmapped pages is
required. Such log sync is needed during migration pre-copy phase, and
the current logic detects it by checking if migration is active and if
the VFIO devices are running.
However, recently there has been an effort to simplify the migration
status API and reduce it to a single migration_is_running() function.
To accommodate this, refactor vfio_devices_all_running_and_mig_active()
logic so it won't use migration_is_active(). Do it by simply checking if
dirty tracking has been started using internal VFIO flags.
This should be equivalent to the previous logic as during migration
dirty tracking is active and when the guest is stopped there shouldn't
be DMA unmaps coming from it.
As a side effect, now that migration status is no longer used, DMA unmap
log syncs are untied from migration. This will make calc-dirty-rate more
accurate as now it will also include VFIO dirty pages that were DMA
unmapped.
Also rename the function to properly reflect its new logic and extract
common code from vfio_devices_all_dirty_tracking().
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Joao Martins <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 1f21670ec0700575280bd6aa837eaa8d87fc98c1
https://github.com/qemu/qemu/commit/1f21670ec0700575280bd6aa837eaa8d87fc98c1
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/common.c
Log Message:
-----------
vfio/migration: Rename vfio_devices_all_dirty_tracking()
vfio_devices_all_dirty_tracking() is used to check if dirty page log
sync is needed. However, besides checking the dirty page tracking
status, it also checks the pre_copy_dirty_page_tracking flag.
Rename it to vfio_devices_log_sync_needed() which reflects its purpose
more accurately and makes the code clearer as there are already several
helpers with similar names.
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Joao Martins <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 7d5d9c8864f55983e5e9b9e6a8fd05440a80d48f
https://github.com/qemu/qemu/commit/7d5d9c8864f55983e5e9b9e6a8fd05440a80d48f
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M system/dirtylimit.c
Log Message:
-----------
system/dirtylimit: Don't use migration_is_active()
vcpu_dirty_rate_stat_collect() uses migration_is_active() to detect
whether migration is running or not, in order to get the correct dirty
rate period value.
However, recently there has been an effort to simplify the migration
status API and reduce it to a single migration_is_running() function.
To accommodate this, and since the same functionality can be achieved
with migration_is_running(), use it instead of migration_is_active().
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Hyman Huang <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 844ed0f7622679d86c2244a2101d2a166c5313e0
https://github.com/qemu/qemu/commit/844ed0f7622679d86c2244a2101d2a166c5313e0
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M include/migration/misc.h
M migration/migration.c
Log Message:
-----------
migration: Drop migration_is_device()
After being removed from VFIO, migration_is_device() no longer has any
users. Drop it.
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Acked-by: Peter Xu <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 3bdb1a75f1bb4234904dec7753de9c0c0ece3dbf
https://github.com/qemu/qemu/commit/3bdb1a75f1bb4234904dec7753de9c0c0ece3dbf
Author: Avihai Horon <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M include/migration/misc.h
M migration/migration.c
Log Message:
-----------
migration: Unexport migration_is_active()
After being removed from VFIO and dirty limit, migration_is_active() no
longer has any users outside the migration subsystem, and in fact, it's
only used in migration.c.
Unexport it and also relocate it so it can be made static.
Signed-off-by: Avihai Horon <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Acked-by: Peter Xu <[email protected]>
Tested-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>
Commit: 38d0939b86e2eef6f6a622c6f1f7befda0146595
https://github.com/qemu/qemu/commit/38d0939b86e2eef6f6a622c6f1f7befda0146595
Author: Stefan Hajnoczi <[email protected]>
Date: 2024-12-26 (Thu, 26 Dec 2024)
Changed paths:
M hw/vfio/common.c
M hw/vfio/container-base.c
M hw/vfio/container.c
M hw/vfio/igd.c
M include/hw/vfio/vfio-common.h
M include/hw/vfio/vfio-container-base.h
M include/migration/misc.h
M migration/migration.c
M system/dirtylimit.c
Log Message:
-----------
Merge tag 'pull-vfio-20241226' of https://github.com/legoater/qemu into
staging
vfio queue:
* Add support for IGD passthrough on all Intel Gen 11 and 12 devices
* Refactor dirty tracking engine to include VFIO state in calc-dirty-rate
* Drop usage migration_is_device() and migration_is_active()
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmdtFXUACgkQUaNDx8/7
# 7KGDgQ//bjcz061VL+8pFv5eOSPKXa7m0hTFIjGswk8y6i3izs8c6WXX2RWwfOXn
# 0vLE87XpEoTr494RC6qT/QIhuzfIm+mFb91U/jpjn7TSIrVzvWzI9qVUqKAjvVES
# M0BWNi4oCvZMAoADPJ7wvXbQO5eDSUauF5AeHGRUpy34DFwnHLmOCLe+Cj5L732H
# EOL+QCNf2y/iR36Anh2VyDaaFDPCx7BBF+SApWR93jAnpe3kIXSQczn0wLeXoELB
# Q7FhLSOEicuZUF6pgTYMJ7hpGdZMv9AopTDt4owoDgxYXr0PQ0YWy+fsG5mlavnd
# DHo9qmHKjkbzPHSV5tlim2zDbqu4lRnC6NzJTtVzzFfyrrXTQYTNZh7usVRiG9VN
# JQNNmT5L14tso0YSCgc+KeqjYnV12ZktYsZosoJHKQ2pkpoZRUFQUtXfnRrQGmNt
# RnfNv60Mez1PcWvt17Gq4S5JM+XUgsB6Jpm8tLj1eGowurCerFwLNRK5U09cBKLa
# WprF+b5KmSDQuqiWpmssmuKbvfSyeC8NVgrpRXEkDyivnJYkELki9H6Ec7ATUNyI
# 4ZiX1GlvofKqgiDX8ZUafnz3z4++lgLvOkMb5e/n/oktzUM6gzAds/4mGXLm6hxk
# 8gZb/Hrfjhv0PLIVzphMxv+N3U0nu2CVNJzMcmzFGkqlsnLqgO0=
# =F4P6
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 26 Dec 2024 03:36:05 EST
# gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <[email protected]>" [full]
# gpg: aka "Cédric Le Goater <[email protected]>" [full]
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1
* tag 'pull-vfio-20241226' of https://github.com/legoater/qemu:
migration: Unexport migration_is_active()
migration: Drop migration_is_device()
system/dirtylimit: Don't use migration_is_active()
vfio/migration: Rename vfio_devices_all_dirty_tracking()
vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic
vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic
vfio/container: Add dirty tracking started flag
vfio/igd: add x-igd-gms option back to set DSM region size for guest
vfio/igd: emulate BDSM in mmio bar0 for gen 6-10 devices
vfio/igd: emulate GGC register in mmio bar0
vfio/igd: add macro for declaring mirrored registers
vfio/igd: add Alder/Raptor/Rocket/Ice/Jasper Lake device ids
vfio/igd: add Gemini Lake and Comet Lake device ids
vfio/igd: canonicalize memory size calculations
vfio/igd: align generation with i915 kernel driver
vfio/igd: remove unsupported device ids
vfio/igd: fix GTT stolen memory size calculation for gen 8+
Signed-off-by: Stefan Hajnoczi <[email protected]>
Compare: https://github.com/qemu/qemu/compare/a7f77545d401...38d0939b86e2
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications