Message ID | 20240223204233.3337324-2-seanjc@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-79128-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp835368dyb; Fri, 23 Feb 2024 12:45:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWG4HoDaX2B/1XTBXd3TKavw+cjuLkVtJkEXxfX7pjd1BaDzUGc+ensUn0v/GKFGGUr/2jZLalZwOmjxZ4FvDGe5IGPJQ== X-Google-Smtp-Source: AGHT+IFMylSWg6psp+Rhibx32QRJyUOqbkBqJ9DG+ec9tXdDeofzMntXOX5sQMwtin7D2IDKxlWk X-Received: by 2002:a05:6214:19e3:b0:68f:cdf1:76b4 with SMTP id q3-20020a05621419e300b0068fcdf176b4mr1265770qvc.43.1708721141733; Fri, 23 Feb 2024 12:45:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708721141; cv=pass; d=google.com; s=arc-20160816; b=fvWqFPEaqTxxzP5bk8kWATcHNi6gYwfdNa9klIzSHKllOLh7brzr6HfIH3ga3uzF1L u/On3v6mRls8MzAL5/rm5Z6X78bBl8cbJUTebxwvkTSjPl70aTTMsPWQjCblJoDUyOJK ADLf1snPyByBNjLnhW7jlK9JPdgvH2P2ArXSRfV4tYisppc4iwP+98+jiJTdYZoWG/Zh qLDGqQNQjq/+DVxqr4QUseK+3ASwI2ES0fOVTk890PUess+0RBlKmMUoevJXb5K+6iIw BVf9gFEj7Um2GRaEaqP8XGEJbDPDdiL9SvMRkemXzdbRyZtWcFbfL3BmwlDg1hK+GZMb xNMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :reply-to:dkim-signature; bh=d647qV5YXXlk1eKRQGMECxhpXnyYK5AYh5qfDVrkHVc=; fh=JwAaPbWMs/qS/X5pd8dDgM+/VbHKUU8svsSuBqRpQ+U=; b=Zeueqfwb2AP2osTVCIZY7QJy1fTDlUq5Gn7IZ5cUp8ua5W5gtviCU9Y83UYvAjyYXB yFWIOHwM2S8dEBe3nnE2kISkj2WgL9lLZi99iTOI03uXPA3b37Z6QfgGfjutrVW3/Zjm iM0tqb94bFgZbci3247d4NWl73jJ0wSt0MyA5xyl1YKqCtfmTrb2jwInPpi43/dZXRTF ZUNOiwAAUm0sOFPYDXNHttbAj3YtbTpnLdq0+EZOiF4lKoqvfLmqPq84EGpT/aKhyLDN 0UAtM8vQxh/W/Lv1IqF9IJZ3qLuQJdzD0akTpBKyWvICWVY21I9bGmtS30BLzsDQllyH BwIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RyOWud10; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-79128-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79128-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m10-20020a0562141bca00b0068fac70696csi5903622qvc.4.2024.02.23.12.45.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79128-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RyOWud10; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-79128-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79128-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C22411C25357 for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 20:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC408153BC7; Fri, 23 Feb 2024 20:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RyOWud10" Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E32BE14938A for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 20:42:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708720959; cv=none; b=Rwhmaci8UyU5+eDE0ZHoJ8PI9ys5/9GJjs7viXhA+K9jvywtnOQDVh8qbYmZckV43qGCPb6SSNtEmJHTRtZKCGTBLzmNbAreBkKAz09mL0//+Fa2EIZZJeoNlGK8P0qUoC9VpaaqyVH4mkh3T7CsLtLf3135uBN50EiyMDm31Gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708720959; c=relaxed/simple; bh=6ShF5KyZmeoKeVwczIN545JawDqkwUK3No4F9ATa188=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Wv1AnotGc8BLpaA5GTjKZfulwHJp7F0rM+uBUz0bSAyGqgiPs3vDPGig8SPP0GlhhQUKWoe3qaxJjir6HoWjZNLgc2FN1ZfR2lCWjW9IhhflRo7XtDwZc3ZajuhefAlH+NVWEt8bE+Ww1BpTpqtXdJzzi8qoptb3Zj/GgjYDu/Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RyOWud10; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-29902c06980so1010288a91.2 for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 12:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708720957; x=1709325757; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=d647qV5YXXlk1eKRQGMECxhpXnyYK5AYh5qfDVrkHVc=; b=RyOWud10QA5VdBHeA7MTnjX//5DW7G102NkiFYhDmENz3W0Nm1mxEejoVYD4zJRDvk zJdueDtusFZLRLRn7m57h4uaZY6DJnMBzkMkxVle/eNCRx20LDz8+KrT09H4tD3s+D1e j7K9K+XLpdT+U1VGsft22epAZBn9WbPvCb306shZ5/6a/1Rol/Zlq3SbMIbF94Cc4UqT 0gUA32XXwguBZVdrpzadAcF8i2+pPZia3xYGQBuDx3NAwfMu4UYKHmmqeREhaufOWLtt 11T6UXO7IGySIs6HI7bBxNK6Cy32RHKA1NFza2m8nHXGX3GXtpNujnFbP5IYbx/Z6HvQ EYBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708720957; x=1709325757; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d647qV5YXXlk1eKRQGMECxhpXnyYK5AYh5qfDVrkHVc=; b=gLGpzefR1sK7BQtJzLxH0wwiM6V1soAB7F+o5jMfK190dzKDC7s+L728DoUyS+31gK 96FX0wTjHlWf/RlCO8a4Bw28YnvpEdNZ19BsvGfhv2+l2dJ+g10vMO7FFoycazMpcc37 M1nUluKoR7zVI3pRjpvNhQVFBGbdj7X5usLR5imk7abmSDav0Vj3U/aKWIB7RHh01AzO 2RQvdA8U5VZKlgDD03uW+sllBynfPxd8ggASYLwe1Z0K5pOtrpIfNx0LpXthqjnFrmxj hLwJ8PtN4c6A9Xu80DRUagIiNJoE7yxUglJFXQTSgjyU95NXXUb3boPyuGnXLm/YOWYP LW7Q== X-Forwarded-Encrypted: i=1; AJvYcCVXQQpm4qIg6RAqUqDDSUsiIwM2O/FZLn9zj3lNZbxEPHg3su0Lcfg66E/pVICKUFzN4qz3XA2BpfP6vX/OZKp1+FjbhCGlyWO+YOYw X-Gm-Message-State: AOJu0Yy6jtgxShGYG+/SfpD4+Sfkr4Nwi98sx2YG/Fr7FPqg2xptxZCs Hlgqo/M6/BQzuYG/PkS1yPQUaIjLEcOJ9JySYYRTBVY7pd05vprLyEtBlFzWZdbnohRPdo/nowV z1w== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:2e8f:b0:296:de77:56c9 with SMTP id sn15-20020a17090b2e8f00b00296de7756c9mr2215pjb.2.1708720957080; Fri, 23 Feb 2024 12:42:37 -0800 (PST) Reply-To: Sean Christopherson <seanjc@google.com> Date: Fri, 23 Feb 2024 12:42:26 -0800 In-Reply-To: <20240223204233.3337324-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240223204233.3337324-1-seanjc@google.com> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240223204233.3337324-2-seanjc@google.com> Subject: [PATCH 1/8] KVM: SVM: Create a stack frame in __svm_vcpu_run() for unwinding From: Sean Christopherson <seanjc@google.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Lendacky <thomas.lendacky@amd.com>, Michael Roth <michael.roth@amd.com>, Alexey Kardashevskiy <aik@amd.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791723979819102712 X-GMAIL-MSGID: 1791723979819102712 |
Series |
KVM: SVM: Clean up VMRUN=>#VMEXIT assembly
|
|
Commit Message
Sean Christopherson
Feb. 23, 2024, 8:42 p.m. UTC
Unconditionally create a stack frame in __svm_vcpu_run() to play nice with
unwinding via frame pointers, at least until the point where RBP is loaded
with the guest's value. Don't bother conditioning the code on
CONFIG_FRAME_POINTER=y, as RBP needs to be saved and restored anyways (due
to it being clobbered with the guest's value); omitting the "MOV RSP, RBP"
is not worth the extra #ifdef.
Creating a stack frame will allow removing the OBJECT_FILES_NON_STANDARD
tag from vmenter.S once __svm_sev_es_vcpu_run() is fixed to not stomp all
over RBP for no reason.
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/svm/vmenter.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S index 9499f9c6b077..ee5d5a30da88 100644 --- a/arch/x86/kvm/svm/vmenter.S +++ b/arch/x86/kvm/svm/vmenter.S @@ -99,6 +99,7 @@ */ SYM_FUNC_START(__svm_vcpu_run) push %_ASM_BP + mov %_ASM_SP, %_ASM_BP #ifdef CONFIG_X86_64 push %r15 push %r14