diff options
author | Sean Christopherson <[email protected]> | 2023-08-24 19:23:57 -0700 |
---|---|---|
committer | Sean Christopherson <[email protected]> | 2023-08-25 09:00:16 -0700 |
commit | 1952e74da96fb3e48b72a2d0ece78c688a5848c1 (patch) | |
tree | 8a0849a84a10a81f96bf5507bdcb464b23d29754 /lib/memory-notifier-error-inject.c | |
parent | f1187ef24eb8f36e8ad8106d22615ceddeea6097 (diff) |
KVM: SVM: Skip VMSA init in sev_es_init_vmcb() if pointer is NULL
Skip initializing the VMSA physical address in the VMCB if the VMSA is
NULL, which occurs during intrahost migration as KVM initializes the VMCB
before copying over state from the source to the destination (including
the VMSA and its physical address).
In normal builds, __pa() is just math, so the bug isn't fatal, but with
CONFIG_DEBUG_VIRTUAL=y, the validity of the virtual address is verified
and passing in NULL will make the kernel unhappy.
Fixes: 6defa24d3b12 ("KVM: SEV: Init target VMCBs in sev_migrate_from")
Cc: [email protected]
Cc: Peter Gonda <[email protected]>
Reviewed-by: Peter Gonda <[email protected]>
Reviewed-by: Pankaj Gupta <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions