From 3817261eb9e763cb2e71649201c7ec0823858f0c Mon Sep 17 00:00:00 2001 From: Denis Plotnikov Date: Mon, 23 Dec 2019 10:28:56 +0300 Subject: hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35 5.0 machine type uses 4.2 compats. This seems to be incorrect, since the latests machine type by now is 5.0 and it should use its own compat or shouldn't use any relying on the defaults. Seems, like this appeared because of some problems on merge/rebase. Signed-off-by: Denis Plotnikov Reviewed-by: Cornelia Huck Reviewed-by: Igor Mammedov Message-Id: <20191223072856.5369-1-dplotnikov@virtuozzo.com> Signed-off-by: Paolo Bonzini --- hw/i386/pc_piix.c | 1 - hw/i386/pc_q35.c | 1 - 2 files changed, 2 deletions(-) (limited to 'hw/i386') diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 721c7aa64e..fa12203079 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -425,7 +425,6 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m) m->alias = "pc"; m->is_default = 1; pcmc->default_cpu_version = 1; - compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); } DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", NULL, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 52f45735e4..84cf925cf4 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -354,7 +354,6 @@ static void pc_q35_5_0_machine_options(MachineClass *m) pc_q35_machine_options(m); m->alias = "q35"; pcmc->default_cpu_version = 1; - compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); } DEFINE_Q35_MACHINE(v5_0, "pc-q35-5.0", NULL, -- cgit v1.2.3-55-g7522 From 218fc2b5c83948fe75a6de09be14fb8aef09bb10 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Fri, 20 Dec 2019 16:42:25 +0100 Subject: hw/i386/x86-iommu: Add missing stubs In commit 6c730e4af9 we introduced a stub to build the MicroVM machine without Intel IOMMU. This stub is incomplete for the other PC machines. Add the missing stubs. Fixes: 6c730e4af9 ("pc: stubify x86 iommu", 2019-12-17) Reported-by: Travis-CI Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191220154225.25879-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- hw/i386/x86-iommu-stub.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hw/i386') diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c index 03576cdccb..c5ba077f9d 100644 --- a/hw/i386/x86-iommu-stub.c +++ b/hw/i386/x86-iommu-stub.c @@ -32,3 +32,12 @@ X86IOMMUState *x86_iommu_get_default(void) return NULL; } +bool x86_iommu_ir_supported(X86IOMMUState *s) +{ + return false; +} + +IommuType x86_iommu_get_type(void) +{ + abort(); +} -- cgit v1.2.3-55-g7522 From a88c40f02ace88f09b2a85a64831b277b2ebc88c Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 21 Dec 2019 17:21:24 +0100 Subject: hw/i386/pc: fix regression in parsing vga cmdline parameter When the 'vga=' parameter is succeeded by another parameter, QEMU 4.2.0 would refuse to start with a rather cryptic message: $ qemu-system-x86_64 -kernel /boot/vmlinuz-linux -append 'vga=792 quiet' qemu: can't parse 'vga' parameter: Invalid argument It was not clear whether this applied to the '-vga std' parameter or the '-append' one. Fix the parsing regression and clarify the error. Fixes: 133ef074bd ("hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux()") Cc: Sergio Lopez Signed-off-by: Peter Wu Message-Id: <20191221162124.1159291-1-peter@lekensteyn.nl> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- hw/i386/x86.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/i386') diff --git a/hw/i386/x86.c b/hw/i386/x86.c index d8bb5c2a96..9b9a4d5837 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -612,6 +612,7 @@ void x86_load_linux(X86MachineState *x86ms, vmode = strstr(kernel_cmdline, "vga="); if (vmode) { unsigned int video_mode; + const char *end; int ret; /* skip "vga=" */ vmode += 4; @@ -622,10 +623,9 @@ void x86_load_linux(X86MachineState *x86ms, } else if (!strncmp(vmode, "ask", 3)) { video_mode = 0xfffd; } else { - ret = qemu_strtoui(vmode, NULL, 0, &video_mode); - if (ret != 0) { - fprintf(stderr, "qemu: can't parse 'vga' parameter: %s\n", - strerror(-ret)); + ret = qemu_strtoui(vmode, &end, 0, &video_mode); + if (ret != 0 || (*end && *end != ' ')) { + fprintf(stderr, "qemu: invalid 'vga=' kernel parameter.\n"); exit(1); } } -- cgit v1.2.3-55-g7522 From ff2efdcdc1674b31fcad64d668a4da01cd454b82 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Tue, 31 Dec 2019 19:32:05 +0100 Subject: hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config When configured with --without-default-devices, the build fails: LINK x86_64-softmmu/qemu-system-x86_64 /usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init': hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1 make: *** [Makefile:483: x86_64-softmmu/all] Error 2 While the MicroVM machine only uses the ISA serial port when the MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked with it. Replace the 'imply' Kconfig rule by a 'select'. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- hw/i386/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/i386') diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 91cf5843b4..cdc851598c 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -95,7 +95,7 @@ config Q35 config MICROVM bool - imply SERIAL_ISA + select SERIAL_ISA # for serial_hds_isa_init() select ISA_BUS select APIC select IOAPIC -- cgit v1.2.3-55-g7522