From patchwork Mon Sep 21 16:27:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 309468 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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 46230C43466 for ; Mon, 21 Sep 2020 16:38:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04F12239D3 for ; Mon, 21 Sep 2020 16:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706334; bh=P0JuG+HB1WWaD+bvHV44AE9IfntFRybUYzhVclNDKvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zEBBJjT6a6uWp3FITagGEINh42Rnunph5CBdOTtKLpN7JY+1FupGduGvMwur7MezH qaLtHDdhnXHPXvXjiqlkmj4mQu2LQ2RGjGOQi+z9xnl/5Vpj7C3FY1klxC0FyoQpPm aEKoP2qVaZO1ZXtiTK344Ow66Gf47zD8ZK2E9Tik= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728647AbgIUQiu (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: stable@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;