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=-9.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,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 C2CE6C43215 for ; Wed, 27 Nov 2019 21:42:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FB8D2154A for ; Wed, 27 Nov 2019 21:42:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574890938; bh=9P2C0OhGyuVrf0uVcSnEJlV+LUuk1SKnoL9Sxe9kW7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OUfApnpsnHLjVLErEhwK8odHB4swmW3XQUP0OTGv/DScLRI2BVljPh5XmOAh3WLYh i3LBJEhZ4fZam+jJhnmU8jolXUxs8D8E6QXOuz8aJfzVhkjdApcovJeagwU0EGUPiD Fh3xSJlj1919aQhbXcbovNZ3FGlsJ1oHhcXnR9Vw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729007AbfK0UkZ (ORCPT ); Wed, 27 Nov 2019 15:40:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:45008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727690AbfK0UkZ (ORCPT ); Wed, 27 Nov 2019 15:40:25 -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 48DA821772; Wed, 27 Nov 2019 20:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887224; bh=9P2C0OhGyuVrf0uVcSnEJlV+LUuk1SKnoL9Sxe9kW7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mFJOsV4+XQV091ClHBdP75B6h4tdXDUTtxLP+0GBSdjLboIp1U4TfWaZ3VdzARt3/ 1hYPsYxCa73pf0Hs32I3w+iJQdJK8DrhAGRryR6pD1b7SuLBVlXBD6bVS/n1MGkkc2 qbnvB3zWx3Ug5xH65iAMwntP5IBDWNZ9HDLNy9QQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Uros Bizjak , Paolo Bonzini , Sasha Levin Subject: [PATCH 4.9 029/151] KVM/x86: Fix invvpid and invept register operand size in 64-bit mode Date: Wed, 27 Nov 2019 21:30:12 +0100 Message-Id: <20191127203019.137550971@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Uros Bizjak [ Upstream commit 5ebb272b2ea7e02911a03a893f8d922d49f9bb4a ] Register operand size of invvpid and invept instruction in 64-bit mode has always 64 bits. Adjust inline function argument type to reflect correct size. Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4c0d6d0d6337f..f76caa03f4f80 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1547,7 +1547,7 @@ static int __find_msr_index(struct vcpu_vmx *vmx, u32 msr) return -1; } -static inline void __invvpid(int ext, u16 vpid, gva_t gva) +static inline void __invvpid(unsigned long ext, u16 vpid, gva_t gva) { struct { u64 vpid : 16; @@ -1561,7 +1561,7 @@ static inline void __invvpid(int ext, u16 vpid, gva_t gva) : : "a"(&operand), "c"(ext) : "cc", "memory"); } -static inline void __invept(int ext, u64 eptp, gpa_t gpa) +static inline void __invept(unsigned long ext, u64 eptp, gpa_t gpa) { struct { u64 eptp, gpa; -- 2.20.1