From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Carstens Subject: Re: [PATCH 4/6] s390: add system call to run tasks with modified branch prediction Date: Wed, 17 Jan 2018 14:25:49 +0100 Message-ID: <20180117132549.GC5708@osiris> References: <1516182519-10623-1-git-send-email-schwidefsky@de.ibm.com> <1516182519-10623-5-git-send-email-schwidefsky@de.ibm.com> <5bda76be-0fec-8165-20bf-5cd8e51e955a@redhat.com> <20180117125506.26f3813c@mschwideX1> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Christian Borntraeger , Florian Weimer , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Cornelia Huck , Greg Kroah-Hartman , Jon Masters , Marcus Meissner , Jiri Kosina To: Martin Schwidefsky Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40680 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753023AbeAQN0f (ORCPT ); Wed, 17 Jan 2018 08:26:35 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0HDQIhZ028393 for ; Wed, 17 Jan 2018 08:26:34 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fj64q3qea-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 17 Jan 2018 08:26:32 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Jan 2018 13:25:55 -0000 Content-Disposition: inline In-Reply-To: <20180117125506.26f3813c@mschwideX1> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jan 17, 2018 at 12:55:06PM +0100, Martin Schwidefsky wrote: > On Wed, 17 Jan 2018 12:14:52 +0100 > Christian Borntraeger wrote: > > > On 01/17/2018 11:03 AM, Florian Weimer wrote: > > > On 01/17/2018 10:48 AM, Martin Schwidefsky wrote: > > >>          rc = syscall(__NR_s390_modify_bp); > > >>          if (rc) { > > >>                  perror("s390_modify_bp"); > > >>                  exit(EXIT_FAILURE); > > >>          } > > > > > > Isn't this traditionally done through personality or prctl? > > > > I think we want this per thread (and not per process). So I assume personality > > will not work out. Can a prctl be done per thread? > > The prctl interface seems to be usable to set a per-thread control > as well. But there is no architecture specific prctl as far as I > can see. Maybe a common PR_SET_NOBP with an arch function like > arch_set_nobp. There is for example PR_MPX_ENABLE_MANAGEMENT, which is x86 specific. On the other hand x86 even has an arch_prctl() system call... ;)