+ IGD_GMCH, 0);
> pci_set_long(vdev->emulated_config_bits + IGD_GMCH, ~0);
> }
>
> @@ -630,12 +634,12 @@ static bool vfio_pci_igd_config_quirk(VFIOPCIDevice
> *vdev, Error **errp)
>
> /* BDSM is read-write, emulated. BIOS needs to be able to write it */
>
). The UEFI GOP driver depends on the device reporting a VGA
controller class code (0x03).
Signed-off-by: Tomita Moeko
---
v3:
* Save the vdev class code when it is unspecified.
* Call pci_register_vga() in vfio_pci_config_setup() to ensure VGA
regions are only get exposed when vdev is VGA
On 6/27/25 02:26, Alex Williamson wrote:
> On Tue, 17 Jun 2025 08:56:41 +0800
> Tomita Moeko wrote:
>
>> On 2025/5/29 18:41, Tomita Moeko wrote:
>>> On 2025/5/29 2:30, Alex Williamson wrote:
>>>> On Wed, 28 May 2025 23:55:48 +0800
>>>> Tomita
On 2025/5/29 18:41, Tomita Moeko wrote:
> On 2025/5/29 2:30, Alex Williamson wrote:
>> On Wed, 28 May 2025 23:55:48 +0800
>> Tomita Moeko wrote:
>>
>>> Introduce x-pci-class-code option to allow users to override PCI class
>>> code of a device, similar to th
On 2025/5/29 2:30, Alex Williamson wrote:
> On Wed, 28 May 2025 23:55:48 +0800
> Tomita Moeko wrote:
>
>> Introduce x-pci-class-code option to allow users to override PCI class
>> code of a device, similar to the existing x-pci-vendor-id option. Only
>> the lower 24 b
driver depends on the device reporting a VGA
controller class code (0x03).
Signed-off-by: Tomita Moeko
---
v2:
* Add vdev class code check in vfio_populate_vga().
* Fix type in trace-events.
Link: https://lore.kernel.org/all/20250524153102.19747-1-tomitamo...@gmail.com/
hw/vfio/pci.c
On 5/24/25 23:31, Tomita Moeko wrote:
> Introduce x-pci-class-code option to allow users to override PCI class
> code of a device, similar to the existing x-pci-vendor-id option. Only
> the lower 24 bits of this option are used, though a uint32 is used here
> for determining whether
for IGD devices that expose themselves either
as VGA controller (primary display) or Display controller (non-primary
display). The UEFI GOP driver depends on the device reporting a VGA
controller class code (0x03).
Signed-off-by: Tomita Moeko
---
hw/vfio/pci.c| 17
u/-/issues/2968
Reported-by: Edmund Raile
Link:
https://lore.kernel.org/qemu-devel/30044d14-17ec-46e3-b9c3-63d27a5bd...@gmail.com
Tested-by: Edmund Raile
Signed-off-by: Tomita Moeko
---
v2:
* Add Tested-by from Edmund Raile. Thanks for the contribution.
* Rebased on vfio-next
* Fix typos.
hw/
On 5/22/25 15:31, edmund.raile wrote:
> Hi Moeko,
>
>> I did some further debugging, and found it was caused by a mistake in
>> error handling. In vfio_pci_igd_opregion_detect(), `errp` is set when
>> OpRegion is not found. However, in pci_qdev_realize(), the caller of
>> vfio_realize(), it checks
u/-/issues/2968
Reported-by: Edmund Raile
Link:
https://lore.kernel.org/qemu-devel/30044d14-17ec-46e3-b9c3-63d27a5bd...@gmail.com
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/i
On 5/21/25 04:46, edmund.raile wrote:
> Hi Moeko,
>> On 5/19/25 16:03, edmund.raile wrote:
>>> Restore SR-IOV Intel iGPU VF passthrough capability:
>>> Check x-igd-opregion=off parameter in vfio_pci_igd_config_quirk and
>>> vfio_pci_kvmgt_config_quirk to ensure x-igd-opregion=off is
>>> respected
On 5/20/25 01:15, Alex Williamson wrote:
> [Please Cc maintainers - added here]
>
> On Mon, 19 May 2025 18:08:39 +0300
> Qwinci wrote:
>
>> Change the IGD detection logic to also accept gpus with
>> PCI_CLASS_DISPLAY_OTHER class which is used if the igpu is not
>> set as the primary boot gpu.
>>
On 5/19/25 16:03, edmund.raile wrote:
> Restore SR-IOV Intel iGPU VF passthrough capability:
> Check x-igd-opregion=off parameter in vfio_pci_igd_config_quirk and
> vfio_pci_kvmgt_config_quirk to ensure x-igd-opregion=off is
> respected despite subsequent attempt of automatic
> IGD opregion detecti
quot;Device does not supports IGD OpRegion feature");
> + "Device does not support IGD OpRegion feature");
> return false;
> }
>
Reviewed-by: Tomita Moeko
Thank you for your contribution!
x-igd-gms is used for overriding DSM region size in GGC register in
both config space and MMIO BAR0, by default host value is used.
There is no need to emulate it in default case.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 49 ++---
1 file
is unnecessary as access is handled
by kvmgt backend [1].
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/gvt/cfg_space.c?h=v6.14#n295
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions
/linux.git/tree/drivers/gpu/drm/i915/gem/i915_gem_stolen.c?h=v6.14#n142
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 6 +
hw/vfio/igd.c | 58 -
2 files changed, 27 insertions(+), 37 deletions(-)
diff --git a/docs/igd-assign.txt b/docs
On Gen9 and later IGD devices, GMS 0xf0 to 0xfe represents 4MB to 60MB
pre-allocated memory size in 4MB increments. Allow users overriding
GMS with these values.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 59 +++
1 file changed, 41 insertions
libvirt:
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 4 ++--
hw/vfio/pci.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
index 95beb76812..fc444503ff 100644
--- a/docs/igd-assign.txt
+++ b/docs
-devel/20250325172239.27926-1-tomitamo...@gmail.com/T/
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 1 +
hw/vfio/igd.c | 6 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
index 3aed7956d5..95beb76812 100644
--- a/docs/igd
devices.
Since mdev cannot be created on these devices, this has no functional
impact.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/intel_gvt.c?h=v6.14#n52
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 12
1 file changed, 12
.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index b1fce76f72..347253d08c 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -185,9 +185,10 @@ static bool
1-tomitamo...@gmail.com
Tomita Moeko (9):
vfio/igd: Restrict legacy mode to Gen6-9 devices
vfio/igd: Always emulate ASLS (OpRegion) register
vfio/igd: Detect IGD device by OpRegion
vfio/igd: Check vendor and device ID on GVT-g mdev
vfio/igd: Check OpRegion support on GVT-g mdev
vfio/igd: Enabl
hotplugging.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index f5dd475028..9dec32818c 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -685,9 +685,13 @@ static bool
On 5/5/25 16:42, Corvin Köhne wrote:
> On Tue, 2025-04-29 at 00:09 +0800, Tomita Moeko wrote:
>> CAUTION: External Email!!
>> Intel only provides legacy VBIOS for IGD up to Gen9, and there is no
>> CSM support on later devices. Additionally, Seabios can only handle
>>
I forgot adding v2 in subject, sorry for my mistake.
Moeko
On 4/29/25 00:09, Tomita Moeko wrote:
> As proposed in a previous discussion [1], detect IGD devices based on
> whether it has VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION exposed by kernel
> and enables OpRegion access by defa
On 2025/4/29 14:28, Corvin Köhne wrote:
> On Tue, 2025-04-29 at 00:10 +0800, Tomita Moeko wrote:
>> CAUTION: External Email!!
>> x-igd-gms is used for overriding DSM region size in GGC register in
>> both config space and MMIO BAR0, by default host value is used.
>> The
/linux.git/tree/drivers/gpu/drm/i915/gem/i915_gem_stolen.c?h=v6.14#n142
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 6 +
hw/vfio/igd.c | 58 -
2 files changed, 27 insertions(+), 37 deletions(-)
diff --git a/docs/igd-assign.txt b/docs
.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index ae19456457..d6880cbff7 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -185,9 +185,10 @@ static bool
x-igd-gms is used for overriding DSM region size in GGC register in
both config space and MMIO BAR0, by default host value is used.
There is no need to emulate it in default case.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 49 ++---
1 file
libvirt:
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 4 ++--
hw/vfio/pci.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
index 95beb76812..fc444503ff 100644
--- a/docs/igd-assign.txt
+++ b/docs
On Gen9 and later IGD devices, GMS 0xf0 to 0xfe represents 4MB to 60MB
pre-allocated memory size in 4MB increments. Allow users overriding
GMS with these values.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 59 +++
1 file changed, 41 insertions
devices.
Since mdev cannot be created on these devices, this has no functional
impact.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/intel_gvt.c?h=v6.14#n52
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 12
1 file changed, 12
is unnecessary as access is handled
by kvmgt backend [1].
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/gvt/cfg_space.c?h=v6.14#n295
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions
t opregion in a single function.
* Update documentation along with code changes.
* Minor code style fixes.
Link:
https://lore.kernel.org/qemu-devel/20250421163112.21316-1-tomitamo...@gmail.coms
Tomita Moeko (9):
vfio/igd: Restrict legacy mode to Gen6-9 devices
vfio/igd: Always emulate ASLS
hotplugging.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index c6ecbefb35..496d3df598 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -684,9 +684,13 @@ static bool
-devel/20250325172239.27926-1-tomitamo...@gmail.com/T/
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 1 +
hw/vfio/igd.c | 6 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
index 3aed7956d5..95beb76812 100644
--- a/docs/igd
On 4/23/25 14:54, Corvin Köhne wrote:
> On Tue, 2025-04-22 at 00:31 +0800, Tomita Moeko wrote:
>> CAUTION: External Email!!
>> There is currently no straightforward way to distinguish if a Intel
>> graphics device is IGD or discrete GPU. However, only IGD devices expose
On 4/25/25 06:57, Alex Williamson wrote:
> On Tue, 22 Apr 2025 00:31:07 +0800
> Tomita Moeko wrote:
>
>> OpRegion is exposed to guest as a read-only fw_cfg item, so hotplugging
>> with it wouldn't cause issues. Since OpRegion needs to be set up by
>> guest firmw
x-igd-gms is used for overriding DSM region size in GGC register in
both config space and MMIO BAR0, by default host value is used.
There is no need to emulate it in default case.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 49 ++---
1 file
Update the documentation to reflect these changes.
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
index 3aed7956d5..eac31ea3dd 100644
--- a/docs/igd-assign.txt
+++
devices.
Since mdev cannot be created on these devices, this has no functional
impact.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/intel_gvt.c?h=v6.14#n52
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 13 +
1 file changed, 13
/linux.git/tree/drivers/gpu/drm/i915/gem/i915_gem_stolen.c?h=v6.14#n142
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 58 +++
1 file changed, 21 insertions(+), 37 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index bc4c79837d..5b888616f0
y not required.
Still, hotplugging IGD devices is highly discouraged.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb1d132935c2f87cd261eb559759fe49d5e5dc43
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw
On Gen9 and later IGD devices, GMS 0xf0 to 0xfe represents 4MB to 60MB
pre-allocated memory size in 4MB increments. Allow users overriding
GMS with these values.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 59 +++
1 file changed, 41 insertions
claimed support
for GVT-g hotplugging.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 50 +-
1 file changed, 21 insertions(+), 29 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index 7a7c7735c1..cc397f8829 100644
--- a/hw/vfio/igd.c
]
https://edc.intel.com/content/www/us/en/design/publications/14th-generation-core-processors-cfg-and-mem-registers/d2-f0-processor-graphics-registers/
Tomita Moeko (11):
vfio/igd: Restrict legacy mode to Gen6-9 devices
vfio/igd: Always emulate ASLS (OpRegion) register
vfio/igd: Detect IGD
libvirt:
Signed-off-by: Tomita Moeko
---
hw/vfio/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 05a7a62204..38ff231625 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3361,7 +3361,7 @@ static const Property
There is currently no straightforward way to distinguish if a Intel
graphics device is IGD or discrete GPU. However, only IGD devices expose
OpRegion. Use the presence of VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION
to identify IGD devices.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 26
is unnecessary as access is handled
by kvmgt backend [1].
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/gvt/cfg_space.c?h=v6.14#n295
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions
-devel/20250325172239.27926-1-tomitamo...@gmail.com/T/
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index 6678e0e5cd..01826acf10 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -516,11 +516,13
On 4/17/25 00:10, Alex Williamson wrote:
> On Wed, 16 Apr 2025 23:45:08 +0800
> Tomita Moeko wrote:
>
>> On 4/16/25 03:04, Alex Williamson wrote:
>>> On Wed, 16 Apr 2025 01:36:15 +0800
>>> Tomita Moeko wrote:
>>>>
>>>> The genera
On 4/16/25 03:04, Alex Williamson wrote:
> On Wed, 16 Apr 2025 01:36:15 +0800
> Tomita Moeko wrote:
>>
>> The generation register also exists on discrete GPUs. In the new xe
>> driver [1], the Battlemage discrete GPU shares the same logic reading
>> GMD_ID_DISPLAY re
On 4/15/25 06:05, Alex Williamson wrote:
> On Mon, 14 Apr 2025 01:23:56 +0800
> Tomita Moeko wrote:
>
>> On 4/10/25 15:34, Cédric Le Goater wrote:
>>> + Corvin
>>>
>>> On 4/9/25 19:18, Alex Williamson wrote:
>>>> On Wed, 26 Mar 2025 01:22:
On 4/10/25 15:34, Cédric Le Goater wrote:
> + Corvin
>
> On 4/9/25 19:18, Alex Williamson wrote:
>> On Wed, 26 Mar 2025 01:22:39 +0800
>> Tomita Moeko wrote:
>>
>>> So far, all Intel VGA adapters, including discrete GPUs like A770 and
>>> B580, w
On 4/10/25 01:18, Alex Williamson wrote:
> On Wed, 26 Mar 2025 01:22:39 +0800
> Tomita Moeko wrote:
>
>> So far, all Intel VGA adapters, including discrete GPUs like A770 and
>> B580, were treated as IGD devices. While this had no functional impact,
>> a error about &q
Hi, John
On 4/9/25 21:48, John Levon wrote:
> Refactor the PCI config setup code out of vfio_realize() for
> readability.
>
> Reviewed-by: Cédric Le Goater
> Signed-off-by: John Levon
> ---
> hw/vfio/pci.c | 176 +++---
> 1 file changed, 94 insertion
On 4/9/25 23:54, John Levon wrote:
> On Wed, Apr 09, 2025 at 11:51:09PM +0800, Tomita Moeko wrote:
>
>> On 4/9/25 21:48, John Levon wrote:
>>> Add these helpers that access config space and return an -errno style
>>> return.
>>>
>>> Signed-off-
On 4/9/25 21:48, John Levon wrote:
> Add these helpers that access config space and return an -errno style
> return.
>
> Signed-off-by: John Levon
> ---
> hw/vfio/pci.c | 134 ++
> 1 file changed, 91 insertions(+), 43 deletions(-)
>
> diff --git a
ot;, let's check the host PCI
address when probing.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index 265fffc2aa..ff250017b0 100644
--- a/hw/vfio/igd.c
+++ b/hw/v
, are also added.
Signed-off-by: Tomita Moeko
---
v2:
* Fixed typos
Link: https://lore.kernel.org/all/20250312155002.286841-1-tomitamo...@gmail.com/
docs/igd-assign.txt | 265
1 file changed, 196 insertions(+), 69 deletions(-)
diff --git a/docs/igd
, are also added.
Signed-off-by: Tomita Moeko
---
docs/igd-assign.txt | 262
1 file changed, 193 insertions(+), 69 deletions(-)
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
index e17bb50789..c7c4565906 100644
--- a/docs/igd-assign.txt
+++ b
On 2025/3/10 15:13, Cédric Le Goater wrote:
> Tomita,
>
> On 3/7/25 19:37, Tomita Moeko wrote:
>> On 2025/3/7 6:49, Alex Williamson wrote:
>>> On Fri, 7 Mar 2025 02:01:27 +0800
>>> Tomita Moeko wrote:
>>>
>>>> So far, IGD-specific quirks a
removed after we decouple it
from legacy mode.
Additionally, move vfio_pci_igd_opregion_init to igd.c to prevent it
from being compiled in non-x86 builds.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c| 101 +++
hw/vfio/pci-quirks.c | 50
On 3/10/25 21:43, Philippe Mathieu-Daudé wrote:
> On 10/3/25 08:37, Cédric Le Goater wrote:
>> On 3/9/25 00:09, Philippe Mathieu-Daudé wrote:
>>> Convert the compile time check on the CONFIG_VFIO_IGD definition
>>> by a runtime one by calling vfio_igd_builtin(), which check
>>> whether VFIO_IGD is
On 2025/3/7 6:49, Alex Williamson wrote:
> On Fri, 7 Mar 2025 02:01:27 +0800
> Tomita Moeko wrote:
>
>> So far, IGD-specific quirks all require enabling legacy mode, which is
>> toggled by assigning IGD to 00:02.0. However, some quirks, like the BDSM
>> and GGC
The LPC bridge/Host bridge IDs quirk is also not dependent on legacy
mode. Recent Windows driver no longer depends on these IDs, as well as
Linux i915 driver, while UEFI GOP seems still needs them. Make it an
option to allow users enabling and disabling it as needed.
Signed-off-by: Tomita Moeko
ammed to GTT entries by VBIOS
running in guest are valid GPA, and this unnecessary adjustment brings
inconsistency.
[1]
https://gitlab.com/qemu-project/seabios/-/blob/1.12-stable/src/fw/pciinit.c#L319-332
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c
reserve a memory region for DSM and program
the BDSM register with the base address of that region, that's actually
what both SeaBIOS[1] and IgdAssignmentDxe does now.
[1]
https://gitlab.com/qemu-project/seabios/-/blob/1.12-stable/src/fw/pciinit.c#L319-332
Signed-off-by: Tomita Moeko
---
hw
, it returns and
proceeds on error. Later it will fail on error after decoupling the
quirks from legacy mode.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c| 21 -
hw/vfio/pci-quirks.c | 6 +-
hw/vfio/pci.h| 2 +-
3 files changed, 18 insertions(+), 11
IGD devices require device-specific quirk to be applied to their PCI
config space. Currently, it is put in the BAR4 quirk that does nothing
to BAR4 itself. Add a placeholder for PCI config space quirks to hold
that quirk later.
Signed-off-by: Tomita Moeko
---
hw/vfio/pci-quirks.c | 5 +
hw
not (passthrough), and then applies corresponding quirks.
As before, users must manually specify x-igd-opregion=on to enable it
on KVMGT devices. In the future, we may check the VID/DID and enable
OpRegion automatically.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 27
dditionally, the hotplug check in legacy mode is removed as hotplugging
IGD device is never supported, and it will be checked when enabling the
OpRegion quirk.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 127 +-
hw/vfio/pci.c | 2 +
hw/vfio/
Both enable OpRegion option (x-igd-opregion) and legacy mode require
setting up OpRegion copy for IGD devices. As the config quirk no longer
depends on legacy mode, we can now handle x-igd-opregion option there
instead of in vfio_realize.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 14
A new option will soon be introduced to decouple the LPC bridge/Host
bridge ID quirk from legacy mode. To prepare for this, move the LPC
bridge initialization into a separate function.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 122 +-
1 file
KVMGT/GVT-g fail.
Link: https://lore.kernel.org/all/20250303175220.74917-1-tomitamo...@gmail.com/
v2:
* Keep legacy mode for compatbility
* Renamed from "vfio/igd: Remove legacy mode"
Link: https://lore.kernel.org/all/20250224182927.31519-1-tomitamo...@gmail.com/
Tomita Moeko (10):
On 3/4/25 15:17, Corvin Köhne wrote:
> On Tue, 2025-03-04 at 01:52 +0800, Tomita Moeko wrote:
>> Though GTT Stolen Memory (GSM) is right below Data Stolen Memory (DSM)
>> in host address space, direct access to GSM is prohibited, and it is
>> not mapped to guest address space
removed after we decouple it
from legacy mode.
Additionally, move vfio_pci_igd_opregion_init to igd.c to prevent it
from being compiled in non-x86 builds.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c| 101 +++
hw/vfio/pci-quirks.c | 50
, it returns and
proceeds on error. Later it will fail on error after decoupling the
quirks from legacy mode.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c| 21 -
hw/vfio/pci-quirks.c | 6 +-
hw/vfio/pci.h| 2 +-
3 files changed, 18 insertions(+), 11
IGD devices require device-specific quirk to be applied to their PCI
config space. Currently, it is put in the BAR4 quirk that does nothing
to BAR4 itself. Add a placeholder for PCI config space quirks to hold
that quirk later.
Signed-off-by: Tomita Moeko
---
hw/vfio/pci-quirks.c | 5 +
hw
Both enable OpRegion option (x-igd-opregion) and legacy mode require
setting up OpRegion copy for IGD devices. As the config quirk no longer
depends on legacy mode, we can now handle x-igd-opregion option there
instead of in vfio_realize.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 14
A new option will soon be introduced to decouple the LPC bridge/Host
bridge ID quirk from legacy mode. To prepare for this, move the LPC
bridge initialization into a separate function.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 122 +-
1 file
occurs when
setting up legacy mode, instead of simply continues like before. If
legacy mode is unwanted, it can be explicitly disabled by
x-igd-legacy-mode=off.
Additionally, the hotplug check in legacy mode is removed as it will be
checked when enabling the OpRegion quirk.
Signed-off-by: Tomita
The LPC bridge/Host bridge IDs quirk is also not dependent on legacy
mode. Recent Windows driver no longer depends on these IDs, as well as
Linux i915 driver, while UEFI GOP seems still needs them. Make it an
option to allow users enabling and disabling it as needed.
Signed-off-by: Tomita Moeko
ammed to GTT entries by VBIOS
running in guest are valid GPA, and this unnecessary adjustment brings
inconsistency.
[1]
https://gitlab.com/qemu-project/seabios/-/blob/1.12-stable/src/fw/pciinit.c#L319-332
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c
"vfio/igd: Remove legacy mode"
Link: https://lore.kernel.org/all/20250224182927.31519-1-tomitamo...@gmail.com/
Tomita Moeko (9):
vfio/igd: Remove GTT write quirk in IO BAR 4
vfio/igd: Do not include GTT stolen size in etc/igd-bdsm-size
vfio/igd: Consolidate OpRegion initializat
reserve a memory region for DSM and program
the BDSM register with the base address of that region, that's actually
what both SeaBIOS[1] and OVMF does now.
[1]
https://gitlab.com/qemu-project/seabios/-/blob/1.12-stable/src/fw/pciinit.c#L319-332
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c
As suggested by Cédric, I'm glad to be a maintainer of vfio-igd.
Signed-off-by: Tomita Moeko
---
MAINTAINERS | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1911949526..c6ed2f46f0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21
Hello Cédric,
On 2/27/25 16:28, Cédric Le Goater wrote:
> Hello Tomita,
>
> +Corvin
>
> On 2/24/25 19:29, Tomita Moeko wrote:
>> This patchset removes some legacy checks and converts the legacy mode
>> implicitly enabled by BDF 00:02.0 into x-igd-* options, including
removed later after the
removal of legacy mode.
Additionally, move vfio_pci_igd_opregion_init to igd.c to prevent it
from being compiled in non-x86 builds.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c| 111 +--
hw/vfio/pci-quirks.c | 50
being 00:02.0,
but guest drivers like EFI GOP driver still hardcodes the BDF. It is
highly recommended to assign IGD to 00:02.0.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 38 +-
hw/vfio/pci.c | 11 ++-
hw/vfio/pci.h | 3 +++
3 files changed, 14
, it returns and
proceeds on error. Later it will fail on error after the removal of
legacy mode.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c| 16 +---
hw/vfio/pci-quirks.c | 6 +-
hw/vfio/pci.h| 2 +-
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git
enable VGA access for IGD, use the common x-vga option
explicily.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index 4ae1122a2d..32ae263c23 100644
--- a/hw/vfio/igd.c
+++ b/hw
IGD devices require device-specific quirk to be applied to their PCI
config space. Currently, it is put in the BAR4 quirk that does nothing
to BAR4 itself. Add a placeholder for PCI config space quirks to hold
that quirk later.
Signed-off-by: Tomita Moeko
---
hw/vfio/pci-quirks.c | 5 +
hw
Legacy VBIOS support was removed in Gen 11 and later IGD devices. While
we usually uses romfile for IGD-related DXE drivers, it's not always
necessary. Remove the ROM BAR requirement for legacy mode to support
newer devices without a specified romfile.
Signed-off-by: Tomita Moeko
---
hw
reserve a memory region for DSM and program
the BDSM register with the base address of that region, that's actually
what both SeaBIOS[1] and OVMF does now.
[1]
https://gitlab.com/qemu-project/seabios/-/blob/1.12-stable/src/fw/pciinit.c#L319-332
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c
ff-by: Tomita Moeko
---
hw/vfio/igd.c | 191 +-
1 file changed, 1 insertion(+), 190 deletions(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index b1a237edd6..ca3a32f4f2 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -106,12 +106,6 @@ static int ig
A new option will soon be introduced to control whether to apply the
LPC bridge/Host bridge ID quirk for the removal of implicit legacy mode.
To prepare for this, move the LPC bridge initialization into a separate
function.
Signed-off-by: Tomita Moeko
---
hw/vfio/igd.c | 125
vfio_populate_vga is no longer called in igd.c. Make it static.
Signed-off-by: Tomita Moeko
---
hw/vfio/pci.c | 2 +-
hw/vfio/pci.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 89d900e9cf..1c45e3987e 100644
--- a/hw/vfio/pci.c
+++ b
1 - 100 of 181 matches
Mail list logo