Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp372483pxb; Wed, 29 Sep 2021 00:54:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkVyB05Y4bUbemQiu26DqDq6ddM0fUN4OTyhhBSy7Woo7oYHRIYOGmh9hHap43OE7D8Lw1 X-Received: by 2002:a17:90b:694:: with SMTP id m20mr4868490pjz.141.1632902056633; Wed, 29 Sep 2021 00:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632902056; cv=none; d=google.com; s=arc-20160816; b=POLQ3Y+hm6onq9m3qhpz6CuCLtcvH9OcTZoR/IB+kJoKbLvXdNDiTXqM8s3jwrfO/C DlSfGRjbBwy+waYfye4MUtNS5cifLKiIGZ1C25qQGJ8PyUH+Fz7gkTZpeV0otxAAKWn1 8PVP4l6kX4JHq8FkohGyvN+k783e99l8RJuD7EfBpzkvYhCJlpGe6TjSJ06srleUlxm6 DeV+eBs0ixNjXj/wtYEOD3g5KHe4r234G7pSKfVePLy6ChHQMjvTOmsb4u1XT5COudGo TZLqKa4ustVzv6z2dnpm0g8ep8xDyKu/IECPAThbcmE3T5DIt2Pg0jL0AzEdQI8ByXAo khDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vOu0kuedwbPu9f6NbJg2oGF43R467/Ph3rEzfnkkhQA=; b=p+jWiAjoR7sZq/3cKozDvAgy6vESybd2QfgXkKVP/Uaep14FQ9qj7F+EljKevAgHZm 5xD6/QyfXrBvi0frfLJyGnNqLmkFesM+qoWNs+/PrlBhv12gjKo5Lzx6+3CHtGr8bo16 WbN76sr1RKB0AoGqHKruq6ffAKNNV0PfC3eG64x8R6NWPYpVPhYYxXgA8rKB7HIkkTvV 6HZcdYmIziKWjok9i73zwVerbzQ4d64sYKja2nnIHs6bZF3L3JncoIN9av/Co5U8Mrz8 ERxTF3KUhXbardOOvdOfR6FkGb12GzIufAqiYgZcnxwUCyjwRR5fBLJD35D8MQQ3gTcU WqpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FL95RGHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si2163936plk.245.2021.09.29.00.53.40; Wed, 29 Sep 2021 00:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FL95RGHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244518AbhI2HGi (ORCPT + 99 others); Wed, 29 Sep 2021 03:06:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:54844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244488AbhI2HGh (ORCPT ); Wed, 29 Sep 2021 03:06:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E66F60F6E; Wed, 29 Sep 2021 07:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632899097; bh=g6BUe7enuFI4kxDLyFSJFYsLRLSx3gM/vt9+PUIBkDo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FL95RGHa44BF5B5Lw0VjAdsdqvfpo2q0UvdkB+Vinf8wyAX9PChuuIEVvwkwDn+jv cHAPhXvSG3PCDo3LllmIRJ4uDW//iCy0QwgbT2R8ZoD95K893CqSr/m+h03pGjNlCX whBEcMccL8T1rkHyyqSkCJuZ2+CP5GrdBQhuRgls= Date: Wed, 29 Sep 2021 09:04:54 +0200 From: Greg KH To: Sohil Mehta Cc: x86@kernel.org, Tony Luck , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Jens Axboe , Christian Brauner , Peter Zijlstra , Shuah Khan , Arnd Bergmann , Jonathan Corbet , Ashok Raj , Jacob Pan , Gayatri Kammela , Zeng Guang , Dan Williams , Randy E Witt , Ravi V Shankar , Ramesh Thomas , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [RFC PATCH 10/13] x86/uintr: Introduce user IPI sender syscalls Message-ID: References: <20210913200132.3396598-1-sohil.mehta@intel.com> <20210913200132.3396598-11-sohil.mehta@intel.com> <4704e81d-a3d2-aedf-1c79-e45cc86826a5@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4704e81d-a3d2-aedf-1c79-e45cc86826a5@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 11:01:54AM -0700, Sohil Mehta wrote: > On 9/23/2021 5:28 AM, Greg KH wrote: > > On Mon, Sep 13, 2021 at 01:01:29PM -0700, Sohil Mehta wrote: > > > +/* User Interrupt Target Table Entry (UITTE) */ > > > +struct uintr_uitt_entry { > > > + u8 valid; /* bit 0: valid, bit 1-7: reserved */ > > Do you check that the other bits are set to 0? > > I don't have a check but kzalloc() in alloc_uitt() should set it to 0. > > > > + u8 user_vec; > > > + u8 reserved[6]; > > What is this reserved for? > > This is hardware defined structure as well. I should probably mention this > it in the comment above. > > > > + u64 target_upid_addr; > > If this is a pointer, why not say it is a pointer? > > I used a u64 to get the size and alignment of this structure as required by > the hardware. I wasn't sure if using a struct upid * would complicate that. > > Also this field is never used as a pointer by the kernel. It is only used to > program an entry that is read by the hardware. > > Is this reasonable or would you still prefer a pointer? Ok, just document it really well that this is NOT a real address used by the kernel. As it is, that's not obvious at all. And if this crosses the user/kernel boundry, it needs to be __u64 right? thanks, greg k-h