[libvirt] [PATCH v2 21/33] cpu: Use virCPUData.arch in cpuDecode

Jiri Denemark posted 33 patches 8 years, 11 months ago
There is a newer version of this series
[libvirt] [PATCH v2 21/33] cpu: Use virCPUData.arch in cpuDecode
Posted by Jiri Denemark 8 years, 11 months ago
virCPUDef.arch is not required to be filled in for guest CPU
definitions. It doesn't make sense to artificially mandate it to be set
when cpuDecode is called especially when virCPUData.arch passed to
cpuDecode already contains the architecture.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---

Notes:
    Version 2:
    - no change

 src/cpu/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c
index 45a17bf46..051a58040 100644
--- a/src/cpu/cpu.c
+++ b/src/cpu/cpu.c
@@ -240,7 +240,7 @@ cpuDecode(virCPUDefPtr cpu,
         return -1;
     }
 
-    if ((driver = cpuGetSubDriver(cpu->arch)) == NULL)
+    if ((driver = cpuGetSubDriver(data->arch)) == NULL)
         return -1;
 
     if (driver->decode == NULL) {
-- 
2.11.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 21/33] cpu: Use virCPUData.arch in cpuDecode
Posted by John Ferlan 8 years, 11 months ago

On 02/15/2017 11:44 AM, Jiri Denemark wrote:
> virCPUDef.arch is not required to be filled in for guest CPU
> definitions. It doesn't make sense to artificially mandate it to be set
> when cpuDecode is called especially when virCPUData.arch passed to
> cpuDecode already contains the architecture.
> 
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
> 
> Notes:
>     Version 2:
>     - no change
> 
>  src/cpu/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

ACK

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 21/33] cpu: Use virCPUData.arch in cpuDecode
Posted by Jiri Denemark 8 years, 11 months ago
On Tue, Feb 21, 2017 at 22:24:34 -0500, John Ferlan wrote:
> 
> 
> On 02/15/2017 11:44 AM, Jiri Denemark wrote:
> > virCPUDef.arch is not required to be filled in for guest CPU
> > definitions. It doesn't make sense to artificially mandate it to be set
> > when cpuDecode is called especially when virCPUData.arch passed to
> > cpuDecode already contains the architecture.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> > ---
> > 
> > Notes:
> >     Version 2:
> >     - no change
> > 
> >  src/cpu/cpu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> ACK

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