>>> On 04.06.18 at 15:59, <andrew.coop...@citrix.com> wrote:
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -3696,6 +3696,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>               */
>              __vmread(EXIT_QUALIFICATION, &exit_qualification);
>              HVMTRACE_1D(TRAP_DEBUG, exit_qualification);
> +            __restore_debug_registers(v);
>              write_debugreg(6, exit_qualification | DR_STATUS_RESERVED_ONE);

The change is certainly correct as is, but I'd still like to put out for
discussion the alternative option:

    if ( v->arch.hvm_vcpu.flag_dr_dirty )
        write_debugreg(6, exit_qualification | DR_STATUS_RESERVED_ONE);
    else
        v->arch.debugreg[6] = exit_qualification | DR_STATUS_RESERVED_ONE;

After all the guest may know it's single stepping, and may not care to
read DR6 at all.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to