From nobody Tue May 21 11:19:25 2024 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=1602780471; cv=none; d=zohomail.com; s=zohoarc; b=AM2eY20Kw8hJzsyTeT/dXGFOg2Nx82rgPFStYZ6zr4m1agdo77oe4LNQDM7IuJXNhI3x4pPXzjIDyAUpN0c1W8xs/2HAFKZ5+JrpdiKy/TiPKDQSawxqK2syI9G95IYu5njRjseX/3tMKLfrel08H5c5M3yTdpiHmrLh9ku9NfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780471; 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=PoGymc5wSiG2tFQo3gPL9k7V8VQk8HjWzxjKM/wIN+M=; b=hZiYRjLPEKQlqXNQyMVgfmrhF4PpjWDoC/AVkRiE8Z+lYtsg8oqtpkC79DlnjbC8AFybSNMBiexAJH73HGTtVSc0JfJWnIWTYmpzvbjxMw7ZMDRRR2voRQ8YxGasDwEQKuedJbRKtC+TEcvEP4+klq1onm6URGFUgbYCFjagDbs= 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 1602780471591720.2876671849681; Thu, 15 Oct 2020 09:47:51 -0700 (PDT) Received: from localhost ([::1]:49702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Pr-0005rZ-Pc for importer@patchew.org; Thu, 15 Oct 2020 12:47:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6NM-0004MD-C2 for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:40334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NK-0000Tr-Gz for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:12 -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-80--sMkXWm8O6eXsywFcPXWvg-1; Thu, 15 Oct 2020 12:45:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C4D4F100746B; Thu, 15 Oct 2020 16:45:03 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87EBE19C4F; Thu, 15 Oct 2020 16:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780308; 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=PoGymc5wSiG2tFQo3gPL9k7V8VQk8HjWzxjKM/wIN+M=; b=HgYURdWeK2UZxehNLeiEArCEAe3VylqDPvIBJ2xOG/PcpRYMxiDIbBkMJar1qgY5c0e3kJ 3VccDkH40f87TTMci/Ah6PB28YvrhDgQz9DvKZTXOU+cd4bd/BlEkwdzN9xNAQN2PLTnYw yGVwQVRbiZ7z6gFIGu+Zs2jM33X6gw8= X-MC-Unique: -sMkXWm8O6eXsywFcPXWvg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 1/9] i386: drop x86_cpu_get_supported_feature_word() forward declaration Date: Thu, 15 Oct 2020 12:44:53 -0400 Message-Id: <20201015164501.462775-2-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Vitaly Kuznetsov , Eduardo Habkost , Richard Henderson 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" From: Vitaly Kuznetsov We only use x86_cpu_get_supported_feature_word() after its implementation, no forward declaration needed. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200904145431.196885-3-vkuznets@redhat.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 9eafbe3690..a33af2359c 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4180,9 +4180,6 @@ void x86_cpu_change_kvm_default(const char *prop, con= st char *value) assert(pv->prop); } =20 -static uint64_t x86_cpu_get_supported_feature_word(FeatureWord w, - bool migratable_only); - static bool lmce_supported(void) { uint64_t mce_cap =3D 0; --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602780637; cv=none; d=zohomail.com; s=zohoarc; b=ZHdsvZ9cQxCzF82bhYEBvuTDA2hq3zPcL8/lcPJvrWTAIFRP9wkSpfZrVTGXY4llf2adSrlSIoSWErMZtYrm/e6rcMRqyqNwELDWJ7JjdfTGA+yxJSg9D8VGqCs+9nPy7UrTC55svV2dS3/iSYmQ6ftlbjbFN3oLIO+S8wFWUAk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780637; 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=FjSWs2ueHTFAYbwmQwSRzeDlYFK9piLsfc+JOFi7X2Q=; b=PV5aNGi8sMNQxgw7763KYwANlG1s34kWH120IMv26XKc9uF7Ssy+fOSExlIjtq0004VsCkIr7aPQMwQ9jlQ+dObaTxI5S/BLHVBa1k9lHv2B/vufZojzmFPDzCQUKCUfslGCnmIKpMU9duQD4N/50YZxayv2o73nK3kcgpwWwrg= 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 1602780637461687.7363962505162; Thu, 15 Oct 2020 09:50:37 -0700 (PDT) Received: from localhost ([::1]:55566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6SY-0008Jy-Q9 for importer@patchew.org; Thu, 15 Oct 2020 12:50:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6NQ-0004MT-5d for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NN-0000U3-TT for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:15 -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-503-YwResHO9MY-tBZXT2_Af_A-1; Thu, 15 Oct 2020 12:45:08 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 624F05708A; Thu, 15 Oct 2020 16:45:07 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FC8219C4F; Thu, 15 Oct 2020 16:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780311; 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=FjSWs2ueHTFAYbwmQwSRzeDlYFK9piLsfc+JOFi7X2Q=; b=M0GsVqEKF43LjS0irsNtwgXsFk36Qbrp9jtA80vDn0v3h3vkdwbksXXxEDGZrdkd1nWexH g0cNwNYNWPOeEItWkUFqM+flBppA/nlKMxpq3oSCpG9iDNgEyaH9XbQTTq1ivMBjVBMzqM lPw7NRNLjgabp67ZZXGVEexMHUqKkOg= X-MC-Unique: YwResHO9MY-tBZXT2_Af_A-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 2/9] i386/kvm: fix FEATURE_HYPERV_EDX value in hyperv_passthrough case Date: Thu, 15 Oct 2020 12:44:54 -0400 Message-Id: <20201015164501.462775-3-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:38:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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 , Igor Mammedov , Eduardo Habkost , Zhenyu Wang , Richard Henderson 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" From: Zhenyu Wang Fix typo to use correct edx value for FEATURE_HYPERV_EDX when hyperv_passthrough is enabled. Signed-off-by: Zhenyu Wang Message-Id: <20190820103030.12515-1-zhenyuw@linux.intel.com> Fixes: e48ddcc6ce13 ("i386/kvm: implement 'hv-passthrough' mode") Signed-off-by: Eduardo Habkost --- target/i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 8b12387d30..0098be7015 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1214,7 +1214,7 @@ static int hyperv_handle_properties(CPUState *cs, if (c) { env->features[FEAT_HYPERV_EAX] =3D c->eax; env->features[FEAT_HYPERV_EBX] =3D c->ebx; - env->features[FEAT_HYPERV_EDX] =3D c->eax; + env->features[FEAT_HYPERV_EDX] =3D c->edx; } c =3D cpuid_find_entry(cpuid, HV_CPUID_ENLIGHTMENT_INFO, 0); if (c) { --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602780482; cv=none; d=zohomail.com; s=zohoarc; b=JcRxgDtFyvpMcPcgbxQFdBUjjjkm33W7XJFEa0wyuelLgOzLt1KcA9Y7+2UBWVFwbDClS+yAapekYPr7LZSHuGFx+XzRcnafLCuso0mOCVUgSk/fIgg5+tOSPxA/dvwOFlW5fLgCC6z225EPSI9KkXRQr8GngNeUvByt+0BQbEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780482; 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=ZpynZSVA1qN6ltS+zJYlz+OUy8xgGllKPauyeHYcGkw=; b=FpodPd/PfC0blm+z1/YXNaUx20uiBUpr1cD5/+V3gKg8s/zlUMu4VBCHrKO+x3edIIeC6jdE70qTC//is8LQ91xgy2dwess2y+ip0d1b+HHeZkk/+zIIgBvB/cOhgwGyiGIM5V0w8jB/B/5TWVH38X7mYn0zzHXGJAnEsCsPsjE= 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 1602780482027734.2216676386975; Thu, 15 Oct 2020 09:48:02 -0700 (PDT) Received: from localhost ([::1]:49752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Q4-0005sq-PG for importer@patchew.org; Thu, 15 Oct 2020 12:48:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6NS-0004Ma-67 for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NN-0000U5-TO for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:17 -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-335-eLz_WMi3PAejqGw-ewQIvA-1; Thu, 15 Oct 2020 12:45:10 -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 BE2068D4420; Thu, 15 Oct 2020 16:45:08 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CFCE76649; Thu, 15 Oct 2020 16:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780311; 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=ZpynZSVA1qN6ltS+zJYlz+OUy8xgGllKPauyeHYcGkw=; b=RvGBSpRUtB5eFEFLzFnbT1oL6njE2WL8g1kX5EOVUVnAp+GAmc3Nivzyqcsy4ZYMT8E4VZ QBna8grl/x2I3njoezA2W3HovZbkaIjcP4AwdtNIk+eBktJb12pRQHl9QAp+gWQjPH/odR 7owjM1wj+M8CYssOktcqJPgj/9L/CEQ= X-MC-Unique: eLz_WMi3PAejqGw-ewQIvA-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 3/9] target/i386: Remove core_id assert check in CPUID 0x8000001E Date: Thu, 15 Oct 2020 12:44:55 -0400 Message-Id: <20201015164501.462775-4-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@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=ehabkost@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=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:38:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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 , Igor Mammedov , Eduardo Habkost , Babu Moger , Richard Henderson 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" From: Babu Moger With x2apic enabled, configurations can have more that 255 cores. Noticed the device add test is hitting an assert when during cpu hotplug with core_id > 255. This is due to assert check in the CPUID 0x8000001E. Remove the assert check and fix the problem. Fixes the bug: Link: https://bugzilla.redhat.com/show_bug.cgi?id=3D1834200 Signed-off-by: Babu Moger Message-Id: <160072824160.9666.8890355282135970684.stgit@naples-babu.amd.co= m> Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a33af2359c..25ec64124e 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5910,9 +5910,14 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index,= uint32_t count, } break; case 0x8000001E: - assert(cpu->core_id <=3D 255); - encode_topo_cpuid8000001e(cpu, &topo_info, - eax, ebx, ecx, edx); + if (cpu->core_id <=3D 255) { + encode_topo_cpuid8000001e(cpu, &topo_info, eax, ebx, ecx, edx); + } else { + *eax =3D 0; + *ebx =3D 0; + *ecx =3D 0; + *edx =3D 0; + } break; case 0xC0000000: *eax =3D env->cpuid_xlevel2; --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602780845; cv=none; d=zohomail.com; s=zohoarc; b=VQA19ycXf/AfU/fXL2sQ6IaxwMP0wB1iVLGGSCWTPEem+A1N9+I6CLO1UT2PlPdaiw1ekHiJ/hWtpbihXFomFWnBK+XR3QfAU0vQDjAKURTPTrwaAllN+1Bu8xEmswu0CmgUaL1jRLmUPMZoufm94YBiPI7l5fLaw2FuILA/eVU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780845; 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=9hb+1/7cb7CdrsmNglCj3VIi1UB0HDXrR2h+oR1OePk=; b=YbQxA3oAYjvwd2pMYVgoCrXLrvoytZM2jC9mVH8XFDSlrre+ri3Y190G0adV79EwX6PDsOIntquVhr5m1jjoy4r3d5H1Ljl5CR3GzaL2MIsmUAb18mMYamJT8Bn1WAeRwjQzH8HLDQvWIFUaelhTV9wCt8yARi9BDOyKozn847Q= 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 1602780845218556.9716992043243; Thu, 15 Oct 2020 09:54:05 -0700 (PDT) Received: from localhost ([::1]:33948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Vw-0002qU-0R for importer@patchew.org; Thu, 15 Oct 2020 12:54:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6NW-0004Ml-P0 for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NO-0000UV-Bs for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:19 -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-66-AtbkhMdxPvKNC3-kHmpyfQ-1; Thu, 15 Oct 2020 12:45:11 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BA6A01921FA2; Thu, 15 Oct 2020 16:45:09 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81A136EF54; Thu, 15 Oct 2020 16:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780313; 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=9hb+1/7cb7CdrsmNglCj3VIi1UB0HDXrR2h+oR1OePk=; b=FU5v6AMxXDOzeFw0ZRoVKuDkGDGapCf0ewXxhXfyxeosWVvBFmzUyyOwYUpk4d+wapIin3 qJGf7vPdNlGsavSqnKLAnVdwyzitxd+YlfrR0KwkAwg9jo4kyW2J156zgJtjS5Ug/AeKfD 5ZajebccPLYq6m1oY48TIFPh7EdZgGo= X-MC-Unique: AtbkhMdxPvKNC3-kHmpyfQ-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 4/9] i386/kvm: Require KVM_CAP_IRQ_ROUTING Date: Thu, 15 Oct 2020 12:44:56 -0400 Message-Id: <20201015164501.462775-5-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Eduardo Habkost , Richard Henderson 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" KVM_CAP_IRQ_ROUTING is available since 2009 (Linux v2.6.30), so it's safe to just make it a requirement on x86. Signed-off-by: Eduardo Habkost Acked-by: Paolo Bonzini Message-Id: <20200922201922.2153598-2-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- target/i386/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 0098be7015..69c691ad77 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -2114,6 +2114,11 @@ int kvm_arch_init(MachineState *ms, KVMState *s) int ret; struct utsname utsname; =20 + if (!kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { + error_report("kvm: KVM_CAP_IRQ_ROUTING not supported by KVM"); + return -ENOTSUP; + } + has_xsave =3D kvm_check_extension(s, KVM_CAP_XSAVE); has_xcrs =3D kvm_check_extension(s, KVM_CAP_XCRS); has_pit_state2 =3D kvm_check_extension(s, KVM_CAP_PIT_STATE2); --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602781042; cv=none; d=zohomail.com; s=zohoarc; b=m0nI5fSMHNgMfQJaPQSgSKpvEsdl8cHv0FDbiviRdiIv20fleyT/pBqdswcrelz+pHP3GfnH34ICWeC4vPO6meXoL3SNe0i9gVuu8k5otENRxkAxKKwuKQ4TFIuAcSbRlQCaA6mFDo4tlji75Okw/Wd+u/oPB89KtwKMniDc58c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602781042; 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=nWd4yB75Wt66mVlUSGrxHhIA1yEu4PJLln4W+/ohXyU=; b=nfd6mbG1IThMCU0VZ5w3bnMJQDZ4ThUzXDR+p2g5iOXa/YTo+P9bDIKoi6hWzwLZkyjHxJqdfcXr80kGRtFp1pee5T0F7zB1yfMFifGpaBvnpgBAlvZldtRgobqum2D+wxMqqsNaDZJhcRqz3wVpus5Mb2Po8GUZcT9HK6v0ZZw= 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 160278104224130.572667127312343; Thu, 15 Oct 2020 09:57:22 -0700 (PDT) Received: from localhost ([::1]:42320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Z6-0006Zx-Tz for importer@patchew.org; Thu, 15 Oct 2020 12:57:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6Na-0004NT-Le for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:53200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NP-0000Ue-1Y for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:23 -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-350-5v7_WUwVOFG1_c2zotQPNg-1; Thu, 15 Oct 2020 12:45:11 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A8F6C107AFC6; Thu, 15 Oct 2020 16:45:10 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7269C19C4F; Thu, 15 Oct 2020 16:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780313; 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=nWd4yB75Wt66mVlUSGrxHhIA1yEu4PJLln4W+/ohXyU=; b=BW/nxDeDSABjcCcqoG8z6VAquMo3Dcw5obWRM0raXW8aQNGEm+aZodABKriUTaPk0jxfsj Bt9CgGRE93d8CE51LKnAI4qmwILMyM6LqrD9v7yMDVnR6m9JBen1ieUlnb7M8+qkOIFx+o WoYJW88NN+N3wT/stM9yT2l/201GtQQ= X-MC-Unique: 5v7_WUwVOFG1_c2zotQPNg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 5/9] i386/kvm: Remove IRQ routing support checks Date: Thu, 15 Oct 2020 12:44:57 -0400 Message-Id: <20201015164501.462775-6-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Eduardo Habkost , Richard Henderson 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" KVM_CAP_IRQ_ROUTING is always available on x86, so replace checks for kvm_has_gsi_routing() and KVM_CAP_IRQ_ROUTING with asserts. Signed-off-by: Eduardo Habkost Acked-by: Paolo Bonzini Message-Id: <20200922201922.2153598-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- hw/i386/kvm/apic.c | 5 ++--- hw/i386/kvm/ioapic.c | 33 ++++++++++++++++----------------- target/i386/kvm.c | 7 ------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c index 4eb2d77b87..dd29906061 100644 --- a/hw/i386/kvm/apic.c +++ b/hw/i386/kvm/apic.c @@ -225,9 +225,8 @@ static void kvm_apic_realize(DeviceState *dev, Error **= errp) memory_region_init_io(&s->io_memory, OBJECT(s), &kvm_apic_io_ops, s, "kvm-apic-msi", APIC_SPACE_SIZE); =20 - if (kvm_has_gsi_routing()) { - msi_nonbroken =3D true; - } + assert(kvm_has_gsi_routing()); + msi_nonbroken =3D true; } =20 static void kvm_apic_unrealize(DeviceState *dev) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index c5528df942..dfc3c98005 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -25,27 +25,26 @@ void kvm_pc_setup_irq_routing(bool pci_enabled) KVMState *s =3D kvm_state; int i; =20 - if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { - for (i =3D 0; i < 8; ++i) { - if (i =3D=3D 2) { - continue; - } - kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_MASTER, i); - } - for (i =3D 8; i < 16; ++i) { - kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8); + assert(kvm_has_gsi_routing()); + for (i =3D 0; i < 8; ++i) { + if (i =3D=3D 2) { + continue; } - if (pci_enabled) { - for (i =3D 0; i < 24; ++i) { - if (i =3D=3D 0) { - kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, 2); - } else if (i !=3D 2) { - kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, i); - } + kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_MASTER, i); + } + for (i =3D 8; i < 16; ++i) { + kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8); + } + if (pci_enabled) { + for (i =3D 0; i < 24; ++i) { + if (i =3D=3D 0) { + kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, 2); + } else if (i !=3D 2) { + kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, i); } } - kvm_irqchip_commit_routes(s); } + kvm_irqchip_commit_routes(s); } =20 typedef struct KVMIOAPICState KVMIOAPICState; diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 69c691ad77..588d893a63 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -4552,13 +4552,6 @@ bool kvm_arch_stop_on_emulation_error(CPUState *cs) =20 void kvm_arch_init_irq_routing(KVMState *s) { - if (!kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { - /* If kernel can't do irq routing, interrupt source - * override 0->2 cannot be set up as required by HPET. - * So we have to disable it. - */ - no_hpet =3D 1; - } /* We know at this point that we're using the in-kernel * irqchip, so we can use irqfds, and on x86 we know * we can use msi via irqfd and GSI routing. --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602781127; cv=none; d=zohomail.com; s=zohoarc; b=MNrXf7ycasDTxBYli/fzHkTXUI6ZVIqeJL1S+Qt0H9irJRvY68qWQfaKDCNROn/LAXC0a4080pWoh/OgPQD6jutiYk5nGT5+S59bm7jzxvj+hTRQVRCE/t3n5r98aHh+5duDHYSljJEfqVfedPFuzKaDeY1m8ltuoeFj3sAo2Xs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602781127; 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=gGmqgei+Up8VgdSbIiXXnU58C7qtGxogY9pgtEwOVOA=; b=BZ50C/147ynpINvZrWFsefAOn0qOKrUSG83Uh4j4VczgKpwAnZzoX3RE5ERIOHE+Xtx9PP0DMtlmESDec3LEOvWiVJDuMkQHr+FO0MFhSSSYM3yObJGrc/foDIVS650D8csZDBEidZxDJyPBm6gSSa/q9jjYj5NYv/TJA4cDCGY= 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 1602781127216161.46118116685113; Thu, 15 Oct 2020 09:58:47 -0700 (PDT) Received: from localhost ([::1]:50508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6aT-0001To-Ve for importer@patchew.org; Thu, 15 Oct 2020 12:58:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6Nc-0004Nm-LQ for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:33799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NR-0000XO-U7 for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:28 -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-402-jdAFo9-hMkaHUpdIk_FZhg-1; Thu, 15 Oct 2020 12:45:12 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8991A1007470; Thu, 15 Oct 2020 16:45:11 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5705A5D9D5; Thu, 15 Oct 2020 16:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780317; 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=gGmqgei+Up8VgdSbIiXXnU58C7qtGxogY9pgtEwOVOA=; b=e9AD/VU1UtYGEgJbpb6CReO68MA0hNDQOgnU2XM2/bOdU/I9nXK95w5L1hCgkJ041gydT4 rIy0dER6s9eJKxSg3GnDs88nRV9AHsZrMuzH85ydf3eNXzuRMofDZPTZ3r2FJWYfmSJhgQ bcxzmGkuC16W8l6LWj7uMlsTO9TwATQ= X-MC-Unique: jdAFo9-hMkaHUpdIk_FZhg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 6/9] i386/kvm: Delete kvm_allows_irq0_override() Date: Thu, 15 Oct 2020 12:44:58 -0400 Message-Id: <20201015164501.462775-7-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Eduardo Habkost , Richard Henderson 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" As IRQ routing is always available on x86, kvm_allows_irq0_override() will always return true, so we don't need the function anymore. Signed-off-by: Eduardo Habkost Acked-by: Paolo Bonzini Message-Id: <20200922201922.2153598-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- target/i386/kvm_i386.h | 1 - hw/i386/fw_cfg.c | 2 +- hw/i386/microvm.c | 2 +- hw/i386/pc.c | 2 +- target/i386/kvm-stub.c | 5 ----- target/i386/kvm.c | 5 ----- 6 files changed, 3 insertions(+), 14 deletions(-) diff --git a/target/i386/kvm_i386.h b/target/i386/kvm_i386.h index 0fce4e51d2..a4a619cebb 100644 --- a/target/i386/kvm_i386.h +++ b/target/i386/kvm_i386.h @@ -32,7 +32,6 @@ =20 #endif /* CONFIG_KVM */ =20 -bool kvm_allows_irq0_override(void); bool kvm_has_smm(void); bool kvm_has_adjust_clock(void); bool kvm_has_adjust_clock_stable(void); diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index 33441ad484..e06579490c 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -123,7 +123,7 @@ FWCfgState *fw_cfg_arch_create(MachineState *ms, fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES, acpi_tables, acpi_tables_len); #endif - fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, kvm_allows_irq0_override(= )); + fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, 1); =20 fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE, &e820_reserve, sizeof(e820_reserve)); diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 73a7a142b4..68a7f424ac 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -290,7 +290,7 @@ static void microvm_memory_init(MicrovmMachineState *mm= s) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, machine->smp.cpus); fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, machine->smp.max_cpus); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)machine->ram_size); - fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, kvm_allows_irq0_override(= )); + fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, 1); fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE, &e820_reserve, sizeof(e820_reserve)); fw_cfg_add_file(fw_cfg, "etc/e820", e820_table, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e87be5d29a..4e323755d0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -827,7 +827,7 @@ void pc_guest_info_init(PCMachineState *pcms) MachineState *ms =3D MACHINE(pcms); X86MachineState *x86ms =3D X86_MACHINE(pcms); =20 - x86ms->apic_xrupt_override =3D kvm_allows_irq0_override(); + x86ms->apic_xrupt_override =3D true; pcms->numa_nodes =3D ms->numa_state->num_nodes; pcms->node_mem =3D g_malloc0(pcms->numa_nodes * sizeof *pcms->node_mem); diff --git a/target/i386/kvm-stub.c b/target/i386/kvm-stub.c index 872ef7df4c..92f49121b8 100644 --- a/target/i386/kvm-stub.c +++ b/target/i386/kvm-stub.c @@ -13,11 +13,6 @@ #include "cpu.h" #include "kvm_i386.h" =20 -bool kvm_allows_irq0_override(void) -{ - return 1; -} - #ifndef __OPTIMIZE__ bool kvm_has_smm(void) { diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 588d893a63..cf46259534 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -154,11 +154,6 @@ bool kvm_has_exception_payload(void) return has_exception_payload; } =20 -bool kvm_allows_irq0_override(void) -{ - return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing(); -} - static bool kvm_x2apic_api_set_flags(uint64_t flags) { KVMState *s =3D KVM_STATE(current_accel()); --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602780648; cv=none; d=zohomail.com; s=zohoarc; b=TJE3AjENegI6+p8ESMenqdYQk8S8Kq02UO2LqQ/5VspC023xK1NQLt/87tpxrVbZquofU+os1LCffoXqmvmx7uADxwH1AoXPeFfPQcNU7aAF8sT+sbabsPxcnrhwvHZ7NENcpuC/fqHkDq4wslX3sngESEZ6DuQilfETOFc4O30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780648; 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=sCDuD6H6MJD1t3wMyUJdOcMIiE41OOWS2VG/S+mOCY4=; b=dySgVYsT8+jbjEvanAftAWK792sAiK458wKJVIT4fTjLJjLrQlxINI0ALFFxF6ihY2Kue5qvL1yMn/IhYJ3RcBZa5wsG/MKq0DGRYCCYSMcHiE9tmbfonM+HAvZ+xVdH4368a9UuzSYx11w2IONLE1eANOdTXsSeXsMy7Qttx8k= 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 1602780648179980.0898234938113; Thu, 15 Oct 2020 09:50:48 -0700 (PDT) Received: from localhost ([::1]:55646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Si-0008Ln-5s for importer@patchew.org; Thu, 15 Oct 2020 12:50:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6Ne-0004OM-Mc for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:56430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NR-0000XE-TT for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:30 -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-154-i6B9MYqHPxGBbOjANKJu9g-1; Thu, 15 Oct 2020 12:45:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8335356B56; Thu, 15 Oct 2020 16:45:12 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4442C5C1BD; Thu, 15 Oct 2020 16:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780316; 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=sCDuD6H6MJD1t3wMyUJdOcMIiE41OOWS2VG/S+mOCY4=; b=fJ9UnK2naFxZ1EdACrB6T/G0/A2RrT1b31ZaGYt+3N17P7m1zqceKI8UdtVcPHtuWHcVlZ w8lg1wZYoiah/ABR336eT2XKRSFHKMDPIliACcmHuF71V3GYEFarykhZJJAxNGIfL/ObsB KpPg7tmzNphQ+/vUz54QonTs2v1Bmyo= X-MC-Unique: i6B9MYqHPxGBbOjANKJu9g-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 7/9] kvm: Correct documentation of kvm_irqchip_*() Date: Thu, 15 Oct 2020 12:44:59 -0400 Message-Id: <20201015164501.462775-8-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Eduardo Habkost , Richard Henderson 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" When split irqchip support was introduced, the meaning of kvm_irqchip_in_kernel() changed: now it only means the LAPIC is in kernel. The PIC, IOAPIC, and PIT might be in userspace if irqchip=3Dsplit was set. Update the doc comment to reflect that. While at it, remove the "the user asked us" part in kvm_irqchip_is_split() doc comment. That macro has nothing to do with existence of explicit user-provided options. Signed-off-by: Eduardo Habkost Acked-by: Paolo Bonzini Message-Id: <20200922203612.2178370-1-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- include/sysemu/kvm.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index fe7dab1466..bb5d5cf497 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -51,23 +51,22 @@ extern bool kvm_msi_use_devid; /** * kvm_irqchip_in_kernel: * - * Returns: true if the user asked us to create an in-kernel - * irqchip via the "kernel_irqchip=3Don" machine option. + * Returns: true if an in-kernel irqchip was created. * What this actually means is architecture and machine model - * specific: on PC, for instance, it means that the LAPIC, - * IOAPIC and PIT are all in kernel. This function should never - * be used from generic target-independent code: use one of the - * following functions or some other specific check instead. + * specific: on PC, for instance, it means that the LAPIC + * is in kernel. This function should never be used from generic + * target-independent code: use one of the following functions or + * some other specific check instead. */ #define kvm_irqchip_in_kernel() (kvm_kernel_irqchip) =20 /** * kvm_irqchip_is_split: * - * Returns: true if the user asked us to split the irqchip - * implementation between user and kernel space. The details are - * architecture and machine specific. On PC, it means that the PIC, - * IOAPIC, and PIT are in user space while the LAPIC is in the kernel. + * Returns: true if the irqchip implementation is split between + * user and kernel space. The details are architecture and + * machine specific. On PC, it means that the PIC, IOAPIC, and + * PIT are in user space while the LAPIC is in the kernel. */ #define kvm_irqchip_is_split() (kvm_split_irqchip) =20 --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602780844; cv=none; d=zohomail.com; s=zohoarc; b=ZA1eMNO0dskdK8zgoTJq66cRCcjqaRKofPN4XIPrTQ4QVmACejgzrU9fM4vRnysz08LGPM762B6fzwASYhzdCoQJd+1ircXRoaTjB3lAOD0+Pd6nGldfc0xnmzpsj8KXz5rG+6RJHgDw/A3mNi2DLLXWX2DVbq057iMhvxZgYKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780844; 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=Dml4u4hzBMkhrKuVpNMnp+Qa3nDbJZGUvC7br4Ju0N0=; b=URusaUEChop7RinTPRIXb88KbI3pE1//Lz5KWR6rHdVr8J7GJe9Hb9NIVAS8ILetmEj4lE7bnmS46hHni1SiDI/8eMJm9E5Id4vqUpFoB7BXLFsk3qEbsPgjcuIz87egi7QFjqGJQ4v5EejfdlWbCSYvb7AiLKJ/nFB8PPOlG/g= 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 1602780844000209.91874386323298; Thu, 15 Oct 2020 09:54:04 -0700 (PDT) Received: from localhost ([::1]:33766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Vu-0002ls-Ls for importer@patchew.org; Thu, 15 Oct 2020 12:54:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6Na-0004NU-MG for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NR-0000XL-Tr for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:26 -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-550-29PkpWkCOnONas_RomBwDw-1; Thu, 15 Oct 2020 12:45:14 -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 6F6821074665; Thu, 15 Oct 2020 16:45:13 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BE6476673; Thu, 15 Oct 2020 16:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780316; 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=Dml4u4hzBMkhrKuVpNMnp+Qa3nDbJZGUvC7br4Ju0N0=; b=Fvjopy16reUL1ytzNf4YgtWjL+JgQEHBzsyLJCV8ZGVidELU6S9RW8mtENBrO47J5ZJ4uA Yfu0++tBryMrbZgaXytFKvM7+FZ1MDSdQu0Rql/lhz7sRCV8ng6sOdK6O+UQUmXqOKsWSM bCdo+rHeQq6GsXRdQqnvvu0ewTxA+h4= X-MC-Unique: 29PkpWkCOnONas_RomBwDw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 8/9] cpu: Introduce CPU model deprecation API Date: Thu, 15 Oct 2020 12:45:00 -0400 Message-Id: <20201015164501.462775-9-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@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=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Robert Hoo , Eduardo Habkost , Richard Henderson 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" From: Robert Hoo Implement the ability of marking some versions deprecated. When that CPU model is chosen, print a warning. The warning message can be customized, e.g. suggesting an alternative CPU model to be used instead. The deprecation message will be printed by x86_cpu_list_entry(), e.g. '-cpu help'. QMP command 'query-cpu-definitions' will return a bool value indicating the deprecation status. Signed-off-by: Robert Hoo Message-Id: <1600758855-80046-1-git-send-email-robert.hu@linux.intel.com> [ehabkost: reword commit message] [ehabkost: Handle NULL cpu_type] Signed-off-by: Eduardo Habkost --- qapi/machine-target.json | 7 ++++++- include/hw/core/cpu.h | 3 +++ hw/core/machine.c | 12 ++++++++++-- target/i386/cpu.c | 8 ++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/qapi/machine-target.json b/qapi/machine-target.json index 698850cc78..fec3bb8679 100644 --- a/qapi/machine-target.json +++ b/qapi/machine-target.json @@ -286,6 +286,10 @@ # in the VM configuration, because aliases may stop being # migration-safe in the future (since 4.1) # +# @deprecated: If true, this CPU model is deprecated and may be removed in +# in some future version of QEMU according to the QEMU deprec= ation +# policy. (since 5.2) +# # @unavailable-features is a list of QOM property names that # represent CPU model attributes that prevent the CPU from running. # If the QOM property is read-only, that means there's no known @@ -310,7 +314,8 @@ 'static': 'bool', '*unavailable-features': [ 'str' ], 'typename': 'str', - '*alias-of' : 'str' }, + '*alias-of' : 'str', + 'deprecated' : 'bool' }, 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386= ) || defined(TARGET_S390X) || defined(TARGET_MIPS)' } =20 ## diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 4879f25026..9c3a45ad7b 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -155,6 +155,8 @@ struct TranslationBlock; * @disas_set_info: Setup architecture specific components of disassembly = info * @adjust_watchpoint_address: Perform a target-specific adjustment to an * address before attempting to match it against watchpoints. + * @deprecation_note: If this CPUClass is deprecated, this field provides + * related information. * * Represents a CPU family or model. */ @@ -221,6 +223,7 @@ struct CPUClass { vaddr (*adjust_watchpoint_address)(CPUState *cpu, vaddr addr, int len); void (*tcg_initialize)(void); =20 + const char *deprecation_note; /* Keep non-pointer data at the end to minimize holes. */ int gdb_num_core_regs; bool gdb_stop_before_watchpoint; diff --git a/hw/core/machine.c b/hw/core/machine.c index 7e2f4ec08e..d740a7e963 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -1087,6 +1087,8 @@ MemoryRegion *machine_consume_memdev(MachineState *ma= chine, void machine_run_board_init(MachineState *machine) { MachineClass *machine_class =3D MACHINE_GET_CLASS(machine); + ObjectClass *oc =3D object_class_by_name(machine->cpu_type); + CPUClass *cc; =20 if (machine->ram_memdev_id) { Object *o; @@ -1106,11 +1108,10 @@ void machine_run_board_init(MachineState *machine) * specified a CPU with -cpu check here that the user CPU is supported. */ if (machine_class->valid_cpu_types && machine->cpu_type) { - ObjectClass *class =3D object_class_by_name(machine->cpu_type); int i; =20 for (i =3D 0; machine_class->valid_cpu_types[i]; i++) { - if (object_class_dynamic_cast(class, + if (object_class_dynamic_cast(oc, machine_class->valid_cpu_types[i= ])) { /* The user specificed CPU is in the valid field, we are * good to go. @@ -1133,6 +1134,13 @@ void machine_run_board_init(MachineState *machine) } } =20 + /* Check if CPU type is deprecated and warn if so */ + cc =3D CPU_CLASS(oc); + if (cc && cc->deprecation_note) { + warn_report("CPU model %s is deprecated -- %s", machine->cpu_type, + cc->deprecation_note); + } + machine_class->init(machine); } =20 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 25ec64124e..2e3ee41c56 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1633,6 +1633,7 @@ typedef struct X86CPUDefinition { * If NULL, version 1 will be registered automatically. */ const X86CPUVersionDefinition *versions; + const char *deprecation_note; } X86CPUDefinition; =20 /* Reference to a specific CPU model version */ @@ -4990,6 +4991,11 @@ static void x86_cpu_definition_entry(gpointer data, = gpointer user_data) info->migration_safe =3D cc->migration_safe; info->has_migration_safe =3D true; info->q_static =3D cc->static_model; + if (cc->model && cc->model->cpudef->deprecation_note) { + info->deprecated =3D true; + } else { + info->deprecated =3D false; + } /* * Old machine types won't report aliases, so that alias translation * doesn't break compatibility with previous QEMU versions. @@ -5380,9 +5386,11 @@ static void x86_cpu_cpudef_class_init(ObjectClass *o= c, void *data) { X86CPUModel *model =3D data; X86CPUClass *xcc =3D X86_CPU_CLASS(oc); + CPUClass *cc =3D CPU_CLASS(oc); =20 xcc->model =3D model; xcc->migration_safe =3D true; + cc->deprecation_note =3D model->cpudef->deprecation_note; } =20 static void x86_register_cpu_model_type(const char *name, X86CPUModel *mod= el) --=20 2.28.0 From nobody Tue May 21 11:19:25 2024 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=1602780846; cv=none; d=zohomail.com; s=zohoarc; b=lO6fA3vPOg+Kd96MPlhDo4UV/U3TcKBq7vsZng1nZZcoH/0O2kbhR76j4B6lE29WHAKMbxcGpzgWJ3FUD47kRcWlKFnpNnch9wMqSyiZYPMd1lbkvx/DCvgRI+F4/6sIgGjR+KwE/OPlfJ0HWC/ZY4x6YtRwvXGak0Ux4fB4JcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602780846; 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=Yf9rGomi4LHyASEleBQ5pCAugrkXHIE2Bvx640kQbiM=; b=cqWKg20haVWj6m0CJY6wriRAbfb8G6DP3eJ1cYvS6j3yKar6v+nj9jMQlvbGhIFw1U1hQq/87k9Cdm+tBcLbIFp6NedxF+t8umpmrVlt5l8IfunOCI8AU1M0zIyp0NK9lU2gmZLkERASK2LyE4NtRWo6dTmE8EJsTzD5D4qSsTo= 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 1602780846829258.23228187019265; Thu, 15 Oct 2020 09:54:06 -0700 (PDT) Received: from localhost ([::1]:34024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT6Vx-0002so-H8 for importer@patchew.org; Thu, 15 Oct 2020 12:54:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT6Ng-0004Of-L6 for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:53577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kT6NZ-0000aO-Kg for qemu-devel@nongnu.org; Thu, 15 Oct 2020 12:45:32 -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-356-MXd1RyhFPtqS55lAV1Hdtg-1; Thu, 15 Oct 2020 12:45:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9347F8D4420; Thu, 15 Oct 2020 16:45:14 +0000 (UTC) Received: from localhost (ovpn-66-44.rdu2.redhat.com [10.10.66.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 368D96EF68; Thu, 15 Oct 2020 16:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602780321; 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=Yf9rGomi4LHyASEleBQ5pCAugrkXHIE2Bvx640kQbiM=; b=GwTT6wQ0jCb8ak0yfmUSZZk9UPJm/hHESoYrb2l4Z2u9JH8kKiuqKASI+Qn63ORk1hO0Kq aN0bRkgRb9O7NoSYf4pwQHvXFhUP1a9xo/qiUeg+b+L04qIrW2+20lA7SdsP+R8GQdCCQV l+vZikfVeJbzdh1n+RU1jCAdY4wsqjA= X-MC-Unique: MXd1RyhFPtqS55lAV1Hdtg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 9/9] i386: Mark Icelake-Client CPU models deprecated Date: Thu, 15 Oct 2020 12:45:01 -0400 Message-Id: <20201015164501.462775-10-ehabkost@redhat.com> In-Reply-To: <20201015164501.462775-1-ehabkost@redhat.com> References: <20201015164501.462775-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@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=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 02:10:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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 , Igor Mammedov , Robert Hoo , Eduardo Habkost , Richard Henderson 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" From: Robert Hoo Icelake-Client CPU models will be removed in the future. Signed-off-by: Robert Hoo Message-Id: <1600758855-80046-2-git-send-email-robert.hu@linux.intel.com> [ehabkost: reword deprecation note, fix version in doc] Signed-off-by: Eduardo Habkost --- docs/system/deprecated.rst | 6 ++++++ target/i386/cpu.c | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 09ec8b1ae8..21d122c49a 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -314,6 +314,12 @@ a future version of QEMU. Support for this CPU was rem= oved from the upstream Linux kernel, and there is no available upstream toolchain to build binaries for it. =20 +``Icelake-Client`` CPU Model (since 5.2.0) +'''''''''''''''''''''''''''''''''''''''''' + +``Icelake-Client`` CPU Models are deprecated. Use ``Icelake-Server`` CPU +Models instead. + System emulator devices ----------------------- =20 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2e3ee41c56..576746d763 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3358,10 +3358,13 @@ static X86CPUDefinition builtin_x86_defs[] =3D { .xlevel =3D 0x80000008, .model_id =3D "Intel Core Processor (Icelake)", .versions =3D (X86CPUVersionDefinition[]) { - { .version =3D 1 }, + { + .version =3D 1, + .note =3D "deprecated" + }, { .version =3D 2, - .note =3D "no TSX", + .note =3D "no TSX, deprecated", .alias =3D "Icelake-Client-noTSX", .props =3D (PropValue[]) { { "hle", "off" }, @@ -3370,7 +3373,8 @@ static X86CPUDefinition builtin_x86_defs[] =3D { }, }, { /* end of list */ } - } + }, + .deprecation_note =3D "use Icelake-Server instead" }, { .name =3D "Icelake-Server", --=20 2.28.0