usb: the big rename
Reorganize usb source files. Create a new hw/usb/ directory and moveall usb source code to that place. Also make filenames a bit moredescriptive. Host adapters are prefixed with "hch-" now, usb deviceemulations are prefixed with "dev-". Fixup paths Makefile and include...
usb: zap hw/ush-{ohic,uhci}.h + init wrappers
Remove the uhci and ohci init wrappers, which all wrapped apci_create_simple() one-liner. Switch callsites to callpci_create_simple directly. Remove the header files wherethe wrappers where declared.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-ehci: drop unused isoch_pause variable
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-ohci: DMA writeback bug fixes
This patch fixes two bugs in the OHCI device where the device writesback data to system memory that should be exclusively under thecontrol of the guest side driver.
In OHCI specification Section 5.2.7, it mentioned "In all cases, Host...
usb: improve packet state sanity checks
Add a new function to check whenever the packet state is as expected,log more informations in case it isn't.
uhci: pass addr to uhci_async_alloc
Also do async->td initialization in uhci_async_alloc now.Prepares for adding tracepoints.
uhci: fix uhci_async_cancel_all
It should also free all queues.
uhci: cancel on schedule stop.
Cancel any in-flight transaction when the guest stops the uhci schedule.
uhci: tracing support
Zap DPRINTF, add tracepoints instead.
uhci: use enum for uhci_handle_td return codes
Step #1 (separate for better bisectability): replace numbers with names.
Merge remote-tracking branch 'mdroth/qga-pull-3-12-2012' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
Merge remote-tracking branch 'stefanha/tracing' into staging
Merge remote-tracking branch 'qmp/queue/qmp' into staging
qemu-ga: add guest-sync-delimited
guest-sync leaves it as an exercise to the user as to how to reliablyobtain the response to guest-sync if the client had previously read in apartial response (due qemu-ga previously being restarted mid-"sentence" due to reboot, forced restart, etc)....
qemu-ga: add guest-suspend-disk
As the command name implies, this command suspends the guest to disk.
The suspend operation is implemented by two functions: bios_supports_mode()and guest_suspend(). Both functions are generic enough to be used byother suspend modes (introduced by next commits)....
qemu-ga: add guest-suspend-ram
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qemu-ga: add guest-suspend-hybrid
qemu-ga: add win32 guest-suspend-disk command.
Implement guest-suspend-disk RPC for Windows. Functionally this should beequivalent to the posix implementation.
Signed-off-by: Gal Hammer <ghammer@redhat.com>
qemu-ga: add win32 guest-suspend-ram command
S3 sleep implementation for windows.
qemu-ga: add guest-network-get-interfaces command
This command returns an array of:
[ifname, hwaddr, [ipaddr, ipaddr_family, prefix] ]
for each interface in the system.Currently, only IPv4 and IPv6 are supported.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
initialize CPU model list after handling -readconfig options
To properly load cpudefs using -readconfig, we have to callcpudef_init() after finishing the command-line option handling.
Consequently, the handling of "-cpu ?" has to be done after thecommand-line option handling loop, too....
implement vnc_dpy_setdata
The comment is wrong, we have to do something in the setdata callback.Changing the framebuffer backing storage (happens when the guest pansthe display) renders the whole screen content invalid.
Trigger #1: cirrus vga + 32bit linux guest + vesafb with ypan enabled....
cpu-all.h: Don't accidentally sign extend in g2h()
Cast the argument of the g2h() macro to a target_ulong so thatit isn't accidentally sign-extended if it is a signed 32 bittype and long is a 64 bit type. In particular, this fixes abug where it would return the wrong value for 32 bit guests...
qdev: accept empty string properties
These were stored as NULL due to wrong cut-and-paste from set_pointer.
Reported-by: Gerhard Wiesinger <lists@wiesinger.com>Tested-by: Gerhard Wiesinger <lists@wiesinger.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qom: fix device hot-unplug
Property removal modifies the list, so it is not safe to continueiteration. We know anyway that each object can have only oneparent (see object_property_add_child), so exit after findingthe requested object.
Reported-by: Michael S. Tsirkin <mst@redhat.com>...
add "tsc-deadline" flag name to feature_ecx table
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
add SandyBridge CPU model
This patches add the definition of a SandyBridge CPU model.
Summary of differences:
Flags present on actual hardware, but not on the added model definition:
- pbe, tm, ht, ss, acpi, vme, xTPR, tm2, eist, smx: host-specific features, not exposed to guest....
add Opteron_G4 CPU model (v2)
This patch addes a Bulldozer-based Opteron_G4 CPU model.
This version has the ffxsr bit actually disabled, to match what wasdocumented below. Thanks to Andre Przywara for spotting the bug.
I am trying to be conservative with the new model, so I am enabling only...
test-coroutine: add performance test for nesting
The performance test will also check for nesting. It will doa certain quantity of cycles, and each of one will do a depthnesting process.
This is useful for benchmarking the creation of coroutines,given that nesting is creation-intensive (and the other perf...
qemu-iotests: Mark some tests as quick
This creates a new test group 'quick' for some test case that take atmost a couple of seconds each, so that the group can be run during aquick 'make check'
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
make check: Add qemu-iotests subset
Run the 'quick' group from qemu-iotests during 'make check'.
Add 'make check-block'
Runs the full qemu-iotests suite for various image formats.
use QSIMPLEQ_FOREACH_SAFE when freeing list elements
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qapi: complete implementation of unions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
rename blockdev-group-snapshot-sync
We will add other kinds of operation. Prepare for this by adjustingthe schema.
add mode field to blockdev-snapshot-sync transaction item
The mode field lets a management application create the snapshotdestination outside QEMU.
Right now, the only modes are "existing" and "absolute-paths". Mirroringintroduces "no-backing-file". In the future "relative-paths" could be...
qmp: convert blockdev-snapshot-sync to a wrapper around transactions
Simplify the blockdev-snapshot-sync code and gain failsafe operationby turning it into a wrapper around the new transaction command. A newoption is also added matching "mode".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qcow2: Factor out count_cow_clusters
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qcow2: Add qcow2_alloc_clusters_at()
This function allows to allocate clusters at a given offset in the imagefile. This is useful if you want to allocate the second part of an areathat must be contiguous.
qcow2: Reduce number of I/O requests
If the first part of a write request is allocated, but the second isn'tand it can be allocated so that the resulting area is contiguous, handleit at once. This is a common case for sequential writes.
After this patch, alloc_cluster_offset() only checks if the clusters are...
coroutine: adding sigaltstack method (.c source)
This file is based in both coroutine-ucontext.c andpth_mctx.c (from the GNU Portable Threads library).
The mechanism used to change stacks is the sigaltstackfunction (variant 2 of the pth library).
v2: Some corrections. Moving global variables into...
coroutine: adding configure choose mechanism for coroutine backend
Configure tries, as a default, ucontext functions for thecoroutines. But now the user can force another backend by--with-coroutine=BACKEND option
v2: Using --with-coroutine=BACKEND instead of enable...
coroutine: adding configure option for sigaltstack coroutine backend
It's possible to use sigaltstack backend with --with-coroutine=sigaltstack
v2: changed from enable/disable configure flags
Signed-off-by: Alex Barcelo <abarcelo@ac.upc.edu>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Group snapshot: Fix format name for backing file
qed: do not evict in-use L2 table cache entries
The L2 table cache reduces QED metadata reads that would be requiredwhen translating LBAs to offsets into the image file. Since requestsexecute in parallel it is possible to share an L2 table between multiple...
qcow2: Add some tracing
block: handle -EBUSY in bdrv_commit_all()
Monitor operations that manipulate image files must not execute while abackground job (like image streaming) is in progress. This preventscorruptions from happening when two pieces of code are manipulating the...
qcow2: Add error messages in qcow2_truncate
qemu-img resize has some limitations with qcow2, but the user is onlytold that "this image format does not support resize". Quite confusing,so add some more detailed error_report() calls and change "this image...
vga: add trace event for ppm_save
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
console: add some trace events
maintainers: Add docs/tracing.txt to Tracing
The topic of whether and by whom docs/tracing.txt is maintained wasbrought up. It currently does not have an official maintainer.
Add it to the tracing section so that Stefan gets cc'ed on patches.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
trace: Provide a per-event status define for conditional compilation
Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in"trace.h".
This lets the user conditionally compile code with a relatively high executioncost that is only necessary when producing the tracing information for an event...
tracetool: Omit useless QEMU_*_ENABLED() check
SystemTap provides a "semaphore" that can optionally be tested beforeexecuting a trace event. The purpose of this mechanism is to skipexpensive tracing code when the trace event is disabled.
For example, some applications may have trace events that format or...
trace: make trace_thread_create() use its function arg
This patch makes trace_thread_create() to use its function arg toinitialize thread. The other choice is to make this a function to usevoid arg, but i prefer this way.
Signed-off-by: Jun Koi <junkoi2004@gmail.com>...
docs: correct ./configure line in tracing.txt
This patch corrects the configure's trace option in docs/tracing.txt.
Signed-off-by: Jun Koi <junkoi2004@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Add missing const attributes for MemoryRegionOps
Most MemoryRegionOps already had the const attribute.This patch adds it to the remaining ones.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg: Improve tcg_out_label and fix its usage for w64
tcg_out_label is always called with a third argument of pointer typewhich was casted to tcg_target_long.
These casts can be avoided by changing the prototype of tcg_out_label.
There was also a cast to long. For most hosts with...
configure: Test for libiberty.a (mingw32)
MinGW-w64 and some versions of MinGW32 don't provide libiberty.a,so add this library only if it was found.
w64: Don't redefine lseek, ftruncate
MinGW-w64 already defines lseek and ftruncate (and uses the 64 bitvariants). The conditional compilation avoids redefinitions(which would be wrong) and compiler warnings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
cache-utils: Add missing include file for uintptr_t
Commit 021ecd8b9db37927059f5d3234b51ed766706437 breaks the build forPPC hosts because it uses uintptr_t without the necessary include file.
uintptr_t is defined in stdint.h, so add this include.
Cc: Alexander Graf <agraf@suse.de>...
build: Include config-host.mak as soon as possible
Current code depends on variables defined in config-host.mak before it isactually included.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>Cc: Anthony Liguori <aliguori@us.ibm.com>...
gdbstub: Do not kill target in system emulation mode
Too many VM kittens were killed since 7d03f82f81. Another one just diedunder my fat fingers.
When you quit a kgdb session, does the Linux kernel power off? Or whenyou terminate gdb attached to a hardware debugger, does your board...
target-i386: Mask NX bit from cpu_get_phys_page_debug result
This was a long pending bug, now revealed by the assert inphys_page_find that stumbled over the large page index returned bycpu_get_phys_page_debug for NX-marked pages: We need to mask out NX and...
qjson.h: include compiler.h for GCC_FMT_ATTR
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi-schema: fix typos and explain 'spice' auth
qapi-schema.json: fix comment for type ObjectPropretyInfo
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'kraxel/usb.42' into staging
xilinx_zynq: fix the build
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
libcacard: Fix compilation with gcc-4.7
VCARD_ATR_PREFIX is used as part of an array initializer so it shouldnot have () around it, so far this happened to work, but gcc-4.7 doesnot like it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
memory: get rid of cpu_register_io_memory()
The return value of cpu_register_io_memory() is no longer used anywhere, sowe can remove it and all associated data and code.
Signed-off-by: Avi Kivity <avi@redhat.com>
memory: dispatch directly via MemoryRegion
Instead of indirecting via io_mem_region, dispatch directlythrough the MemoryRegion obtained from the iotlb or phys_page_find().
exec: fix code tlb entry misused as iotlb in get_page_addr_code()
get_page_addr_code() reads a code tlb entry, but interprets it as aniotlb entry. This works by accident since the low bits of a RAM codetlb entry are clear, and match a RAM iotlb entry. This accident is...
osdep: Remove local definition of macro offsetof
The macro offsetof is defined in stddef.h. It is conforming tothe standards C89, C99 and POSIX.1-2001 (see man page), so itis a sufficiently old standard.
Therefore chances are very high that QEMU never needs a local...
configure: Quote the configure args printed in config.log
Use the same mechanism we use for printing the configure commandline to config-host.mak to print it to config.log. This fixes abug where the config.log version didn't quote arguments with spaces....
libcacard: Use format specifier %u instead of %d for unsigned values
splint reported warnings for those code statements.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
vnc: Add break statement
This was not a bug, but it is not common practice to omit the break statementfrom the last case statement before an empty default case.
Any change of the default case would introduce a bug.
This was reported as a warning by splint....
Spelling fixes in comments (it's -> its)
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Stefan Weil <sw@weilnetz.de>...
libcacard: Spelling and grammar fixes in documentation
v2:Also replace 'aid' by 'AID' (thanks to Peter Maydell for this hint)....
memory: store section indices in iotlb instead of io indices
A step towards eliminating io indices.
memory: make phys_page_find() return an unadjusted section
We'd like to store the section index in the iotlb, so we can'tadjust it before returning. Return an unadjusted section andinstead introduce section_addr(), which does the adjustment later.
qom: Fix spelling in documentation
This fixes a new spelling issue which was detected by codespell.
qmp: Fix spelling fourty -> forty
This was found by codespell.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
block/vmdk: Fix warning from splint (comparision of unsigned value)
l1_entry_sectors will never be less than 0.
Fix sign of sscanf format specifiers
All values read by sscanf are unsigned, so replace %d by %u.
This signed / unsigned mismatch was detected by splint.
sh7750: Remove redundant 'struct' from MemoryRegionOps
The 'struct' is not needed, and all other MemoryRegionOps don't use it.
usb: queue can have async packets
This can happen today in case the ->complete() callback queues up thenext packet. Also we'll support pipelining soon, which allows to havemultiple packets per queue in flight (aka ASYNC) state.
usb: add pipelining option to usb endpoints
With this patch applied USB drivers can enable pipelining per endpoint.With pipelining enabled the usb core will continue submitting packetseven when there are still async transfers in flight instead of passing...
usb-host: enable pipelineing for bulk endpoints.
We really don't want to wait for packets finish before submitting thenext, we want keep the data flow running.
usb: add shortcut for control transfers
Add a more direct code path to submit control transfers. Instead offeeding three usb packets (setup, data, ack) to usb_handle_packet andhave the do_token_* functions in usb.c poke the control transferparameters out of it just submit a single packet carrying the actual...
xhci: fix control xfers
Use the new, direct control transfer submission method instead ofbypassing the usb core by calling usb_device_handle_control directly.The later fails for async control transfers.
This patch gets xhci + usb-host combo going.
xhci: fix port status
Don't signal port status change if the usb device isn't in attachedstate. Happens with usb-host devices with the pass-through devicebeing plugged out at the host.
usb-ehci: Fix and simplify nakcnt handling
The nakcnt code in ehci_execute_complete() marked transactions as finishedwhen a packet completed with a result of USB_RET_NAK, but USB_RET_NAKmeans that the device cannot receive / send data at that time and that...
usb-ehci: Cleanup itd error handling
All error statuses except for NAK are handled in a switch case, move thehandling of NAK into the same switch case.
usb: return BABBLE rather then NAK when we receive too much data
usb: add USB_RET_IOERROR
We already have USB_RET_NAK, but that means that a device does not wantto send/receive right now. But with host / network redirection we canactually have a transaction fail due to some io error, rather then iethe device just not having any data atm....
uhci_fill_queue: zap debug printf