]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
x86/sev: Make sure IRQs are disabled while GHCB is active
authorJoerg Roedel <jroedel@suse.de>
Fri, 18 Jun 2021 11:54:08 +0000 (13:54 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:30:29 +0000 (09:30 +0200)
commit525a286fca596fef93a36a374a57fa71b4c79301
tree3b18cfed1b246115d1ad45e2276ba5fe6568484f
parent87d049d4937bc014a45c13d1da52ce5757293604
x86/sev: Make sure IRQs are disabled while GHCB is active

BugLink: https://bugs.launchpad.net/bugs/1938340
[ Upstream commit d187f217335dba2b49fc9002aab2004e04acddee ]

The #VC handler only cares about IRQs being disabled while the GHCB is
active, as it must not be interrupted by something which could cause
another #VC while it holds the GHCB (NMI is the exception for which the
backup GHCB exits).

Make sure nothing interrupts the code path while the GHCB is active
by making sure that callers of __sev_{get,put}_ghcb() have disabled
interrupts upfront.

 [ bp: Massage commit message. ]

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210618115409.22735-2-joro@8bytes.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kernel/sev-es.c