|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07/11] x86/emul: Add pending_dbg field to x86_event
On 06/06/18 17:46, Roger Pau Monné wrote:
> On Mon, Jun 04, 2018 at 02:59:11PM +0100, Andrew Cooper wrote:
>> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
>> index bfa3a0d..39c9ddc 100644
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -2483,7 +2483,7 @@ void update_guest_eip(void)
>> }
>>
>> if ( regs->eflags & X86_EFLAGS_TF )
>> - hvm_inject_hw_exception(TRAP_debug, X86_EVENT_NO_EC);
>> + hvm_inject_debug_exn(X86_DR6_BS);
>> }
>>
>> static void vmx_fpu_dirty_intercept(void)
>> @@ -3382,7 +3382,7 @@ static int vmx_handle_eoi_write(void)
>> * It is the callers responsibility to ensure that this function is only
>> used
>> * in the context of an appropriate vmexit.
>> */
>> -static void vmx_propagate_intr(unsigned long intr)
>> +static void vmx_propagate_intr(unsigned long intr, unsigned long
>> pending_dbg)
>> {
>> struct x86_event event = {
>> .vector = MASK_EXTR(intr, INTR_INFO_VECTOR_MASK),
>> @@ -3406,6 +3406,9 @@ static void vmx_propagate_intr(unsigned long intr)
>> else
>> event.insn_len = 0;
>>
>> + if ( event.vector == TRAP_debug )
>> + event.pending_dbg = pending_dbg;
>> +
>> hvm_inject_event(&event);
>> }
>>
>> @@ -3715,7 +3718,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>> if ( rc < 0 )
>> goto exit_and_crash;
>> if ( !rc )
>> - vmx_propagate_intr(intr_info);
>> + vmx_propagate_intr(intr_info, exit_qualification);
>> }
>> else
>> domain_pause_for_debugger();
>> @@ -3736,7 +3739,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>> if ( rc < 0 )
>> goto exit_and_crash;
>> if ( !rc )
>> - vmx_propagate_intr(intr_info);
>> + vmx_propagate_intr(intr_info, 0 /* N/A */);
>> }
>> else
>> {
>> @@ -3776,7 +3779,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>> break;
>> case TRAP_alignment_check:
>> HVMTRACE_1D(TRAP, vector);
>> - vmx_propagate_intr(intr_info);
>> + vmx_propagate_intr(intr_info, 0 /* N/A */);
>> break;
>> case TRAP_nmi:
>> if ( MASK_EXTR(intr_info, INTR_INFO_INTR_TYPE_MASK) !=
> I'm kind of lost here. Don't you need to update vmx_inject_event so
> that it does something with the pending_dbg field in x86_event?
>
> (and the same to svm_inject_event)
The commit message specifically says "To begin resolving this issue, add
a ..."
This patch is plumbing. Later patches are fixes, and it takes until
patch 9 to get working sensibly.
~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 |