remove PTATTR_USER from the decision of ihk_mc_ap_flag in __set_pt_page
This commit is contained in:
@@ -302,7 +302,7 @@ static int __set_pt_page(struct page_table *pt, void *virt, unsigned long phys,
|
||||
struct page_table *newpt;
|
||||
enum ihk_mc_ap_flag ap_flag;
|
||||
|
||||
ap_flag = (attr & (PTATTR_USER | PTATTR_FOR_USER)) ?
|
||||
ap_flag = (attr & PTATTR_FOR_USER) ?
|
||||
IHK_MC_AP_NOWAIT: IHK_MC_AP_CRITICAL;
|
||||
|
||||
if (!pt) {
|
||||
|
||||
@@ -110,6 +110,9 @@ static int update_process_page_table(struct process *process,
|
||||
unsigned long p, pa = range->phys;
|
||||
unsigned long pp;
|
||||
unsigned long flags = ihk_mc_spinlock_lock(&process->vm->page_table_lock);
|
||||
const enum ihk_mc_pt_attribute attr
|
||||
= flag | PTATTR_WRITABLE | PTATTR_USER | PTATTR_FOR_USER;
|
||||
|
||||
p = range->start;
|
||||
while (p < range->end) {
|
||||
#ifdef USE_LARGE_PAGES
|
||||
@@ -120,7 +123,7 @@ static int update_process_page_table(struct process *process,
|
||||
(range->end - p) >= LARGE_PAGE_SIZE) {
|
||||
|
||||
if (ihk_mc_pt_set_large_page(process->vm->page_table, (void *)p,
|
||||
pa, PTATTR_WRITABLE | PTATTR_USER | flag) != 0) {
|
||||
pa, attr) != 0) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -132,7 +135,7 @@ static int update_process_page_table(struct process *process,
|
||||
else {
|
||||
#endif
|
||||
if(ihk_mc_pt_set_page(process->vm->page_table, (void *)p,
|
||||
pa, PTATTR_WRITABLE | PTATTR_USER | flag) != 0){
|
||||
pa, attr) != 0){
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user