Commit graph

60401 commits

Author SHA1 Message Date
BALATON Zoltan 6b3913e085 roms/u-boot-sam460ex: Change to qemu git mirror and update
Now that we have a mirror of this repo on git.qemu.org change the
submodule to use that and update it to latest commit which fixes a
dangling symlink and removes two big binaries that are not needed.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-04-10 10:05:38 +10:00
BALATON Zoltan f8815532dc sam460ex: Fix timer frequency and clock multipliers
We only emulate timer running at CPU frequency which is what most
guests expect so set the frequency to match real hardware. This also
allows setting clock multipliers which caused slowdown previously due
to wrong timer frequency.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-04-10 10:05:38 +10:00
Thomas Huth 99b336cdd9 tests/boot-serial: Test the sam460ex board
We've got a U-Boot firmware for this board in our repository, and
the firmware prints some output to the serial console, so we can
check this board in the boot-serial tester, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-04-10 10:05:38 +10:00
Alexey Kardashevskiy 127f03e442 spapr: Initialize reserved areas list in FDT in H_CAS handler
At the moment the device tree produced by the H_CAS handler has no
reserved map initialized at all which is not correct as at least one
empty record is required to be present as a marker of the end.
This does not cause problems now as the only consumer is SLOF which
does not look at the reserved map area.

However when DTC's "Improve libfdt's memory safety" changeset hits
the QEMU upstream, there will be errors reported and crashes observed.

This fixes the problem by adding an empty entry to the reserved map,
just like create_device_tree() does already.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-04-10 10:05:38 +10:00
David Gibson efb7db250a target/ppc: Fix backwards migration of msr_mask
21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states
to msr_mask for recent POWER CPUs to allow correct migration of machines
that are in certain interim transactional memory states.

This was correct, but unfortunately breaks backwards of pseries-2.7 and
earlier machine types which (stupidly) transferred the msr_mask in the
migration stream and failed if it wasn't equal on each end.

This works around the problem by masking out the new MSR bits in the
compatibility code to send the msr_mask on old machine types.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
Tested-by: Lukáš Doktor <ldoktor@redhat.com>
2018-04-10 10:05:38 +10:00
Thomas Huth ddd835f32a hw/misc/macio: Fix crash when listing device properties of macio device
The macio-newworld device can currently be used to abort QEMU unexpectedly:

$ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2},
 "package": "build-all"}, "capabilities": []}}
{ 'execute': 'qmp_capabilities' }
{"return": {}}
{ 'execute': 'device-list-properties',
  'arguments': {'typename': 'macio-newworld'}}
Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
Device 'serial0' is in use
Aborted (core dumped)

qdev properties should be set during realize(), not during instance_init(),
so move the related code there to fix this problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-04-10 10:05:38 +10:00
David Gibson e69ba2b489 target/ppc: Initialize lazy_tlb_flush correctly
ppc_tr_init_disas_context() correctly sets lazy_tlb_flush to true on
certain CPU models.  However, it leaves it uninitialized, instead of
setting it to false on all others.

It wasn't caught before now because we didn't have examples in the tests
that exercised this path.  However it can now be caught using clang's
undefined behaviour sanitizer and the sam460ex board.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
2018-04-10 10:05:38 +10:00
Peter Maydell 915d34c5f9 Miscellaneous bugfixes, including crash fixes from Alexey, Peter M. and
Thomas.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJay3qbAAoJEL/70l94x66D7LwIAIDjHDULzCy/u+m/uFyTn7rD
 zyDhQTWgHP6OQ+TqixIDDszeasev/PWmiC6Bp+NG6ZIG102+XTREciSW+X7B6mct
 OqI/5xpjoqzKj2LrTeCnm754Xv7Ilz9kxZ1MKlGqjnRzdmykDRx7RNLqGBohL4EI
 nnF3iiOiT4ECY/aLgeRLfufJqj9zHr8hQ3om+2zMqntPfqc3Eg0eCpgb7uGMRDq8
 nWLecnDtqmBWhXDJCPngxDavBQqHDAmq1aj9ppJPLS+nB6pez0DvHMI6Gg3K4fIl
 2ybJse5FbOj/+PsM1Ae5g8TcWz607mVgtE+crKxLDmffg+YjbO9raqWigZoIw2Y=
 =aMIC
 -----END PGP SIGNATURE-----

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 <bonzini@gnu.org>"
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
# 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 <peter.maydell@linaro.org>
2018-04-09 17:29:10 +01:00
Peter Maydell a84e937649 virtio,vhost: fixes
Add a feature flag for new protocol messages.
 Misc fixes.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJay3qpAAoJECgfDbjSjVRphvYH/1zquqTDkCQP4CD6XcOPV/Xg
 gEw5rvGvbdVmM+KUTQhmOxVUs+YhJlnAvEAVsIL8x0S5Gtn5+7Y51/Zx5wLXdCbe
 ruAV6AWVpgRKhINTm6uZzA53YkaczEu1zeKgV1hneVyrtDwbTknQM/1zNXGUUSqe
 hwG83WN+8jVVZDpCvAXrj0xct/Ap2HepBiA6ljDNjdgo7Kdr+gNJoMwip5hI1oPY
 ffudCM06kjIcZdueUpj5TE5tazcCCpgmNes2eeh77Q1SLjEUfKxantmoT3ZZbZei
 9jQSKt1nRi8D3xkxkQQZTC8qVKq1AijtXNCqmM5Bai0xJyDNKTXK/30pH/fLAkI=
 =X3Pn
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

virtio,vhost: fixes

Add a feature flag for new protocol messages.
Misc fixes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Mon 09 Apr 2018 15:37:29 BST
# gpg:                using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  virtio-serial: fix heap-over-flow
  vhost: Allow adjoining regions
  contrib/libvhost-user: add the protocol feature used for SET/GET message
  vhost-user: back SET/GET_CONFIG requests with a protocol feature
  vhost-user-blk: set config ops before vhost-user init

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-09 16:25:39 +01:00
Eugene Minibaev e0014d4b3a 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 <mail@kitsu.me>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:40 +02:00
Eric Blake 3bd2608db7 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 <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:40 +02:00
Eric Blake 84c868f6b8 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 <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:40 +02:00
Thomas Huth 01366ef9a4 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 <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:40 +02:00
Michal Privoznik bd6b1c8324 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 <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:40 +02:00
Michal Privoznik 8dc0bf2647 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 <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:40 +02:00
linzhecheng 9f91022f28 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 <linzhecheng@huawei.com>
Message-Id: <20180328133435.20112-1-linzhecheng@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Michael Chapman c2b01cfec1 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 <mike@very.puzzling.org>
Message-Id: <20180406053406.774-1-mike@very.puzzling.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Philippe Mathieu-Daudé 4968a2c6ed 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é <f4bug@amsat.org>
Message-Id: <20180326153441.32641-2-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Daniel Henrique Barboza 29e560f00e 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 <dacng@us.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Message-Id: <20180327211451.14647-1-danielhb@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Paolo Bonzini 2343be0d7e 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
<danielhb@linux.vnet.ibm.com>.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Fam Zheng 37c5174189 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 <dgibson@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>

Message-Id: <20180327164141.19075-1-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Thomas Huth db1b5f135c 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 <thuth@redhat.com>
Message-Id: <1522163370-18544-1-git-send-email-thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
Roman Kagan 1221f15041 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 <rkagan@virtuozzo.com>
Message-Id: <20180330170209.20627-3-rkagan@virtuozzo.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:38 +02:00
Roman Kagan 9445597b6a 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 <rkagan@virtuozzo.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20180330170209.20627-2-rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:38 +02:00
Justin Terry (VM) 7becac84fb 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) <juterry@microsoft.com>
Message-Id: <20180326170658.606-1-juterry@microsoft.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:38 +02:00
linzhecheng d434e5ac5d virtio-serial: fix heap-over-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 <linzhecheng@huawei.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-09 17:35:46 +03:00
Dr. David Alan Gilbert e7b94a84b6 vhost: Allow adjoining regions
My rework of section adding combines overlapping or adjoining regions,
but checks they're actually the same underlying RAM block.
Fix the case where two blocks adjoin but don't overlap; that new region
should get added (but not combined), but my previous patch was disallowing it.

Fixes: c1ece84e7c

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-09 17:35:46 +03:00
Changpeng Liu ea3e6f5a93 contrib/libvhost-user: add the protocol feature used for SET/GET message
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-09 17:35:46 +03:00
Maxime Coquelin 1c3e5a2617 vhost-user: back SET/GET_CONFIG requests with a protocol feature
Without a dedicated protocol feature, QEMU cannot know whether
the backend can handle VHOST_USER_SET_CONFIG and
VHOST_USER_GET_CONFIG messages.

This patch adds a protocol feature that is only advertised by
QEMU if the device implements the config ops. Vhost user init
fails if the device support the feature but the backend doesn't.

The backend should only send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG
requests if the protocol feature has been negotiated.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-09 17:35:46 +03:00
Maxime Coquelin bc6abcff7c vhost-user-blk: set config ops before vhost-user init
As soon as vhost-user init is done, the backend may send
VHOST_USER_SLAVE_CONFIG_CHANGE_MSG, so let's set the
notification callback before it.

Also, it will be used to know whether the device supports
the config feature to advertize it or not.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-09 17:35:45 +03:00
Philippe Mathieu-Daudé 9005774b27 gdbstub: fix off-by-one in gdb_handle_packet()
memtohex() adds an extra trailing NUL character.

Reported-by: AddressSanitizer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180408145933.1149-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-09 14:18:39 +01:00
Peter Maydell b2c1742da0 sdl2: fix kbd regression (compared to sdl1), cleanups.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJayzUFAAoJEEy22O7T6HE4jjMP/3MCU5MTwkQ05/TSHZ7FlCt9
 rKO2LTrl/u00KFcuNhr39H8id4eK5eh6sxl2hpLO6kphfn+XI2hOr06g+NH7Gesl
 W4j8NvuDwGsLcCoEjXCtoXFtExSIz4JqCwpW2pBKE1TIAbRSOvoZsZ+tjR9mxuJr
 yZRu42Ltb4BZGKrwLPETai9cW5J1kq3CK8+MYeAmajsjWKDhJqmbwdINf5lTkLTa
 HdRtl0ujDzJXLjkzb8/YxOgqujFCKmk1Psua3GbmeukSyGdXWsczIP8G3u1eEb50
 xQvvrM4zLlcDP5ctrDfbazSP/aY8/9UR5rTD4Dm7EyDGJx9H2kzjNQEGqX4wHVXx
 wyH/9rVxzddpFDGtcqYNrLBdm0qq81RM1C3joTGdfajjCQRBWumkjUdc1q6yIMwp
 P7HlFHOrCx3QsF4KaC5Ot5AO20veT9WlBd1kX+wlTl++9Fo92hG8EmyRkcpXsNFw
 xWB7p72Oybn+kk/PVc9291LuKzPLtKnQDhmPAYerkmHRfNFVR4ZULZVUFL8CLXXG
 ZVs/JuK6kTvwSCf6CvUkApqQdHwqWt3Lr3/zoe32akoe6T64rpt+PGhH6oDQOyu3
 E3/s1I8nAXy/ZQSFLYHqCbw7RS5TyuX9yZTuH3a+MhvBaTgopQewrahy2nGovpTl
 hTltAfYAOAQGeKmn9TBn
 =bXM4
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180409-pull-request' into staging

sdl2: fix kbd regression (compared to sdl1), cleanups.

# gpg: Signature made Mon 09 Apr 2018 10:40:21 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20180409-pull-request:
  sdl2: drop dead code
  sdl2: drop QEMU_KEY_BACKSPACE special case
  sdl2: enable ctrl modifier keys for text consoles
  sdl2: track kbd modifier state unconditionally
  ui: add ctrl modifier support to kbd_put_qcode_console()
  sdl2: Remove unused epoxy include

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-09 12:02:19 +01:00
Marc-André Lureau 648abbfbaa 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 <mrezanin@redhat.com>
Tested-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180328121804.16203-1-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-04-09 12:57:06 +02:00
Peter Maydell 2a6bcfdebe Testing patches
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEEUAN8t5cGD3bwIa1WyjViTGqRccYFAlrLE6oQHGZhbXpAcmVk
 aGF0LmNvbQAKCRDKNWJMapFxxnsTB/sFmoA6QWmvCXHHxmBR5AcfcUmeYoy3Nnzj
 XygC8E7Vfw384XmKY/9jpLEyvgmP+YyXgikkFqFv6hL4gj+oGOpro4pv6lePuiwN
 ksQTx7RFekBOkz/FWopA8mxJudfocidzYLgL6Pdj2tE5SmAykRtYGX8yD8GbsmPs
 beZaZvrHVL013RFhlqprVflQobQMazodYrTK0pLFrwymFU/7WYr/1HQ40SM9EGMK
 DAn4c3l1xsyT4Vs0Y4Ev5lZKp1RMuveY/TRhN6stX4huRACq13fHw96dJK8DE6dR
 YA4q2UhxBJ8rRlIcwhaKchOcAzOfV69yQ7cYVUmdX/ILGwNrw6yM
 =Tkey
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/famz/tags/testing-pull-request' into staging

Testing patches

# gpg: Signature made Mon 09 Apr 2018 08:18:02 BST
# gpg:                using RSA key CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/testing-pull-request:
  docker: fedora: test more components
  docker: Inline "prep_fail" in run script
  tests: Fix ubuntu.i386 image initialization
  docker: dump 'config.log' if ./configure fails

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-09 10:21:14 +01:00
Gerd Hoffmann 1458da9131 sdl2: drop dead code
Leftover from sdl1 -> sdl2 port.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180321135041.15768-6-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-04-09 10:40:47 +02:00
Gerd Hoffmann e7824db158 sdl2: drop QEMU_KEY_BACKSPACE special case
Not needed, kbd_put_qcode_console() will handle that for us.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180321135041.15768-5-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-04-09 10:40:47 +02:00
Gerd Hoffmann 3dd2ca54fb sdl2: enable ctrl modifier keys for text consoles
Unbreaks ctrl-pageup/pagedown scrollback.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180321135041.15768-4-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-04-09 10:40:47 +02:00
Gerd Hoffmann 34013c3793 sdl2: track kbd modifier state unconditionally
For both grapical and text consoles.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180321135041.15768-3-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-04-09 10:40:47 +02:00
Gerd Hoffmann da024b1ed2 ui: add ctrl modifier support to kbd_put_qcode_console()
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180321135041.15768-2-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-04-09 10:40:47 +02:00
Paolo Bonzini 07fed47417 docker: fedora: test more components
Install optional dependencies of QEMU to get better coverage.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1520942752-19449-1-git-send-email-pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-04-09 15:13:02 +08:00
Fam Zheng 185809224a docker: Inline "prep_fail" in run script
We don't source common.rc where prep_fail is defined, so spell out the
commands and do what was intended.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180326090350.30014-1-famz@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-04-09 15:13:02 +08:00
Fam Zheng 726c9a3b8c tests: Fix ubuntu.i386 image initialization
The apt-get commands we run through ssh expect certain features of the
tty, and refuses to work if /dev/null is used. It is ugly, but easy to
satisfy.

Actually, there is no reason to hide the output. It just makes things
harder to diagnose. We can always redirect in the Makefile, so don't do
it conditionally here.

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180322034753.6301-1-famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-04-09 15:13:02 +08:00
Philippe Mathieu-Daudé 0c153b4c6f docker: dump 'config.log' if ./configure fails
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20180315142713.30960-1-f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-04-09 15:13:02 +08:00
Peter Maydell 08e173f294 -----BEGIN PGP SIGNATURE-----
iQIcBAABCAAGBQJax3YmAAoJEL6G67QVEE/fFXEQAK+6i7WYTmvX5WROLy9mTXi+
 Oykyz4RtoqWOvt8efpv81gyEFs8AJjewZWo37/zbllUhIORqqZAtuYp9Jq5K8Rw2
 1vM+wloGjXX1LDUe2ZSovcmBy29vJkSPModZGWKZyqg5CBEjmPegvUGQsq0wvLTc
 FhNO002EfFqAVH/63VjqQrfyz5VUaECUE5KUvx1+AWGvsMp5xPRYO1cskmQV4xIF
 Sq8QMqZP/1ar9DcYRz4vzeqoDY3k+zc3tYUei0RIXrXJFheT/+C317V+ALroJG21
 MK9kjTiqMkJBSi/5OLIRuWvE0mi8p7vuqttXydhCWumcq5SVERwncd/yAGNi5oQc
 jIhJ5IN+NRZjHbHs/qna1loJpwvr4c8JsDLZHxqiBBDHxT7ICwTquXwbGtSrowUR
 wcVBDNzzv9maKH7ycZnA0xB61V/Yu6KvxvCZFfH+ZMhFf46o2FYovVFHHNr4U03y
 qT08GLTB9KKnLq5u+pSrH4vnNVRIQu3nkyVSin6BqI81E3nXBGOXMwd0xvOmnZbe
 oF3ERo8LOD5TE+2H8oA5o08ryJjf6oHR7xdtV8frxc7iTkcuLR+eRV1BCuU2/u31
 HG9BQLsS8Lvyymov/nlKwJW8/Mluloe3dSzEcntCqsb/cOqZRh/tnlW0Yg8XkHbV
 PeWuIwHf6DprUQ4lO0MG
 =KVEs
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/berrange/tags/qcrypto-next-pull-request' into staging

# gpg: Signature made Fri 06 Apr 2018 14:29:10 BST
# gpg:                using RSA key BE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/qcrypto-next-pull-request:
  crypto: ensure we use a predictable TLS priority setting
  docs: Document -object tls-creds-x509 priority=xxx
  docs: update information for TLS certificate management

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-06 17:51:21 +01:00
Peter Maydell d7fa7fb504 Update hppa-softmmu bios
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJax3LzAAoJEGTfOOivfiFftC4H/RN/QeBuv6Ug1wxMrmtsfWgI
 hS7L4r3toxVAJeTuMTAVsXk0dr7684XO9+P1Y9CUrY6tTBYJNLIKZG+PQaJuM1U2
 xr3cD4SHKpHOFwetxwL5X2+srrMqLvHhZezIwW+eH1okAVZf15vHVEzjCZp78wDr
 JOcobfQB3992fXKPG5Z7X7bbY2zqWtGr1+G4BsivfjfDPOVviz43As3ByKP3Dhw9
 LrzP8eDSoks42aXk5ov0D6IFK+0JavFkoKMSUPCPPHvOooHBwrELOFF1AX5K3BL2
 Vrlq522ENicC1VUmsAwq8O6Qq7MfWJvMKc5YxKtkzJnKEkoTIr6AULGZ6qO6UNQ=
 =8y+h
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180407' into staging

Update hppa-softmmu bios

# gpg: Signature made Fri 06 Apr 2018 14:15:31 BST
# gpg:                using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-hppa-20180407:
  Update seabios-hppa

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-06 15:58:48 +01:00
Peter Maydell 585d46f835 Fix generic host vector compares.
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJax3HOAAoJEGTfOOivfiFffOMH/iCq7dLMLTt3VlU9ZOzhi0wE
 aoHJhJm2v5bZSzety2rtA54glY3Rc5zvyfFto+thTf6QIjfUD0N/XPOcms3DCWsy
 FY4ON6M/b8YeEJaYlx3sJmZLkzyq9S55161Q0Dsz8kfx0n4ZL5u/sS8ybFOk1q0p
 lXXx93yDVyTv1PIC/zL85SstYrBt8QeKISsXzgNj4nUrRQsEn9FkomatipIVOwKg
 xTdaJA7VRC6D6Vb11q+IHweaQ9Wt57MJj22JVzhNL0OcwcVuNUQt6/OYlyD4OIAl
 fMKccNV90vo3eUNTZdOBGFTch854r3ZnNCbJlQ1b+gUoF7c+5FBN1dME8PMQ2jM=
 =rehs
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180407' into staging

Fix generic host vector compares.

# gpg: Signature made Fri 06 Apr 2018 14:10:38 BST
# gpg:                using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-tcg-20180407:
  tcg: Fix out-of-line generic vector compares

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-06 14:26:45 +01:00
Richard Henderson 5aa4860082 Update seabios-hppa
A dozen or so fixes from Helge upstream.
2018-04-06 23:14:51 +10:00
Richard Henderson 6cb1d3b851 tcg: Fix out-of-line generic vector compares
A mistake in the type passed to sizeof, that happens to work
when the out-of-line fallback itself is using host vectors,
but fails when using only the base types.

Tested-by: Emilio G. Cota <cota@braap.org>
Reported-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-04-06 23:08:50 +10:00
Daniel P. Berrangé 057ad0b469 crypto: ensure we use a predictable TLS priority setting
The TLS test cert generation relies on a fixed set of algorithms that are
only usable under GNUTLS' default priority setting. When building QEMU
with a custom distro specific priority setting, this can cause the TLS
tests to fail. By forcing the tests to always use "NORMAL" priority we
can make them more robust.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-06 11:28:31 +01:00
Christophe Fergeau 00e5e9df29 docs: Document -object tls-creds-x509 priority=xxx
This was added in 13f1243, but is missing from qemu-options.hx

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-06 11:28:30 +01:00