• Aaron Lewis's avatar
    selftests: kvm: Allows userspace to handle emulation errors. · 39bbcc3a
    Aaron Lewis authored
    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: default avatarAaron Lewis <aaronlewis@google.com>
    Reviewed-by: default avatarJim Mattson <jmattson@google.com>
    Message-Id: <20210510144834.658457-3-aaronlewis@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    39bbcc3a
processor.c 36.8 KB