lkml.org 
[lkml]   [2020]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 63/75] x86/sev-es: Handle #DB Events
On Wed, Jul 15, 2020 at 10:47:52AM +0200, Peter Zijlstra wrote:
> On Tue, Jul 14, 2020 at 02:09:05PM +0200, Joerg Roedel wrote:
>
> > @@ -1028,6 +1036,16 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication)
> > struct ghcb *ghcb;
> >
> > lockdep_assert_irqs_disabled();
> > +
> > + /*
> > + * #DB is special and needs to be handled outside of the intrumentation_begin()/end().
> > + * Otherwise the #VC handler could be raised recursivly.
> > + */
> > + if (error_code == SVM_EXIT_EXCP_BASE + X86_TRAP_DB) {
> > + vc_handle_trap_db(regs);
> > + return;
> > + }
> > +
> > instrumentation_begin();
>
> Wait what?! That makes no sense what so ever.

Then my understanding of intrumentation_begin/end() is wrong, I thought
that the kernel will forbid setting breakpoints before
instrumentation_begin(), which is necessary here because a break-point
in the #VC handler might cause recursive #VC-exceptions when #DB is
intercepted.
Maybe you can elaborate on why this makes no sense?

Regards,

Joerg

\
 
 \ /
  Last update: 2020-07-15 11:15    [W:0.110 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site