[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMtjoLLQpKyveVlS@hirez.programming.kicks-ass.net>
Date: Thu, 17 Jun 2021 17:00:48 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Joerg Roedel <joro@...tes.org>
Cc: x86@...nel.org, Joerg Roedel <jroedel@...e.de>, hpa@...or.com,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Jiri Slaby <jslaby@...e.cz>,
Dan Williams <dan.j.williams@...el.com>,
Tom Lendacky <thomas.lendacky@....com>,
Juergen Gross <jgross@...e.com>,
Kees Cook <keescook@...omium.org>,
David Rientjes <rientjes@...gle.com>,
Cfir Cohen <cfir@...gle.com>,
Erdem Aktas <erdemaktas@...gle.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mike Stunes <mstunes@...are.com>,
Sean Christopherson <seanjc@...gle.com>,
Martin Radev <martin.b.radev@...il.com>,
Arvind Sankar <nivedita@...m.mit.edu>,
linux-coco@...ts.linux.dev, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH v6 1/2] x86/sev: Make sure IRQs are disabled while GHCB
is active
On Wed, Jun 16, 2021 at 08:49:12PM +0200, Joerg Roedel wrote:
> static void sev_es_ap_hlt_loop(void)
> {
> struct ghcb_state state;
> + unsigned long flags;
> struct ghcb *ghcb;
>
> - ghcb = sev_es_get_ghcb(&state);
> + local_irq_save(flags);
> +
> + ghcb = __sev_get_ghcb(&state);
>
> while (true) {
> vc_ghcb_invalidate(ghcb);
> @@ -692,7 +704,9 @@ static void sev_es_ap_hlt_loop(void)
> break;
> }
>
> - sev_es_put_ghcb(&state);
> + __sev_put_ghcb(&state);
> +
> + local_irq_restore(flags);
> }
I think this is broken, at this point RCU is quite dead on this CPU and
local_irq_save/restore include tracing and all sorts.
Also, shouldn't IRQs already be disabled by the time we get here?
Powered by blists - more mailing lists