Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp967734rbd; Fri, 23 Feb 2024 08:58:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVf9iB+2fS6g6gD4cW8RMJc0JzGFkdQqzh0TzdlgIJ8JyXdBg02gayI27VxOWjsC9SWUVrEez2m2bFtsKxp92yq8GKGaQGtqcAuXsjqIQ== X-Google-Smtp-Source: AGHT+IE2lUtCz29RFc2qo4fc9ZRJJSa2p1nXluqKJSl6iPpuvlskCRlN5JRMOU9qoASLPY919ZdE X-Received: by 2002:a05:6402:148d:b0:565:7116:11d with SMTP id e13-20020a056402148d00b005657116011dmr275909edv.27.1708707538834; Fri, 23 Feb 2024 08:58:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708707538; cv=pass; d=google.com; s=arc-20160816; b=LUpGYoUAcpGaiBvc7aJvhAC9/JSzwHTaG5CzPSjVEqoqq5P2jj3z5CBsAMvJmouCh1 Gt9D9vOO0t126llvf9ZhpBhvDm+UDCt4IhCLmX6IZdIwL/V43ZZz5hHs1XH7pIK4Pd5e WIG2LNskSXlZQ6jmEQwDCgS7CjPLaakfU6bgJqqUyytFVPpEd2k1eEo+F77p19QlHNsC k1jdwAjmlDlSqtYDiumqpA3kKF+mLAy8uO8N2njqggYO3K5PUeqb/WCzN7lFCq5UAdCR 1Pnx1ucyqyF3PeC4kd71Yzx/uDnMtmDv+y624Qfd610gnGT8Xu09du11aCuJeNsTSCEZ muVA== 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=Oc3Qq6lAIDsi/q5F7XRr3cp32P8qkiyEnUPLih6Y/wY=; fh=snuN8lTu7CCcd4L/3/zvkp75hhbwDFXBlKsWrCpSFxM=; b=mEabIohw4UogMsMSgzxTDwTh0P3nypV4kuTzLxMiXKtheQGsc7KM9+2lTTFNLMky9c /B7Kx7qO0Bg9bNWQU5meFw4rt92cA1+1lxd67B3F5FyaAQatV+G1IrTi4THT1orAjSLu 7T3K93vKK12ZzYOr9YEZQVbJVWxElfSAA4l/PmOuFSRhgrmSVE9ApH2lNFAWKFAtSapL 9s7SKT87KNjlw3zyMDGMs4JsB9E4z8I3kxnKPWHZGXEKHhiQx08SyaAPz/Qh87tZNqBv UaaRG74NtTRoW2XI6JTjUTd9TtN3pltMmIvsBrOUI1fBKPA3RrUNEMWjY7YSAgALQWlV cBPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=IAgxXDZG; 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-78767-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78767-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r14-20020a05640251ce00b005648ccbe94fsi4521412edd.489.2024.02.23.08.58.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:58:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78767-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=IAgxXDZG; 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-78767-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78767-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 96AF61F25266 for ; Fri, 23 Feb 2024 16:58:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5236D12A153; Fri, 23 Feb 2024 16:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IAgxXDZG" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.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 201D21272C5 for ; Fri, 23 Feb 2024 16:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708707529; cv=none; b=ZgQ7382Ax6GCHrLUgBJbWUxweIXYUgez5gOdyIqZ6GDujLBryA/0c/mkmrGYbRjd4PvFdT59TruZX9bKNOg0q+gmq9PA68BzB0Dc523ognAkn4LODpCFehgPRk/BkakPqcp2DxvHGkDj/dymzKFS4AuHxRhw9JzQhfSfx5tbdnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708707529; c=relaxed/simple; bh=/qCYSqlO9DNszGUQz3vCGxRHgLhruOfrybgzCU6DVXA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NADBzuUw5BzCnVcGIuYA7VXesAKTSwaUJdSjZT4VuCDAOREQPIidMG7KjcE5rG3EeZYs4n8djHYjaQevJyZ+h7CEbunKEIT6eynenJx9zGqmeNjfx9AVX5QMeFnqwuVsVz/7x3KbVd1g8ZF3mCKpW1A4BqxfgWbKsTEwuQ/RLjE= 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=IAgxXDZG; arc=none smtp.client-ip=209.85.128.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-yw1-f201.google.com with SMTP id 00721157ae682-607cd6c11d7so17813147b3.0 for ; Fri, 23 Feb 2024 08:58:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708707527; x=1709312327; 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=Oc3Qq6lAIDsi/q5F7XRr3cp32P8qkiyEnUPLih6Y/wY=; b=IAgxXDZGMqLfSlz96LIdeX51FWRb2z2mPqCH+Rq76KcHLn3hrtiS1bY5ttltIRB3Fv JzOsWlUBO/1CAaXouuHE/6SRDm0J6Frg9AMzyRnHr4LbwXNR+fD7mO2VynOiDjHh76ZM ++7WmX+7RS1LrUQudStQnQ2RYk8L5rdfWojJlcn1l3kOR78L9BtcJRoV5wOecOdbTSpf yfC68QWjX6zA3UJE86HOyNN78OT78NIPsVbLbFpKqZrKnRWoO1CPtH5f6XlCcNeDaEZJ FQoSR1ev+9YOdTGylgYYzb7GBq86tDgHGVtZQgXZnIvGtntvsKf3lD7XcErMpaxhIjpK vYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708707527; x=1709312327; 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=Oc3Qq6lAIDsi/q5F7XRr3cp32P8qkiyEnUPLih6Y/wY=; b=AOmPwzBOMTyd9Gwuxo1ZqIYjCj7k/F3zyQrOr8Xrh9/wqplO0wTDTVzWRgYD8Z0YHN j87SC0cYN85y7eRWGo0N85i3vEDrPvymtsAWXyFyLxJ5gnEla40/Lt5Y78gqLw6jy4qJ JK2R1ARszS8DC7V0ryRhI7XTSaOESC2wTHX2qq6Mjf/Oh5rOPAdoDaVkEXSaGkIXDN/8 QMtogr3XJG50FJmuPfki15L+061mHRdl7n8BcB13YBbXw6m6gTdeqkzCxvl8kWZvdxhV qC729F5kz+adk/xs85Nxb1o4zkxodzRCUKArcjgPCPtX9o9T+3AhMxdXt470q/RabIIz h0PA== X-Gm-Message-State: AOJu0YxmRnpwRZLHFgm6mfqYA2lDkxBMWoAkvdYKPVkQ6lx0TArDoqsc p33rm91iDMDc0noobTSsycXJHir6u2pOTnHaQGwmqnhAnAjPqOjd1Dx6eLzz0vqSzFK7KkxOyLT auw== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:9e13:0:b0:607:83bd:bea3 with SMTP id m19-20020a819e13000000b0060783bdbea3mr64043ywj.10.1708707527179; Fri, 23 Feb 2024 08:58:47 -0800 (PST) Date: Fri, 23 Feb 2024 08:58:45 -0800 In-Reply-To: <20240223104009.632194-11-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240223104009.632194-1-pbonzini@redhat.com> <20240223104009.632194-11-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH v2 10/11] KVM: SEV: introduce KVM_SEV_INIT2 operation From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, michael.roth@amd.com, aik@amd.com Content-Type: text/plain; charset="us-ascii" On Fri, Feb 23, 2024, Paolo Bonzini wrote: > diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h > index 12cf6f3b367e..f6c13434fa31 100644 > --- a/arch/x86/include/uapi/asm/kvm.h > +++ b/arch/x86/include/uapi/asm/kvm.h > @@ -683,6 +683,9 @@ enum sev_cmd_id { > /* Guest Migration Extension */ > KVM_SEV_SEND_CANCEL, > > + /* Second time is the charm; improved versions of the above ioctls. */ > + KVM_SEV_INIT2, Heh, I was just laughing in a team meeting yesterday that it took me an embarrassingly long time to realize that KVM_SET_CPUID2 was version 2, not for setting two CPUID entries. :-) > + if (copy_from_user(&data, (void __user *)(uintptr_t)argp->data, sizeof(data))) u64_to_user_ptr()