From: Andreas Hartmann <andihartmann@01019freenet.de>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Andreas Hartmann <andihartmann@01019freenet.de>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org, aik@ozlabs.ru,
Jan Kiszka <jan.kiszka@siemens.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Avi Kivity <avi@redhat.com>, Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2
Date: Mon, 13 Aug 2012 18:36:13 +0200 [thread overview]
Message-ID: <50292CFD.1080903@01019freenet.de> (raw)
In-Reply-To: <1344874489.4683.27.camel@ul30vt.home>
Alex Williamson schrieb:
> On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote:
>> Alex Williamson wrote:
>>> On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote:
>>>> Alex Williamson <alex.williamson@redhat.com> writes:
>>>>
>>>>> VFIO kernel support was just merged into Linux, so I'd like to
>>>>> formally propose inclusion of the QEMU vfio-pci driver for
>>>>> QEMU 1.2. Included here is support for x86 PCI device assignment.
>>>>> PCI INTx is not yet enabled, but devices making use of either MSI
>>>>> or MSI-X work. The level irqfd and eoifd support I've proposed
>>>>> for KVM enable an accelerated patch for this through KVM. I'd
>>>>> like to get this base driver in first and enable the remaining
>>>>> support in-tree.
>>>>>
>>>>> I've split this version up a little from the RFC to make it a bit
>>>>> easier to review. Review comments from Blue Swirl and Avi are
>>>>> already incorporated, including Avi's requests to simplify both
>>>>> the PCI BAR mapping and unmapping paths.
>>>>
>>>> Hi Alex,
>>>>
>>>> Thanks for pushing this forward! Hopefully this will finally kill
>>>> off qemu-kvm.git for good.
>>>>
>>>> I think this series is going to have to wait for 1.3 to open up. We
>>>> have a very short release window for this release and I'd feel a lot
>>>> more comfortable having such a significant feature spend some time in
>>>> the development cycle getting testing/review.
>>>>
>>>> I'd like to see a few Reviewed-by's too for this series before it
>>>> goes in. I expect they won't be hard to get but I also expect it
>>>> will take a few more revisions of this series to get there.
>>>
>>> That's disappointing, but I can understand your reluctance. Blue
>>> Swirl reviewed the RFC and could perhaps add a Reviewed-by. Alexey
>>> has been working on the POWER port and I'm sure could provide a
>>> Reviewed-by. We also have a few early adopters that are already
>>> making use of this code.
>>
>> I'm running qemu with vfio patch since Jun 05, 2012
>> (awilliam-qemu-vfio-v0.14.0-rc0-6402-g323cf9f.tar.gz). I didn't
>> encounter any problem so far.
>>
>> If you like, I could compile a more actual version, too (if there have
>> been any changes).
>
> The only change in the version proposed for qemu is that legacy
> interrupt support has been removed until we can agree on interfaces in
> kvm and plumb an EOI path through qemu. IIRC, the devices you're using
> require legacy interrupt support.
>
>> To see more about my use case:
>> http://permalink.gmane.org/gmane.linux.drivers.rt2x00.user/1051
>>
>> You may add a Tested-by Andreas Hartmann <andihartmann@01019freenet.de>
>> if you like.
>>
>> Unfortunately, I'm only running the vfio VM (kvm) with this version of
>> qemu, but I'm running parallel 4 other VM's with the unchanged version
>> of qemu (kvm-0.15.0-123.2.x86_64), too.
>> One of these 4 VM's uses PCIe passthrough.
>>
>> I now tried to run all VMs with the new version of qemu. At this point,
>> I unfortunately run into a problem with the VM which passes through a
>> PCIe device. The error message is (during start of VM):
>>
>> virsh start VM
>> error: Failed to start domain VM
>> error: internal error process exited while connecting to monitor: qemu-system-x86_64: -device pci-assign,host=04:00.0,id=hostdev0,bus=pci.0,addr=0x6: Parameter 'driver' expects device type
>>
>> The xml file for libvirt looks like this:
>
> libvirt doesn't yet support vfio-pci and current qemu.git doesn't yet
> support pci-assign. To use libvirt for device assignment, your only
> option right now is to use a qemu-kvm.git based version of qemu.
If I'm using your qemu instead of qemu from kvm-0.15 (opensuse package),
this error comes up when passing through a PCIe device, which works
absolutely fine with kvm 0.15. I would have expected, that your qemu
works with the legacy way of handling pcie passthrough, too (with
pci-stub module).
This would mean, that all users get errors if they use the traditional
way. IOW: there are changes needed (which?) to move from kvm 0.15 to
your qemu version.
>
>> <domain type='kvm'>
>> <name>VM</name>
>> <uuid>44444444-4444-2222-7777-111111111111</uuid>
>> <memory>1048576</memory>
>> <currentMemory>262144</currentMemory>
>> <vcpu>1</vcpu>
>> <os>
>> <type arch='x86_64' machine='pc-0.14'>hvm</type>
>> <boot dev='hd'/>
>> </os>
>> <features>
>> <acpi/>
>> <pae/>
>> </features>
>> <clock offset='utc'/>
>> <on_poweroff>destroy</on_poweroff>
>> <on_reboot>restart</on_reboot>
>> <on_crash>destroy</on_crash>
>> <devices>
>> <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
>>
>> <hostdev mode='subsystem' type='pci' managed='yes'>
>> <source>
>> <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
>> </source>
>> </hostdev>
>>
>> <disk type='file' device='disk'>
>> <source file='/hds/vm.qed' type='aio'/>
>> <target dev='vda' bus='virtio'/>
>> <driver name='qemu' type='qed' cache='none'/>
>> </disk>
>>
>> <input type='mouse' bus='ps2'/>
>> <graphics type='vnc' autoport='yes'/>
>> <video>
>> <model type='cirrus' vram='9216' heads='1'/>
>> </video>
>> </devices>
>> </domain>
>>
>>
>> Maybe, this is fixed in a newer version of qemu for vfio?
Kind regards,
Andreas
WARNING: multiple messages have this Message-ID (diff)
From: Andreas Hartmann <andihartmann@01019freenet.de>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Andreas Hartmann <andihartmann@01019freenet.de>,
kvm@vger.kernel.org, aik@ozlabs.ru,
Jan Kiszka <jan.kiszka@siemens.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>,
Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2
Date: Mon, 13 Aug 2012 18:36:13 +0200 [thread overview]
Message-ID: <50292CFD.1080903@01019freenet.de> (raw)
In-Reply-To: <1344874489.4683.27.camel@ul30vt.home>
Alex Williamson schrieb:
> On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote:
>> Alex Williamson wrote:
>>> On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote:
>>>> Alex Williamson <alex.williamson@redhat.com> writes:
>>>>
>>>>> VFIO kernel support was just merged into Linux, so I'd like to
>>>>> formally propose inclusion of the QEMU vfio-pci driver for
>>>>> QEMU 1.2. Included here is support for x86 PCI device assignment.
>>>>> PCI INTx is not yet enabled, but devices making use of either MSI
>>>>> or MSI-X work. The level irqfd and eoifd support I've proposed
>>>>> for KVM enable an accelerated patch for this through KVM. I'd
>>>>> like to get this base driver in first and enable the remaining
>>>>> support in-tree.
>>>>>
>>>>> I've split this version up a little from the RFC to make it a bit
>>>>> easier to review. Review comments from Blue Swirl and Avi are
>>>>> already incorporated, including Avi's requests to simplify both
>>>>> the PCI BAR mapping and unmapping paths.
>>>>
>>>> Hi Alex,
>>>>
>>>> Thanks for pushing this forward! Hopefully this will finally kill
>>>> off qemu-kvm.git for good.
>>>>
>>>> I think this series is going to have to wait for 1.3 to open up. We
>>>> have a very short release window for this release and I'd feel a lot
>>>> more comfortable having such a significant feature spend some time in
>>>> the development cycle getting testing/review.
>>>>
>>>> I'd like to see a few Reviewed-by's too for this series before it
>>>> goes in. I expect they won't be hard to get but I also expect it
>>>> will take a few more revisions of this series to get there.
>>>
>>> That's disappointing, but I can understand your reluctance. Blue
>>> Swirl reviewed the RFC and could perhaps add a Reviewed-by. Alexey
>>> has been working on the POWER port and I'm sure could provide a
>>> Reviewed-by. We also have a few early adopters that are already
>>> making use of this code.
>>
>> I'm running qemu with vfio patch since Jun 05, 2012
>> (awilliam-qemu-vfio-v0.14.0-rc0-6402-g323cf9f.tar.gz). I didn't
>> encounter any problem so far.
>>
>> If you like, I could compile a more actual version, too (if there have
>> been any changes).
>
> The only change in the version proposed for qemu is that legacy
> interrupt support has been removed until we can agree on interfaces in
> kvm and plumb an EOI path through qemu. IIRC, the devices you're using
> require legacy interrupt support.
>
>> To see more about my use case:
>> http://permalink.gmane.org/gmane.linux.drivers.rt2x00.user/1051
>>
>> You may add a Tested-by Andreas Hartmann <andihartmann@01019freenet.de>
>> if you like.
>>
>> Unfortunately, I'm only running the vfio VM (kvm) with this version of
>> qemu, but I'm running parallel 4 other VM's with the unchanged version
>> of qemu (kvm-0.15.0-123.2.x86_64), too.
>> One of these 4 VM's uses PCIe passthrough.
>>
>> I now tried to run all VMs with the new version of qemu. At this point,
>> I unfortunately run into a problem with the VM which passes through a
>> PCIe device. The error message is (during start of VM):
>>
>> virsh start VM
>> error: Failed to start domain VM
>> error: internal error process exited while connecting to monitor: qemu-system-x86_64: -device pci-assign,host=04:00.0,id=hostdev0,bus=pci.0,addr=0x6: Parameter 'driver' expects device type
>>
>> The xml file for libvirt looks like this:
>
> libvirt doesn't yet support vfio-pci and current qemu.git doesn't yet
> support pci-assign. To use libvirt for device assignment, your only
> option right now is to use a qemu-kvm.git based version of qemu.
If I'm using your qemu instead of qemu from kvm-0.15 (opensuse package),
this error comes up when passing through a PCIe device, which works
absolutely fine with kvm 0.15. I would have expected, that your qemu
works with the legacy way of handling pcie passthrough, too (with
pci-stub module).
This would mean, that all users get errors if they use the traditional
way. IOW: there are changes needed (which?) to move from kvm 0.15 to
your qemu version.
>
>> <domain type='kvm'>
>> <name>VM</name>
>> <uuid>44444444-4444-2222-7777-111111111111</uuid>
>> <memory>1048576</memory>
>> <currentMemory>262144</currentMemory>
>> <vcpu>1</vcpu>
>> <os>
>> <type arch='x86_64' machine='pc-0.14'>hvm</type>
>> <boot dev='hd'/>
>> </os>
>> <features>
>> <acpi/>
>> <pae/>
>> </features>
>> <clock offset='utc'/>
>> <on_poweroff>destroy</on_poweroff>
>> <on_reboot>restart</on_reboot>
>> <on_crash>destroy</on_crash>
>> <devices>
>> <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
>>
>> <hostdev mode='subsystem' type='pci' managed='yes'>
>> <source>
>> <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
>> </source>
>> </hostdev>
>>
>> <disk type='file' device='disk'>
>> <source file='/hds/vm.qed' type='aio'/>
>> <target dev='vda' bus='virtio'/>
>> <driver name='qemu' type='qed' cache='none'/>
>> </disk>
>>
>> <input type='mouse' bus='ps2'/>
>> <graphics type='vnc' autoport='yes'/>
>> <video>
>> <model type='cirrus' vram='9216' heads='1'/>
>> </video>
>> </devices>
>> </domain>
>>
>>
>> Maybe, this is fixed in a newer version of qemu for vfio?
Kind regards,
Andreas
next prev parent reply other threads:[~2012-08-13 16:38 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 5:18 [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2 Alex Williamson
2012-08-01 5:18 ` [Qemu-devel] " Alex Williamson
2012-08-01 5:18 ` [PATCH 1/3] vfio: Import vfio kernel header Alex Williamson
2012-08-01 5:18 ` [Qemu-devel] " Alex Williamson
2012-08-01 7:13 ` Jan Kiszka
2012-08-01 7:13 ` [Qemu-devel] " Jan Kiszka
2012-08-01 18:09 ` Alex Williamson
2012-08-01 18:09 ` [Qemu-devel] " Alex Williamson
2012-08-02 9:02 ` Jan Kiszka
2012-08-02 9:02 ` [Qemu-devel] " Jan Kiszka
2012-08-02 16:37 ` Alex Williamson
2012-08-02 16:37 ` [Qemu-devel] " Alex Williamson
2012-08-02 16:45 ` Jan Kiszka
2012-08-02 16:45 ` [Qemu-devel] " Jan Kiszka
2012-08-01 5:18 ` [PATCH 2/3] vfio: vfio-pci device assignment driver Alex Williamson
2012-08-01 5:18 ` [Qemu-devel] " Alex Williamson
2012-08-13 22:18 ` Anthony Liguori
2012-08-13 22:18 ` [Qemu-devel] " Anthony Liguori
2012-08-14 5:25 ` Alex Williamson
2012-08-14 5:25 ` [Qemu-devel] " Alex Williamson
2012-08-14 7:12 ` Stefan Hajnoczi
2012-08-14 7:12 ` [Qemu-devel] " Stefan Hajnoczi
2012-08-14 13:51 ` Alex Williamson
2012-08-14 13:51 ` [Qemu-devel] " Alex Williamson
2012-08-14 15:53 ` Avi Kivity
2012-08-14 15:53 ` [Qemu-devel] " Avi Kivity
2012-08-14 17:23 ` Alex Williamson
2012-08-14 17:23 ` [Qemu-devel] " Alex Williamson
2012-08-15 8:56 ` Avi Kivity
2012-08-15 8:56 ` [Qemu-devel] " Avi Kivity
2012-08-01 5:18 ` [PATCH 3/3] vfio: Enable vfio-pci and mark supported Alex Williamson
2012-08-01 5:18 ` [Qemu-devel] " Alex Williamson
2012-08-01 7:15 ` Jan Kiszka
2012-08-01 7:15 ` [Qemu-devel] " Jan Kiszka
2012-08-01 18:14 ` Alex Williamson
2012-08-01 18:14 ` [Qemu-devel] " Alex Williamson
2012-08-01 19:40 ` Alex Williamson
2012-08-01 19:40 ` [Qemu-devel] " Alex Williamson
2012-08-02 9:03 ` Jan Kiszka
2012-08-02 9:03 ` [Qemu-devel] " Jan Kiszka
2012-08-13 22:19 ` Anthony Liguori
2012-08-13 22:19 ` [Qemu-devel] " Anthony Liguori
2012-08-14 5:27 ` Alex Williamson
2012-08-14 5:27 ` [Qemu-devel] " Alex Williamson
2012-08-14 14:35 ` Avi Kivity
2012-08-14 14:35 ` [Qemu-devel] " Avi Kivity
2012-08-13 13:27 ` [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2 Anthony Liguori
2012-08-13 13:27 ` [Qemu-devel] " Anthony Liguori
2012-08-13 13:58 ` Avi Kivity
2012-08-13 13:58 ` [Qemu-devel] " Avi Kivity
2012-08-13 14:04 ` Jan Kiszka
2012-08-13 14:04 ` [Qemu-devel] " Jan Kiszka
2012-08-13 19:31 ` Anthony Liguori
2012-08-13 19:31 ` [Qemu-devel] " Anthony Liguori
2012-08-14 7:19 ` Jan Kiszka
2012-08-14 7:19 ` [Qemu-devel] " Jan Kiszka
2012-08-14 14:42 ` Avi Kivity
2012-08-14 14:42 ` [Qemu-devel] " Avi Kivity
2012-08-14 14:53 ` Cole Robinson
2012-08-14 14:53 ` [Qemu-devel] " Cole Robinson
2012-08-14 15:04 ` Jan Kiszka
2012-08-14 15:04 ` [Qemu-devel] " Jan Kiszka
2012-08-14 15:28 ` Cole Robinson
2012-08-14 15:28 ` [Qemu-devel] " Cole Robinson
2012-08-13 14:23 ` Alex Williamson
2012-08-13 14:23 ` [Qemu-devel] " Alex Williamson
2012-08-13 15:48 ` Andreas Hartmann
2012-08-13 15:48 ` [Qemu-devel] " Andreas Hartmann
2012-08-13 16:14 ` Alex Williamson
2012-08-13 16:14 ` [Qemu-devel] " Alex Williamson
2012-08-13 16:36 ` Andreas Hartmann [this message]
2012-08-13 16:36 ` Andreas Hartmann
2012-08-13 16:57 ` Alex Williamson
2012-08-13 16:57 ` [Qemu-devel] " Alex Williamson
2012-08-13 18:32 ` Andreas Hartmann
2012-08-13 18:32 ` [Qemu-devel] " Andreas Hartmann
2012-08-13 19:33 ` Anthony Liguori
2012-08-13 19:33 ` [Qemu-devel] " Anthony Liguori
2012-08-13 20:48 ` Blue Swirl
2012-08-13 20:48 ` [Qemu-devel] " Blue Swirl
2012-08-13 20:56 ` Alex Williamson
2012-08-13 20:56 ` [Qemu-devel] " Alex Williamson
2012-08-13 20:55 ` VFIO: Call for reviewers (was Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2) Alex Williamson
2012-08-13 20:55 ` [Qemu-devel] " Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50292CFD.1080903@01019freenet.de \
--to=andihartmann@01019freenet.de \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=blauwirbel@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.