Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

q35直通输出还没有首发呢,我们讨论下q35怎么实现吧。 #1

Open
zncs520 opened this issue Sep 10, 2023 · 4 comments
Open

Comments

@zncs520
Copy link

zncs520 commented Sep 10, 2023

实验了ovmf和oprom的方式,都很完美。
就剩下q35机型直通输出了,目前没有头绪,定制qemu的让q35支持传统模式 这个还无头绪呢

@gangqizai
Copy link
Owner

QEMU 代码陈旧,不支持Q35下Igd Leagcy Mode。

看QEMU的代码:

https://github.com/qemu/qemu/blob/master/hw/vfio/igd.c
/*
* We need to create an LPC/ISA bridge at PCI bus address 00:1f.0 that we
* can stuff host values into, so if there's already one there and it's not
* one we can hack on, legacy mode is no-go. Sorry Q35.
*/
lpc_bridge = pci_find_device(pci_device_root_bus(&vdev->pdev),
0, PCI_DEVFN(0x1f, 0));
if (lpc_bridge && !object_dynamic_cast(OBJECT(lpc_bridge),
"vfio-pci-igd-lpc-bridge")) {
error_report("IGD device %s cannot support legacy mode due to existing "
"devices at address 1f.0", vdev->vbasedev.name);
return;
}

你把这段代码去了,估计可以了,你可以试试!

@cmd2001
Copy link

cmd2001 commented Oct 8, 2023

简单来说Q35PCI地址00:1f.0被一个LPC/ISA bridge占据了,不能拿来放核显。
但你如果改代码把这个LPC/ISA bridge去掉,应该可以。会损失一些功能。

@ousui
Copy link

ousui commented Oct 12, 2023

简单来说Q35PCI地址00:1f.0被一个LPC/ISA bridge占据了,不能拿来放核显。 但你如果改代码把这个LPC/ISA bridge去掉,应该可以。会损失一些功能。

有没有可能启动的时候把被占的这个设备映射成其他的,然后再拿来放核显

@cmd2001
Copy link

cmd2001 commented Oct 13, 2023

简单来说Q35PCI地址00:1f.0被一个LPC/ISA bridge占据了,不能拿来放核显。 但你如果改代码把这个LPC/ISA bridge去掉,应该可以。会损失一些功能。

有没有可能启动的时候把被占的这个设备映射成其他的,然后再拿来放核显

如gangqizai的回答,需要对qemu代码进行修改并重新打包。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants