diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-11-18 10:04:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-11-18 10:04:04 +0000 |
commit | 0fbc798e4f51d6d2bc05f4965b0eae74ba204471 (patch) | |
tree | 4be9b60740cee33015e4265d1f1a6a509638b795 | |
parent | abb1565d3d863cf210f18f70c4a42b0f39b8ccdb (diff) | |
parent | ebbf7c60bbd1ceedf9faf962e428ceda2388c248 (diff) |
Merge tag 'pull-vfio-20241118' of https://github.com/legoater/qemu into staging
vfio queue:
* Fixed IGD support
* Fixed QEMU crash when passing through devices in SEV-SNP guests
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmc680AACgkQUaNDx8/7
# 7KGiFBAAx+V9FTkl6WNqNlQvhizu7C/TY7Ern5YoEbS6aJh96b0Hx+57vuxE4LAW
# /45pNXJpcn8vXzzpxohy4gS12Gu8rBY1XxMcCMLoZSbGanp1mPsaCWr37hgadFsj
# nNRwBVj2fpNxcskcEIuzKzmnTCzbxZjDkpAuNzbBVGNM9EGOH3NFfYasRONvSXap
# u+akPFw8BpAfcxfSQea13v0NpGlgDtJedvJZp6kO6d5xc0GvelIhkz2wGqqLpfvP
# 8J3I17yaDwHXFiBzl5pGE5K/tjFRoIlM3EVV1KcDfyqXrwEyOMmDl2pmJv+1K8Sz
# tSgkedMeZCMWGM307+92IyuXlaV8s+meo4NZxxx1mxAF2jNBVDwTj8vhscG/zY6q
# QZgZRhumyeL8S5WoRIMVHCKr3pjvZat/OeBxjVXiQ8GzNZSgNNwBE9EKuu4L4b2b
# GOSGL2epwYTldh4R5GsuLOpNrSDnff9tGvpe2OICDs9KqHjeAPbHkYW0/QNzIYyf
# 2rkFKEu3hRIu0FdFFi6w0r/KE70Wc0wUV11ycxgsYMJpkY68c2u13wnfq0u4Ja4N
# eJERr+AsgQUHIb95ZRJr6CKFaEJxEMceP/986Fdw4YS2U5hOU1ln+Km6sTDcr/kt
# DvjVcBjxQyJHM3m9y7X3WosqtmX7tMo6grWP7L6qIPhb7eLYFUY=
# =JW0J
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 18 Nov 2024 07:56:48 GMT
# gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full]
# gpg: aka "Cédric Le Goater <clg@kaod.org>" [full]
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1
* tag 'pull-vfio-20241118' of https://github.com/legoater/qemu:
vfio/container: Fix container object destruction
vfio/igd: fix calculation of graphics stolen memory
vfio/igd: add pci id for Coffee Lake
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/vfio/container-base.c | 2 | ||||
-rw-r--r-- | hw/vfio/igd.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c index 809b157674..6f86c37d97 100644 --- a/hw/vfio/container-base.c +++ b/hw/vfio/container-base.c @@ -103,7 +103,7 @@ static void vfio_container_instance_finalize(Object *obj) VFIOContainerBase *bcontainer = VFIO_IOMMU(obj); VFIOGuestIOMMU *giommu, *tmp; - QLIST_REMOVE(bcontainer, next); + QLIST_SAFE_REMOVE(bcontainer, next); QLIST_FOREACH_SAFE(giommu, &bcontainer->giommu_list, giommu_next, tmp) { memory_region_unregister_iommu_notifier( diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c index a95d441f68..4047f4f071 100644 --- a/hw/vfio/igd.c +++ b/hw/vfio/igd.c @@ -88,6 +88,9 @@ static int igd_gen(VFIOPCIDevice *vdev) case 0x2200: case 0x5900: return 8; + /* CoffeeLake */ + case 0x3e00: + return 9; /* ElkhartLake */ case 0x4500: return 11; @@ -498,7 +501,7 @@ static int igd_get_stolen_mb(int gen, uint32_t gmch) if (gms < 0xf0) return gms * 32; else - return gms * 4 + 4; + return (gms - 0xf0) * 4 + 4; } } |