On 7/11/19 6:15 PM, Peter Krempa wrote:
On Thu, Jul 11, 2019 at 17:54:15 +0200, Michal Privoznik wrote:
> This capability tracks if qemu is capable of:
>
> -drive file.driver=nvme
>
> The feature was added in QEMU's commit of v2.12.0-rc0~104^2~2.
>
> Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
> ---
> src/qemu/qemu_capabilities.c | 4 ++++
> src/qemu/qemu_capabilities.h | 3 +++
> tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
> tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
> tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
> tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
> tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 +
> tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 +
> 20 files changed, 25 insertions(+)
I've seen a few patches for the userspace NVMe stuff recently are you
sure that it will work with qemu as old as 2.12?
No. But qemu reports it supports NVMe since 2.12. Unless we want to do a
version check in addition to this I'm not sure how to have the
capability only for 'newer' qemus (and what 'newer' means actually).
The worst thing that could happen is that qemu will fail to start /
crash and libvirt reattaches NVMe back to the host. But that's the risk
with any feature, isn't it?
Michal