]> git.proxmox.com Git - qemu.git/log
qemu.git
11 years agovnc-tls: Fix compilation with newer versions of GNU-TLS backup3
Andre Przywara [Thu, 18 Oct 2012 09:16:58 +0000 (11:16 +0200)]
vnc-tls: Fix compilation with newer versions of GNU-TLS

In my installation of GNU-TLS (v3.0.23) the type
gnutls_anon_server_credentials is marked deprecated, so -Werror
breaks compilation.
Simply replacing it with the newer ..._t version fixed the compilation
on my machine (Slackware 14.0). I cannot tell how far back this "new"
type goes, at least the header file in RHEL 5.0 (v1.4.1) seems to have
it already. If someone finds a broken distribution, tell me and I
insert some compat code.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Message-id: 1350551818-14717-1-git-send-email-andre.przywara@amd.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agodoc help: Collect block device stuff under its own heading
Markus Armbruster [Wed, 13 Feb 2013 18:49:43 +0000 (19:49 +0100)]
doc help: Collect block device stuff under its own heading

Collect them from "Standard options", "File system options", "Virtual
File system pass-through options", "Debug/Expert options".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-8-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agodoc help: A few options are under inappropriate headings, fix
Markus Armbruster [Wed, 13 Feb 2013 18:49:42 +0000 (19:49 +0100)]
doc help: A few options are under inappropriate headings, fix

--device is under heading "USB options".  --name and --uuid are under
"Virtual File system pass-through options".  Move all three to
"Standard options".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-7-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agohelp: Fix markup of heading "USB options" so it appears in -help
Markus Armbruster [Wed, 13 Feb 2013 18:49:41 +0000 (19:49 +0100)]
help: Fix markup of heading "USB options" so it appears in -help

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-6-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agodoc: Fix texinfo @table markup in qemu-options.hx
Markus Armbruster [Wed, 13 Feb 2013 18:49:40 +0000 (19:49 +0100)]
doc: Fix texinfo @table markup in qemu-options.hx

End tables before headings, start new ones afterwards.  Fixes
incorrect indentation of headings "File system options" and "Virtual
File system pass-through options" in manual page and qemu-doc.

Normalize markup some to increase chances it survives future edits.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-5-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agodoc: Fill some option doc gaps in manual page and qemu-doc
Markus Armbruster [Wed, 13 Feb 2013 18:49:39 +0000 (19:49 +0100)]
doc: Fill some option doc gaps in manual page and qemu-doc

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-4-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agodoc: Fix some option entries in qemu-doc's function index
Markus Armbruster [Wed, 13 Feb 2013 18:49:38 +0000 (19:49 +0100)]
doc: Fix some option entries in qemu-doc's function index

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-3-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agohelp: Drop bogus help on -qtest and -qtest-log
Markus Armbruster [Wed, 13 Feb 2013 18:49:37 +0000 (19:49 +0100)]
help: Drop bogus help on -qtest and -qtest-log

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360781383-28635-2-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoisa: Split off instance_init for ISADevice
Andreas Färber [Sat, 16 Feb 2013 10:27:26 +0000 (11:27 +0100)]
isa: Split off instance_init for ISADevice

Prepares for assigning IRQs before QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1361010446-1427-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqtest: Add MMIO support
Andreas Färber [Sat, 16 Feb 2013 21:44:03 +0000 (22:44 +0100)]
qtest: Add MMIO support

Introduce [qtest_]{read,write}[bwlq]() libqtest functions and
corresponding QTest protocol commands to replace local versions in
libi2c-omap.c.

Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1361051043-27944-4-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agolibqtest: Introduce qtest_qmpv() and convert remaining macro
Andreas Färber [Sat, 16 Feb 2013 21:44:02 +0000 (22:44 +0100)]
libqtest: Introduce qtest_qmpv() and convert remaining macro

In order to convert qmp() macro to an inline function, expose a
qtest_qmpv() function, reused by qtest_qmp().

We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length format
strings, which would result in warnings treated as errors.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1361051043-27944-3-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agolibqtest: Convert macros to functions and clean up documentation
Andreas Färber [Sat, 16 Feb 2013 21:44:01 +0000 (22:44 +0100)]
libqtest: Convert macros to functions and clean up documentation

libqtest.h provides a number of shortcut macros to avoid tests feeding
it the QTestState they operate on. Most of these can easily be turned
into static inline functions, so let's do that for clarity.
This avoids getting off-by-one error messages when passing wrong args.

Some macros had a val argument but documented @value argument. Fix this.

While touching things, enforce gtk-doc markup for return values and for
referencing types.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1361051043-27944-2-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'afaerber/qom-cpu' into staging
Anthony Liguori [Mon, 18 Feb 2013 14:37:29 +0000 (08:37 -0600)]
Merge remote-tracking branch 'afaerber/qom-cpu' into staging

# By Andreas Färber
# Via Andreas Färber
* afaerber/qom-cpu: (47 commits)
  target-i386: Split command line parsing out of cpu_x86_register()
  target-i386: Move cpu_x86_init()
  target-lm32: Drop unused cpu_lm32_close() prototype
  target-s390x: Drop unused cpu_s390x_close() prototype
  spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()
  ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()
  e500: Replace open-coded loop with qemu_get_cpu()
  cpu: Add CPUArchState pointer to CPUState
  cputlb: Pass CPUState to cpu_unlink_tb()
  cpu: Move current_tb field to CPUState
  cpu: Move exit_request field to CPUState
  cpu: Move running field to CPUState
  cpu: Move host_tid field to CPUState
  target-cris: Introduce CRISCPU subclasses
  target-m68k: Pass M68kCPU to m68k_set_irq_level()
  mcf_intc: Pass M68kCPU to mcf_intc_init()
  mcf5206: Pass M68kCPU to mcf5206_init()
  target-m68k: Return M68kCPU from cpu_m68k_init()
  ppc405_uc: Pass PowerPCCPU to ppc40x_{core,chip,system}_reset()
  target-xtensa: Move TCG initialization to XtensaCPU initfn
  ...

11 years agotests: Add unit tests for mulu64 and muls64
Richard Henderson [Sat, 16 Feb 2013 20:47:01 +0000 (12:47 -0800)]
tests: Add unit tests for mulu64 and muls64

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohost-utils: Improve mulu64 and muls64
Richard Henderson [Sat, 16 Feb 2013 20:47:00 +0000 (12:47 -0800)]
host-utils: Improve mulu64 and muls64

The new formulation makes better use of add-with-carry type insns
that the host may have.  Use gcc's sign adjustment trick to avoid
having to perform a 128-bit negation.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohost-utils: Use __int128_t for mul[us]64
Richard Henderson [Sat, 16 Feb 2013 20:46:59 +0000 (12:46 -0800)]
host-utils: Use __int128_t for mul[us]64

Replace some x86_64 specific inline assembly with something that
all 64-bit hosts ought to optimize well.  At worst this becomes
a call to the gcc __multi3 routine, which is no worse than our
implementation in util/host-utils.c.

With gcc 4.7, we get identical code generation for x86_64.  We
now get native multiplication on ia64 and s390x hosts.  With minor
improvements to gcc we can get it for ppc64 as well.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg/ppc: Fix build of tcg_qemu_tb_exec()
Andreas Färber [Sat, 16 Feb 2013 22:21:24 +0000 (23:21 +0100)]
tcg/ppc: Fix build of tcg_qemu_tb_exec()

Commit 0b0d3320db74cde233ee7855ad32a9c121d20eb4 (TCG: Final globals
clean-up) moved code_gen_prologue but forgot to update ppc code.
This broke the build on 32-bit ppc. ppc64 is unaffected.

Cc: Evgeny Voevodin <evgenyvoevodin@gmail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Fix debug output for DEBUG_MMU
Andreas Färber [Sun, 27 Jan 2013 13:32:05 +0000 (14:32 +0100)]
target-sparc: Fix debug output for DEBUG_MMU

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-i386: Split command line parsing out of cpu_x86_register()
Andreas Färber [Fri, 15 Feb 2013 13:06:56 +0000 (14:06 +0100)]
target-i386: Split command line parsing out of cpu_x86_register()

In order to instantiate a CPU subtype we will need to know which type,
so move the cpu_model splitting into cpu_x86_init().

Parameters need to be set on the X86CPU instance, so move
cpu_x86_parse_featurestr() into cpu_x86_init() as well.

This leaves cpu_x86_register() operating on the model name only.

Signed-off-by: Andreas Färber <afaerber@suse.de>
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: Move cpu_x86_init()
Andreas Färber [Fri, 1 Feb 2013 14:12:13 +0000 (15:12 +0100)]
target-i386: Move cpu_x86_init()

Consolidate CPU functions in cpu.c.
Allows to make cpu_x86_register() static.

No functional changes.

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-lm32: Drop unused cpu_lm32_close() prototype
Andreas Färber [Sat, 2 Feb 2013 11:13:15 +0000 (12:13 +0100)]
target-lm32: Drop unused cpu_lm32_close() prototype

It was never implemented.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-s390x: Drop unused cpu_s390x_close() prototype
Andreas Färber [Sat, 2 Feb 2013 11:10:37 +0000 (12:10 +0100)]
target-s390x: Drop unused cpu_s390x_close() prototype

It was never implemented.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agospapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()
Andreas Färber [Fri, 15 Feb 2013 15:43:08 +0000 (16:43 +0100)]
spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()

The helper functions all access ppc-specific fields only so don't bother
to change arguments to PowerPCCPU and use env_ptr instead.

No functional change.

Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()
Andreas Färber [Fri, 15 Feb 2013 14:56:27 +0000 (15:56 +0100)]
ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()

Potentially env could be NULL whereas cpu would still be valid and
correspond to a previous env.

Wrapping this in qemu_get_cpu(), env is no longer needed, so simplify
code that existed before 55e5c2850293547203874098f7cec148ffd12dfa.

Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoe500: Replace open-coded loop with qemu_get_cpu()
Andreas Färber [Fri, 15 Feb 2013 14:21:13 +0000 (15:21 +0100)]
e500: Replace open-coded loop with qemu_get_cpu()

Since we still need env for ppc-specific fields, obtain it via the new
env_ptr fields to avoid "cpu" name conflicts between CPUState and
PowerPCCPU for now.

This fixes a potential issue with env being NULL at the end of the loop
but cpu still being a valid pointer corresponding to a previous env.

Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Add CPUArchState pointer to CPUState
Andreas Färber [Thu, 17 Jan 2013 11:13:41 +0000 (12:13 +0100)]
cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions.

The field may not be called "env" due to it being poisoned.

Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocputlb: Pass CPUState to cpu_unlink_tb()
Andreas Färber [Thu, 17 Jan 2013 08:16:15 +0000 (09:16 +0100)]
cputlb: Pass CPUState to cpu_unlink_tb()

CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Move current_tb field to CPUState
Andreas Färber [Wed, 16 Jan 2013 18:29:31 +0000 (19:29 +0100)]
cpu: Move current_tb field to CPUState

Explictly NULL it on CPU reset since it was located before breakpoints.

Change vapic_report_tpr_access() argument to CPUState. This also
resolves the use of void* for cpu.h independence.
Change vAPIC patch_instruction() argument to X86CPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Move exit_request field to CPUState
Andreas Färber [Mon, 17 Dec 2012 07:02:44 +0000 (08:02 +0100)]
cpu: Move exit_request field to CPUState

Since it was located before breakpoints field, it needs to be reset.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Move running field to CPUState
Andreas Färber [Mon, 17 Dec 2012 06:34:52 +0000 (07:34 +0100)]
cpu: Move running field to CPUState

Pass CPUState to cpu_exec_{start,end}() functions.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Move host_tid field to CPUState
Andreas Färber [Mon, 17 Dec 2012 06:12:13 +0000 (07:12 +0100)]
cpu: Move host_tid field to CPUState

Change gdbstub's cpu_index() argument to CPUState now that CPUArchState
is no longer used.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-cris: Introduce CRISCPU subclasses
Andreas Färber [Wed, 6 Feb 2013 16:18:12 +0000 (17:18 +0100)]
target-cris: Introduce CRISCPU subclasses

Use class_init functions to initialize the VR in preparation for
overriding v32+ behavior there.

Move cpu_cris_init() to cpu.c and hook up a class_by_name callback.

This change leads to unknown -cpu model names no longer falling back
to a CPU with VR 32 but instead returning NULL.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-m68k: Pass M68kCPU to m68k_set_irq_level()
Andreas Färber [Fri, 18 Jan 2013 13:20:52 +0000 (14:20 +0100)]
target-m68k: Pass M68kCPU to m68k_set_irq_level()

Simplifies use of cpu_reset_interrupt() et al.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agomcf_intc: Pass M68kCPU to mcf_intc_init()
Andreas Färber [Fri, 18 Jan 2013 13:15:09 +0000 (14:15 +0100)]
mcf_intc: Pass M68kCPU to mcf_intc_init()

Store it in mcf_intc_state.
Prepares for passing it to m68k_set_irq_level().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agomcf5206: Pass M68kCPU to mcf5206_init()
Andreas Färber [Fri, 18 Jan 2013 13:10:34 +0000 (14:10 +0100)]
mcf5206: Pass M68kCPU to mcf5206_init()

Store it in m5206_mbar_state. Prepares for passing M68kCPU to
m68k_set_irq_level().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-m68k: Return M68kCPU from cpu_m68k_init()
Andreas Färber [Fri, 18 Jan 2013 13:03:58 +0000 (14:03 +0100)]
target-m68k: Return M68kCPU from cpu_m68k_init()

Turn cpu_init() into a static inline function for backwards
compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoppc405_uc: Pass PowerPCCPU to ppc40x_{core,chip,system}_reset()
Andreas Färber [Fri, 18 Jan 2013 14:57:51 +0000 (15:57 +0100)]
ppc405_uc: Pass PowerPCCPU to ppc40x_{core,chip,system}_reset()

Prepares for changing cpu_interrupt() argument to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
11 years agotarget-xtensa: Move TCG initialization to XtensaCPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:46:45 +0000 (01:46 +0100)]
target-xtensa: Move TCG initialization to XtensaCPU initfn

Combine this with breakpoint handler registration, guarding both with
tcg_enabled() to suppress also TCG init for qtest. Rename the handler to
xtensa_breakpoint_handler() since it needs to become global.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-unicore32: Move TCG initialization to UniCore32CPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:36:47 +0000 (01:36 +0100)]
target-unicore32: Move TCG initialization to UniCore32CPU initfn

Normalize the "inited" logic and add a tcg_enabled() check to suppress
it for qtest.

Ensures that a QOM-created UniCore32CPU is usable.

Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-sparc: Move TCG initialization to SPARCCPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:34:18 +0000 (01:34 +0100)]
target-sparc: Move TCG initialization to SPARCCPU initfn

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-sh4: Move TCG initialization to SuperHCPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:30:32 +0000 (01:30 +0100)]
target-sh4: Move TCG initialization to SuperHCPU initfn

Add a tcg_enabled() check to suppress it for qtest.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-s390x: Move TCG initialization to S390CPU initfn
Andreas Färber [Sat, 19 Jan 2013 21:43:32 +0000 (22:43 +0100)]
target-s390x: Move TCG initialization to S390CPU initfn

Ensures that a QOM-created S390CPU is usable.

Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-ppc: Move TCG initialization to PowerPCCPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:26:37 +0000 (01:26 +0100)]
target-ppc: Move TCG initialization to PowerPCCPU initfn

Ensures that a QOM-created PowerPCCPU is usable.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-mips: Move TCG initialization to MIPSCPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:22:25 +0000 (01:22 +0100)]
target-mips: Move TCG initialization to MIPSCPU initfn

Make mips_tcg_init() non-static and add tcg_enabled() check to suppress
it for qtest.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-microblaze: Move TCG initialization to MicroBlazeCPU initfn
Andreas Färber [Sun, 20 Jan 2013 00:10:52 +0000 (01:10 +0100)]
target-microblaze: Move TCG initialization to MicroBlazeCPU initfn

Split off TCG initialization from cpu_mb_init() into mb_tcg_init() to
call it from the initfn.

Ensures that a QOM-created MicroBlazeCPU is usable.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-m68k: Move TCG initialization to M68kCPU initfn
Andreas Färber [Sat, 19 Jan 2013 23:48:29 +0000 (00:48 +0100)]
target-m68k: Move TCG initialization to M68kCPU initfn

Add a tcg_enabled() check to suppress it for qtest.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-lm32: Move TCG initialization to LM32CPU initfn
Andreas Färber [Sat, 19 Jan 2013 23:05:12 +0000 (00:05 +0100)]
target-lm32: Move TCG initialization to LM32CPU initfn

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-cris: Move TCG initialization to CRISCPU initfn
Andreas Färber [Sat, 19 Jan 2013 22:55:42 +0000 (23:55 +0100)]
target-cris: Move TCG initialization to CRISCPU initfn

Split out TCG initialization from cpu_cris_init(). Avoid CPUCRISState
dependency for v10-specific initialization and for non-v10 by inlining
the decision into the initfn as well.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-arm: Move TCG initialization to ARMCPU initfn
Andreas Färber [Sat, 19 Jan 2013 06:37:45 +0000 (07:37 +0100)]
target-arm: Move TCG initialization to ARMCPU initfn

Ensures that a QOM-created ARMCPU is usable.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-xtensa: Introduce QOM realizefn for XtensaCPU
Andreas Färber [Wed, 16 Jan 2013 03:19:35 +0000 (04:19 +0100)]
target-xtensa: Introduce QOM realizefn for XtensaCPU

Introduce realizefn and set realized = true in cpu_xtensa_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-unicore32: Introduce QOM realizefn for UniCore32CPU
Andreas Färber [Sat, 5 Jan 2013 13:38:30 +0000 (14:38 +0100)]
target-unicore32: Introduce QOM realizefn for UniCore32CPU

Introduce a realizefn and set realized = true in uc32_cpu_init().

Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
[AF: Invoke the parent's realizefn]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-sparc: Introduce QOM realizefn for SPARCCPU
Andreas Färber [Wed, 16 Jan 2013 03:13:19 +0000 (04:13 +0100)]
target-sparc: Introduce QOM realizefn for SPARCCPU

Introduce realizefn and set realized = true in cpu_sparc_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-sh4: Introduce QOM realizefn for SuperHCPU
Andreas Färber [Mon, 23 Apr 2012 16:16:02 +0000 (18:16 +0200)]
target-sh4: Introduce QOM realizefn for SuperHCPU

Introduce a realizefn and set realized = true in cpu_sh4_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-s390x: Introduce QOM realizefn for S390CPU
Andreas Färber [Wed, 16 Jan 2013 03:00:41 +0000 (04:00 +0100)]
target-s390x: Introduce QOM realizefn for S390CPU

Introduce realizefn and set realized = true in cpu_s390x_init().

Defer CPU reset from initfn to realizefn.

Acked-by: Richard Henderson <rth@twiddle.net>
[AF: Invoke parent's realizefn]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-mips: Introduce QOM realizefn for MIPSCPU
Andreas Färber [Wed, 16 Jan 2013 02:48:37 +0000 (03:48 +0100)]
target-mips: Introduce QOM realizefn for MIPSCPU

Introduce a realizefn and set realized = true from cpu_mips_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-microblaze: Introduce QOM realizefn for MicroBlazeCPU
Andreas Färber [Sat, 5 Jan 2013 14:27:31 +0000 (15:27 +0100)]
target-microblaze: Introduce QOM realizefn for MicroBlazeCPU

Introduce realizefn and set realized = true from cpu_mb_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-m68k: Introduce QOM realizefn for M68kCPU
Andreas Färber [Sat, 5 Jan 2013 14:15:30 +0000 (15:15 +0100)]
target-m68k: Introduce QOM realizefn for M68kCPU

Introduce realizefn and set realized = true in cpu_m68k_init().

Split off GDB registration to a new m68k_cpu_init_gdb() so that it can
be called from the realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-lm32: Introduce QOM realizefn for LM32CPU
Andreas Färber [Wed, 16 Jan 2013 02:31:27 +0000 (03:31 +0100)]
target-lm32: Introduce QOM realizefn for LM32CPU

Introduce a realizefn and set realized = true in cpu_lm32_init().

Also move cpu_reset() call from initfn to realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-cris: Introduce QOM realizefn for CRISCPU
Andreas Färber [Sat, 5 Jan 2013 14:41:21 +0000 (15:41 +0100)]
target-cris: Introduce QOM realizefn for CRISCPU

Introduce realizefn and set realized = true from cpu_cris_init().

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-ppc: Update PowerPCCPU to QOM realizefn
Andreas Färber [Wed, 16 Jan 2013 02:55:14 +0000 (03:55 +0100)]
target-ppc: Update PowerPCCPU to QOM realizefn

Adapt ppc_cpu_realize() signature, hook it up to DeviceClass and set
realized = true in cpu_ppc_init().

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-openrisc: Update OpenRISCCPU to QOM realizefn
Andreas Färber [Sat, 5 Jan 2013 13:11:07 +0000 (14:11 +0100)]
target-openrisc: Update OpenRISCCPU to QOM realizefn

Update the openrisc_cpu_realize() signature, hook it up to
DeviceClass::realize and set realized = true in cpu_openrisc_init().

qapi/error.h is now included through qdev and no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Jia Liu <proljc@gmail.com>
11 years agotarget-i386: Update X86CPU to QOM realizefn
Andreas Färber [Wed, 16 Jan 2013 02:41:47 +0000 (03:41 +0100)]
target-i386: Update X86CPU to QOM realizefn

Adapt the signature of x86_cpu_realize(), hook up to
DeviceClass::realize and set realized = true in cpu_x86_init().

The QOM realizefn cannot depend on errp being non-NULL as in
cpu_x86_init(), so use a local Error to preserve error handling behavior
on APIC initialization errors.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
[AF: Invoke parent's realizefn]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-arm: Update ARMCPU to QOM realizefn
Andreas Färber [Sat, 5 Jan 2013 09:18:18 +0000 (10:18 +0100)]
target-arm: Update ARMCPU to QOM realizefn

Turn arm_cpu_realize() into a QOM realize function, no longer called
via cpu.h prototype. To maintain the semantics of cpu_init(), set
realized = true explicitly in cpu_arm_init().

Move GDB coprocessor registration, CPU reset and vCPU initialization
into the realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-alpha: Update AlphaCPU to QOM realizefn
Andreas Färber [Sat, 5 Jan 2013 13:01:30 +0000 (14:01 +0100)]
target-alpha: Update AlphaCPU to QOM realizefn

Update the alpha_cpu_realize() signature and hook up to
DeviceClass::realize. Set realized = true in cpu_alpha_init().

qapi/error.h is included through qdev now and no longer needed.

Acked-by: Richard Henderson <rth@twiddle.net>
[AF: Invoke parent's realizefn]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agocpu: Prepare QOM realizefn
Andreas Färber [Sat, 19 Jan 2013 05:17:06 +0000 (06:17 +0100)]
cpu: Prepare QOM realizefn

Overwrite the default implementation with a no-op, no longer
attempting to call DeviceClass::init.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agobitops: Remove routines redundant with host-utils
Richard Henderson [Thu, 14 Feb 2013 01:47:43 +0000 (17:47 -0800)]
bitops: Remove routines redundant with host-utils

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobitops: Replace bitops_ctol with ctzl
Richard Henderson [Thu, 14 Feb 2013 01:47:42 +0000 (17:47 -0800)]
bitops: Replace bitops_ctol with ctzl

The is the only remaining user.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobitops: Inline bitops_flsl
Richard Henderson [Thu, 14 Feb 2013 01:47:41 +0000 (17:47 -0800)]
bitops: Inline bitops_flsl

This is the only remaining user.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-i386: Inline bitops_flsl
Richard Henderson [Thu, 14 Feb 2013 01:47:40 +0000 (17:47 -0800)]
target-i386: Inline bitops_flsl

Use clz32 directly.  Which makes slightly more sense given
that the input is type "int" and not type "long".

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobitops: Write bitops_flsl in terms of clzl
Richard Henderson [Thu, 14 Feb 2013 01:47:39 +0000 (17:47 -0800)]
bitops: Write bitops_flsl in terms of clzl

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agomemory: Use non-bitops ctzl
Richard Henderson [Thu, 14 Feb 2013 01:47:38 +0000 (17:47 -0800)]
memory: Use non-bitops ctzl

A memory size of zero is invalid, and so that edge condition
does not occur.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobitops: Use non-bitops ctzl
Richard Henderson [Thu, 14 Feb 2013 01:47:37 +0000 (17:47 -0800)]
bitops: Use non-bitops ctzl

The use of ctz has already eliminated zero, and thus the difference
in edge conditions between the two routines is irrelevant.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohbitmap: Use non-bitops ctzl
Richard Henderson [Thu, 14 Feb 2013 01:47:36 +0000 (17:47 -0800)]
hbitmap: Use non-bitops ctzl

Both uses of ctz have already eliminated zero, and thus the difference
in edge conditions between the two routines is irrelevant.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohost-utils: Fix coding style and add comments
Richard Henderson [Thu, 14 Feb 2013 01:47:35 +0000 (17:47 -0800)]
host-utils: Fix coding style and add comments

Add function comments to the routines, documenting the corner
cases upon which we are standardizing.  Fix the few instances
of non-standard coding style.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohost-utils: Add host long specific aliases for clz, ctz, ctpop
Richard Henderson [Thu, 14 Feb 2013 01:47:34 +0000 (17:47 -0800)]
host-utils: Add host long specific aliases for clz, ctz, ctpop

We will standardize on these names, rather than the similar routines
currently residing in qemu/bitops.h.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Rename CPULogItem, cpu_log_items to QEMULogItem, qemu_log_items
Peter Maydell [Mon, 11 Feb 2013 16:41:25 +0000 (16:41 +0000)]
qemu-log: Rename CPULogItem, cpu_log_items to QEMULogItem, qemu_log_items

Rename the typedef CPULogItem and the public array cpu_log_items
to names that better reflect the fact that the qemu_log functionality
isn't restricted to TCG CPU debug logs any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agocpus.c: Drop unnecessary set_cpu_log()
Peter Maydell [Mon, 11 Feb 2013 16:41:24 +0000 (16:41 +0000)]
cpus.c: Drop unnecessary set_cpu_log()

The set_cpu_log() function in cpus.c is a fairly simple wrapper
which is only called from one location. Just inline the code
into vl.c, since there is no need to indirect it via cpus.c
and the handling of the error case is more appropriate to vl.c.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Rename the public-facing cpu_set_log function to qemu_set_log
Peter Maydell [Mon, 11 Feb 2013 16:41:23 +0000 (16:41 +0000)]
qemu-log: Rename the public-facing cpu_set_log function to qemu_set_log

Rename the public-facing function cpu_set_log to qemu_set_log. This
requires us to rename the internal-only qemu_set_log() to
do_qemu_set_log().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_mask
Peter Maydell [Mon, 11 Feb 2013 16:41:22 +0000 (16:41 +0000)]
qemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_mask

Rename cpu_str_to_log_mask() to qemu_str_to_log_mask(), since
the qemu_log functionality is no longer restricted to TCG CPU
debug logging.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Abstract out "print usage message about valid log categories"
Peter Maydell [Mon, 11 Feb 2013 16:41:21 +0000 (16:41 +0000)]
qemu-log: Abstract out "print usage message about valid log categories"

Abstract out the "print a human readable list of all the
valid log categories" functionality which is currently duplicated
in three separate places. (We leave the monitor.c help_cmd()
implementation as-is since it wants to send the message to
the monitor and add its own information.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename
Peter Maydell [Mon, 11 Feb 2013 16:41:20 +0000 (16:41 +0000)]
qemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename

The qemu_log() functionality is no longer specific to TCG CPU debug logs.
Rename cpu_set_log_filename() to qemu_set_log_filename() and drop the
pointless wrapper set_cpu_log_filename().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTCG: Move translation block variables to new context inside tcg_ctx: tb_ctx
Evgeny Voevodin [Thu, 31 Jan 2013 18:47:23 +0000 (01:47 +0700)]
TCG: Move translation block variables to new context inside tcg_ctx: tb_ctx

It's worth to clean-up translation blocks variables and move them
into one context as was suggested by Swirl.
Also if we use this context directly inside tcg_ctx, then it
speeds up code generation a bit.

Signed-off-by: Evgeny Voevodin <evgenyvoevodin@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTCG: Final globals clean-up
Evgeny Voevodin [Thu, 31 Jan 2013 18:47:22 +0000 (01:47 +0700)]
TCG: Final globals clean-up

Signed-off-by: Evgeny Voevodin <evgenyvoevodin@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoOpen up 1.5 development tree
Anthony Liguori [Fri, 15 Feb 2013 23:40:56 +0000 (17:40 -0600)]
Open up 1.5 development tree

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoUpdate VERSION for release v1.4.0
Anthony Liguori [Fri, 15 Feb 2013 22:15:40 +0000 (16:15 -0600)]
Update VERSION for release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoUpdate VERSION of release v1.4.0-rc2
Anthony Liguori [Thu, 14 Feb 2013 14:58:49 +0000 (08:58 -0600)]
Update VERSION of release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoRevert "Update OpenBIOS images"
Alexander Graf [Wed, 13 Feb 2013 22:58:12 +0000 (23:58 +0100)]
Revert "Update OpenBIOS images"

This reverts commit 10442558ab1797bfbb01285b909e34c5cf038f12.

With the updated OpenBIOS image, -M g3beige fails to boot quik.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 1360796292-27078-1-git-send-email-agraf@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agocadance_uart: Accept input after rx FIFO pop
Peter Crosthwaite [Tue, 12 Feb 2013 01:29:31 +0000 (11:29 +1000)]
cadance_uart: Accept input after rx FIFO pop

The device returns false from the can receive function when the FIFO is
full. This means the device should check for buffered input whenever a byte is
popped from the FIFO.

Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1360632571-25638-1-git-send-email-peter.crosthwaite@xilinx.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoblock/curl: only restrict protocols with libcurl>=7.19.4
Stefan Hajnoczi [Wed, 13 Feb 2013 08:25:34 +0000 (09:25 +0100)]
block/curl: only restrict protocols with libcurl>=7.19.4

The curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, ...) interface was
introduced in libcurl 7.19.4.  Therefore we cannot protect against
CVE-2013-0249 when linking against an older libcurl.

This fixes the build failure introduced by
fb6d1bbd246c7a57ef53d3847ef225cd1349d602.

Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Andreas Färber <andreas.faeber@web.de>
Message-id: 1360743934-8337-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqapi: Flatten away ChardevPort
Markus Armbruster [Wed, 13 Feb 2013 14:54:16 +0000 (15:54 +0100)]
qapi: Flatten away ChardevPort

Simplifies the schema and the code.

QMP command

    { "execute" : "chardev-add",
      "arguments" : { "id" : "ser0",
                      "backend" : { "type" : "port",
                                    "data" : { "type": "serial",
                                               "device":"/dev/ttyS0"} } } }

becomes

    { "execute" : "chardev-add",
      "arguments" : { "id" : "ser0",
                      "backend" : { "type" : "serial",
                                    "data" : { "device":"/dev/ttyS0"} } } }

Bonus: nicer error messages.  "unknown chardev port (1)" becomes
"character device backend type 'parallel' not supported".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1360767256-610-3-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agochardev: Fix manual page and qemu-doc for -chardev tty
Markus Armbruster [Wed, 13 Feb 2013 14:54:15 +0000 (15:54 +0100)]
chardev: Fix manual page and qemu-doc for -chardev tty

Broken in commit d59044ef.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1360767256-610-2-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agonet: Avoid NULL function pointer dereference on cleanup
Andreas Färber [Tue, 12 Feb 2013 22:16:06 +0000 (23:16 +0100)]
net: Avoid NULL function pointer dereference on cleanup

The pSeries machine and some other devices don't supply a cleanup
callback. Revert part of 1ceef9f27359cbe92ef124bf74de6f792e71f6fb that
started calling it unconditionally.

Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1360707366-9271-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agos390: Fix handling of iscs.
Cornelia Huck [Thu, 7 Feb 2013 02:20:51 +0000 (02:20 +0000)]
s390: Fix handling of iscs.

There are two ways to express an interruption subclass:
- As a bitmask, as used in cr6.
- As a number, as used in the I/O interruption word.

Unfortunately, we have treated to I/O interruption word as if it
contained the bitmask as well, which went unnoticed so far as
- (queued-for-next) kvm made the same mistake, and
- Linux guest kernels don't check the isc value in the I/O interruption
  word for subchannel interrupts.

Make sure that we treat the I/O interruption word correctly.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agos390: Keep I/O interrupts enabled for all iscs.
Cornelia Huck [Thu, 7 Feb 2013 02:20:50 +0000 (02:20 +0000)]
s390: Keep I/O interrupts enabled for all iscs.

do_io_interrupt() would stop scanning further iscs if it found
an I/O interrupt it could inject. This might cause the pending
interrupt indication for I/O interrupts to be reset although there
might be queued I/O interrupts for subsequent iscs.

Fix this by reordering the logic: Inject the I/O interrupt immediately
and continue searching all iscs for queued interrupts.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agos390/sclpconsole: prevent char layer callback during initialization
Christian Borntraeger [Mon, 4 Feb 2013 22:53:24 +0000 (22:53 +0000)]
s390/sclpconsole: prevent char layer callback during initialization

Starting a qemu with an sclp console and pressing a key very early
can result in
"qemu-system-s390x: hw/s390x/sclpconsole.c:60: receive_from_chr_layer:
Assertion `scon->iov' failed."

Lets make sure that the init process is finished, since the iov is
allocated after CHR_EVENT_OPENED by also checking for scon->iov.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agoxilinx.h: s/xilinx_axiethernetdma()/xilinx_axidma()
Peter Crosthwaite [Tue, 12 Feb 2013 01:17:11 +0000 (11:17 +1000)]
xilinx.h: s/xilinx_axiethernetdma()/xilinx_axidma()

This function has nothing to do with ethernet. Its reusable for all DMA clients.
Dropped the "ethernet" in the name accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx.h: Dont qdev_create from ethernet_create()
Peter Crosthwaite [Tue, 12 Feb 2013 01:17:10 +0000 (11:17 +1000)]
xilinx.h: Dont qdev_create from ethernet_create()

Pulled the qdev_create functionality out of xilinx_axiethernet_create() and
pushed it up to the petalogix_ml605_mmu machine model. This makes the ethernet
create+init process consistent with the AXI DMA. Renamed function to
xilinx_axiethernet_init accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoMerge remote-tracking branch 'stefanha/block' into staging
Anthony Liguori [Tue, 12 Feb 2013 22:26:52 +0000 (16:26 -0600)]
Merge remote-tracking branch 'stefanha/block' into staging

* stefanha/block:
  Revert "block/vpc: Fix size calculation"
  block/raw-posix: detect readonly Linux block devices using BLKROGET

11 years agoblock-migration: fix pending() and iterate() return values
Stefan Hajnoczi [Tue, 12 Feb 2013 09:37:15 +0000 (10:37 +0100)]
block-migration: fix pending() and iterate() return values

The return value of .save_live_pending() is the number of bytes
remaining.  This is just an estimate because we do not know how many
blocks will be dirtied by the running guest.

Currently our return value for .save_live_pending() is wrong because it
includes dirty blocks but not in-flight bdrv_aio_readv() requests or
unsent blocks.  Crucially, it also doesn't include the bulk phase where
the entire device is transferred - therefore we risk completing block
migration before all blocks have been transferred!

The return value of .save_live_iterate() is the number of bytes
transferred this iteration.  Currently we return whether there are bytes
remaining, which is incorrect.

Move the bytes remaining calculation into .save_live_pending() and
really return the number of bytes transferred this iteration in
.save_live_iterate().

Also fix the %ld format specifier which was used for a uint64_t
argument.  PRIu64 must be use to avoid warnings on 32-bit hosts.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-id: 1360661835-28663-3-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agomigration: make qemu_ftell() public and support writable files
Stefan Hajnoczi [Tue, 12 Feb 2013 09:37:14 +0000 (10:37 +0100)]
migration: make qemu_ftell() public and support writable files

Migration .save_live_iterate() functions return the number of bytes
transferred.  The easiest way of doing this is by calling qemu_ftell(f)
at the beginning and end of the function to calculate the difference.

Make qemu_ftell() public so that block-migration will be able to use it.
Also adjust the ftell calculation for writable files where buf_offset
does not include buf_size.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-id: 1360661835-28663-2-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>