summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-21slirp: slirp/slirp.c coding style cleanupStefan Hajnoczi1-297/+311
The slirp glue code uses tabs in some places. Since the next patch will modify the file, convert tabs to spaces and fix checkpatch.pl issues. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361356113-11049-5-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-21main-loop: switch POSIX glib integration to GPollFDStefan Hajnoczi1-49/+22
Convert glib file descriptor polling from rfds/wfds/xfds to GPollFD. The Windows code still needs poll_fds[] and n_poll_fds but they can now become local variables. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361356113-11049-4-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-21main-loop: switch to g_poll() on POSIX hostsStefan Hajnoczi1-8/+129
Use g_poll(3) instead of select(2). Well, this is kind of a cheat. It's true that we're now using g_poll(3) on POSIX hosts but the *_fill() and *_poll() functions are still using rfds/wfds/xfds. We've set the scene to start converting *_fill() and *_poll() functions step-by-step until no more rfds/wfds/xfds users remain. Then we'll drop the temporary gpollfds_from_select() and gpollfds_to_select() functions and be left with native g_poll(2). On Windows things are a little crazy: convert from rfds/wfds/xfds to GPollFDs, back to rfds/wfds/xfds, call select(2), rfds/wfds/xfds back to GPollFDs, and finally back to rfds/wfds/xfds again. This is only temporary and keeps the Windows build working through the following patches. We'll drop this excessive conversion later and be left with a single GPollFDs -> select(2) -> GPollFDs sequence that allows Windows to use select(2) while the rest of QEMU only knows about GPollFD. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361356113-11049-3-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-21main-loop: fix select_ret uninitialized variable warningStefan Hajnoczi1-1/+2
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361356113-11049-2-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-21Merge remote-tracking branch 'kraxel/usb.78' into stagingAnthony Liguori44-291/+742
# By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/usb.78: uas-uas: usb3 streams usb-xhci: usb3 streams usb-core: usb3 streams usb: fix endpoint descriptor ordering usb-redir: simplify packet copy usb: make usb_packet_copy operate on combined packets usb: add usb_ep_set_halted usb-host: remove usb_host_device_close usb-host: move legacy cmd line bits usb-storage: use scsi_req_enqueue return value allow disabling usb smartcard support make usb devices configurable fix scripts/make_device_config.sh usb: Makefile cleanup
2013-02-21Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori5-3/+14
# By Alin Tomescu (1) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: .gitignore: Ignore optionrom/*.asm ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c Add some missing qtest binaries to .gitignore xilinx_axienet.c: Assert no error when making link Remove forward declaration of non-existant variable
2013-02-21.gitignore: Ignore optionrom/*.asmCole Robinson1-0/+3
Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-21ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.cAlin Tomescu1-1/+1
I was trying to launch a PowerPC "bamboo" machine with more than 256MB of RAM with qemu-system-ppc -M bamboo -kernel $kernel -initrd $ramdisk -m 512, but QEMU would just hang. However, when I used -m 256, the machine would boot. I looked through the code in hw/ and it seems there is an error when the RAM memory is setup (if my understanding is correct). After patching it, the machine launched and booted successfully with 512MB of RAM. Signed-off-by: Alin Tomescu <tomescu.alin@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-21Add some missing qtest binaries to .gitignoreDavid Gibson1-0/+7
These binaries are generated during make check on at least some configurations, so att them to .gitignore. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-21xilinx_axienet.c: Assert no error when making linkPeter Crosthwaite1-1/+3
This gives an awful silent failure when it doesn't work. Assert against link creation failure. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-21Remove forward declaration of non-existant variableHervé Poussineau1-1/+0
This variable has been removed 5 years ago in 970ac5a3082428dca91171f270dcd95d6f4b2636. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-19uas-uas: usb3 streamsGerd Hoffmann1-42/+205
Add usb3 streams support to the uas (usb attached scsi) emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-xhci: usb3 streamsGerd Hoffmann2-48/+226
Add streams support to the xhci emulation. No secondary streams yet, only linear stream arays are supported for now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-core: usb3 streamsGerd Hoffmann14-31/+37
This patch adds support for usb3 streams to the usb subsystem core. This is just adding a streams field / parameter in a number of places. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: fix endpoint descriptor orderingGerd Hoffmann1-4/+5
Fix the ordering of the endpoint descriptors for superspeed endpoints: The superspeed companion must come first, possible additional descriptors for the endpoint after that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-redir: simplify packet copyGerd Hoffmann1-14/+4
usb_packet_copy can handle combined packets now, so it isn't needed to special-case them any more. Also use the new usb_packet_size() function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: make usb_packet_copy operate on combined packetsGerd Hoffmann2-5/+15
Likewise usb_packet_skip. Also usb_packet_size. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: add usb_ep_set_haltedGerd Hoffmann2-0/+7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-host: remove usb_host_device_closeGerd Hoffmann5-38/+3
Nobody implements that anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-host: move legacy cmd line bitsGerd Hoffmann5-102/+191
The code handling the "-usbdevice host:..." legacy command line syntax is moved to the new hw/usb/host-legacy.c file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-storage: use scsi_req_enqueue return valueGerd Hoffmann1-2/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19allow disabling usb smartcard supportGerd Hoffmann2-1/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19make usb devices configurableGerd Hoffmann17-8/+35
Leave the core usb devices (usb hub, tablet, mouse, keyboard) enabled unconditionally. Make the other ones configurable. Exceptions: - bluetooth: not qdevified yet, has a vl.c dependency because of that, thus disabling isn't as easy as not linking the object file. - smardcard: ccid-card-emulated depends on that one *and* CONFIG_SMARTCARD_NSS. So it isn't a one-liner and comes as separate patch because of that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19fix scripts/make_device_config.shGerd Hoffmann1-1/+1
Make it handle multiple include statements in a file: (1) The printf needs a space so the include files will be separated. (2) Also $f can contain multiple failes, so redirection will not work and we have to use cat to process all files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: Makefile cleanupGerd Hoffmann1-7/+20
Group files, sprinkle in some comments. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-18rtc-test: add testcases for alarms in 12hour modePaolo Bonzini1-3/+199
Trying (unsuccessfully) to break the device model as mentioned in https://bugs.launchpad.net/qemu/+bug/1090558. At least if someone tries to fix that, it won't break what works... Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1357922817-17584-3-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-18rtc-test: always set register B in its entiretyPaolo Bonzini1-27/+9
Eliminate dependencies between one test and the others. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1357922817-17584-2-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-18vnc-tls: Fix compilation with newer versions of GNU-TLSAndre Przywara1-3/+3
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>
2013-02-18doc help: Collect block device stuff under its own headingMarkus Armbruster1-291/+281
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>
2013-02-18doc help: A few options are under inappropriate headings, fixMarkus Armbruster1-41/+39
--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>
2013-02-18help: Fix markup of heading "USB options" so it appears in -helpMarkus Armbruster1-1/+2
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>
2013-02-18doc: Fix texinfo @table markup in qemu-options.hxMarkus Armbruster1-19/+37
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>
2013-02-18doc: Fill some option doc gaps in manual page and qemu-docMarkus Armbruster1-4/+12
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>
2013-02-18doc: Fix some option entries in qemu-doc's function indexMarkus Armbruster1-2/+5
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>
2013-02-18help: Drop bogus help on -qtest and -qtest-logMarkus Armbruster1-7/+3
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>
2013-02-18isa: Split off instance_init for ISADeviceAndreas Färber1-3/+9
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>
2013-02-18qtest: Add MMIO supportAndreas Färber7-29/+332
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>
2013-02-18libqtest: Introduce qtest_qmpv() and convert remaining macroAndreas Färber2-5/+29
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>
2013-02-18libqtest: Convert macros to functions and clean up documentationAndreas Färber1-50/+110
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>
2013-02-18Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori83-363/+780
# 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 ...
2013-02-17tests: Add unit tests for mulu64 and muls64Richard Henderson2-1/+75
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-02-17host-utils: Improve mulu64 and muls64Richard Henderson1-54/+38
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>
2013-02-17host-utils: Use __int128_t for mul[us]64Richard Henderson3-11/+30
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>
2013-02-17tcg/ppc: Fix build of tcg_qemu_tb_exec()Andreas Färber1-1/+1
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>
2013-02-16target-sparc: Fix debug output for DEBUG_MMUAndreas Färber1-1/+1
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>
2013-02-16target-i386: Split command line parsing out of cpu_x86_register()Andreas Färber2-41/+40
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>
2013-02-16target-i386: Move cpu_x86_init()Andreas Färber3-26/+25
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>
2013-02-16target-lm32: Drop unused cpu_lm32_close() prototypeAndreas Färber1-1/+0
It was never implemented. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16target-s390x: Drop unused cpu_s390x_close() prototypeAndreas Färber1-1/+0
It was never implemented. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()Andreas Färber1-8/+3
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>