The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=3733546de363eda2d7bade2c110b8ba69a8e3c3e
commit 3733546de363eda2d7bade2c110b8ba69a8e3c3e Author: Jose Luis Duran <jldu...@freebsd.org> AuthorDate: 2025-03-04 13:51:47 +0000 Commit: Jose Luis Duran <jldu...@freebsd.org> CommitDate: 2025-03-11 00:41:29 +0000 vmm: Emulate testb imm8,r/m8 Add support for "testb imm8,r/m8" emulation. PR: 261940 PR: 282852 Reviewed by: markj, emaste Approved by: emaste (mentor) Obtained from: Illumos (https://www.illumos.org/issues/14483) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D49208 (cherry picked from commit 49a4838a0d94e145a826abf02aa03ff444e614e3) --- sys/amd64/vmm/vmm_instruction_emul.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c index 1b042621c0eb..7626082ff88d 100644 --- a/sys/amd64/vmm/vmm_instruction_emul.c +++ b/sys/amd64/vmm/vmm_instruction_emul.c @@ -234,6 +234,12 @@ static const struct vie_op one_byte_opcodes[256] = { .op_byte = 0x8F, .op_type = VIE_OP_TYPE_POP, }, + [0xF6] = { + /* XXX Group 3 extended opcode - not just TEST */ + .op_byte = 0xF6, + .op_type = VIE_OP_TYPE_TEST, + .op_flags = VIE_OP_F_IMM8, + }, [0xF7] = { /* XXX Group 3 extended opcode - not just TEST */ .op_byte = 0xF7, @@ -1282,6 +1288,12 @@ emulate_test(struct vcpu *vcpu, uint64_t gpa, struct vie *vie, error = EINVAL; switch (vie->op.op_byte) { + case 0xF6: + /* + * F6 /0 test r/m8, imm8 + */ + size = 1; /* override for byte operation */ + /* FALLTHROUGH */ case 0xF7: /* * F7 /0 test r/m16, imm16