[libvirt] [PATCH v1 28/31] qemu_capabilities: Introduce QEMU_CAPS_DRIVE_NVME

Michal Privoznik mprivozn at redhat.com
Thu Jul 11 16:19:24 UTC 2019


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 at 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




More information about the libvir-list mailing list