Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2440324pxu; Mon, 7 Dec 2020 06:45:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkM5oHMxAcdniY16kIk4epYgo4Lq9bONWyyCcyJp3tkro9H9Icg/zubsLFNAc3LwcEEup4 X-Received: by 2002:a17:906:339a:: with SMTP id v26mr18853472eja.107.1607352325209; Mon, 07 Dec 2020 06:45:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607352325; cv=none; d=google.com; s=arc-20160816; b=lVymqEotBxQ8HXc2GGVAopEyPgz91oKnGD0f+7sDTOtCwJwMOFxIXehQ3aSY6Obs7o 6oDRPprIPt756uY14SKpzlPIjdibKBmfXg+dfyixUXZL8C6BdWSV8aT441jQuvbMzdsz F+EJy+0CrMUke6KM8j+wozrZAZbV4fkbd70BN4kEwcfPQgsB5eVBn9AUN0BzrmFspEMq tZEqKnHDfWBYBvmOkA4tiDoUPJx+VjY+YvDT324mBN05Lz/idCmG+BfJEZXV1On4sLJg uYUsKFXms9/bSwwc1AlcHV+NDBiZTckXyyuqpR5Nhpp1ZsMb1u4g/YRjk+IAbwSHj8Zq PZog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=14tUsqybUpCpcHIHOV3QLP0iWuq+HJ50yDceRMbfNI8=; b=1In5mrWLoVYb5L8iix6bDjWbAnfaq4YqyYpLlm2DhcevytnDIR/zTPDVWZLC2xP7Cu DlCI31EhXqmuxyzq2jF1FVqXzykoDN3geJS2+5h6gYTJj+RNcAr7fXLbZtTtubxVNBa7 CyLMMA4olLj2frueFMktUrI678WEBxS/ZOkBS4sYxBMwU8wmKK08X5ITaLJc1jv4HD84 c6xsZWnJjUtrHORwQdeh79yg3mpKvIv9/yTyeYxexIKRbK0OXw6dufSS/DVXOb9JXNcN 8wX/IME6gkVVpELrCZr5aZv983vM3xEd42PdRP6ctXCvO3GQD/dtRC6CrwstLpcPvbNg mzYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b="BO/gcz0D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id re10si7460688ejb.754.2020.12.07.06.44.56; Mon, 07 Dec 2020 06:45:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b="BO/gcz0D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726278AbgLGOmX (ORCPT + 99 others); Mon, 7 Dec 2020 09:42:23 -0500 Received: from forward101o.mail.yandex.net ([37.140.190.181]:47839 "EHLO forward101o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgLGOmX (ORCPT ); Mon, 7 Dec 2020 09:42:23 -0500 Received: from mxback28o.mail.yandex.net (mxback28o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::79]) by forward101o.mail.yandex.net (Yandex) with ESMTP id F1E6B3C00876; Mon, 7 Dec 2020 17:41:38 +0300 (MSK) Received: from iva5-057a0d1fbbd8.qloud-c.yandex.net (iva5-057a0d1fbbd8.qloud-c.yandex.net [2a02:6b8:c0c:7f1c:0:640:57a:d1f]) by mxback28o.mail.yandex.net (mxback/Yandex) with ESMTP id oamv1XwPu4-fcWWfQid; Mon, 07 Dec 2020 17:41:38 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1607352098; bh=14tUsqybUpCpcHIHOV3QLP0iWuq+HJ50yDceRMbfNI8=; h=In-Reply-To:From:Date:References:To:Subject:Message-ID:Cc; b=BO/gcz0D/DfBZeX8UOYKeghLawyt4u9WmDhYsCZzq2c0NihbTNySUP44owk/Vxquj BMW4UUJrg2e1F/gdmkrM+RaLN+WVr21YUzeRtLsjmxLgEs5S8xcAk91uDjYakShNvA rjiPXoY8gOR9ZWFjgtJYAhO2wjbnjwm0OLOc4iA8= Authentication-Results: mxback28o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by iva5-057a0d1fbbd8.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id awEwUpSmah-fbmmVX2Y; Mon, 07 Dec 2020 17:41:37 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: KVM_SET_CPUID doesn't check supported bits (was Re: [PATCH 0/6] KVM: x86: KVM_SET_SREGS.CR4 bug fixes and cleanup) To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201007014417.29276-1-sean.j.christopherson@intel.com> <99334de1-ba3d-dfac-0730-e637d39b948f@yandex.ru> <20201008175951.GA9267@linux.intel.com> <7efe1398-24c0-139f-29fa-3d89b6013f34@yandex.ru> <20201009040453.GA10744@linux.intel.com> <5dfa55f3-ecdf-9f8d-2d45-d2e6e54f2daa@yandex.ru> <20201009153053.GA16234@linux.intel.com> <9201e8ac-68d2-2bb3-1ef3-efd698391955@yandex.ru> From: stsp Message-ID: Date: Mon, 7 Dec 2020 17:41:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 07.12.2020 17:34, Paolo Bonzini пишет: > > > It is too late to change that aspect of the API, unfortunately. We > > don't know how various userspaces would behave. > Which means some sensible behaviour > already exists if I don't call KVM_SET_CPUID2. > So what is it, #UD on CPUID? > > > I would have to check but I think you always get zeroes; not entirely > sensible. In that case I would argue that you can't break anything by changing that to something sensible. :) But anyway, since my problem is solved, this is just a potential improvement for the future, or the case for documenting.