tcg: Use not_i32 to implement not_i64.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: Change TCGType to an enumeration.
The TCGType name was already used consistently. Changing itto an enumeration instead of a set of defines aids debugging.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: Use TCGCond where appropriate.
Use the TCGCond enumeration type in the brcond and setcondrelated prototypes in tcg-op.h and each code generator.
tcg: Name the opcode enumeration.
Give the enumeration formed from tcg-opc.h a name: TCGOpcode.Use that enumeration type instead of "int" whereever appropriate.
linux-user: Add the syscall id for pselect6 on ARM
As this is now supported in newer linux kernels.
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
remove remaining occurrences AREG[1-9] and TCG_AREG[1-9]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: add inotify_init1 syscall support
New syscall which gets actively used when you have afresh kernel.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Fix handling of AL condition in IT instruction
Do not try to insert a conditional jump over next instruction when thecondition code is AL as this will trigger an internal error.
Signed-off-by: Johan Bengtsson <teofrastius@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg-hppa: Fix 64-bit argument ordering
tcg-hppa: Fix const errors in hppa-dis.c
Fix bsd-user broken by commit b5ec5ce0e39d6e7ea707d5604a5f6d567dfd2f48
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix recent pxa270 serial breakage
This fixes a copy/paste bug introduced in commit2d48377a8531de63ec1d0c4b9b1959dc4b78356c that pushed TARGET_WORDS_BIGENDIANdependency to board level.
Signed-off-by: Lars Munch <lars@segv.dk>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-error: Avoid build warning.
CC qemu-error.occ1: warnings being treated as errors/home/edgar/src/c/qemu/git/qemu/qemu-error.c: In function 'error_print_loc':/home/edgar/src/c/qemu/git/qemu/qemu-error.c:191: error: format not a string literal and no format arguments...
pci_host: fix breakage
This has been broken by commit 952760bb7bce7fbfe0afcf04fee268745f297b87
Compile virtio-pci only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile sound devices only once
Fix Sparc64 build
952760bb7bce7fbfe0afcf04fee268745f297b87 missed one change.
Compile pci_host only once
Convert pci_host_conf_register_mmio_noswap(x) topci_host_conf_register_mmio(x, 0).
Convert pci_host_conf_register_mmio(x) topci_host_conf_register_mmio(x, 1) for big endian hosts, all caseshappen to be BE.
Compile pcie_host only once
Compile pci only once
Move coalesced_mmio declarations to a more accessible location.
Compile usb-ohci only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Compile serial only once
Compile ne2000_isa only once
Compile isa_mmio only once
Compile most PCI network cards only once
Compile async only once
Compile qemu-error only once
Compile fdc only once
Compile most IDE devices only once
Compile usb-uhci only once
Compile vga-isa only once
Compile i8254 only once
Compile pcspk only once
Compile parallel only once
Compile vga-pci only once
Move x86 specific PC declarations to a separate file
x86 definitions (especially CPUState uses) prevent many files frombeing compiled within libhw.
Move x86 specific declarations (APIC stuff) to a separate file.
Revert 'Fix build'
Partially revert 80a1ab598c6960e7a941e38c5d8638c532c585c3.
Revert "Introduce a default qmp session"
This reverts commit 3290c4aac5b97bb1e3b2b28d94669f2c611ce84a.
Conflicts:
vl.c
Revert "qmp: don't make -qmp disable the default monitor"
This reverts commit d49f626ed00cecc90fb1ff88da9bdf11e57094d1.
Revert "tap: invoke downscript when we exit abnormally"
This reverts commit 8af8ce4d6116e3d46ad298ca8fe50d3b515b1aac.
Revert "Convert atexit users to exit_notifier"
This reverts commit d7234f4d7e373a708e1df9ab565a71b71b189025.
hw/xen_machine_pv.c
This should have never been committed.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "Add exit notifiers"
This reverts commit 3b6304f706ef7eebc0b3b3f3a5093ec75448ee19.
This was mistakenly committed.
Fix a typo
Compile disassemblers only once
tcg/arm: don't save/restore r7 in prologue/epilogue
There is no need to save r7, it is used to store the addressof the env structure and is not modified by GCC.
tcg/arm: fix load/store definitions for 32-bit targets
tcg: protect div2 in tcg/tcg-opc.h
Fix a typo which broke Xen build
Fix mingw32 build
mkdir() only takes path argument on mingw32:
CC i386-softmmu/vl.o/src/qemu/vl.c: In function 'qmp_add_default':/src/qemu/vl.c:3763: error: too many arguments to function 'mkdir'/src/qemu/vl.c:3769: error: too many arguments to function 'mkdir'...
Fix build
CC curses.occ1: warnings being treated as errors/src/qemu/curses.c: In function 'curses_display_init':/src/qemu/curses.c:341: error: initialization from incompatible pointer type
qmp: don't make -qmp disable the default monitor
Instead, we introduce a default_qmp flag. We don't use it yet, but will in thenext patch.
This has a user-visible impact as specifying just -qmp will now also show amonitor on the 'vc'.
Introduce a default qmp session
Basically, -qmp unix:%{home}/.qemu/qmp/%{uuid}.sock,server,nowait
%{uuid} will be -uuid if it's specified, otherwise, if libuuid is available,we generate a uuid. If it's not available, we don't create one.
Rewrite mouse handlers to use QTAILQ and to have an activation function
And convert usb-hid to use it (to avoid regression with bisection)
Right now, when we do info mice and we've added a usb tablet, we don't see ituntil the guest starts using the tablet. We implement this behavior in order...
Add kbd_mouse_has_absolute()
kbd_mouse_is_absolute tells us whether the current mouse handler is an absolutedevice. kbd_mouse_has_absolute tells us whether we have any device that iscapable of absolute input.
This lets us tell a user that they have configured an absolute device but that...
Add notifier for mouse mode changes
Right now, DisplayState clients rely on polling the mouse mode to determinewhen the device is changed to an absolute device. Use a notification list toadd an explicit notification.
Expose whether a mouse is an absolute device via QMP and the human monitor.
For QMP, we just add an attribute which is backwards compatible. For the humanmonitor, we add (absolute) to the end of the line.
input: make vnc use mouse mode notifiers
When we switch to absolute mode, we send out a notification (if the clientsupports it). Today, we only send this notification when the client sends usa mouse event and we're in the wrong mode.
sdl: use mouse mode notifier
Today we poll the mouse mode whenever there is a mouse movement. There is asubtle usability problem with this though.
If we're in relative mode and grab is enabled, when we change to absolute mode,we break grab. This gives a user a seamless transition when the new pointer...
Add exit notifiers
Like atexit() but with state
Convert atexit users to exit_notifier
All of these users have global state so we really don't see a benefit fromexit_notifier. However, using exit_notifier means that there's one lessjustification for having global state in the first place.
tap: invoke downscript when we exit abnormally
Right now, downscript is not invoked reliably. If you execute 'quit' from themonitor, it won't be invoked.
This fixes that by converting tap to use an exit_notifier to execute thedownscript. In this case, allowing an exit notifier to include state is...
Add support for generic notifier lists
Notifiers are data-less callbacks and a notifier list is a list of registerednotifiers that all are interested in a particular event.
We'll use this in a few patches to implement mouse change notification.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
CODING_STYLE: Reserve qemu_ prefix for library wrappers
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Convert io handlers to QLIST
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
remove useless cast
values are already pointers, no need to cast them to void *
rename IOCanRWHandler to IOCanReadHandler
It was always only used for reads
bt: remove bt_host_read_poll()
It allways returned true, that is the equivalent of not having thecallback.
Handle deleted IOHandlers in a single buffer
Revert "usb-linux: remove unreachable default in switch statement"
This reverts commit 3c9c706c3b66d838942aba53c0d3fdcdf06c7423.
This breaks build (gcc 4.3.2): CC usb-linux.o cc1: warnings being treated as errors /src/qemu/usb-linux.c: In function 'usb_linux_update_endp_table':...
Fix OpenBSD linker warning
qemu-option.o(.text+0x20f8): In function `qemu_opts_from_qdict_1':/src/qemu/qemu-option.c:813: warning: strcpy() is almost always misused, please use strlcpy()
Replace assert(0) with abort() or cpu_abort()
When building with -DNDEBUG, assert(0) will not stop executionso it must not be used for abnormal termination.
Use cpu_abort() when in CPU context, abort() otherwise.
Fix manpage errors
Split long unbreakable lines to smaller sections.
Spotted by Debian Lintian tool:http://lintian.debian.org/full/pkg-qemu-devel@lists.alioth.debian.org.html#qemu
scsi-disk: fix buffer overflow
In case s->version is shorter than 4 bytes we overflow the memcpy srcbuffer. Fix it by clearing the target buffer, then copy only theamount of bytes we actually have.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/usb-msd: fix some usb requests
The usb-msd device emulation needs some small tweaks in the requestsemulations. For instance, the reset/maxlun requests are class/interfacespecific so requests for them with the type class and recipient interfacebits sets have to be handled....
vnc: add no-lock-key-sync option
Add an option to disable the heuristics which try to keepcapslock and numlock state for guest and host in sync.
split out qemu-timer.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
read-only: minor cleanup
Really use read-only flags for opening the file when asked for read-only
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
read-only: Another minor cleanup
Don't rely on CDROM hint for read_only attribute
migration: Clear fd also in error cases
Not clearing the fd and closing the file makes qemu spin using 100%CPUafter incoming migration error.
See for instance bug:https://bugzilla.redhat.com/show_bug.cgi?id=518032
Signed-off-by: Juan Quintela <quintela@redhat.com>...
migration: unix migration should obey autostart are the other ones
This was the only incoming migration without autostart check
place together more #ifdef CONFIG_IOTHREAD blocks
disentangle tcg and deadline calculation
Just tell main_loop_wait whether to be blocking or nonblocking, so thatthere is no need to call qemu_cpus_have_work from the timer subsystem.Instead, tcg_cpu_exec can say "we want the main loop not to block because...
only one flag is needed for alarm_timer
The ALARM_FLAG_DYNTICKS can be testing simply by checking if there isa rearm function.
more alarm timer cleanup
The timer_alarm_pending variable is related to the alarm timer but notplaced in the struct. Also, in qemu_mod_timer the wrong flag was beingtested: the timer is rearmed in the alarm timer "bottom half", so theright flag to test there is the "pending" flag....
do not use qemu_event_increment outside qemu_notify_event
qemu_notify_event in the non-iothread case is only stopping the currentCPU. However, if the CPU is idle and the main loop is in the selectcall then a call to qemu_event_increment is needed too (as done in...
tweak qemu_notify_event
Instead of testing specially next_cpu in host_alarm_handler, just dothat in qemu_notify_event. The idea is, if we are not running (ornot yet running) target CPU code, prepare things so that the executionloop is exited asap; just make that clear....
remove qemu_rearm_alarm_timer from main loop
Make the timer subsystem register its own callback instead.
extract timer handling out of main_loop_wait
change qemu_run_timers interface
introduce and use qemu_clock_enable
By adding the possibility to turn on/off a clock, yet anotherincestuous relationship between timers and CPUs can be disentangled.
centralize handling of -icount
A simple patch to place together all handling of -icount.
add qemu_icount_round
add qemu_alarm_pending
new function qemu_icount_delta
Tweaking the rounding in qemu_next_deadline ensures that there'sno change whatsoever.
move vmstate registration of vmstate_timers earlier
avoid dubiously clever code in win32_start_timer
The code is initializing an unsigned int to UINT_MAX using "-1", so thatthe following always-true comparison seems to be always-false at afirst look. Since alarm timer initializations are never nested, it is...
fix error in win32_rearm_timer
The TIME_ONESHOT and TIME_PERIODIC flags are mutually exclusive.The code after the patch matches the flags used in win32_start_timer.
balloon: Do not save VM state wrt asynchronous virtio operations
When working with the VM state (for loadvm/savevm and migration), it is notvalid to load and store pointers since the validity of those pointers cannot beassured in the new qemu address space. Therefore, virtio_balloon_save() and...
block: add logical_block_size property
Add a logical block size attribute as various guest side tools onlyincrease the filesystem sector size based on it, not the advisoryphysical block size.
For scsi we already have support for a different logical block size...
Avoid crash on '-usbdevice <device>' without parameters
Many usbdevice_init implementors assume params is non-NULL.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>