Misc patches
Hi Richard!
The following changes since commit 1fba9dc71a170b3a05b9d3272dd8ecfe7f26e215:
Merge tag 'pull-request-2022-05-04' of https://gitlab.com/thuth/qemu into staging (2022-05-04 08:07:02 -0700)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-05-06
for you to fetch changes up to 0660402182ef9158e32420206f107a6798582141:
Warn user if the vga flag is passed but no vga device is created (2022-05-06 13:09:55 +0200)
----------------------------------------------------------------
* Remove redundant/obsolete x86 and arm disassemblers (Capstone is better)
* Limit some Xen-related code to builds where Xen is really available
* Remove hxtool-conv.pl
* Update MinGW and OpenBSD to a more recent version in the CI
* Warn user if the -vga flag is passed but no vga device is created
----------------------------------------------------------------
Brad Smith (1):
tests/vm: update openbsd to release 7.1
Gautam Agrawal (1):
Warn user if the vga flag is passed but no vga device is created
Thomas Huth (4):
disas: Remove old libopcode arm disassembler
disas: Remove old libopcode i386 disassembler softmmu/vl: Fence 'xenfb' if Xen support is not compiled in
qemu-options: Limit the -xen options to x86 and arm
Yonggang Luo (3):
doc: remove hxtool-conv.pl
cirrus/win32: upgrade mingw base packages
gitlab-ci: Upgrade mingw base package.
include/disas/dis-asm.h | 2 - include/sysemu/sysemu.h | 1 + disas.c | 3 - disas/arm.c | 4012 --------------------------- disas/i386.c | 6771 --------------------------------------------- hw/hppa/machine.c | 1 + hw/isa/isa-bus.c | 1 + hw/mips/fuloong2e.c | 1 + hw/pci/pci.c | 1 + hw/ppc/spapr.c | 1 + hw/sparc/sun4m.c | 2 + hw/sparc64/sun4u.c | 1 + hw/xenpv/xen_machine_pv.c | 1 + softmmu/globals.c | 1 + softmmu/vl.c | 8 + target/arm/cpu.c | 8 - target/i386/cpu.c | 1 - .cirrus.yml | 2 +- .gitlab-ci.d/windows.yml | 2 +- MAINTAINERS | 4 - disas/meson.build | 2 - qemu-options.hx | 7 +- scripts/hxtool-conv.pl | 137 - tests/vm/openbsd | 4 +- 24 files changed, 27 insertions(+), 10947 deletions(-) delete mode 100644 disas/arm.c delete mode 100644 disas/i386.c delete mode 100755 scripts/hxtool-conv.pl
[PULL 3/9] softmmu/vl: Fence 'xenfb' if Xen support is not compiled in
The 'xenfb' parameter for the '-vga' command line option is currently always enabled unconditionally (since the xenfb is not a proper QOM device that could be tested via its class name). That means it also shows up if Xen is not enabled at all, e.g. like this:
$ ./qemu-system-sparc -vga help none no graphic card xenfb Xen paravirtualized framebuffer tcx TCX framebuffer (default) cg3 CG3 framebuffer
Let's avoid this situation by fencing the parameter with the CONFIG_XEN_BACKEND switch.
Message-Id: <[email protected]>
--- softmmu/vl.c | 2 ++ 1 file changed, 2 insertions(+)
softmmu/vl.c +2 -0
@@ -934,10 +934,12 @@ static const VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = { .name = "CG3 framebuffer", .class_names = { "cgthree" }, }, +#ifdef CONFIG_XEN_BACKEND [VGA_XENFB] = { .opt_name = "xenfb", .name = "Xen paravirtualized framebuffer", }, +#endif };static bool vga_interface_available (VGAInterfaceType t)
Signature · 1 line
2.27.0
[PULL 9/9] Warn user if the vga flag is passed but no vga device is created
In reply to Thomas HuthFrom: Gautam Agrawal <[email protected]>
A global boolean variable "vga_interface_created"(declared in softmmu/globals.c) has been used to track the creation of vga interface. If the vga flag is passed in the command line "default_vga"(declared in softmmu/vl.c) variable is set to 0. To warn user, the condition checks if vga_interface_created is false and default_vga is equal to 0. If "-vga none" is passed, this patch will not warn the user regarding the creation of VGA device.
The warning "A -vga option was passed but this
machine type does not use that option; no VGA device has been created" is logged if vga flag is passed but no vga device is created.
This patch has been tested for x86_64, i386, sparc, sparc64 and arm boards.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/581
Message-Id: <[email protected]>
--- include/sysemu/sysemu.h | 1 + hw/hppa/machine.c | 1 + hw/isa/isa-bus.c | 1 + hw/mips/fuloong2e.c | 1 + hw/pci/pci.c | 1 + hw/ppc/spapr.c | 1 + hw/sparc/sun4m.c | 2 ++ hw/sparc64/sun4u.c | 1 + hw/xenpv/xen_machine_pv.c | 1 + softmmu/globals.c | 1 + softmmu/vl.c | 6 ++++++ 11 files changed, 17 insertions(+)
include/sysemu/sysemu.h +1 -0
@@ -34,6 +34,7 @@ typedef enum { } VGAInterfaceType;extern int vga_interface_type; +extern bool vga_interface_created;extern int graphic_width;extern int graphic_height;
hw/hppa/machine.c +1 -0
@@ -192,6 +192,7 @@ static void machine_hppa_init(MachineState *machine)/* Graphics setup. */ if (machine->enable_graphics && vga_interface_type !=VGA_NONE ) { + vga_interface_created = true; dev =qdev_new ("artist" ); s =SYS_BUS_DEVICE (dev);sysbus_realize_and_unref (s, &error_fatal);
hw/isa/isa-bus.c +1 -0
@@ -166,6 +166,7 @@ bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp)ISADevice *isa_vga_init (ISABus *bus) { + vga_interface_created = true;switch (vga_interface_type) {case VGA_CIRRUS :return isa_create_simple (bus,"isa-cirrus-vga" );
hw/mips/fuloong2e.c +1 -0
@@ -320,6 +320,7 @@ static void mips_fuloong2e_init(MachineState *machine)/* GPU */ if (vga_interface_type !=VGA_NONE ) { + vga_interface_created = true; pci_dev =pci_new (-1 ,"ati-vga" ); dev =DEVICE (pci_dev);qdev_prop_set_uint32 (dev,"vgamem_mb" ,16 );
hw/pci/pci.c +1 -0
@@ -2037,6 +2037,7 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,PCIDevice *pci_vga_init (PCIBus *bus) { + vga_interface_created = true;switch (vga_interface_type) {case VGA_CIRRUS :return pci_create_simple (bus,-1 ,"cirrus-vga" );
hw/ppc/spapr.c +1 -0
@@ -1742,6 +1742,7 @@ static void spapr_rtc_create(SpaprMachineState *spapr)/* Returns whether we want to use VGA or not */ static bool spapr_vga_init (PCIBus *pci_bus,Error **errp) { + vga_interface_created = true;switch (vga_interface_type) {case VGA_NONE :return false;
hw/sparc/sun4m.c +2 -0
@@ -920,6 +920,7 @@ static void sun4m_hw_init(MachineState *machine)/* sbus irq 5 */ cg3_init (hwdef->tcx_base, slavio_irq[11 ],0x00100000 , graphic_width, graphic_height, graphic_depth); + vga_interface_created = true; }else {/* If no display specified, default to TCX */ if (graphic_depth !=8 && graphic_depth !=24 ) {
@@ -935,6 +936,7 @@ static void sun4m_hw_init(MachineState *machine)tcx_init (hwdef->tcx_base, slavio_irq[11 ],0x00100000 , graphic_width, graphic_height, graphic_depth); + vga_interface_created = true; } }
hw/sparc64/sun4u.c +1 -0
@@ -632,6 +632,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,switch (vga_interface_type) {case VGA_STD :pci_create_simple (pci_busA,PCI_DEVFN (2 ,0 ),"VGA" ); + vga_interface_created = true;break ;case VGA_NONE :break ;
hw/xenpv/xen_machine_pv.c +1 -0
@@ -63,6 +63,7 @@ static void xen_init_pv(MachineState *machine)if (vga_interface_type ==VGA_XENFB ) {xen_config_dev_vfb (0 ,"vnc" );xen_config_dev_vkbd (0 ); + vga_interface_created = true; }/* configure disks */
softmmu/globals.c +1 -0
@@ -40,6 +40,7 @@ int nb_nics;NICInfo nd_table[MAX_NICS ];int autostart =1 ;int vga_interface_type =VGA_NONE ; +bool vga_interface_created;Chardev *parallel_hds[MAX_PARALLEL_PORTS ];int win2k_install_hack;int singlestep;
softmmu/vl.c +6 -0
@@ -2736,6 +2736,12 @@ static void qemu_machine_creation_done(void)if (foreach_device_config (DEV_GDB , gdbserver_start) <0 ) {exit (1 ); } +if (!vga_interface_created && !default_vga && + vga_interface_type !=VGA_NONE ) { +warn_report ("A -vga option was passed but this machine " +"type does not use that option; " +"No VGA device has been created" ); + } }void qmp_x_exit_preconfig (Error **errp)
Signature · 1 line
2.27.0
[PULL 1/9] disas: Remove old libopcode arm disassembler
In reply to Thomas HuthCapstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays.
Message-Id: <[email protected]>
--- include/disas/dis-asm.h | 1 - disas.c | 1 - disas/arm.c | 4012 --------------------------------------- target/arm/cpu.c | 8 - MAINTAINERS | 2 - disas/meson.build | 1 - 6 files changed, 4025 deletions(-) delete mode 100644 disas/arm.c
include/disas/dis-asm.h +0 -1
@@ -429,7 +429,6 @@ int print_insn_h8500 (bfd_vma, disassemble_info*);int print_insn_arm_a64 (bfd_vma ,disassemble_info *);int print_insn_alpha (bfd_vma ,disassemble_info *);disassembler_ftype arc_get_disassembler (int ,int ); -int print_insn_arm (bfd_vma ,disassemble_info *);int print_insn_sparc (bfd_vma ,disassemble_info *);int print_insn_big_a29k (bfd_vma ,disassemble_info *);int print_insn_little_a29k (bfd_vma ,disassemble_info *);
disas.c +0 -1
@@ -192,7 +192,6 @@ static void initialize_debug_host(CPUDebug *s) s->info.mach = bfd_mach_sparc_v9b;#elif defined(__arm__)/* TCG only generates code for arm mode. */ - s->info.print_insn = print_insn_arm; s->info.cap_arch =CS_ARCH_ARM ;#elif defined(__MIPSEB__) s->info.print_insn = print_insn_big_mips;
disas/arm.c deleted +0 -4012
2,986 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.27.0
Part of the diff is not shown here. View the raw message.
[PULL 4/9] qemu-options: Limit the -xen options to x86 and arm
In reply to Thomas HuthThe Xen hypervisor is only available on x86 and arm - thus let's limit the related options to these targets.
Message-Id: <[email protected]>
--- qemu-options.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
qemu-options.hx +4 -3
@@ -4186,16 +4186,17 @@ SRST ERST DEF("xen-domid", HAS_ARG, QEMU_OPTION_xen_domid, - "-xen-domid id specify xen guest domain id\n", QEMU_ARCH_ALL) + "-xen-domid id specify xen guest domain id\n", + QEMU_ARCH_ARM | QEMU_ARCH_I386) DEF("xen-attach", 0, QEMU_OPTION_xen_attach, "-xen-attach attach to existing xen domain\n" " libxl will use this when starting QEMU\n", - QEMU_ARCH_ALL) + QEMU_ARCH_ARM | QEMU_ARCH_I386) DEF("xen-domid-restrict", 0, QEMU_OPTION_xen_domid_restrict, "-xen-domid-restrict restrict set of available xen operations\n" " to specified domain id. (Does not affect\n" " xenpv machine type).\n", - QEMU_ARCH_ALL) + QEMU_ARCH_ARM | QEMU_ARCH_I386) SRST ``-xen-domid id`` Specify xen guest domain id (XEN only).
Signature · 1 line
2.27.0
[PULL 2/9] disas: Remove old libopcode i386 disassembler
In reply to Thomas HuthCapstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays.
Message-Id: <[email protected]>
--- include/disas/dis-asm.h | 1 - disas.c | 2 - disas/i386.c | 6771 --------------------------------------- target/i386/cpu.c | 1 - MAINTAINERS | 2 - disas/meson.build | 1 - 6 files changed, 6778 deletions(-) delete mode 100644 disas/i386.c
include/disas/dis-asm.h +0 -1
@@ -418,7 +418,6 @@ int print_insn_tci(bfd_vma, disassemble_info*);int print_insn_big_mips (bfd_vma ,disassemble_info *);int print_insn_little_mips (bfd_vma ,disassemble_info *);int print_insn_nanomips (bfd_vma ,disassemble_info *); -int print_insn_i386 (bfd_vma ,disassemble_info *);int print_insn_m68k (bfd_vma ,disassemble_info *);int print_insn_z8001 (bfd_vma ,disassemble_info *);int print_insn_z8002 (bfd_vma ,disassemble_info *);
disas.c +0 -2
@@ -153,14 +153,12 @@ static void initialize_debug_host(CPUDebug *s) s->info.print_insn = print_insn_tci;#elif defined(__i386__) s->info.mach = bfd_mach_i386_i386; - s->info.print_insn = print_insn_i386; s->info.cap_arch =CS_ARCH_X86 ; s->info.cap_mode =CS_MODE_32 ; s->info.cap_insn_unit =1 ; s->info.cap_insn_split =8 ;#elif defined(__x86_64__) s->info.mach = bfd_mach_x86_64; - s->info.print_insn = print_insn_i386; s->info.cap_arch =CS_ARCH_X86 ; s->info.cap_mode =CS_MODE_64 ; s->info.cap_insn_unit =1 ;
disas/i386.c deleted +0 -6771
2,979 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.27.0
Part of the diff is not shown here. View the raw message.
[PULL 8/9] tests/vm: update openbsd to release 7.1
In reply to Thomas HuthFrom: Brad Smith <[email protected]>
tests/vm/openbsd: Update to release 7.1
Message-Id: <[email protected]>
--- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/vm/openbsd +2 -2
@@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" - link = "https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso" - csum = "1882f9a23c9800e5dba3dbd2cf0126f552605c915433ef4c5bb672610a4ca3a4" + link = "https://cdn.openbsd.org/pub/OpenBSD/7.1/amd64/install71.iso" + csum = "d3a7c5b9bf890bc404304a1c96f9ee72e1d9bbcf9cc849c1133bdb0d67843396" size = "20G" pkgs = [ # tools
Signature · 1 line
2.27.0
[PULL 6/9] cirrus/win32: upgrade mingw base packages
In reply to Thomas HuthFrom: Yonggang Luo <[email protected]>
Message-Id: <[email protected]>
--- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.cirrus.yml +1 -1
@@ -12,7 +12,7 @@ windows_msys2_task: CIRRUS_SHELL: powershell MSYS: winsymlinks:nativestrict MSYSTEM: MINGW64 - MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2021-04-19/msys2-base-x86_64-20210419.sfx.exe + MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2022-05-03/msys2-base-x86_64-20220503.sfx.exe MSYS2_FINGERPRINT: 0 MSYS2_PACKAGES: " diffutils git grep make pkg-config sed
Signature · 1 line
2.27.0
[PULL 5/9] doc: remove hxtool-conv.pl
In reply to Thomas HuthFrom: Yonggang Luo <[email protected]>
This script doesn't need anymore as all texi are already convert to rST
Message-Id: <[email protected]>
--- scripts/hxtool-conv.pl | 137 ----------------------------------------- 1 file changed, 137 deletions(-) delete mode 100755 scripts/hxtool-conv.pl
scripts/hxtool-conv.pl deleted +0 -137
@@ -1,137 +0,0 @@ -#!/usr/bin/perl -w -# -# Script to convert .hx file STEXI/ETEXI blocks to SRST/ERST -# -# Copyright (C) 2020 Linaro -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# (at your option) any later version. See the COPYING file in the -# top-level directory. - -# This script was only ever intended as a one-off conversion operation. -# Please excuse the places where it is a bit hacky. -# Some manual intervention after the conversion is expected, as are -# some warnings from makeinfo. -# Warning: this script is not idempotent: don't try to run it on -# a .hx file that already has SRST/ERST sections. - -# Expected usage: -# scripts/hxtool-conv.pl file.hx > file.hx.new - -use utf8; - -my $reading_texi = 0; -my $texiblock = ''; -my @tables = (); - -sub update_tables($) { - my ($texi) = @_; - # Update our list of open table directives: every @table - # line in the texi fragment is added to the list, and every - # @end table line means we remove an entry from the list. - # If this fragment had a completely self contained table with - # both the @table and @end table lines, this will be a no-op. - foreach (split(/\n/, $texi)) { - push @tables, $_ if /^\@table/; - pop @tables if /^\@end table/; - } -} - -sub only_table_directives($) { - # Return true if every line in the fragment is a start or end table directive - my ($texi) = @_; - foreach (split(/\n/, $texi)) { - return 0 unless /^\@table/ or /^\@end table/; - } - return 1; -} - -sub output_rstblock($) { - # Write the output to /tmp/frag.texi, wrapped in whatever current @table - # lines we need. - my ($texi) = @_; - - # As a special case, if this fragment is only table directives and - # nothing else, update our set of open table directives but otherwise - # ignore it. This avoids emitting an empty SRST/ERST block. - if (only_table_directives($texi)) { - update_tables($texi); - return; - } - - open(my $fragfh, '>', '/tmp/frag.texi'); - # First output the currently active set of open table directives - print $fragfh join("\n", @tables); - # Next, update our list of open table directives. - # We need to do this before we emit the closing table directives - # so that we emit the right number if this fragment had an - # unbalanced set of directives. - update_tables($texi); - # Then emit the texi fragment itself. - print $fragfh "\n$texi\n"; - # Finally, add the necessary closing table directives. - print $fragfh "\@end table\n" x scalar @tables; - close $fragfh; - - # Now invoke makeinfo/pandoc on it and slurp the results into a string - open(my $fh, '-|', "makeinfo --force -o - --docbook " - . "-D 'qemu_system_x86 QEMU_SYSTEM_X86_MACRO' " - . "-D 'qemu_system QEMU_SYSTEM_MACRO' /tmp/frag.texi " - . " | pandoc -f docbook -t rst") - or die "can't start makeinfo/pandoc: $!"; - - binmode $fh, ':encoding(utf8)'; - - print "SRST\n"; - - # Slurp the whole thing into a string so we can do multiline - # string matches on it. - my $rst = do { - local $/ = undef; - <$fh>; - }; - $rst =~ s/^- − /- /gm; - $rst =~ s/“/"/gm; - $rst =~ s/”/"/gm; - $rst =~ s/‘/'/gm; - $rst =~ s/’/'/gm; - $rst =~ s/QEMU_SYSTEM_MACRO/|qemu_system|/g; - $rst =~ s/QEMU_SYSTEM_X86_MACRO/|qemu_system_x86|/g; - $rst =~ s/(?=::\n\n +\|qemu)/.. parsed-literal/g; - $rst =~ s/:\n\n::$/::/gm; - - # Fix up the invalid reference format makeinfo/pandoc emit: - # `Some string here <#anchorname>`__ - # should be: - # :ref:`anchorname` - $rst =~ s/\`[^<`]+\<\#([^>]+)\>\`__/:ref:`$1`/gm; - print $rst; - - close $fh or die "error on close: $!"; - print "ERST\n"; -} - -# Read the whole .hx input file. -while (<>) { - # Always print the current line - print; - if (/STEXI/) { - $reading_texi = 1; - $texiblock = ''; - next; - } - if (/ETEXI/) { - $reading_texi = 0; - # dump RST version of block - output_rstblock($texiblock); - next; - } - if ($reading_texi) { - # Accumulate the texi into a string - # but drop findex entries as they will confuse makeinfo - next if /^\@findex/; - $texiblock .= $_; - } -} - -die "Unexpectedly still in texi block at EOF" if $reading_texi;
Signature · 1 line
2.27.0
[PULL 7/9] gitlab-ci: Upgrade mingw base package.
In reply to Thomas HuthFrom: Yonggang Luo <[email protected]>
Message-Id: <[email protected]>
--- .gitlab-ci.d/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/windows.yml +1 -1
@@ -16,7 +16,7 @@ } - If ( !(Test-Path -Path msys64\var\cache\msys2.exe ) ) { Invoke-WebRequest - "https://github.com/msys2/msys2-installer/releases/download/2021-07-25/msys2-base-x86_64-20210725.sfx.exe" + "https://github.com/msys2/msys2-installer/releases/download/2022-05-03/msys2-base-x86_64-20220503.sfx.exe" -outfile "msys64\var\cache\msys2.exe" } - msys64\var\cache\msys2.exe -y
Signature · 1 line
2.27.0
Quoted 13 lines · Thomas Huth
Hi Richard!
The following changes since commit
1fba9dc71a170b3a05b9d3272dd8ecfe7f26e215:Merge tag 'pull-request-2022-05-04' of https://gitlab.com/thuth/qemu into staging (2022-05-04 08:07:02 -0700)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-05-06
for you to fetch changes up to
0660402182ef9158e32420206f107a6798582141:
Quoted 9 lines
Warn user if the vga flag is passed but no vga device is created (2022-05-06 13:09:55 +0200)
----------------------------------------------------------------
* Remove redundant/obsolete x86 and arm disassemblers (Capstone is better)
* Limit some Xen-related code to builds where Xen is really available
* Remove hxtool-conv.pl
* Update MinGW and OpenBSD to a more recent version in the CI
* Warn user if the -vga flag is passed but no vga device is created
I think Paolo mentioned an issue with the -vga patch here -- might want to hold off on that one until he's had a chance to reply.
thanks
-- PMM
Quoted 11 lines · Peter Maydell
Quoted 7 lines · Thomas Huth
----------------------------------------------------------------
* Remove redundant/obsolete x86 and arm disassemblers (Capstone is better)
* Limit some Xen-related code to builds where Xen is really available
* Remove hxtool-conv.pl
* Update MinGW and OpenBSD to a more recent version in the CI
* Warn user if the -vga flag is passed but no vga device is createdI think Paolo mentioned an issue with the -vga patch here -- might want to hold off on that one until he's had a chance to reply.
Ok. I didn't see this before I pushed to staging, but I won't push to master until I hear from Paolo.
r~
Quoted 10 lines · Richard Henderson
Quoted 9 lines · Peter Maydell
Quoted 7 lines · Thomas Huth
----------------------------------------------------------------
* Remove redundant/obsolete x86 and arm disassemblers (Capstone is better)
* Limit some Xen-related code to builds where Xen is really available
* Remove hxtool-conv.pl
* Update MinGW and OpenBSD to a more recent version in the CI
* Warn user if the -vga flag is passed but no vga device is created
Quoted 4 lines
Quoted 2 lines
I think Paolo mentioned an issue with the -vga patch here -- might want to hold off on that one until he's had a chance to reply.
Ok. I didn't see this before I pushed to staging, but I won't push to master until I hear from Paolo.
As mentioned in the other mail thread, Paolo was right. I'll respin the pull request with the fix included.
Thomas