Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-21 Thread Thomas Blume
On Fri, 18 Jul 2014, Dan Horák wrote: On Fri, 18 Jul 2014 13:42:21 +0200 (CEST) Thomas Blume wrote: Ok, thanks for the input. Attached is the new patch. Thomas, do you know whether the VM00 info always refer to the top-level virt, where the Linux guest runs? I've already seen a 2nd level z/

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-18 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Jul 18, 2014 at 01:42:21PM +0200, Thomas Blume wrote: > On Tue, 8 Jul 2014, Lennart Poettering wrote: > Ok, thanks for the input. > Attached is the new patch. I didn't apply. But I applied it by hand because I wanted to change it anyway. Although Lennart suggested putting variable definitio

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-18 Thread Dan Horák
On Fri, 18 Jul 2014 13:42:21 +0200 (CEST) Thomas Blume wrote: > On Tue, 8 Jul 2014, Lennart Poettering wrote: > > >> > >> PR/SM is the hypervisor, so it should be detected as *not* > >> virtualized, which mean that it does not get any _id string. For > >> the virtualized systems on top, yes, it'

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-18 Thread Thomas Blume
On Tue, 8 Jul 2014, Lennart Poettering wrote: PR/SM is the hypervisor, so it should be detected as *not* virtualized, which mean that it does not get any _id string. For the virtualized systems on top, yes, it'd be nice to be able to distinguish them, iff there are clear and unamigous distincti

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-08 Thread Lennart Poettering
On Tue, 08.07.14 19:59, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > > On Tue, Jul 08, 2014 at 02:53:22PM +0200, Thomas Blume wrote: > > -->-- > > In other words, PR/SM transforms physical resources into virtual resources > > so > > that many logical partitions can share the same phy

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-08 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jul 08, 2014 at 02:53:22PM +0200, Thomas Blume wrote: > -->-- > In other words, PR/SM transforms physical resources into virtual resources so > that many logical partitions can share the same physical resources. > --<-- > > Still, from the OS point of view, the shared virtual resource is r

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-08 Thread Thomas Blume
On Mon, 7 Jul 2014, Lennart Poettering wrote: Ah! OK! Then I think a patch that simply returns a generic "s390" id for all s390 + s390x systems would be a good idea. i.e. when we compile for s390/s390x we should just return that string unconditionally, without checking anything else. Please p

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Lennart Poettering
On Mon, 07.07.14 17:32, Thomas Blume (thomas.bl...@suse.com) wrote: > > On Mon, 7 Jul 2014, Lennart Poettering wrote: > > >>IMHO the main difference is the level of maturity. > >>z/VM is about 30 years old and has a huge amount of tools for everything you > >>could imagine. KVM is relatively new

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Thomas Blume
On Mon, 7 Jul 2014, Lennart Poettering wrote: IMHO the main difference is the level of maturity. z/VM is about 30 years old and has a huge amount of tools for everything you could imagine. KVM is relatively new and under heavy development. Furthermore, KVM is bound to the linux kernel, while z/V

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Lennart Poettering
On Mon, 07.07.14 16:37, Thomas Blume (thomas.bl...@suse.com) wrote: > > On Mon, 7 Jul 2014, Lennart Poettering wrote: > > >>For the test, e.g. ConditionVirtualization, there would be no difference. > >>I only distinguished this in order to have systemd-detect-virt showing the > >>correct virtual

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Thomas Blume
On Mon, 7 Jul 2014, Lennart Poettering wrote: For the test, e.g. ConditionVirtualization, there would be no difference. I only distinguished this in order to have systemd-detect-virt showing the correct virtualization technology. Sure we could cover everything under something like, e.g. "s390 vi

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Lennart Poettering
On Mon, 07.07.14 12:57, Thomas Blume (thomas.bl...@suse.com) wrote: > > On Mon, 7 Jul 2014, Lennart Poettering wrote: > > >>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, u

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Dan Horák
On Mon, 7 Jul 2014 12:22:19 +0200 (CEST) Thomas Blume wrote: > On Fri, 4 Jul 2014, Dan Horák wrote: > > > On Fri, 4 Jul 2014 15:07:18 +0200 (CEST) > > Thomas Blume wrote: > > > >> systemd was lacking the code to detect virtualization on s390x. > >> The patch adds detection for the primary virtu

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Thomas Blume
On Mon, 7 Jul 2014, Lennart Poettering wrote: 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 po

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Lennart Poettering
On Mon, 07.07.14 12:18, Thomas Blume (thomas.bl...@suse.com) wrote: > > 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 syste

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Marco d'Itri
On Jul 07, Thomas Blume wrote: > Hm, s390 (32 bit) is quiet ancient. > Not sure if anyone would use such old systems with a pretty recent linux > version shipping systemd. > But if there are some use cases, of course we could do this. Debian recently killed the s390 port in favour of s390x, so if

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Thomas Blume
On Fri, 4 Jul 2014, Zbigniew Jędrzejewski-Szmek wrote: +#if defined(__s390x__) +/* First layer virtualization (PR/SM) is always present on s390x */ +_id = "PR/SM"; +r = 1; What does this mean? Is it like XEN dom0, i.e. normianally a virtuallized OS, but one that has full

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Thomas Blume
On Fri, 4 Jul 2014, Dan Horák wrote: On Fri, 4 Jul 2014 15:07:18 +0200 (CEST) Thomas Blume wrote: systemd was lacking the code to detect virtualization on s390x. The patch adds detection for the primary virtualization layer (PR/SM) as well as for secondary layers (z/VM and KVM). --- src/sha

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-07 Thread Thomas Blume
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 X

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-04 Thread Lennart Poettering
On Fri, 04.07.14 15:07, Thomas Blume (thomas.bl...@suse.com) wrote: > +#if defined(__s390x__) > +/* First layer virtualization (PR/SM) is always present on s390x */ > +_id = "PR/SM"; > +r = 1; Well, this is not useful, this is about detecting whether the OS we run in is th

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-04 Thread Dan Horák
On Fri, 4 Jul 2014 15:07:18 +0200 (CEST) Thomas Blume wrote: > systemd was lacking the code to detect virtualization on s390x. > The patch adds detection for the primary virtualization layer (PR/SM) > as well as for secondary layers (z/VM and KVM). > --- > src/shared/virt.c | 24 +++

Re: [systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-04 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Jul 04, 2014 at 03:07:18PM +0200, Thomas Blume wrote: > systemd was lacking the code to detect virtualization on s390x. > The patch adds detection for the primary virtualization layer (PR/SM) > as well as for secondary layers (z/VM and KVM). > --- > src/shared/virt.c | 24 +

[systemd-devel] [PATCH] systemd-detect-s390-virt: add virtualization detection on s390x

2014-07-04 Thread Thomas Blume
systemd was lacking the code to detect virtualization on s390x. The patch adds detection for the primary virtualization layer (PR/SM) as well as for secondary layers (z/VM and KVM). --- src/shared/virt.c | 24 1 file changed, 24 insertions(+) diff --git a/src/shared/virt