@@ -746,6 +746,13 @@ static void smp_parse(MachineState *ms, QemuOpts *opts)
unsigned sockets = qemu_opt_get_number(opts, "sockets", 0);
unsigned cores = qemu_opt_get_number(opts, "cores", 0);
unsigned threads = qemu_opt_get_number(opts, "threads", 0);
+ bool expose = qemu_opt_get_bool(opts, "expose", false);
+
+ if (expose) {
+ error_report("expose=on: exposing cpu topology to the guest"
+ "is not supported yet");
+ exit(1);
+ }
/* compute missing values, prefer sockets over cores over threads */
if (cpus == 0 || sockets == 0) {
@@ -720,6 +720,13 @@ void pc_smp_parse(MachineState *ms, QemuOpts *opts)
unsigned dies = qemu_opt_get_number(opts, "dies", 1);
unsigned cores = qemu_opt_get_number(opts, "cores", 0);
unsigned threads = qemu_opt_get_number(opts, "threads", 0);
+ bool expose = qemu_opt_get_bool(opts, "expose", false);
+
+ if (expose) {
+ error_report("expose=on: exposing cpu topology to the guest"
+ "is not supported yet");
+ exit(1);
+ }
/* compute missing values, prefer sockets over cores over threads */
if (cpus == 0 || sockets == 0) {
Currently, support for exposure of cpu topology to the guest is only introduced for ARM machines and we also have an ARM specific parsing function virt_smp_parse(), so we disallow the "-smp expose=on" configuration for the other platforms. Signed-off-by: Yanan Wang <wangyanan55@huawei.com> --- hw/core/machine.c | 7 +++++++ hw/i386/pc.c | 7 +++++++ 2 files changed, 14 insertions(+)