aboutsummaryrefslogtreecommitdiff
path: root/target-i386/svm_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/svm_helper.c')
-rw-r--r--target-i386/svm_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/svm_helper.c b/target-i386/svm_helper.c
index b9fd779b11..a86a99bca5 100644
--- a/target-i386/svm_helper.c
+++ b/target-i386/svm_helper.c
@@ -89,13 +89,13 @@ static inline void svm_save_seg(CPUX86State *env, hwaddr addr,
const SegmentCache *sc)
{
CPUState *cs = ENV_GET_CPU(env);
- stw_phys(addr + offsetof(struct vmcb_seg, selector),
+ stw_phys(cs->as, addr + offsetof(struct vmcb_seg, selector),
sc->selector);
stq_phys(cs->as, addr + offsetof(struct vmcb_seg, base),
sc->base);
stl_phys(cs->as, addr + offsetof(struct vmcb_seg, limit),
sc->limit);
- stw_phys(addr + offsetof(struct vmcb_seg, attrib),
+ stw_phys(cs->as, addr + offsetof(struct vmcb_seg, attrib),
((sc->flags >> 8) & 0xff) | ((sc->flags >> 12) & 0x0f00));
}