mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
test: Add support for thread and core information for the test driver
This patch adds demo processor topology information for the test driver.
This commit is contained in:
parent
79a003f9b0
commit
e3818b2a9f
@ -558,7 +558,16 @@ static int testOpenDefault(virConnectPtr conn) {
|
|||||||
privconn->cells[u].mem = (u + 1) * 2048 * 1024;
|
privconn->cells[u].mem = (u + 1) * 2048 * 1024;
|
||||||
}
|
}
|
||||||
for (u = 0 ; u < 16 ; u++) {
|
for (u = 0 ; u < 16 ; u++) {
|
||||||
privconn->cells[u % 2].cpus[(u / 2)].id = u;
|
virBitmapPtr siblings = virBitmapNew(16);
|
||||||
|
if (!siblings) {
|
||||||
|
virReportOOMError();
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
ignore_value(virBitmapSetBit(siblings, u));
|
||||||
|
privconn->cells[u / 8].cpus[(u % 8)].id = u;
|
||||||
|
privconn->cells[u / 8].cpus[(u % 8)].socket_id = u / 8;
|
||||||
|
privconn->cells[u / 8].cpus[(u % 8)].core_id = u % 8;
|
||||||
|
privconn->cells[u / 8].cpus[(u % 8)].siblings = siblings;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(privconn->caps = testBuildCapabilities(conn)))
|
if (!(privconn->caps = testBuildCapabilities(conn)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user