From nobody Thu Mar 28 21:25:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1631570493000872.4383502734836; Mon, 13 Sep 2021 15:01:33 -0700 (PDT) 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-194-0HcWKoJlNvGrfOPWp67eQQ-1; Mon, 13 Sep 2021 18:01:29 -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 7B3FA5074B; Mon, 13 Sep 2021 22:01:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 288D918A8F; Mon, 13 Sep 2021 22:01:23 +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 A7F5D1800B9E; Mon, 13 Sep 2021 22:01:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18DM1JfZ027736 for ; Mon, 13 Sep 2021 18:01:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 533291006F93; Mon, 13 Sep 2021 22:01:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E10B11342E2 for ; Mon, 13 Sep 2021 22:01:16 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7140091C7C8 for ; Mon, 13 Sep 2021 22:01:16 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-EvPQnJuvOZ6WBGwxSQkrIQ-1; Mon, 13 Sep 2021 18:01:14 -0400 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03lp2057.outbound.protection.outlook.com [104.47.9.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-31-Cyw__3e8No6jrf82OniX6A-1; Tue, 14 Sep 2021 00:01:12 +0200 Received: from AM8PR04MB7970.eurprd04.prod.outlook.com (2603:10a6:20b:24f::9) by AM8PR04MB7203.eurprd04.prod.outlook.com (2603:10a6:20b:1d5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 22:01:11 +0000 Received: from AM8PR04MB7970.eurprd04.prod.outlook.com ([fe80::283c:d53f:95d5:9377]) by AM8PR04MB7970.eurprd04.prod.outlook.com ([fe80::283c:d53f:95d5:9377%8]) with mapi id 15.20.4500.019; Mon, 13 Sep 2021 22:01:11 +0000 Received: from localhost (192.225.185.198) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Mon, 13 Sep 2021 22:01:10 +0000 X-MC-Unique: 0HcWKoJlNvGrfOPWp67eQQ-1 X-MC-Unique: EvPQnJuvOZ6WBGwxSQkrIQ-1 X-MC-Unique: Cyw__3e8No6jrf82OniX6A-1 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH] libxl: Improve reporting of die_id in capabilities Date: Mon, 13 Sep 2021 16:01:07 -0600 Message-ID: <20210913220107.27104-1-jfehlig@suse.com> X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To AM8PR04MB7970.eurprd04.prod.outlook.com (2603:10a6:20b:24f::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d61b8457-5c5a-49ae-2d80-08d97701ff49 X-MS-TrafficTypeDiagnostic: AM8PR04MB7203: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: eZ61qqQzS8XBX5mjIyzCYyQI9y8dln/jbdce01dAOKqMwIu7Mxq+wOUivd82svr3+WmWLxie0rn385pxPH/2b0cmBbZlG6vLLJUD9NRqHmbPIpRIjBbXoAQu/R45Z6c/BzLwTv6azPlUpTxYjfOkV4ZiepTS124ZsEABKkfF+/pMrqk5jWckESCRKSZJ1aSPBlJM+MSINjNu6h2ztTBecErMiYskbyB5Q7BdotIXWSBJ2+g2Cbbk2XJVTR1OtevkcshU4emM6uaeBWAu1+65LgsDa/+efwZPg6wOPCIpILZJJD7FSGDuOKCqdV9ISRwpoL4cuE9OcFlyNFiYNjeJvH45icO7gC8+8E5Tyx/fcVe12Dp/ZfT83KvzKjpWLmBWR/ap2lvKMm67TB1KrHxNdsLxKPC3fG3s3s7CRwtDGHhdiGlRMuikPHKy5SEjZTLSxtXHl5NQ5k8aincWcyEw5SprsTr8tlsjJZLRjfzViLQkR33nRhjBGD5RGocd619BYQzzfsG/Q/S5syBezdDY03tCMihz1O8fjCUagTB/wgE/cXfJqES5lDtB2cS0M87xmTVzRUYfq927umgOFMPY4ihkL/djRtGsp03RAN+EaPYalYdDTD7TURqYEAjzzVIG+1mBkA5+JInrURgLhFgt2g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR04MB7970.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(396003)(346002)(136003)(39860400002)(376002)(6486002)(66556008)(66476007)(66946007)(1076003)(6916009)(316002)(6496006)(86362001)(186003)(26005)(83380400001)(36756003)(38100700002)(6666004)(8936002)(956004)(2616005)(2906002)(478600001)(8676002)(5660300002); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?JGVyHmp1Ee9u3Xo3bp+yJlDOFR6AUWwDb1ob6pRQlljWIbN9POL3MCzXIaaM?= =?us-ascii?Q?1o6y/M406H/RvmF2Aojn3xC32UaopS6QmifDQzaZkXMRSF1vVOxSpAD/Pzli?= =?us-ascii?Q?Aam07Jm5zrv4zJ/euXRvFtE6ChjYV3l3OfbNGCJ1BGrq8YJ2YbfWck6fG1iP?= =?us-ascii?Q?/IiLC2mShhqvq449NpB33OmUuJUmwVcST4lyT/EjngJK2hhA+3r1E7botMZt?= =?us-ascii?Q?4yqrHYMuEUMDBw5PHhbGRgLFOE/1Kk+p8PEhATvr0kO/2ABgp1Gs+VuDX8v/?= =?us-ascii?Q?k8xvUDcAnWF7KnOkuxKScr1l7JUswXB7V078yf8+/9Rvc57oclbilDjjE+1N?= =?us-ascii?Q?+fsOXJYgqyK6J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w7bAL4?= =?us-ascii?Q?ix2gBKbyHCBeQxXP3P4+S9sxbVVic2MBoU9ancvMftzbr0vLJRjTEekvs1ZM?= =?us-ascii?Q?wi/Pa3KL3GDlxN0ElfsZsgCN?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d61b8457-5c5a-49ae-2d80-08d97701ff49 X-MS-Exchange-CrossTenant-AuthSource: AM8PR04MB7970.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 22:01:11.1931 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AGyrb96Za3blIHRlXrv2OtGXyScjmhZNAgzq+qksjOQVRpoiL4oiXcc7HgzPQ2kWBP+AgLVunJvJuRQklyQVsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7203 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 18DM1JfZ027736 X-loop: libvir-list@redhat.com 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1631570494360100001 Content-Type: text/plain; charset="utf-8" On Xen, libvirt runs in a VM (typically dom0) and does not have an accurate picture of numa and cpu topology of the underlying physical machine using the "usual" mechanisms. numa info and cpu toplogy are retrieved from libxl and used to populate the libvirt conterparts. Commit 7b79ee2f78b introduced support for reporting die_id in capabilities, but did not account for special handling of numa and cpu topology in libxl. Currently, Xen does not report die_id in the libxl_cputopology structure. In the meantime, set die_id to 0, which was suggested by the Xen developers and is slightly better than random garbage such as Signed-off-by: Jim Fehlig Reviewed-by: Michal Privoznik --- src/libxl/libxl_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index b4bd1d7e62..4afed71436 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -292,6 +292,8 @@ libxlCapsInitNuma(libxl_ctx *ctx, virCaps *caps) cpus[node][nr_cpus_node[node]-1].id =3D i; cpus[node][nr_cpus_node[node]-1].socket_id =3D cpu_topo[i].socket; cpus[node][nr_cpus_node[node]-1].core_id =3D cpu_topo[i].core; + /* Until Xen reports die_id, 0 is better than random garbage */ + cpus[node][nr_cpus_node[node]-1].die_id =3D 0; /* Allocate the siblings maps. We will be filling them later */ cpus[node][nr_cpus_node[node]-1].siblings =3D virBitmapNew(nr_cpus= ); } --=20 2.33.0