slirp: Fix unusual "comments" in unused code
cppcheck detected two rather strange comments which were notcorrectly written as C comments.
They did not cause any harm because they were framed by#ifdef notdef ... #endif, so they were never compiled.
Fix them nevertheless (we could also remove the unused code)....
Makefile: Minor cscope fixups
Create cscope symbols for assembly files in addition to .c/.h files.Create cscope database with full path instead of relative path so cscopecan be used with CSCOPE_DB in any directory.
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>...
vhost build fix for i386
vhost.c uses __sync_fetch_and_and(), which is onlyavailable for -march=i486 and above (seehttps://bugzilla.redhat.com/show_bug.cgi?id=624279).
Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Let users select their pythons
Add configure check for python, exit if not found. Add switchesfor specifying the path to python, use the path in Makefile.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
simpletrace: suppress a warning from unused variable
Avoid this warning: CC simpletrace.o/src/qemu/simpletrace.c: In function 'writeout_thread':/src/qemu/simpletrace.c:122:12: error: variable 'unused' set but not used [-Werror=unused-but-set-variable]...
Wrap recv to avoid warnings
Avoid warnings like these by wrapping recv(): CC slirp/ip_icmp.o/src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':/src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]...
Fix chrdev return value conversion
6e1db57b2ac9025c2443c665a0d9e78748637b26 didn'tconvert brlapi or win32 chrdevs, breaking build for those.
Fix by converting the chrdevs.
Acked-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-ga: remove dependency on gio and gthread
As far as I can tell, there isn't a dependency on gthread. Also, the only useof gio was to enable GSocket to accept a unix domain socket.
Since GSocket isn't available on OpenSuSE 11.1, let's just remove that...
guest-agent: only enable FSFREEZE when it's supported by the kernel
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Open 1.0 development branch.
Bump version to reflect v0.15.0-rc0
qemu-timer: Introduce clock reset notifier
QEMU_CLOCK_HOST is based on the system time which may jump backward incase the admin or NTP adjusts it. RTC emulations and other device modelscan suffer in this case as timers will stall for the period the clock...
mc146818rtc: Handle host clock resets
Make use of the new clock reset notifier to update the RTC wheneverrtc_clock is the host clock and that happens to jump backward. Thisavoids that the RTC stalls for the period the host clock was set back.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Register Linux dyntick timer as per-thread signal
Derived from kvm-tool patchhttp://thread.gmane.org/gmane.comp.emulators.kvm.devel/74309
Ingo Molnar pointed out that sending the timer signal to the wholeprocess, just blocking it everywhere, is suboptimal with an increasing...
Correct spelling of licensed
Correct typos of "licenced" to "licensed".
Reviewed-by: Stefan Weil <weil@mail.berlios.de>Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de>Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callbackwhich is useful if sender and receiver do not share any other distinctdata structure.
Will be used first for the clock reset notifier.
ide: Turn properties any IDE device must have into bus properties
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial: Turn props any virtio-serial-bus device must have into bus props
usb-ccid: Drop unused CCIDCardInfo callback print()
virtio-serial: Clean up virtser_bus_dev_print() output
Old version looks like this in info qtree (last four lines):
dev: virtconsole, id "" dev-prop: is_console = 1 dev-prop: nr = 0 dev-prop: chardev = <null>...
vga: Fix type of lfb/map_addr/end.
These addresses have been passed through pci_to_cpu_addr,and thus need to be full target_phys_addr_t.
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Richard Henderson <rth@twiddle.net>Cc: Jan Kiszka <jan.kiszka@siemens.com>...
vl.c: Don't limit node count by smp count
[I've sent this patch couple of months ago and noticed it didn't make it's way in - so I'm sending it again]
It is possible to create CPU-less NUMA nodes, node amount shouldn't belimited by amount of CPUs.
Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
do not reset no_shutdown after we shutdown the vm
Daniel P. Berrange sent a libvirt's patch to supportreboots with the QEMU driver. He implements it injson model like this:1. add -no-shutdown in the qemu's option: qemu -no-shutdown xxxx2. shutdown the vm by monitor command system_powerdown...
Store VNC auth scheme per-client as well as per-server
A future patch will introduce a situation where differentclients may have different authentication schemes set.When a new client arrives, copy the 'auth' and 'subauth'fields from VncDisplay into the client's VncState, and...
Introduce a 'client_add' monitor command accepting an open FD
Allow client connections for VNC and socket based characterdevices to be passed in over the monitor using SCM_RIGHTS.
One intended usage scenario is to start QEMU with VNC on aUNIX domain socket. An unprivileged user which cannot access...
Remove unused USES_X509_AUTH macro from VNC sasl code
The USES_X509_AUTH macro is defined in several VNC files,but not used in all of them. Remove the unused definition.
qemu-timer: change unix timer to dynticks
A timer that wakes up every millisecond puts a lot of stress on theiothread. The large amount of IPIs causes very high context switchactivity, making emulation slow and the UI unusable. This is by theway the same reason why the Windows timers were switched to dynticks....
qemu-char: Print strerror message on failure
The only way for chardev drivers to communicate an error was to return a NULLpointer, which resulted in an error message that said that something wentwrong, but not why.
This patch changes the interface to return 0/-errno and updates...
iothread: replace fair_mutex with a condition variable
This conveys the intention better, and scales to more than >1threads contending the mutex with the iothread (as long as allof them have a "quiescent point" like the TCG thread has).
Also, on Mac OS X the fair_mutex somehow didn't work as intended...
report serial devices created with -device in the PIIX4 config space
Serial and parallel devices created with -device are not reported inthe PIIX4 configuration space, and are hence not picked up by the DSDT.This upsets Windows, which hides them altogether from the guest....
multiboot: Support commas in module parameters
Support commas in the parameter list of multiboot modules as well as for thekernel command line, by using double commas (via get_opt_value()).
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Reviewed-by: Kevin Wolf <kwolf@redhat.com>...
slirp: Forward ICMP echo requests via unprivileged sockets
Linux 3.0 gained support for unprivileged ICMP ping sockets. Use thisfeature to forward guest pings to the outer world. The host admin has toset the ping_group_range in order to grant access to those sockets. To...
net: Improve layout of 'info network'
Improve the layout when listing non-vlan clients via 'info network'. Theresult looks like this:
(qemu) info networkDevices not on any VLAN: orphan: net=10.0.2.0, restricted=n virtio-net-pci.0: model=virtio-net-pci,macaddr=52:54:00:12:34:56...
net: Refactor net_client_types
Position entries of net_client_types according to the correspondingvalues of NET_CLIENT_TYPE_*. The array size is now defined byNET_CLIENT_TYPE_MAX. This will allow to obtain entries based on typevalue in later patches....
net: Dump client type 'info network'
Include the client type name into the output of 'info network'. Theresult looks like this:
(qemu) info networkVLAN 0 devices: rtl8139.0: type=nic,model=rtl8139,macaddr=52:54:00:12:34:57Devices not on any VLAN: virtio-net-pci.0: type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56...
net: Consistently use qemu_macaddr_default_if_unset
Drop the open-coded MAC assignment from net_init_nic and replace it withstandard qemu_macaddr_default_if_unset which is also used by qdev. Thatavoid creating colliding MACs when instantiating NICs via different...
guest agent: use QERR_UNSUPPORTED for disabled RPCs
.gitignore: ignore qemu-ga and qapi-generated
Add a new binary and generation directory to the gitignore file
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Generalize -machine command line option
-machine somehow suggests that it selects the machine, but it doesn't.Fix that before this command is set in stone.
Actually, -machine should supersede -M and allow to introduce arbitraryper-machine options to the command line. That will change the internal...
Deprecate -M command line options
Superseded by -machine. Therefore, this patch removes -M from the helplist and pushes -machine at the same place in the output.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
slirp: Fix restricted mode
This aligns the code to what the documentation claims: Allow everythingbut requests that would have to be routed outside of the virtual LAN.
So we need to drop the unneeded IP-level filter, allow TFTP requests,and add the missing protocol-level filter to ICMP....
slirp: Canonicalize restrict syntax
All other boolean arguments accept on|off - except for slirp's restrict.Fix that while still accepting the formerly allowed yes|y|no|n, butreject everything else. This avoids accidentally allowing externalconnections because syntax errors were so far interpreted as...
slirp: Strictly associate DHCP/BOOTP and TFTP with virtual host
Instead of accepting every DHCP/BOOTP and TFTP packet, only invoke thebuilt-in servers if the target is the virtual host.
slirp: Replace m_freem with m_free
Remove this pointless wrapping.
slirp: Put forked exec into separate process group
Recent smb daemons tend to terminate themselves via a process groupSIGTERM. If the daemon is still in qemu's group by that time, qemu willdie as well. Avoid this by always pushing fork_exec processes into a...
guest-agent: fix build with OpenBSD
FS-Freeze only works with Linux.
xen: fix xen-mapcache build on non-Xen capable targets
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge remote-tracking branch 'origin/master' into staging
target-sparc: Fix compiler errors (format strings)
This change is needed because commit 06e12b65now uses an unsigned long long value(uint64_t && unsigned long long => unsigned long long).
Cc: Tsuneo Saito <tsnsaito@gmail.com>Cc: Blue Swirl <blauwirbel@gmail.com>...
Merge remote-tracking branch 'spice/spice.v39' into staging
Merge remote-tracking branch 'qmp/for-anthony' into staging
Merge remote-tracking branch 'kraxel/usb.21' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
usb-hid: fixup changed tracking.
Remove leftover calls to usb_hid_changed().
Take care to update the changed flag after delivering a event viaGET_REPORT like we do when sending events via interrupt endpoint.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-uhci: fix irq handling on error.
Spec on UHCI_STS_USBERR: "If the TD on which the error interruptoccurred also had its IOC bit set, both this bit and Bit 0 are set."
Make UHCI emulation do that.
usb-ehci: trace: rename "next" to "nxt".
"next" is reserved in systemtap thus using this as atrace parameter name causes trouble when trying to tracewith systemtap.
USB: add usb network redirection support
This patch adds support for a usb-redir device, which takes a chardevas a communication channel to an actual usbdevice using the usbredir protocol.
Compiling the usb-redir device requires usbredir-0.3 to be installed for...
SPARC64: implement addtional MMU faults related to nonfaulting load
This patch implements MMU faults caused by TTE.NFO and TTE.E:- access other than nonfaulting load to a page marked NFO should raise data_access_exception- nonfaulting load to a page marked with E bit should raise...
SPARC64: implement MMU miss traps on nonfaulting loads
Nonfaulting loads should raise fast_data_access_MMU_miss traps asnormal loads do. It is up to the guest OS kernel that detect MMU misseson nonfaulting load instructions and make them complete without signaling....
SPARC64: fix fault status overwritten on nonfaulting load
cpu_get_phys_page_nofault() calls get_physical_address() twice,that results in overwriting the fault status in the SFSR.We need this change in order for nonfaulting loads to raising MMU faultsas normal loads do....
SPARC64: split cpu_get_phys_page_debug() from cpu_get_phys_page_nofault()
This patch makes cpu_get_phys_page_debug() independent fromcpu_get_phys_page_nofault() in advance of implementing nonfaulting load.This also modifies cpu_get_phys_page_nofault() to be compiled only on...
SPARC64: introduce a convenience function for getting physical addresses
Introduce cpu_sparc_get_phys_page() to be used as a help for splittingcpu_get_phys_page_debug() from cpu_get_phys_page_nofault().
Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
SPARC64: SFSR cleanup and fix
Add macros for SFSR fields and use macros instead of magic numbers.Also fix the update of the register fields on MMU faults.
SPARC64: TTE bits cleanup
Add macros for TTE bits and modify to use macros instead ofmagic numbers.
qapi: add QAPI code generation documentation
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
qerror: add QERR_JSON_PARSE_ERROR to qerror.c
Missing from previous addition of error to qerror.h. Needed forqerror_format() and friends.
guest agent: command state class
guest agent: qemu-ga daemon
This is the actual guest daemon, it listens for requests over avirtio-serial/isa-serial/unix socket channel and routes them throughto dispatch routines, and writes the results back to the channel ina manner similar to QMP....
guest agent: add guest agent RPCs/commands
This adds the initial set of QMP/QAPI commands provided by the guestagent:
guest-syncguest-pingguest-infoguest-shutdownguest-file-openguest-file-readguest-file-writeguest-file-seekguest-file-flushguest-file-close...
qapi: add QMP command registration/lookup functions
Registration/lookup functions for that provide a lookup table fordispatching QMP commands.
qapi: add QMP dispatch functions
Given an object recieved via QMP, this code uses the dispatch tableprovided by qmp_registry.c to call the corresponding marshalling/dispatchfunction and format return values/errors for delivery to the QMP.Currently only synchronous QMP functions are supported, but this will...
qapi: add ordereddict.py helper library
We need this to parse dictionaries with schema ordering intact so that Cprototypes can be generated deterministically.
qapi: add qapi.py helper libraries
qapi: add qapi-types.py code generator
This is the code generator for qapi types. It will generation thefollowing files:
$(prefix)qapi-types.h - C types corresponding to types defined in the schema you pass in $(prefix)qapi-types.c - Cleanup functions for the above C types...
qapi: add qapi-visit.py code generator
This is the code generator for qapi visiter functions used tomarshal/unmarshal/dealloc qapi types. It generates the following 2files:
$(prefix)qapi-visit.c: visiter function for a particular c type, used to automagically convert qobjects into the...
qapi: add qapi-commands.py code generator
This is the code generator for qapi command marshaling/dispatch.Currently only generators for synchronous qapi/qmp functions aresupported. This script generates the following files:
$(prefix)qmp-marshal.c: command marshal/dispatch functions for each...
qapi: test schema used for unit tests
This is how QMP commands/parameters/types would be defined. We use asubset of that functionality here to implement functions/types for unittesting.
qapi: add test-visitor, tests for gen. visitor code
qapi: add test-qmp-commands, tests for gen. marshalling/dispatch code
Introduce compiler.h header file
This moves compiler related macros from qemu-common.h to compiler.h.
The reason for this change is that there are simple header files thatdepend only on the compiler macros, so including qemu-common.h is overkill.
Besides, qemu-common.h is bloated and will benefit from some splitting....
Error: Fix build when qemu-common.h is not included
Commit e4ea5e2d0e0e4c5188ab45b66f3195062ae059dc added the use ofthe macro GCC_FMT_ATTR to error.h, however compiler.h is notincluded by error.h
This will cause a build error when files including error.h...
Add hard build dependency on glib
GLib is an extremely common library that has a portable thread implementationalong with tons of other goodies.
GLib and GObject have a fantastic amount of infrastructure we can leverage inQEMU including an object oriented programming infrastructure....
qlist: add qlist_first()/qlist_next()
qapi: add module init types for qapi
qapi: add QAPI visitor core
Base definitions/includes for Visiter interface used by generatedvisiter/marshalling code.
Includes a GenericList type. Our lists require an embedded element.Since these types are generated, if you want to use them in a different...
qapi: add QMP input visitor
A type of Visiter class that is used to walk a qobject'sstructure and assign each entry to the corresponding native C type.Command marshaling function will use this to pull out QMP commandparameters recieved over the wire and pass them as native arguments...
qapi: add QMP output visitor
Type of Visiter class that serves as the inverse of the input visitor:it takes a series of native C types and uses their values to construct acorresponding QObject. The command marshaling/dispatcher functions willuse this to convert the output of QMP functions into a QObject that can...
qapi: add QAPI dealloc visitor
Type of Visitor class that can be passed into a qapi-generated Ctype's visitor function to free() any heap-allocated data types.
QMP: add snapshot-blkdev-sync command
Add QMP bits for snapshot_blkdev command. This is the same assnapshot_blkdev in the human monitor. The command is synchronous.
In the future async commands and or a break down of the functionalityinto multiple commands might be added....
Update OpenBIOS images for Sparc32 and Sparc64
Update Sparc32 and Sparc64 OpenBIOS images to SVN revision 1045.
Fix unassigned memory access handling
cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memoryaccess handling. Fix them by always passing CPUState to the handlers.
Reported-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Avoid CPU endian memory accesses in devices
Don't compile virtio.c in hwlib, it depends on memory accessesperformed in CPU endianness.
Make loads and stores in CPU endianness unavailable to devicesand poison them to avoid further bugs.
Acked-by: Alexander Graf <agraf@suse.de>...
SPARC64: treat UA2007 ASI_BLK_* as translating ASIs.
UA2007 ASI_BLK_* should be added in is_translating_asi().
Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
checkpatch: Fix bracing false positives on #if
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,fix also #if.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg/mips: Fix regression caused by typo (copy + paste bug)
cppcheck reports an error:qemu/tcg/mips/tcg-target.c:1487: error: Invalid number of character (()
The unpatched code won't compile on mips hosts starting with commitcea5f9a28faa528b6b1b117c9ab2d8828f473fef....
ds1225y: convert to qdev device, and use it in MIPS Jazz emulation
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ds1225y: use trace framework
ds1225y: Remove protection stuff, which doesn't belong to this device
SPARC64: add missing break on fmovdcc
"break" is missing on V9 fmovdcc (%icc).
SPARC64: fix VIS1 SIMD signed compare instructions
The destination registers of SIMD signed compare instructions(fcmp*<16|32>) are not FP registers but general purpose r registers.Comparisons should be freg_rs1 CMP freg_rs2, that were reversed.
Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>...