Permalink
Commits on Feb 18, 2013
  1. cpu: Guard cpu_{save,load}() definitions

    A few targets already managed to implement cpu_save() and cpu_load()
    without defining CPU_SAVE_VERSION that causes them to be registered.
    
    Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again
    until all targets are converted to VMState or QIDL.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 2, 2013
  2. target-openrisc: Register VMStateDescription for OpenRISCCPU

    Since commit e67db06 (target-or32: Add
    target stubs and QOM cpu) a VMStateDescription existed, but
    CPU_SAVE_VERSION was not set, so it was never registered.
    
    Register it through CPUState.
    Use a version_id of 1 and specify minimum versions as well.
    
    Cc: Jia Liu <proljc@gmail.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 2, 2013
  3. target-alpha: Register VMStateDescription for AlphaCPU

    Commit b758aca (target-alpha: Enable
    the alpha-softmmu target.) introduced cpu_{save,load}() functions but
    didn't define CPU_SAVE_VERSION, so they were never registered.
    
    Drop cpu_{save,load}() and register the VMStateDescription via CPUClass.
    This operates on the AlphaCPU object instead of CPUAlphaState.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Jan 20, 2013
  4. target-lm32: Update VMStateDescription to LM32CPU

    Expose vmstate_cpu as vmstate_lm32_cpu and hook it up to CPUClass::vmsd.
    Adapt VMState fields to LM32CPU. Drop cpu_{save,load}().
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 2, 2013
  5. target-i386: Update VMStateDescription to X86CPU

    Expose vmstate_cpu as vmstate_x86_cpu and hook it up to CPUClass::vmsd.
    Adapt opaques and VMState fields to X86CPU. Drop cpu_{save,load}().
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 2, 2013
  6. cpu: Register VMStateDescription through CPUState

    In comparison to DeviceClass::vmsd, CPU VMState is split in two,
    "cpu_common" and "cpu", and uses cpu_index as instance_id instead of -1.
    Therefore add a CPU-specific CPUClass::vmsd field.
    
    Unlike the legacy CPUArchState registration, rather register CPUState.
    
    Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Jan 20, 2013
  7. stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY

    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 18, 2013
  8. stubs: Add vmstate_register() stub

    So far we only had vmstate_register_with_alias_id().
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 18, 2013
  9. cpus: Replace open-coded CPU loop in qmp_memsave() with qemu_get_cpu()

    No functional change, just less usages of first_cpu and next_cpu fields.
    
    env is passed to cpu_get_phys_page_debug(), which in turn passes it to
    target-specific cpu_get_phys_page_debug(). Changing both would be a
    larger refactoring, so defer that by using env_ptr.
    
    Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 15, 2013
  10. monitor: Use qemu_get_cpu() in monitor_set_cpu()

    No functional change, just a reduction of CPU loops.
    
    The mon_cpu field is left untouched for now since changing that requires
    a number of larger prerequisites, including cpu_synchronize_state() and
    mon_get_cpu().
    
    Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 15, 2013
  11. 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>
    aprzywar committed with Anthony Liguori Oct 18, 2012
  12. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  13. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  14. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  15. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  16. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  17. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  18. 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>
    Markus Armbruster committed with Anthony Liguori Feb 13, 2013
  19. 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>
    committed with Anthony Liguori Feb 16, 2013
  20. 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>
    committed with Anthony Liguori Feb 16, 2013
  21. 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>
    committed with Anthony Liguori Feb 16, 2013
  22. 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>
    committed with Anthony Liguori Feb 16, 2013
  23. 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
      ...
    Anthony Liguori committed Feb 18, 2013
Commits on Feb 17, 2013
  1. tests: Add unit tests for mulu64 and muls64

    Signed-off-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    rth7680 committed with blueswirl Feb 16, 2013
  2. 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>
    rth7680 committed with blueswirl Feb 16, 2013
  3. 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>
    rth7680 committed with blueswirl Feb 16, 2013
  4. tcg/ppc: Fix build of tcg_qemu_tb_exec()

    Commit 0b0d332 (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>
    committed with blueswirl Feb 16, 2013
Commits on Feb 16, 2013
  1. 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>
    committed with blueswirl Jan 27, 2013
  2. 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>
    committed Feb 15, 2013
  3. 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>
    committed Feb 1, 2013
  4. target-lm32: Drop unused cpu_lm32_close() prototype

    It was never implemented.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 2, 2013
  5. target-s390x: Drop unused cpu_s390x_close() prototype

    It was never implemented.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 2, 2013
  6. 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>
    committed Feb 15, 2013
  7. 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 55e5c28.
    
    Acked-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    committed Feb 15, 2013
  8. 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>
    committed Feb 15, 2013