Re: [kvm-unit-tests PATCH 2/4] x86: emulator.c cleanup: Use ASM_TRY for the UD_VECTOR cases

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

 



On Fri, 5 Aug 2022 19:00:12 -0700, Nadav Amit <nadav.amit@xxxxxxxxx> wrote:
> On Aug 5, 2022, at 12:59 PM, Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> > On Fri, Aug 05, 2022, Michal Luczaj wrote:
> >> On Fri, 5 Aug 2022 13:42:40 +0200, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> >>> The original reason was to test Linux using MOVBE even on non-Atom 
> >>> machines, when MOVBE was only on Atoms. :)
> >> 
> >> So the emulator's logic for MOVBE is meant to be tested only when the
> >> guest supports MOVBE while the host does not?
> > 
> > Ah, I see what you're asking.  No, it's perfectly legal to test MOVBE emulation
> > on hosts that support MOVBE, i.e. using FEP is allowed.  But because KVM emulates
> > MOVBE on #UD and the KUT testcase is guaranteed to generate a #UD (barring a
> > hardware bug), there's no need to use FEP.  And not using FEP is advantageous
> > because it avoids depending on an opt-in non-production module param.
> 
> If history is discussed, the test was created long before FEP. Without FEP,
> the way to force the emulator to emulate an instruction was to set the
> instruction in memory that is not mapped to the guest. But, as Sean stated,
> this test always triggers #UD, so it was not necessary.
> 
> The purpose of this test was to check a KVM fix for a bug that was found
> during fuzzing:
> 
> https://lore.kernel.org/all/5475DC42.6000201@xxxxxxxxxx/T/#m3a0da02d7c750c28816b08c43cf2ca03252b8bad

OK, I think I finally get it. Thank you, guys, for all the details.

Michal




[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