Gerd Hoffmann [Fri, 15 Mar 2013 14:45:54 +0000 (15:45 +0100)]
console: allow pinning displaychangelisteners to consoles
DisplayChangeListener gets a new QemuConsole field, which can be set to
non-NULL before registering. This will pin the QemuConsole, so that
particular DisplayChangeListener will not follow console switches.
spice+gtk (which don't support text console input anyway) are switched
over to be pinned to console 0, which usually is the graphical display.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 14 Mar 2013 13:27:08 +0000 (14:27 +0100)]
console: add qemu_console_is_*
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 19 Mar 2013 14:01:02 +0000 (15:01 +0100)]
xen: re-enable refresh interval reporting for xenfb
xenfb informs the guest about the gui refresh interval so it can avoid
pointless work. That logic was temporarely disabled for the
DisplayState reorganization. Restore it now, with a proper interface
for it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 14 Mar 2013 10:56:16 +0000 (11:56 +0100)]
console: gui timer fixes
Make gui update rate adaption code in gui_update() actually work.
Sprinkle in a tracepoint so you can see the code at work. Remove
the update rate adaption code in vnc and make vnc simply use the
generic bits instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 13 Mar 2013 13:04:18 +0000 (14:04 +0100)]
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,
instead of a bunch of function pointers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 13 Mar 2013 11:25:25 +0000 (12:25 +0100)]
console: make DisplayState private to console.c
With gui_* being moved to console.c nobody outside console.c needs
access to DisplayState fields any more. Make the struct private.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 13 Mar 2013 11:17:13 +0000 (12:17 +0100)]
console: move gui_update+gui_setup_refresh from vl.c into console.c
Pure code motion, no functional changes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 13 Mar 2013 09:14:52 +0000 (10:14 +0100)]
console: zap g_width + g_height
We have a surface per QemuConsole now, so there is no need to keep
track of the QemuConsole size any more as we can query the surface
size directly at any time.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 12 Mar 2013 13:48:31 +0000 (14:48 +0100)]
console: simplify screendump
Screendumps are alot simpler as we can update non-active
QemuConsoles now. So we only need to update the QemuConsole
we want write out, then dump the DisplaySurface content into
a ppm file. Done.
No console switching needed. No special support code in the
gfx card emulation needed. Zap it all. Also move ppm_save
out of the vga code and next to the qmp_screendump function.
For now screen dumping is limited to console #0 (like it used
to be), even though it is dead simple to extend it to other
consoles. I wanna finish the console cleanup before setting
new qapi interfaces into stone.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Gerd Hoffmann [Tue, 12 Mar 2013 13:39:22 +0000 (14:39 +0100)]
console: give each QemuConsole its own DisplaySurface
Go away from the global DisplaySurface, give one to each QemuConsole
instead. With this patch applied it is possible to call
graphics_hw_* functions with qemu consoles which are not the current
foreground console.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 12 Mar 2013 12:44:38 +0000 (13:44 +0100)]
console: rename vga_hw_*, add QemuConsole param
Add QemuConsole parameter to vga_hw_*, so the interface allows to update
non-active consoles (the actual code can't handle this yet, see next
patch). Passing NULL is allowed and updates the active console, like
the functions do today.
While touching all vga_hw_* calls anyway rename that to the functions to
hardware-neutral graphics_hw_*
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 7 Mar 2013 16:08:29 +0000 (17:08 +0100)]
console: displaystate init revamp
We have only one DisplayState, so there is no need for the "next"
linking, rip it. Also consolidate all displaystate initialization
into init_displaystate(). This function is called by vl.c after
creating the devices (and thus all QemuConsoles) and before
initializing DisplayChangeListensers (aka gtk/sdl/vnc/spice ui).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 7 Mar 2013 15:04:52 +0000 (16:04 +0100)]
console: add trace events
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Fri, 8 Mar 2013 07:43:24 +0000 (08:43 +0100)]
console: switch color_table_rgb to pixman_color_t
Now that all text console rendering uses pixman we can easily
switch the color tables to use pixman_color_t directly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 6 Mar 2013 14:44:10 +0000 (15:44 +0100)]
console: use pixman for font rendering
Zap homegrown font rendering code, use pixman calls instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 6 Mar 2013 14:43:23 +0000 (15:43 +0100)]
console: use pixman for fill+blit
Zap homegrown pixel shuffeling code, use pixman calls instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 7 Mar 2013 14:23:48 +0000 (15:23 +0100)]
pixman: render vgafont glyphs into pixman images
Add helper functions to create pixman mask images for glyphs
and to render these glyphs into a pixman image.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 6 Mar 2013 13:14:17 +0000 (14:14 +0100)]
pixman: add qemu_pixman_color()
Helper function to map qemu colors (32bit integer + matching PixelFormat)
into pixman_color_t.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 25 Mar 2013 10:44:21 +0000 (11:44 +0100)]
hw/vmware_vga.c: various vmware vga fixes.
Hardcode depth to 32 bpp. It effectively was that way before because
that is the default surface depth, this just makes it explicit in the
code.
Rename depth to new_depth to make it consistent with the new_width +
new_height names. In theory we can make new_depth changeable (i.e.
allow the guest to fill in -- say -- 16 there). In practice the guests
don't try, the X-Server refuses to start if you ask it to use 16bpp
depth (via DefaultDepth in the Screen section).
Always return the correct rmask+gmask+bmask values for the given
new_depth.
Fix mode setting to also verify at new_depth to make sure we have a
correct DisplaySurface, even if the current video mode happes to be
16bpp (set by vgabios via bochs vbe interface). While being at it
switch over to use qemu_create_displaysurface_from, so the surface is
backed by guest-visible video memory and we save a memcpy.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 25 Mar 2013 08:53:35 +0000 (09:53 +0100)]
hw/vmware_vga.c: add tracepoints for mmio reads+writes
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Igor Mitsyanko [Tue, 19 Mar 2013 19:44:56 +0000 (23:44 +0400)]
hw/vmware_vga.c: fix screen resize bug introduced after console revamp
In vmsvga display update function, a pointer to DisplaySurface must be acquired
after a call to vmsvga_check_size since this function might replace current
DisplaySurface with a new one.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Igor Mitsyanko [Tue, 19 Mar 2013 19:44:55 +0000 (23:44 +0400)]
exynos4210_fimd.c: fix display resize bug introduced after console revamp
In exynos4210 display update function, we were acquiring DisplaySurface
pointer before calling screen resize function, not paying attention that resize
procedure can replace current DisplaySurface with newly allocated one.
Right thing to do is to initialize DisplaySurface AFTER a call to resize function.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
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>
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>
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>
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
...
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Josh Durgin [Fri, 29 Mar 2013 20:03:23 +0000 (13:03 -0700)]
rbd: add an asynchronous flush
The existing bdrv_co_flush_to_disk implementation uses rbd_flush(),
which is sychronous and causes the main qemu thread to block until it
is complete. This results in unresponsiveness and extra latency for
the guest.
Fix this by using an asynchronous version of flush. This was added to
librbd with a special #define to indicate its presence, since it will
be backported to stable versions. Thus, there is no need to check the
version of librbd.
Implement this as bdrv_aio_flush, since it matches other aio functions
in the rbd block driver, and leave out bdrv_co_flush_to_disk when the
asynchronous version is available.
Reported-by: Oliver Francke <oliver@filoo.de>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Richard W.M. Jones [Tue, 9 Apr 2013 14:30:55 +0000 (15:30 +0100)]
iotests: Add 'check -ssh' option to test Secure Shell block device.
Note in order to run these tests on ssh, you must be running a local
ssh daemon, and that daemon must accept loopback connections, and
ssh-agent has to be set up to allow logins on the local daemon. In
other words, the following command should just work without demanding
any passphrase:
ssh localhost
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Richard W.M. Jones [Tue, 9 Apr 2013 14:30:54 +0000 (15:30 +0100)]
block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
libssh2_sftp_fsync is an extension to libssh2 to support fsync(2) over
sftp, which is itself an extension of OpenSSH.
If both libssh2 and the ssh daemon support it, this will allow
bdrv_flush_to_disk to commit changes through to disk on the remote
server.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Richard W.M. Jones [Tue, 9 Apr 2013 14:30:53 +0000 (15:30 +0100)]
block: Add support for Secure Shell (ssh) block device.
qemu-system-x86_64 -drive file=ssh://hostname/some/image
QEMU will ssh into 'hostname' and open '/some/image' which is made
available as a standard block device.
You can specify a username (ssh://user@host/...) and/or a port number
(ssh://host:port/...). You can also use an alternate syntax using
properties (file.user, file.host, file.port, file.path).
Current limitations:
- Authentication must be done without passwords or passphrases, using
ssh-agent. Other authentication methods are not supported.
- Uses a single connection, instead of concurrent AIO with multiple
SSH connections.
This is implemented using libssh2 on the client side. The server just
requires a regular ssh daemon with sftp-server support. Most ssh
daemons on Unix/Linux systems will work out of the box.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Fri, 5 Apr 2013 09:51:01 +0000 (11:51 +0200)]
ide: refuse WIN_READ_NATIVE_MAX on empty device
What is the highest addressable sector on an empty CD-ROM? Nothing is
addressable so produce an error.
This patch prevents a divide-by-zero in ide_set_sector() since
s->sectors and s->heads would be 0. Not to mention that a sector=-1
argument would be nonsense.
Note that WIN_READ_NATIVE_MAX can be triggered using hdparm -N 1024
/dev/cdrom. The LBA bit will be set to 1 though, so the only easy way
to go down the ide_set_sector() CHS code path which divides by zero is
to comment out the s->select & 0x40 case for testing.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Stefan Hajnoczi [Mon, 15 Apr 2013 08:15:17 +0000 (10:15 +0200)]
qemu-iotests: filter QEMU_PROG in 051.out
Filter the name of the QEMU executable so the output can be diffed no
matter what QEMU_PROG is (e.g. qemu-system-x86_64).
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf [Tue, 9 Apr 2013 13:56:13 +0000 (15:56 +0200)]
qemu-iotests: Add test for -drive options
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf [Fri, 5 Apr 2013 19:27:56 +0000 (21:27 +0200)]
qemu-iotests: A few more bdrv_pread/pwrite tests
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf [Fri, 5 Apr 2013 19:27:55 +0000 (21:27 +0200)]
block: Introduce bdrv_pwritev() for qcow2_save_vmstate
Directly pass the QEMUIOVector on instead of linearising it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf [Fri, 5 Apr 2013 19:27:54 +0000 (21:27 +0200)]
savevm: Implement block_writev_buffer()
Instead of breaking up RAM state into many small chunks, pass the iovec
to the block layer for better performance.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf [Fri, 5 Apr 2013 19:27:53 +0000 (21:27 +0200)]
block: Introduce bdrv_writev_vmstate
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>