summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-07-28 14:56:00 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-07-28 14:56:00 +0000
commit548289bf92b2399225d93c288c5664232217a8d3 (patch)
treee2414e631bb73f0702754c7d5353a6a83fc95b7b /usr.sbin
parentf35dd64a422cdf0a867e4dd3f6f25c63f9321a29 (diff)
Delete all CPUs from the primary and add back the number that we want to
keep.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldomctl/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c
index 5cb33a34beb..28025135e46 100644
--- a/usr.sbin/ldomctl/config.c
+++ b/usr.sbin/ldomctl/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.25 2019/07/28 14:51:07 kettenis Exp $ */
+/* $OpenBSD: config.c,v 1.26 2019/07/28 14:55:59 kettenis Exp $ */
/*
* Copyright (c) 2012, 2018 Mark Kettenis
@@ -2817,8 +2817,10 @@ build_config(const char *filename)
primary->endpoint_id = endpoint->channel + 1;
}
- for (i = primary_num_cpus; i < max_cpus; i++)
+ for (i = 0; i < max_cpus; i++)
guest_delete_cpu(primary, i);
+ for (i = 0; i < primary_num_cpus; i++)
+ guest_add_cpu(primary);
guest_delete_memory(primary);
guest_add_memory(primary, -1, primary_memory);