From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [patch] kvm: sev: Fail KVM_SEV_INIT if already initialized Date: Fri, 11 Jan 2019 14:50:26 +0100 Message-ID: <20190111135025.GF14852@flask> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Brijesh Singh , Joerg Roedel , Paolo Bonzini , Thomas Lendacky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: David Rientjes Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2019-01-02 12:56-0800, David Rientjes: > By code inspection, it was found that multiple calls to KVM_SEV_INIT > could deplete asid bits and overwrite kvm_sev_info's regions_list. > > Multiple calls to KVM_SVM_INIT is not likely to occur with QEMU, but this > should likely be fixed anyway. > > This code is serialized by kvm->lock. > > Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command") > Reported-by: Cfir Cohen > Signed-off-by: David Rientjes > --- Applied, thanks.