diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-12-22 13:18:15 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-12-22 13:18:15 +0100 |
commit | d68321dec1b2234fb32f423e32c3af5915eae36c (patch) | |
tree | 7c62b2c76d62ab607238bc2cccc24eed0b32687a /drivers/crypto/ccp/psp-dev.c | |
parent | 19a049f1a44d18e38a311e723c19c33c81020a30 (diff) | |
parent | d89c69f42bf0fe42d1f52ea9b3dca15b1ade7601 (diff) |
Merge tag 'kvm-ppc-fixes-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master
PPC KVM fix for 5.5
- Fix a bug where we try to do an ultracall on a system without an
ultravisor.
Diffstat (limited to 'drivers/crypto/ccp/psp-dev.c')
-rw-r--r-- | drivers/crypto/ccp/psp-dev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c index 6b17d179ef8a..39fdd0641637 100644 --- a/drivers/crypto/ccp/psp-dev.c +++ b/drivers/crypto/ccp/psp-dev.c @@ -21,6 +21,8 @@ #include <linux/ccp.h> #include <linux/firmware.h> +#include <asm/smp.h> + #include "sp-dev.h" #include "psp-dev.h" @@ -235,6 +237,13 @@ static int __sev_platform_init_locked(int *error) return rc; psp->sev_state = SEV_STATE_INIT; + + /* Prepare for first SEV guest launch after INIT */ + wbinvd_on_all_cpus(); + rc = __sev_do_cmd_locked(SEV_CMD_DF_FLUSH, NULL, error); + if (rc) + return rc; + dev_dbg(psp->dev, "SEV firmware initialized\n"); return rc; |