Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2538154yba; Mon, 6 May 2019 07:41:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3mGvxh98ylEEXW0p+y3+8E5myZ8o4Ti2eWsCXo42IMctoA6qdo9aLSKR+Bo7wzqOCWJMB X-Received: by 2002:a63:fb02:: with SMTP id o2mr7393169pgh.357.1557153681429; Mon, 06 May 2019 07:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557153681; cv=none; d=google.com; s=arc-20160816; b=D+DeMe44OzJBw0AGEqxptkun4Znt0tZvByDqCSrt+Kn4hghU7VyL+Hm+ntgztIhdSJ tmnVbUupUOLqcfhyrBAv5pycywVEyc0S5ZjGRnDtaCIxcxWeS7ZW+3Tt3l/m/bt2c/Sc kprdF6jtAMJZgAE6NsH2uVYSiy0uS3IicKB5ggv9quwyHTDPiAEHNI+Hv43pDzOL9zvD nVmxgMpWll/fW9/Q4jA0COatjAQeA5l/iruW/58rgx3H8rzfmaATxwQDz8x0L+pJX0OF Uw/ZLY7mxgRzeGLlJgLv5JU4FNCyBRNzsTFU/WHhTJVb28wG2W8mGhqV7Egb9ML/He1a V8mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eN6tBQsguY+HiDsB34nPcCu9/k3L06GimncXU2lHoyk=; b=jWOh1w0O/SP7eP7xrIqcbA39XIoPP4qPBUqDgUn7cJtfaXYCFr9WHTkHpGbaCZCDgz TeNus7FnHEzl1uU2EFoLez8TYGMoM45YUf3tCB+e80MIVKv2BJVPL6nN1qeHCwf9ZdRi V+0XXPlF5OQ4gtgmhxZYzUn8YiGVaTGr2joW3/GBjvpZMFbBgmFJRwk5gKDhMEjChXjS uDMVyiqAy4q0ZvcTCreMru4b91mJadrG3IAOaGvLmkUZaXCZTEMNdQBIKFzAW1lF/QqT /avpMom/4lnfjlWoCJh3slD3K+KbGIiNRBNoe9BhOMC4IQtvJrJ2u7BNMCMb7PiHdE8d YjNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S9kZIG5A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20si16260033pgk.44.2019.05.06.07.41.05; Mon, 06 May 2019 07:41:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S9kZIG5A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727532AbfEFOiL (ORCPT + 99 others); Mon, 6 May 2019 10:38:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:59150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727527AbfEFOiH (ORCPT ); Mon, 6 May 2019 10:38:07 -0400 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 9B1EE214C6; Mon, 6 May 2019 14:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153487; bh=BaH+cTG8MNxmf2G1evFZX/hJl0oSG6msQP0eoWe5B9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S9kZIG5APcdx2bczeVxadHxAvm5D9hbXvw/CKTZTjKfuYpBkrrMjON16RG53cDvrq UK3moMNGA+zVinrWeOSzMQPF0HWaHR/m3PKrAWGlFbLFbV/SwITY5zR4jkxNcdipT6 G1pvvi4dYtu+sWaRlBywYGBb1bbvU5EGp/ARowds= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jim Mattson , Sean Christopherson , Paolo Bonzini Subject: [PATCH 5.0 100/122] KVM: VMX: Save RSI to an unused output in the vCPU-run asm blob Date: Mon, 6 May 2019 16:32:38 +0200 Message-Id: <20190506143103.757242468@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Christopherson commit f3689e3f17f064fd4cd5f0cb01ae2395c94f39d9 upstream. RSI is clobbered by the vCPU-run asm blob, but it's not marked as such, probably because GCC doesn't let you mark inputs as clobbered. "Save" RSI to a dummy output so that GCC recognizes it as being clobbered. Fixes: 773e8a0425c9 ("x86/kvm: use Enlightened VMCS when running on Hyper-V") Reviewed-by: Jim Mattson Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -6465,7 +6465,7 @@ static void __vmx_vcpu_run(struct kvm_vc "xor %%edi, %%edi \n\t" "xor %%ebp, %%ebp \n\t" "pop %%" _ASM_BP "; pop %%" _ASM_DX " \n\t" - : ASM_CALL_CONSTRAINT + : ASM_CALL_CONSTRAINT, "=S"((int){0}) : "c"(vmx), "d"((unsigned long)HOST_RSP), "S"(evmcs_rsp), [launched]"i"(offsetof(struct vcpu_vmx, __launched)), [fail]"i"(offsetof(struct vcpu_vmx, fail)),