OSDN Git Service

qmiga/qemu.git
8 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-travis-20160621-1' into staging
Peter Maydell [Tue, 21 Jun 2016 14:19:58 +0000 (15:19 +0100)]
Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-20160621-1' into staging

This pull request contains:

  - disable sparse testing
  - add trusty build target
  - add libnfs-dev for NFS block driver

These are the same patches posted last week for any last minute review.

# gpg: Signature made Tue 21 Jun 2016 10:06:34 BST
# gpg:                using RSA key 0xFBD0DB095A9E2A44
# gpg: Good signature from "Alex BennĂ©e (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-travis-20160621-1:
  .travis.yml: disable Sparse testing
  .travis.yml: add trusty GCE target
  .travis.yml: add libnfs-dev for NFS block driver

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agomilkymist: fix tmu2.c build failure (missing error.h include)
Gerd Hoffmann [Tue, 21 Jun 2016 10:11:51 +0000 (12:11 +0200)]
milkymist: fix tmu2.c build failure (missing error.h include)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging
Peter Maydell [Tue, 21 Jun 2016 09:36:16 +0000 (10:36 +0100)]
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging

qemu-sparc update

# gpg: Signature made Mon 20 Jun 2016 21:55:23 BST
# gpg:                using RSA key 0x5BC2C56FAE0F321F
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-sparc-signed:
  MAINTAINERS: remove Blue Swirl as SPARC maintainer
  MAINTAINERS: add Artyom Tarasenko as SPARC maintainer

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Peter Maydell [Mon, 20 Jun 2016 21:30:34 +0000 (22:30 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

# gpg: Signature made Mon 20 Jun 2016 21:29:27 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request: (42 commits)
  trace: split out trace events for linux-user/ directory
  trace: split out trace events for qom/ directory
  trace: split out trace events for target-ppc/ directory
  trace: split out trace events for target-s390x/ directory
  trace: split out trace events for target-sparc/ directory
  trace: split out trace events for net/ directory
  trace: split out trace events for audio/ directory
  trace: split out trace events for ui/ directory
  trace: split out trace events for hw/alpha/ directory
  trace: split out trace events for hw/arm/ directory
  trace: split out trace events for hw/acpi/ directory
  trace: split out trace events for hw/vfio/ directory
  trace: split out trace events for hw/s390x/ directory
  trace: split out trace events for hw/pci/ directory
  trace: split out trace events for hw/ppc/ directory
  trace: split out trace events for hw/9pfs/ directory
  trace: split out trace events for hw/i386/ directory
  trace: split out trace events for hw/isa/ directory
  trace: split out trace events for hw/sd/ directory
  trace: split out trace events for hw/sparc/ directory
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMAINTAINERS: remove Blue Swirl as SPARC maintainer
Mark Cave-Ayland [Mon, 20 Jun 2016 20:55:16 +0000 (21:55 +0100)]
MAINTAINERS: remove Blue Swirl as SPARC maintainer

Blue is no longer active in the QEMU project, so remove him from the list of
SPARC maintainers.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Blue Swirl <blauwirbel@gmail.com>
8 years agoMAINTAINERS: add Artyom Tarasenko as SPARC maintainer
Mark Cave-Ayland [Mon, 20 Jun 2016 20:55:16 +0000 (21:55 +0100)]
MAINTAINERS: add Artyom Tarasenko as SPARC maintainer

Artyom has been working on QEMU's SPARC emulation for several years, providing
initial support for Solaris under qemu-system-sparc and more recently bugfixes
for qemu-system-sparc64 and TCG patch reviews. As work progresses on improving
emulation for sun4u machines and beyond, Artyom has agreed to take on
co-maintainership of SPARC with a focus on 64-bit architecture.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
8 years agoMerge remote-tracking branch 'remotes/mwalle/tags/lm32-queue/20160620' into staging
Peter Maydell [Mon, 20 Jun 2016 17:14:26 +0000 (18:14 +0100)]
Merge remote-tracking branch 'remotes/mwalle/tags/lm32-queue/20160620' into staging

lm32/milkymist: some qomifying

# gpg: Signature made Mon 20 Jun 2016 17:27:53 BST
# gpg:                using RSA key 0xB458ABB0D8D378E3
# gpg: Good signature from "Michael Walle <michael@walle.cc>"
# 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: 2190 3E48 4537 A7C2 90CE  3EB2 B458 ABB0 D8D3 78E3

* remotes/mwalle/tags/lm32-queue/20160620:
  milkymist: update specification URLs
  hw/intc: QOM'ify lm32_pic.c
  hw/display: QOM'ify milkymist-vgafb.c
  hw/display: QOM'ify milkymist-tmu2.c
  hw/timer: QOM'ify milkymist_sysctl
  hw/timer: QOM'ify lm32_timer

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agotrace: split out trace events for linux-user/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:26 +0000 (09:40 +0100)]
trace: split out trace events for linux-user/ directory

Move all trace-events for files in the linux-user/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-id: 1466066426-16657-41-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for qom/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:25 +0000 (09:40 +0100)]
trace: split out trace events for qom/ directory

Move all trace-events for files in the qom/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-40-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for target-ppc/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:24 +0000 (09:40 +0100)]
trace: split out trace events for target-ppc/ directory

Move all trace-events for files in the target-ppc/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 1466066426-16657-39-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for target-s390x/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:23 +0000 (09:40 +0100)]
trace: split out trace events for target-s390x/ directory

Move all trace-events for files in the target-s390x/ directory to
their own file.

[Added missing newline in target-s390x/trace-events as suggested by
Cornelia Huck <cornelia.huck@de.ibm.com>.
--Stefan]

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id: 1466066426-16657-38-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for target-sparc/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:22 +0000 (09:40 +0100)]
trace: split out trace events for target-sparc/ directory

Move all trace-events for files in the target-sparc/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-37-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for net/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:21 +0000 (09:40 +0100)]
trace: split out trace events for net/ directory

Move all trace-events for files in the net/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-36-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for audio/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:20 +0000 (09:40 +0100)]
trace: split out trace events for audio/ directory

Move all trace-events for files in the audio/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-35-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for ui/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:19 +0000 (09:40 +0100)]
trace: split out trace events for ui/ directory

Move all trace-events for files in the ui/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-34-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/alpha/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:18 +0000 (09:40 +0100)]
trace: split out trace events for hw/alpha/ directory

Move all trace-events for files in the hw/alpha/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-33-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/arm/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:17 +0000 (09:40 +0100)]
trace: split out trace events for hw/arm/ directory

Move all trace-events for files in the hw/arm/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-32-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/acpi/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:16 +0000 (09:40 +0100)]
trace: split out trace events for hw/acpi/ directory

Move all trace-events for files in the hw/acpi/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-31-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/vfio/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:15 +0000 (09:40 +0100)]
trace: split out trace events for hw/vfio/ directory

Move all trace-events for files in the hw/vfio/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-30-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/s390x/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:14 +0000 (09:40 +0100)]
trace: split out trace events for hw/s390x/ directory

Move all trace-events for files in the hw/s390x/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id: 1466066426-16657-29-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/pci/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:13 +0000 (09:40 +0100)]
trace: split out trace events for hw/pci/ directory

Move all trace-events for files in the hw/pci/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-28-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/ppc/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:12 +0000 (09:40 +0100)]
trace: split out trace events for hw/ppc/ directory

Move all trace-events for files in the hw/ppc/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 1466066426-16657-27-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/9pfs/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:11 +0000 (09:40 +0100)]
trace: split out trace events for hw/9pfs/ directory

Move all trace-events for files in the hw/9pfs/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-26-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/i386/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:10 +0000 (09:40 +0100)]
trace: split out trace events for hw/i386/ directory

Move all trace-events for files in the hw/i386/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-25-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/isa/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:09 +0000 (09:40 +0100)]
trace: split out trace events for hw/isa/ directory

Move all trace-events for files in the hw/isa/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-24-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/sd/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:08 +0000 (09:40 +0100)]
trace: split out trace events for hw/sd/ directory

Move all trace-events for files in the hw/sd/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-23-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/sparc/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:07 +0000 (09:40 +0100)]
trace: split out trace events for hw/sparc/ directory

Move all trace-events for files in the hw/sparc/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-22-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/dma/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:06 +0000 (09:40 +0100)]
trace: split out trace events for hw/dma/ directory

Move all trace-events for files in the hw/dma/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-21-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/timer/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:05 +0000 (09:40 +0100)]
trace: split out trace events for hw/timer/ directory

Move all trace-events for files in the hw/timer/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-20-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/input/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:04 +0000 (09:40 +0100)]
trace: split out trace events for hw/input/ directory

Move all trace-events for files in the hw/input/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-19-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/display/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:03 +0000 (09:40 +0100)]
trace: split out trace events for hw/display/ directory

Move all trace-events for files in the hw/display/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-18-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/nvram/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:02 +0000 (09:40 +0100)]
trace: split out trace events for hw/nvram/ directory

Move all trace-events for files in the hw/nvram/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-17-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/scsi/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:01 +0000 (09:40 +0100)]
trace: split out trace events for hw/scsi/ directory

Move all trace-events for files in the hw/scsi/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-16-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/usb/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:40:00 +0000 (09:40 +0100)]
trace: split out trace events for hw/usb/ directory

Move all trace-events for files in the hw/usb/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-15-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/misc/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:59 +0000 (09:39 +0100)]
trace: split out trace events for hw/misc/ directory

Move all trace-events for files in the hw/misc/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-14-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/audio/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:58 +0000 (09:39 +0100)]
trace: split out trace events for hw/audio/ directory

Move all trace-events for files in the hw/audio/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-13-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/virtio/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:57 +0000 (09:39 +0100)]
trace: split out trace events for hw/virtio/ directory

Move all trace-events for files in the hw/virtio/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-12-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/net/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:56 +0000 (09:39 +0100)]
trace: split out trace events for hw/net/ directory

Move all trace-events for files in the hw/net/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-11-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/intc/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:55 +0000 (09:39 +0100)]
trace: split out trace events for hw/intc/ directory

Move all trace-events for files in the hw/intc/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-10-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/char/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:54 +0000 (09:39 +0100)]
trace: split out trace events for hw/char/ directory

Move all trace-events for files in the hw/char/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-9-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for hw/block/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:53 +0000 (09:39 +0100)]
trace: split out trace events for hw/block/ directory

Move all trace-events for files in the hw/block/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-8-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for block/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:52 +0000 (09:39 +0100)]
trace: split out trace events for block/ directory

Move all trace-events for files in the block/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-7-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for migration/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:51 +0000 (09:39 +0100)]
trace: split out trace events for migration/ directory

Move all trace-events for files in the migration/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-6-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for io/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:50 +0000 (09:39 +0100)]
trace: split out trace events for io/ directory

Move all trace-events for files in the io/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-5-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for crypto/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:49 +0000 (09:39 +0100)]
trace: split out trace events for crypto/ directory

Move all trace-events for files in the crypto/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-4-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: split out trace events for util/ directory
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:48 +0000 (09:39 +0100)]
trace: split out trace events for util/ directory

Move all trace-events for files in the util/ directory to
their own file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-3-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: add build framework for merging trace-events files
Daniel P. Berrange [Thu, 16 Jun 2016 08:39:47 +0000 (09:39 +0100)]
trace: add build framework for merging trace-events files

Switch make rules over to use trace-events-all as the
master trace events input file. Add rule that will
construct trace-events-all from $(trace-events-y).

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1466066426-16657-2-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agotrace: [all] Add "guest_mem_before" event
LluĂ­s Vilanova [Thu, 9 Jun 2016 17:31:47 +0000 (19:31 +0200)]
trace: [all] Add "guest_mem_before" event

The event is described in "trace-events". Note that the "MO_AMASK" flag
is not traced, since it does not seem to affect the visible semantics of
instructions.

[s/inline inline/inline/ to fix clang build.
--Stefan]

Signed-off-by: LluĂ­s Vilanova <vilanova@ac.upc.edu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 146549350711.18437.726780393247474362.stgit@fimbulvetr.bsc.es
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agomilkymist: update specification URLs
Michael Walle [Mon, 20 Jun 2016 16:08:41 +0000 (17:08 +0100)]
milkymist: update specification URLs

The old milkymist.org domain just forwards to mm-labs.hk nowadays. I've
created a mirror of the documents.

Signed-off-by: Michael Walle <michael@walle.cc>
8 years agohw/intc: QOM'ify lm32_pic.c
xiaoqiang zhao [Wed, 30 Mar 2016 10:09:27 +0000 (18:09 +0800)]
hw/intc: QOM'ify lm32_pic.c

Drop the old SysBus init function and use instance_init

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Acked-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Walle <michael@walle.cc>
8 years agohw/display: QOM'ify milkymist-vgafb.c
xiaoqiang zhao [Fri, 6 May 2016 10:59:34 +0000 (18:59 +0800)]
hw/display: QOM'ify milkymist-vgafb.c

* Drop the old SysBus init function and use instance_init
* Move graphic_console_init into realize stage

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Walle <michael@walle.cc>
8 years agohw/display: QOM'ify milkymist-tmu2.c
xiaoqiang zhao [Fri, 6 May 2016 10:59:33 +0000 (18:59 +0800)]
hw/display: QOM'ify milkymist-tmu2.c

* Drop the old SysBus init function and use instance_init
* Move tmu2_glx_init into realize stage

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Walle <michael@walle.cc>
8 years agohw/timer: QOM'ify milkymist_sysctl
xiaoqiang zhao [Mon, 22 Feb 2016 03:15:30 +0000 (11:15 +0800)]
hw/timer: QOM'ify milkymist_sysctl

* split the old SysBus init function into an instance_init
  and a Device realize function
* use DeviceClass::realize instead of SysBusDeviceClass::init

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Acked-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Walle <michael@walle.cc>
8 years agohw/timer: QOM'ify lm32_timer
xiaoqiang zhao [Mon, 22 Feb 2016 03:15:27 +0000 (11:15 +0800)]
hw/timer: QOM'ify lm32_timer

* split the old SysBus init function into an instance_init
  and a Device realize function
* use DeviceClass::realize instead of SysBusDeviceClass::init

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Acked-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Walle <michael@walle.cc>
8 years agoMerge remote-tracking branch 'remotes/armbru/tags/pull-error-2016-06-20' into staging
Peter Maydell [Mon, 20 Jun 2016 15:19:18 +0000 (16:19 +0100)]
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2016-06-20' into staging

Error reporting patches for 2016-06-20

# gpg: Signature made Mon 20 Jun 2016 15:56:15 BST
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2016-06-20:
  log: Fix qemu_set_log_filename() error handling
  log: Fix qemu_set_dfilter_ranges() error reporting
  log: Plug memory leak on multiple -dfilter
  coccinelle: Remove unnecessary variables for function return value
  error: Remove unnecessary local_err variables
  error: Remove NULL checks on error_propagate() calls
  vl: Error messages need to go to stderr, fix some

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agolog: Fix qemu_set_log_filename() error handling
Markus Armbruster [Wed, 15 Jun 2016 17:27:16 +0000 (19:27 +0200)]
log: Fix qemu_set_log_filename() error handling

When qemu_set_log_filename() detects an invalid file name, it reports
an error, closes the log file (if any), and starts logging to stderr
(unless daemonized or nothing is being logged).

This is wrong.  Asking for an invalid log file on the command line
should be fatal.  Asking for one in the monitor should fail without
messing up an existing logfile.

Fix by converting qemu_set_log_filename() to Error.  Pass it
&error_fatal, except for hmp_logfile report errors.

This also permits testing without a subprocess, so do that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1466011636-6112-4-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
8 years agolog: Fix qemu_set_dfilter_ranges() error reporting
Markus Armbruster [Wed, 15 Jun 2016 17:27:15 +0000 (19:27 +0200)]
log: Fix qemu_set_dfilter_ranges() error reporting

g_error() is not an acceptable way to report errors to the user:

    $ qemu-system-x86_64 -dfilter 1000+0

    ** (process:17187): ERROR **: Failed to parse range in: 1000+0
    Trace/breakpoint trap (core dumped)

g_assert() isn't, either:

    $ qemu-system-x86_64 -dfilter 1000x+64
    **
    ERROR:/work/armbru/qemu/util/log.c:180:qemu_set_dfilter_ranges: assertion failed: (e == range_op)
    Aborted (core dumped)

Convert qemu_set_dfilter_ranges() to Error.  Rework its deeply nested
control flow.  Touch up the error messages.  Call it with
&error_fatal.

This also permits testing without a subprocess, so do that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1466011636-6112-3-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
8 years agolog: Plug memory leak on multiple -dfilter
Markus Armbruster [Wed, 15 Jun 2016 17:27:14 +0000 (19:27 +0200)]
log: Plug memory leak on multiple -dfilter

-dfilter overwrites any previous filter.  The overwritten filter is
leaked.  Leaks since the beginning (commit 3514552, v2.6.0).  Free it
properly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1466011636-6112-2-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
8 years agococcinelle: Remove unnecessary variables for function return value
Eduardo Habkost [Mon, 13 Jun 2016 21:57:58 +0000 (18:57 -0300)]
coccinelle: Remove unnecessary variables for function return value

Use Coccinelle script to replace 'ret = E; return ret' with
'return E'. The script will do the substitution only when the
function return type and variable type are the same.

Manual fixups:

* audio/audio.c: coding style of "read (...)" and "write (...)"
* block/qcow2-cluster.c: wrap line to make it shorter
* block/qcow2-refcount.c: change indentation of wrapped line
* target-tricore/op_helper.c: fix coding style of
  "remainder|quotient"
* target-mips/dsp_helper.c: reverted changes because I don't
  want to argue about checkpatch.pl
* ui/qemu-pixman.c: fix line indentation
* block/rbd.c: restore blank line between declarations and
  statements

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1465855078-19435-4-git-send-email-ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Unused Coccinelle rule name dropped along with a redundant comment;
whitespace touched up in block/qcow2-cluster.c; stale commit message
paragraph deleted]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
8 years agoerror: Remove unnecessary local_err variables
Eduardo Habkost [Mon, 13 Jun 2016 21:57:57 +0000 (18:57 -0300)]
error: Remove unnecessary local_err variables

This patch simplifies code that uses a local_err variable just to
immediately use it for an error_propagate() call.

Coccinelle patch used to perform the changes added to
scripts/coccinelle/remove_local_err.cocci.

Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1465855078-19435-3-git-send-email-ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Blank line in s390-virtio-ccw.c restored]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
8 years agoerror: Remove NULL checks on error_propagate() calls
Eduardo Habkost [Mon, 13 Jun 2016 21:57:56 +0000 (18:57 -0300)]
error: Remove NULL checks on error_propagate() calls

error_propagate() already ignores local_err==NULL, so there's no
need to check it before calling.

Coccinelle patch used to perform the changes added to
scripts/coccinelle/error_propagate_null.cocci.

Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1465855078-19435-2-git-send-email-ehabkost@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
8 years agovl: Error messages need to go to stderr, fix some
Markus Armbruster [Tue, 31 May 2016 08:31:38 +0000 (10:31 +0200)]
vl: Error messages need to go to stderr, fix some

We print a few fatal error messages to stdout instead of stderr.
Reproducer:

    $ qemu-system-x86_64 -g 1024x768
    Option g not supported for this target
    $ qemu-system-x86_64 -g 1024x768 >/dev/null

Fix by printing them with error_report().  This also improves the messages.
The above one becomes

    qemu-system-x86_64: -g 1024x768: Option not supported for this target

Reported-by: Tobi {github.com/tobimensch}
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1464683498-28779-1-git-send-email-armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
8 years agoexec: [tcg] Track which vCPU is performing translation and execution
LluĂ­s Vilanova [Thu, 9 Jun 2016 17:31:41 +0000 (19:31 +0200)]
exec: [tcg] Track which vCPU is performing translation and execution

Information is tracked inside the TCGContext structure, and later used
by tracing events with the 'tcg' and 'vcpu' properties.

The 'cpu' field is used to check tracing of translation-time
events ("*_trans"). The 'tcg_env' field is used to pass it to
execution-time events ("*_exec").

Signed-off-by: LluĂ­s Vilanova <vilanova@ac.upc.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-id: 146549350162.18437.3033661139638458143.stgit@fimbulvetr.bsc.es
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agoMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Peter Maydell [Mon, 20 Jun 2016 14:07:56 +0000 (15:07 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

# gpg: Signature made Mon 20 Jun 2016 15:05:24 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  backup: follow AioContext change gracefully
  mirror: follow AioContext change gracefully
  blockjob: add AioContext attached callback
  block: use safe iteration over AioContext notifiers
  blockjob: add block_job_get_aio_context()
  blockjob: add pause points
  blockjob: rename block_job_is_paused()
  blockjob: move iostatus reset out of block_job_enter()
  block: process before_write_notifiers in bdrv_co_discard
  block: fix race in bdrv_co_discard with drive-mirror
  block: fixed BdrvTrackedRequest filling in bdrv_co_discard
  libqos: add qvirtqueue_cleanup()
  libqos: drop duplicated virtio_pci.h definitions
  libqos: drop duplicated virtio_scsi.h definitions
  libqos: drop duplicated virtio_blk.h definitions
  libqos: drop duplicated virtio_vring.h structs
  libqos: drop duplicated virtio_ring.h bit definitions
  libqos: drop duplicated virtio_config.h definitions
  libqos: drop duplicated PCI vendor ID definition
  libqos: use virtio_ids.h for device ID definitions

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agobackup: follow AioContext change gracefully
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:29 +0000 (17:56 +0100)]
backup: follow AioContext change gracefully

Move s->target to the new AioContext when there is an AioContext change.

The backup_run() coroutine does not use asynchronous I/O so there is no
need to wait for in-flight requests in a BlockJobDriver->pause()
callback.

Guest writes are intercepted by the backup job.  Treat them as guest
activity and do it even while the job is paused.  This is necessary
since the only alternative would be to fail a job that experienced guest
writes during pause once the job is resumed.  In practice the guest
writes don't interfere with AioContext switching since bdrv_drain() is
used by bdrv_set_aio_context().

Loops already contain pause points because of block_job_sleep_ns() calls
in the yield_and_check() helper function.  It is necessary to convert a
raw qemu_coroutine_yield() to block_job_yield() so the
MIRROR_SYNC_MODE_NONE case can pause.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-9-git-send-email-stefanha@redhat.com

8 years agomirror: follow AioContext change gracefully
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:28 +0000 (17:56 +0100)]
mirror: follow AioContext change gracefully

Add block_job_pause_point() calls to mark quiescent points and make sure
to complete in-flight requests when switching AioContexts.

This patch solves undefined behavior in the mirror block job when the
BDS AioContext is changed by dataplane.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-8-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agoblockjob: add AioContext attached callback
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:27 +0000 (17:56 +0100)]
blockjob: add AioContext attached callback

Block jobs that use additional BDSes or event loop resources need a
callback to get their affairs in order when the AioContext is switched.

Simple block jobs don't need an attach callback, they automatically work
thanks to the generic attach/detach notifiers that this patch adds.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-7-git-send-email-stefanha@redhat.com

8 years agoblock: use safe iteration over AioContext notifiers
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:26 +0000 (17:56 +0100)]
block: use safe iteration over AioContext notifiers

It's possible that an AioContext notifier user was close to finishing
when .detach_aio_context() or .attached_aio_context() is called.  In
that case they may call bdrv_remove_aio_context_notifier() during the
callback.

Use safe iteration to avoid crashing when the notifier list is modified
during iteration.  We must not only handle the case where the current
aio notifier is removed during a callback but also the one where any
other aio notifier is removed.

The next patch adds an AioContext notifier for block jobs and they
really could be terminating just as .detach_aio_context() is invoked.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-6-git-send-email-stefanha@redhat.com

8 years agoblockjob: add block_job_get_aio_context()
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:25 +0000 (17:56 +0100)]
blockjob: add block_job_get_aio_context()

Add a helper function to document why block jobs sometimes run in the
QEMU main loop and to avoid code duplication in a following patch.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-5-git-send-email-stefanha@redhat.com

8 years agoblockjob: add pause points
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:24 +0000 (17:56 +0100)]
blockjob: add pause points

Block jobs are coroutines that usually perform I/O but sometimes also
sleep or yield.  Currently only sleeping or yielded block jobs can be
paused.  This means jobs that do not sleep or yield (using
block_job_yield()) are unaffected by block_job_pause().

Add block_job_pause_point() so that block jobs can mark quiescent points
that are suitable for pausing.  This solves the problem that it can take
a block job a long time to pause if it is performing a long series of
I/O operations.

Transitioning to paused state involves a .pause()/.resume() callback.
These callbacks are used to ensure that I/O and event loop activity has
ceased while the job is at a pause point.

Note that this patch introduces a stricter pause state than previously.
The job->busy flag was incorrectly documented as a quiescent state
without I/O pending.  This is violated by any job that has I/O pending
across sleep or block_job_yield(), like the mirror block job.

[Add missing block_job_should_pause() check to avoid deadlock after
job->driver->pause() in block_job_pause_point().
--Stefan]

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-4-git-send-email-stefanha@redhat.com

8 years agoMerge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20160620' into staging
Peter Maydell [Mon, 20 Jun 2016 11:53:35 +0000 (12:53 +0100)]
Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20160620' into staging

seccomp branch queue

# gpg: Signature made Mon 20 Jun 2016 10:06:59 BST
# gpg:                using RSA key 0xFD0CFF5B12F8BD2F
# gpg: Good signature from "Eduardo Otubo (Software Engineer @ ProfitBricks) <eduardo.otubo@profitbricks.com>"
# 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: 1C96 46B6 E1D1 C38A F2EC  3FDE FD0C FF5B 12F8 BD2F

* remotes/otubo/tags/pull-seccomp-20160620:
  seccomp: Add support for ppc/ppc64

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoblockjob: rename block_job_is_paused()
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:23 +0000 (17:56 +0100)]
blockjob: rename block_job_is_paused()

The block_job_is_paused() function name is not great because callers
only use it to determine whether pausing has been requested.  Rename it
to highlight those semantics and remove it from the public header file
as there are no external callers.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-3-git-send-email-stefanha@redhat.com

8 years agoblockjob: move iostatus reset out of block_job_enter()
Stefan Hajnoczi [Thu, 16 Jun 2016 16:56:22 +0000 (17:56 +0100)]
blockjob: move iostatus reset out of block_job_enter()

The QMP block-job-resume command and cancellation may want to reset the
job's iostatus.  The next patches add a user who does not want to reset
iostatus so move it up to block_job_enter() callers.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1466096189-6477-2-git-send-email-stefanha@redhat.com

8 years agoblock: process before_write_notifiers in bdrv_co_discard
Denis V. Lunev [Thu, 16 Jun 2016 16:09:41 +0000 (19:09 +0300)]
block: process before_write_notifiers in bdrv_co_discard

This is mandatory for correct backup creation. In the other case the
content under this area would be lost.

Dirty bits are set exactly like in bdrv_aligned_pwritev, i.e. they are set
even if notifier has returned a error.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1466093381-6120-4-git-send-email-den@openvz.org
CC: Fam Zheng <famz@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agoblock: fix race in bdrv_co_discard with drive-mirror
Denis V. Lunev [Thu, 16 Jun 2016 16:09:40 +0000 (19:09 +0300)]
block: fix race in bdrv_co_discard with drive-mirror

Actually we must set dirty bitmap dirty after we have written all our
zeroes for correct processing in drive mirror code. In the other case
we can face not zeroes in this area in mirror_iteration.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1466093381-6120-3-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agoblock: fixed BdrvTrackedRequest filling in bdrv_co_discard
Denis V. Lunev [Thu, 16 Jun 2016 16:09:39 +0000 (19:09 +0300)]
block: fixed BdrvTrackedRequest filling in bdrv_co_discard

The request area is specified in bytes, not in sectors.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1466093381-6120-2-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agolibqos: add qvirtqueue_cleanup()
Stefan Hajnoczi [Thu, 5 May 2016 15:53:35 +0000 (16:53 +0100)]
libqos: add qvirtqueue_cleanup()

qvirtqueue_setup() allocates the vring and virtqueue state.  So far
there has been no function to free it.  Callers have been using
guest_free() for the vring but forgot to free the QVirtQueue state.

This patch solves the memory leak by introducing qvirtqueue_cleanup().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agolibqos: drop duplicated virtio_pci.h definitions
Stefan Hajnoczi [Mon, 9 May 2016 12:47:41 +0000 (13:47 +0100)]
libqos: drop duplicated virtio_pci.h definitions

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-9-git-send-email-stefanha@redhat.com

8 years agolibqos: drop duplicated virtio_scsi.h definitions
Stefan Hajnoczi [Mon, 9 May 2016 12:47:40 +0000 (13:47 +0100)]
libqos: drop duplicated virtio_scsi.h definitions

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-8-git-send-email-stefanha@redhat.com

8 years agolibqos: drop duplicated virtio_blk.h definitions
Stefan Hajnoczi [Mon, 9 May 2016 12:47:39 +0000 (13:47 +0100)]
libqos: drop duplicated virtio_blk.h definitions

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-7-git-send-email-stefanha@redhat.com

8 years agolibqos: drop duplicated virtio_vring.h structs
Stefan Hajnoczi [Mon, 9 May 2016 12:47:38 +0000 (13:47 +0100)]
libqos: drop duplicated virtio_vring.h structs

The descriptor element, used, and avail vring structs are defined in
virtio_ring.h.  There is no need to duplicate them in libqos virtio.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-6-git-send-email-stefanha@redhat.com

8 years agolibqos: drop duplicated virtio_ring.h bit definitions
Stefan Hajnoczi [Mon, 9 May 2016 12:47:37 +0000 (13:47 +0100)]
libqos: drop duplicated virtio_ring.h bit definitions

Note that virtio_ring.h defines feature bits using their bit number:

  #define VIRTIO_RING_F_INDIRECT_DESC     28

On the other hand libqos virtio.h uses the bit mask:

  #define QVIRTIO_F_RING_INDIRECT_DESC    0x10000000

The patch makes the necessary adjustments.

I have used "1u << BITMASK" instead of "1ULL << BITMASK" because the
64-bit feature fields are not implemented in libqos virtio.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-5-git-send-email-stefanha@redhat.com

8 years agolibqos: drop duplicated virtio_config.h definitions
Stefan Hajnoczi [Mon, 9 May 2016 12:47:36 +0000 (13:47 +0100)]
libqos: drop duplicated virtio_config.h definitions

Note that VIRTIO_F_ANY_LAYOUT and VIRTIO_F_NOTIFY_ON_EMPTY are bit
numbers in virtio_config.h but bit masks in qtest virtio.h.  Therefore
it's necessary to change users from X to (1u << X).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-4-git-send-email-stefanha@redhat.com

8 years agolibqos: drop duplicated PCI vendor ID definition
Stefan Hajnoczi [Mon, 9 May 2016 12:47:35 +0000 (13:47 +0100)]
libqos: drop duplicated PCI vendor ID definition

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-3-git-send-email-stefanha@redhat.com

8 years agolibqos: use virtio_ids.h for device ID definitions
Stefan Hajnoczi [Mon, 9 May 2016 12:47:34 +0000 (13:47 +0100)]
libqos: use virtio_ids.h for device ID definitions

Avoid redefining device IDs.  Use the standard Linux headers that are
already in the source tree.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-2-git-send-email-stefanha@redhat.com

8 years agohw/intc/arm_gicv3: Fix compilation with simple trace backend
Peter Maydell [Mon, 20 Jun 2016 09:57:14 +0000 (10:57 +0100)]
hw/intc/arm_gicv3: Fix compilation with simple trace backend

Fix missing includes of qemu/log.h, which broke compilation with the
simple trace backend (the default backend pulls in log.h implicitly
via trace.h).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Tested-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Message-id: 1466416634-9798-1-git-send-email-peter.maydell@linaro.org

8 years agoseccomp: Add support for ppc/ppc64
Michael Strosaker [Wed, 1 Jun 2016 23:30:18 +0000 (18:30 -0500)]
seccomp: Add support for ppc/ppc64

Support for ppc/ppc64 is official in libseccomp 2.3.0, so modify the
configuration script to allow qemuu to enable seccomp for those platforms.

Signed-off-by: Michael Strosaker <strosake@linux.vnet.ibm.com>
8 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160617' into...
Peter Maydell [Fri, 17 Jun 2016 15:16:37 +0000 (16:16 +0100)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160617' into staging

target-arm queue:
 * GICv3 emulation

# gpg: Signature made Fri 17 Jun 2016 15:24:28 BST
# gpg:                using RSA key 0x3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20160617: (22 commits)
  ACPI: ARM: Present GIC version in MADT table
  hw/timer: Add value matching support to aspeed_timer
  target-arm/monitor.c: Advertise emulated GICv3 in capabilities
  target-arm/machine.c: Allow user to request GICv3 emulation
  hw/intc/arm_gicv3: Add IRQ handling CPU interface registers
  hw/intc/arm_gicv3: Implement CPU i/f SGI generation registers
  hw/intc/arm_gicv3: Implement gicv3_cpuif_update()
  hw/intc/arm_gicv3: Implement GICv3 CPU interface registers
  hw/intc/arm_gicv3: Implement gicv3_set_irq()
  hw/intc/arm_gicv3: Wire up distributor and redistributor MMIO regions
  hw/intc/arm_gicv3: Implement GICv3 redistributor registers
  hw/intc/arm_gicv3: Implement GICv3 distributor registers
  hw/intc/arm_gicv3: Implement functions to identify next pending irq
  hw/intc/arm_gicv3: ARM GICv3 device framework
  hw/intc/arm_gicv3: Add vmstate descriptors
  hw/intc/arm_gicv3: Move irq lines into GICv3CPUState structure
  hw/intc/arm_gicv3: Add state information
  target-arm: Add mp-affinity property for ARM CPU class
  target-arm: Provide hook to tell GICv3 about changes of security state
  target-arm: Define new arm_is_el3_or_mon() function
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging
Peter Maydell [Fri, 17 Jun 2016 14:31:27 +0000 (15:31 +0100)]
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging

Machine queue, 2016-06-17

# gpg: Signature made Fri 17 Jun 2016 14:45:48 BST
# gpg:                using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/machine-pull-request:
  vnc: Wrap vnc initialization code with CONFIG_VNC
  qdev: Use GList for global properties

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoACPI: ARM: Present GIC version in MADT table
Shannon Zhao [Fri, 17 Jun 2016 14:23:48 +0000 (15:23 +0100)]
ACPI: ARM: Present GIC version in MADT table

In ACPI 5.1 Errata, it adds GIC version in GIC distributor structure.
This is useful for guest kernel to identify which version GIC hardware
is. Update GIC distributor structure and present GIC version in MADT
table.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 1465960955-17388-1-git-send-email-zhaoshenglong@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agohw/timer: Add value matching support to aspeed_timer
Andrew Jeffery [Fri, 17 Jun 2016 14:23:48 +0000 (15:23 +0100)]
hw/timer: Add value matching support to aspeed_timer

Value matching allows Linux to boot with CONFIG_NO_HZ_IDLE=y on the
palmetto-bmc machine. Two match registers are provided for each timer.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 1465974248-20434-1-git-send-email-andrew@aj.id.au
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agotarget-arm/monitor.c: Advertise emulated GICv3 in capabilities
Peter Maydell [Fri, 17 Jun 2016 14:23:48 +0000 (15:23 +0100)]
target-arm/monitor.c: Advertise emulated GICv3 in capabilities

Now we have an emulated GICv3 we should advertise it via the
capabilities in the monitor protocol.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-21-git-send-email-peter.maydell@linaro.org

8 years agotarget-arm/machine.c: Allow user to request GICv3 emulation
Peter Maydell [Fri, 17 Jun 2016 14:23:48 +0000 (15:23 +0100)]
target-arm/machine.c: Allow user to request GICv3 emulation

Now we have an emulated GICv3, remove the restriction in
gicv3_class_name() so that the user can request a GICv3 with
-machine gic-version=3 even when not using KVM.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-20-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Add IRQ handling CPU interface registers
Peter Maydell [Fri, 17 Jun 2016 14:23:48 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Add IRQ handling CPU interface registers

Add the CPU interface registers which deal with acknowledging
and dismissing interrupts.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-19-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Implement CPU i/f SGI generation registers
Peter Maydell [Fri, 17 Jun 2016 14:23:47 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Implement CPU i/f SGI generation registers

Implement the registers in the GICv3 CPU interface which generate
new SGI interrupts.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-18-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Implement gicv3_cpuif_update()
Peter Maydell [Fri, 17 Jun 2016 14:23:47 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Implement gicv3_cpuif_update()

Implement the gicv3_cpuif_update() function which deals with correctly
asserting IRQ and FIQ based on the current running priority of the CPU,
the priority of the highest priority pending interrupt and the CPU's
current exception level and security state.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-17-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Implement GICv3 CPU interface registers
Peter Maydell [Fri, 17 Jun 2016 14:23:47 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Implement GICv3 CPU interface registers

Implement the CPU interface registers for the GICv3; these are
CPU system registers, not MMIO registers.

This commit implements all the registers which are simple
accessors for GIC state, but not those which act as interfaces
for acknowledging, dismissing or generating interrupts. (Those
will be added in a later commit.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-16-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Implement gicv3_set_irq()
Peter Maydell [Fri, 17 Jun 2016 14:23:47 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Implement gicv3_set_irq()

Implement the code which updates the GIC state when an interrupt
input into the GIC is asserted.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-15-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Wire up distributor and redistributor MMIO regions
Peter Maydell [Fri, 17 Jun 2016 14:23:47 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Wire up distributor and redistributor MMIO regions

Wire up the MMIO functions exposed by the distributor and the
redistributor into MMIO regions exposed by the GICv3 device.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-14-git-send-email-peter.maydell@linaro.org

8 years agohw/intc/arm_gicv3: Implement GICv3 redistributor registers
Shlomo Pongratz [Fri, 17 Jun 2016 14:23:47 +0000 (15:23 +0100)]
hw/intc/arm_gicv3: Implement GICv3 redistributor registers

Implement the redistributor registers of a GICv3.

Signed-off-by: Shlomo Pongratz <shlomo.pongratz@huawei.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1465915112-29272-13-git-send-email-peter.maydell@linaro.org
[PMM: significantly overhauled/rewritten:
 * use the new data structures
 * restructure register read/write to handle different width accesses
   natively, since almost all registers are 32-bit only, rather
   than implementing everything as byte accesses
 * implemented security extension support
]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>