From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 ADE2A78F52 for ; Thu, 19 Dec 2024 02:41:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734576081; cv=none; b=O/GrE+gC61A+PRX75pkG4dKfqz4ypjKnhXWZ3pxrHqBDV9IIdUWijoQ2MWdGh0hGbycU8Ix9lMujd366a/JsViSRmKe7ML9nywXoXyt0x1UhdttJ1fW9PwMbD2ormxkQNxJBYd0kHO6GCXBp4vNmVWDUJJdTGNQpwpFNdqvy8K4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734576081; c=relaxed/simple; bh=W29aFcScQoZlbgRh7q306lEfMLyFwCWO5iBjpHfIMpw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dW8v/IH3mYHe5bMTGDfn+V6E2JZRvppcOivKXubI+m+egsvEBxRrL/qrWG47Y4C3waBrbZg3rmYNqYxpaE7CoKVQOpWd9vwVPx/h+0AkI2ZpgLWHWhVML5xA+17corOrevF+nIwbeg6gTiRkFTBY0vxDMZ9+e6ms70db3mxmcNc= 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=mEhv6Z51; arc=none smtp.client-ip=209.85.214.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mEhv6Z51" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2167141e00eso3140735ad.2 for ; Wed, 18 Dec 2024 18:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1734576079; x=1735180879; 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=l8/s1yCN2zcQIkiltQKCEikgMkhC+dhz8YmH8QUKsk0=; b=mEhv6Z51CvylbwU9qQP8xot4rX+6mdIY7v0xU0n32WT+7uWa4LyakbPH/S0kjDS1tJ GB43Mi336OELvcbEUVMFqI/2YCm4W+iIIJo380LhdZpYFu4uBENFmsmT8vyAvNjqICV3 kI6GqO5f74gSsFeDDd0BHuF0eA9+UfgS24RN7jPzgQt8lghkaTDYmWMejMG/uPBW5W7o hFITgX0CVenbsY3V5WIA0LL0mqWJNau+L+vZLrQp62PT/+sQjj4T4tmz3NKRneL296Iz kyDJ+kN7w3xCIQ1JYmLMtEknhvSK6ob6jSK6ernIf489g+KFXM5E5yMbqZwwnBc4nd5U GPRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734576079; x=1735180879; 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=l8/s1yCN2zcQIkiltQKCEikgMkhC+dhz8YmH8QUKsk0=; b=i5e8P0/MUNB49xQDTWfgbwL62LHKnePuNZtYn9SspB9m0kE7oFuNMkQJDLakVifp8q uhq5jGX6UrAxAl6MZ6MMRw66NRn+OC7nip6hEcMvVWrBzLUqeFpR2lFKNH4Jrcc0JUiV IP98ICwyn15ZOpIxzJ28UhJwCa8Ae+j/c8eOw4AxXvlChin8cpDqdAb8JKQ9BGQRSZa9 xRLQicRUb1QAf/2qWRnRWqq3CbUJbJK96QUCXfoE/BMN/z0QBL5LJ0HL+/C8VGIuT1bd 3VS4exFE0X4CVJocZpKsamyKvRUSbwJ2Ig2FtOnLLGQ+Tkv0WiqpYuqxVD45H3k5ndxi aLjA== X-Forwarded-Encrypted: i=1; AJvYcCUuOIp0AHwfgFAHuLBlbxfzNqjReV8j/nA6ImULTyg1Nul8mEuckoCz3ok47xj5qmKdr0rFA/AQAH4ZLkA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywes8Xi/LhuV1Ez/GfVdlFXrD5WLqxXJ/3GRIpuNy131dFz0FAP X2BqsFSo7b3QZCYfQfCNJl+tzN/CcN5xHzvG7poGVcgDQHmfKczbi3jS/LSEnKZpUo0UeZ9iFy7 fUw== X-Google-Smtp-Source: AGHT+IHMAV0PD3ksM/bCmRlL3QA95RZDiejljIEb5aW5zvEyHiMeJNhMFgopxZvYLzqtAspgG41g8FSC/hw= X-Received: from plii21.prod.google.com ([2002:a17:902:eb55:b0:216:2fcc:4084]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:ce85:b0:216:1d5a:f33f with SMTP id d9443c01a7336-218d72877e8mr55980925ad.57.1734576078917; Wed, 18 Dec 2024 18:41:18 -0800 (PST) Date: Wed, 18 Dec 2024 18:40:42 -0800 In-Reply-To: <20241128004344.4072099-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241128004344.4072099-1-seanjc@google.com> X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog Message-ID: <173457537849.3292936.8364596188659598507.b4-ty@google.com> Subject: Re: [PATCH v4 0/6] KVM: x86: Prep KVM hypercall handling for TDX From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Lendacky , Binbin Wu , Isaku Yamahata , Kai Huang , Xiaoyao Li Content-Type: text/plain; charset="utf-8" On Wed, 27 Nov 2024 16:43:38 -0800, Sean Christopherson wrote: > Effectively v4 of Binbin's series to handle hypercall exits to userspace in > a generic manner, so that TDX > > Binbin and Kai, this is fairly different that what we last discussed. While > sorting through Binbin's latest patch, I stumbled on what I think/hope is an > approach that will make life easier for TDX. Rather than have common code > set the return value, _and_ have TDX implement a callback to do the same for > user return MSRs, just use the callback for all paths. > > [...] Applied patch 1 to kvm-x86 fixes. I'm going to hold off on the rest until the dust settles on the SEAMCALL interfaces, e.g. in case TDX ends up marshalling state into the "normal" GPRs. [1/6] KVM: x86: Play nice with protected guests in complete_hypercall_exit() https://github.com/kvm-x86/linux/commit/a317794eefd0 [2/6] KVM: x86: Add a helper to check for user interception of KVM hypercalls (no commit info) [3/6] KVM: x86: Move "emulate hypercall" function declarations to x86.h (no commit info) [4/6] KVM: x86: Bump hypercall stat prior to fully completing hypercall (no commit info) [5/6] KVM: x86: Always complete hypercall via function callback (no commit info) [6/6] KVM: x86: Refactor __kvm_emulate_hypercall() into a macro (no commit info) -- https://github.com/kvm-x86/linux/tree/next