From owner-svn-src-all@FreeBSD.ORG Fri Jun 20 07:49:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E24C374; Fri, 20 Jun 2014 07:49:45 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D95EA20AE; Fri, 20 Jun 2014 07:49:44 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s5K7ndV8049578; Fri, 20 Jun 2014 10:49:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s5K7ndV8049578 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.8/Submit) id s5K7nd7Z049577; Fri, 20 Jun 2014 10:49:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 20 Jun 2014 10:49:39 +0300 From: Konstantin Belousov To: Attilio Rao Subject: Re: svn commit: r267651 - in head: share/man/man4 sys/dev/cpuctl sys/sys usr.sbin/cpucontrol Message-ID: <20140620074939.GE3991@kib.kiev.ua> References: <201406192154.s5JLsfed074305@svn.freebsd.org> <20140620040801.GA3991@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/RqEFHMuhBp2bkqw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 07:49:45 -0000 --/RqEFHMuhBp2bkqw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 08:12:59AM +0200, Attilio Rao wrote: > On Fri, Jun 20, 2014 at 6:08 AM, Konstantin Belousov > wrote: > > On Thu, Jun 19, 2014 at 09:54:41PM +0000, Attilio Rao wrote: > >> Author: attilio > >> Date: Thu Jun 19 21:54:41 2014 > >> New Revision: 267651 > >> URL: http://svnweb.freebsd.org/changeset/base/267651 > >> > >> Log: > >> Following comments in r242565 add the possibility to specify ecx when > >> performing cpuid calls. > >> Add also a new way to specify the level type to cpucontrol(8) as > >> reported in the manpage. > >> > >> Sponsored by: EMC / Isilon storage division > >> Reviewed by: bdrewery, gcooper > >> Testerd by: bdrewery > >> Modified: head/sys/sys/cpuctl.h > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/sys/sys/cpuctl.h Thu Jun 19 21:05:07 2014 (r267650) > >> +++ head/sys/sys/cpuctl.h Thu Jun 19 21:54:41 2014 (r267651) > >> @@ -35,7 +35,8 @@ typedef struct { > >> } cpuctl_msr_args_t; > >> > >> typedef struct { > >> - int level; /* CPUID level */ > >> + int level; /* CPUID level */ > >> + int level_type; /* CPUID level type */ > >> uint32_t data[4]; > >> } cpuctl_cpuid_args_t; > >> > >> @@ -50,5 +51,6 @@ typedef struct { > >> #define CPUCTL_UPDATE _IOWR('c', 4, cpuctl_update_args_t) > >> #define CPUCTL_MSRSBIT _IOWR('c', 5, cpuctl_msr_args_t) > >> #define CPUCTL_MSRCBIT _IOWR('c', 6, cpuctl_msr_args_t) > >> +#define CPUCTL_CPUID_COUNT _IOWR('c', 7, cpuctl_cpuid_args_t) > >> > >> #endif /* _CPUCTL_H_ */ > > > > The cpuctl(4) is used by third-party code, and this change breaks its > > ABI. The numeric value for CPUCTL_CPUID is changed, which means that > > old binaries call non-existing ioctl now. This is at least a visible > > breakage, since the argument for the ioctl changed the layout as well. > > > > The following patch restored the CPUCTL_CPUID for me. I considered > > naming its argument differently, instead of renaming the argument > > of CPUCTL_CPUID_COUNT (which you tried to do ?), but decided not, > > to preserve the API as well. >=20 > No, breaking the ABI is fine for -CURRENT so I don't see why we need the = bloat. No, breaking ABI is not fine at all, be it CURRENT or not. We try to keep the ABI stable, doing costly measures like symbol versioning, where applicable. Since this is a change to ABI for kernel interface, it cannot be covered by symver tricks and must be done in kernel. > I don't plan on MFC this patch. If I need to (or any user requests > that) I will do with the appropriate ABI-compliant way (ie. adding a > new argument like this one). Besides the same-world ABI issue, people run jails with lower world version on higher-versioned kernels. --/RqEFHMuhBp2bkqw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTo+eSAAoJEJDCuSvBvK1BhtkP/3wjtCIEw8Z6uRnqTO2UWw13 i2BcuxRhWbAReZd9SS9I2y6hyu+T0vVKqxvNR4qwUTqBpfMF+kMs0IBt0XfORpph Jg76/gaCqupSFUK5+uhqHRw7oeX/IZyUSUCq9f6Ktmqm7wNs6Q2OuFdpK54ZoVgF /3MredFAbjhsed19lnyKUConGsHSIys34hYQm2S3JWco7jrNXT/tFBwU/qcA238k TaXiRLCFqCjCuYQNECiDlH7cFKuWSLi+Hfsqf3cTLKxe5XmX0ed5TYt77PoNUVNl o4sWNILiH6JJsZoRznnDEGyrwmPFrtPmbsfhLlmVr9Zn2cocpz//PR0K5Z68uEPf k/ehOWu1ROh2KhEQAPN0gvirkUeJt6w4Fy/27ctf1wopUnw6w+7TUCTWG1ZqEvZp kpJ8ooMi1kJQeOSXekG4JbOsAmff4laKOgRJ4kH7yGQkU2O3uyQMfXkx/hD09B8W uYiWj/w0IGjlqgj8TFrh/T7K8yR/UFTghjgWhDqBj3F/JsDnu/dBq/CMEGFmG8QU lJfJ0uJxYLBlDLy6ELSew98jbU8OdCDOCYAoh+g/cM0KuCob5BdbMvTOI3ipzM7Q GSreOpzF1pmUWNiHp8bfyuIgU2t5Yv6vTSjMIPOkkZGutb3ukQCyFB7d7HrqpJ02 wbJGZhpjRyKQ+YJR64Cq =MXxi -----END PGP SIGNATURE----- --/RqEFHMuhBp2bkqw--