On 6/5/2019 10:40 PM, Igor Mammedov wrote:
On Wed, 8 May 2019 14:17:23 +0800
Tao Xu <[email protected]> wrote:
From: Liu Jingqi <[email protected]>
Add -numa hmat-lb option to provide System Locality Latency and
Bandwidth Information. These memory attributes help to build
System Locality Latency and Bandwidth Information Structure(s)
in ACPI Heterogeneous Memory Attribute Table (HMAT).
Signed-off-by: Liu Jingqi <[email protected]>
Signed-off-by: Tao Xu <[email protected]>
---
...
+##
+{ 'struct': 'NumaHmatLBOptions',
+ 'data': {
+ 'initiator': 'uint16',
+ 'target': 'uint16',
+ 'hierarchy': 'HmatLBMemoryHierarchy',
+ 'data-type': 'HmatLBDataType',
I think union will be better here with data-type used as discriminator,
on top of that you'll be able to drop a bit of error checking above since
QAPI's union will not allow user to mix latency and bandwidth.
Hi Igor,
I have quesion here, the 'hmat-lb' is a member of a union 'NumaOptions',
it seems can' use a union as a member of union.