Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2494532ybf; Mon, 2 Mar 2020 09:45:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vtvhwC8MGXAm/6qHZNJ6SbaV35XnS8gWfN9L+7t7K2GtbIh0atXxGa9KmV7SnruCcQUZugW X-Received: by 2002:a05:6830:1345:: with SMTP id r5mr251840otq.342.1583171124479; Mon, 02 Mar 2020 09:45:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583171124; cv=none; d=google.com; s=arc-20160816; b=UNR6lZ8wdhvmyq0Yhtma6e2yWq1YCcGbUvwL/eb5iyDQawFxCf6cQTOaonrmW64dOt pFbIr/JomhORWLHMQv7QIlA8CXL0jVC4RDIRDWpPhtGIYzrFPU3hoFdeJQ7iBhsxSShK e5SwFcakwjoQ1z+bj1TT1ZnVJpRLaXzOZCkIRaaO/OiDzrpjT8jL49a8zzfbMjdrDRtT N5Xg0EscbIOOPH+otmiaNPBOs8q3Y/1r5Rjt/WR2MsX/lMXS1QzVPxVXeSmC4mHDrHdl wKNKmsZUTE2PtxTeOziRl3ti+BBJWGzV3mAh72s8FLU5gW5HLTCv1cs6/mzSYiDsQZ6y 0Cuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bkqP5rqEcpTe8UkETGyC05Piyo30bTlkBX2zfQhiYak=; b=t8IhnjZpSf5oEzQdtnFbF0KM35cFeH06LmXsRvl8H50uZgo5b9ob3ap/0p/7r9yBg1 PrMdFPIJKRp37NTjQDoHXIrZ6tzmEWYmx0UkUu0P7u4NqxBylY6W1BMeW/FQHr8oKyP+ uNzZYoW/9r2IOON7ur4sZiJWwcGgL2Gjj6hg8wfvLELkv6s7b1fkosDprsvGrO8fwtgb k5S3C+GXVS2JHsFU3Xd+nZvdwxqlFkOiCPtfI5RagWTti2xjio5gO8il6hmRr+55NVDq hy4fsQL83NM9h/H82Eo94bmXDGUrhFZs4TFoBV5qiAnUBhS0e2ChZvItZtPgYOzWZDL0 +IuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="K2xxZ6k/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si7037109otg.179.2020.03.02.09.45.12; Mon, 02 Mar 2020 09:45:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="K2xxZ6k/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727389AbgCBRo6 (ORCPT + 99 others); Mon, 2 Mar 2020 12:44:58 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:34056 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbgCBRo5 (ORCPT ); Mon, 2 Mar 2020 12:44:57 -0500 Received: by mail-io1-f66.google.com with SMTP id z190so351425iof.1 for ; Mon, 02 Mar 2020 09:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bkqP5rqEcpTe8UkETGyC05Piyo30bTlkBX2zfQhiYak=; b=K2xxZ6k/fKXqdRvOCWx+o0bgdJCP+yd8W5j2364rXc8L702Bc1Wmif/AzeGUaoIyvt k+m2aJ6AslxkpZ7mQvFRmnQmUhN7o2ZrWI4XqX8MaxkmDTI//BwWcP+tcLjTnbeuZdw3 AFIkLe2W3PLWkNJWv8VOOwhopZKemlZSEyOlt7ytg9COABmAEhASuOHZXULeApfo2u6w SR3ILAve6uo6HzklXFmk6HLFDkJYi2icuDuAlMo0RCTJVmtHsDzjMfFeoGsfzo0Vm0lf Hx4wx/5eCmF01cHqrVDwGS39wRsdH2jF4ADU03NfOweDwrEp3RNCeYBELbPVnR8zFjLE g0GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bkqP5rqEcpTe8UkETGyC05Piyo30bTlkBX2zfQhiYak=; b=jEgUD3X7WEGBaAEIIsxfngzGBliQo50+tVjFBel+DKaod8XIrlZcLdS/BZbsVSFOom o4iLkiGkwUHHluUnfFJoKKa0WpNKxNLV9F6ctRiKh3H+0m+0gTmPlFF92NwvALlSIRS+ qXCJaVjtUlxpzjNB4vHzhyYmjLWjJTrJEsU1ubvJTEiCpnSRc7Re9SRGDrcLXk4bqITK DNpfUsRj+hpfQnnZxwXqX5feZHgqdCx/q0C8LXEVonwQ9c6KLm0a/1FMtee6o+WozSmR Jo7UY6M9EjnMx5OwCDhHWHVunZud+SanTFV9bPvoe5COgzZknWtjxmgX+q3rff2/xQRY eJVw== X-Gm-Message-State: ANhLgQ2DhZ5CKdrpNRx9vOcG8ymTFJvQhlNf9gDt88dy2p/y8Y7OE7kf qQyb6uOV72TBLj283PkgGVE5PKN6z6rrNyc7/hXs8w== X-Received: by 2002:a6b:c986:: with SMTP id z128mr563097iof.296.1583171096690; Mon, 02 Mar 2020 09:44:56 -0800 (PST) MIME-Version: 1.0 References: <1582773688-4956-1-git-send-email-linmiaohe@huawei.com> In-Reply-To: From: Jim Mattson Date: Mon, 2 Mar 2020 09:44:45 -0800 Message-ID: Subject: Re: [PATCH v2] KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl To: Paolo Bonzini Cc: linmiaohe , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , kvm list , LKML , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 2, 2020 at 9:09 AM Paolo Bonzini wrote: > > On 02/03/20 18:01, Jim Mattson wrote: > >> And in fact, it's not used anywhere. So it should be > >> deprecated. > > I don't know how you can make the assertion that this ioctl is not > > used anywhere. For instance, I see a use of it in Google's code base. > > Right, it does not seem to be used anywhere according to e.g. Debian > code search but of course it can have users. > > What are you using it for? It's true that cpuid->nent is never written > back to userspace, so the ioctl is basically unusable unless you already > know how many entries are written. Or unless you fill the CPUID entries > with garbage before calling it, I guess; is that what you are doing? One could use GET_CPUID2 after SET_CPUID2, to see what changes kvm made to the requested guest CPUID information without telling you.