render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
982648
From c535cdd9ab6e9be03beaf412c74495b4eb267ffc Mon Sep 17 00:00:00 2001
982648
Message-Id: <c535cdd9ab6e9be03beaf412c74495b4eb267ffc@dist-git>
982648
From: Peter Krempa <pkrempa@redhat.com>
982648
Date: Thu, 19 Jul 2018 15:03:48 +0200
982648
Subject: [PATCH] qemu: capabilities: Add capability for werror/rerror for
982648
 'usb-device' frontend
982648
MIME-Version: 1.0
982648
Content-Type: text/plain; charset=UTF-8
982648
Content-Transfer-Encoding: 8bit
982648
982648
Support for specifying it with the -device frontend was added recently.
982648
Add a capability for it.
982648
982648
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
982648
Reviewed-by: Ján Tomko <jtomko@redhat.com>
982648
(cherry picked from commit a087a8e60ad62a719165e3c2c9970480b9531062)
982648
982648
https://bugzilla.redhat.com/show_bug.cgi?id=1475770
982648
Signed-off-by: Erik Skultety <eskultet@redhat.com>
982648
Reviewed-by: Ján Tomko <jtomko@redhat.com>
982648
---
982648
 src/qemu/qemu_capabilities.c                     | 2 ++
982648
 src/qemu/qemu_capabilities.h                     | 1 +
982648
 tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
982648
 3 files changed, 4 insertions(+)
982648
982648
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
982648
index 883ca5dab7..0f0020cf7d 100644
982648
--- a/src/qemu/qemu_capabilities.c
982648
+++ b/src/qemu/qemu_capabilities.c
982648
@@ -502,6 +502,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
982648
               "sev-guest",
982648
               "machine.pseries.cap-hpt-max-page-size",
982648
               "machine.pseries.cap-htm",
982648
+              "usb-storage.werror",
982648
     );
982648
 
982648
 
982648
@@ -1241,6 +1242,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsUSBStorage[] = {
982648
     { "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE },
982648
     { "share-rw", QEMU_CAPS_DISK_SHARE_RW },
982648
     { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
982648
+    { "werror", QEMU_CAPS_USB_STORAGE_WERROR },
982648
 };
982648
 
982648
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsKVMPit[] = {
982648
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
982648
index a048a1cf02..1fa0ebfea3 100644
982648
--- a/src/qemu/qemu_capabilities.h
982648
+++ b/src/qemu/qemu_capabilities.h
982648
@@ -486,6 +486,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
982648
     QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */
982648
     QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.cap-hpt-max-page-size */
982648
     QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */
982648
+    QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */
982648
 
982648
     QEMU_CAPS_LAST /* this must always be the last item */
982648
 } virQEMUCapsFlags;
982648
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
982648
index 07e3de8677..d7c25c65dd 100644
982648
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
982648
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
982648
@@ -209,6 +209,7 @@
982648
   <flag name='mch'/>
982648
   <flag name='mch.extended-tseg-mbytes'/>
982648
   <flag name='sev-guest'/>
982648
+  <flag name='usb-storage.werror'/>
982648
   <version>2012050</version>
982648
   <kvmVersion>0</kvmVersion>
982648
   <microcodeVersion>437827</microcodeVersion>
982648
-- 
982648
2.18.0
982648