From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 61EB21B87EB for ; Fri, 14 Nov 2025 12:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763123766; cv=none; b=DWDhQtF9JmkSTWan/M6PigJ8qeqsAWfWvk/BR8F4tomJGvb3GCgIZlIaAa1uQjoSFe0NUoSo6tDTN8XVCVxjSur4YA3OKT9xLLfA6g+FBHPLDi2hmeElGCCvHgfS1MaVSueYpsxhlsqRNwfbQNVoY00Goh8RhmeBgYOS8R6cS/I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763123766; c=relaxed/simple; bh=pb+XJxf3HXvKaX5z4y1PCaJW1hWXAgYv2XerDSO3e10=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=SVgAwP+zu+rljDaI7uydWVX6izct0VTa/UDUJb7UQWyCicgEsZppAAfXu9Sh2PAGe3vZTOPSHssxcCxwy4Q1dEwDNosShuUNy+J+LTAtDKseQ8nRh3FLLQYImrbg/eQhZ3P7k5ztTBzjoXBJTev4FeMZgVkjRmCkaUXERtT3pUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ZI3vMx+H; arc=none smtp.client-ip=209.85.218.73 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--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ZI3vMx+H" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b73599315adso118674266b.2 for ; Fri, 14 Nov 2025 04:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763123763; x=1763728563; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=p0aEtq9fpAAc1Rcq48X2i8Zfvwd7K0ErmVrQAGMecdw=; b=ZI3vMx+HwdxTECifPDmDxIQgiaAB34o3VTdvM4Z1CZnFkPBZJ32HaSVT0swyORzZQw p2XroeoRhMd5kavaQTeNVIZGtW1SZPL8uFl9jpK4zLYjZ/GXwVjEcKR66CaDxNuqXngC Hv32BFeljUyZM98iLsxUmaGTiDp79aKXPq32ueWiAPutZQzZKXeoeqQW5dZm3ww++LiV E1KVWEcwxRX7WtpOrhgLAzxCUcB5MJTQ9am8fhTKl+ikaYdiFJMjglVGGP2HyFyqRUN6 7o6B3J1HWeRjI/zOlS4fgJi0E0bcNdJLx5wX48taxSSsuWJbowGHucU4M7zQlKjNl0yE M+vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763123763; x=1763728563; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=p0aEtq9fpAAc1Rcq48X2i8Zfvwd7K0ErmVrQAGMecdw=; b=cxjdNN5xVq99inTlY8uiX6rTxrcWuhCArwBTK/+/NZ6GD5fn5YrCFGfgVfy498QHaZ 4qwUtj2kmUnCPCJUw6zd9PhOnFDwnMof78UcOQOt/G5E+7975lQEqjPlYi8vaP6YG3Ok dSqS+hwPcGnSWY6Z0v4ohxTg7riEnFL2jtwjqDl0U6J8FLGmFjS5sPJnfaDV6fvAsCpA 90fyz0MPGEmqWW4914anFbO8Ek4YaB3sVDtdi7eRbazPero1REmWnbWUIB17vl30PYNp 5wVOey/XFt6jsk1QOLGDrUiqJlt9jWRAKbffAnlN4iUz1ytitd8WbGiLJNg4i+CyeTxb 62Dg== X-Forwarded-Encrypted: i=1; AJvYcCXtA9iABUHLsWsBGfNxkByY7R72VkNSD2ULJDmPk6u88+epPi31dPfKnxNBjqyNJDhX6xgBo45gVAvI4UE=@vger.kernel.org X-Gm-Message-State: AOJu0YxeHdEMyDMzapTcpUd0uVaVWHtvW4cjXDGQy9aLb3ay0vz9bo+l qJCdQt+ZIiuJjF9QKbw1JONGkycZrL0EnYrfci6iDud35UzPDieSrAeTKMxY1TdeNONYO9CqFOc hal4XjMOV1fDO+A== X-Google-Smtp-Source: AGHT+IG3C7rwSOYPAJ/6aX/rxgkbjZav3E88HPyJ7byhfiu/KauLJOfo21yD5QgFI0fjQOUkM5395YPmlFWjzQ== X-Received: from ejckp14.prod.google.com ([2002:a17:907:998e:b0:b73:737b:c33c]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a17:906:338d:b0:b72:58b6:b263 with SMTP id a640c23a62f3a-b7367961de5mr198500666b.60.1763123762691; Fri, 14 Nov 2025 04:36:02 -0800 (PST) Date: Fri, 14 Nov 2025 12:36:01 +0000 In-Reply-To: <20251113233746.1703361-2-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251113233746.1703361-1-seanjc@google.com> <20251113233746.1703361-2-seanjc@google.com> X-Mailer: aerc 0.21.0 Message-ID: Subject: Re: [PATCH v5 1/9] KVM: VMX: Use on-stack copy of @flags in __vmx_vcpu_run() From: Brendan Jackman To: Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf Cc: , , Pawan Gupta , Brendan Jackman Content-Type: text/plain; charset="UTF-8" On Thu Nov 13, 2025 at 11:37 PM UTC, Sean Christopherson wrote: > When testing for VMLAUNCH vs. VMRESUME, use the copy of @flags from the > stack instead of first moving it to EBX, and then propagating > VMX_RUN_VMRESUME to RFLAGS.CF (because RBX is clobbered with the guest > value prior to the conditional branch to VMLAUNCH). Stashing information > in RFLAGS is gross, especially with the writer and reader being bifurcated > by yet more gnarly assembly code. > > Opportunistically drop the SHIFT macros as they existed purely to allow > the VM-Enter flow to use Bit Test. > > Suggested-by: Borislav Petkov > Signed-off-by: Sean Christopherson Reviewed-by: Brendan Jackman