[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/37] numa: Reject configuration if not all node IDs
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 12/37] numa: Reject configuration if not all node IDs are present |
Date: |
Sun, 29 Jun 2014 19:58:44 +0300 |
From: Eduardo Habkost <address@hidden>
We don't support sparse NUMA node IDs yet, so this changes QEMU to
reject configs where not all nodes are present.
Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
numa.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/numa.c b/numa.c
index c254127..2fde740 100644
--- a/numa.c
+++ b/numa.c
@@ -160,9 +160,24 @@ error:
void set_numa_nodes(void)
{
+ int i;
+
+ assert(max_numa_nodeid <= MAX_NODES);
+
+ /* No support for sparse NUMA node IDs yet: */
+ for (i = max_numa_nodeid - 1; i >= 0; i--) {
+ /* Report large node IDs first, to make mistakes easier to spot */
+ if (!numa_info[i].present) {
+ error_report("numa: Node ID missing: %d", i);
+ exit(1);
+ }
+ }
+
+ /* This must be always true if all nodes are present: */
+ assert(nb_numa_nodes == max_numa_nodeid);
+
if (nb_numa_nodes > 0) {
uint64_t numa_total;
- int i;
if (nb_numa_nodes > MAX_NODES) {
nb_numa_nodes = MAX_NODES;
--
MST
- [Qemu-devel] [PULL 03/37] numa: fix comment, (continued)
- [Qemu-devel] [PULL 03/37] numa: fix comment, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 02/37] openrisc: fix comment, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 04/37] pc: Move q35 compat props to PC_COMPAT_*, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 06/37] mc146818rtc: add rtc-reset-reinjection QMP command, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 08/37] pc: make isapc and pc-0.10 to pc-0.13 have 1.7.0 memory layout, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 05/37] pc: Fix "prog_if" typo on PC_COMPAT_2_0, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 07/37] vhost-user: fix wrong ids in documentation, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 09/37] Allow mismatched virtio config-len, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 11/37] numa: Reject duplicate node IDs, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 10/37] numa: Keep track of NUMA nodes present on the command-line, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 12/37] numa: Reject configuration if not all node IDs are present,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 13/37] vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 14/37] vhost-user: typo fixups, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 15/37] virtio-net: byteswap virtio-net header, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 17/37] virtio: introduce device specific migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 16/37] virtio-serial: don't migrate the config space, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 18/37] virtio-net: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 19/37] virtio-blk: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 20/37] virtio-serial: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 21/37] virtio-balloon: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 22/37] virtio-rng: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29