[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4704e81d-a3d2-aedf-1c79-e45cc86826a5@intel.com>
Date: Tue, 28 Sep 2021 11:01:54 -0700
From: Sohil Mehta <sohil.mehta@...el.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <x86@...nel.org>, Tony Luck <tony.luck@...el.com>,
Dave Hansen <dave.hansen@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Jens Axboe <axboe@...nel.dk>,
Christian Brauner <christian@...uner.io>,
Peter Zijlstra <peterz@...radead.org>,
Shuah Khan <shuah@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Jonathan Corbet <corbet@....net>,
Ashok Raj <ashok.raj@...el.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
"Gayatri Kammela" <gayatri.kammela@...el.com>,
Zeng Guang <guang.zeng@...el.com>,
"Dan Williams" <dan.j.williams@...el.com>,
Randy E Witt <randy.e.witt@...el.com>,
Ravi V Shankar <ravi.v.shankar@...el.com>,
Ramesh Thomas <ramesh.thomas@...el.com>,
<linux-api@...r.kernel.org>, <linux-arch@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: Re: [RFC PATCH 10/13] x86/uintr: Introduce user IPI sender syscalls
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?
>> +} __packed __aligned(16);
>> +
>> +struct uintr_uitt_ctx {
>> + struct uintr_uitt_entry *uitt;
>> + /* Protect UITT */
>> + spinlock_t uitt_lock;
>> + refcount_t refs;
> Again, a kref please.
Will do.
Thanks,
Sohil
Powered by blists - more mailing lists