From patchwork Thu Feb 27 13:37:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 230245 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=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 2559DC3F37F for ; Thu, 27 Feb 2020 14:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6F4624688 for ; Thu, 27 Feb 2020 14:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582813985; bh=J88XE6AOJdgwTf11vOUudaaaI02NFnNiwWsWHR+Fq4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=p32ve7BaxlgG27nC8mxErKi5ro6XO4IpEe+6wXWTUmEocanQSs3Ap9UD5s6wpvudN PKPry9n5bGqzRSivjFKswg94K16rzi68GHArCxiYpfkSr1fxWH0HwAiEEGs3YnU7O6 5m3YagsdJYom4GrK+BYsaoZfFwz0x/b5HLT8drhc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732802AbgB0OdC (ORCPT ); Thu, 27 Feb 2020 09:33:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:34904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732866AbgB0OBH (ORCPT ); Thu, 27 Feb 2020 09:01:07 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 C698D2469D; Thu, 27 Feb 2020 14:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812067; bh=J88XE6AOJdgwTf11vOUudaaaI02NFnNiwWsWHR+Fq4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ud68gn0Fy5pOognwoJzqrbunFZrUoPD27EUfRyN5lh+sGnnsuDmlXii24ZNWz7u5X 94V/vxqNng2jkEtk79A/qsaG3RBmNQVzLuI0n2qjh70Mx7B0BQaebOXrnAumXiWfMB SW26kX1bxjGX7JTnfal38VX6X+AdqmZ3P6qREEO4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Upton , Paolo Bonzini , Sasha Levin Subject: [PATCH 4.14 210/237] KVM: nVMX: Dont emulate instructions in guest mode Date: Thu, 27 Feb 2020 14:37:04 +0100 Message-Id: <20200227132311.669010674@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132255.285644406@linuxfoundation.org> References: <20200227132255.285644406@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Paolo Bonzini [ Upstream commit 07721feee46b4b248402133228235318199b05ec ] vmx_check_intercept is not yet fully implemented. To avoid emulating instructions disallowed by the L1 hypervisor, refuse to emulate instructions by default. Cc: stable@vger.kernel.org [Made commit, added commit msg - Oliver] Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -12340,7 +12340,7 @@ static int vmx_check_intercept(struct kv } /* TODO: check more intercepts... */ - return X86EMUL_CONTINUE; + return X86EMUL_UNHANDLEABLE; } #ifdef CONFIG_X86_64