Page MenuHomeFreeBSD

D49208.id151767.diff
No OneTemporary

D49208.id151767.diff

diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c
--- a/sys/amd64/vmm/vmm_instruction_emul.c
+++ b/sys/amd64/vmm/vmm_instruction_emul.c
@@ -236,6 +236,12 @@
.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,26 @@
error = EINVAL;
switch (vie->op.op_byte) {
+ case 0xF6:
+ /*
+ * F6 /0 test r/m8, imm8
+ *
+ * Test mem (ModRM:r/m) with immediate and set status
+ * flags according to the results. The comparison is
+ * performed by anding the immediate from the first
+ * operand and then setting the status flags.
+ */
+ if ((vie->reg & 7) != 0)
+ return (EINVAL);
+
+ size = 1; /* override for byte operation */
+
+ error = memread(vcpu, gpa, &op1, size, arg);
+ if (error)
+ return (error);
+
+ rflags2 = getandflags(size, op1, vie->immediate);
+ break;
case 0xF7:
/*
* F7 /0 test r/m16, imm16

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 30, 4:01 PM (3 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32534809
Default Alt Text
D49208.id151767.diff (1 KB)

Event Timeline