Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/56325 )
Change subject: arch-x86: Force the RPL of selectors when the CPL changes.
......................................................................
arch-x86: Force the RPL of selectors when the CPL changes.
The RPL of selectors are apparently supposed to reflect the CPL when
read. Rather than override the selectors when read, this change updates
their RPLs when the CPL changes which should be less frequent.
Change-Id: I225bac4297ca3c2c68544a2930a9fc779de25fc2
---
M src/arch/x86/isa.cc
1 file changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/arch/x86/isa.cc b/src/arch/x86/isa.cc
index 2d7c4df..ecdece3 100644
--- a/src/arch/x86/isa.cc
+++ b/src/arch/x86/isa.cc
@@ -33,6 +33,7 @@
#include "arch/x86/regs/ccr.hh"
#include "arch/x86/regs/int.hh"
#include "arch/x86/regs/misc.hh"
+#include "arch/x86/regs/segment.hh"
#include "base/compiler.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
@@ -337,6 +338,13 @@
regVal[MISCREG_DS_EFF_BASE] = regVal[MISCREG_DS_BASE];
}
}
+
+ for (int i = 0; i < NUM_SEGMENTREGS; i++) {
+ SegSelector sel = regVal[MISCREG_SEG_SEL(i)];
+ sel.rpl = newCSAttr.dpl;
+ regVal[MISCREG_SEG_SEL(i)] = sel;
+ }
+
updateHandyM5Reg(regVal[MISCREG_EFER],
regVal[MISCREG_CR0],
newCSAttr,
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56325
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I225bac4297ca3c2c68544a2930a9fc779de25fc2
Gerrit-Change-Number: 56325
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s