aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-02-26 10:04:11 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2021-05-11 04:11:13 -0400
commit6ed6b0d38025485ddac834964f1ee25a2a809b2b (patch)
tree36acac7afd2c0082256875eb3c1922e0ff659d89 /target
parentcc3f2be6b7ca1bb1e5d78aa355c5bdeea25c91c4 (diff)
target/i386: merge SVM_NPTEXIT_* with PF_ERROR_* constants
They are the same value, and are so by design. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/svm.h5
-rw-r--r--target/i386/tcg/sysemu/excp_helper.c10
2 files changed, 5 insertions, 10 deletions
diff --git a/target/i386/svm.h b/target/i386/svm.h
index ae30fc6f79..b515b5ced4 100644
--- a/target/i386/svm.h
+++ b/target/i386/svm.h
@@ -137,11 +137,6 @@
#define SVM_NPT_NXE (1 << 2)
#define SVM_NPT_PSE (1 << 3)
-#define SVM_NPTEXIT_P (1ULL << 0)
-#define SVM_NPTEXIT_RW (1ULL << 1)
-#define SVM_NPTEXIT_US (1ULL << 2)
-#define SVM_NPTEXIT_RSVD (1ULL << 3)
-#define SVM_NPTEXIT_ID (1ULL << 4)
#define SVM_NPTEXIT_GPA (1ULL << 32)
#define SVM_NPTEXIT_GPT (1ULL << 33)
diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c
index 1fcac51a32..7697fa4adc 100644
--- a/target/i386/tcg/sysemu/excp_helper.c
+++ b/target/i386/tcg/sysemu/excp_helper.c
@@ -205,17 +205,17 @@ static hwaddr get_hphys(CPUState *cs, hwaddr gphys, MMUAccessType access_type,
return pte + page_offset;
do_fault_rsvd:
- exit_info_1 |= SVM_NPTEXIT_RSVD;
+ exit_info_1 |= PG_ERROR_RSVD_MASK;
do_fault_protect:
- exit_info_1 |= SVM_NPTEXIT_P;
+ exit_info_1 |= PG_ERROR_P_MASK;
do_fault:
x86_stq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2),
gphys);
- exit_info_1 |= SVM_NPTEXIT_US;
+ exit_info_1 |= PG_ERROR_U_MASK;
if (access_type == MMU_DATA_STORE) {
- exit_info_1 |= SVM_NPTEXIT_RW;
+ exit_info_1 |= PG_ERROR_W_MASK;
} else if (access_type == MMU_INST_FETCH) {
- exit_info_1 |= SVM_NPTEXIT_ID;
+ exit_info_1 |= PG_ERROR_I_D_MASK;
}
if (prot) {
exit_info_1 |= SVM_NPTEXIT_GPA;