From owner-svn-src-head@FreeBSD.ORG Fri Jun 20 08:19:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEB57ACA; Fri, 20 Jun 2014 08:19:01 +0000 (UTC) Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E85EC2330; Fri, 20 Jun 2014 08:19:00 +0000 (UTC) Received: by mail-we0-f180.google.com with SMTP id x48so3449998wes.11 for ; Fri, 20 Jun 2014 01:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=mO4cIQW9H4AnvLcR6VOZ9UvVT0NwQhMOX47m6rLL3XE=; b=C2PZ6ynz2MfCXiBUexMe7pr6EkEvnREIdvOR+dZ73hPnjUoKNg5wCVi8EKOufmCMpa fAEYgCy03ErxI7xNEilS5griaaphzeUANSKHuxVq9ES8IDiozp3HKoel8OLRxjJhNvVh xniqJeTsS+/Iskv3Aysqoic1co/dBesgYapixG6OefS3JvnU3dbTCP+ndOQgABuNr31p oNcLtqEuiGzC2N+1rIXMhnSIuiXCEgjxYpqzhdQECyW/17pBOr3uUW858oXF4Jlb5fr2 x86lD9ylM4K4orAmKAJuFOkgJNdL7kXGd/xMbnjIhYicpQPyTmp9PF+gdKI3a3lEAKSp DFyw== MIME-Version: 1.0 X-Received: by 10.180.36.241 with SMTP id t17mr2308285wij.38.1403252338990; Fri, 20 Jun 2014 01:18:58 -0700 (PDT) Reply-To: attilio@FreeBSD.org Sender: asmrookie@gmail.com Received: by 10.217.46.129 with HTTP; Fri, 20 Jun 2014 01:18:58 -0700 (PDT) Received: by 10.217.46.129 with HTTP; Fri, 20 Jun 2014 01:18:58 -0700 (PDT) In-Reply-To: <20140620074939.GE3991@kib.kiev.ua> References: <201406192154.s5JLsfed074305@svn.freebsd.org> <20140620040801.GA3991@kib.kiev.ua> <20140620074939.GE3991@kib.kiev.ua> Date: Fri, 20 Jun 2014 10:18:58 +0200 X-Google-Sender-Auth: jsfejOjwLRB0mnevnh9Li2dnf_4 Message-ID: Subject: Re: svn commit: r267651 - in head: share/man/man4 sys/dev/cpuctl sys/sys usr.sbin/cpucontrol From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 08:19:01 -0000 On Jun 20, 2014 9:49 AM, "Konstantin Belousov" wrote: > > 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 > > >> ============================================================================== > > >> --- 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. > > > > 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. I think you have a point,I forgot we have different requirements for ABI and KBI/KPI in -CURRENT per jail. I will make a patch for it when I get back home in few hours. Attilio