Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp142973lqp; Tue, 11 Jun 2024 18:23:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7cRNlHdwgW6igHqBCqCjfo4TG+VF1PxHDm5vbMfoeUoXwcStvevwaitkvtIPmqWsM+3oC3QWXav0j8ylSmuYOeqEZZrnpKykERz9WcA== X-Google-Smtp-Source: AGHT+IFVwbcU/gJyDoKmw9Ooz/B+NdPkF0IhRLEJ8T/ZxGexWe2POFBwv51+niP/LxDUov0DFhrF X-Received: by 2002:a05:6a00:3cc8:b0:705:972a:53f with SMTP id d2e1a72fcca58-705bce07ba6mr595945b3a.18.1718155427005; Tue, 11 Jun 2024 18:23:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718155426; cv=pass; d=google.com; s=arc-20160816; b=VVu01m0gULXR8UBc/JcUghHbkU6CofPyXPuIk4Oi1xmgLoAEe2dv2OrKFOv0I39nu2 ukxffT7HZImQ0zLkIlEQVRrYrDpkQAmZPRXynZD22YMEeSHmZYiuPoQtrCPhEn1hnIZ9 opZQT2Ap+Unw0rJZucs3txfnvxuvxSRftNW5nx3UgM0zcuwfKFDIRH98/nAvGb+RldCy EZKrR4EqxNqepBNOhRPbTN/iDl09Ofx3/gIyoz6eL6z2Kn1KeAx8VFWGcYg4koIwGChV dlJradIlodRgB8n7M+8E3UfVxrboPdsUQOxjv/rROVOj47n+r4gg/iMULtNGzJFtQ1yx 5QnQ== 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 :dkim-signature; bh=949Sco2VRHaNtzMxd2fbftK/o32Oz5QH2yGUJXRf1kk=; fh=ZxDcWDQNT+fPB2Ylm7Vl9IRvwtA5J1b0bk0azHvYOuI=; b=mPyYLA2mImrc32fjylS/zWrHQToaqLZJoOBD9BYY3ynOF87uT/8bGXDkECJPv9tyJe Mwtcq7OhHxbF0Kg+GbYjZRfhplaMMuFFiMSQuDB7FC7MxWFGjyLTdXY1v/aC24dAuSWy z1z0LgNzy2kckNeuzfUWpFghbyEv3hB86uHAUjJI1mVWGEhRXDB6vFwKm1m9M0xsQ7Gt WGIGJW80uMq497M9PZA9eeDdjxwSITZUaSmFC/rA+wDpjr1FuZBK05CTzRxff98DGQ0Q 1Xe4jROBpHb3r+S9oINJoQVrbC0GPOyQ5F5aoR90jHMcUu3YHdlLAFfWPjbN25pAAdJP f+kQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=dgokbjKk; 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-210756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de294fa76asi6596754a12.705.2024.06.11.18.23.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 18:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=dgokbjKk; 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-210756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210756-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B49E8B234A2 for ; Wed, 12 Jun 2024 01:22:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A07CCE570; Wed, 12 Jun 2024 01:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dgokbjKk" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 8050CCA7D for ; Wed, 12 Jun 2024 01:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718155304; cv=none; b=kOs1KKOF3OlQ5bU/W7Lj4Kn5JMGwgnkJyTRKYOJi/3CNAg0gX7qLxOir7wZtjHTH0RwsXVdyOSt4Bv5Lhf5z5D71wXLhvMNP79GitxPSvj/qnqXOG0vAv38dd7rZNpb7YVZwIN8jxfpfULfPoQ1kqDX+xkHDGVFazCZHCvYzOmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718155304; c=relaxed/simple; bh=GlapdDKhTIPCCJP/VkWHjj68tVw41md0iGY6n3ryj0A=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BDrATCu0QiFDdy1sK2BSXOTZXgnVn1X0BjF5lfn2ILnIp+7g1G5e9wkPr6OGBTMhJYgcKNsC0C/RygawoLa6jc3kBgj3ngAIM1QkUcl0sZD9AsuC6c4xaNErTrunoJsXpBRUy+PPP/vyeWcEx9/zl33zVIFZOWp2wlqm6IFXNVA= 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=dgokbjKk; arc=none smtp.client-ip=209.85.219.201 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-yb1-f201.google.com with SMTP id 3f1490d57ef6-dfa84f6a603so10520325276.3 for ; Tue, 11 Jun 2024 18:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718155301; x=1718760101; 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=949Sco2VRHaNtzMxd2fbftK/o32Oz5QH2yGUJXRf1kk=; b=dgokbjKkIQ6Lm4zfYBCgheAKFvMp2cLnqTVO4RDa32JkAVCYkW+wXDbg/xIIK9Flp5 ZC0VClD+tip33nOL46K4kf3mCTVmJk7x92By8aNQH99Vt12YA5LEepjdsko4Yhi1VTnB fozhe5emdudhOBxMOPekPMXki4PNJW14b8uGaUV5ye61sD8sy7lj+4Q06s8w3eFBEgtN l/xPHdkhvpJBJ678NAFzjhfwUEET0SBg8PJ89OHUBvvpfo9AsYqzgnh7B2BFd/LtrgWL syJO9NGsNkWSlhOWMZ+5SVJBjr627DcCFRJMZmSIaFz1ver8aAwixET45MbJ1clDMWlN a/wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718155301; x=1718760101; 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=949Sco2VRHaNtzMxd2fbftK/o32Oz5QH2yGUJXRf1kk=; b=MMGvSZxFJrg75p/quYVWgxuMjDKadG5/OtE9TSXefaXSxea6sOubVaUX4ojUfa1oYZ dZCtTSj3Oqkn3CfCuPMOlXELweSsDQMV3Oa1TXf3zwHVpJTmgSJNfZZgruUCngnTJKyC rdfil+R3TNR0quyAvZdvpEDiQcrRVccuGM7USCYozZGudiDUKMk5n+3FTmCAXxtuT+uV K7RjSrPgjIWxzAQl+G9HTG91TZQNffl/tLpPevD2yu9f834WdaMnXXK3UTpBrFZY41jR xZLYv6AiOrlK2v7dIwYOaKlQLcqlsQMwEFgABjt4VreDVuB8et0HD7r1zzCXUQFhzrTt p7dA== X-Forwarded-Encrypted: i=1; AJvYcCVPGkzNUMI/hh1r/5bE5+2D93o9+nVsJ7YU2tqDPl/vrK7TSM0n8sMWLZ/j97yTqoCc30xnsiFph9UDVmDTDRjTIBdpCqlLmyicDh/Z X-Gm-Message-State: AOJu0Yx2CVofVbrv5/8i/trkoHWhBdTtmSOuXpMV6ZMxyChCei5G76+W uYANRpNslJNIxutErbloFvTmkzWhGNyPig1X5rR0MjP9VRF1wdgjZeLBym+NFwX2qT/GGt+apL8 q6A== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:c12:b0:dfb:210f:3ad2 with SMTP id 3f1490d57ef6-dfe65f78d94mr29693276.2.1718155301449; Tue, 11 Jun 2024 18:21:41 -0700 (PDT) Date: Tue, 11 Jun 2024 18:18:36 -0700 In-Reply-To: <20240508132502.184428-1-julian.stecklina@cyberus-technology.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240508132502.184428-1-julian.stecklina@cyberus-technology.de> X-Mailer: git-send-email 2.45.2.505.gda0bf45e8d-goog Message-ID: <171814098169.327928.5071447429899645642.b4-ty@google.com> Subject: Re: [PATCH] KVM: x86: add KVM_RUN_X86_GUEST_MODE kvm_run flag From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Julian Stecklina Cc: Thomas Prescher , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Wed, 08 May 2024 15:25:01 +0200, Julian Stecklina wrote: > When a vCPU is interrupted by a signal while running a nested guest, > KVM will exit to userspace with L2 state. However, userspace has no > way to know whether it sees L1 or L2 state (besides calling > KVM_GET_STATS_FD, which does not have a stable ABI). > > This causes multiple problems: > > [...] Applied to kvm-x86 misc. Note, the capability got number 237, as 236 was claimed by KVM_CAP_X86_APIC_BUS_CYCLES_NS. The number might also change again, e.g. if a different arch adds a capability and x86 loses the race. Thanks! [1/1] KVM: x86: add KVM_RUN_X86_GUEST_MODE kvm_run flag https://github.com/kvm-x86/linux/commit/85542adb65ec -- https://github.com/kvm-x86/linux/tree/next