Re: [libvirt] [PATCH v2 06/33] qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs

2017-02-22 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 09:24:33 -0500, John Ferlan wrote:
> 
> 
> On 02/15/2017 11:44 AM, Jiri Denemark wrote:
> > All features the function is currently supposed to filter out are
> > specific to x86_64. We should avoid removing them on other
> > architectures. It seems to be quite unlikely other achitectures would
> > use the same names, but one can never be sure.
> > 
> > Signed-off-by: Jiri Denemark 
> > ---
> > 
> > Notes:
> > Version 2:
> > - no change
> > 
> >  src/qemu/qemu_capabilities.c | 10 --
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> 
> This works since the only filtered features happen to be X86 features,
> right? If so, then that assumption could eventually change and someone
> would have to know to dig into virQEMUCapsCPUFilterFeatures to change...
> 
> Just thinking while typing...
> 
> ACK to what's here

Thanks. I pushed it since it didn't have any dependencies on the other
patches in this series.

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH v2 06/33] qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs

2017-02-21 Thread John Ferlan


On 02/15/2017 11:44 AM, Jiri Denemark wrote:
> All features the function is currently supposed to filter out are
> specific to x86_64. We should avoid removing them on other
> architectures. It seems to be quite unlikely other achitectures would
> use the same names, but one can never be sure.
> 
> Signed-off-by: Jiri Denemark 
> ---
> 
> Notes:
> Version 2:
> - no change
> 
>  src/qemu/qemu_capabilities.c | 10 --
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 

This works since the only filtered features happen to be X86 features,
right? If so, then that assumption could eventually change and someone
would have to know to dig into virQEMUCapsCPUFilterFeatures to change...

Just thinking while typing...

ACK to what's here

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH v2 06/33] qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs

2017-02-15 Thread Jiri Denemark
All features the function is currently supposed to filter out are
specific to x86_64. We should avoid removing them on other
architectures. It seems to be quite unlikely other achitectures would
use the same names, but one can never be sure.

Signed-off-by: Jiri Denemark 
---

Notes:
Version 2:
- no change

 src/qemu/qemu_capabilities.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c5e57b4ab..0be2301cb 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3030,8 +3030,13 @@ virQEMUCapsProbeQMPGICCapabilities(virQEMUCapsPtr 
qemuCaps,
 
 static bool
 virQEMUCapsCPUFilterFeatures(const char *name,
- void *opaque ATTRIBUTE_UNUSED)
+ void *opaque)
 {
+virQEMUCapsPtr qemuCaps = opaque;
+
+if (!ARCH_IS_X86(qemuCaps->arch))
+return true;
+
 if (STREQ(name, "cmt") ||
 STREQ(name, "mbm_total") ||
 STREQ(name, "mbm_local"))
@@ -3128,7 +3133,8 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
 goto error;
 
 if (virCPUDefCopyModelFilter(cpu, caps->host.cpu, true,
- virQEMUCapsCPUFilterFeatures, NULL) < 0)
+ virQEMUCapsCPUFilterFeatures,
+ qemuCaps) < 0)
 goto error;
 }
 
-- 
2.11.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list