From patchwork Wed May 13 10:48:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Zheng X-Patchwork-Id: 186587 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp343449ilb; Wed, 13 May 2020 03:51:19 -0700 (PDT) X-Google-Smtp-Source: APiQypJJmQBxhPwSQEhX6E8tVuRfbB7sgsptlElLERr8WjHdRSNRZEsKiMAGb3iEv+VKAlX+GUb7 X-Received: by 2002:a25:1a84:: with SMTP id a126mr41534258yba.161.1589367079290; Wed, 13 May 2020 03:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589367079; cv=none; d=google.com; s=arc-20160816; b=TyQG4bwrbY8LF4Tjt1CUnRQYRuxtSIriH3ojFXZaxGbnzBjQNqELGpcLh2VeLPKFSi rBPsvoMoHEK8b0nvaFvy2eF0JbsTxIcwqK3II1gOyNAoFkCXMyJY0nFutDZadoBCqXa3 wjf0QyIWrZW8FudHED8f1QKj3i0Dj4Bth7Bfsx9Z2bhSIkv04kU04VtS7qy7ReEupIx/ GX85K6rZ36Eg+dXknQRJ6fruXXcU5g8e3D7b+rzGaTC97g5wIe+12lLk8zm29MWmo7kP 3LQ8j2IzCetKG66/sshLlz6c1zK1ELkV+XnkXWLjnBpBTUKA8GmTB25wu2+fk2gSFSPl L2Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:errors-to:sender:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:cc :mime-version:message-id:date:subject:to:from:delivered-to :dkim-signature; bh=sBlITht1yfMutZ4MAByzWpy8LjRGlV9EWM5sb4QC1wg=; b=jIBLfZXumWdfwC1XAbfb/DE1P9AMA74oMm+GabrzPwf/YdHxYXkZacyj8rpWnOPs5G siFF6w3TQmlHpVVzZRCmYR2YgsgnJWVeq62Rzf6VdTsOKH4UCLDcaKHFSv3BLXgMnksd VyJdlilAzMe5d36opFmtcXIN4ILTWPvy6UGARZkuJEMydYV6HgSfwmT6EiCMqFiu4PGZ LFZOiCvg54ZxpECb1eI3z7Rd0Z+QseBZXrj6wI271+PvX3AUmuYGbKoFPD0gMKOVOSwO Ki6C/+EB1wW4V7Nb5T4GS2jCKaBcL4eKfwnm5vqXibPj3Bam/NdD23a1pYQW4DHVoknQ gLmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fD4FRdDX; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com. [205.139.110.120]) by mx.google.com with ESMTPS id m191si16330420ybm.107.2020.05.13.03.51.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2020 03:51:19 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fD4FRdDX; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589367078; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sBlITht1yfMutZ4MAByzWpy8LjRGlV9EWM5sb4QC1wg=; b=fD4FRdDXrttD+d5O/erJNkKvO8Wt+SEmg3dcNjRe0Av6v6MkIgEIs01PnxdMzijkL8n3Hb AzVyMcICuG3JWxWYh+E+TsI5K1KSVOlkHtIe/YB8QHBo32hFtu4PNjuYPmnfHMs2f5WgRj 5smCrxHSyfk6NUfgEkFoTXl8S4GePIc= 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-418-_QPKPSqfNJ-EAQuOI5rd7Q-1; Wed, 13 May 2020 06:51:16 -0400 X-MC-Unique: _QPKPSqfNJ-EAQuOI5rd7Q-1 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 D3380460; Wed, 13 May 2020 10:51:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87FAB76E82; Wed, 13 May 2020 10:51:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D741D4CA94; Wed, 13 May 2020 10:51:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04DAnBuo010210 for ; Wed, 13 May 2020 06:49:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9DDBC114CBC; Wed, 13 May 2020 10:49:11 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 99116114CC0 for ; Wed, 13 May 2020 10:49:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFB71811768 for ; Wed, 13 May 2020 10:49:08 +0000 (UTC) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-oln040092253062.outbound.protection.outlook.com [40.92.253.62]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-262-BClT0nOGNW2CCKaIlTOdVQ-1; Wed, 13 May 2020 06:49:06 -0400 X-MC-Unique: BClT0nOGNW2CCKaIlTOdVQ-1 Received: from SG2APC01FT003.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::43) by SG2APC01HT207.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::396) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27; Wed, 13 May 2020 10:49:02 +0000 Received: from TY2PR01MB3113.jpnprd01.prod.outlook.com (10.152.250.56) by SG2APC01FT003.mail.protection.outlook.com (10.152.250.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19 via Frontend Transport; Wed, 13 May 2020 10:49:02 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:6CDCC6F429A82AFFBA173E1E97622EEBECBB20CF1F998C76059A1385B81E0867; UpperCasedChecksum:8D314766B09B791727CCDFAAD4FCE87AE54261F5EC1E6AE4AB208893B6574AC4; SizeAsReceived:7480; Count:48 Received: from TY2PR01MB3113.jpnprd01.prod.outlook.com ([fe80::b9e6:3960:1f6:7d81]) by TY2PR01MB3113.jpnprd01.prod.outlook.com ([fe80::b9e6:3960:1f6:7d81%7]) with mapi id 15.20.2979.033; Wed, 13 May 2020 10:49:02 +0000 From: Zhenyu Zheng To: libvir-list@redhat.com Subject: [PATCH V5 0/4] Introduce getHost support for ARM CPU driver Date: Wed, 13 May 2020 18:48:28 +0800 Message-ID: X-ClientProxiedBy: HK2PR0401CA0023.apcprd04.prod.outlook.com (2603:1096:202:2::33) To TY2PR01MB3113.jpnprd01.prod.outlook.com (2603:1096:404:78::22) X-Microsoft-Original-Message-ID: <20200513104832.7390-1-zheng.zhenyu@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.8.114.27) by HK2PR0401CA0023.apcprd04.prod.outlook.com (2603:1096:202:2::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Wed, 13 May 2020 10:49:01 +0000 X-Microsoft-Original-Message-ID: <20200513104832.7390-1-zheng.zhenyu@outlook.com> X-TMN: [VXFtCNymKRPISsP71dAQ+hQhQLiIcp6X] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 963afa84-92db-41ef-7a88-08d7f72b3fad X-MS-Exchange-SLBlob-MailProps: mBRmoEB1kyL4voMrsTyEApS0tCh7wjsRW0uZ7OB+i3k4IP5eXVjRCAH77sLHCw5iucBu1YcVVJrqG8B1NpgdAkOmco6IeX7Au9/b8whYyOIcASmCm8KuEO0+TdMa3kVrHogewp7E1paIAsOgfV2Oy4soXigT+5GRM6eUs26SK3UQhRqTNxNotK9YfsgJDdX7uvHWQJDoTbmGAn753OuecHZ6hdfuO6Wx8iKa2MvGYAtz9AILEjXwo7EESsUrhVgEbWGCwQu27EjCTkKFwIqFNuDeOtAlF7/NRWZKnA+1MQ5dgyOXGT718CYrjZyzb9Xu+bPAMh4sU2TheePxCjZmiA06lnbgwAPrUGvsGKfsWr1r4VUzlX3n22psxS56sxVWf9kqniAIt+9RYo7fXcLRSufxCNuV9ANn4ZSGNFWFncPp3OTKJ1H+5ifH5Qg/cILA+D56/K+MOxc69gLrqKGuq6UvU+cdhcAE/JdChtSuMT0qZMzSB8iXEkELCMbTYyQoQkGW86F9UGUVcKEZgjNtP4i9AbuXTxNMvIl39ovrIGnciT3LHsKjh6JwMS2SgCkNSXjs/yeESP+T86rXaqwFZn9IFvD+wu3hZ9O/nPRT42JnMeUteZNeaZZ9evVGriTjBmka4mx8yA2p9ibvZc99BkZyuTquLmi2RwS34Xtyp6sY+XsBb1pw52b6UpmcceKYr2Ikv5+hNojVZvRER35y/WtqEUWIthfd6b8A5vPzW5C6haiOWClWnJO3dxm2br4SeWTmEK/bdTo= X-MS-TrafficTypeDiagnostic: SG2APC01HT207: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OY1xokwRiRH1DzkXHGxlLu7+c2mop3gQxjPC6CUog1HY4cT24yAKUSek8fN1jym7yj+8qkisZ24ZfIequfNNqD5e9hDcTf2Sd0/G71Tt1HqQU6nm+yOyG0lh9CfJ/SuzEE2h7O2pIVF0j+hyli1Yt0zcCdLemtXfs4HFiNHuJG9wmNUF3Cy2sDUtFlJjPxz4vkyHzJyUgpTpakLTMfLIQQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:TY2PR01MB3113.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: hE0+KbtwTq3fzoKK57K6w3trzSaZRBGkSB/p426orLAKRgjq8ruokEuIXQyi5gZm9RNcLK4ByZGwJxuho74VzVaFLtzqbPnLx5u3kCVmn0ofXch/N1ol/19Lkfi5wpCJMem9vZaWN+QS7w1CMOX73A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 963afa84-92db-41ef-7a88-08d7f72b3fad X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2020 10:49:02.4889 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT207 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 04DAnBuo010210 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Wed, 13 May 2020 06:51:05 -0400 Cc: Zhenyu Zheng X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Introduce getHost support for ARM CPU driver. First add some data about commonly used ARM CPU models, and their vendors into cpu_map, then added some helper methods as callbacks to load them. Read and parse vendor_id, part_id and CPU flags of local CPU from corresponding registers. Signed-off-by: Zhenyu Zheng Zhenyu Zheng (4): cpu: Introduce virCPUarmData and related struts cpu: Add helper functions to parse vendor and model cpu: Introduce getHost support for ARM CPU driver cpu_map: Introduce ARM cpu models src/cpu/Makefile.inc.am | 1 + src/cpu/cpu.h | 2 + src/cpu/cpu_arm.c | 399 +++++++++++++++++++++++++++++- src/cpu/cpu_arm_data.h | 32 +++ src/cpu_map/Makefile.inc.am | 7 + src/cpu_map/arm_Falkor.xml | 6 + src/cpu_map/arm_Kunpeng-920.xml | 6 + src/cpu_map/arm_ThunderX299xx.xml | 6 + src/cpu_map/arm_cortex-a53.xml | 6 + src/cpu_map/arm_cortex-a57.xml | 6 + src/cpu_map/arm_cortex-a72.xml | 6 + src/cpu_map/arm_vendors.xml | 14 ++ src/cpu_map/index.xml | 15 ++ 13 files changed, 505 insertions(+), 1 deletion(-) create mode 100644 src/cpu/cpu_arm_data.h create mode 100644 src/cpu_map/arm_Falkor.xml create mode 100644 src/cpu_map/arm_Kunpeng-920.xml create mode 100644 src/cpu_map/arm_ThunderX299xx.xml create mode 100644 src/cpu_map/arm_cortex-a53.xml create mode 100644 src/cpu_map/arm_cortex-a57.xml create mode 100644 src/cpu_map/arm_cortex-a72.xml create mode 100644 src/cpu_map/arm_vendors.xml -- 2.20.1 Reviewed-by: Jiri Denemark