The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=49a4838a0d94e145a826abf02aa03ff444e614e3
commit 49a4838a0d94e145a826abf02aa03ff444e614e3 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-04 13:51:47 +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 --- 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 51769faf5893..c53e32889000 100644 --- a/sys/amd64/vmm/vmm_instruction_emul.c +++ b/sys/amd64/vmm/vmm_instruction_emul.c @@ -236,6 +236,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, @@ -1284,6 +1290,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