]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: SEV: initialize regions_list of a mirror VM
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Nov 2021 00:50:30 +0000 (19:50 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 9 Dec 2021 10:10:45 +0000 (11:10 +0100)
commit0af652925fa850c59b8affb912ba8e6edae96ea7
tree5e0860a90ca9335c48f377a5486b60e4431e077f
parent860c713d3914269d434020368f17ecd0d6b73d79
KVM: SEV: initialize regions_list of a mirror VM

BugLink: https://bugs.launchpad.net/bugs/1953731
[ Upstream commit 2b347a387811cb4aa7bcdb96e9203c5019a6fb41 ]

This was broken before the introduction of KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM,
but technically harmless because the region list was unused for a mirror
VM.  However, it is untidy and it now causes a NULL pointer access when
attempting to move the encryption context of a mirror VM.

Fixes: 54526d1fd593 ("KVM: x86: Support KVM VMs sharing SEV context")
Message-Id: <20211123005036.2954379-7-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/x86/kvm/svm/sev.c