]> Git Repo - qemu.git/log
qemu.git
7 years agotarget/sh4: Unify code for CHECK_NOT_DELAY_SLOT
Richard Henderson [Tue, 18 Jul 2017 20:02:43 +0000 (10:02 -1000)]
target/sh4: Unify code for CHECK_NOT_DELAY_SLOT

We do not need to emit N copies of raising an exception.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Simplify 64-bit fp reg-reg move
Richard Henderson [Tue, 18 Jul 2017 20:02:42 +0000 (10:02 -1000)]
target/sh4: Simplify 64-bit fp reg-reg move

We do not need to form full 64-bit quantities in order to perform
the move.  This reduces code expansion on 64-bit hosts.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Load/store Dr as 64-bit quantities
Richard Henderson [Tue, 18 Jul 2017 20:02:41 +0000 (10:02 -1000)]
target/sh4: Load/store Dr as 64-bit quantities

This enforces proper alignment and makes the register update
more natural.  Note that there is a more serious bug fix for
fmov {DX}Rn,@(R0,Rn) to use a store instead of a load.

Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Merge DREG into fpr64 routines
Richard Henderson [Tue, 18 Jul 2017 20:02:40 +0000 (10:02 -1000)]
target/sh4: Merge DREG into fpr64 routines

Also add a debugging assert that we did signal illegal opc
for odd double-precision registers.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
[aurel32: fix whitespace issues]
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Eliminate unused XREG macro
Richard Henderson [Tue, 18 Jul 2017 20:02:39 +0000 (10:02 -1000)]
target/sh4: Eliminate unused XREG macro

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Hoist fp register bank selection
Richard Henderson [Tue, 18 Jul 2017 20:02:38 +0000 (10:02 -1000)]
target/sh4: Hoist fp register bank selection

Compute which register bank to use once at the start of translation.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Pass DisasContext to fpr64 routines
Richard Henderson [Tue, 18 Jul 2017 20:02:37 +0000 (10:02 -1000)]
target/sh4: Pass DisasContext to fpr64 routines

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
[aurel32: fix whitespace issues]
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Unify cpu_fregs into FREG
Richard Henderson [Tue, 18 Jul 2017 20:02:36 +0000 (10:02 -1000)]
target/sh4: Unify cpu_fregs into FREG

We were treating FREG as an index and REG as a TCGv.
Making FREG return a TCGv is both less confusing and
a step toward cleaner banking of cpu_fregs.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
[aurel32: fix whitespace issues]
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Hoist register bank selection
Richard Henderson [Tue, 18 Jul 2017 20:02:35 +0000 (10:02 -1000)]
target/sh4: Hoist register bank selection

Compute which register bank to use once at the start of translation.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agolinux-user/sh4: Clean env->flags on signal boundaries
Richard Henderson [Tue, 18 Jul 2017 20:02:34 +0000 (10:02 -1000)]
linux-user/sh4: Clean env->flags on signal boundaries

If a signal is delivered during the execution of a delay slot,
or a gUSA region, clear those bits from the environment so that
the signal handler does not start in that same state.

Cleaning the bits on signal return is paranoid good sense.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agolinux-user/sh4: Notice gUSA regions during signal delivery
Richard Henderson [Tue, 18 Jul 2017 20:02:33 +0000 (10:02 -1000)]
linux-user/sh4: Notice gUSA regions during signal delivery

We translate gUSA regions atomically in a parallel context.
But in a serial context a gUSA region may be interrupted.
In that case, restart the region as the kernel would.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Recognize common gUSA sequences
Richard Henderson [Tue, 18 Jul 2017 20:02:32 +0000 (10:02 -1000)]
target/sh4: Recognize common gUSA sequences

For many of the sequences produced by gcc or glibc,
we can translate these as host atomic operations.
Which saves the need to acquire the exclusive lock.

Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Handle user-space atomics
Richard Henderson [Tue, 18 Jul 2017 20:02:31 +0000 (10:02 -1000)]
target/sh4: Handle user-space atomics

For uniprocessors, SH4 uses optimistic restartable atomic sequences.
Upon an interrupt, a real kernel would simply notice magic values in
the registers and reset the PC to the start of the sequence.

For QEMU, we cannot do this in quite the same way.  Instead, we notice
the normal start of such a sequence (mov #-x,r15), and start a new TB
that can be executed under cpu_exec_step_atomic.

Reported-by: Bruno Haible <[email protected]>
LP: https://bugs.launchpad.net/bugs/1701971
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Adjust TB_FLAG_PENDING_MOVCA
Richard Henderson [Tue, 18 Jul 2017 20:02:30 +0000 (10:02 -1000)]
target/sh4: Adjust TB_FLAG_PENDING_MOVCA

Don't leave an unused bit after DELAY_SLOT_MASK.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Keep env->flags clean
Richard Henderson [Tue, 18 Jul 2017 20:02:29 +0000 (10:02 -1000)]
target/sh4: Keep env->flags clean

If we mask off any out-of-band bits before we assign to the
variable, then we don't need to clean it up when reading.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Introduce TB_FLAG_ENVFLAGS_MASK
Richard Henderson [Tue, 18 Jul 2017 20:02:28 +0000 (10:02 -1000)]
target/sh4: Introduce TB_FLAG_ENVFLAGS_MASK

We'll be putting more things into this bitmask soon.
Let's have a name that covers all possible uses.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: Consolidate end-of-TB tests
Richard Henderson [Tue, 18 Jul 2017 20:02:27 +0000 (10:02 -1000)]
target/sh4: Consolidate end-of-TB tests

We can fold 3 different tests within the decode loop
into a more accurate computation of max_insns to start.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20170718200255[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: return result of fcmp using TCG
Aurelien Jarno [Sun, 2 Jul 2017 19:31:25 +0000 (21:31 +0200)]
target/sh4: return result of fcmp using TCG

Since that the T bit of the SR register is mapped using a TGC global,
it's better to return the value through TCG than writing it directly. It
allows to declare the helpers with the flag TCG_CALL_NO_WG.

Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <20170702202814[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: do not use a helper to implement fneg
Aurelien Jarno [Sun, 2 Jul 2017 16:26:43 +0000 (18:26 +0200)]
target/sh4: do not use a helper to implement fneg

There is no need to use a helper to flip one bit, just use a TCG xor
instruction instead.

Message-Id: <20170702202814[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: fix FPSCR cause vs flag inversion
Aurelien Jarno [Sun, 2 Jul 2017 18:34:55 +0000 (20:34 +0200)]
target/sh4: fix FPSCR cause vs flag inversion

The floating-point status/control register contains cause and flag
bits. The cause bits are set to 0 before executing the instruction,
while the flag bits hold the status of the exception generated after
the field was last cleared.

Message-Id: <20170702202814[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: fix FPU unorderered compare
Aurelien Jarno [Sun, 2 Jul 2017 19:23:56 +0000 (21:23 +0200)]
target/sh4: fix FPU unorderered compare

In case of unordered compare, the fcmp instructions should either
trigger and invalid exception (if enabled) or set T=0. The existing code
left it unchanged.

LP: https://bugs.launchpad.net/qemu/+bug/1701821
Reported-by: Bruno Haible <[email protected]>
Message-Id: <20170702202814[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agotarget/sh4: do not check for PR bit for fabs instruction
Aurelien Jarno [Sun, 2 Jul 2017 16:18:14 +0000 (18:18 +0200)]
target/sh4: do not check for PR bit for fabs instruction

The SH4 manual is not fully clear about that, but real hardware do not
check for the PR bit, which allows to select between single or double
precision, for the fabs instruction. This is probably what is meant by
"Same operation is performed regardless of precision."

Remove the check, and at the same time use a TCG instruction instead of
a helper to clear one bit.

LP: https://bugs.launchpad.net/qemu/+bug/1701821
Reported-by: Bruno Haible <[email protected]>
Message-Id: <20170702202814[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
7 years agoxen: don't use xenstore to save/restore physmap anymore
Igor Druzhinin [Mon, 10 Jul 2017 22:40:03 +0000 (23:40 +0100)]
xen: don't use xenstore to save/restore physmap anymore

If we have a system with xenforeignmemory_map2() implemented
we don't need to save/restore physmap on suspend/restore
anymore. In case we resume a VM without physmap - try to
recreate the physmap during memory region restore phase and
remap map cache entries accordingly. The old code is left
for compatibility reasons.

Signed-off-by: Igor Druzhinin <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
7 years agoxen/mapcache: introduce xen_replace_cache_entry()
Igor Druzhinin [Mon, 10 Jul 2017 22:40:02 +0000 (23:40 +0100)]
xen/mapcache: introduce xen_replace_cache_entry()

This new call is trying to update a requested map cache entry
according to the changes in the physmap. The call is searching
for the entry, unmaps it and maps again at the same place using
a new guest address. If the mapping is dummy this call will
make it real.

This function makes use of a new xenforeignmemory_map2() call
with an extended interface that was recently introduced in
libxenforeignmemory [1].

[1] https://www.mail-archive.com/[email protected]/msg113007.html

Signed-off-by: Igor Druzhinin <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
7 years agoxen/mapcache: add an ability to create dummy mappings
Igor Druzhinin [Mon, 10 Jul 2017 22:40:01 +0000 (23:40 +0100)]
xen/mapcache: add an ability to create dummy mappings

Dummys are simple anonymous mappings that are placed instead
of regular foreign mappings in certain situations when we need
to postpone the actual mapping but still have to give a
memory region to QEMU to play with.

This is planned to be used for restore on Xen.

Signed-off-by: Igor Druzhinin <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
7 years agoxen: move physmap saving into a separate function
Igor Druzhinin [Mon, 10 Jul 2017 22:40:00 +0000 (23:40 +0100)]
xen: move physmap saving into a separate function

Non-functional change.

Signed-off-by: Igor Druzhinin <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
7 years agoxen-platform: separate unplugging of NVMe disks
Stefano Stabellini [Tue, 18 Jul 2017 20:28:12 +0000 (13:28 -0700)]
xen-platform: separate unplugging of NVMe disks

Commit 090fa1c8 "add support for unplugging NVMe disks..." extended the
existing disk unplug flag to cover NVMe disks as well as IDE and SCSI.

The recent thread on the xen-devel mailing list [1] has highlighted that
this is not desirable behaviour: PV frontends should be able to distinguish
NVMe disks from other types of disk and should have separate control over
whether they are unplugged.

This patch defines a new bit in the unplug mask for this purpose (see Xen
commit [2]) and also tidies up the definitions of, and improves the
comments regarding, the previously exiting bits in the protocol.

[1] https://lists.xen.org/archives/html/xen-devel/2017-03/msg02924.html
[2] http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=1096aa02

Signed-off-by: Paul Durrant <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
7 years agoxen_pt_msi.c: Check for xen_host_pci_get_* failures in xen_pt_msix_init()
Peter Maydell [Sun, 9 Jul 2017 16:37:22 +0000 (17:37 +0100)]
xen_pt_msi.c: Check for xen_host_pci_get_* failures in xen_pt_msix_init()

Check the return status of the xen_host_pci_get_* functions we call in
xen_pt_msix_init(), and fail device init if the reads failed rather than
ploughing ahead. (Spotted by Coverity: CID 777338.)

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
7 years agohw/xen: Set emu_mask for igd_opregion register
Xiong Zhang [Fri, 7 Jul 2017 04:07:58 +0000 (12:07 +0800)]
hw/xen: Set emu_mask for igd_opregion register

In igd passthrough environment, guest could only access opregion at the
first bootup time. Once guest shutdown, later guest couldn't access
opregion anymore.
This is because qemu set emulated guest opregion base address to host
register. Later guest get a wrong host opregion base address, and couldn't
access it anymore.

This patch set emu_mask for igd_opregion register, so guest won't set
guest opregion base address to host.

Signed-off-by: Xiong Zhang <[email protected]>
Acked-by: Anthony PERARD <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170718' into staging
Peter Maydell [Tue, 18 Jul 2017 20:13:48 +0000 (21:13 +0100)]
Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170718' into staging

s390: add z14 cpu model

- add a CPU model for the IBM z14 which was announced on July 17th 2017
- update linux headers to 4.13-rc0 to get a fix for an ioctl definition

# gpg: Signature made Tue 18 Jul 2017 09:56:24 BST
# gpg:                using RSA key 0x117BBC80B5A61C7C
# gpg: Good signature from "Christian Borntraeger (IBM) <[email protected]>"
# Primary key fingerprint: F922 9381 A334 08F9 DBAB  FBCA 117B BC80 B5A6 1C7C

* remotes/borntraeger/tags/s390x-20170718:
  s390x/cpumodel: z14 cpu models
  linux header sync against v4.13-rc1

Signed-off-by: Peter Maydell <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging
Peter Maydell [Tue, 18 Jul 2017 19:29:36 +0000 (20:29 +0100)]
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging

# gpg: Signature made Tue 18 Jul 2017 05:15:03 BST
# gpg:                using RSA key 0xBDBE7B27C0DE3057
# gpg: Good signature from "Jeffrey Cody <[email protected]>"
# gpg:                 aka "Jeffrey Cody <[email protected]>"
# gpg:                 aka "Jeffrey Cody <[email protected]>"
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* remotes/cody/tags/block-pull-request:
  live-block-ops.txt: Rename, rewrite, and improve it
  bitmaps.md: Convert to rST; move it into 'interop' dir

Signed-off-by: Peter Maydell <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-17' into staging
Peter Maydell [Tue, 18 Jul 2017 17:29:35 +0000 (18:29 +0100)]
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-17' into staging

nbd patches for 2017-07-17

- Eric Blake: nbd: Fix iotests failure due to changed client error message
- Eric Blake: [0/2] NBD fixes before softfreeze

# gpg: Signature made Mon 17 Jul 2017 23:12:20 BST
# gpg:                using RSA key 0xA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <[email protected]>"
# gpg:                 aka "Eric Blake (Free Software Programmer) <[email protected]>"
# gpg:                 aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2017-07-17:
  nbd: Fix server reply to NBD_OPT_EXPORT_NAME of older clients
  nbd: Trace client command being sent
  nbd: Fix iotests failure due to changed client error message

Signed-off-by: Peter Maydell <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/rth/tags/pull-s390-20170717' into staging
Peter Maydell [Tue, 18 Jul 2017 16:54:51 +0000 (17:54 +0100)]
Merge remote-tracking branch 'remotes/rth/tags/pull-s390-20170717' into staging

Queued s390x tcg patches, v2

# gpg: Signature made Mon 17 Jul 2017 22:22:23 BST
# gpg:                using RSA key 0xAD1270CC4DD0279B
# gpg: Good signature from "Richard Henderson <[email protected]>"
# gpg:                 aka "Richard Henderson <[email protected]>"
# gpg:                 aka "Richard Henderson <[email protected]>"
# Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B

* remotes/rth/tags/pull-s390-20170717:
  target/s390x: Fix risbg handling
  target/s390x: Allow to enable "idtes" feature for TCG
  target/s390x: Mark ETF3 and ETF3_ENH facilities as available
  target/s390x: Implement TRTR
  target/s390x: Implement SRSTU
  target/s390x: Tidy SRST
  target/s390x: Implement CONVERT UNICODE insns
  target/s390x: Implement CSST

Signed-off-by: Peter Maydell <[email protected]>
7 years agotests/ahci-test: Be mean with RAM
Dr. David Alan Gilbert [Tue, 18 Jul 2017 15:47:57 +0000 (11:47 -0400)]
tests/ahci-test: Be mean with RAM

The migration tests used two VMs each with -m 1024 this caused
problems when run in some small, pessimistic test VMs (netbsd).
We can just be meaner with the amount of RAM in the test and use -m 384

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Message-id: 20170714152820[email protected]
Reviewed-by: John Snow <[email protected]>
Signed-off-by: John Snow <[email protected]>
7 years agoahci: split public and private interface
John Snow [Tue, 18 Jul 2017 15:47:57 +0000 (11:47 -0400)]
ahci: split public and private interface

Complete the split by renaming ahci_public.h --> ahci.h and
moving the current ahci.h to hw/ide/ahci_internal.h.

Adjust ahci_internal.h to now load ahci.h instead of ahci_public.h.

Finalize the split by switching external users to the new header.

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20170623220926[email protected]
Signed-off-by: John Snow <[email protected]>
7 years agoahci: Isolate public AHCI interface
John Snow [Tue, 18 Jul 2017 15:47:57 +0000 (11:47 -0400)]
ahci: Isolate public AHCI interface

Begin separating the public/private interface by removing the minimum
set of information used by code outside of hw/ide/ and calling this
a new ahci_public.h file, which will be renamed to ahci.h in a future
patch.

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20170623220926[email protected]
Signed-off-by: John Snow <[email protected]>
7 years agoahci: add ahci_get_num_ports
John Snow [Tue, 18 Jul 2017 15:47:56 +0000 (11:47 -0400)]
ahci: add ahci_get_num_ports

Instead of reaching into the PCI state, allow the AHCIDevice to
respond with how many ports it has.

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20170623220926[email protected]
Signed-off-by: John Snow <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20170717.0' into...
Peter Maydell [Tue, 18 Jul 2017 15:43:47 +0000 (16:43 +0100)]
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20170717.0' into staging

VFIO fixes 2017-07-17

 - Init re-order to better support hot-add on SPAR (Alexey Kardashevskiy)

# gpg: Signature made Mon 17 Jul 2017 21:33:01 BST
# gpg:                using RSA key 0x239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <[email protected]>"
# gpg:                 aka "Alex Williamson <[email protected]>"
# gpg:                 aka "Alex Williamson <[email protected]>"
# gpg:                 aka "Alex Williamson <[email protected]>"
# Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22

* remotes/awilliam/tags/vfio-updates-20170717.0:
  vfio-pci, ppc64/spapr: Reorder group-to-container attaching

Signed-off-by: Peter Maydell <[email protected]>
7 years agomigration: check global caps for validity
Peter Xu [Tue, 18 Jul 2017 03:39:10 +0000 (11:39 +0800)]
migration: check global caps for validity

Checks validity for all the capabilities that we enabled with command
line.

Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: provide migrate_cap_add()
Peter Xu [Tue, 18 Jul 2017 03:39:09 +0000 (11:39 +0800)]
migration: provide migrate_cap_add()

Abstracted from migrate_set_block_enabled() to allocate
MigrationCapabilityStatusList properly.

Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: provide migrate_caps_check()
Peter Xu [Tue, 18 Jul 2017 03:39:08 +0000 (11:39 +0800)]
migration: provide migrate_caps_check()

Abstract helper function to check migration capabilities (from the old
qmp_migrate_set_capabilities).  Prepare to be used somewhere else.

There is side effect on the change: when applying the capabilities, we
were skipping the invalid ones, but still applying the valid ones (if
they are provided in the same QMP request). After this refactoring,
we'll ignore all the capabilities if we detected invalid setup along the
way. However, I don't think it is a problem since general users should
not provide anything invalid after all.

Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: remove check against colo support
Peter Xu [Tue, 18 Jul 2017 03:39:07 +0000 (11:39 +0800)]
migration: remove check against colo support

Since commit a15215f3 ("build: remove --enable-colo/--disable-colo"),
colo is always supported. We don't need any colo_supported() now since
it is always true. Removing any extra code that depends on it.

CC: Paolo Bonzini <[email protected]>
CC: Hailiang Zhang <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Reviewed-by: Zhang Chen<[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: check global params for validity
Peter Xu [Tue, 18 Jul 2017 03:39:06 +0000 (11:39 +0800)]
migration: check global params for validity

Adding validity check for the migration parameters passed in via global
properties.

Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: provide migrate_params_apply()
Peter Xu [Tue, 18 Jul 2017 03:39:05 +0000 (11:39 +0800)]
migration: provide migrate_params_apply()

Abstracted from qmp_migrate_set_parameters().

Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: introduce migrate_params_check()
Peter Xu [Tue, 18 Jul 2017 03:39:04 +0000 (11:39 +0800)]
migration: introduce migrate_params_check()

Helper to check the parameters. Abstracted from
qmp_migrate_set_parameters().

Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: export capabilities to props
Peter Xu [Tue, 18 Jul 2017 03:39:03 +0000 (11:39 +0800)]
migration: export capabilities to props

Do the same thing to migration capabilities, just like what we did in
previous patch for migration parameters.

Reviewed-by: Juan Quintela <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: export parameters to props
Peter Xu [Tue, 18 Jul 2017 03:39:02 +0000 (11:39 +0800)]
migration: export parameters to props

Export migration parameters to qdev properties. Then we can use, for
example:

  -global migration.x-cpu-throttle-initial=xxx

To specify migration parameters during init.

Prefix "x-" is appended for each parameter exported to show that this is
not a stable interface, and only for debugging/testing purpose.

Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agoqdev: provide DEFINE_PROP_INT64()
Peter Xu [Tue, 18 Jul 2017 03:39:01 +0000 (11:39 +0800)]
qdev: provide DEFINE_PROP_INT64()

We have nearly all the stuff, but this one is missing. Add it in.

Am going to use this new helper for MigrationParameters fields, since
most of them are int64_t.

CC: Markus Armbruster <[email protected]>
CC: Eduardo Habkost <[email protected]>
CC: Marc-André Lureau <[email protected]>
CC: Peter Xu <[email protected]>
CC: Juan Quintela <[email protected]>
CC: Marcel Apfelbaum <[email protected]>
CC: Eric Blake <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1500349150[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration/rdma: Send error during cancelling
Dr. David Alan Gilbert [Mon, 17 Jul 2017 11:09:36 +0000 (12:09 +0100)]
migration/rdma: Send error during cancelling

When we issue a cancel and clean up the RDMA channel
send a CONTROL_ERROR to get the destination to quit.

The rdma_cleanup code waits for the event to come back
from the rdma_disconnect; but that wont happen until the
destination quits and there's currently nothing to force
it.

Note this makes the case of a cancel work while the destination
is alive, and it already works if the destination is
truly dead.  Note it doesn't fix the case where the destination
is hung (we get stuck waiting for the rdma_disconnect event).

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration/rdma: Safely convert control types
Dr. David Alan Gilbert [Mon, 17 Jul 2017 11:09:35 +0000 (12:09 +0100)]
migration/rdma: Safely convert control types

control_desc[] is an array of strings that correspond to a
series of message types; they're used only for error messages, but if
the message type is seriously broken then we could go off the end of
the array.

Convert the array to a function control_desc() that bound checks.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration/rdma: Allow cancelling while waiting for wrid
Dr. David Alan Gilbert [Mon, 17 Jul 2017 11:09:34 +0000 (12:09 +0100)]
migration/rdma: Allow cancelling while waiting for wrid

When waiting for a WRID, if the other side dies we end up waiting
for ever with no way to cancel the migration.
Cure this by poll()ing the fd first with a timeout and checking
error flags and migration state.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration/rdma: fix qemu_rdma_block_for_wrid error paths
Dr. David Alan Gilbert [Mon, 17 Jul 2017 11:09:33 +0000 (12:09 +0100)]
migration/rdma: fix qemu_rdma_block_for_wrid error paths

The two places that 'goto err_block_for_wrid' weren't setting ret
and so would end up returning 0 even though we've failed.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration: Close file on failed migration load
Dr. David Alan Gilbert [Mon, 17 Jul 2017 11:09:32 +0000 (12:09 +0100)]
migration: Close file on failed migration load

Closing the file before exit on a failure allows
the source to cleanup better, especially with RDMA.

Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agomigration/rdma: Fix race on source
Dr. David Alan Gilbert [Mon, 17 Jul 2017 11:09:31 +0000 (12:09 +0100)]
migration/rdma: Fix race on source

Fix a race where the destination might try and send the source a
WRID_READY before the source has done a post-recv for it.

rdma_post_recv has to happen after the qp exists, and we're
OK since we've already called qemu_rdma_source_init that calls
qemu_alloc_qp.

This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=1285044

The race can be triggered by adding a few ms wait before this
post_recv_control (which was originally due to me turning on loads of
debug).

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request...
Peter Maydell [Tue, 18 Jul 2017 14:24:11 +0000 (15:24 +0100)]
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging

x86 and machine queue, 2017-07-17

# gpg: Signature made Mon 17 Jul 2017 19:46:14 BST
# gpg:                using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <[email protected]>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/x86-and-machine-pull-request:
  qmp: Include parent type on 'qom-list-types' output
  qmp: Include 'abstract' field on 'qom-list-types' output
  tests: Simplify abstract-interfaces check with a helper
  i386: add Skylake-Server cpu model
  i386: Update comment about XSAVES on Skylake-Client
  i386: expose "TCGTCGTCGTCG" in the 0x40000000 CPUID leaf
  fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h
  fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers
  fw_cfg: switch fw_cfg_find() to locate the fw_cfg device by type rather than path
  qom: Fix ambiguous path detection when ambiguous=NULL
  Revert "machine: Convert abstract typename on compat_props to subclass names"
  test-qdev-global-props: Test global property ordering
  qdev: fix the order compat and global properties are applied
  tests: Test case for object_resolve_path*()
  device-crash-test: Fix regexp on whitelist

Signed-off-by: Peter Maydell <[email protected]>
7 years agoqemu-img: Check for backing image if specified during create
John Snow [Tue, 18 Jul 2017 00:34:22 +0000 (20:34 -0400)]
qemu-img: Check for backing image if specified during create

Or, rather, force the open of a backing image if one was specified
for creation. Using a similar -unsafe option as rebase, allow qemu-img
to ignore the backing file validation if possible.

It may not always be possible, as in the existing case when a filesize
for the new image was not specified.

This is accomplished by shifting around the conditionals in
bdrv_img_create, such that a backing file is always opened unless we
provide BDRV_O_NO_BACKING. qemu-img is adjusted to pass this new flag
when -u is provided to create.

Sorry for the heinous looking diffstat, but it's mostly whitespace.

Inspired by: https://bugzilla.redhat.com/show_bug.cgi?id=1213786

Signed-off-by: John Snow <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agoblockdev: move BDRV_O_NO_BACKING option forward
John Snow [Tue, 18 Jul 2017 00:34:21 +0000 (20:34 -0400)]
blockdev: move BDRV_O_NO_BACKING option forward

For both external_snapshot_prepare and qmp_drive_mirror, we eventually
append the option BDRV_O_NO_BACKING. However, we generally do so after
we create the image.

To accommodate image creation wanting to verify that a backing file
exists or not, add this option prior to create to override checking
the existence of the backing file. This prevents QEMU from trying to
re-open a backing file that's already in use (thanks to qcow2 locking).

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agoblock/vvfat: Fix compiler warning with gcc 7
Max Reitz [Mon, 17 Jul 2017 15:12:07 +0000 (17:12 +0200)]
block/vvfat: Fix compiler warning with gcc 7

gcc 7 complains that the sprintf() might write a null byte beyond the
end of the tail buffer.  That is wrong, but we can silence it by making
i unsigned (it can never be negative anyway, see the if condition right
before).  For some reason, this allows gcc to suddenly accurately
calculate the range of i so we can give the tail[] array the exact size
it needs to have (which is 8 bytes) without gcc complaining.

In addition, let us convert the sprintf() to snprintf(), because that is
always nicer, and add an assertion about the range of the return value
afterwards so we can see that "8 - len" will never be negative and thus
"entry->name + MIN(j, 8 - len)" will never be out of bounds.

Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agovvfat: initialize memory after allocating it
Hervé Poussineau [Sat, 15 Jul 2017 13:28:41 +0000 (15:28 +0200)]
vvfat: initialize memory after allocating it

This prevents some host to guest memory content leaks.

Fixes: https://bugs.launchpad.net/qemu/+bug/1599539
Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agovvfat: correctly parse non-ASCII short and long file names
Hervé Poussineau [Sat, 15 Jul 2017 13:28:40 +0000 (15:28 +0200)]
vvfat: correctly parse non-ASCII short and long file names

Write support works again when image contains non-ASCII names. It is either the
case when user created a non-ASCII filename, or when initial directory contained
a non-ASCII filename (since 0c36111f57ec2188f679e7fa810291b7386bdca1)

Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agovvfat: add a constant for bootsector name
Hervé Poussineau [Sat, 15 Jul 2017 13:28:39 +0000 (15:28 +0200)]
vvfat: add a constant for bootsector name

Also add links to related compatibility problems.

Signed-off-by: Hervé Poussineau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agovvfat: add constants for special values of name[0]
Hervé Poussineau [Sat, 15 Jul 2017 13:28:38 +0000 (15:28 +0200)]
vvfat: add constants for special values of name[0]

Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agoqemu-iotests: Test unplug of -device without drive
Kevin Wolf [Wed, 12 Jul 2017 11:53:03 +0000 (13:53 +0200)]
qemu-iotests: Test unplug of -device without drive

This caused an assertion failure until recently because the BlockBackend
would be detached on unplug, but was in fact never attached in the first
place. Add a regression test.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoqemu-iotests: Test 'info block'
Kevin Wolf [Wed, 12 Jul 2017 11:36:06 +0000 (13:36 +0200)]
qemu-iotests: Test 'info block'

This test makes sure that all block devices show up on 'info block',
with all of the expected information, in different configurations.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoscsi-disk: bdrv_attach_dev() for empty CD-ROM
Kevin Wolf [Tue, 11 Jul 2017 12:04:08 +0000 (14:04 +0200)]
scsi-disk: bdrv_attach_dev() for empty CD-ROM

If no drive=... option is passed (for an empty drive), we don't only
lack the BlockBackend normally created by parse_drive(), but we also
need to manually call blk_attach_dev().

This fixes at least a segfault when unplugging such devices, the bug
that they didn't show up in query-block, and probably some more
problems.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoide: bdrv_attach_dev() for empty CD-ROM
Kevin Wolf [Tue, 11 Jul 2017 12:04:08 +0000 (14:04 +0200)]
ide: bdrv_attach_dev() for empty CD-ROM

If no drive=... option is passed (for an empty drive), we don't only
lack the BlockBackend normally created by parse_drive(), but we also
need to manually call blk_attach_dev().

IDE does not support hot unplug, but if it did, qdev would take care to
call the matching blk_detach_dev() on unplug.

This fixes at least the bug that such devices didn't show up in
query-block, and probably some more problems.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoblock: List anonymous device BBs in query-block
Kevin Wolf [Tue, 11 Jul 2017 12:00:57 +0000 (14:00 +0200)]
block: List anonymous device BBs in query-block

Instead of listing only monitor-owned BlockBackends in query-block, also
add those anonymous BlockBackends that are owned by a qdev device and as
such under the control of the user.

This allows using query-block to inspect BlockBackends for the modern
configuration syntax with -blockdev and -device.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoblock/qapi: Use blk_all_next() for query-block
Kevin Wolf [Tue, 11 Jul 2017 11:04:28 +0000 (13:04 +0200)]
block/qapi: Use blk_all_next() for query-block

This patch replaces the blk_next() loop in query-block by a
blk_all_next() one so that we also get access to BlockBackends that
aren't owned by the monitor. For now, the next thing we do is check
whether each BB has a name, so there is no semantic difference.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoblock: Make blk_all_next() public
Kevin Wolf [Tue, 11 Jul 2017 12:06:04 +0000 (14:06 +0200)]
block: Make blk_all_next() public

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoblock/qapi: Add qdev device name to query-block
Kevin Wolf [Tue, 11 Jul 2017 11:27:38 +0000 (13:27 +0200)]
block/qapi: Add qdev device name to query-block

With -blockdev/-device, users can indirectly create anonymous
BlockBackends, while the state of such backends is still of interest. As
a preparation for making such BBs visible in query-block, make sure that
they can be identified even without a name by adding the ID/QOM path of
their qdev device to BlockInfo.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoblock: Make blk_get_attached_dev_id() public
Kevin Wolf [Tue, 11 Jul 2017 11:26:59 +0000 (13:26 +0200)]
block: Make blk_get_attached_dev_id() public

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
7 years agoblock/vpc.c: Handle write failures in get_image_offset()
Peter Maydell [Sun, 9 Jul 2017 21:07:17 +0000 (22:07 +0100)]
block/vpc.c: Handle write failures in get_image_offset()

Coverity (CID 1355236) points out that get_image_offset() doesn't check that
it actually succeeded in writing the updated block bitmap to the file.
Check the error return from bdrv_pwrite_sync() and propagate an error
response back up to the function which calls get_image_offset() for
a write so that it can return the error to its caller.

get_sector_offset() is only used for reads, but we move it to the
same API for consistency.

Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agoblock/vmdk: Report failures in vmdk_read_cid()
Peter Maydell [Sun, 9 Jul 2017 17:06:14 +0000 (18:06 +0100)]
block/vmdk: Report failures in vmdk_read_cid()

The function vmdk_read_cid() can fail if the read on the underlying
block device fails, or if there's a format error in the VMDK file.
However its API doesn't provide a mechanism to report these errors,
and in some cases we were returning a CID of 0 and in some cases a
CID of 0xffffffff, either of which might potentially be valid values.

Change the function to return 0 on success or a negative errno, and
return the CID via a uint32_t* argument. Update the callsites to
handle and propagate the error appropriately.

This fixes in passing a Coverity-spotted issue (CID 1350038) where
we weren't checking the return value from sscanf().

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agoblock: remove timer canceling in throttle_config()
Manos Pitsidianakis [Sun, 2 Jul 2017 10:06:46 +0000 (13:06 +0300)]
block: remove timer canceling in throttle_config()

throttle_config() cancels the timers of the calling BlockBackend. This
doesn't make sense because other BlockBackends in the group remain
untouched. There's no need to cancel the timers in the one specific
BlockBackend so let's not do that. Throttled requests will run as
scheduled and future requests will follow the new configuration. This
also allows a throttle group's configuration to be changed even when it
has no members.

Signed-off-by: Manos Pitsidianakis <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agoblock: add clock_type field to ThrottleGroup
Manos Pitsidianakis [Sun, 2 Jul 2017 10:06:45 +0000 (13:06 +0300)]
block: add clock_type field to ThrottleGroup

Clock type in throttling is currently inferred by the ThrottleTimer's
clock type even though it is a per-ThrottleGroup property; it doesn't
make sense to have different clock types in the same group. Moving this
to a field in ThrottleGroup can simplify some of the throttle functions.

Signed-off-by: Manos Pitsidianakis <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
7 years agocommit: Add NULL check for overlay_bs
Kevin Wolf [Mon, 10 Jul 2017 11:42:35 +0000 (13:42 +0200)]
commit: Add NULL check for overlay_bs

I can't see how overlay_bs could become NULL with the current code, but
other code in this function already checks it and we can make Coverity
happy with this check, so let's add it.

Cc: [email protected]
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2017-07-17-v2-tag' into...
Peter Maydell [Tue, 18 Jul 2017 13:14:32 +0000 (14:14 +0100)]
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2017-07-17-v2-tag' into staging

qemu-ga patch queue

* new command: qemu-get-osinfo
* build fix for OpenBSD
* better error-reporting for failure on keyfile dump
* remove redundant initialization of qa_state global
* include libpcre in w32 package
* w32 localization fixes for service installation/registration

v2:
* fix build issue with older GCCs introduced with guest_get_osinfo
* relocated some declarations in guest_get_osinfo

# gpg: Signature made Tue 18 Jul 2017 11:52:45 BST
# gpg:                using RSA key 0x3353C9CEF108B584
# gpg: Good signature from "Michael Roth <[email protected]>"
# gpg:                 aka "Michael Roth <[email protected]>"
# gpg:                 aka "Michael Roth <[email protected]>"
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2017-07-17-v2-tag:
  test-qga: add test for guest-get-osinfo
  test-qga: pass environemnt to qemu-ga
  qemu-ga: add guest-get-osinfo command
  qga: report error on keyfile dump error
  qga-win32: remove a redundancy code
  qemu-ga: check if utmpx.h is available on the system
  qemu-ga: add missing libpcre to MSI build
  qga-win: fix installation on localized windows

Signed-off-by: Peter Maydell <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Peter Maydell [Tue, 18 Jul 2017 12:09:51 +0000 (13:09 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

# gpg: Signature made Mon 17 Jul 2017 16:40:18 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <[email protected]>"
# gpg:                 aka "Stefan Hajnoczi <[email protected]>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  block: fix shadowed variable in bdrv_co_pdiscard
  util/aio-win32: Only select on what we are actually waiting for

Signed-off-by: Peter Maydell <[email protected]>
7 years agotest-qga: add test for guest-get-osinfo
Tomáš Golembiovský [Fri, 14 Jul 2017 14:28:58 +0000 (16:28 +0200)]
test-qga: add test for guest-get-osinfo

Add test for guest-get-osinfo command.

Qemu-ga was modified to accept QGA_OS_RELEASE environment variable. If
the variable is defined it is interpreted as path to the os-release file
and it is parsed instead of the default paths.

Signed-off-by: Tomáš Golembiovský <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
* move declarations to beginning of functions
Signed-off-by: Michael Roth <[email protected]>
7 years agotest-qga: pass environemnt to qemu-ga
Tomáš Golembiovský [Fri, 14 Jul 2017 14:28:57 +0000 (16:28 +0200)]
test-qga: pass environemnt to qemu-ga

Modify fixture_setup() to pass environemnt variables to spawned qemu-ga
instance.

Signed-off-by: Tomáš Golembiovský <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
7 years agoqemu-ga: add guest-get-osinfo command
Tomáš Golembiovský [Fri, 14 Jul 2017 14:28:56 +0000 (16:28 +0200)]
qemu-ga: add guest-get-osinfo command

Add a new 'guest-get-osinfo' command for reporting basic information of
the guest operating system. This includes machine architecture,
version and release of the kernel and several fields from os-release
file if it is present (as defined in [1]).

[1] https://www.freedesktop.org/software/systemd/man/os-release.html

Signed-off-by: Vinzenz Feenstra <[email protected]>
Signed-off-by: Tomáš Golembiovský <[email protected]>
* moved declarations to beginning of functions
* dropped unecessary initialization of struct utsname
Signed-off-by: Michael Roth <[email protected]>
7 years agoMerge remote-tracking branch 'remotes/aurel/tags/pull-target-mips-20170717' into...
Peter Maydell [Tue, 18 Jul 2017 10:41:03 +0000 (11:41 +0100)]
Merge remote-tracking branch 'remotes/aurel/tags/pull-target-mips-20170717' into staging

Queued target/mips patches

# gpg: Signature made Mon 17 Jul 2017 15:50:27 BST
# gpg:                using RSA key 0xBA9C78061DDD8C9B
# gpg: Good signature from "Aurelien Jarno <[email protected]>"
# gpg:                 aka "Aurelien Jarno <[email protected]>"
# gpg:                 aka "Aurelien Jarno <[email protected]>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 7746 2642 A9EF 94FD 0F77  196D BA9C 7806 1DDD 8C9B

* remotes/aurel/tags/pull-target-mips-20170717:
  target/mips: optimize WSBH, DSBH and DSHD
  mips: set CP0 Debug DExcCode for SDBBP instruction

Signed-off-by: Peter Maydell <[email protected]>
7 years agodocker: install clang since Shippable setup_ve() verify it is available
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 02:47:13 +0000 (23:47 -0300)]
docker: install clang since Shippable setup_ve() verify it is available

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: warn users to use newer debian8/debian9 base image
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 02:47:12 +0000 (23:47 -0300)]
docker: warn users to use newer debian8/debian9 base image

to stay backward incompatible.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add debian Ports base image
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 02:47:11 +0000 (23:47 -0300)]
docker: add debian Ports base image

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: add win32/64 targets
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 02:47:10 +0000 (23:47 -0300)]
shippable: add win32/64 targets

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add MXE (M cross environment) base image for MinGW-w64
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 02:47:09 +0000 (23:47 -0300)]
docker: add MXE (M cross environment) base image for MinGW-w64

see http://mxe.cc/

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: add mips64el targets
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:56 +0000 (21:31 -0300)]
shippable: add mips64el targets

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add debian/mips64el image
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:55 +0000 (21:31 -0300)]
docker: add debian/mips64el image

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: use debian/mips[eb] targets
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:54 +0000 (21:31 -0300)]
shippable: use debian/mips[eb] targets

previous commit change image mips little -> big endian

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add debian/mips[eb] images
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:53 +0000 (21:31 -0300)]
docker: add debian/mips[eb] images

change image mips little -> big endian

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: add powerpc target
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:52 +0000 (21:31 -0300)]
shippable: add powerpc target

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add debian/powerpc based on Jessie
Alex Bennée [Tue, 18 Jul 2017 00:31:51 +0000 (21:31 -0300)]
docker: add debian/powerpc based on Jessie

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
[AJB: split from merged patch]
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add 'apt-fake' script which generate fake debian packages
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:50 +0000 (21:31 -0300)]
docker: add 'apt-fake' script which generate fake debian packages

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: add qemu:debian-jessie based on outdated jessie release
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:49 +0000 (21:31 -0300)]
docker: add qemu:debian-jessie based on outdated jessie release

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: add x86_64 targets
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:47 +0000 (21:31 -0300)]
shippable: add x86_64 targets

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
[AJB: minor tweak to name]
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: add ppc64el targets
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:46 +0000 (21:31 -0300)]
shippable: add ppc64el targets

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agoshippable: add armel targets
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:45 +0000 (21:31 -0300)]
shippable: add armel targets

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: enable nettle to extend code coverage on arm64
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:44 +0000 (21:31 -0300)]
docker: enable nettle to extend code coverage on arm64

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
7 years agodocker: enable gcrypt to extend code coverage on amd64
Philippe Mathieu-Daudé [Tue, 18 Jul 2017 00:31:43 +0000 (21:31 -0300)]
docker: enable gcrypt to extend code coverage on amd64

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
This page took 0.089488 seconds and 4 git commands to generate.