lkml.org 
[lkml]   [2020]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 12/12] x86/traps: Fix up invalid PASID
On Mon, Jul 13, 2020 at 4:48 PM Fenghua Yu <fenghua.yu@intel.com> wrote:
>
> A #GP fault is generated when ENQCMD instruction is executed without
> a valid PASID value programmed in the current thread's PASID MSR. The
> #GP fault handler will initialize the MSR if a PASID has been allocated
> for this process.

Let's take a step back here. Why are we trying to avoid IPIs? If you
call munmap(), you IPI other CPUs running tasks in the current mm. If
you do perf_event_open() and thus acquire RDPMC permission, you IPI
other CPUs running tasks in the current mm. If you call modify_ldt(),
you IPI other CPUs running tasks in the current mm. These events can
all happen more than once per process.

Now we have ENQCMD. An mm can be assigned a PASID *once* in the model
that these patches support. Why not just send an IPI using
essentially identical code to the LDT sync or the CR4.PCE sync?

--Andy

\
 
 \ /
  Last update: 2020-08-01 03:30    [W:0.422 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site