]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
11 years agoMerge remote-tracking branch 'afaerber/qom-cpu' into staging
Anthony Liguori [Tue, 16 Apr 2013 15:28:36 +0000 (10:28 -0500)]
Merge remote-tracking branch 'afaerber/qom-cpu' into staging

# By Igor Mammedov (8) and others
# Via Andreas Färber
* afaerber/qom-cpu:
  target-cris: Override do_interrupt for pre-v32 CPU cores
  qdev: Set device's parent before calling realize() down inheritance chain
  cpu: Pass CPUState to *cpu_synchronize_post*()
  target-i386: Split out CPU creation and features parsing
  target-i386/cpu.c: Coding style fixes
  ioapic: Replace FROM_SYSBUS() with QOM type cast
  kvmvapic: Replace FROM_SYSBUS() with QOM type cast
  target-i386: Split APIC creation from initialization in x86_cpu_realizefn()
  target-i386: Consolidate error propagation in x86_cpu_realizefn()
  qdev: Add qdev property for bool type
  target-i386: Improve -cpu ? features output
  target-i386: Fix including "host" in -cpu ? output

11 years agom25p80: Add debug message for no bdrv
Peter Crosthwaite [Tue, 16 Apr 2013 00:34:50 +0000 (10:34 +1000)]
m25p80: Add debug message for no bdrv

If there is no backing bdrv, let the debugging developer know about it.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agom25p80.c: Multiple debug verbosity levels
Peter Crosthwaite [Tue, 16 Apr 2013 00:34:11 +0000 (10:34 +1000)]
m25p80.c: Multiple debug verbosity levels

The debug printfs on every page program/read is extremely verbose. Add
a second level of debug for this.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agom25p80: Convert guest errors to LOG_GUEST_ERROR
Peter Crosthwaite [Tue, 16 Apr 2013 00:33:32 +0000 (10:33 +1000)]
m25p80: Convert guest errors to LOG_GUEST_ERROR

Some of the debug printfs in m25p80 are really guest errors.
Changed over to qemu_log_mask(LOG_GUEST_ERROR accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agom25p80: Fix debug messages.
Peter Crosthwaite [Tue, 16 Apr 2013 00:32:53 +0000 (10:32 +1000)]
m25p80: Fix debug messages.

Some dodgy casts were making a mess of these msgs.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agostream: Remove app argument hack
Peter Crosthwaite [Tue, 16 Apr 2013 00:28:35 +0000 (10:28 +1000)]
stream: Remove app argument hack

The uint32_t *app argument doesn't exist in real hardware. It was a hack in
xilinx_axidma/enet to fake the (secondary) control stream connection. Removed
the argument and added the second stream to axienet/dma.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet/dma: Implement rx path flow control
Peter Crosthwaite [Tue, 16 Apr 2013 00:27:55 +0000 (10:27 +1000)]
xilinx_axienet/dma: Implement rx path flow control

Implement flow control for the RX data path from xilinx_axienet->xilinx_axidma.
On short return from axidma, then ethernet sets up the notify callback to resume
transfer from where it left off.

This also allows the ethernet to track whether there is an in progress transaction
and return false from ethernet can_receive() as appropriate.

If the DMA backs up or is disabled it waits for enablement. When the rx stream IO
region is touched, the can_push() notify function is called if set.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agostream: Add flow control API
Peter Crosthwaite [Tue, 16 Apr 2013 00:27:16 +0000 (10:27 +1000)]
stream: Add flow control API

Add basic flow control to stream. A stream slave may return short, indicating
that it is not capable of accepting any more data at the present time. Polling
or a callback can be used via the can_push() function to determine when the
slave can receive again.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axidma: Fix rx/tx halted bit.
Peter Crosthwaite [Tue, 16 Apr 2013 00:26:37 +0000 (10:26 +1000)]
xilinx_axidma: Fix rx/tx halted bit.

If there is no DMA buffer descriptor, the DMA halts, not idles.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axidma: Create Proxy object for stream
Peter Crosthwaite [Tue, 16 Apr 2013 00:25:57 +0000 (10:25 +1000)]
xilinx_axidma: Create Proxy object for stream

Create a separate child object to proxy the stream slave connection. This is
setup for future work where a second stream slave connection is needed. The
new child object is created at qdev init time and is linked back to the parent
(the ethernet device itself) automatically.

Stream slave masters differentiate which slave connection they are connected to
by linking to the proxy object rather than the parent.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet: Create Proxy object for stream
Peter Crosthwaite [Tue, 16 Apr 2013 00:25:18 +0000 (10:25 +1000)]
xilinx_axienet: Create Proxy object for stream

Create a separate child object to proxy the stream slave connection. This is
setup for future work where a second stream slave connection is needed. The
new child object is created at qdev init time and is linked back to the parent
(the ethernet device itself) automatically.

Stream slave masters differentiate which slave connection they are connected to
by linking to the proxy object rather than the parent.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agopetalogix_ml605_mmu: Attach ethernet to machine
Peter Crosthwaite [Tue, 16 Apr 2013 00:24:39 +0000 (10:24 +1000)]
petalogix_ml605_mmu: Attach ethernet to machine

Explicitly make the ethernet a child of the machine. This is needed to set
and use links pre-realize. Also makes the ethernet initialization consistent
with its peer DMA.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agopetalogix_ml605_mmu: Fix machine node attachment
Peter Crosthwaite [Tue, 16 Apr 2013 00:23:59 +0000 (10:23 +1000)]
petalogix_ml605_mmu: Fix machine node attachment

Just attach devices straight to the root machine node, rather than the
"unattached node"

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axidma: converted init->realize
Peter Crosthwaite [Tue, 16 Apr 2013 00:23:20 +0000 (10:23 +1000)]
xilinx_axidma: converted init->realize

The prescribed transition from SysBusDevice::init to Device::realize. I'm going
with Andreas suggestion to move the sysbus foo to Object::init for early IRQ
visibility.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axidma: Register reset properly
Peter Crosthwaite [Tue, 16 Apr 2013 00:22:41 +0000 (10:22 +1000)]
xilinx_axidma: Register reset properly

Register the reset function as the Device::reset function rather than
explicitly call it from the sysbus::init.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axidma: Defined and use type cast macro
Peter Crosthwaite [Tue, 16 Apr 2013 00:22:02 +0000 (10:22 +1000)]
xilinx_axidma: Defined and use type cast macro

Standard QOM cast macro. Replaces usages of FROM_SYSBUS

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axidma: typedef XilinxAXIDMA struct
Peter Crosthwaite [Tue, 16 Apr 2013 00:21:23 +0000 (10:21 +1000)]
xilinx_axidma: typedef XilinxAXIDMA struct

Typedef xilinx_axidma's object state struct to shorten the repeated usages of
struct XilinxAXIDMA.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet: converted init->realize
Peter Crosthwaite [Tue, 16 Apr 2013 00:20:44 +0000 (10:20 +1000)]
xilinx_axienet: converted init->realize

The prescribed transition from SysBusDevice::init to Device::realize. Im going
with Andreas suggestion to move the sysbus foo to Object::init for early IRQ
visibility.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet: Register reset properly
Peter Crosthwaite [Tue, 16 Apr 2013 00:20:06 +0000 (10:20 +1000)]
xilinx_axienet: Register reset properly

Register the reset function and the Device::reset function rather than
explicitly call it from the sysbus::init.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet: Defined and use type cast macro
Peter Crosthwaite [Tue, 16 Apr 2013 00:19:27 +0000 (10:19 +1000)]
xilinx_axienet: Defined and use type cast macro

Standard QOM cast macro. Replaces usages of FROM_SYSBUS

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet: typedef XilinxAXIEnet struct
Peter Crosthwaite [Tue, 16 Apr 2013 00:18:47 +0000 (10:18 +1000)]
xilinx_axienet: typedef XilinxAXIEnet struct

Typedef xilinx_axienets object state struct to shorten the repeated usages of
struct XilinxAXIEnet.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agotarget-cris: Override do_interrupt for pre-v32 CPU cores
Andreas Färber [Mon, 18 Feb 2013 18:59:39 +0000 (19:59 +0100)]
target-cris: Override do_interrupt for pre-v32 CPU cores

Instead of forwarding from cris_cpu_do_interrupt() to do_interruptv10(),
override CPUClass::do_interrupt with crisv10_cpu_do_interrupt() in the
newly introduced class_init functions.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoqdev: Set device's parent before calling realize() down inheritance chain
Igor Mammedov [Thu, 11 Apr 2013 14:51:56 +0000 (16:51 +0200)]
qdev: Set device's parent before calling realize() down inheritance chain

Currently device_set_realized() sets parent only after device was realized,
but qdev_device_add() sets it before device is realized.
Make behavior consistent and alter device_set_realized() to behave like
qdev_device_add().

It will allow to set link<> properties in realize() method in classes
inherited from DEVICE.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Pass CPUState to *cpu_synchronize_post*()
Igor Mammedov [Thu, 11 Apr 2013 14:51:41 +0000 (16:51 +0200)]
cpu: Pass CPUState to *cpu_synchronize_post*()

... so it could be called without requiring CPUArchState.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-i386: Split out CPU creation and features parsing
Igor Mammedov [Thu, 11 Apr 2013 14:51:40 +0000 (16:51 +0200)]
target-i386: Split out CPU creation and features parsing

Move CPU creation and features parsing into a separate cpu_x86_create()
function, so that board would be able to set board-specific CPU
properties before CPU is realized.

Keep cpu_x86_init() for compatibility with the code that uses cpu_init()
and doesn't need to modify CPU properties.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-i386/cpu.c: Coding style fixes
Eduardo Habkost [Thu, 11 Apr 2013 20:07:23 +0000 (17:07 -0300)]
target-i386/cpu.c: Coding style fixes

 * Add braces to 'if' statements;
 * Remove last TAB character from the source.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
[AF: Changed whitespace]
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoioapic: Replace FROM_SYSBUS() with QOM type cast
Igor Mammedov [Fri, 5 Apr 2013 14:37:00 +0000 (16:37 +0200)]
ioapic: Replace FROM_SYSBUS() with QOM type cast

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agokvmvapic: Replace FROM_SYSBUS() with QOM type cast
Igor Mammedov [Fri, 5 Apr 2013 14:36:59 +0000 (16:36 +0200)]
kvmvapic: Replace FROM_SYSBUS() with QOM type cast

... and define type name and type cast macro for kvmvapic according
to accepted convention.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-i386: Split APIC creation from initialization in x86_cpu_realizefn()
Igor Mammedov [Fri, 5 Apr 2013 14:36:54 +0000 (16:36 +0200)]
target-i386: Split APIC creation from initialization in x86_cpu_realizefn()

When APIC is hotplugged during CPU hotplug, device_set_realized()
calls device_reset() on it. And if QEMU runs in KVM mode, following
call chain will fail:
    apic_reset_common()
        -> kvm_apic_vapic_base_update()
            -> kvm_vcpu_ioctl(cpu->kvm_fd,...)
due to cpu->kvm_fd not being initialized yet.

cpu->kvm_fd is initialized during qemu_init_vcpu() but x86_cpu_apic_init()
can't be moved after it because kvm_init_vcpu() -> kvm_arch_reset_vcpu()
relies on APIC to determine if CPU is BSP for setting initial env->mp_state.

So split APIC device creation from its initialization and realize APIC
after CPU is created, when it's safe to call APIC's reset method.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-i386: Consolidate error propagation in x86_cpu_realizefn()
Igor Mammedov [Fri, 5 Apr 2013 14:36:53 +0000 (16:36 +0200)]
target-i386: Consolidate error propagation in x86_cpu_realizefn()

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoqdev: Add qdev property for bool type
Igor Mammedov [Thu, 7 Mar 2013 16:16:18 +0000 (17:16 +0100)]
qdev: Add qdev property for bool type

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
[AF: Use new qdev_prop_set_after_realize()]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-i386: Improve -cpu ? features output
Jan Kiszka [Wed, 27 Feb 2013 09:15:51 +0000 (10:15 +0100)]
target-i386: Improve -cpu ? features output

We were missing a bunch of feature lists. Fix this by simply dumping
the meta list feature_word_info.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-i386: Fix including "host" in -cpu ? output
Jan Kiszka [Sun, 24 Mar 2013 16:01:02 +0000 (17:01 +0100)]
target-i386: Fix including "host" in -cpu ? output

kvm_enabled() cannot be true at this point because accelerators are
initialized much later during init. Also, hiding this makes it very hard
to discover for users. Simply dump unconditionally if CONFIG_KVM is set.

Add explanation for "host" CPU type.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agovirtio-balloon: fix dynamic properties.
KONRAD Frederic [Sun, 14 Apr 2013 12:07:00 +0000 (14:07 +0200)]
virtio-balloon: fix dynamic properties.

To keep compatibility with the old virtio-balloon-x, add the dynamic properties
to virtio-balloon-pci and virtio-balloon-ccw.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1365941220-8114-1-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'bonzini/hw-dirs' into staging
Anthony Liguori [Mon, 15 Apr 2013 22:06:04 +0000 (17:06 -0500)]
Merge remote-tracking branch 'bonzini/hw-dirs' into staging

* bonzini/hw-dirs:
  exec: remove useless declarations from memory-internal.h
  memory: move core typedefs to qemu/typedefs.h
  include: avoid useless includes of exec/ headers
  sysemu: avoid proliferation of include/ subdirectories
  tpm: reorganize headers and split hardware part
  configure: fix TPM logic
  acpi.h: make it self contained
  acpi: move declarations from pc.h to acpi.h
  hw: Add lost ARM core again
  Fix failure to create q35 machine
  Add linux-headers to QEMU_INCLUDES
  arm: fix location of some include files

Conflicts:
configure

aliguori: trivial conflict in configure output

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAllow qtest to be used together with a virtual CPU
Edgar E. Iglesias [Mon, 15 Apr 2013 19:28:17 +0000 (21:28 +0200)]
Allow qtest to be used together with a virtual CPU

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: 1366054097-14132-1-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqdev: Fix QOM unrealize behavior
Andreas Färber [Mon, 15 Apr 2013 16:34:10 +0000 (18:34 +0200)]
qdev: Fix QOM unrealize behavior

Since commit 249d41720b7dfbb5951b430b9eefdbee7464f515 (qdev: Prepare
"realized" property) setting realized = true would register the device's
VMStateDescription, but realized = false would not unregister it. Fix that.

Moving the code from unparenting also revealed that we were calling
DeviceClass::init through DeviceClass::realize as interim solution but
DeviceClass::exit still at unparenting time with a realized check.
Make this symmetrical by implementing DeviceClass::unrealize to call it,
while we're setting realized = false in the unparenting path.
The only other unrealize user is mac_nvram, which can safely override it.

Thus, mark DeviceClass::exit as obsolete, new devices should implement
DeviceClass::unrealize instead.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1366043650-9719-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge branch 'tcg-ppc64' of git://github.com/rth7680/qemu
Aurelien Jarno [Mon, 15 Apr 2013 20:51:32 +0000 (22:51 +0200)]
Merge branch 'tcg-ppc64' of git://github.com/rth7680/qemu

* 'tcg-ppc64' of git://github.com/rth7680/qemu: (33 commits)
  tcg-ppc64: Handle deposit of zero
  tcg-ppc64: Implement mulu2/muls2_i64
  tcg-ppc64: Implement add2/sub2_i64
  tcg-ppc64: Use getauxval for ISA detection
  tcg-ppc64: Implement movcond
  tcg-ppc64: Use ISEL for setcond
  tcg-ppc64: Use MFOCRF instead of MFCR
  tcg-ppc64: Cleanup i32 constants to tcg_out_cmp
  tcg-ppc64: Use TCGType throughout compares
  tcg-ppc64: Use I constraint for mul
  tcg-ppc64: Implement deposit
  tcg-ppc64: Handle constant inputs for some compound logicals
  tcg-ppc64: Implement compound logicals
  tcg-ppc64: Implement bswap64
  tcg-ppc64: Implement bswap16 and bswap32
  tcg-ppc64: Implement rotates
  tcg-ppc64: Streamline qemu_ld/st insn selection
  tcg-ppc64: Use automatic implementation of ext32u_i64
  tcg-ppc64: Improve and_i64 with constant
  tcg-ppc64: Improve and_i32 with constant
  ...

11 years agoAdd -f FMT / --format FMT arg to qemu-nbd
Daniel P. Berrange [Tue, 19 Mar 2013 11:20:20 +0000 (11:20 +0000)]
Add -f FMT / --format FMT arg to qemu-nbd

Currently the qemu-nbd program will auto-detect the format of
any disk it is given. This behaviour is known to be insecure.
For example, if qemu-nbd initially exposes a 'raw' file to an
unprivileged app, and that app runs

   'qemu-img create -f qcow2 -o backing_file=/etc/shadow /dev/nbd0'

then the next time the app is started, the qemu-nbd will now
detect it as a 'qcow2' file and expose /etc/shadow to the
unprivileged app.

The only way to avoid this is to explicitly tell qemu-nbd what
disk format to use on the command line, completely disabling
auto-detection. This patch adds a '-f' / '--format' arg for
this purpose, mirroring what is already available via qemu-img
and qemu commands.

  qemu-nbd --format raw -p 9000 evil.img

will now always use raw, regardless of what format 'evil.img'
looks like it contains

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
[Use errx, not err. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agotcg-ppc64: Handle deposit of zero
Richard Henderson [Thu, 4 Apr 2013 19:47:22 +0000 (12:47 -0700)]
tcg-ppc64: Handle deposit of zero

The TCG optimizer does great work when inserting constants, being able
to fold the open-coded deposit expansion to just an AND or an OR.  Avoid
a bit the regression caused by having the deposit opcode by expanding
deposit of zero as an AND.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement mulu2/muls2_i64
Richard Henderson [Tue, 5 Mar 2013 00:20:51 +0000 (16:20 -0800)]
tcg-ppc64: Implement mulu2/muls2_i64

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement add2/sub2_i64
Richard Henderson [Mon, 4 Mar 2013 22:26:52 +0000 (14:26 -0800)]
tcg-ppc64: Implement add2/sub2_i64

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use getauxval for ISA detection
Richard Henderson [Mon, 18 Feb 2013 17:11:15 +0000 (09:11 -0800)]
tcg-ppc64: Use getauxval for ISA detection

Glibc 2.16 includes an easy way to get feature bits previously
buried in /proc or the program startup auxiliary vector.  Use it.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement movcond
Richard Henderson [Fri, 1 Feb 2013 21:00:05 +0000 (13:00 -0800)]
tcg-ppc64: Implement movcond

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use ISEL for setcond
Richard Henderson [Tue, 2 Apr 2013 22:16:10 +0000 (15:16 -0700)]
tcg-ppc64: Use ISEL for setcond

There are a few simple special cases that should be handled first.
Break these out to subroutines to avoid code duplication.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use MFOCRF instead of MFCR
Richard Henderson [Tue, 2 Apr 2013 22:09:52 +0000 (15:09 -0700)]
tcg-ppc64: Use MFOCRF instead of MFCR

It takes half the cycles to read one CR register instead of all 8.
This is a backward compatible addition to the ISA, so chips prior
to Power 2.00 spec will simply continue to read the entire CR register.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Cleanup i32 constants to tcg_out_cmp
Richard Henderson [Tue, 2 Apr 2013 21:14:23 +0000 (14:14 -0700)]
tcg-ppc64: Cleanup i32 constants to tcg_out_cmp

Nothing else in the call chain ensures that these
constants don't have garbage in the high bits.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use TCGType throughout compares
Richard Henderson [Tue, 2 Apr 2013 21:58:27 +0000 (14:58 -0700)]
tcg-ppc64: Use TCGType throughout compares

The optimization/bug being fixed is that tcg_out_cmp was not applying the
right type to loading a constant, in the case it can't be implemented
directly.  Rather than recomputing the TCGType enum from the arch64 bool,
pass around the original TCGType throughout.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use I constraint for mul
Richard Henderson [Thu, 31 Jan 2013 17:45:11 +0000 (09:45 -0800)]
tcg-ppc64: Use I constraint for mul

The mul_i32 pattern was loading non-16-bit constants into a register,
when we can get the middle-end to do that for us.  The mul_i64 pattern
was not considering that MULLI takes 64-bit inputs.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement deposit
Richard Henderson [Thu, 31 Jan 2013 16:39:30 +0000 (08:39 -0800)]
tcg-ppc64: Implement deposit

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Handle constant inputs for some compound logicals
Richard Henderson [Mon, 4 Mar 2013 21:48:38 +0000 (13:48 -0800)]
tcg-ppc64: Handle constant inputs for some compound logicals

Since we have special code to handle and/or/xor with a constant,
apply the same to andc/orc/eqv with a constant.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement compound logicals
Richard Henderson [Thu, 31 Jan 2013 15:49:13 +0000 (07:49 -0800)]
tcg-ppc64: Implement compound logicals

Mostly copied from the ppc32 port.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement bswap64
Richard Henderson [Thu, 31 Jan 2013 05:41:54 +0000 (21:41 -0800)]
tcg-ppc64: Implement bswap64

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement bswap16 and bswap32
Richard Henderson [Thu, 31 Jan 2013 05:16:38 +0000 (21:16 -0800)]
tcg-ppc64: Implement bswap16 and bswap32

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Implement rotates
Richard Henderson [Thu, 31 Jan 2013 03:24:06 +0000 (19:24 -0800)]
tcg-ppc64: Implement rotates

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Streamline qemu_ld/st insn selection
Richard Henderson [Sat, 2 Feb 2013 08:58:14 +0000 (00:58 -0800)]
tcg-ppc64: Streamline qemu_ld/st insn selection

Using a table to look up insns of the right width and sign.
Include support for the Power 2.06 LDBRX and STDBRX insns.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use automatic implementation of ext32u_i64
Richard Henderson [Thu, 4 Apr 2013 18:36:07 +0000 (13:36 -0500)]
tcg-ppc64: Use automatic implementation of ext32u_i64

The enhancements to and immediate obviate this.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Improve and_i64 with constant
Richard Henderson [Sat, 2 Feb 2013 07:58:17 +0000 (23:58 -0800)]
tcg-ppc64: Improve and_i64 with constant

Use RLDICL and RLDICR.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Improve and_i32 with constant
Richard Henderson [Sat, 2 Feb 2013 07:43:42 +0000 (23:43 -0800)]
tcg-ppc64: Improve and_i32 with constant

Use RLWINM

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Tidy or and xor patterns.
Richard Henderson [Sat, 2 Feb 2013 04:22:05 +0000 (20:22 -0800)]
tcg-ppc64: Tidy or and xor patterns.

Handle constants in common code; we'll want to reuse that later.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Allow constant first argument to sub
Richard Henderson [Thu, 4 Apr 2013 14:30:20 +0000 (07:30 -0700)]
tcg-ppc64: Allow constant first argument to sub

Using SUBFIC for 16-bit signed constants.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Improve constant add and sub ops.
Richard Henderson [Sat, 2 Feb 2013 00:17:17 +0000 (16:17 -0800)]
tcg-ppc64: Improve constant add and sub ops.

Improve constant addition -- previously we'd emit useless addi with 0.
Use new constraints to force the driver to pull full 64-bit constants
into a register.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Rearrange integer constant constraints
Richard Henderson [Sat, 2 Feb 2013 00:51:53 +0000 (16:51 -0800)]
tcg-ppc64: Rearrange integer constant constraints

We'll need a zero, and Z makes more sense for that.  Make sure we
have a full compliment of signed and unsigned 16 and 32-bit tests.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Cleanup tcg_out_movi
Richard Henderson [Thu, 31 Jan 2013 23:52:49 +0000 (15:52 -0800)]
tcg-ppc64: Cleanup tcg_out_movi

The test for using movi32 was sub-optimal for TCG_TYPE_I32, comparing
a signed 32-bit quantity against an unsigned 32-bit quantity.

When possible, use addi+oris for 32-bit unsigned constants.  Otherwise,
standardize on addi+oris+ori instead of addis+ori+rldicl.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Fix setcond_i32
Richard Henderson [Tue, 2 Apr 2013 18:13:28 +0000 (11:13 -0700)]
tcg-ppc64: Fix setcond_i32

We weren't ignoring the high 32 bits during a NE comparison.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Introduce and use TAI and SAI
Richard Henderson [Sat, 2 Feb 2013 00:08:50 +0000 (16:08 -0800)]
tcg-ppc64: Introduce and use TAI and SAI

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Introduce and use tcg_out_shri64
Richard Henderson [Fri, 1 Feb 2013 23:19:05 +0000 (15:19 -0800)]
tcg-ppc64: Introduce and use tcg_out_shri64

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Introduce and use tcg_out_shli64
Richard Henderson [Fri, 1 Feb 2013 23:12:14 +0000 (15:12 -0800)]
tcg-ppc64: Introduce and use tcg_out_shli64

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Introduce and use tcg_out_ext32u
Richard Henderson [Fri, 1 Feb 2013 23:06:30 +0000 (15:06 -0800)]
tcg-ppc64: Introduce and use tcg_out_ext32u

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Introduce and use tcg_out_rlw
Richard Henderson [Fri, 1 Feb 2013 23:00:45 +0000 (15:00 -0800)]
tcg-ppc64: Introduce and use tcg_out_rlw

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-ppc64: Use TCGReg everywhere
Richard Henderson [Fri, 1 Feb 2013 22:48:37 +0000 (14:48 -0800)]
tcg-ppc64: Use TCGReg everywhere

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agodisas: Disassemble all ppc insns for the host
Richard Henderson [Thu, 31 Jan 2013 19:16:21 +0000 (11:16 -0800)]
disas: Disassemble all ppc insns for the host

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agoexec: remove useless declarations from memory-internal.h
Paolo Bonzini [Mon, 8 Apr 2013 16:26:41 +0000 (18:26 +0200)]
exec: remove useless declarations from memory-internal.h

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomemory: move core typedefs to qemu/typedefs.h
Paolo Bonzini [Tue, 9 Apr 2013 09:10:27 +0000 (11:10 +0200)]
memory: move core typedefs to qemu/typedefs.h

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoinclude: avoid useless includes of exec/ headers
Paolo Bonzini [Mon, 8 Apr 2013 15:29:59 +0000 (17:29 +0200)]
include: avoid useless includes of exec/ headers

Headers in include/exec/ are for the deepest innards of QEMU,
they should almost never be included directly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agosysemu: avoid proliferation of include/ subdirectories
Paolo Bonzini [Mon, 8 Apr 2013 14:55:25 +0000 (16:55 +0200)]
sysemu: avoid proliferation of include/ subdirectories

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agotpm: reorganize headers and split hardware part
Paolo Bonzini [Tue, 2 Apr 2013 16:28:41 +0000 (18:28 +0200)]
tpm: reorganize headers and split hardware part

The TPM subsystem does not have a full front-end/back-end separation.
The sole available backend, tpm_passthrough, depends on the data
structures of the sole available frontend, tpm_tis.

However, we can at least try to split the user interface (tpm.c) from the
implementation (hw/tpm).  The patches makes tpm.c not include tpm_int.h,
which is shared between tpm_tis.c and tpm_passthrough.c; instead it
moves more stuff to tpm_backend.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-char: another io_add_watch_poll fix
Paolo Bonzini [Wed, 10 Apr 2013 13:23:27 +0000 (15:23 +0200)]
qemu-char: another io_add_watch_poll fix

After attaching the source, we have to remove the reference we hold
to it, because we do not hold anymore a pointer to the source.

If we do not do this, removing the source will not finalize it and
will not drop the "real" I/O watch source.

This showed up when backporting the new flow control patches to older
versions of QEMU that still used select.  The whole select then failed
with EBADF (poll instead will reporting POLLNVAL on a single pollfd)
and QEMU froze.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1365600207-21685-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial: cleanup: remove qdev field.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:36 +0000 (14:53 +0200)]
virtio-serial: cleanup: remove qdev field.

The qdev field is no longer needed, just drop it.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-8-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial: cleanup: use QOM casts.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:35 +0000 (14:53 +0200)]
virtio-serial: cleanup: use QOM casts.

As the virtio-serial-pci and virtio-serial-s390 are switched to the new
API, we can use QOM casts.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-7-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial: cleanup: init and exit functions.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:34 +0000 (14:53 +0200)]
virtio-serial: cleanup: init and exit functions.

This remove old init and exit function as they are no longer needed.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-6-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial-ccw: switch to the new API.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:33 +0000 (14:53 +0200)]
virtio-serial-ccw: switch to the new API.

Here the virtio-serial-ccw is modified for the new API. The device
virtio-serial-ccw extends virtio-ccw-device as before. It creates and
connects a virtio-serial during the init. The properties are not modified.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-5-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial-s390: switch to the new API.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:32 +0000 (14:53 +0200)]
virtio-serial-s390: switch to the new API.

Here the virtio-serial-s390 is modified for the new API. The device
virtio-serial-s390 extends virtio-s390-device as before. It creates and
connects a virtio-serial during the init. The properties are not
modified.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-4-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial-pci: switch to the new API.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:31 +0000 (14:53 +0200)]
virtio-serial-pci: switch to the new API.

Here the virtio-serial-pci is modified for the new API. The device
virtio-serial-pci extends virtio-pci. It creates and connects a
virtio-serial during the init. The properties are not changed.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-3-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-serial: add the virtio-serial device.
KONRAD Frederic [Tue, 9 Apr 2013 12:53:30 +0000 (14:53 +0200)]
virtio-serial: add the virtio-serial device.

Create virtio-serial which extends virtio-device, so it can be connected
on virtio-bus.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-2-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio: fix broken aliases.
KONRAD Frederic [Tue, 9 Apr 2013 10:04:48 +0000 (12:04 +0200)]
virtio: fix broken aliases.

This fix the broken aliases, by renaming the devices.

So: * virtio-blk => virtio-blk-device.
    * virtio-balloon => virtio-balloon-device.
    * virtio-scsi => virtio-scsi-device.

All virtio-*-pci, virtio-*-s390, virtio-*-ccw didn't change.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1365501888-14602-1-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoUpdate Makefile to actually install the new efi-enabled nic roms that are used by...
Sander Eikelenboom [Mon, 8 Apr 2013 21:08:13 +0000 (23:08 +0200)]
Update Makefile to actually install the new efi-enabled nic roms that are used by default.

Commit c45e5b5b30ac1f5505725a7b36e68cedfce4f01f made a switch use the efi-enabled nic roms by default.
This patch updates the Makefile to install the roms so they can actually be used.

Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Message-id: 1365455293-7084-1-git-send-email-linux@eikelenboom.it
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoacpi.h: make it self contained
Michael S. Tsirkin [Mon, 15 Apr 2013 08:12:50 +0000 (11:12 +0300)]
acpi.h: make it self contained

Headers shouldn't assume another header is included,
pull in everything necessary.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20130415081250.GA7374@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agotarget-mips: fix mipsdsp_mul_q15_q15 and tests for MAQ_SA_W_PHL/PHR
Petar Jovanovic [Mon, 15 Apr 2013 11:54:07 +0000 (13:54 +0200)]
target-mips: fix mipsdsp_mul_q15_q15 and tests for MAQ_SA_W_PHL/PHR

The operands for MAQ_SA_W.PHL/MAQ_SA_W.PHR must in specified format.
Otherwise, the results are unpredictable. Once the operands were corrected
in the tests (part of this change), a bug in mipsdsp_mul_q15_q15 became
visible.

This change corrects the tests for MAQ_SA_W.PHL/MAQ_SA_W.PHR and fixes
sign-related issue in mipsdsp_mul_q15_q15. It also removes unnecessary
comment.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
11 years agofpu: Correct edgecase in float64_muladd
Peter Maydell [Fri, 12 Apr 2013 15:37:52 +0000 (16:37 +0100)]
fpu: Correct edgecase in float64_muladd

In handling float64_muladd, if we end up doing a subtraction of the
product and c, and the 128 bit result of this subtraction happens to
have its most significant bit in bit 63, we weren't handling this
correctly when attempting to normalize to put the most significant
bit into bit 126.  We would end up doing a right shift by a negative
number (undefined behaviour in C) so at best we would return an
incorrect result to the guest.  MSB in bit 63 has to be handled as a
special case separately from MSB in 0..62 and MSB in 63..126.  (MSB
in 127 is not possible.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoconfigure: fix TPM logic
Paolo Bonzini [Mon, 18 Mar 2013 15:37:50 +0000 (16:37 +0100)]
configure: fix TPM logic

A non-native i386 or x86_64 emulator should not have TPM passthrough
support, since the TPM is only present for those hosts.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoacpi.h: make it self contained
Michael S. Tsirkin [Mon, 15 Apr 2013 08:12:50 +0000 (11:12 +0300)]
acpi.h: make it self contained

Headers shouldn't assume another header is included,
pull in everything necessary.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoacpi: move declarations from pc.h to acpi.h
Michael S. Tsirkin [Mon, 15 Apr 2013 06:19:22 +0000 (09:19 +0300)]
acpi: move declarations from pc.h to acpi.h

Functions defined in acpi/ should be declared in
acpi.h

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: Add lost ARM core again
Stefan Weil [Sun, 14 Apr 2013 20:52:50 +0000 (22:52 +0200)]
hw: Add lost ARM core again

Commit 0434e30afb6175212389811e0b28b948eb3c1e40 accidentally removed
the compilation of arm11mpcore.c.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoFix failure to create q35 machine
Hu Tao [Wed, 10 Apr 2013 08:43:09 +0000 (16:43 +0800)]
Fix failure to create q35 machine

This is a regression introduced by c0907c9e6417c. How to reproduce:

$ qemu-system-x86_64 -nodefaults -vnc :0 -M q35
qemu-system-x86_64: Unknown device 'q35-pcihost' for default sysbus
Aborted (core dumped)

Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoAdd linux-headers to QEMU_INCLUDES
Jan Kiszka [Wed, 10 Apr 2013 08:29:47 +0000 (10:29 +0200)]
Add linux-headers to QEMU_INCLUDES

virtio/dataplane/vring.c requires the Linux headers and is built for all
targets. So we need to add the corresponding include to QEMU_INCLUDES to
avoid that outdated distribution headers are used.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoarm: fix location of some include files
Peter Maydell [Tue, 9 Apr 2013 14:26:55 +0000 (15:26 +0100)]
arm: fix location of some include files

The recent rearrangement of include files had some minor errors:
 devices.h is not ARM specific and should not be in arm/
 arm.h should be in arm/

Move these two headers to correct this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoMerge remote-tracking branch 'stefanha/block' into staging
Anthony Liguori [Mon, 15 Apr 2013 13:02:41 +0000 (08:02 -0500)]
Merge remote-tracking branch 'stefanha/block' into staging

* stefanha/block:
  rbd: add an asynchronous flush
  iotests: Add 'check -ssh' option to test Secure Shell block device.
  block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
  block: Add support for Secure Shell (ssh) block device.
  ide: refuse WIN_READ_NATIVE_MAX on empty device
  qemu-iotests: filter QEMU_PROG in 051.out
  qemu-iotests: Add test for -drive options
  qemu-iotests: A few more bdrv_pread/pwrite tests
  block: Introduce bdrv_pwritev() for qcow2_save_vmstate
  savevm: Implement block_writev_buffer()
  block: Introduce bdrv_writev_vmstate

Conflicts:
savevm.c

aliguori: add f->pos parameter to writev_buffer().

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'luiz/queue/qmp' into staging
Anthony Liguori [Mon, 15 Apr 2013 12:49:21 +0000 (07:49 -0500)]
Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Michal Novotny (2) and Eric Blake (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
  qapi: use valid JSON in schema
  Revert "New QMP command query-cpu-max and HMP command cpu_max"
  New cpu-max field in query-machines QMP command output

Message-id: 1365775103-18737-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'quintela/migration.next' into staging
Anthony Liguori [Mon, 15 Apr 2013 12:46:39 +0000 (07:46 -0500)]
Merge remote-tracking branch 'quintela/migration.next' into staging

# By Paolo Bonzini
# Via Juan Quintela
* quintela/migration.next:
  migration: simplify writev vs. non-writev logic
  migration: drop is_write complications
  migration: use a single I/O operation when writev_buffer is not defined
  migration: set f->is_write and flush in add_to_iovec

Message-id: 1365512961-15623-1-git-send-email-quintela@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>