]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/log
lisovros/qemu_apohw.git
10 years agoKVM: Retry KVM_CREATE_VM on EINTR
thomas knych [Thu, 9 Jan 2014 21:14:23 +0000 (13:14 -0800)]
KVM: Retry KVM_CREATE_VM on EINTR

Upstreaming this change from Android (https://android-review.googlesource.com/54211).

On heavily loaded machines with many VM instances we see KVM_CREATE_VM
failing with EINTR on this path:

kvm_dev_ioctl_create_vm -> kvm_create_vm -> kvm_init_mmu_notifier -> mmu_notifier_register ->  do_mmu_notifier_register -> mm_take_all_locks

which checks if any signals have been raised while it was attaining locks
and returns EINTR.  Retrying the system call greatly improves reliability.

Cc: qemu-stable@nongnu.org
Signed-off-by: thomas knych <thomaswk@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agomempath prefault: fix off-by-one error
Marcelo Tosatti [Wed, 18 Dec 2013 18:42:17 +0000 (16:42 -0200)]
mempath prefault: fix off-by-one error

Fix off-by-one error (noticed by Andrea Arcangeli).

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
10 years agokvm: x86: Separately write feature control MSR on reset
Jan Kiszka [Tue, 17 Dec 2013 19:05:13 +0000 (20:05 +0100)]
kvm: x86: Separately write feature control MSR on reset

If the guest is running in nested mode on system reset, clearing the
feature MSR signals the kernel to leave this mode. Recent kernels
processes this properly, but leave the VCPU state undefined behind. It
is the job of userspace to bring it to a proper shape. Therefore, write
this specific MSR first so that no state transfer gets lost.

This allows to cleanly reset a guest with VMX in use.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agoroms: Flush icache when writing roms to guest memory
Alexander Graf [Thu, 12 Dec 2013 09:29:19 +0000 (10:29 +0100)]
roms: Flush icache when writing roms to guest memory

We use the rom infrastructure to write firmware and/or initial kernel
blobs into guest address space. So we're basically emulating the cache
off phase on very early system bootup.

That phase is usually responsible for clearing the instruction cache for
anything it writes into cachable memory, to ensure that after reboot we
don't happen to execute stale bits from the instruction cache.

So we need to invalidate the icache every time we write a rom into guest
address space. We do not need to do this for every DMA since the guest
expects it has to flush the icache manually in that case.

This fixes random reboot issues on e5500 (booke ppc) for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agotarget-i386: clear guest TSC on reset
Fernando Luis Vázquez Cao [Fri, 6 Dec 2013 08:33:01 +0000 (17:33 +0900)]
target-i386: clear guest TSC on reset

VCPU TSC is not cleared by a warm reset (*), which leaves some types of Linux
 guests (non-pvops guests and those with the kernel parameter no-kvmclock set)
vulnerable to the overflow in cyc2ns_offset fixed by upstream commit
9993bc635d01a6ee7f6b833b4ee65ce7c06350b1 ("sched/x86: Fix overflow in
cyc2ns_offset").

To put it in a nutshell, if such a Linux guest without the patch above applied
has been up more than 208 days and attempts a warm reset chances are that
the newly booted kernel will panic or hang.

(*) Intel Xeon E5 processors show the same broken behavior due to
    the errata "TSC is Not Affected by Warm Reset" (Intel® Xeon®
    Processor E5 Family Specification Update - August 2013): "The
    TSC (Time Stamp Counter MSR 10H) should be cleared on
    reset. Due to this erratum the TSC is not affected by warm
    reset."

Cc: Will Auld <will.auld@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>
10 years agotarget-i386: do not special case TSC writeback
Fernando Luis Vázquez Cao [Fri, 6 Dec 2013 08:38:24 +0000 (17:38 +0900)]
target-i386: do not special case TSC writeback

Newer kernels are capable of synchronizing TSC values of multiple VCPUs
on writeback, but we were excluding the power up case, which is not needed
anymore.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>
10 years agotarget-i386: Intel MPX
Liu Jinsong [Thu, 5 Dec 2013 00:32:12 +0000 (08:32 +0800)]
target-i386: Intel MPX

Add some MPX related definiation, and hardcode sizes and offsets
of xsave features 3 and 4. It also add corresponding part to
kvm_get/put_xsave, and vmstate.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agoMerge remote-tracking branch 'rth/tcg-temp-order' into staging
Anthony Liguori [Wed, 11 Dec 2013 00:14:36 +0000 (16:14 -0800)]
Merge remote-tracking branch 'rth/tcg-temp-order' into staging

# By Richard Henderson
# Via Richard Henderson
* rth/tcg-temp-order:
  tcg: Use bitmaps for free temporaries

Message-id: 1386698065-6661-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'stefanha/net-next' into staging
Anthony Liguori [Wed, 11 Dec 2013 00:14:20 +0000 (16:14 -0800)]
Merge remote-tracking branch 'stefanha/net-next' into staging

# By Vincenzo Maffione (2) and others
# Via Stefan Hajnoczi
* stefanha/net-next:
  net: Update netdev peer on link change
  virtio-net: don't update mac_table in error state
  MAINTAINERS: Add netmap maintainers
  net: Adding netmap network backend

Message-id: 1386594692-21278-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'pmaydell/tags/pull-target-arm-20131210' into staging
Anthony Liguori [Wed, 11 Dec 2013 00:13:32 +0000 (16:13 -0800)]
Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20131210' into staging

target-arm queue:
 * support REFCNT register on integrator/cp board
 * implement the A9MP's global timer
 * add the 'virt' platform
 * support '-cpu host' on KVM/ARM
 * Cadence GEM ethernet device bugfixes
 * Implement 32-bit ARMv8 VSEL, VMAXNM, VMINNM
 * fix TTBCR write masking
 * update 32 bit decoder to use new qemu_ld/st TCG opcodes

# gpg: Signature made Tue 10 Dec 2013 06:22:01 AM PST using RSA key ID 14360CDE
# gpg: Can't check signature: public key not found

# By Peter Crosthwaite (16) and others
# Via Peter Maydell
* pmaydell/tags/pull-target-arm-20131210: (37 commits)
  target-arm: fix TTBCR write masking
  target-arm: Use new qemu_ld/st opcodes
  target-arm: Implement ARMv8 SIMD VMAXNM and VMINNM instructions.
  target-arm: Implement ARMv8 FP VMAXNM and VMINNM instructions.
  softfloat: Add minNum() and maxNum() functions to softfloat.
  softfloat: Remove unused argument from MINMAX macro.
  target-arm: Implement ARMv8 VSEL instruction.
  target-arm: Move call to disas_vfp_insn out of disas_coproc_insn.
  net/cadence_gem: Don't rx packets when no rx buffer available
  net/cadence_gem: Improve can_receive debug printfery
  net/cadence_gem: Fix register w1c logic
  net/cadence_gem: Fix small packet FCS stripping
  net/cadence_gem: Fix rx multi-fragment packets
  net/cadence_gem: Add missing VMSTATE_END_OF_LIST
  net/cadence_gem: Implement SAR (de)activation
  net/cadence_gem: Implement SAR match bit in rx desc
  net/cadence_gem: Implement RX descriptor match mode flags
  net/cadence_gem: Prefetch rx descriptors ASAP
  net/cadence_gem: simplify rx buf descriptor walking
  net/cadence_gem: Don't assert against 0 buffer address
  ...

Message-id: 1386686613-2390-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'kraxel/tags/pull-audio-1' into staging
Anthony Liguori [Wed, 11 Dec 2013 00:11:21 +0000 (16:11 -0800)]
Merge remote-tracking branch 'kraxel/tags/pull-audio-1' into staging

Change audio wakeup rate from 250 Hz to 100 Hz.
Emulation bugfixes for intel-hda and adlib.

# gpg: Signature made Mon 09 Dec 2013 06:04:16 AM PST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

# By Gerd Hoffmann (2) and others
# Via Gerd Hoffmann
* kraxel/tags/pull-audio-1:
  intel-hda: fix position buffer
  adlib: fix patching of port I/O addresses
  audio: adjust pulse to 100Hz wakeup rate
  audio: Lower default wakeup rate to 100 times / second

Message-id: 1386597974-26506-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'alon/libcacard_ccid.4' into staging
Anthony Liguori [Wed, 11 Dec 2013 00:11:10 +0000 (16:11 -0800)]
Merge remote-tracking branch 'alon/libcacard_ccid.4' into staging

# By Stefan Weil
# Via Alon Levy
* alon/libcacard_ccid.4:
  libcacard: Fix compilation for older versions of glib (bug #1258168)

Message-id: 1386596263-26151-1-git-send-email-alevy@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'mjt/trivial-patches' into staging
Anthony Liguori [Wed, 11 Dec 2013 00:09:34 +0000 (16:09 -0800)]
Merge remote-tracking branch 'mjt/trivial-patches' into staging

# By Stefan Weil
# Via Michael Tokarev
* mjt/trivial-patches:
  qxl: Add missing trace.h (fix broken build)

Message-id: 1386441094-9971-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agotcg: Use bitmaps for free temporaries
Richard Henderson [Thu, 19 Sep 2013 19:16:45 +0000 (12:16 -0700)]
tcg: Use bitmaps for free temporaries

We previously allocated 32-bits per temp for the next_free_temp entry.
We now allocate 4 bits per temp across the 4 bitmaps.

Using a linked list meant that if a translator is tweeked, resulting in
temps being freed in a different order, that would have follow-on effects
throughout the TB.  Always allocating the lowest free temp means that
follow-on effects are minimized, which can make it easier to diff output
when debugging the translators.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
10 years agotarget-arm: fix TTBCR write masking
Sergey Fedorov [Tue, 10 Dec 2013 06:41:49 +0000 (10:41 +0400)]
target-arm: fix TTBCR write masking

Current implementation is not accurate according to ARMv7-AR reference
manual. See "B4.1.153 TTBCR, Translation Table Base Control Register,
VMSA | TTBCR format when using the Long-descriptor translation table
format". When LPAE feature is supported, EAE, bit[31] selects
translation descriptor format and, therefore, TTBCR format.

Signed-off-by: Sergey Fedorov <s.fedorov@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1386657709-23399-1-git-send-email-s.fedorov@samsung.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Use new qemu_ld/st opcodes
Richard Henderson [Mon, 9 Dec 2013 22:37:06 +0000 (14:37 -0800)]
target-arm: Use new qemu_ld/st opcodes

Retain the existing gen_aa32_* inlines, to aid compilation for A64.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-id: 1386628626-21627-1-git-send-email-rth@twiddle.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Implement ARMv8 SIMD VMAXNM and VMINNM instructions.
Will Newton [Fri, 6 Dec 2013 17:01:42 +0000 (17:01 +0000)]
target-arm: Implement ARMv8 SIMD VMAXNM and VMINNM instructions.

This adds support for the ARMv8 Advanced SIMD VMAXNM and VMINNM
instructions.

Signed-off-by: Will Newton <will.newton@linaro.org>
Message-id: 1386158099-9239-7-git-send-email-will.newton@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Implement ARMv8 FP VMAXNM and VMINNM instructions.
Will Newton [Fri, 6 Dec 2013 17:01:41 +0000 (17:01 +0000)]
target-arm: Implement ARMv8 FP VMAXNM and VMINNM instructions.

This adds support for the ARMv8 floating point VMAXNM and VMINNM
instructions.

Signed-off-by: Will Newton <will.newton@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1386158099-9239-6-git-send-email-will.newton@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agosoftfloat: Add minNum() and maxNum() functions to softfloat.
Will Newton [Fri, 6 Dec 2013 17:01:41 +0000 (17:01 +0000)]
softfloat: Add minNum() and maxNum() functions to softfloat.

Add floatnn_minnum() and floatnn_maxnum() functions which are equivalent
to the minNum() and maxNum() functions from IEEE 754-2008. They are
similar to min() and max() but differ in the handling of QNaN arguments.

Signed-off-by: Will Newton <will.newton@linaro.org>
Message-id: 1386158099-9239-5-git-send-email-will.newton@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agosoftfloat: Remove unused argument from MINMAX macro.
Will Newton [Fri, 6 Dec 2013 17:01:41 +0000 (17:01 +0000)]
softfloat: Remove unused argument from MINMAX macro.

The nan_exp argument is not used, so remove it.

Signed-off-by: Will Newton <will.newton@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1386158099-9239-4-git-send-email-will.newton@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Implement ARMv8 VSEL instruction.
Will Newton [Fri, 6 Dec 2013 17:01:40 +0000 (17:01 +0000)]
target-arm: Implement ARMv8 VSEL instruction.

This adds support for the VSEL floating point selection instruction
which was added in ARMv8.

Signed-off-by: Will Newton <will.newton@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1386158099-9239-3-git-send-email-will.newton@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Move call to disas_vfp_insn out of disas_coproc_insn.
Will Newton [Fri, 6 Dec 2013 17:01:40 +0000 (17:01 +0000)]
target-arm: Move call to disas_vfp_insn out of disas_coproc_insn.

Floating point is an extension to the instruction set rather than
a coprocessor, so call it directly from the ARM and Thumb decode
functions.

Signed-off-by: Will Newton <will.newton@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1386158099-9239-2-git-send-email-will.newton@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Don't rx packets when no rx buffer available
Peter Crosthwaite [Wed, 4 Dec 2013 06:02:03 +0000 (22:02 -0800)]
net/cadence_gem: Don't rx packets when no rx buffer available

Return false from can_receive() when no valid buffer descriptor is
available. Ensures against mass packet droppage in some applications.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: cde00ef774e84e2586bf10fd37b542f75bf36cfb.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Improve can_receive debug printfery
Peter Crosthwaite [Wed, 4 Dec 2013 06:01:28 +0000 (22:01 -0800)]
net/cadence_gem: Improve can_receive debug printfery

Currently this just floods indicating that can_receive has been called
by the net framework. Instead, save the result of the most recent
can_receive callback as state and only print a message if the result
changes (indicating some sort of actual state change in GEM). Make said
debug message more meaningful as well.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 2eb74ca6a5756aea242d9f525961db95d6cfcf2c.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Fix register w1c logic
Peter Crosthwaite [Wed, 4 Dec 2013 06:00:54 +0000 (22:00 -0800)]
net/cadence_gem: Fix register w1c logic

This write-1-clear logic was incorrect. It was always clearing w1c
bits regardless of whether the written value was 1 or not. i.e. it
was implementing a write-anything-to-clear strategy.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: ed905b04d3343966ded425f06aa2224bc7a35b59.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Fix small packet FCS stripping
Peter Crosthwaite [Wed, 4 Dec 2013 06:00:17 +0000 (22:00 -0800)]
net/cadence_gem: Fix small packet FCS stripping

The minimum packet size is 64, however this is before FCS stripping
occurs. So when FCS stripping the minimum packet size is 60. Fix.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 8aac5bd737f9cf48b87f32943d7eb5939061e546.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Fix rx multi-fragment packets
Peter Crosthwaite [Wed, 4 Dec 2013 05:59:43 +0000 (21:59 -0800)]
net/cadence_gem: Fix rx multi-fragment packets

Bytes_to_copy was being updated before its final use where it
advances the rx buffer pointer. This was causing total mayhem,
where packet data for any subsequent fragments was being fetched
from the wrong place.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: c2a1c65c1fd06eb274442a0fa4a6839d940e145e.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Add missing VMSTATE_END_OF_LIST
Peter Crosthwaite [Wed, 4 Dec 2013 05:59:08 +0000 (21:59 -0800)]
net/cadence_gem: Add missing VMSTATE_END_OF_LIST

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 8f8c2bfb15f40fb5f0d5766aa4cd3d54c596de6a.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Implement SAR (de)activation
Peter Crosthwaite [Wed, 4 Dec 2013 05:58:34 +0000 (21:58 -0800)]
net/cadence_gem: Implement SAR (de)activation

The Specific address registers can be enabled or disabled by software.
QEMU was assuming they were always enabled. Implement the
disable/enable feature. SARs are disabled by writing to the lower half
register. They are re-enabled by then writing the upper half.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 49efd1f7450af8f980b967d3054245bae137866c.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Implement SAR match bit in rx desc
Peter Crosthwaite [Wed, 4 Dec 2013 05:57:59 +0000 (21:57 -0800)]
net/cadence_gem: Implement SAR match bit in rx desc

Bit 27 of the RX buffer desc word 1 should be set when the packet was
accepted due to specific address register match. Implement.

This feature is absent from the Xilinx documentation (UG585) but the
behaviour is tested as accurate on real hardware.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 7e3f26fc4ab244e8123efc12723e7164730abdcb.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Implement RX descriptor match mode flags
Peter Crosthwaite [Wed, 4 Dec 2013 05:57:24 +0000 (21:57 -0800)]
net/cadence_gem: Implement RX descriptor match mode flags

The various Rx packet address matching mode flags were not being set in
the rx descriptor. Implement.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 6002a24a6a8ceaa11d3009ab5392840d1c084b28.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Prefetch rx descriptors ASAP
Peter Crosthwaite [Wed, 4 Dec 2013 05:56:50 +0000 (21:56 -0800)]
net/cadence_gem: Prefetch rx descriptors ASAP

The real hardware prefetches rx buffer descriptors ASAP and
potentially throws relevant interrupts following the fetch
even in the absence of a received packet.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 41629e35edfdb1f02f1e401f2c3d0e2e4c9e44b3.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: simplify rx buf descriptor walking
Peter Crosthwaite [Wed, 4 Dec 2013 05:56:15 +0000 (21:56 -0800)]
net/cadence_gem: simplify rx buf descriptor walking

There was a replication of the rx descriptor address walking logic.
Reorder the flow control to remove. This refactoring also obsoletes
the local variables packet_desc_addr and last_desc_addr.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 2a425b457ff0b57274bf206ad2236690cd7f5909.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Don't assert against 0 buffer address
Peter Crosthwaite [Wed, 4 Dec 2013 05:55:40 +0000 (21:55 -0800)]
net/cadence_gem: Don't assert against 0 buffer address

This has no real hardware analog and asserting correctness of DMA
addresses is not a perhiperal level problem. Delete.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: fc02417eb1874cb05e4f20531c6203c5a00110f1.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Update DMA rx descriptors as we process them
Edgar E. Iglesias [Wed, 4 Dec 2013 05:55:05 +0000 (21:55 -0800)]
net/cadence_gem: Update DMA rx descriptors as we process them

We were updating the ownership bit of all descriptors if packets
get split and written through several descriptors.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: d61b7847b51487118783c93765a485bc5c66d272.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agonet/cadence_gem: Implement mac level loopback mode
Peter Crosthwaite [Wed, 4 Dec 2013 05:54:30 +0000 (21:54 -0800)]
net/cadence_gem: Implement mac level loopback mode

Cadence GEM has a MAC level loopback mode. Implement. Use the same basic
operation as the already implemented PHY loopback.

Reported-by: Deepika Dhamija <deepika@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 3a0baf1b6b2fc1be638bdf1a37408ec38988e970.1386136219.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agohw/arm/virt: Support -cpu host
Peter Maydell [Fri, 22 Nov 2013 17:17:18 +0000 (17:17 +0000)]
hw/arm/virt: Support -cpu host

Support -cpu host in virt machine (treating it like an A15, ie
with a GIC v2 and the A15's private peripherals.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-12-git-send-email-peter.maydell@linaro.org

10 years agotarget-arm: Provide '-cpu host' when running KVM
Peter Maydell [Fri, 22 Nov 2013 17:17:17 +0000 (17:17 +0000)]
target-arm: Provide '-cpu host' when running KVM

Implement '-cpu host' for ARM when we're using KVM, broadly
in line with other KVM-supporting architectures.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-11-git-send-email-peter.maydell@linaro.org

10 years agotarget-arm: Don't hardcode KVM target CPU to be A15
Peter Maydell [Fri, 22 Nov 2013 17:17:16 +0000 (17:17 +0000)]
target-arm: Don't hardcode KVM target CPU to be A15

Instead of assuming that a KVM target CPU must always be a
Cortex-A15 and hardcoding this in kvm_arch_init_vcpu(),
store the KVM_ARM_TARGET_* value in the ARMCPU class,
and use that.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-10-git-send-email-peter.maydell@linaro.org

10 years agohw/arm: Add 'virt' platform
Peter Maydell [Fri, 22 Nov 2013 17:17:14 +0000 (17:17 +0000)]
hw/arm: Add 'virt' platform

Add 'virt' platform support corresponding to arch/arm/mach-virt
in the Linux kernel tree. This has no platform-specific code but
can use any device whose kernel driver is is able to work purely
from a device tree node. We use this to instantiate a minimal
set of devices: a GIC and some virtio-mmio transports.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-8-git-send-email-peter.maydell@linaro.org
[PMM:
 Significantly overhauled:
 * renamed user-facing machine to just "virt"
 * removed the A9 support (it can't work since the A9 has no
   generic timers)
 * added virtio-mmio transports instead of random set of 'soc' devices
   (though we retain a pl011 UART)
 * instead of updating io_base as we step through adding devices,
   define a memory map with an array (similar to vexpress)
 * similarly, define irqmap with an array
 * folded in some minor fixes from John's aarch64-support patch
 * rather than explicitly doing endian-swapping on FDT cells,
   use fdt APIs that let us just pass in host-endian values
   and let the fdt layer take care of the swapping
 * miscellaneous minor code cleanups and style fixes
]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Allow secondary KVM CPUs to be booted via PSCI
Peter Maydell [Fri, 22 Nov 2013 17:17:13 +0000 (17:17 +0000)]
target-arm: Allow secondary KVM CPUs to be booted via PSCI

New ARM boards are generally expected to boot their secondary CPUs
via the PSCI interface, rather than ad-hoc "loop around in holding
pen code" as hw/arm/boot.c implements. In particular this is
necessary for mach-virt kernels. For KVM we achieve this by creating
the VCPUs with a feature flag marking them as starting in PSCI
powered-down state; the guest kernel will then make a PSCI call
(implemented in the host kernel) to start the secondaries at
an address of its choosing once it has got the primary CPU up.

Implement this setting of the feature flag, controlled by a
qdev property for ARMCPU, which board code can set if it is a
PSCI system.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-7-git-send-email-peter.maydell@linaro.org

10 years agotarget-arm: Add ARMCPU field for Linux device-tree 'compatible' string
Peter Maydell [Fri, 22 Nov 2013 17:17:12 +0000 (17:17 +0000)]
target-arm: Add ARMCPU field for Linux device-tree 'compatible' string

Linux requires device tree CPU nodes to include a 'compatible'
string describing the CPU. Add a field in the ARMCPU struct for
this so that boards which construct a device tree can insert
the correct CPU nodes.

Note that there is currently no officially specified 'compatible'
string for the TI925T, Cortex-M3 or SA1110 CPUs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-6-git-send-email-peter.maydell@linaro.org

10 years agotarget-arm: Provide PSCI constants to generic QEMU code
Peter Maydell [Fri, 22 Nov 2013 17:17:11 +0000 (17:17 +0000)]
target-arm: Provide PSCI constants to generic QEMU code

Provide versions of the KVM PSCI constants to non-KVM code;
this will allow us to avoid an ifdef in boards which set up
a PSCI node in the device tree.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-5-git-send-email-peter.maydell@linaro.org

10 years agohw/arm/boot: Allow boards to provide an fdt blob
John Rigby [Fri, 22 Nov 2013 17:17:10 +0000 (17:17 +0000)]
hw/arm/boot: Allow boards to provide an fdt blob

If no fdt is provided on command line and the new field
get_dtb in struct arm_boot_info is set then call it to
get a device tree blob.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-4-git-send-email-peter.maydell@linaro.org
[PMM: minor tweaks and cleanup]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agodevice_tree.c: Terminate the empty reservemap in create_device_tree()
Peter Maydell [Fri, 22 Nov 2013 17:17:09 +0000 (17:17 +0000)]
device_tree.c: Terminate the empty reservemap in create_device_tree()

Device trees created with create_device_tree() may not have any
entries in their reservemap, because the FDT API requires that the
reservemap is completed before any FDT nodes are added, and
create_device_tree() itself creates a node.  However we were not
calling fdt_finish_reservemap(), which meant that there was no
terminator in the reservemap list and whatever happened to be at the
start of the FDT data section would end up being interpreted as
reservemap entries.  Avoid this by calling fdt_finish_reservemap()
to add the terminator.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1385140638-10444-3-git-send-email-peter.maydell@linaro.org

10 years agotarget-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM
Peter Maydell [Fri, 22 Nov 2013 17:17:08 +0000 (17:17 +0000)]
target-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM

There are a number of places where it would be convenient for ARM
code to have working definitions of KVM constants even in code
which is compiled with CONFIG_KVM not set. In this situation we
can't simply include the kernel KVM headers (which might conflict
with host header definitions or not even compile on the compiler
we're using) so we have to redefine equivalent constants.
Provide a mechanism for doing this and checking that the values
match, and use it for the constants we're currently exposing
via an ad-hoc mechanism.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-2-git-send-email-peter.maydell@linaro.org

10 years agocpu/a9mpcore: Add Global Timer
François LEGAL [Mon, 2 Dec 2013 07:37:11 +0000 (23:37 -0800)]
cpu/a9mpcore: Add Global Timer

Add the global timer to A9 MPCore.

Signed-off-by: François LEGAL <devel@thom.fr.eu.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: ff92f35f438ac671b57d99d823723dd3e62d2c49.1385969450.git.peter.crosthwaite@xilinx.com
[PC Changes:
 * new commit message
 * split off original version as a separate patch
 * Rebased against new mpcore implementation (with struct embedding)
]
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agohw/timer: Introduce ARM A9 Global Timer.
Peter Crosthwaite [Tue, 10 Dec 2013 13:24:51 +0000 (13:24 +0000)]
hw/timer: Introduce ARM A9 Global Timer.

The ARM A9 MPCore has a timer that is global to all cores in the cluster.
The timer is shared but each core has a private independent comparator
and interrupt.

Based on version contributed by Francois LEGAL.

Signed-off-by: François LEGAL <devel@thom.fr.eu.org>
Message-id: 4918e89476b8da916be2964ec41578b50d569a37.1385969450.git.peter.crosthwaite@xilinx.com
[PC changes:
 * New commit message
 * Re-implemented as single timer model
 * Fixed backwards counting issue in polled mode
 * completed VMSD fields
 * macroified magic numbers (and headerified reg definitions)
 * split of as device-model-only patch
 * use bitops for 64 bit register access
 * Fixed auto increment mode to check condition properly
 * general cleanup (names/style etc).
]
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[PMM:
 * minor typo fixes
 * added missing return after error_setg()
 * dropped setting dc->no_user = 1
]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agocpu/a9mpcore: reorder operations/declarations
Peter Crosthwaite [Tue, 10 Dec 2013 13:24:51 +0000 (13:24 +0000)]
cpu/a9mpcore: reorder operations/declarations

To make it consistent for easier code reading. The order in which
variables are defined and functions are called is set to match the
address map ordering.

The new consistent order of doing stuff is:

SCU -> GIC -> MPTimer -> WDT.

0 functional change.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 8f31398e6d9a93f57291399f269039da1a77a2b5.1385969450.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agocpu/a9mpcore: rename timerbusdev variable
Peter Crosthwaite [Tue, 10 Dec 2013 13:24:51 +0000 (13:24 +0000)]
cpu/a9mpcore: rename timerbusdev variable

Rename this variable for consistency with the above defined mptimerdev
variable.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 28939ef95589a62414634e86c47cef76b21b15f7.1385969450.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agointegrator/cp: add support for REFCNT register
Jan Petrous [Tue, 10 Dec 2013 13:24:51 +0000 (13:24 +0000)]
integrator/cp: add support for REFCNT register

Linux kernel from version 3.4 requires CM_REFCNT register for sched timer
for Integrator/CP board (integrator_defconfig).

See http://infocenter.arm.com/help/topic/com.arm.doc.dui0138e/ch04s06s11.html

Signed-off-by: Jan Petrous <jan.petrous@tieto.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-mips: Use macro ARRAY_SIZE where possible
Stefan Weil [Sat, 7 Dec 2013 13:48:07 +0000 (14:48 +0100)]
target-mips: Use macro ARRAY_SIZE where possible

This improves readability and simplifies the code.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
10 years agotarget-mips: fix 64-bit FPU config for user-mode emulation
Petar Jovanovic [Fri, 29 Nov 2013 16:27:42 +0000 (17:27 +0100)]
target-mips: fix 64-bit FPU config for user-mode emulation

FR bit should be initialized to 1 for MIPS64, under condition that this
bit is writable and that CPU has an FPU unit. It should be initialized to
zero for MIPS32.
This fixes different MIPS32 issues with FPU instructions whose behaviour
defaulted to 64-bit FPU mode.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
10 years agotarget-sh4: move features flag after CPU_COMMON
Bobby Bingham [Sun, 24 Nov 2013 20:03:05 +0000 (14:03 -0600)]
target-sh4: move features flag after CPU_COMMON

Everything before CPU_COMMON in the structure is cleared as part of a
CPU reset. This included the features flag, which indicates whether SH4A
instructions are supported or not. As a result, a CPU reset downgraded
the CPU from an SH4A to an SH4.

Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
10 years agonet: Update netdev peer on link change
Vlad Yasevich [Fri, 22 Nov 2013 02:05:51 +0000 (21:05 -0500)]
net: Update netdev peer on link change

When a link change occurs on a backend (like tap), we currently do
not propage such change to the nic.  As a result, when someone turns
off a link on a tap device, for instance, then a guest doesn't see
that change and continues to try to send traffic or run DHCP even
though the lower-layer is disconnected.  This is OK when the network
is set up as a HUB since the the guest may be connected to other HUB
ports too, but when it's set up as a netdev, it makes thinkgs worse.

The patch addresses this by setting the peers link down only when the
peer is not a HUBPORT device.  With this patch, in the following config
  -netdev tap,id=net0 -device e1000,mac=XXXXX,netdev=net0
when net0 link is turned off, the guest e1000 shows lower-layer link
down. This allows guests to boot much faster in such configurations.
With windows guest, it also allows the network to recover properly
since windows will not configure the link-local IPv4 address, and
when the link is turned on, the proper address address is configured.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agovirtio-net: don't update mac_table in error state
Amos Kong [Mon, 11 Nov 2013 03:48:36 +0000 (11:48 +0800)]
virtio-net: don't update mac_table in error state

mac_table was always cleaned up first in handling
VIRTIO_NET_CTRL_MAC_TABLE_SET command, and we din't recover
mac_table content in error state, it's not correct.

This patch makes all the changes in temporal variables,
only update the real mac_table if everything is ok.
We won't change mac_table in error state, so rxfilter
notification isn't needed.

This patch also fixed same problame in
 http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg01188.html
 (not merge)

I will send patch for virtio spec to clarifying this change.

Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoMAINTAINERS: Add netmap maintainers
Vincenzo Maffione [Wed, 6 Nov 2013 17:34:55 +0000 (18:34 +0100)]
MAINTAINERS: Add netmap maintainers

Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agonet: Adding netmap network backend
Vincenzo Maffione [Wed, 6 Nov 2013 10:44:06 +0000 (11:44 +0100)]
net: Adding netmap network backend

This patch adds support for a network backend based on netmap.
netmap is a framework for high speed packet I/O. You can use it
to build extremely fast traffic generators, monitors, software
switches or network middleboxes. Its companion software switch
VALE lets you interconnect virtual machines.
netmap and VALE are implemented as a non-intrusive kernel module,
support NICs from multiple vendors, are part of standard FreeBSD
distributions and available in source format for Linux too.

To compile QEMU with netmap support, use the following configure
options:
    ./configure [...] --enable-netmap --extra-cflags=-I/path/to/netmap/sys
where "/path/to/netmap" contains the netmap source code, available at
    http://info.iet.unipi.it/~luigi/netmap/

The same webpage contains more information about the netmap project
(together with papers and presentations).

Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agolibcacard: Fix compilation for older versions of glib (bug #1258168)
Stefan Weil [Thu, 5 Dec 2013 18:41:28 +0000 (19:41 +0100)]
libcacard: Fix compilation for older versions of glib (bug #1258168)

See https://bugs.launchpad.net/bugs/1258168

libcacard/vscclient.c: In function 'do_socket_read':
libcacard/vscclient.c:410: warning: implicit declaration of function 'g_warn_if_reached'
libcacard/vscclient.c:410: warning: nested extern declaration of 'g_warn_if_reached'
libcacard/vscclient.c: In function 'main':
libcacard/vscclient.c:763: warning: implicit declaration of function 'g_byte_array_unref'
libcacard/vscclient.c:763: warning: nested extern declaration of 'g_byte_array_unref'
...
libcacard/vscclient.o: In function `do_socket_read':
libcacard/vscclient.c:410: undefined reference to `g_warn_if_reached'
libcacard/vscclient.o: In function `main':
libcacard/vscclient.c:763: undefined reference to `g_byte_array_unref'

g_warn_if_reached was added in glib 2.16, and g_byte_array_unref is
supported since glib 2.22. QEMU requires glib 2.12, so both names must
not be used.

Instead of showing a warning for code which should not be reached,
vscclient better stop running, so g_warn_if_reached is not useful for
vscclient.

In libcacard/vsclient.c, g_byte_array_unref can be replaced by
g_byte_array_free. This is not generally true, so adding a compatibility
layer in include/glib-compat.h is no option here.

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Reported-by: Don Slutz <dslutz@verizon.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
10 years agointel-hda: fix position buffer
Gerd Hoffmann [Fri, 29 Nov 2013 13:25:33 +0000 (14:25 +0100)]
intel-hda: fix position buffer

Fix position buffer updates to use the correct stream offset.

Without this patch both IN (record) and OUT (playback) streams
will update the IN buffer positions.  The linux kernel notices
and complains:
  hda-intel: Invalid position buffer, using LPIB read method instead.

The bug may also lead to glitches when recording and playing
at the same time:
  https://bugzilla.redhat.com/show_bug.cgi?id=947785

Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoadlib: fix patching of port I/O addresses
Paolo Bonzini [Mon, 2 Dec 2013 09:16:18 +0000 (10:16 +0100)]
adlib: fix patching of port I/O addresses

Commit 2b21fb5 (adlib: sort offsets in portio registration, 2013-08-14)
fixed the offsets in adlib_portio_list, but forgot the matching indices
in adlib_realizefn.

Reported at http://virtuallyfun.superglobalmegacorp.com/?p=3616 by
"neozeed".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoaudio: adjust pulse to 100Hz wakeup rate
Gerd Hoffmann [Mon, 2 Dec 2013 09:49:13 +0000 (10:49 +0100)]
audio: adjust pulse to 100Hz wakeup rate

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoaudio: Lower default wakeup rate to 100 times / second
Hans de Goede [Wed, 9 Oct 2013 19:38:32 +0000 (21:38 +0200)]
audio: Lower default wakeup rate to 100 times / second

This is more then plenty to keep audio card fifos filles / emptied.

This drops host cpu-load for audio playback inside a linux vm from
13% to 9%.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agotarget-cris: Use new qemu_ld/st opcodes
Richard Henderson [Sat, 7 Dec 2013 01:52:34 +0000 (14:52 +1300)]
target-cris: Use new qemu_ld/st opcodes

Using the new opcodes we can reduce if/else trees to
a single statement.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
10 years agoqxl: Add missing trace.h (fix broken build)
Stefan Weil [Sat, 7 Dec 2013 14:09:12 +0000 (15:09 +0100)]
qxl: Add missing trace.h (fix broken build)

Commit ac86048bcd41129b18702ba63395f222871804de removed trace.h from
console.h and ignored the fact that qxl-render.c needs this file
(it includes qxl.h which includes console.h which included trace.h).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoMerge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20131206.0' into staging
Anthony Liguori [Sat, 7 Dec 2013 15:47:24 +0000 (07:47 -0800)]
Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20131206.0' into staging

vfio-pci updates include:
 - Update linux-headers to include KVM-VFIO device support
 - Enable QEMU support for KVM-VFIO device
 - Additional Nvidia x-vga quirk to ACK MSI interrupts
 - Debug options to disable MSI/X KVM acceleration
 - Fix to cleanup MSI-X vectors on shutdown and avoid IRQ route leaks

The KVM-VFIO device support enables KVM to manage how it handles
coherency instructions in the presence of non-coherent I/O.  Dave
Airlie had noted that the Nvidia MSI ACK support here may just be
scratching the surface, but it's better than what we have now and
it's only enabled via the x-vga option, so I'm willing to add since
it does enable some users.

# gpg: Signature made Fri 06 Dec 2013 12:28:19 PM PST using RSA key ID 3BB08B22
# gpg: Can't check signature: public key not found

# By Alex Williamson
# Via Alex Williamson
* awilliam/tags/vfio-pci-for-qemu-20131206.0:
  vfio-pci: Release all MSI-X vectors when disabled
  vfio-pci: Add debug config options to disable MSI/X KVM support
  vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk
  vfio-pci: Make use of new KVM-VFIO device
  linux-headers: Update from v3.13-rc3

Message-id: 20131206204715.16731.12627.stgit@bling.home
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'stefanha/block' into staging
Anthony Liguori [Sat, 7 Dec 2013 15:35:31 +0000 (07:35 -0800)]
Merge remote-tracking branch 'stefanha/block' into staging

# By Paolo Bonzini (17) and others
# Via Stefan Hajnoczi
* stefanha/block: (48 commits)
  qemu-iotests: filter QEMU monitor \r\n
  aio: make aio_poll(ctx, true) block with no fds
  block: clean up bdrv_drain_all() throttling comments
  qcow2: use start_of_cluster() and offset_into_cluster() everywhere
  qemu-img: decrease progress update interval on convert
  qemu-img: round down request length to an aligned sector
  qemu-img: dynamically adjust iobuffer size during convert
  block/iscsi: set bs->bl.opt_transfer_length
  block: add opt_transfer_length to BlockLimits
  block/iscsi: set bdi->cluster_size
  qemu-img: fix usage instruction for qemu-img convert
  qemu-img: add support for skipping zeroes in input during convert
  qemu-nbd: add doc for option -f
  qemu-iotests: add test for snapshot in qemu-img convert
  qemu-img: add -l for snapshot in convert
  qemu-iotests: add 058 internal snapshot export with qemu-nbd case
  qemu-nbd: support internal snapshot export
  snapshot: distinguish id and name in load_tmp
  qemu-iotests: Split qcow2 only cases in 048
  qemu-iotests: Clean up spaces in usage output
  ...

Message-id: 1386347807-27359-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'qemu-kvm/uq/master' into staging
Anthony Liguori [Sat, 7 Dec 2013 15:35:25 +0000 (07:35 -0800)]
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

# By Alex Williamson (1) and others
# Via Paolo Bonzini
* qemu-kvm/uq/master:
  target-i386: fix cpuid leaf 0x0d
  qemu: mempath: prefault pages manually (v4)
  kvm: Query KVM for available memory slots

Message-id: 1386345276-9803-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'kraxel/tags/pull-seabios-31b8b4e-1' into staging
Anthony Liguori [Sat, 7 Dec 2013 15:35:16 +0000 (07:35 -0800)]
Merge remote-tracking branch 'kraxel/tags/pull-seabios-31b8b4e-1' into staging

Update seabios to master snapshot (pre-1.7.4).
Update vgabios, switch from lgplvgabios to seavgabios.
Update build process to build both 128k and 256k bios versions.
Use 256k bios for pc-*-2.0+ machine types.

# gpg: Signature made Fri 06 Dec 2013 12:01:24 AM PST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/tags/pull-seabios-31b8b4e-1:
  pc: switch 2.0 machine types to large seabios binary
  roms: update vgabios binaries
  roms: update seabios binaries
  roms: enable seabios cross builds
  roms: build two seabios binaries
  roms: update seabios submodule to 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d
  add firmware to machine options
  add pc-{i440fx,q35}-2.0 machine types

Message-id: 1386322527-23148-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'otubo/seccomp' into staging
Anthony Liguori [Sat, 7 Dec 2013 15:35:01 +0000 (07:35 -0800)]
Merge remote-tracking branch 'otubo/seccomp' into staging

# By Paul Moore
# Via Eduardo Otubo
* otubo/seccomp:
  seccomp: add kill() to the syscall whitelist

Message-id: 1386075077-3240-1-git-send-email-otubo@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'kwolf/tags/for-anthony' into staging
Anthony Liguori [Fri, 6 Dec 2013 20:59:58 +0000 (12:59 -0800)]
Merge remote-tracking branch 'kwolf/tags/for-anthony' into staging

Block patches for 2.0 (flushing block-next)

# gpg: Signature made Fri 29 Nov 2013 08:43:18 AM PST using RSA key ID C88F2FD6
# gpg: Can't check signature: public key not found

# By Peter Lieven (17) and others
# Via Kevin Wolf
* kwolf/tags/for-anthony: (41 commits)
  qemu-iotests: Add sample image and test for VMDK version 3
  vmdk: Allow read only open of VMDK version 3
  qemu-iotests: Filter out 'qemu-io> ' prompt
  qemu-iotests: Filter qemu-io output in 025
  block: Use BDRV_O_NO_BACKING where appropriate
  qemu-iotests: Test snapshot mode
  block: Enable BDRV_O_SNAPSHOT with driver-specific options
  qemu-iotests: Make test case 030, 040 and 055 deterministic
  qemu-iotest: Add pause_drive and resume_drive methods
  blkdebug: add "remove_break" command
  qemu-iotests: Drop local version of cancel_and_wait from 040
  sheepdog: support user-defined redundancy option
  sheepdog: refactor do_sd_create()
  qdict: Optimise qdict_do_flatten()
  qdict: Fix memory leak in qdict_do_flatten()
  MAINTAINERS: add sheepdog development mailing list
  COW: Extend checking allocated bits to beyond one sector
  COW: Speed up writes
  qapi: Change BlockDirtyInfo to list
  block: per caller dirty bitmap
  ...

Message-id: 1385743555-27888-1-git-send-email-kwolf@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'sstabellini/xen-2013-12-01' into staging
Anthony Liguori [Fri, 6 Dec 2013 20:58:28 +0000 (12:58 -0800)]
Merge remote-tracking branch 'sstabellini/xen-2013-12-01' into staging

# By Paul Durrant (1) and Wei Liu (1)
# Via Stefano Stabellini
* sstabellini/xen-2013-12-01:
  xen-pvdevice: make device-id property compulsory
  xen: fix two errors when debug is enabled

Message-id: alpine.DEB.2.02.1312011829000.3198@kaball.uk.xensource.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'rth/auxv-2' into staging
Anthony Liguori [Fri, 6 Dec 2013 20:57:21 +0000 (12:57 -0800)]
Merge remote-tracking branch 'rth/auxv-2' into staging

# By Richard Henderson
# Via Richard Henderson
* rth/auxv-2:
  linux-user: Use qemu_getauxval for AT_EXECFD
  util: Use qemu_getauxval in linux qemu_cache_utils_init
  tcg-s390: Use qemu_getauxval in query_facilities
  tcg-arm: Use qemu_getauxval
  tcg-ppc64: Use qemu_getauxval
  osdep: Create qemu_getauxval and qemu_init_auxval

Message-id: 1385757754-10702-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'riku/linux-user-for-upstream' into staging
Anthony Liguori [Fri, 6 Dec 2013 20:56:51 +0000 (12:56 -0800)]
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging

# By Erik de Castro Lopo (2) and others
# Via Riku Voipio
* riku/linux-user-for-upstream:
  linux-user: pass correct parameter to do_shmctl()
  linux-user: create target_structs header to place ipc_perm and shmid_ds
  flatload: fix non-GOT relocations
  linux-user: Implement handling of 5 POSIX timer syscalls.
  linux-user: Add target struct defs needed for POSIX timer syscalls.

Message-id: cover.1385732338.git.riku.voipio@linaro.org
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'kraxel/tags/pull-usb-1' into staging
Anthony Liguori [Fri, 6 Dec 2013 20:54:35 +0000 (12:54 -0800)]
Merge remote-tracking branch 'kraxel/tags/pull-usb-1' into staging

Improvements for usb3 bulk stream (usb core, xhci).
Bugfixes for uas emulation.
Add remote wakeup support for ehci.
Add suspend support for xhci.
Misc minor tweaks and fixes.

# gpg: Signature made Thu 28 Nov 2013 11:44:49 PM PST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

# By Hans de Goede (11) and others
# Via Gerd Hoffmann
* kraxel/tags/pull-usb-1:
  usb: move usb_{hi,lo} helpers to header file.
  usb: add vendor request defines
  trace-events: Clean up after removal of old usb-host code
  Revert "usb-tablet: Don't claim wakeup capability for USB-2 version"
  ehci: implement port wakeup
  xhci: Call usb_device_alloc/free_streams
  usb: Add usb_device_alloc/free_streams
  usb: Add max_streams attribute to endpoint info
  uas: s/ui/iu/
  uas: Fix response iu struct definition
  uas: Bounds check tags when using streams
  uas: Streams are numbered 1-y, rather then 0-x
  uas: Fix / cleanup usb_uas_task error handling
  uas: Only use report iu-s for task_mgmt status reporting
  scsi: Add 2 new sense codes needed by uas
  xhci: add support for suspend/resume
  xhci: Add a few missing checks for disconnected devices

Message-id: 1385712381-30918-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoMerge remote-tracking branch 'mjt/trivial-patches' into staging
Anthony Liguori [Fri, 6 Dec 2013 20:52:50 +0000 (12:52 -0800)]
Merge remote-tracking branch 'mjt/trivial-patches' into staging

# By Stefan Weil (9) and others
# Via Michael Tokarev
* mjt/trivial-patches:
  eeprom93xx: fix coding style
  hw/ppc/mac.h: remove unused BIOS_FILENAME definition
  Don't crash on keyboard input with no handler
  libcacard/vcard_emul_nss: Remove unused statement (value stored is never read)
  libcacard/cac: Remove unused statement (value stored is never read)
  virtio-net: fix the indent
  misc: Replace 'struct QEMUTimer' by 'QEMUTimer'
  qobject: Fix compiler warning (missing gnu_printf format attribute)
  acpi-build: Fix compiler warning (missing gnu_printf format attribute)
  .gitignore: Ignore config.status
  gtk: Replace conditional debug messages by trace methods
  console: Replace conditional debug messages by trace methods
  trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies)
  trace: Remove trace.h from console.h (less dependencies)

Message-id: 1385408466-13183-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
10 years agoeeprom93xx: fix coding style
Antony Pavlov [Wed, 4 Dec 2013 06:27:29 +0000 (10:27 +0400)]
eeprom93xx: fix coding style

scripts/checkpatch.pl reports about some style problems,
this commit fixes some of them:

ERROR: space prohibited before open square bracket '['
+    .fields      = (VMStateField []) {

ERROR: space prohibited after that '!' (ctx:BxW)
+    if (! eeprom->eecs && eecs) {
         ^

ERROR: space prohibited after that '!' (ctx:WxW)
+    } else if (eeprom->eecs && ! eecs) {
                                ^

ERROR: space prohibited after that '!' (ctx:WxW)
+    } else if (eecs && ! eeprom->eesk && eesk) {
                        ^

ERROR: switch and case should be at the same indent
                     switch (address >> (eeprom->addrbits - 2)) {
+                        case 0:
[...]
+                        case 1:
[...]
+                        case 2:
[...]
+                        case 3:

ERROR: return is not a function, parentheses are not required
+    return (eeprom->eedo);

ERROR: switch and case should be at the same indent
     switch (nwords) {
+        case 16:
+        case 64:
[...]
+        case 128:
+        case 256:
[...]
+        default:

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agovfio-pci: Release all MSI-X vectors when disabled
Alex Williamson [Fri, 6 Dec 2013 18:16:40 +0000 (11:16 -0700)]
vfio-pci: Release all MSI-X vectors when disabled

We were relying on msix_unset_vector_notifiers() to release all the
vectors when we disable MSI-X, but this only happens when MSI-X is
still enabled on the device.  Perform further cleanup by releasing
any remaining vectors listed as in-use after this call.  This caused
a leak of IRQ routes on hotplug depending on how the guest OS prepared
the device for removal.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-stable@nongnu.org
10 years agovfio-pci: Add debug config options to disable MSI/X KVM support
Alex Williamson [Fri, 6 Dec 2013 18:16:29 +0000 (11:16 -0700)]
vfio-pci: Add debug config options to disable MSI/X KVM support

It's sometimes useful to be able to verify interrupts are passing
through correctly.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
10 years agovfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk
Alex Williamson [Fri, 6 Dec 2013 18:16:23 +0000 (11:16 -0700)]
vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk

When MSI is enabled on Nvidia GeForce cards the driver seems to
acknowledge the interrupt by writing a 0xff byte to the MSI capability
ID register using the PCI config space mirror at offset 0x88000 from
BAR0.  Without this, the device will only fire a single interrupt.
VFIO handles the PCI capability ID/next registers as virtual w/o write
support, so any write through config space is currently dropped.  Add
a check for this and allow the write through the BAR window.  The
registers are read-only anyway.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
10 years agovfio-pci: Make use of new KVM-VFIO device
Alex Williamson [Fri, 6 Dec 2013 18:16:13 +0000 (11:16 -0700)]
vfio-pci: Make use of new KVM-VFIO device

Add and remove groups from the KVM virtual VFIO device as we make
use of them.  This allows KVM to optimize for performance and
correctness based on properties of the group.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
10 years agolinux-headers: Update from v3.13-rc3
Alex Williamson [Fri, 6 Dec 2013 18:16:09 +0000 (11:16 -0700)]
linux-headers: Update from v3.13-rc3

Update to tag v3.13-rc3 (374b105797c3d4f29c685f3be535c35f5689b30e)

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
10 years agoqemu-iotests: filter QEMU monitor \r\n
Stefan Hajnoczi [Thu, 14 Nov 2013 14:24:58 +0000 (15:24 +0100)]
qemu-iotests: filter QEMU monitor \r\n

SMTP does not preserve newlines.  This is normally not a problem if the
email body uses DOS or UNIX newlines consistently.  In 051.out we mix
UNIX newlines with DOS newlines (since QEMU monitor output uses \r\n).

This patch filters the QEMU monitor output so the golden master file
uses UNIX newlines exclusively.

The result is that patches touching 051.out will apply cleanly without
mangling newlines after this commit.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoaio: make aio_poll(ctx, true) block with no fds
Stefan Hajnoczi [Tue, 26 Nov 2013 15:18:01 +0000 (16:18 +0100)]
aio: make aio_poll(ctx, true) block with no fds

This patch drops a special case where aio_poll(ctx, true) returns false
instead of blocking if no file descriptors are waiting on I/O.  Now it
is possible to block in aio_poll() to wait for aio_notify().

This change eliminates busy waiting.  bdrv_drain_all() used to rely on
busy waiting to completed throttled I/O requests but this is no longer
required so we can simplify aio_poll().

Note that aio_poll() still returns false when aio_notify() was used.  In
other words, stopping a blocking aio_poll() wait is not considered
making progress.

Adjust test-aio /aio/bh/callback-delete/one which assumed aio_poll(ctx,
true) would immediately return false instead of blocking.

Reviewed-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: clean up bdrv_drain_all() throttling comments
Stefan Hajnoczi [Tue, 26 Nov 2013 15:18:00 +0000 (16:18 +0100)]
block: clean up bdrv_drain_all() throttling comments

Since cc0681c45430a1f1a4c2d06e9499b7775afc9a18 ("block: Enable the new
throttling code in the block layer.") bdrv_drain_all() no longer spins.
The code used to look as follows:

  do {
      busy = qemu_aio_wait();

      /* FIXME: We do not have timer support here, so this is effectively
       * a busy wait.
       */
      QTAILQ_FOREACH(bs, &bdrv_states, list) {
          while (qemu_co_enter_next(&bs->throttled_reqs)) {
              busy = true;
          }
      }
  } while (busy);

Note that throttle requests are kicked but I/O throttling limits are
still in effect.  The loop spins until the vm_clock time allows the
request to make progress and complete.

The new throttling code introduced bdrv_start_throttled_reqs().  This
function not only kicks throttled requests but also temporarily disables
throttling so requests can run.

The outdated FIXME comment can be removed.  Also drop the busy = true
assignment since we overwrite it immediately afterwards.

Reviewed-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoqcow2: use start_of_cluster() and offset_into_cluster() everywhere
Hu Tao [Thu, 5 Dec 2013 06:32:34 +0000 (14:32 +0800)]
qcow2: use start_of_cluster() and offset_into_cluster() everywhere

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoqemu-img: decrease progress update interval on convert
Peter Lieven [Wed, 27 Nov 2013 10:07:09 +0000 (11:07 +0100)]
qemu-img: decrease progress update interval on convert

when doing very large jobs updating the progress only every 2%
is too rare.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoqemu-img: round down request length to an aligned sector
Peter Lieven [Wed, 27 Nov 2013 10:07:07 +0000 (11:07 +0100)]
qemu-img: round down request length to an aligned sector

this patch shortens requests to end at an aligned sector so that
the next request starts aligned.

[Squashed Peter's fix for bdrv_get_info() failure discussed on the
mailing list.
--Stefan]

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agopc: switch 2.0 machine types to large seabios binary
Gerd Hoffmann [Mon, 2 Dec 2013 11:52:04 +0000 (12:52 +0100)]
pc: switch 2.0 machine types to large seabios binary

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoroms: update vgabios binaries
Gerd Hoffmann [Mon, 2 Dec 2013 12:01:20 +0000 (13:01 +0100)]
roms: update vgabios binaries

This also switches from lgplvgabios to seavgabios.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoroms: update seabios binaries
Gerd Hoffmann [Mon, 2 Dec 2013 11:58:45 +0000 (12:58 +0100)]
roms: update seabios binaries

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoroms: enable seabios cross builds
Gerd Hoffmann [Tue, 15 Oct 2013 15:05:55 +0000 (17:05 +0200)]
roms: enable seabios cross builds

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoroms: build two seabios binaries
Gerd Hoffmann [Mon, 30 Sep 2013 09:37:12 +0000 (11:37 +0200)]
roms: build two seabios binaries

Adding xhci support to seabios made it jump over the 128k line.
Changing the bios size breaks migration, so we have to keep a
128k seabios binary for old machine types.  New machine types can
use a large 256k bios which should be big enougth for a while.

This patch updates the seabios build process to build seabios twice,
once full featured and once with xen and xhci turned off so the
resulting binary is small enougth to fit into 128k.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoroms: update seabios submodule to 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d
Gerd Hoffmann [Tue, 15 Oct 2013 15:02:19 +0000 (17:02 +0200)]
roms: update seabios submodule to 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d

Updates seabios to git master snapshot.  seabios is in freeze now,
update to final 1.7.4 will follow later this year.

Summary of major changes:

 * Support for acpi table loading from qemu.
 * Support for the xhci host adapter.
 * Support for the pvscsi HBA.
 * Various minor bug fixes.
 * Lots of cleanups.

Full shortlog since 1.7.3 (note that some of these changes have been
cherry-picked into 1.7.3-stable):

Evgeny Budilovsky (1):
      Add pvscsi boot support

Gerd Hoffmann (27):
      coreboot: add cbmem console support
      Add CONFIG_DEBUG_COREBOOT config option
      apm: fix shutdown
      ahci: add missing check for allocation failure
      bochsvga: fallback to stdvga if dispi interface isn't present
      Add generic qemu detection
      Drop coreboot qemu detection
      Add qemu detection to csm
      uas: add (temporary) superspeed stopgap
      usb: add usb_update_pipe()
      usb: add xhci support
      fix buildversion.sh
      build: simplify cross builds
      build: create output dirs in do-kconfig
      build: explicitly set ROM size
      Add qemu_cfg_e820 function.
      Add support for etc/e820 fw_cfg file
      pci: don't reorder entries when moving to 64bit list
      pci: don't map usb host adapters above 4G
      pci: align 64bit pci regions to 1G
      pci: tweak + comment minimum allocations
      pci: log pci windows
      pci: map 64-bit BARs at location provided by emulator
      ahci: zap real mode macros
      ahci: remote some parentheses
      ahci: alloc structs in high memory
      add hw/serialio.c to SRC32SEG

Jonathan A. Kollasch (1):
      vgahooks: add SM720 VGA BIOS hooks for WIN Enterprises MB-60470

Kevin O'Connor (80):
      Fix USB EHCI detection that was broken in hlist conversion of PCIDevices.
      Update README to include info on VARLOW variables.
      PIC code cleanups.
      Move internal timer code from clock.c to a new file timer.c.
      Don't pass khz to pmtimer_setup - it's always PM_TIMER_FREQUENCY.
      Add helper functions to convert timer irqs to milliseconds.
      Improve accuracy of internal timers.
      Rename cpu_khz to TimerKHz.
      Shift CPU TSC down to reduce need for 64bit variables.
      Rename check_timer() function (and similar) to irqtimer_check().
      Rename check_tsc() (and similar) to timer_check() and use u32.
      Separate out timer setup code.
      Unify pmtimer_read() and pittimer_read() code.
      Default unused UMB areas to be read-only.
      Add missing mathcp_setup() call to CSM code.
      Fix bug in CBFS file walking with compressed files.
      Support custom boot menu prompt and custom boot menu key.
      Minor cleanups to smm assembler.
      Add config option to support memory allocations in 9-segment.
      Minor - no need to declare MaxCountCPUs as VARFSEG.
      Minor - simplify rom_reserve().
      Rename tools/ directory to scripts/ directory.
      Update kconfig to latest version.
      build: Don't use vpath makefile directive.
      Move code centered around specific hardware devices to src/hw/
      Move code cenetered around firmware initialization to src/fw/
      build: Reorder makefile source list to group like files together.
      README: Update readme to note scripts/ directory rename and vgasrc/ directory.
      vgabios: Rename stdvga_bpp_factor to stdvga_vram_ratio.
      vgabios: Limit the range of the VBE number of "pages" parameter.
      readme: Minor - fix typo in readme.
      Split x86 specific functions out of util.c/h to new files x86.c/h.
      Move keyboard calling code from util.c to boot.c.
      Rename util.c to string.c and introduce string.h.
      build: Perform compile checking on vgasrc code.
      Move stacks.c definitions from util.h to new file stacks.h.
      Move romfile definitions from util.h to new file romfile.h.
      Move malloc code from pmm.c to new files malloc.c and malloc.h.
      Move function definitions for output.c from util.h to new file output.h.
      Move definition of struct segoff_s from farptr.h to types.h.
      build: Fix import of gcc dependency files.
      Move pirtable definitions from hw/pci.h to std/pirtable.h and util.h.
      Move optionroms.h to std/optionrom.h and util.h.
      Move vbe.h to std/vbe.h.
      Move fw/LegacyBios.h to std/LegacyBios.h and remove csm.h.
      Move fw/smbios.h to std/smbios.h.
      Move fw/mptable.h to std/mptable.h.
      Move fw/acpi.h to std/acpi.h.
      Move pnpbios definition to new file std/pnpbios.h.
      Move pmm definitions to new file std/pmm.h.
      Split disk.h into block.h and std/disk.h.
      Move standard bda type info from biosvar.h to std/bda.h.
      Merge bmp.h, boot.h, jpeg.h, and post.h into util.h.
      Sort the sections of util.h.
      Move PIT setup from clock.c to hw/timer.c.
      Rename hw/cmos.h to hw/rtc.h and copy RTC code from clock.c to hw/rtc.c.
      Move dma code to new file hw/dma.c.
      Remove ioport.h; disperse its contents to other header files.
      Minor - update file comments in src/malloc.c.
      Rename fields of 'struct chs_s' and use in floppy lba2chs().
      Rearrange stack_hop_back() call in wait_irq, check_irqs, and _farcall16.
      Minor - move call16 assembler in romlayout.S.
      Make __call16 use C calling convention and support two passed parameters.
      Update _farcall16() to pass segment of callregs explicitly.
      Support call16() calls after entering 32bit mode from call32().
      Run ahci code entirely in 32bit mode.
      Build different final files for QEMU, coreboot, and CSM.
      Convert op->drive_g from a 16bit pointer to a 32 bit "GLOBALFLAT" pointer.
      megasas: Don't attempt to access 'struct pci_device' at runtime.
      Minor - eliminate the SET_GLOBAL macro.
      Move low-level hardware writing from output.c to new file hw/serialio.c.
      vgabios: Load the DAC palette in "packed" modes on Cirrus and BochsVGA.
      vgabios: Support custom fonts in vga framebuffer text writing.
      vgabios: Add bochsvga "HDTV" resolutions.
      vgabios: Avoid possible divide by zero in bochsvga_set_displaystart.
      vgabios: Work around lack of support for "calll" in x86emu emulation.
      Minor - update file comment on bootsplash.c.
      vgabios: Support allocating an extra stack for vgabios calls and default on.
      vgabios: Move initialization code to new file vgainit.c.
      floppy: Minor - add warnings if timeouts occur.

Michael S. Tsirkin (6):
      acpi: sync FADT flags from PIIX4 to Q35
      acpi_extract.py: document DEVICE directives
      biostables: support looking up RSDP
      romfile_loader: utility to patch in-memory ROM files
      acpi: load and link tables through romfile loader
      acpi: strip compiler info in built-in DSDT if any

Paul Menzel (2):
      ACPI DSDT: Make control method `IQCR` serialized
      hw/usb-xhci.c: Code refactoring to not override initializers in `speed_from_xhci[16]`

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agotarget-i386: fix cpuid leaf 0x0d
Liu Jinsong [Mon, 2 Dec 2013 20:17:50 +0000 (04:17 +0800)]
target-i386: fix cpuid leaf 0x0d

Fix cpuid leaf 0x0d which incorrectly parsed eax and ebx.

However, before this patch the CPUID worked fine -- the .offset
field contained the size _and_ was stored in the register that
is supposed to hold the size (eax), and likewise the .size field
contained the offset _and_ was stored in the register trhat is
supposed to hold the offset (ebx).

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agoqemu-img: dynamically adjust iobuffer size during convert
Peter Lieven [Wed, 27 Nov 2013 10:07:06 +0000 (11:07 +0100)]
qemu-img: dynamically adjust iobuffer size during convert

since the convert process is basically a sync operation it might
be benificial in some case to change the hardcoded I/O buffer
size to a greater value.

This patch increases the I/O buffer size if the output
driver advertises an optimal transfer length or discard alignment
that is greater than the default buffer size of 2M.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock/iscsi: set bs->bl.opt_transfer_length
Peter Lieven [Wed, 27 Nov 2013 10:07:05 +0000 (11:07 +0100)]
block/iscsi: set bs->bl.opt_transfer_length

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: add opt_transfer_length to BlockLimits
Peter Lieven [Wed, 27 Nov 2013 10:07:04 +0000 (11:07 +0100)]
block: add opt_transfer_length to BlockLimits

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock/iscsi: set bdi->cluster_size
Peter Lieven [Wed, 27 Nov 2013 10:07:03 +0000 (11:07 +0100)]
block/iscsi: set bdi->cluster_size

this patch aims to set bdi->cluster_size to the internal page size
of the iscsi target so that enabled callers can align requests
properly.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoqemu-img: fix usage instruction for qemu-img convert
Peter Lieven [Wed, 27 Nov 2013 10:07:02 +0000 (11:07 +0100)]
qemu-img: fix usage instruction for qemu-img convert

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>