implemented WRMSRNS extension - Non Serializing version of WRMSR opcode

This commit is contained in:
Stanislav Shwartsman 2022-10-02 22:16:02 +03:00
parent 9f76eaacea
commit 3a20495db8
4 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,7 @@ static const char *cpu_feature_name[] =
"clzero", // BX_ISA_CLZERO
"sca_mitigations", // BX_ISA_SCA_MITIGATIONS
"cet", // BX_ISA_CET
"wrmsrns", // BX_ISA_WRMSRNS
};
const char *get_cpu_feature_name(unsigned feature) { return cpu_feature_name[feature]; }

View File

@ -127,6 +127,7 @@ enum x86_feature_name {
BX_ISA_CLZERO, /* CLZERO instruction support (AMD) */
BX_ISA_SCA_MITIGATIONS, /* SCA Mitigations */
BX_ISA_CET, /* Control Flow Enforcement */
BX_ISA_WRMSRNS, /* Non-Serializing version of WRMSR */
BX_ISA_EXTENSION_LAST
};

View File

@ -1518,6 +1518,7 @@ static const Bit64u BxOpcodeTable0F01[] = {
form_opcode(ATTR_NNN0 | ATTR_RRR2 | ATTR_MODC0 | ATTR_SSE_NO_PREFIX, BX_IA_VMLAUNCH),
form_opcode(ATTR_NNN0 | ATTR_RRR3 | ATTR_MODC0 | ATTR_SSE_NO_PREFIX, BX_IA_VMRESUME),
form_opcode(ATTR_NNN0 | ATTR_RRR4 | ATTR_MODC0 | ATTR_SSE_NO_PREFIX, BX_IA_VMXOFF),
form_opcode(ATTR_NNN0 | ATTR_RRR6 | ATTR_MODC0 | ATTR_SSE_NO_PREFIX, BX_IA_WRMSRNS),
form_opcode(ATTR_NNN1 | ATTR_RRR0 | ATTR_MODC0 | ATTR_SSE_NO_PREFIX, BX_IA_MONITOR),
form_opcode(ATTR_NNN1 | ATTR_RRR1 | ATTR_MODC0 | ATTR_SSE_NO_PREFIX, BX_IA_MWAIT),

View File

@ -1783,6 +1783,8 @@ bx_define_opcode(BX_IA_WRPKRU, "wrpkru", "wrpkru", &BX_CPU_C::BxError, &BX_CPU_C
bx_define_opcode(BX_IA_RDPID_Ed, "rdpid", "rdpid", NULL, &BX_CPU_C::RDPID_Ed, BX_ISA_RDPID, OP_Ed, OP_NONE, OP_NONE, OP_NONE, 0)
bx_define_opcode(BX_IA_WRMSRNS, "wrmsrns", "wrmsrns", NULL, &BX_CPU_C::WRMSR, BX_ISA_WRMSRNS, OP_NONE, OP_NONE, OP_NONE, OP_NONE, BX_TRACE_END)
#if BX_SUPPORT_AVX && BX_CPU_LEVEL >= 6
// AVX1/AVX2
bx_define_opcode(BX_IA_VZEROUPPER, "vzeroupper", "vzeroupper", NULL, &BX_CPU_C::VZEROUPPER, BX_ISA_AVX, OP_NONE, OP_NONE, OP_NONE, OP_NONE, BX_PREPARE_AVX)