On Fri, Apr 30, 2021 at 10:39 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote: > > On Fri, Apr 30, 2021 at 7:38 AM Aaron Lewis <aaronlewis@xxxxxxxxxx> wrote: > > > > This test exercises the feature KVM_CAP_EXIT_ON_EMULATION_FAILURE. When > > enabled, errors in the in-kernel instruction emulator are forwarded to > > userspace with the instruction bytes stored in the exit struct for > > KVM_EXIT_INTERNAL_ERROR. So, when the guest attempts to emulate an > > 'flds' instruction, which isn't able to be emulated in KVM, instead > > of failing, KVM sends the instruction to userspace to handle. > > > > For this test to work properly the module parameter > > 'allow_smaller_maxphyaddr' has to be set. > > > > Signed-off-by: Aaron Lewis <aaronlewis@xxxxxxxxxx> > > Change-Id: I23af1c0d4a3a3484dc15ddd928f3693a48c33e47 > > --- > ... > > + TEST_ASSERT(is_flds(insn_bytes, insn_size), > > + "Unexpected instruction. Expected 'flds' (0xd9 /0)"); > > Aren't we looking for 0xd9 /5? My mistake. You are correct; we are looking for 0xd9 /0. Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>