Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp899885rbd; Fri, 23 Feb 2024 07:04:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTfvAWlxWiot4zt0Ar9APl/bYhn4esMBrTT5dGya13T9LCz1koXj9cKAzJ3lQwM2bvVZ5kaFyBE2aBulquxwcJk7QpW282+V4YNDf9Cg== X-Google-Smtp-Source: AGHT+IErvKn8c1jXt3ERkyIahbNIkZHQtyNErBJSb2z6IQiw4lYvVHvHoPsNZoRFxaXGHTsrWwFr X-Received: by 2002:a05:6a21:9204:b0:19e:67b0:9ac6 with SMTP id tl4-20020a056a21920400b0019e67b09ac6mr168861pzb.1.1708700680675; Fri, 23 Feb 2024 07:04:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708700680; cv=pass; d=google.com; s=arc-20160816; b=f1I4sZ8PngK8snAe29olTkJopEHP+9CkCWg+Vtd0QY6l3RjZKC860KjPLPVyPDYqWL WC+XXY/fPd53SeJS7TtxOz9NhR6mF30/zEbCln7PNHc0pJRjQjDE/tGlsxUcqYtqzHp0 GXebcOfVW8YL5fUOwDpI3fekbY4cqmbyeZ45fC6oWHlEavvwSWluht9V+NBRpXH3Oukv aJ9K29BbDSWOsOSfGGjd0kz8XmqowSUzr1xXvOSngS/E1620lSl6uNey+k4koMAcnLQC pltTUb/O2rBZZDWBZp736LGigIJYWtIYzasu6+7e6O5MIKTWpBvuGhh+ShMnt5KyMlbk MWbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=ecX1ZPlY/o2pCTZHa4NF2QdsLPgZkb3A5+qcr4AfsNg=; fh=v+nI0kSB/KLHXr2SU7WcKtMchwZ7HwThaDOnECANDy4=; b=Bx/lEWjZTXLz79W14zZpkLeGCfjDlbjOQ3t8TWmCenqkOes395zTqQNTV0UuGdMOLe 69WAORCP/9Kffl9BLAuYIec2qRHeTbQyaHTIJLYpJV572GyFX4NcBdlc4jExwmP/Cd++ Ts9dgJ4DnuzbYg3F67Q1QYCCoL3yjFUqHsdql+AeYddOA5+DK5CfYURyNg7szZsw7jfa iOjRbxjUuhpllExkiVnkBisDxP1RKt164gB7bDl2VlwLULNzaGw729bOJIWJRHafFJ+v a4DdMx1WQwGlBFIyq1XI2b2upv8/A+8nswsXewgDCzsuUqkEKKFhb8BmiZAeoyyk2M7V qZPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a8BWlIjs; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-78564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t21-20020a63b255000000b005cdc5c9d6a2si12534582pgo.576.2024.02.23.07.04.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 07:04:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a8BWlIjs; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-78564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 3AAD1B23751 for ; Fri, 23 Feb 2024 15:04:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6DAA823D7; Fri, 23 Feb 2024 15:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="a8BWlIjs" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CFCB29AF for ; Fri, 23 Feb 2024 15:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708700625; cv=none; b=TGeM+df/zI5ym31FvS9kMouxz+yZHSKZnIniY7TtPFqdhbwNxZt7UN9Gilo5OQLc+4s2dKQH+3MRbA3r5VP0/DyGNSBQ9u88wIuGGZIKT1qAKRJ0MZkg38n5ySGstBihu+og7X33/PAYVJixV2Ctr5qAjsVKXJ2nxRXtwPMBxFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708700625; c=relaxed/simple; bh=8jil4mbSESgq2jO/a3+fL4kkeJu1icvqEgSgVIwduTw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g6COWeNTGfUJwpLTuGpZ8z4VBLW47F6yk1Mokn2czGemZ1b5qut2BVSIr3uU3w1FS68CQAkwNbXGRt3E8CMEZzSOlbGo+5sZQUEGoBxThE7Hz8alk0M75ojN72wwsA3xrfNXf2IUPGRVFKirfHkI/kIj4ZYeIb3k2NX1LHbr68Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=a8BWlIjs; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708700621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ecX1ZPlY/o2pCTZHa4NF2QdsLPgZkb3A5+qcr4AfsNg=; b=a8BWlIjsFFIQaFak8sNaCq93K3ipq3Xo2AKSUCot620v/DKoSXaNcCFzEJWXo11GGJFNXT ABEON+Mcis27lzAIXUt30So106VqiOAL6PjA8mJGCHUiJlhAMiDatkvhIojfy3GeE/1ut0 4ppk1dqEXSktJfFnn6H4MFlFfsJNzpA= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-BuReJdIsPAaY59_MKB_8HA-1; Fri, 23 Feb 2024 10:03:40 -0500 X-MC-Unique: BuReJdIsPAaY59_MKB_8HA-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-564fec337b1so471357a12.0 for ; Fri, 23 Feb 2024 07:03:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708700618; x=1709305418; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ecX1ZPlY/o2pCTZHa4NF2QdsLPgZkb3A5+qcr4AfsNg=; b=UI4AWBRhNLzoIVcxh4PeqLDr38WbYuhX1JCeAfdKa2H4ff/YG2O6FICAXc3NgyQ4pM KmxtIT4Yz/K8fZBxlid20czeNax2zVLJwNnNoFlisMi+l1LTiBsqVxbR7UOpaMndrChn Kml2X6kH00Yfqi6TM3o1G1l/bNZdoSu6JI3yIrKqYVQnjd/b2joL1ZOrqdMaG6v0HcIO FT8FmSW12/MkE00R61JYvDTEETzT/4hoKZKzO+zWgMtCceqnHDaWzC3+g023ZCVgvxeb DRJs6ulSZ3aAgzSk2923H+jmG8ISLVkV4WsG/u05FJyEeWEMK16+BQbxBuqvpbxGgGKW seAw== X-Gm-Message-State: AOJu0Ywb7yE4lOIaJ2vCb2RF2lUTW5b3mKmHHubruBS6QpIT64TH55YQ t480sIcS6ZoXmoE05xg0XtpdrkuexiAUE+2gNjobHzKJqhDEElerbNmsCJqg6GAwx3lDgQRZ54T anEgksGMlBJGY5oWJtcE/NFE8GBTLnF4p0IbQjeOzVaQXEyD7HhywyiJE9ElkJnstqUwHmw== X-Received: by 2002:aa7:d314:0:b0:565:78ff:f066 with SMTP id p20-20020aa7d314000000b0056578fff066mr89566edq.5.1708700618635; Fri, 23 Feb 2024 07:03:38 -0800 (PST) X-Received: by 2002:aa7:d314:0:b0:565:78ff:f066 with SMTP id p20-20020aa7d314000000b0056578fff066mr89548edq.5.1708700618315; Fri, 23 Feb 2024 07:03:38 -0800 (PST) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id e26-20020a50d4da000000b00564024b7845sm6944716edj.38.2024.02.23.07.03.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 07:03:37 -0800 (PST) Message-ID: <0fab8859-5dd1-4a83-8ddf-8d74401ba298@redhat.com> Date: Fri, 23 Feb 2024 16:03:37 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 02/11] KVM: introduce new vendor op for KVM_GET_DEVICE_ATTR Content-Language: en-US To: Sean Christopherson Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, michael.roth@amd.com, aik@amd.com References: <20240223104009.632194-1-pbonzini@redhat.com> <20240223104009.632194-3-pbonzini@redhat.com> From: Paolo Bonzini Autocrypt: addr=pbonzini@redhat.com; keydata= xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2 CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04 hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5N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Q+E42K3j2IUmOLriF dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0 JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/23/24 15:45, Sean Christopherson wrote: > And as I recently found out[2], u64_to_user_ptr() exists for this exact reason. > > I vote to convert to u64_to_user_ptr() as a prep patch, which would make this all > quite a bit more readable. Sounds good. Paolo