Skip to contentSkip to conversation

Hacking QEMU/KVM to use unused graphics adapters

DISCUSSION Anthony de Almeida Lopes 4 participants 8 messages Oct 11, 2007 – Jan 16, 2008 8 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

I was curious if anyone thinks that it may be possible to get a KVM-patched QEMU to use a real video card? For example, let's say I had a second video card. Is QEMU/kvm a codebase which would support hacking in the ability to utilize this second video card (one not utilized by the host Linux)? And in the situation of a laptop, would it be possible to boot the host Linux in a way that it would not utilize the video card, but get a qemu guest to use it?
Theoretically, there's no reason this isn't possible, right?

Thanks,
- Tony

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 8 lines · Anthony de Almeida Lopes

I was curious if anyone thinks that it may be possible to get a KVM-patched QEMU to use a real video card? For example, let's say I had a second video card. Is QEMU/kvm a codebase which would support hacking in the ability to utilize this second video card (one not utilized by the host Linux)? And in the situation of a laptop, would it be possible to boot the host Linux in a way that it would not utilize the video card, but get a qemu guest to use it?
Theoretically, there's no reason this isn't possible, right?

We need something like a "PCI proxy" allowing to route some I/O to virtual PCI devices and others to real PCI devices. Moreover we must be able to inform host kernel to not manage a given PCI card (or be able to hot unplug it from host kernel PCI structures)

Laurent

Signature · 2 lines
---------------- Laurent.Vivier-6ktuUTfB/[email protected]  -----------------
"Given enough eyeballs, all bugs are shallow" E. S. Raymond

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 470DDBC5.90401-6ktuUTfB/[email protected]

#4 lore raw
Quoted 11 lines · Laurent Vivier
Quoted 8 lines · Anthony de Almeida Lopes

I was curious if anyone thinks that it may be possible to get a KVM-patched QEMU to use a real video card? For example, let's say I had a second video card. Is QEMU/kvm a codebase which would support hacking in the ability to utilize this second video card (one not utilized by the host Linux)? And in the situation of a laptop, would it be possible to boot the host Linux in a way that it would not utilize the video card, but get a qemu guest to use it?
Theoretically, there's no reason this isn't possible, right?

Quoted 8 lines

We need something like a "PCI proxy" allowing to route some I/O to virtual PCI
devices and others to real PCI devices. Moreover we must be able to inform host
kernel to not manage a given PCI card (or be able to hot unplug it from host
kernel PCI structures)

There is work in progress for pci pass through capability. Besides PCI it also required to have pv dma or 1-1 mapping between the guest and the host. Both will be released in the following month. NIC pass through works but I'm not sure about the features required from VGA pass through.
Dor.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): 470DDF9F.6040509-atKUWr5tajBWk0Htik3J/[email protected]

#6 lore raw
Quoted 20 lines · Dor Laor
Quoted 11 lines · Laurent Vivier
Quoted 8 lines · Anthony de Almeida Lopes

I was curious if anyone thinks that it may be possible to get a KVM-patched QEMU to use a real video card? For example, let's say I had a second video card. Is QEMU/kvm a codebase which would support hacking in the ability to utilize this second video card (one not utilized by the host Linux)? And in the situation of a laptop, would it be possible to boot the host Linux in a way that it would not utilize the video card, but get a qemu guest to use it?
Theoretically, there's no reason this isn't possible, right?

Quoted 8 lines

We need something like a "PCI proxy" allowing to route some I/O to virtual PCI
devices and others to real PCI devices. Moreover we must be able to inform host
kernel to not manage a given PCI card (or be able to hot unplug it from host
kernel PCI structures)

Quoted 6 lines

There is work in progress for pci pass through capability. Besides PCI it also required to have pv dma or 1-1 mapping between the guest and the host. Both will be released in the following month. NIC pass through works but I'm
not sure about the features required from VGA pass through. Dor.

Perhaps if we use host IOMMU we don't need pv DMA ?
How do you say to host to not manage a PCI devices and let the guest managing it ?

Laurent

Signature · 2 lines
---------------- Laurent.Vivier-6ktuUTfB/[email protected]  -----------------
"Given enough eyeballs, all bugs are shallow" E. S. Raymond

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 470DE18F.1080901-6ktuUTfB/[email protected]

#8 lore raw
Quoted 7 lines · Laurent Vivier
Quoted 5 lines

There is work in progress for pci pass through capability. Besides PCI it also required to have pv dma or 1-1 mapping between the guest and the host. Both will be released in the following month. NIC pass through works but I'm not sure about the features required from VGA pass through. Dor.

Perhaps if we use host IOMMU we don't need pv DMA ?

Indeed, an IOMMU can provide the 1-1 mapping Dor mentioned above (or you can have both PV DMA and an IOMMU).

Quoted 2 lines

How do you say to host to not manage a PCI devices and let the guest managing it ?

If the host driver is modular, it might be enough to just not load (or unload) it.

Cheers,
Muli

Signature · 10 lines
SYSTOR 2007 --- 1st Annual Haifa Systems and Storage Conference 2007
http://www.haifa.il.ibm.com/Workshops/systor2007/

Virtualization workshop: Oct 29th, 2007 | Storage workshop: Oct 30th, 2007

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): 20071011103648.GP4335-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org

#10 lore raw
Quoted 20 lines · Muli Ben-Yehuda
Quoted 8 lines · Laurent Vivier
Quoted 6 lines

There is work in progress for pci pass through capability. Besides PCI it also required to have pv dma or 1-1 mapping between the guest and the host. Both will be released in the following month. NIC pass through works but I'm not sure about the features required from VGA pass through. Dor.

Perhaps if we use host IOMMU we don't need pv DMA ?

Indeed, an IOMMU can provide the 1-1 mapping Dor mentioned above (or you can have both PV DMA and an IOMMU).

Quoted 3 lines

How do you say to host to not manage a PCI devices and let the guest managing it ?

Quoted 6 lines

If the host driver is modular, it might be enough to just not load (or unload) it.

Cheers,
Muli

Thank you for your responses. I was curious, Dor, where could I take a look at this code?
I checked both sets of recent git logs and nothing popped out at me as being related. Is it still out-of-tree?

Thanks again,
- Tony

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 47152328.3070708-atKUWr5tajBWk0Htik3J/[email protected]

#13 lore raw

I just read the ChangeLogs from kvm-47 to kvm-59 but I didn't notice anything that about PCI pass-through or any VGA work. I'm curious how things are going and what method was selected to accomplish this functionality?
- Tony

Quoted 53 lines · Dor Laor

It's still out-of -tree.
Not for long :)

Quoted 47 lines · Anthony de Almeida Lopes
Quoted 15 lines · Muli Ben-Yehuda
Quoted 8 lines · Laurent Vivier
Quoted 6 lines

There is work in progress for pci pass through capability. Besides PCI it also required to have pv dma or 1-1 mapping between the guest and the host. Both will be released in the following month. NIC pass through works but I'm not sure about the features required from VGA pass through. Dor.

Perhaps if we use host IOMMU we don't need pv DMA ?

Indeed, an IOMMU can provide the 1-1 mapping Dor mentioned above (or you can have both PV DMA and an IOMMU).

Quoted 9 lines
Quoted 3 lines

How do you say to host to not manage a PCI devices and let the guest managing it ?

If the host driver is modular, it might be enough to just not load (or unload) it.

Cheers,
Muli

Thank you for your responses. I was curious, Dor, where could I take a look at this code?
I checked both sets of recent git logs and nothing popped out at me as being related. Is it still out-of-tree?

Thanks again,
- Tony

-------------------------------------------------------------------------

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 6 lines · Anthony de Almeida Lopes

I just read the ChangeLogs from kvm-47 to kvm-59 but I didn't notice anything that about PCI pass-through or any VGA work. I'm curious how things are going and what method was selected to accomplish this functionality?
- Tony

First we had plans only for plain PCI pass through and not VGA device that has some bios unification possible issues.
Second, we have it working (also all the code was sent to the list) but there's quick an effort to be done in order to merge it into mainline. We do want it to happen but we have some other issues on our plait. Nevertheless, if one wants to push it on
we'll be happy to assist.
Regards,
Dor

Quoted 42 lines
Quoted 41 lines · Dor Laor

It's still out-of -tree.
Not for long :)

Quoted 37 lines · Anthony de Almeida Lopes
Quoted 15 lines · Muli Ben-Yehuda
Quoted 8 lines · Laurent Vivier
Quoted 6 lines

There is work in progress for pci pass through capability. Besides PCI it also required to have pv dma or 1-1 mapping between the guest and the host. Both will be released in the following month. NIC pass through works but I'm not sure about the features required from VGA pass through. Dor.

Perhaps if we use host IOMMU we don't need pv DMA ?

Indeed, an IOMMU can provide the 1-1 mapping Dor mentioned above (or you can have both PV DMA and an IOMMU).

Quoted 9 lines
Quoted 3 lines

How do you say to host to not manage a PCI devices and let the guest managing it ?

If the host driver is modular, it might be enough to just not load (or unload) it.

Cheers,
Muli

Thank you for your responses. I was curious, Dor, where could I take a look at this code?
I checked both sets of recent git logs and nothing popped out at me as being related. Is it still out-of-tree?

Thanks again,
- Tony

-------------------------------------------------------------------------

Quoted 13 lines
Quoted 12 lines
Quoted 10 lines

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/