qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] d69748: sys_membarrier: fix up include direct


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] d69748: sys_membarrier: fix up include directives
Date: Mon, 09 Apr 2018 10:20:58 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d69748463c706801eabce2216c3f7914f56cc3a8
      
https://github.com/qemu/qemu/commit/d69748463c706801eabce2216c3f7914f56cc3a8
  Author: Bruce Rogers <address@hidden>
  Date:   2018-04-05 (Thu, 05 Apr 2018)

  Changed paths:
    M util/sys_membarrier.c

  Log Message:
  -----------
  sys_membarrier: fix up include directives

Our rule right now is to use <> for external headers only.
util/sys_membarrier.c violates that. Fix it up.

Signed-off-by: Bruce Rogers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5cd10051c2e02b7a86eae49919d6c65a87dbea46
      
https://github.com/qemu/qemu/commit/5cd10051c2e02b7a86eae49919d6c65a87dbea46
  Author: Alexandro Sanchez Bach <address@hidden>
  Date:   2018-04-05 (Thu, 05 Apr 2018)

  Changed paths:
    M target/i386/translate.c

  Log Message:
  -----------
  target/i386: Fix andn instruction

In commit 7073fbada733c8d10992f00772c9b9299d740e9b, the `andn` instruction
was implemented via `tcg_gen_andc` but passes the operands in the wrong
order:
- X86 defines `andn dest,src1,src2` as: dest = ~src1 & src2
- TCG defines `andc dest,src1,src2` as: dest = src1 & ~src2

The following simple test shows the issue:

    #include <stdio.h>
    #include <stdint.h>

    int main(void) {
  uint32_t ret = 0;
  __asm (
      "mov $0xFF00, %%ecx\n"
      "mov $0x0F0F, %%eax\n"
      "andn %%ecx, %%eax, %%ecx\n"
      "mov %%ecx, %0\n"
    : "=r" (ret));
  printf("%08X\n", ret);
  return 0;
    }

This patch fixes the problem by simply swapping the order of the two last
arguments in `tcg_gen_andc_tl`.

Reported-by: Alexandro Sanchez Bach <address@hidden>
Signed-off-by: Alexandro Sanchez Bach <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 053e45d2f3d3eb51799f371a39434699984e9019
      
https://github.com/qemu/qemu/commit/053e45d2f3d3eb51799f371a39434699984e9019
  Author: Su Hang <address@hidden>
  Date:   2018-04-05 (Thu, 05 Apr 2018)

  Changed paths:
    M scripts/checkpatch.pl

  Log Message:
  -----------
  scripts/checkpatch.pl: Bug fix

Commit 2b9aef6fcd96ba7ed8c1ee723e391901852d344c introduced a regression:
checkpatch.pl started complaining about the following valid pattern:
do {
     /* something */
} while (condition);

Fix the script to once again permit this pattern.

Signed-off-by: Su Hang <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 648abbfbaa4462bc015b15dd335068638bee4246
      
https://github.com/qemu/qemu/commit/648abbfbaa4462bc015b15dd335068638bee4246
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/virtio/vhost.c
    M include/qemu/memfd.h
    M util/memfd.c

  Log Message:
  -----------
  memfd: fix vhost-user-test on non-memfd capable host

On RHEL7, memfd is not supported, and vhost-user-test fails:
TEST: tests/vhost-user-test... (pid=10248)
  /x86_64/vhost-user/migrate:
  qemu-system-x86_64: -object memory-backend-memfd,id=mem,size=2M,: failed to 
create memfd
FAIL

There is a qemu_memfd_check() to prevent running memfd path, but it
also checks for fallback implementation. Let's specialize
qemu_memfd_check() to check memfd only, while qemu_memfd_alloc_check()
checks for the qemu_memfd_alloc() API.

Reported-by: Miroslav Rezanina <address@hidden>
Tested-by: Miroslav Rezanina <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>


  Commit: 7becac84fb352c01ad8b914aa956688f03079739
      
https://github.com/qemu/qemu/commit/7becac84fb352c01ad8b914aa956688f03079739
  Author: Justin Terry (VM) <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/i386/whpx-all.c

  Log Message:
  -----------
  target/i386: WHPX: set CPUID_EXT_HYPERVISOR bit

Implements the CPUID trap for CPUID 1 to include the
CPUID_EXT_HYPERVISOR flag in the ECX results. This was preventing some
older linux kernels from booting when trying to access MSR's that dont
make sense when virtualized.

Signed-off-by: Justin Terry (VM) <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9445597b6a323c5afee7ed33ca2c1913f78a92dc
      
https://github.com/qemu/qemu/commit/9445597b6a323c5afee7ed33ca2c1913f78a92dc
  Author: Roman Kagan <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm.c

  Log Message:
  -----------
  i386/hyperv: add hv-frequencies cpu property

In order to guarantee compatibility on migration, QEMU should have
complete control over the features it announces to the guest via CPUID.

However, the availability of Hyper-V frequency MSRs
(HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY) depends solely
on the support for them in the underlying KVM.

Introduce "hv-frequencies" cpu property (off by default) which gives
QEMU full control over whether these MSRs are announced.

While at this, drop the redundant check of the cpu tsc frequency, and
decouple this feature from hv-time.

Signed-off-by: Roman Kagan <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1221f1504140b2c4aa56b66ee52c714506a04eed
      
https://github.com/qemu/qemu/commit/1221f1504140b2c4aa56b66ee52c714506a04eed
  Author: Roman Kagan <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/i386/kvm.c

  Log Message:
  -----------
  i386/hyperv: error out if features requested but unsupported

In order to guarantee compatibility on migration, QEMU should have
complete control over the features it announces to the guest via CPUID.

However, for a number of Hyper-V-related cpu properties, if the
corresponding feature is not supported by the underlying KVM, the
propery is silently ignored and the feature is not announced to the
guest.

Refuse to start with an error instead.

Signed-off-by: Roman Kagan <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: db1b5f135c58a1473b6609b53b8fd9da02d6b5d1
      
https://github.com/qemu/qemu/commit/db1b5f135c58a1473b6609b53b8fd9da02d6b5d1
  Author: Thomas Huth <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Add missing configure options to help text

We forgot to mention --with-git, --libexecdir and --with-pkgversion
so far.

Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 37c51741892a89cf5710f5ac231091fb0a6352c7
      
https://github.com/qemu/qemu/commit/37c51741892a89cf5710f5ac231091fb0a6352c7
  Author: Fam Zheng <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: Don't enlarge min_io_size to max_io_size

Some backends report big max_io_sectors. Making min_io_size the same
value in this case will make it impossible for guest to align memory,
therefore the disk may not be usable at all.

Do not enlarge them when they are zero.

Reported-by: David Gibson <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>

Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2343be0d7ee8a6e02c2bf99d0243492085c8d399
      
https://github.com/qemu/qemu/commit/2343be0d7ee8a6e02c2bf99d0243492085c8d399
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M include/hw/scsi/scsi.h

  Log Message:
  -----------
  scsi-disk: allow customizing the SCSI version

We would like to have different behavior for passthrough devices
depending on the SCSI version they expose.  To prepare for that,
allow the user of emulated devices to specify the desired SCSI
level, and adjust the emulation according to the property value.
The next patch will set the level for scsi-block and scsi-generic
devices.

Based on a patch by Daniel Henrique Barboza
<address@hidden>.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 29e560f00e2bc1b5731c8276031aaf192de55d9d
      
https://github.com/qemu/qemu/commit/29e560f00e2bc1b5731c8276031aaf192de55d9d
  Author: Daniel Henrique Barboza <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c

  Log Message:
  -----------
  hw/scsi: support SCSI-2 passthrough without PI

QEMU SCSI code makes assumptions about how the PROTECT and BYTCHK
works in the protocol, denying support for PI (Protection
Information) in case the guest OS requests it. However, in SCSI versions 2
and older, there is no PI concept in the protocol.

This means that when dealing with such devices:

- there is no PROTECT bit in byte 5 of the standard INQUIRY response. The
whole byte is marked as "Reserved";

- there is no RDPROTECT in byte 2 of READ. We have 'Logical Unit Number'
in this field instead;

- there is no VRPROTECT in byte 2 of VERIFY. We have 'Logical Unit Number'
in this field instead. This also means that the BYTCHK bit in this case
is not related to PI.

Since QEMU does not consider these changes, a SCSI passthrough using
a SCSI-2 device will not work. It will mistake these fields with
PI information and return Illegal Request SCSI SENSE thinking
that the driver is asking for PI support.

This patch fixes it by adding a new attribute called 'scsi_version'
that is read from the standard INQUIRY response of passthrough
devices. This allows for a version verification before applying
conditions related to PI that doesn't apply for older versions.

Reported-by: Dac Nguyen <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4968a2c6edb7b46b127c19a8426575d23b55ab1f
      
https://github.com/qemu/qemu/commit/4968a2c6edb7b46b127c19a8426575d23b55ab1f
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/dma/i82374.c

  Log Message:
  -----------
  hw/dma/i82374: Avoid double creation of the 82374 controller

QEMU fails when used with the following command line:

    ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p -device i82374
    qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assertion 
`!bus->dma[0] && !bus->dma[1]' failed.

The 40p machine type already creates the device i82374. If specified in the
command line, it will try to create it again, hence generating the error. The
function isa_bus_dma() isn't supposed to be called twice for the same bus.
Check the bus doesn't already have a DMA controller registered before creating
the device.

Fixes: https://bugs.launchpad.net/qemu/+bug/1721224
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c2b01cfec1f1426d95c27abacc3ea5b5fbb9a57e
      
https://github.com/qemu/qemu/commit/c2b01cfec1f1426d95c27abacc3ea5b5fbb9a57e
  Author: Michael Chapman <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/i386/kvm/clock.c

  Log Message:
  -----------
  kvmclock: fix clock_is_reliable on migration from QEMU < 2.9

When migrating from a pre-2.9 QEMU, no clock_is_reliable flag is
transferred. We should assume that the source host has an unreliable
KVM_GET_CLOCK, rather than using whatever was determined locally, to
ensure that any drift from the TSC-based value calculated by the guest
is corrected.

Signed-off-by: Michael Chapman <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9f91022f28dc092e3b3250823814e4b3191c51ed
      
https://github.com/qemu/qemu/commit/9f91022f28dc092e3b3250823814e4b3191c51ed
  Author: linzhecheng <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/char/virtio-serial-bus.c

  Log Message:
  -----------
  virtio-serial: fix heapover-flow

Check device having the feature of VIRTIO_CONSOLE_F_EMERG_WRITE before
get config->emerg_wr. It is neccessary because sizeof(virtio_console_config)
is 8 byte if VirtIOSerial doesn't have the feature of
VIRTIO_CONSOLE_F_EMERG_WRITE(see virtio_serial_device_realize),
read/write emerg_wr will lead to heap-over-flow.

Signed-off-by: linzhecheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8dc0bf2647919f9f3e06380d8c748ef5b33b545d
      
https://github.com/qemu/qemu/commit/8dc0bf2647919f9f3e06380d8c748ef5b33b545d
  Author: Michal Privoznik <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M scsi/qemu-pr-helper.c

  Log Message:
  -----------
  qemu-pr-helper: Daemonize before dropping privileges

After we've dropped privileges it might be not possible to write
pidfile. For instance, if this binary is run as root (because
user wants it to write pidfile to some privileged location)
writing pidfile fails because privileges are dropped before we
even get to that.

Signed-off-by: Michal Privoznik <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: bd6b1c8324171e26eb2ce23d5a832bc8c4cf941b
      
https://github.com/qemu/qemu/commit/bd6b1c8324171e26eb2ce23d5a832bc8c4cf941b
  Author: Michal Privoznik <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M scsi/qemu-pr-helper.c

  Log Message:
  -----------
  qemu-pr-helper: Write pidfile more often

Let's write pidfile even if user did not request --daemon but
they requested just --pidfile. Libvirt will use exactly this.

Signed-off-by: Michal Privoznik <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 01366ef9a4a6dd1240614960561cdba5e7220d14
      
https://github.com/qemu/qemu/commit/01366ef9a4a6dd1240614960561cdba5e7220d14
  Author: Thomas Huth <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M scripts/device-crash-test

  Log Message:
  -----------
  device-crash-test: Remove fixed isa-fdc entry

Fixed by commit b3da551 ("fdc: Exit if ISA controller does not support DMA", 
2018-03-16).

Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 84c868f6b8f8c1be9d3d65df93cf00b30821401c
      
https://github.com/qemu/qemu/commit/84c868f6b8f8c1be9d3d65df93cf00b30821401c
  Author: Eric Blake <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M dump.c

  Log Message:
  -----------
  dump: Fix build with newer gcc

gcc 8 on rawhide is picky enough to complain:

/home/dummy/qemu/dump.c: In function 'create_header32':
/home/dummy/qemu/dump.c:817:5: error: 'strncpy' output truncated before 
terminating nul copying 8 bytes from a string of the same length 
[-Werror=stringop-truncation]
     strncpy(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But we already have SIG_LEN defined as the right length without needing
to do a strlen(), and memcpy() is better than strncpy() when we know
we do not want a trailing NUL byte.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3bd2608db729974ae469574fe087e9724b3fd2ee
      
https://github.com/qemu/qemu/commit/3bd2608db729974ae469574fe087e9724b3fd2ee
  Author: Eric Blake <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M .mailmap

  Log Message:
  -----------
  maint: Add .mailmap entries for patches claiming list authorship

The list did not author any patches, but it does rewrite the
'From:' header of messages sent from any domain with restrictive
SPF policies that would otherwise prevent the message from reaching
all list recipients.  If a maintainer is not careful to undo the
list header rewrite, and the author did not include a manual
'From:' line in the body to fix the munged header, then 'git am'
happily attributes the patch to the list.  Add some mailmap
entries to correct the few that have escaped our attention; while
we also work on improving the tooling to catch the problem in
the future before a merge is even made.

Also improve the comments occurring in the file, including line
length improvements.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e0014d4b3a955cfd8d517674703bfa87f340290a
      
https://github.com/qemu/qemu/commit/e0014d4b3a955cfd8d517674703bfa87f340290a
  Author: Eugene Minibaev <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/i386/translate.c

  Log Message:
  -----------
  Add missing bit for SSE instr in VEX decoding

The 2-byte VEX prefix imples a leading 0Fh opcode byte.

Signed-off-by: Eugene Minibaev <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 915d34c5f99b0ab91517c69f54272bfdb6ca2b32
      
https://github.com/qemu/qemu/commit/915d34c5f99b0ab91517c69f54272bfdb6ca2b32
  Author: Peter Maydell <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M .mailmap
    M configure
    M dump.c
    M hw/dma/i82374.c
    M hw/i386/kvm/clock.c
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M hw/virtio/vhost.c
    M include/hw/scsi/scsi.h
    M include/qemu/memfd.h
    M scripts/checkpatch.pl
    M scripts/device-crash-test
    M scsi/qemu-pr-helper.c
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm.c
    M target/i386/translate.c
    M target/i386/whpx-all.c
    M util/memfd.c
    M util/sys_membarrier.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

Miscellaneous bugfixes, including crash fixes from Alexey, Peter M. and
Thomas.

# gpg: Signature made Mon 09 Apr 2018 15:37:15 BST
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# 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/tags/for-upstream:
  Add missing bit for SSE instr in VEX decoding
  maint: Add .mailmap entries for patches claiming list authorship
  dump: Fix build with newer gcc
  device-crash-test: Remove fixed isa-fdc entry
  qemu-pr-helper: Write pidfile more often
  qemu-pr-helper: Daemonize before dropping privileges
  virtio-serial: fix heapover-flow
  kvmclock: fix clock_is_reliable on migration from QEMU < 2.9
  hw/dma/i82374: Avoid double creation of the 82374 controller
  hw/scsi: support SCSI-2 passthrough without PI
  scsi-disk: allow customizing the SCSI version
  scsi-disk: Don't enlarge min_io_size to max_io_size
  configure: Add missing configure options to help text
  i386/hyperv: error out if features requested but unsupported
  i386/hyperv: add hv-frequencies cpu property
  target/i386: WHPX: set CPUID_EXT_HYPERVISOR bit
  memfd: fix vhost-user-test on non-memfd capable host
  scripts/checkpatch.pl: Bug fix
  target/i386: Fix andn instruction
  sys_membarrier: fix up include directives

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/a84e937649f0...915d34c5f99b

reply via email to

[Prev in Thread] Current Thread [Next in Thread]