qemu/target/i386/tcg/sysemu
Claudio Fontana b39030942d i386: split svm_helper into sysemu and stub-only user
For now we just copy over the previous user stubs, but really,

everything that requires s->cpl == 0 should be impossible
to trigger from user-mode emulation.

Later on we should add a check that asserts this easily f.e.:

static bool check_cpl0(DisasContext *s)
{
     int cpl = s->cpl;
 #ifdef CONFIG_USER_ONLY
     assert(cpl == 3);
 #endif
     if (cpl != 0) {
         gen_exception(s, EXCP0D_GPF, s->pc_start - s->cs_base);
         return false;
     }
     return true;
}

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210322132800.7470-17-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-05-10 15:41:51 -04:00
..
bpt_helper.c i386: move TCG bpt_helper into sysemu/ 2021-05-10 15:41:51 -04:00
excp_helper.c i386: split tcg excp_helper into sysemu and user parts 2021-05-10 15:41:51 -04:00
fpu_helper.c i386: separate fpu_helper sysemu-only parts 2021-05-10 15:41:51 -04:00
meson.build i386: split svm_helper into sysemu and stub-only user 2021-05-10 15:41:51 -04:00
misc_helper.c i386: split misc helper user stubs and sysemu part 2021-05-10 15:41:51 -04:00
smm_helper.c
svm_helper.c i386: split svm_helper into sysemu and stub-only user 2021-05-10 15:41:51 -04:00
tcg-cpu.c