Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3284994pxk; Mon, 21 Sep 2020 09:41:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA+S8Ui+g8hWe7PlmnjC8g8bZGEX9BAm9wopnpKkNuf41V1FFIbL98gzZQvaXEeX05sM8A X-Received: by 2002:a17:906:6805:: with SMTP id k5mr258554ejr.397.1600706463437; Mon, 21 Sep 2020 09:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706463; cv=none; d=google.com; s=arc-20160816; b=XLm4pdwA0cunRpVnIYHmc133zjJXWYnK0Ce8uYqqZkJNwnIbXYS8ezoP/+kjeGN22H Fn3J4K8XQ7NvB8dphK2svXe72EpoKZI+PjFExOlBXwqoQtJxAcwtXg7ne1Ntsju30ek4 QqUS4TlXa2K7owXOaTWYDJxBaRmIfy3fcQByEoZTCmA1d+1FotnR3t6dtejyzX9gYM3N KaL/JIgWYvaFxQQn5BlQSBlhNdnFtAr4wnTL7mKQtTEnPp2BXpHZX6WCoKlxWh0C1PN0 TUaRBAQNR69W4UeRcWLy4N0azVGjOW/KmKF72cIAeKxAfR4isQfzn4AbgVb/s8n/egcI 7JIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uCzVcRQW+gN0kUdDSw81Z/p7NeljYwDzcfASlLj347c=; b=nGcjRUNCFReJ+xtlVML0bEqstH8MN9IVF9RL1zu9TfkgIx34GIaJd1O2oomHqKt7af k6gYrC/fTdVPFN2ATirSn2w0CJtvfVnF8c/UbGuRhSbKcU7WrH+PJfeGqDo69acAThzr G7RuftM5VTO7h3rAi/N714L7uZO6nG6WAJe+o7GGqHudxnPCrKgMDu5ePv//6qUll/nO MHS//OsS3pjSSFa0HNT3UoVCUAGPtxJpFPEfZw3D4nHQ2MVxQ/hO4+76e4YZtnZVRiKc J2/MoOl2tCTSB3lfgmobS1TGLa/Jh4u1xlfWdhADIAWZx2GuTCk6VKh4EUBJDsOYMPL9 6+Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f1vySdEo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b43si9858840edf.15.2020.09.21.09.40.39; Mon, 21 Sep 2020 09:41:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f1vySdEo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729193AbgIUQiu (ORCPT + 99 others); Mon, 21 Sep 2020 12:38:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:39846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729062AbgIUQih (ORCPT ); Mon, 21 Sep 2020 12:38:37 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 414F7239D2; Mon, 21 Sep 2020 16:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706316; bh=P0JuG+HB1WWaD+bvHV44AE9IfntFRybUYzhVclNDKvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f1vySdEoh5NaZ5l6QAAfWuM7sQLsDiV3d1anat/JNT9KFrdNV9M2NCsglyYcwt2gi KAUzqmrV1xvjbF479sxPAJ+h1nj6oz0E2BRCWXcoecXYn5SgJIHbEm1lpsWmHWgsuf gXKUvbeNMd/2SGI6+ApH7JRKVq6liQJXQxWNK4g4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wanpeng Li , Paolo Bonzini Subject: [PATCH 4.14 50/94] KVM: VMX: Dont freeze guest when event delivery causes an APIC-access exit Date: Mon, 21 Sep 2020 18:27:37 +0200 Message-Id: <20200921162037.856804133@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wanpeng Li commit 99b82a1437cb31340dbb2c437a2923b9814a7b15 upstream. According to SDM 27.2.4, Event delivery causes an APIC-access VM exit. Don't report internal error and freeze guest when event delivery causes an APIC-access exit, it is handleable and the event will be re-injected during the next vmentry. Signed-off-by: Wanpeng Li Message-Id: <1597827327-25055-2-git-send-email-wanpengli@tencent.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -9144,6 +9144,7 @@ static int vmx_handle_exit(struct kvm_vc (exit_reason != EXIT_REASON_EXCEPTION_NMI && exit_reason != EXIT_REASON_EPT_VIOLATION && exit_reason != EXIT_REASON_PML_FULL && + exit_reason != EXIT_REASON_APIC_ACCESS && exit_reason != EXIT_REASON_TASK_SWITCH)) { vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR; vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;