target/i386: emulate: set PG_ERROR_W_MASK as expected
Make setting PG_ERROR_W_MASK no longer dependent on the access being a priv violation. Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr> Link: https://lore.kernel.org/r/20260324230016.80914-2-mohamed@unpredictable.fr Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Mohamed Mediouni committed
Mar 25, 2026 at 00:00 UTC
a003cd280eb61b04f72c13f02687e02c5f15c74c
1 file changed
+1
-1
target/i386/emulate/x86_mmu.c
+1
-1
@@ -248,7 +248,7 @@ static int translate_res_to_error_code(MMUTranslateResult res, bool is_write, bo
248
if (!(res & MMU_TRANSLATE_PAGE_NOT_MAPPED)) {
249
error_code |= PG_ERROR_P_MASK;
250
}
251
- if (is_write && (res & MMU_TRANSLATE_PRIV_VIOLATION)) {
251
+ if (is_write) {
252
error_code |= PG_ERROR_W_MASK;
253
}
254
if (res & MMU_TRANSLATE_INVALID_PT_FLAGS) {