From patchwork Thu Aug 27 16:27:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 11741017 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DBAD722 for ; Thu, 27 Aug 2020 16:27:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EA192087E for ; Thu, 27 Aug 2020 16:27:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Y4UDiw3s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbgH0Q1f (ORCPT ); Thu, 27 Aug 2020 12:27:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41881 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbgH0Q1e (ORCPT ); Thu, 27 Aug 2020 12:27:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598545653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAUeeK2BuQYFsQta/IVHJijuZ4P+QQy9wWHlAAEXfrY=; b=Y4UDiw3sg3FznLLDwU4U00+ASlZciptZROty1CO3ED7S+cBVPIZOAmWjvWo9CMuaIkwPYH a5doYTIoqJ8cWfrw/NYLFvsR7HCvrq/yufuTbYY7tNwZpxNrtjRNyBLgHtbTHEsgrcUpaw 1RXxa5K9freqsXpOrXiLeIRzHryuskk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-274-48E3qiZPMbekZUWy7CI_mA-1; Thu, 27 Aug 2020 12:27:31 -0400 X-MC-Unique: 48E3qiZPMbekZUWy7CI_mA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8CB718B9F14; Thu, 27 Aug 2020 16:27:29 +0000 (UTC) Received: from localhost.localdomain (unknown [10.35.206.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07B735C22E; Thu, 27 Aug 2020 16:27:21 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: Borislav Petkov , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), Paolo Bonzini , linux-kernel@vger.kernel.org, Joerg Roedel , "H. Peter Anvin" , Sean Christopherson , Ingo Molnar , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Thomas Gleixner , Maxim Levitsky Subject: [PATCH 0/3] Few nSVM bugfixes Date: Thu, 27 Aug 2020 19:27:17 +0300 Message-Id: <20200827162720.278690-1-mlevitsk@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This patch series contains few nested SVM fixes from testing I did this weekend. Patch #1 fixes issue where we were setting the GIF (global interrupt flag) on first nested VMexit, after migration thus making the nested guest crash from unexpected interrupts. Patch #2 is my observation that we never setup nesed msr bitmap on nested state load after migration. Patch #3 was 'migrated' ;-) from my other patch series to make it smaller, which is about more strict checks when we about to return to a nested guest, from SMM. Best regards, Maxim Levitsky Maxim Levitsky (3): SVM: nSVM: correctly restore GIF on vmexit from nesting after migration SVM: nSVM: setup nested msr permission bitmap on nested state load KVM: nSVM: more strict SMM checks when returning to nested guest arch/x86/kvm/svm/nested.c | 7 ++++++- arch/x86/kvm/svm/svm.c | 29 ++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-)