Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type"): > On Wed, Jun 21, 2017 at 04:24:33PM +0200, Olaf Hering wrote: > > On Thu, Jun 15, Juergen Gross wrote: > > > +++ b/tools/misc/xen-detect.c > >

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Olaf Hering
On Wed, Jun 21, Wei Liu wrote: > Hmm... your gcc seems to be rather strict. :-) Yes, all of them: https://build.opensuse.org/package/show/home:olh:xen-unstable/xen All red. :-) Olaf signature.asc Description: PGP signature ___ Xen-devel mailing

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 04:24:33PM +0200, Olaf Hering wrote: > On Thu, Jun 15, Juergen Gross wrote: > > > +++ b/tools/misc/xen-detect.c > > > +asprintf(, "V%u.%u", > > + (uint16_t)(regs[0] >> 16), (uint16_t)regs[0]); > > > +asprintf(, "V%s.%s", str, tmp); > >

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Olaf Hering
On Thu, Jun 15, Juergen Gross wrote: > +++ b/tools/misc/xen-detect.c > +asprintf(, "V%u.%u", > + (uint16_t)(regs[0] >> 16), (uint16_t)regs[0]); > +asprintf(, "V%s.%s", str, tmp); This fails to build: xen-detect.c:196:17: error: ignoring return value of

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-20 Thread Wei Liu
On Thu, Jun 15, 2017 at 11:58:27AM +0200, Juergen Gross wrote: > Instead of relying on cpuid instruction behaviour to tell which domain > type we are just try asking the kernel via the appropriate sysfs node > (added in Linux kernel 4.13). > > Keep the old detection logic as a fallback for older

[Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-15 Thread Juergen Gross
Instead of relying on cpuid instruction behaviour to tell which domain type we are just try asking the kernel via the appropriate sysfs node (added in Linux kernel 4.13). Keep the old detection logic as a fallback for older kernels. Signed-off-by: Juergen Gross ---