@@ -126,12 +126,12 @@ static int local_gva2gpa_common(struct vcpu *vcpu, struct page_walk_info *pw_inf
126
126
}
127
127
128
128
/* check if the entry present */
129
- if ((entry & MMU_32BIT_PDE_P ) == 0U ) {
129
+ if ((entry & PAGE_PRESENT ) == 0U ) {
130
130
ret = - EFAULT ;
131
131
goto out ;
132
132
}
133
133
/* check for R/W */
134
- if (pw_info -> is_write_access && ((entry & MMU_32BIT_PDE_RW ) == 0U )) {
134
+ if (pw_info -> is_write_access && ((entry & PAGE_RW ) == 0U )) {
135
135
/* Case1: Supermode and wp is 1
136
136
* Case2: Usermode */
137
137
if (pw_info -> is_user_mode || pw_info -> wp ) {
@@ -141,16 +141,16 @@ static int local_gva2gpa_common(struct vcpu *vcpu, struct page_walk_info *pw_inf
141
141
/* check for nx, since for 32-bit paing, the XD bit is
142
142
* reserved(0), use the same logic as PAE/4-level paging */
143
143
if (pw_info -> is_inst_fetch && pw_info -> nxe &&
144
- ((entry & MMU_MEM_ATTR_BIT_EXECUTE_DISABLE ) != 0U )) {
144
+ ((entry & PAGE_NX ) != 0U )) {
145
145
fault = 1 ;
146
146
}
147
147
148
148
/* check for U/S */
149
- if (((entry & MMU_32BIT_PDE_US ) == 0U ) && pw_info -> is_user_mode ) {
149
+ if (((entry & PAGE_USER ) == 0U ) && pw_info -> is_user_mode ) {
150
150
fault = 1 ;
151
151
}
152
152
153
- if (pw_info -> pse && ((i > 0U ) && ((entry & MMU_32BIT_PDE_PS ) != 0U ))) {
153
+ if (pw_info -> pse && ((i > 0U ) && ((entry & PAGE_PSE ) != 0U ))) {
154
154
break ;
155
155
}
156
156
addr = entry ;
@@ -189,7 +189,7 @@ static int local_gva2gpa_pae(struct vcpu *vcpu, struct page_walk_info *pw_info,
189
189
index = (gva >> 30 ) & 0x3UL ;
190
190
entry = base [index ];
191
191
192
- if ((entry & MMU_32BIT_PDE_P ) == 0U ) {
192
+ if ((entry & PAGE_PRESENT ) == 0U ) {
193
193
ret = - EFAULT ;
194
194
goto out ;
195
195
}
0 commit comments