Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2168107ybd; Mon, 24 Jun 2019 01:51:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOvOXG2XT/rQwuZV6cuXmUugV8WWYjW9xuqQTtIFwcnt6zEkfgN+Sgt8h/MKIZhjZmB1eX X-Received: by 2002:a17:90a:dd45:: with SMTP id u5mr22787520pjv.109.1561366274872; Mon, 24 Jun 2019 01:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561366274; cv=none; d=google.com; s=arc-20160816; b=AtxWYWSrugHsaEKNZ54pv8GGbDvyZOrI1asm9/okLkkIGfsbVaPrhhRTAfKVFFaAg1 G1I8ey5LxlIBCAKvDDkQQvBOmqhmalIn/KNbhB1OBXElgGH1SOSw0lEr8/eJU42JkPjF XXt1uchfMbREesQfFuAwmIfKizThBasDX/X+tYcVF+TqWSAk3oFynT4wJDWbOuB7znK8 gJT7UVolFVOQH3DSSK3jt1roie7L5akBAamKDL3ZebCMIOk5CdfvxB5i37xE0m5YyfuS 2wvglDcn8X1FD4jbuVfxG1zSb1uzPvDSMlHQYeOt5KaAGZ0xTBoY4atjZP1yva2gRB6J Lobw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=bnWH5ZYxHlgk6lep5hk4Qa6BJhgMEWUWAwCwWs+mOkc=; b=poTjvJtOxfvZaFfOmZ2YY9U7YRepavla6pa2AJk0XElJgFR9kT1qlqqRluOQdGmLmg Rb25QGMftWel6xzjdM4oG8MynABqMUWzR74YD0TI0DDDJsoCDRHdnTH84Jg+x3dOTzh0 tt2ORQlX0q5uzOjT559CkfSWl057bBG4hNSUvlpwFMZALt67wLb+bRSmVIZdQxVhdHDb ZyUwd3jnh5CIw/66YabHF0FOua/tl6B6RBcRP+ID84zSYTTH03oz7coAv029M2ZbDOIB cdoOmB6POmz+jFHqmS7dL+AvKJn6LLtn/4rm+vNV+OafkNtoyjGrvvUASN1bLE0NyzBU V35w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si9298249plt.303.2019.06.24.01.50.59; Mon, 24 Jun 2019 01:51:14 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728105AbfFXIdl (ORCPT + 99 others); Mon, 24 Jun 2019 04:33:41 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44167 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbfFXIdl (ORCPT ); Mon, 24 Jun 2019 04:33:41 -0400 Received: by mail-wr1-f68.google.com with SMTP id r16so12868032wrl.11 for ; Mon, 24 Jun 2019 01:33:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bnWH5ZYxHlgk6lep5hk4Qa6BJhgMEWUWAwCwWs+mOkc=; b=lvwpWkA6zeqtFKtI09NLqGUGIzurMvY5B+QLDeKFcqmFCC1YDgfRSMKlqW3YST1/aA CAQ9T3g2qpnFJLh9ZEddvYVeNoIXRb9LNGHzuEF4/noTMhnADZH/+GHfbqS2UQq/L3Su a9zxmLweROg8cB00mm3otxrNlwlbBWsloZyQS9lXIpIAOqN3L0iEmB05Bq8pkTRPP6gg +JzyvwXljYmhLqzMW7nrb6kqXVFW/h4E2UEeKFyqWyH3f6WBWzRXViYzexAsQJQB9+hP qk6kuzGaO1pBuMGGHUWbuLYemkZYU2XmvQS+w6X2hCC0Kq8AEBE45p9ndO9tiJz67F3I bHSA== X-Gm-Message-State: APjAAAURmlEkA+AkgkafPldw8sqM9fGXWrXqxc/YDSehch+aWIEeiqZO BIuPQNOynZVtmvx/ckYLhCcaXg== X-Received: by 2002:adf:e705:: with SMTP id c5mr81080226wrm.270.1561365219275; Mon, 24 Jun 2019 01:33:39 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:7822:aa18:a9d8:39ab? ([2001:b07:6468:f312:7822:aa18:a9d8:39ab]) by smtp.gmail.com with ESMTPSA id j32sm24751894wrj.43.2019.06.24.01.33.38 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 01:33:38 -0700 (PDT) Subject: Re: [PATCH RFC] kvm: x86: Expose AVX512_BF16 feature to guest To: Jing Liu , kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, jing2.liu@intel.com References: <1561029712-11848-1-git-send-email-jing2.liu@linux.intel.com> <1561029712-11848-2-git-send-email-jing2.liu@linux.intel.com> <384bc07d-6105-d380-cd44-4518870c15f1@linux.intel.com> From: Paolo Bonzini Message-ID: <7d304ae7-73c0-d2a9-cd3e-975941a91266@redhat.com> Date: Mon, 24 Jun 2019 10:33:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/06/19 05:10, Jing Liu wrote: >> What do you think about @index in current function? Does it mean, we >> need put cpuid from index to max subleaf to @entry[i]? If so, the logic >> seems as follows, >> >> if (index == 0) { >>      // Put subleaf 0 into @entry >>      // Put subleaf 1 into @entry[1] >> } else if (index < entry->eax) { >>      // Put subleaf 1 into @entry >> } else { >>      // Put all zero into @entry >> } >> >> But this seems not identical with other cases, for current caller >> function. Or we can simply ignore @index in 0x07 and just put all >> possible subleaf info back? There are indeed quite some cleanups to be made there. Let me post a series as soon as possible, and you can base your work on it. Paolo