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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 6BD3FC76190 for ; Tue, 23 Jul 2019 10:35:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 454B622512 for ; Tue, 23 Jul 2019 10:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563878152; bh=Nct+Ng1Cc3JLDble4mIzJRG/NfOmIfeE9TDaz5i5vyU=; h=Subject:To:Cc:From:Date:List-ID:From; b=V3OMxPyt+ad44xL0sdxtvyrEd2+O8HFQW4yxMqv8vYUwWdAf2cJBFeK22eMtxFKOn zcxXdJcwaftKUWyk/7il7inICeWX77CrZZtQ1Pb6IcyLhUEIafQC/KcN2PU/ZyKvh0 9sseXRMOqU7FWYNPfReI75s3g5Ot8p+dTuWODSz4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730627AbfGWKfv (ORCPT ); Tue, 23 Jul 2019 06:35:51 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:60043 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfGWKfv (ORCPT ); Tue, 23 Jul 2019 06:35:51 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id F1FDA58C; Tue, 23 Jul 2019 06:35:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 23 Jul 2019 06:35:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=QEoCyQ cY7jEs5vaXzOrizzx2eXRpJCoQjPqS4JEZI+w=; b=AtIuRN2z7TjC72Pw1uzH1M 0Etsu0hRJXLsXkH0sl5aVly33VkFucom98t3ZUAI/VEULGlY6HG6XpKZc9d0JTgH g42Il+HW7OwZ7ewh5bOwntmIyrvuLukNniEFPtmpEpo/rSf7e2v2VbZHB5JF5M6K mlEZkJ1TZxIpSf8QSuO5UwR6fasUTpLoMJLfxso8e5Qbd+rhlVn+lJpJXYSZnH0c OJ9eMJQLdW4ZEiXBnFxs9+6jPwHEvJHEykknblGWO9Un6m6YLsN4FaHFLrnRNqcj pDQiIViigO3bDfx1sYCYMa+ssDUf08Bm/Bp5VjtkCQV/9xcD47weTiU9YgrMGlzw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrjeekgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedu X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 2EDD9380076; Tue, 23 Jul 2019 06:35:50 -0400 (EDT) Subject: FAILED: patch "[PATCH] KVM: VMX: Always signal #GP on WRMSR to MSR_IA32_CR_PAT with" failed to apply to 4.19-stable tree To: sean.j.christopherson@intel.com, nadav.amit@gmail.com, pbonzini@redhat.com Cc: From: Date: Tue, 23 Jul 2019 12:32:22 +0200 Message-ID: <156387794267213@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From d28f4290b53a157191ed9991ad05dffe9e8c0c89 Mon Sep 17 00:00:00 2001 From: Sean Christopherson Date: Tue, 7 May 2019 09:06:27 -0700 Subject: [PATCH] KVM: VMX: Always signal #GP on WRMSR to MSR_IA32_CR_PAT with bad value The behavior of WRMSR is in no way dependent on whether or not KVM consumes the value. Fixes: 4566654bb9be9 ("KVM: vmx: Inject #GP on invalid PAT CR") Cc: stable@vger.kernel.org Cc: Nadav Amit Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 1a87a91e98dc..091610684d28 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -1894,9 +1894,10 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) MSR_TYPE_W); break; case MSR_IA32_CR_PAT: + if (!kvm_pat_valid(data)) + return 1; + if (vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_IA32_PAT) { - if (!kvm_pat_valid(data)) - return 1; vmcs_write64(GUEST_IA32_PAT, data); vcpu->arch.pat = data; break;