From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D6A8C2D0A8 for ; Wed, 23 Sep 2020 18:44:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F195A2371F for ; Wed, 23 Sep 2020 18:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbgIWSoy (ORCPT ); Wed, 23 Sep 2020 14:44:54 -0400 Received: from mga07.intel.com ([134.134.136.100]:14506 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbgIWSoy (ORCPT ); Wed, 23 Sep 2020 14:44:54 -0400 IronPort-SDR: e0/So8Fod/wGXYrSmkcRHgJLjmBa/PSCyUBh3/t4LKDYi8HGUQaUVVENF7YnxzLq50Q45YkNvu qhX1ckkkGkbg== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="225124469" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="225124469" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 11:44:53 -0700 IronPort-SDR: AG21uKJ436RIhpwWxjdI38cfG5EviAAvcqTu/07YPugVMhGwvDhfNfrDpdU+xlWpNDW1tcwOgi te3FdDBE8Dtg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="347457640" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.160]) by FMSMGA003.fm.intel.com with ESMTP; 23 Sep 2020 11:44:52 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Cross , Peter Shier Subject: [PATCH v2 0/7] KVM: nVMX: Bug fixes and cleanup Date: Wed, 23 Sep 2020 11:44:45 -0700 Message-Id: <20200923184452.980-1-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix for a brutal segment caching bug that manifested as random nested VM-Enter failures when running with unrestricted guest disabled. A few more bug fixes and cleanups for stuff found by inspection when hunting down the caching issue. v2: - Rebased to kvm/queue, commit e1ba1a15af73 ("KVM: SVM: Enable INVPCID feature on AMD"). Sean Christopherson (7): KVM: nVMX: Reset the segment cache when stuffing guest segs KVM: nVMX: Reload vmcs01 if getting vmcs12's pages fails KVM: nVMX: Explicitly check for valid guest state for !unrestricted guest KVM: nVMX: Move free_nested() below vmx_switch_vmcs() KVM: nVMX: Ensure vmcs01 is the loaded VMCS when freeing nested state KVM: nVMX: Drop redundant VMCS switch and free_nested() call KVM: nVMX: WARN on attempt to switch the currently loaded VMCS arch/x86/kvm/vmx/nested.c | 103 ++++++++++++++++++++------------------ arch/x86/kvm/vmx/vmx.c | 8 +-- arch/x86/kvm/vmx/vmx.h | 9 ++++ 3 files changed, 65 insertions(+), 55 deletions(-) -- 2.28.0