Change in vdsm[master]: cpuinfo: add predicates for x86 and ppc platform detection

mpolednik at redhat.com mpolednik at redhat.com
Wed Dec 23 14:19:43 UTC 2015


Martin Polednik has posted comments on this change.

Change subject: cpuinfo: add predicates for x86 and ppc platform detection
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.ovirt.org/#/c/50894/1/vdsm/caps.py
File vdsm/caps.py:

Line 97:     def is_ppc(cls, arch):
Line 98:         return arch in cls.POWER
Line 99: 
Line 100:     @classmethod
Line 101:     def is_x86(cls, arch):
> Do we supprot x86 and x86_64? seems that we support only x86_64, so better 
I went with the base platform rather then specifying it's details in the name (such as 64 bit variant). This is consistent with engine naming introduced in I3ea00eca676b243c6c68bf76f0067160b43fe4e4 (https://gerrit.ovirt.org/#/c/49299/).
Line 102:         return arch == cls.X86_64
Line 103: 
Line 104: 
Line 105: class CpuInfo(object):


Line 416:     if Architecture.is_x86(arch):
Line 417:         arch = 'x86'
Line 418: 
Line 419:     # Same goes for ppc64le
Line 420:     if Architecture.is_ppc(arch):
> This will match now both PPC64 and PPC64LE - is this the intent? If it is, 
That may be quite controversial. The idea is that 'ppc64' is what libvirt uses, and it also happens to be the BE version / powerKVM version. This change should not affect anything, but it might make sense to split it.
Line 421:         arch = 'ppc64'
Line 422: 
Line 423:     architectureElement = None
Line 424: 


https://gerrit.ovirt.org/#/c/50894/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 1668:         domxml._appendAgentDevice(self._qemuguestSocketFile.decode('utf-8'),
Line 1669:                                   _QEMU_GA_DEVICE_NAME)
Line 1670:         domxml.appendInput()
Line 1671: 
Line 1672:         if caps.Architecture.is_ppc(self.arch):
> Previously this matched only PPC64, not it will match also PPC64LE - is thi
This is wrong, thank you for pointing it out. More thorough checks inc!
Line 1673:             domxml.appendEmulator()
Line 1674: 
Line 1675:         self._appendDevices(domxml)
Line 1676: 


-- 
To view, visit https://gerrit.ovirt.org/50894
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0981367436ddfbfabfd3484019b96831e31f9609
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list