[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v4 09/17] xen/arm: introduce a helper to parse device tree NUMA distance map
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Wed, 26 Apr 2023 08:29:08 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=82jgf7C7W97Gi1/0L70fqkFNer9/ST18TiwAoFIhZHA=; b=f+RVOkmQ2Z6L5APU0ltvZ9lXprhN+wgfrp8qymE6VaZzKlr/k1nth0/JbKbcXuIbfrCojurdzYaIdPSOyqz9S3JN/7mMvzAx0URQoH8qVFZE5sK01Fz95VidTBLqRB13OI+klvHSst/G1VBEe8FTLgxCUaeI9TF84q1ml82VXau9yrplaQm2VAYpKgQe6VNkOgRGwd1h+fQh9R919AmGjQRDgS6zwAispNnWsqjxBTA5SDqum6RAW+9cAUJ7gANAEHTK5+odLtLJdUdeY3scK0Z6lgqW7jKRzOEVtEeXMENjok4oflHYaUQExjqRe5kk5NLl/yH8LjsUcp1wh5j5xg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OE8u2obypfE/r8UjKsD7h6MSQV28MpgHoXXzJTOclDvhi79yaY92vGXjUhzDhkqE6pqn3KwzfqOOREYadEjPvke2XSQwLkzsePvhsefnUexuENUK0rJKpSm4PVg0tRPw/U/dSpmX/ujNTcX0mZaJBMnwJgPGop8S8qmEW/HBp82vZebLMMugYOfqG4+zSsGFCUMSXyoXDJ3SAw+XcMxoWxDQXrtFynn0dJT51Xd21cGmCIQWZit/TFUHoXHJ08KO0fN7HRQYluxPMq0z0NhlpqRVvN6Yt/Br7gJdA3ObFHs6IZENfgYVW/+BhCrlUB2/SZyMAVG5Cg9Fqbjf4To2RQ==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 26 Apr 2023 08:30:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZd0ulMpqFICe/LUiDVq6+aDsW9687tFqAgAFSIKCAACZ1gIAABguQgAAM+YCAAAMWUA==
- Thread-topic: [PATCH v4 09/17] xen/arm: introduce a helper to parse device tree NUMA distance map
Hi Jan,
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Subject: Re: [PATCH v4 09/17] xen/arm: introduce a helper to parse device
> tree NUMA distance map
>
> > Great points! Thanks for pointing the 8-bit truncation out. You are correct.
> > Somehow my impression of numa_set_distance()'s first two arguments are
> > already "unsigned int" so I missed this part...Sorry.
> >
> > In that case, I think I will add a check between "from, to" and
> MAX_NUMNODES
> > as soon as the values of "from" and "to" are populated by dt_next_cell().
> > Hopefully this will address your concern.
>
> While this would address by concern, I don't see why you want to repeat
> the checking that numa_set_distance() already does.
Correct, I think I would better to move the check in numa_set_distance() to
the caller fdt_parse_numa_distance_map_v1() as I believe if the truncation
really happens it is too late to check in numa_set_distance().
Kind regards,
Henry
>
> Jan
|