build: disable Wstrict-prototypes
GTK won't build with strict-prototypes due to gtkitemfactory.h:
/* We use () here to mean unspecified arguments. This is deprecated * as of C99, but we can't change it without breaking compatibility. * (Note that if we are included from a C++ program () will mean...
console: allow VCs to be overridden by UI
We want to expose VCs using a VteTerminal widget. We need access to provide ourown CharDriverState in order to do this.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1361367806-4599-3-git-send-email-aliguori@us.ibm.com
ui: add basic GTK gui (v5)
This is minimalistic and just contains the basic widget infrastructure. The GUIconsists of a menu and a GtkNotebook. To start with, the notebook has its tabshidden which provides a UI that looks very similar to SDL with the exception of...
gtk: add virtual console support (v2)
This enables VteTerminal to be used to render the text consoles. VteTerminal isthe same widget used by gnome-terminal which means it's VT100 emulation is asgood as they come.
It's also screen reader accessible, supports copy/paste, proper scrolling and...
gtk: add support for input grabbing (v2)
There is a small deviation from SDL's behavior here. Instead of Ctrl+Alttriggering grab, we now use Ctrl-Alt-g to trigger grab.
GTK will not accept Ctrl+Alt as an accelerator since it just consists ofmodifiers. Having grab as a proper accelerator is important as it allows a user...
gtk: add support for screen scaling and full screen (v5)
Basic menu items to enter full screen mode and zoom in/out. Unlike SDL, wedon't allow arbitrary scaling based on window resizing. The current behaviorwith SDL causes a lot of problems for me.
Sometimes I accidentally resize the window a tiny bit while trying to move it...
gtk: add translation support (v5)
This includes a de_DE translation from Kevin Wolf and an it translation fromPaolo Bonzini.
Cc: Paolo Bonzini <pbonzini@redhat.com>Cc: Kevin Wolf <kwolf@redhat.com>Cc: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
qom/object.c: Reset interface list on inheritance
The QOM framework will attempt the recreate a classes interface list fromscratch for each class. This means that a child class should zero out thelist of interfaces when cloned from the parent class.
Currently the list is memcpy()d from the parent to the child. As the interface...
qom/object.c: Allow itf cast with num_itfs = 0
num_interfaces only tells you how many interfaces the concrete child class has(as defined in the TypeInfo). This means if you have a child class which definesno interfaces of its own, but its parent has interfaces you cannot cast to those...
vga: fix byteswapping.
In case host and guest endianness differ the vga code first createsa shared surface (using qemu_create_displaysurface_from), then goespatch the surface format to indicate that the bytes must be swapped.
The switch to pixman broke that hack as the format patching isn't...
Remove elderly top level TODO file
The top level TODO file hasn't been touched since 2008, so it's nowan unhelpful and out of date mix of things that have already been done,things that don't make sense any more and things which could in theorybe done but are not in practice important enough (or we'd have done...
help: add docs for multiqueue tap options
Cc: Markus Armbruster <armbru@redhat.com>Cc: Jason Wang <jasowang@redhat.com>Signed-off-by: Jason Wang <jasowang@redhat.com>Message-id: 1361354641-51969-1-git-send-email-jasowang@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
slirp: switch to GPollFD
Slirp uses rfds/wfds/xfds more extensively than other QEMU components.
The rarely-used out-of-band TCP data feature is used. That means weneed the full table of select(2) to g_poll(3) events:
rfds -> G_IO_IN | G_IO_HUP | G_IO_ERR...
iohandler: switch to GPollFD
Convert iohandler_select_fill() and iohandler_select_poll() to useGPollFD instead of rfds/wfds/xfds.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Message-id: 1361356113-11049-7-git-send-email-stefanha@redhat.com...
main-loop: drop rfds/wfds/xfds for good
Now that all *_fill() and *_poll() functions use GPollFD we no longerneed rfds/wfds/xfds or pollfds_from_select()/pollfds_to_select().
From now on everything uses GPollFD.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>...
aio: extract aio_dispatch() from aio_poll()
We will need to loop over AioHandlers calling >io_read()/>io_write()when aio_poll() is converted from select(2) to g_poll(2).
Luckily the code for this already exists, extract it into the newaio_dispatch() function....
aio: convert aio_poll() to g_poll(3)
AioHandler already has a GPollFD so we can directly use itsevents/revents.
Add the int pollfds_idx field to AioContext so we can map g_poll(3)results back to AioHandlers.
Reuse aio_dispatch() to invoke handlers after g_poll(3)....
aio: support G_IO_HUP and G_IO_ERR
aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR becauseselect(2) does not have equivalent events. Now that g_poll(3) is usedwe can support G_IO_HUP and G_IO_ERR.
main-loop: fix select_ret uninitialized variable warning
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
main-loop: switch to g_poll() on POSIX hosts
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...
main-loop: switch POSIX glib integration to GPollFD
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 nowbecome local variables.
slirp: slirp/slirp.c coding style cleanup
The slirp glue code uses tabs in some places. Since the next patch willmodify 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>...
Merge remote-tracking branch 'kraxel/usb.78' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
.gitignore: Ignore optionrom/*.asm
Signed-off-by: Cole Robinson <crobinso@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c
I was trying to launch a PowerPC "bamboo" machine with more than 256MB of RAMwith qemu-system-ppc -M bamboo -kernel $kernel -initrd $ramdisk -m 512, but QEMUwould just hang. However, when I used -m 256, the machine would boot....
Add some missing qtest binaries to .gitignore
These binaries are generated during make check on at least someconfigurations, so att them to .gitignore.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Remove forward declaration of non-existant variable
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>
xilinx_axienet.c: Assert no error when making link
This gives an awful silent failure when it doesn't work. Assert against linkcreation failure.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
uas-uas: usb3 streams
Add usb3 streams support to the uas (usb attached scsi) emulation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-xhci: usb3 streams
Add streams support to the xhci emulation. No secondary streams yet,only linear stream arays are supported for now.
usb-host: move legacy cmd line bits
The code handling the "-usbdevice host:..." legacy command linesyntax is moved to the new hw/usb/host-legacy.c file.
usb-host: remove usb_host_device_close
Nobody implements that anyway.
usb: add usb_ep_set_halted
usb: make usb_packet_copy operate on combined packets
Likewise usb_packet_skip.Also usb_packet_size.
usb-redir: simplify packet copy
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.
usb: fix endpoint descriptor ordering
Fix the ordering of the endpoint descriptors for superspeed endpoints:The superspeed companion must come first, possible additionaldescriptors for the endpoint after that.
usb-core: usb3 streams
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.
allow disabling usb smartcard support
usb-storage: use scsi_req_enqueue return value
make usb devices configurable
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...
fix scripts/make_device_config.sh
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....
usb: Makefile cleanup
Group files, sprinkle in some comments.
rtc-test: always set register B in its entirety
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
rtc-test: add testcases for alarms in 12hour mode
Trying (unsuccessfully) to break the device model as mentioned inhttps://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>...
vnc-tls: Fix compilation with newer versions of GNU-TLS
In my installation of GNU-TLS (v3.0.23) the typegnutls_anon_server_credentials is marked deprecated, so -Werrorbreaks compilation.Simply replacing it with the newer ..._t version fixed the compilation...
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
doc: Fix texinfo @table markup in qemu-options.hx
End tables before headings, start new ones afterwards. Fixesincorrect indentation of headings "File system options" and "VirtualFile system pass-through options" in manual page and qemu-doc.
Normalize markup some to increase chances it survives future edits....
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>...
doc help: Collect block device stuff under its own heading
Collect them from "Standard options", "File system options", "VirtualFile system pass-through options", "Debug/Expert options".
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>...
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.deSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qtest: Add MMIO support
Introduce [qtest_]{read,write}[bwlq]() libqtest functions andcorresponding QTest protocol commands to replace local versions inlibi2c-omap.c.
Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().
Signed-off-by: Andreas Färber <afaerber@suse.de>...
libqtest: Convert macros to functions and clean up documentation
libqtest.h provides a number of shortcut macros to avoid tests feedingit the QTestState they operate on. Most of these can easily be turnedinto static inline functions, so let's do that for clarity....
libqtest: Introduce qtest_qmpv() and convert remaining macro
In order to convert qmp() macro to an inline function, expose aqtest_qmpv() function, reused by qtest_qmp().
We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length formatstrings, which would result in warnings treated as errors....
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
host-utils: Improve mulu64 and muls64
The new formulation makes better use of add-with-carry type insnsthat the host may have. Use gcc's sign adjustment trick to avoidhaving to perform a 128-bit negation.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
tests: Add unit tests for mulu64 and muls64
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
host-utils: Use __int128_t for mul[us]64
Replace some x86_64 specific inline assembly with something thatall 64-bit hosts ought to optimize well. At worst this becomesa call to the gcc __multi3 routine, which is no worse than ourimplementation in util/host-utils.c....
tcg/ppc: Fix build of tcg_qemu_tb_exec()
Commit 0b0d3320db74cde233ee7855ad32a9c121d20eb4 (TCG: Final globalsclean-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>...
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>
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 movecpu_x86_parse_featurestr() into cpu_x86_init() as well....
cpu: Move running field to CPUState
Pass CPUState to cpu_exec_{start,end}() functions.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move exit_request field to CPUState
Since it was located before breakpoints field, it needs to be reset.
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 alsoresolves the use of void* for cpu.h independence.Change vAPIC patch_instruction() argument to X86CPU....
cputlb: Pass CPUState to cpu_unlink_tb()
CPUArchState is no longer needed.
cpu: Add CPUArchState pointer to CPUState
The target-specific ENV_GET_CPU() macros have allowed us to navigatefrom CPUArchState to CPUState. The reverse direction was not supported.Avoid introducing CPU_GET_ENV() macros by initializing an untypedpointer that is initialized in derived instance_init functions....
e500: Replace open-coded loop with qemu_get_cpu()
Since we still need env for ppc-specific fields, obtain it via the newenv_ptr fields to avoid "cpu" name conflicts between CPUState andPowerPCCPU for now.
This fixes a potential issue with env being NULL at the end of the loop...
ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()
Potentially env could be NULL whereas cpu would still be valid andcorrespond to a previous env.
Wrapping this in qemu_get_cpu(), env is no longer needed, so simplifycode that existed before 55e5c2850293547203874098f7cec148ffd12dfa....
spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()
The helper functions all access ppc-specific fields only so don't botherto change arguments to PowerPCCPU and use env_ptr instead.
No functional change.
Acked-by: Alexander Graf <agraf@suse.de>...
target-s390x: Drop unused cpu_s390x_close() prototype
It was never implemented.
target-lm32: Drop unused cpu_lm32_close() prototype
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>
target-sparc: Move TCG initialization to SPARCCPU initfn
target-unicore32: Move TCG initialization to UniCore32CPU initfn
Normalize the "inited" logic and add a tcg_enabled() check to suppressit 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>
target-xtensa: Move TCG initialization to XtensaCPU initfn
Combine this with breakpoint handler registration, guarding both withtcg_enabled() to suppress also TCG init for qtest. Rename the handler toxtensa_breakpoint_handler() since it needs to become global....
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>
target-m68k: Return M68kCPU from cpu_m68k_init()
Turn cpu_init() into a static inline function for backwardscompatibility.
mcf5206: Pass M68kCPU to mcf5206_init()
Store it in m5206_mbar_state. Prepares for passing M68kCPU tom68k_set_irq_level().
mcf_intc: Pass M68kCPU to mcf_intc_init()
Store it in mcf_intc_state.Prepares for passing it to m68k_set_irq_level().
target-m68k: Pass M68kCPU to m68k_set_irq_level()
Simplifies use of cpu_reset_interrupt() et al.
target-cris: Introduce CRISCPU subclasses
Use class_init functions to initialize the VR in preparation foroverriding 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...
cpu: Move host_tid field to CPUState
Change gdbstub's cpu_index() argument to CPUState now that CPUArchStateis no longer used.
target-arm: Move TCG initialization to ARMCPU initfn
Ensures that a QOM-created ARMCPU is usable.
target-cris: Move TCG initialization to CRISCPU initfn
Split out TCG initialization from cpu_cris_init(). Avoid CPUCRISStatedependency for v10-specific initialization and for non-v10 by inliningthe decision into the initfn as well.
target-lm32: Move TCG initialization to LM32CPU initfn
target-m68k: Move TCG initialization to M68kCPU initfn
Add a tcg_enabled() check to suppress it for qtest.
target-microblaze: Move TCG initialization to MicroBlazeCPU initfn
Split off TCG initialization from cpu_mb_init() into mb_tcg_init() tocall it from the initfn.
Ensures that a QOM-created MicroBlazeCPU is usable.
target-mips: Move TCG initialization to MIPSCPU initfn
Make mips_tcg_init() non-static and add tcg_enabled() check to suppressit for qtest.
target-ppc: Move TCG initialization to PowerPCCPU initfn
Ensures that a QOM-created PowerPCCPU is usable.
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>
target-sh4: Move TCG initialization to SuperHCPU initfn
target-mips: Introduce QOM realizefn for MIPSCPU
Introduce a realizefn and set realized = true from cpu_mips_init().
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>
target-sh4: Introduce QOM realizefn for SuperHCPU
Introduce a realizefn and set realized = true in cpu_sh4_init().
target-sparc: Introduce QOM realizefn for SPARCCPU
Introduce realizefn and set realized = true in cpu_sparc_init().
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>
target-xtensa: Introduce QOM realizefn for XtensaCPU
Introduce realizefn and set realized = true in cpu_xtensa_init().