Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650AbdCNUKH (ORCPT ); Tue, 14 Mar 2017 16:10:07 -0400 Received: from terminus.zytor.com ([65.50.211.136]:48266 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbdCNUKF (ORCPT ); Tue, 14 Mar 2017 16:10:05 -0400 Subject: Re: [PATCH v10 6/7] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID To: Kyle Huey References: <20161108183956.4521-1-khuey@kylehuey.com> <20161108183956.4521-7-khuey@kylehuey.com> <30f2ec3e-d0c8-8dd2-837f-3380237d843c@zytor.com> Cc: "Robert O'Callahan" , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Jeff Dike , Richard Weinberger , Alexander Viro , Shuah Khan , Dave Hansen , Borislav Petkov , Peter Zijlstra , Boris Ostrovsky , Len Brown , "Rafael J. Wysocki" , Dmitry Safonov , David Matlack , open list , "open list:USER-MODE LINUX (UML)" , "open list:USER-MODE LINUX (UML)" , "open list:FILESYSTEMS (VFS and infrastructure)" , "open list:KERNEL SELFTEST FRAMEWORK" , kvm list From: "H. Peter Anvin" Message-ID: <1acdafa1-4557-b147-ef67-069886255e6c@zytor.com> Date: Tue, 14 Mar 2017 13:06:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 709 Lines: 24 On 03/14/17 12:08, Kyle Huey wrote: > > That's largely what we ended up doing. See > https://lkml.org/lkml/2017/2/14/80 and the latest version of this > patch, https://lkml.org/lkml/2017/3/11/197. > Yes, as I said, my mistake. I would still like to see an early-out when none of these flags are set (I just discussed this with tglx on IRC): if (likely(!((tifp|tifn) & (_TIF_BLOCKSTEP|_TIF_NOTSC|_TIF_IO_BITMAP| _TIF_NOCPUID|_TIF_USER_RETURN_NOTIFY)))) return; The USER_RETURN_NOTIFY could really use some sanity: it is a notifier chain with a single in-kernel user, which is KVM on x86 only, but we most likely will need to propagate the flag even if it ends up getting specialized. -hpa