[systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x
Thomas Blume
Thomas.Blume at suse.com
Mon Jul 7 03:18:00 PDT 2014
On Fri, 4 Jul 2014, Lennart Poettering wrote:
>> + _id = "PR/SM";
>> + r = 1;
>
> Well, this is not useful, this is about detecting whether the OS we run
> in is the closest to the hardware of the system or is is removed from it
> via some virtualization layer.
>
> This definition means that on Xen dom0 is not considered virtualization,
> but domU is.
>
> It appears to be that it's similar here, and hence the above makes
> little sense.
Actually it is like there is no dom0 on s390(x).
Direct hardware access is done on a level where the operating system doesn't
have any influence.
For example, unlike Xen dom0, the disks are never physical devices, they are
only shares of a storage pool.
Same is true for e.g. the CPUs or the main memory. It is all virtualized.
Some functions, like e.g. SMART for the disks, just doesn't make sense here.
Even if PR/SM is closer to the hardware than z/VM or KVM, the behaviour is the
same. There is no useful SMART information.
Hence, we've opted to always have ConditionVirtualization=true on this
architecture to suppress functionality that only applies to real hardware.
Another approach would be to create a new parameter that covers this on the
s390(x) architecture.
Any thoughts?
> Please declare variables at the beginning of blocks, not in the
> middle. WHile C99 allows that we do not make use of that in systemd, and
> tried to keep variable declaration seperate from code.
ok
> We use lower-case ids only so far, without special characters. Also,
> given that you detect kvm with this, you should use the existing kvm
> identifier.
Seems that the existing kvm detection relies on CPUID and the code tells:
-->--
/* Both CPUID and DMI are x86 specific interfaces... */
--<--
> All new ids also need to be added to the various bits of documentation,
> in particular systemd-detect-virt(1) and systemd.unit(5).
ok
Regards
Thomas
More information about the systemd-devel
mailing list