[libvirt PATCH 08/17] qemu: Make error message accel-agnostic

Andrea Bolognani posted 17 patches 4 years, 1 month ago
There is a newer version of this series
[libvirt PATCH 08/17] qemu: Make error message accel-agnostic
Posted by Andrea Bolognani 4 years, 1 month ago
From: Roman Bolshakov <r.bolshakov@yadro.com>

With more acceleration types, KVM should be used only in error messages
related to KVM.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/qemu/qemu_capabilities.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index eac1e65a39..893af0b635 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5854,8 +5854,8 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
 
     if (virQEMUCapsTypeIsAccelerated(virttype) && capsType == VIR_DOMAIN_VIRT_QEMU) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("KVM is not supported by '%s' on this host"),
-                       binary);
+                       _("the accel '%s' is not supported by '%s' on this host"),
+                       virQEMUCapsAccelStr(virttype), binary);
         return NULL;
     }
 
-- 
2.31.1

Re: [libvirt PATCH 08/17] qemu: Make error message accel-agnostic
Posted by Daniel P. Berrangé 4 years, 1 month ago
On Tue, Jan 04, 2022 at 07:52:47PM +0100, Andrea Bolognani wrote:
> From: Roman Bolshakov <r.bolshakov@yadro.com>
> 
> With more acceleration types, KVM should be used only in error messages
> related to KVM.
> 
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  src/qemu/qemu_capabilities.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index eac1e65a39..893af0b635 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -5854,8 +5854,8 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
>  
>      if (virQEMUCapsTypeIsAccelerated(virttype) && capsType == VIR_DOMAIN_VIRT_QEMU) {
>          virReportError(VIR_ERR_INVALID_ARG,
> -                       _("KVM is not supported by '%s' on this host"),
> -                       binary);
> +                       _("the accel '%s' is not supported by '%s' on this host"),
> +                       virQEMUCapsAccelStr(virttype), binary);
>          return NULL;
>      }

This should have been part of the earlier patch that changed the code
to use virQEMUCapsTypeIsAccelerated


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|