diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-11-18 11:13:14 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-11-18 11:13:14 +0000 |
commit | 269ff671c593379378c5cf5ea3bddd7909dd3333 (patch) | |
tree | 39ef3a08d0644ef4c4ea12abf2094fac4688b76f | |
parent | 66a300a107ec286725bdc943601cbd4247b82158 (diff) | |
parent | 29cf16db23e605769f6d89c47a1d45ef3373b88e (diff) | |
download | qemu-269ff671c593379378c5cf5ea3bddd7909dd3333.zip qemu-269ff671c593379378c5cf5ea3bddd7909dd3333.tar.gz qemu-269ff671c593379378c5cf5ea3bddd7909dd3333.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
Bugfixes for HVF and Windows builds.
# gpg: Signature made Wed 18 Nov 2020 08:34:05 GMT
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini-gitlab/tags/for-upstream:
buildsys: Help git-diff adding .gitattributes config file
hvf: Fix segment selector format
hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET
meson: Fixes curses detection on msys2
meson: Fix build with --disable-guest-agent-msi
docs: Fix some typos (found by codespell)
meson: Fix argument for makensis (build regression)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | .gitattributes | 2 | ||||
-rw-r--r-- | docs/can.txt | 8 | ||||
-rw-r--r-- | docs/interop/vhost-user.rst | 2 | ||||
-rw-r--r-- | docs/replay.txt | 2 | ||||
-rw-r--r-- | docs/specs/ppc-spapr-numa.rst | 2 | ||||
-rw-r--r-- | docs/system/deprecated.rst | 4 | ||||
-rw-r--r-- | docs/tools/virtiofsd.rst | 2 | ||||
-rw-r--r-- | hw/vfio/igd.c | 2 | ||||
-rw-r--r-- | meson.build | 13 | ||||
-rw-r--r-- | qga/meson.build | 36 | ||||
-rw-r--r-- | scripts/nsis.py | 2 | ||||
-rw-r--r-- | target/i386/hvf/x86.h | 8 | ||||
-rw-r--r-- | target/i386/hvf/x86_cpuid.c | 4 |
13 files changed, 50 insertions, 37 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3d2fe2e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.c.inc diff=c +*.h.inc diff=c diff --git a/docs/can.txt b/docs/can.txt index 5838f66..0d31023 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 6d4025b..d6085f7 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 87a64ae..5b008ca 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 5fca2bd..ffa687d 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 bbaae0d9..d984640 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 34a9e40..866b7db 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 64e3327..470205f 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. diff --git a/meson.build b/meson.build index 7ddf983..5062407 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]) diff --git a/qga/meson.build b/qga/meson.build index 53ba6de..520af6c 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')) diff --git a/scripts/nsis.py b/scripts/nsis.py index e1c4093..5135a05 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) diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h index 9e2c003..782664c 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; diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c index ac731c2..a684291 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; |