[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [SVM] Getting the length of the current instruction in svm_vmexit_handler()
On 14/03/18 15:53, Jan Beulich wrote: >>>> On 14.03.18 at 15:56, <rcojocaru@xxxxxxxxxxxxxxx> wrote: >> We'd like to retrieve the length of the current instruction in >> svm_vmexit_handler(), specifically for the VMEXIT_EXCEPTION_DB and >> VMEXIT_EXCEPTION_BP cases. >> >> We've combed the vmcb to no avail. Everything we've thought to check >> (exitinfo1, exitinfo2, exitintinfo) turns out to be zero there while >> testing. >> >> There's __get_instruction_length(vcpu, instr), but it expects to be fed >> the exact instruction we want the length for, which obviously defeats >> the purpose here. >> >> Is there a clean way to get the current instruction length like we do in >> the VMX case (__vmread(VM_EXIT_INSTRUCTION_LEN, &insn_len)) that we're >> overlooking? > Just like Intel's, AMD's is available in a subset of cases only > (look for vmcb->guest_ins_len), which don't include the > exception intercepts you talk about. For #DB I think there's > no difference between both anyway. On non-first-gen hardware, the difference between RIP and NextRIP should give you the instruction length. ISTR NextRIP is written on all exits, and consumed on all entries. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |