/* Basic instruction decoding support needed */ #include"../../lib/inat.c" #include"../../lib/insn.c"
/* * Copy a version of this function here - insn-eval.c can't be used in * pre-decompression code.
*/ bool insn_has_rep_prefix(struct insn *insn)
{
insn_byte_t p; int i;
insn_get_prefixes(insn);
for_each_insn_prefix(insn, i, p) { if (p == 0xf2 || p == 0xf3) returntrue;
}
returnfalse;
}
enum es_result vc_decode_insn(struct es_em_ctxt *ctxt)
{ char buffer[MAX_INSN_SIZE]; int ret;
/* * Only a dummy for insn_get_seg_base() - Early boot-code is 64bit only and * doesn't use segments.
*/ staticunsignedlong insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx)
{ return 0UL;
}
if (!boot_ghcb && !early_setup_ghcb())
sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SEV_ES_GEN_REQ);
vc_ghcb_invalidate(boot_ghcb);
result = vc_init_em_ctxt(&ctxt, regs, exit_code); if (result != ES_OK) goto finish;
result = vc_check_opcode_bytes(&ctxt, exit_code); if (result != ES_OK) goto finish;
switch (exit_code) { case SVM_EXIT_RDTSC: case SVM_EXIT_RDTSCP:
result = vc_handle_rdtsc(boot_ghcb, &ctxt, exit_code); break; case SVM_EXIT_IOIO:
result = vc_handle_ioio(boot_ghcb, &ctxt); break; case SVM_EXIT_CPUID:
result = vc_handle_cpuid(boot_ghcb, &ctxt); break; default:
result = ES_UNSUPPORTED; break;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.