lkml.org 
[lkml]   [2020]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] x86/entry: Optimize local_db_save() for virt
On Thu, May 28, 2020 at 10:19:41PM +0200, Peter Zijlstra wrote:
> static int arch_bp_generic_len(int x86_len)
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -3027,6 +3027,8 @@ static int nested_vmx_check_vmentry_hw(s
>
> /*
> * VMExit clears RFLAGS.IF and DR7, even on a consistency check.
> + * XXX how is this not broken? access to cpu_dr7 ought to be with
> + * IRQs disabled.

Ah, it's simply broken. This code is conditional on a module param that's
off by default, i.e. it's not run widely, and odds are intersection with
debugging is rare.

Moving local_irq_enable() below the DR7 restoration is not an issue.

Maybe also add lockdep_assert_irqs_disabled() to hw_breakpoint_restore() or
hw_breakpoint_active()?

> */
> local_irq_enable();
> if (hw_breakpoint_active())
>
>

\
 
 \ /
  Last update: 2020-05-29 19:36    [W:0.184 / U:7.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site