@@ -22,7 +22,7 @@ use crate::error::SvsmError;
22
22
use crate :: fs:: FileHandle ;
23
23
use crate :: mm:: vm:: VMR ;
24
24
use crate :: mm:: PageRef ;
25
- use crate :: mm:: { pagetable:: PageTable , PAGE_SIZE } ;
25
+ use crate :: mm:: { pagetable:: PTEntryFlags , PAGE_SIZE } ;
26
26
use crate :: types:: PAGE_SHIFT ;
27
27
use crate :: utils:: align_up;
28
28
@@ -49,7 +49,7 @@ impl VirtualMapping for VMWriteFileMapping {
49
49
}
50
50
51
51
fn pt_flags ( & self , _offset : usize ) -> crate :: mm:: pagetable:: PTEntryFlags {
52
- PageTable :: task_data_flags ( )
52
+ PTEntryFlags :: task_data ( )
53
53
}
54
54
}
55
55
@@ -196,19 +196,19 @@ impl VirtualMapping for VMFileMapping {
196
196
197
197
fn pt_flags ( & self , offset : usize ) -> crate :: mm:: pagetable:: PTEntryFlags {
198
198
match self . permission {
199
- VMFileMappingPermission :: Read => PageTable :: task_data_ro_flags ( ) ,
199
+ VMFileMappingPermission :: Read => PTEntryFlags :: task_data_ro ( ) ,
200
200
VMFileMappingPermission :: Write => {
201
201
if let Some ( write_copy) = & self . write_copy {
202
202
if write_copy. get_alloc ( ) . present ( offset) {
203
- PageTable :: task_data_flags ( )
203
+ PTEntryFlags :: task_data ( )
204
204
} else {
205
- PageTable :: task_data_ro_flags ( )
205
+ PTEntryFlags :: task_data_ro ( )
206
206
}
207
207
} else {
208
- PageTable :: task_data_ro_flags ( )
208
+ PTEntryFlags :: task_data_ro ( )
209
209
}
210
210
}
211
- VMFileMappingPermission :: Execute => PageTable :: task_exec_flags ( ) ,
211
+ VMFileMappingPermission :: Execute => PTEntryFlags :: task_exec ( ) ,
212
212
}
213
213
}
214
214
@@ -235,7 +235,7 @@ impl VirtualMapping for VMFileMapping {
235
235
copy_page ( vmr, & self . file , offset_aligned, paddr_new_page, page_size) ?;
236
236
return Ok ( VMPageFaultResolution {
237
237
paddr : paddr_new_page,
238
- flags : PageTable :: task_data_flags ( ) ,
238
+ flags : PTEntryFlags :: task_data ( ) ,
239
239
} ) ;
240
240
}
241
241
}
0 commit comments