From 933c8fe7814d481ad19ded7ff0b5b4389e5d3176 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 17 Nov 2020 20:06:40 +0100 Subject: [PATCH 1/7] meson: Fix argument for makensis (build regression) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `make installer` with a DLL directory was broken. Signed-off-by: Stefan Weil Message-Id: <20201117190640.390359-1-sw@weilnetz.de> Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- scripts/nsis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nsis.py b/scripts/nsis.py index e1c409344e..5135a05831 100644 --- a/scripts/nsis.py +++ b/scripts/nsis.py @@ -65,7 +65,7 @@ def main(): dlldir = "w64" makensis += ["-DW64"] if os.path.exists(os.path.join(args.srcdir, "dll")): - makensis += "-DDLLDIR={0}/dll/{1}".format(args.srcdir, dlldir) + makensis += ["-DDLLDIR={0}/dll/{1}".format(args.srcdir, dlldir)] makensis += ["-DOUTFILE=" + args.outfile] + args.nsisargs subprocess.run(makensis) From ac9574bc879c50aecd4abf1d680e146f97d55487 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 17 Nov 2020 20:34:48 +0100 Subject: [PATCH 2/7] docs: Fix some typos (found by codespell) Fix also a similar typo in a code comment. Signed-off-by: Stefan Weil Message-Id: <20201117193448.393472-1-sw@weilnetz.de> Reviewed-by: Michael S. Tsirkin Signed-off-by: Paolo Bonzini --- docs/can.txt | 8 ++++---- docs/interop/vhost-user.rst | 2 +- docs/replay.txt | 2 +- docs/specs/ppc-spapr-numa.rst | 2 +- docs/system/deprecated.rst | 4 ++-- docs/tools/virtiofsd.rst | 2 +- hw/vfio/igd.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/can.txt b/docs/can.txt index 5838f6620c..0d310237df 100644 --- a/docs/can.txt +++ b/docs/can.txt @@ -19,7 +19,7 @@ interface to implement because such device can be easily connected to systems with different CPU architectures (x86, PowerPC, Arm, etc.). In 2020, CTU CAN FD controller model has been added as part -of the bachelor theses of Jan Charvat. This controller is complete +of the bachelor thesis of Jan Charvat. This controller is complete open-source/design/hardware solution. The core designer of the project is Ondrej Ille, the financial support has been provided by CTU, and more companies including Volkswagen subsidiaries. @@ -31,7 +31,7 @@ testing lead to goal change to provide environment which provides complete emulated environment for testing and RTEMS GSoC slot has been donated to work on CAN hardware emulation on QEMU. -Examples how to use CAN emulation for SJA1000 based borads +Examples how to use CAN emulation for SJA1000 based boards ========================================================== When QEMU with CAN PCI support is compiled then one of the next @@ -106,8 +106,8 @@ This open-source core provides CAN FD support. CAN FD drames are delivered even to the host systems when SocketCAN interface is found CAN FD capable. -The PCIe borad emulation is provided for now (the device identifier is -ctucan_pci). The defauld build defines two CTU CAN FD cores +The PCIe board emulation is provided for now (the device identifier is +ctucan_pci). The default build defines two CTU CAN FD cores on the board. Example how to connect the canbus0-bus (virtual wire) to the host diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 6d4025ba6a..d6085f7045 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -530,7 +530,7 @@ descriptor table (split virtqueue) or descriptor ring (packed virtqueue). However, it can't work when we process descriptors out-of-order because some entries which store the information of inflight descriptors in available ring (split virtqueue) or descriptor -ring (packed virtqueue) might be overrided by new entries. To solve +ring (packed virtqueue) might be overridden by new entries. To solve this problem, slave need to allocate an extra buffer to store this information of inflight descriptors and share it with master for persistent. ``VHOST_USER_GET_INFLIGHT_FD`` and diff --git a/docs/replay.txt b/docs/replay.txt index 87a64ae068..5b008ca491 100644 --- a/docs/replay.txt +++ b/docs/replay.txt @@ -328,7 +328,7 @@ between the snapshots. Each of the passes include the following steps: 1. loading the snapshot 2. replaying to examine the breakpoints 3. if breakpoint or watchpoint was met - - loading the snaphot again + - loading the snapshot again - replaying to the required breakpoint 4. else - proceeding to the p.1 with the earlier snapshot diff --git a/docs/specs/ppc-spapr-numa.rst b/docs/specs/ppc-spapr-numa.rst index 5fca2bdd8e..ffa687dc89 100644 --- a/docs/specs/ppc-spapr-numa.rst +++ b/docs/specs/ppc-spapr-numa.rst @@ -198,7 +198,7 @@ This is how it is being done: * user distance 121 and beyond will be interpreted as 160 * user distance 10 stays 10 -The reasoning behind this aproximation is to avoid any round up to the local +The reasoning behind this approximation is to avoid any round up to the local distance (10), keeping it exclusive to the 4th NUMA level (which is still exclusive to the node_id). All other ranges were chosen under the developer discretion of what would be (somewhat) sensible considering the user input. diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index bbaae0d97c..d98464098f 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -473,7 +473,7 @@ default configuration. The CPU model runnability guarantee won't apply anymore to existing CPU models. Management software that needs runnability -guarantees must resolve the CPU model aliases using te +guarantees must resolve the CPU model aliases using the ``alias-of`` field returned by the ``query-cpu-definitions`` QMP command. @@ -660,7 +660,7 @@ Splitting RAM by default between NUMA nodes had the same issues as ``mem`` parameter with the difference that the role of the user plays QEMU using implicit generic or board specific splitting rule. Use ``memdev`` with *memory-backend-ram* backend or ``mem`` (if -it's supported by used machine type) to define mapping explictly instead. +it's supported by used machine type) to define mapping explicitly instead. Users of existing VMs, wishing to preserve the same RAM distribution, should configure it explicitly using ``-numa node,memdev`` options. Current RAM distribution can be retrieved using HMP command ``info numa`` and if separate diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst index 34a9e40146..866b7db3ee 100644 --- a/docs/tools/virtiofsd.rst +++ b/docs/tools/virtiofsd.rst @@ -174,7 +174,7 @@ Using ':' as the separator a rule is of the form: - 'bad' - If a client tries to use a name matching 'key' it's denied using EPERM; when the server passes an attribute name matching 'prepend' it's hidden. In many ways it's use is very like - 'ok' as either an explict terminator or for special handling of certain + 'ok' as either an explicit terminator or for special handling of certain patterns. **key** is a string tested as a prefix on an attribute name originating diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c index 64e332746b..470205f487 100644 --- a/hw/vfio/igd.c +++ b/hw/vfio/igd.c @@ -535,7 +535,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr) } /* - * Assume we have no GMS memory, but allow it to be overrided by device + * Assume we have no GMS memory, but allow it to be overridden by device * option (experimental). The spec doesn't actually allow zero GMS when * when IVD (IGD VGA Disable) is clear, but the claim is that it's unused, * so let's not waste VM memory for it. From dccdb0f82a0d018443b12fb13d91655a10b0a151 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 17 Nov 2020 21:18:34 +0100 Subject: [PATCH 3/7] meson: Fix build with --disable-guest-agent-msi The QGA MSI target requires several macros which are only available without --disable-guest-agent-msi. Don't define that target if configure was called with --disable-guest-agent-msi. Signed-off-by: Stefan Weil Message-Id: <20201117201834.408892-1-sw@weilnetz.de> Signed-off-by: Paolo Bonzini --- qga/meson.build | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/qga/meson.build b/qga/meson.build index 53ba6de5f8..520af6ce9b 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -61,23 +61,25 @@ if targetos == 'windows' if 'CONFIG_QGA_VSS' in config_host and 'QEMU_GA_MSI_WITH_VSS' in config_host deps += qga_vss endif - qga_msi = custom_target('QGA MSI', - input: files('installer/qemu-ga.wxs'), - output: 'qemu-ga-@0@.msi'.format(config_host['ARCH']), - depends: deps, - command: [ - find_program('env'), - 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'], - 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'], - 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'], - 'BUILD_DIR=' + meson.build_root(), - wixl, '-o', '@OUTPUT0@', '@INPUT0@', - config_host['QEMU_GA_MSI_ARCH'].split(), - config_host['QEMU_GA_MSI_WITH_VSS'].split(), - config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(), - ]) - all_qga += [qga_msi] - alias_target('msi', qga_msi) + if 'CONFIG_QGA_MSI' in config_host + qga_msi = custom_target('QGA MSI', + input: files('installer/qemu-ga.wxs'), + output: 'qemu-ga-@0@.msi'.format(config_host['ARCH']), + depends: deps, + command: [ + find_program('env'), + 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'], + 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'], + 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'], + 'BUILD_DIR=' + meson.build_root(), + wixl, '-o', '@OUTPUT0@', '@INPUT0@', + config_host['QEMU_GA_MSI_ARCH'].split(), + config_host['QEMU_GA_MSI_WITH_VSS'].split(), + config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(), + ]) + all_qga += [qga_msi] + alias_target('msi', qga_msi) + endif endif else install_subdir('run', install_dir: get_option('localstatedir')) From ca31e3072fa74a8de5a02311eb62396087774cf7 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 17 Nov 2020 05:31:06 +0800 Subject: [PATCH 4/7] meson: Fixes curses detection on msys2 Fixes regression on curses detection in msys2 by commit#925a40df2828d32d3aaaf022282cba81082fb263 Signed-off-by: Yonggang Luo Message-Id: <20201116213106.589-1-luoyonggang@gmail.com> Signed-off-by: Paolo Bonzini --- meson.build | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 7ddf983ff7..5062407c70 100644 --- a/meson.build +++ b/meson.build @@ -490,10 +490,15 @@ if have_system and not get_option('curses').disabled() return 0; }''' - curses = dependency((targetos == 'windows' ? 'ncurses' : 'ncursesw'), - required: false, - method: 'pkg-config', - static: enable_static) + curses_dep_list = targetos == 'windows' ? ['ncurses', 'ncursesw'] : ['ncursesw'] + foreach curses_dep : curses_dep_list + if not curses.found() + curses = dependency(curses_dep, + required: false, + method: 'pkg-config', + static: enable_static) + endif + endforeach msg = get_option('curses').enabled() ? 'curses library not found' : '' if curses.found() if cc.links(curses_test, dependencies: [curses]) From 65baabca22366e5246955474228908d6a8354881 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Mon, 16 Nov 2020 20:03:19 +0000 Subject: [PATCH 5/7] hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET Buglink: https://bugs.launchpad.net/qemu/+bug/1894836 Signed-off-by: Jessica Clarke Message-Id: <20201116200319.28138-1-jrtc27@jrtc27.com> Signed-off-by: Paolo Bonzini --- target/i386/hvf/x86_cpuid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c index ac731c2b85..a6842912f5 100644 --- a/target/i386/hvf/x86_cpuid.c +++ b/target/i386/hvf/x86_cpuid.c @@ -122,6 +122,10 @@ uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, CPUID_PAT | CPUID_PSE36 | CPUID_EXT2_MMXEXT | CPUID_MMX | CPUID_FXSR | CPUID_EXT2_FXSR | CPUID_EXT2_PDPE1GB | CPUID_EXT2_3DNOWEXT | CPUID_EXT2_3DNOW | CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_NX; + hv_vmx_read_capability(HV_VMX_CAP_PROCBASED2, &cap); + if (!(cap & CPU_BASED2_RDTSCP)) { + edx &= ~CPUID_EXT2_RDTSCP; + } hv_vmx_read_capability(HV_VMX_CAP_PROCBASED, &cap); if (!(cap & CPU_BASED_TSC_OFFSET)) { edx &= ~CPUID_EXT2_RDTSCP; From c6a89b45bd625c6ea745cba550cffd8220602ce7 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Mon, 16 Nov 2020 20:04:14 +0000 Subject: [PATCH 6/7] hvf: Fix segment selector format The Requested Privilege Level field is 2 bits, the Table Indicator field is 1 bit and the Index field is the remaining 15 bits, with TI=0 meaning GDT and TI=1 meaning LDT. Signed-off-by: Jessica Clarke Message-Id: <20201116200414.28286-1-jrtc27@jrtc27.com> Signed-off-by: Paolo Bonzini --- target/i386/hvf/x86.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h index 9e2c0039e6..782664c2ea 100644 --- a/target/i386/hvf/x86.h +++ b/target/i386/hvf/x86.h @@ -214,16 +214,16 @@ static inline uint32_t x86_call_gate_offset(x86_call_gate *gate) return (uint32_t)((gate->offset1 << 16) | gate->offset0); } -#define LDT_SEL 0 -#define GDT_SEL 1 +#define GDT_SEL 0 +#define LDT_SEL 1 typedef struct x68_segment_selector { union { uint16_t sel; struct { - uint16_t rpl:3; + uint16_t rpl:2; uint16_t ti:1; - uint16_t index:12; + uint16_t index:13; }; }; } __attribute__ ((__packed__)) x68_segment_selector; From 29cf16db23e605769f6d89c47a1d45ef3373b88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 14 Oct 2020 10:22:09 +0200 Subject: [PATCH 7/7] buildsys: Help git-diff adding .gitattributes config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commits 0979ed017f0 ("meson: rename .inc.h files to .h.inc") and 139c1837db7 ("meson: rename included C source files to .c.inc") 'git-diff --function-context' stopped displaying C function context correctly. We can help git-diff by providing attributes to the .[ch].inc path names. See: https://git-scm.com/docs/gitattributes#_generating_diff_text Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20201014082209.3712625-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..3d2fe2ecda --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.c.inc diff=c +*.h.inc diff=c