From nobody Mon Feb 9 19:53:17 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619108322; cv=none; d=zohomail.com; s=zohoarc; b=Lo0EtRDp636XhCKaKxsoe0sW2YN4rOeb027hXO4ykm1WAiXA+oBxO3iBKl+yYOJaDY8WEiM9PFzZGLr89loQ3gdWNHTjT+wdqezEIiSje3m3TU27PNcbYWJff0UwodileRBw97WcKvrYEfEBTeWiUMyhohRCrALOFIXAwUJrBUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619108322; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yI/+s+Q07NrIOnZyX3Gl6JKnl58sblCJhwX1owG5bbM=; b=WSkglq6wcBUf8I61lT2t2ChhfQndCeI4MBfRG+9LazA62cRwEIto3BoIRlBnNvl870SB6P96XSYv+iKb5HArDt9mK8QyEEO8C5WMdI7llHTPtsXMTGsG+O14R0haxVDfQuMceHArA2Ks2T0wbes2GUlGPj0IzDsoMTSZpZOHLL0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1619108322330973.2976349721068; Thu, 22 Apr 2021 09:18:42 -0700 (PDT) Received: from localhost ([::1]:51966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZc2L-0001bx-DY for importer@patchew.org; Thu, 22 Apr 2021 12:18:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZbvj-0003QG-By for qemu-devel@nongnu.org; Thu, 22 Apr 2021 12:11:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZbvh-00030G-5L for qemu-devel@nongnu.org; Thu, 22 Apr 2021 12:11:51 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-595-Qkrjd_WSNZeEayDPaxOcWA-1; Thu, 22 Apr 2021 12:11:43 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFCAE18397A5 for ; Thu, 22 Apr 2021 16:11:42 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.40.194.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id 584B0690EF; Thu, 22 Apr 2021 16:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619107905; 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=yI/+s+Q07NrIOnZyX3Gl6JKnl58sblCJhwX1owG5bbM=; b=iFMIZcHGJaL2SrG1+mGKe7nhamCnKoSfT0cWL4RvRETI1XNKABXU3iXgMWW/f8mKuNq1Jn RXRHdYpIfJ73+2spJRsB7uf2CvU2V9L+S5ZM8r8CyN0BJEfRNaaZ9G7B/IXTe6x0QiblPT p6deWm76bPRj2e5LK7aG6YtctKITjMo= X-MC-Unique: Qkrjd_WSNZeEayDPaxOcWA-1 From: Vitaly Kuznetsov To: qemu-devel@nongnu.org Subject: [PATCH v6 03/19] i386: always fill Hyper-V CPUID feature leaves from X86CPU data Date: Thu, 22 Apr 2021 18:11:14 +0200 Message-Id: <20210422161130.652779-4-vkuznets@redhat.com> In-Reply-To: <20210422161130.652779-1-vkuznets@redhat.com> References: <20210422161130.652779-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vkuznets@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=vkuznets@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Marcelo Tosatti , Eduardo Habkost , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" We have all the required data in X86CPU already and as we are about to split hyperv_handle_properties() into hyperv_expand_features()/ hyperv_fill_cpuids() we can remove the blind copy. The functional change is that QEMU won't pass CPUID leaves it doesn't currently know about to the guest but arguably this is a good change. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Eduardo Habkost --- target/i386/kvm/kvm.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index afd173514da1..7c751185491f 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -1207,9 +1207,6 @@ static int hyperv_handle_properties(CPUState *cs, } =20 if (cpu->hyperv_passthrough) { - memcpy(cpuid_ent, &cpuid->entries[0], - cpuid->nent * sizeof(cpuid->entries[0])); - c =3D cpuid_find_entry(cpuid, HV_CPUID_VENDOR_AND_MAX_FUNCTIONS, 0= ); if (c) { cpu->hyperv_vendor_id[0] =3D c->ebx; @@ -1309,12 +1306,6 @@ static int hyperv_handle_properties(CPUState *cs, goto free; } =20 - if (cpu->hyperv_passthrough) { - /* We already copied all feature words from KVM as is */ - r =3D cpuid->nent; - goto free; - } - c =3D &cpuid_ent[cpuid_i++]; c->function =3D HV_CPUID_VENDOR_AND_MAX_FUNCTIONS; c->eax =3D hyperv_feat_enabled(cpu, HYPERV_FEAT_EVMCS) ? --=20 2.30.2