Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp468967pxb; Thu, 30 Sep 2021 09:48:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0AXVv8b2Y7u3DjonG+0V6b0w++/yyXjcCGTULwjg5N4MQwn2UTQWjqp1mZ+0AxxC6cd7k X-Received: by 2002:a17:90a:2a4b:: with SMTP id d11mr7561078pjg.172.1633020496105; Thu, 30 Sep 2021 09:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633020496; cv=none; d=google.com; s=arc-20160816; b=y4Osn8sodCK50xkFIuY2V+sVYO98kmp9T9FWrIeh7I/T0H6nTob3tX1RLlEt2nejou 5CFAxPiyKt8FAuxtzx/lWGvbY/JmleUZDvOyMYWxMXn8gpMCNdPg+IRC7p6AYqmOil7k GTjQxE9ObKyDNVPqgQdUBQvPI6GXDPh2l7GBLHV5Bs1nA9oyW5lTZ0uCHA62jMjSxcWa fkr/hz1hs+TmiyhFeM9gsd8Yic/GtjlY6hUJ965GUQPuA9Y0YBeJguQMqogDyh5j3BJ/ BJfzqu6FegsIGBs++iddiFT6TbCDQwcri3lBHoH0baQY5jXfjk2rhG9Pc/PI3gcMhft0 kyzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DwjKvD8YF5gtcYPtNR5jajIiUW/9CEDaAKvvOa5euB8=; b=ioifR+zZYWgUogl/qwCv0F/lQOrGje81WuVOXVRmS8dsz74d3W3pbYP9imO0ioBm/B s0yTN/gn5D6xUTwWAJlZDbPCU/IeH0nLpzV+swbmIEURvGnfMrhJKiE+NVyULDSuBlZb RnP+In8VbTD5/nbcJswxkHBHSVgFK663ZYxCCtUx9p+Lj9O0AAIPVRFLgxVtnLZTZW9U Yy+290LCGgpnFRiuUcinOh3IXKjGTEencvVZe1flEiPoBGXp3Svamx1SuHaOODE9BvRx W6oLyuTFERHkyxgmGfpGFe5Xh7HZGVXDzZoGkqoGBHDGRcxwf4F9XXtl56ifDx4p0nmn VxRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Sbi1Z9ij; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si6148953plf.261.2021.09.30.09.47.56; Thu, 30 Sep 2021 09:48:16 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=Sbi1Z9ij; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352294AbhI3QrQ (ORCPT + 99 others); Thu, 30 Sep 2021 12:47:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60663 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352289AbhI3QrP (ORCPT ); Thu, 30 Sep 2021 12:47:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633020332; 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; bh=DwjKvD8YF5gtcYPtNR5jajIiUW/9CEDaAKvvOa5euB8=; b=Sbi1Z9ijOH39vzhBlacIjfsDxuXgqUijmrxxh1dvwQQVH/Lxx9bNC3B0bO0oBjb2GwOshX fXOz+oe+BL4ev2YgJ2CZj4uD2jrcrnhqQotQXTp3vqsmBYvnSTHli/QBm5TwAa1F34e2O6 +IJDjkdZY4uPC6gTkc1uSob8HnZO0y0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-ovFWDdFjP4Gj6R5pw1YxOg-1; Thu, 30 Sep 2021 12:45:30 -0400 X-MC-Unique: ovFWDdFjP4Gj6R5pw1YxOg-1 Received: by mail-wm1-f69.google.com with SMTP id k5-20020a7bc3050000b02901e081f69d80so3221946wmj.8 for ; Thu, 30 Sep 2021 09:45:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=DwjKvD8YF5gtcYPtNR5jajIiUW/9CEDaAKvvOa5euB8=; b=PtAqr6j4KzkshePizrFfJNDe+CRVeUP5XzKbtnr7AXP3uhdQbxk95EQgZWC3tYSEhS 2cg7tUUlWMl0isCcw6z+GRaoCEZhTt7GQOamh35CRzTgI4TIK84Pl6OeMuFlegNYiwjt I0wZeZy3IFAq2vMhgbjPPGSDMRtwIiYXzXer+GnxIXm4asCqaQ7v8zLIN5FIpmgbowzG XOCbJpPpVNskIg59Wzg0QCIke5vCcU0FjSGsZbELfEwKeI7ZitM1Y0A6mKklkoPHt1IP uDsbpgzFWIVDwc9Y7q00q2QZxeeoiyUIjyEqZ1qxOMXpwfJUKHD1QRDb/jFyhiVcCVmE 0wNQ== X-Gm-Message-State: AOAM5305ENqETPLelMOh27rWnpnDm715IiBGDvG0orxkGpf+eVl+yUS0 2s8rn8gbojLgQn+s8GKqf2pAi8DhIExosh9o9j6RhpzQ5sVkDXS3tPMX6aDDEw3FR/hvFlp5kmN wnRSAZMD6ydYFCg1P/N+049qR X-Received: by 2002:a1c:7302:: with SMTP id d2mr257630wmb.92.1633020329470; Thu, 30 Sep 2021 09:45:29 -0700 (PDT) X-Received: by 2002:a1c:7302:: with SMTP id d2mr257602wmb.92.1633020329257; Thu, 30 Sep 2021 09:45:29 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id r2sm3652294wmq.28.2021.09.30.09.45.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Sep 2021 09:45:28 -0700 (PDT) Message-ID: Date: Thu, 30 Sep 2021 18:45:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH 2/2] KVM: x86: Manually retrieve CPUID.0x1 when getting FMS for RESET/INIT Content-Language: en-US To: Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+f3985126b746b3d59c9d@syzkaller.appspotmail.com, Alexander Potapenko References: <20210929222426.1855730-1-seanjc@google.com> <20210929222426.1855730-3-seanjc@google.com> <75632fa9-e813-266c-7b72-cf9d8142cebf@redhat.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/21 17:11, Sean Christopherson wrote: >> >> But, perhaps adding kvm_find_cpuid_entry_index and removing the last >> parameter from kvm_find_cpuid_entry would be a good idea. > I like this idea, but only if callers are forced to specify the index when the > index is significant, e.g. add a magic CPUID_INDEX_DONT_CARE and WARN in > cpuid_entry2_find() if index is significant and index == DONT_CARE. Yeah, or it can just be that kvm_find_cpuid_entry passes -1 which acts as the magic value. > I'll fiddle with this, unless you want the honors? Not really. :) Thanks, Paolo