Re: [PATCH v3 02/10] KVM: selftests: Explicitly require instructions bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 31, 2022, David Matlack wrote:
> Hard-code the flds instruction and assert the exact instruction bytes
> are present in run->emulation_failure. The test already requires the
> instruction bytes to be present because that's the only way the test
> will advance the RIP past the flds and get to GUEST_DONE().
> 
> Note that KVM does not necessarily return exactly 2 bytes in
> run->emulation_failure since it may not know the exact instruction
> length in all cases. So just assert that
> run->emulation_failure.insn_size is at least 2.

Heh, I suspected this was the case.

> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
> ---

Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux