]> xenbits.xensource.com Git - xen.git/commit
x86emul: avoid double memory read for RORX
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2024 11:18:09 +0000 (12:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2024 11:18:09 +0000 (12:18 +0100)
commit8974056f1f7a8194f60f8eaa1d21c3f39d71722c
tree02271be4775bcc5b9d3f55cc8cd4ac2d9a3d5336
parent8eed56995dc6210c132a447c79dc5bd85c99dbb4
x86emul: avoid double memory read for RORX

Originally only twobyte_table[0x3a] determined what part of generic
operand fetching (near the top of x86_emulate()) comes into play. When
ext0f3a_table[] was added, ->desc was updated to properly describe the
ModR/M byte's function. With that generic source operand fetching came
into play for RORX, rendering the explicit fetching in the respective
case block redundant (and wrong at the very least when MMIO with side
effects is accessed).

While there also make a purely cosmetic / documentary adjustment to
ext0f3a_table[]: RORX really is a 2-operand insn, MOV-like in that it
only writes its destination register.

Fixes: 9f7f5f6bc95b ("x86emul: add tables for 0f38 and 0f3a extension space")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 939a9e800c4156677c10c6cf08fde071e9b86eaf
master date: 2024-11-14 13:03:18 +0100
xen/arch/x86/x86_emulate/decode.c
xen/arch/x86/x86_emulate/x86_emulate.c