summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tracetool: Add MAINTAINERS infoLluís Vilanova2012-04-181-0/+2
| | | | | | | | | Update the MAINTAINERS file to reflect the new Python tracetool code. [Commit description written by Stefan Hajnoczi] Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Add support for the 'dtrace' backendLluís Vilanova2012-04-185-2/+178
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Add support for the 'ust' backendLluís Vilanova2012-04-181-0/+90
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Add support for the 'simple' backendLluís Vilanova2012-04-181-0/+55
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Add support for the 'stderr' backendLluís Vilanova2012-04-181-0/+56
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Add module for the 'h' formatLluís Vilanova2012-04-181-0/+45
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Add module for the 'c' formatLluís Vilanova2012-04-181-0/+20
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tracetool: Rewrite infrastructure as python modulesLluís Vilanova2012-04-188-677/+592
| | | | | | | | | | | | | | | | | | | | | | | | | | The tracetool script is written in shell and has hit several portability problems due to shell quirks or external tools across host platforms. Additionally the amount of string processing and lack of real data structures makes it tough to implement code generator backends for tracers that are more complex. This patch replaces the shell version of tracetool with a Python version. The new tracetool design is: scripts/tracetool.py - top-level script scripts/tracetool/backend/ - tracer backends live here (simple, ust) scripts/tracetool/format/ - output formats live here (.c, .h) There is common code for trace-events definition parsing so that backends can focus on generating code rather than parsing input. Support for all existing backends (nop, stderr, simple, ust, and dtrace) is added back in follow-up patches. [Commit description written by Stefan Hajnoczi] Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Allow controlling volume with PulseAudio backendMarc-André Lureau2012-04-171-5/+94
| | | | | Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* configure: pa_simple is not needed anymoreMarc-André Lureau2012-04-171-3/+3
| | | | | Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* Do not use pa_simple PulseAudio APIMarc-André Lureau2012-04-171-38/+339
| | | | | | | | | | | | Unfortunately, pa_simple is a limited API which doesn't let us retrieve the associated pa_stream. It is needed to control the volume of the stream. In v4: - add missing braces Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio/spice: add support for volume controlMarc-André Lureau2012-04-171-0/+41
| | | | | | | Use Spice server volume control API when available. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* hw/ac97: add support for volume controlMarc-André Lureau2012-04-171-0/+81
| | | | | | | | | | | | Combine output volume with Master and PCM registers values. Use default values in mixer_reset (). Set volume on post-load to update backend values. v4,v5: - fix some code style Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* hw/ac97: the volume mask is not only 0x1fMarc-André Lureau2012-04-171-1/+0
| | | | | | | It's a case by case (see Table 66. AC ?97 Baseline Audio Register Map) Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* hw/ac97: remove USE_MIXER codeMarc-André Lureau2012-04-171-121/+0
| | | | | | | | That code doesn't compile. The interesting bits for volume control are going to be rewritten in the following patch. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: don't apply volume effect if backend has VOICE_VOLUME_CAPMarc-André Lureau2012-04-173-2/+14
| | | | | | | | | | If the audio backend is capable of volume control, don't apply software volume (mixeng_volume ()), but instead, rely on backend volume control. This will allow guest to have full range volume control. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: add VOICE_VOLUME ctlMarc-André Lureau2012-04-172-0/+13
| | | | | | | | | | | | Add a new PCM control operation to update the stream volume on the audio backend. The argument given is a SWVoiceOut/SWVoiceIn. v4: - verified other backends didn't fail/assert on this new control they randomly return 0 or -1, but we ignore return value. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* qemu-timer.c: Remove 250us timeoutsPeter Portante2012-04-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, the main wait loop calls qemu_run_all_timers() unconditionally. The first thing this routine used to do is to see if a timer had been serviced, and then reset the loop timeout to the next deadline. However, the new deadlines had not been calculated at that point, as qemu_run_timers() had not been called yet for each of the clocks. So qemu_rearm_alarm_timer() would end up with a negative or zero deadline, and default to setting a 250us timeout for the loop. As qemu_run_timers() is called for each clock, the real deadlines would be put in place, but because a loop timeout was already set, the loop timeout would not be changed. Once that 250us timeout fired, the real deadline would be used for the subsequent timeout. For idle VMs, this effectively doubles the number of times through the loop, doubling the number of select() system calls, timer calls, etc. putting added scheduling pressure on the kernel. And under cgroups, this really causes a big problem because the cgroup code does not scale well. By simply running the timers before trying to rearm the timer, we always rearm with a non-zero deadline, effectively halving the number of system calls. Signed-off-by: Peter Portante <pportant@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'kiszka/queues/pending' into stagingAnthony Liguori2012-04-167-47/+59
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * kiszka/queues/pending: vapic: Disable for pre-1.1 machines Kick io-thread on qemu_chr_accept_input pcnet: Properly handle TX requests during Link Fail pcnet: Clear ERR in CSR0 on stop signrom: Rewrite as python script Conflicts: hw/pc_piix.c Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * vapic: Disable for pre-1.1 machinesJan Kiszka2012-04-161-10/+33
| | | | | | | | | | | | | | The kvmvapic was not present in older QEMU versions, thus must be disabled in compat machines. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
| * Kick io-thread on qemu_chr_accept_inputJan Kiszka2012-04-161-0/+1
| | | | | | | | | | | | | | | | | | Once a chr frontend is able to receive input again, we need to inform the io-thread about this fact. Otherwise, main_loop_wait may continue to select without the related backend file descriptor in its set. This can cause high input latencies if only low-rate events arrive otherwise. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
| * pcnet: Properly handle TX requests during Link FailJan Kiszka2012-04-162-0/+12
| | | | | | | | | | | | | | | | As long as we have no link and we aren't in internal loopback mode, no packet must be sent. Instead, LCAR needs to be set in any active TX descriptor and also CERR in CSR0. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
| * pcnet: Clear ERR in CSR0 on stopJan Kiszka2012-04-161-1/+1
| | | | | | | | | | | | | | pcnet_stop already clears any reason (BABL, CERR, MISS, MERR) why ERR (bit 15) should be set in CRS0. So we have to clear that bit as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
| * signrom: Rewrite as python scriptJan Kiszka2012-04-163-46/+41
| | | | | | | | | | | | | | | | Now that we have a hard dependency on python anyway, we can replace the slow shell script to calculate the option ROM checksum with a fast AND portable python version. Tested both with python 2.7 and 3.1. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* | Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2012-04-168-299/+217
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mst/tags/for_anthony: pci: fix corrupted pci conf index register by unaligned write acpi: explicitly account for >1 device per slot acpi_piix4: Re-define PCI hotplug eject register read acpi_piix4: Remove PCI_RMV_BASE write code acpi_piix4: Fix PCI hotplug race acpi_piix4: Disallow write to up/down PCI hotplug registers virtio-pci: change virtio balloon PCI class code ivshmem: add missing msix calls vhost: readd assert statement vhost: Fix size of dirty log sync on resize pc: reduce duplication in compat machine types piix_pci: fix typo in i400FX chipset init code
| * | pci: fix corrupted pci conf index register by unaligned writeAvi Kivity2012-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d0ed8076cbdc261 converted the PCI config access to the memory API, but also inadvertantly changed it to accept unaligned writes, and corrupt the index register in the process. This causes a regression booting NetBSD. Fix by ignoring unaligned or non-dword writes. https://bugs.launchpad.net/qemu/+bug/897771 Reported-by: Andreas Gustafsson <gson@gson.org> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi: explicitly account for >1 device per slotMichael S. Tsirkin2012-04-151-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slot present bit is cleared apparently for each device. Hotplug and non hotplug devices should not mix normally, and we only set the bit when we add a device so it should all work out, but it's more robust to explicitly account for more than one device per slot. Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi_piix4: Re-define PCI hotplug eject register readAlex Williamson2012-04-152-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCI hotplug eject register has always returned 0, so let's redefine it as a hotplug feature register. The existing model of using separate up & down read-only registers and an eject via write to this register becomes the base implementation. As we make use of new interfaces we'll set bits here to allow the BIOS and AML implementation to optimize for the platform implementation. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi_piix4: Remove PCI_RMV_BASE write codeAlex Williamson2012-04-152-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | Clarify this register as read-only and remove write code. No change in existing behavior. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi_piix4: Fix PCI hotplug raceAlex Williamson2012-04-151-21/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Michael Tsirkin demonstrated, current PCI hotplug is vulnerable to a few races. The first is a race with other hotplug operations because we clear the up & down registers at each event. If a new event comes before the last is processed, up/down is cleared and the event is lost. To fix this for the down register, we create a life cycle for the event request that starts with the hot unplug request in piix4_device_hotplug() and ends when the device is ejected. This allows us to mask and clear individual bits, preserving them against races. For the up register, we have no clear end point for when the event is finished. We could modify the BIOS to acknowledge the bit and clear it, but this creates BIOS compatibiliy issues without offering a complete solution. Instead we note that gratuitous ACPI device checks are not harmful, which allows us to issue a device check for every slot. We know which slots are present and we know which slots are hotpluggable, so we can easily reduce this to a more manageable set for the guest. The other race Michael noted was that an unplug request followed by reset may also lose the eject notification, which may also result in the eject request being lost which a subsequent add or remove. Once we're in reset, the device is unused and we can flush the queue of device removals ourselves. Previously if a device_del was issued to a guest without ACPI PCI hotplug support, it was necessary to shutdown the guest to recover the device. With this, a guest reboot is sufficient. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi_piix4: Disallow write to up/down PCI hotplug registersAlex Williamson2012-04-152-32/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The write side of these registers is never used and actually can't be used as defined because any read/modify/write sequence from the guest potentially races with qemu. Drop the write support and define these as read-only registers. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | virtio-pci: change virtio balloon PCI class codeDavid Gibson2012-04-112-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the virtio balloon device, when using the virtio-pci interface advertises itself with PCI class code MEMORY_RAM. This is wrong; the balloon is vaguely related to memory, but is nothing like a PCI memory device in the meaning of the class code, and this code is not required or suggested by the virtio PCI specification. Worse, this patch causes problems on the pseries machine, because the firmware, seeing this class code, advertises the device as memory in the device tree, and then a guest kernel bug causes it to see this "memory" before the real system memory, leading to a crash in early boot. This patch fixes the problem by removing the bogus PCI class code on the balloon device. The backwards compatibility PC machines get new compat properties so that they don't change. Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | ivshmem: add missing msix callsMichael S. Tsirkin2012-04-111-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ivshmem used msix but didn't call it on either reset or config write paths. This used to partically work since guests don't use all of msi-x configuration fields, and reset is rarely used, but the patch 'msix: track function masked in pci device state' broke that. Fix by adding appropriate calls. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reported-by: Cam Macdonell <cam@cs.ualberta.ca> Tested-by: Cam Macdonell <cam@cs.ualberta.ca>
| * | vhost: readd assert statementMichael S. Tsirkin2012-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's clear from the surrounding code that start < end so it's enough to assert end < log_size. However, it's better to make this explicit in case we refactor the code again. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | vhost: Fix size of dirty log sync on resizeAlex Williamson2012-04-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the vhost log is resized, we want to sync up to the size of the old log. With that end address in place, ignore regions that start after then end rather than hitting assert. This also addresses the following crash report: When migrating a vm using vhost-net we hit the following assertion: qemu-kvm: /usr/src/packages/BUILD/qemu-kvm-0.15.1/hw/vhost.c:30: vhost_dev_sync_region: Assertion `start / (0x1000 * (8 * sizeof(vhost_log_chunk_t))) < dev->log_size' failed. The cases which the end < start check is intended to catch, such as for vga video memory, will also likely trigger the assertion. Reorder the code to handle this correctly. Reported-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Bruce Rogers <brogers@suse.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | pc: reduce duplication in compat machine typesMichael S. Tsirkin2012-04-111-215/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it easier to add compat properties, by adding macros for properties duplicated across machine types. Note: there could be bugs in compat properties, this patch does not attempt to address them, the code is bug for bug identical to the original. Tested by: generated a preprocessed file, sorted and compared to sorted original. Lightly tested on x86_64. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | piix_pci: fix typo in i400FX chipset init codeAlexey Korolev2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There is a typo in i440FX init code. This is causing problems when somebody wants to access the 64bit PCI range. Signed-off-by: Alexey Korolev <alexey.korolev@endace.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | | Merge remote-tracking branch 'sstabellini/for_anthony' into stagingAnthony Liguori2012-04-169-20/+171
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | * sstabellini/for_anthony: xen: introduce an event channel for buffered io event notifications xen-mapcache: don't unmap locked entry during mapcache invalidation Xen, mapcache: Fix the compute of the size of bucket. xen: handle backend deletion from xenstore Xen: Add xen-apic support and hook it up. Xen: basic HVM MSI injection support.
| * | xen: introduce an event channel for buffered io event notificationsStefano Stabellini2012-04-131-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the newly introduced HVM_PARAM_BUFIOREQ_EVTCHN to receive notifications for buffered io events. After the first notification is received leave the event channel masked and setup a timer to process the rest of the batch. Once we have completed processing the batch, unmask the event channel and delete the timer. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | xen-mapcache: don't unmap locked entry during mapcache invalidationJulien Grall2012-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an IOREQ_TYPE_INVALIDATE is sent to QEMU, it invalidates all entry of the map cache even if it's locked. QEMU is not able to know that entry was invalidated, so when an IO access is requested a segfault occured. Signed-off-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | Xen, mapcache: Fix the compute of the size of bucket.Anthony PERARD2012-04-131-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | Because the size of a mapping is wrong when there is an offset and a size >= bucket_size. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | xen: handle backend deletion from xenstoreStefano Stabellini2012-04-132-8/+13
| | | | | | | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | Xen: Add xen-apic support and hook it up.Wei Liu2012-04-133-1/+99
| | | | | | | | | | | | | | | | | | Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
| * | Xen: basic HVM MSI injection support.Wei Liu2012-04-133-0/+10
| | | | | | | | | | | | | | | Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | | Merge branch 'w64' of git://qemu.weilnetz.de/qemuBlue Swirl2012-04-1515-112/+152
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'w64' of git://qemu.weilnetz.de/qemu: w64: Fix time conversion for some versions of MinGW-w64 nbd: Fix compiler warning (w64) disas: Replace 'unsigned long' by 'uintptr_t' cpu-exec: Remove non-portable type cast and fix format string target-mips: Fix type cast for w64 (uintptr_t) w64: Fix type cast in os_host_main_loop_wait w64: Fix data types in softmmu*.h w64: Use uintptr_t in exec.c softmmu: Use uintptr_t for physaddr and rename it w64: Fix struct CPUTLBEntry w64: Fix definition of setjmp w32: Move defines for socket specific errors to qemu-os-win32.h w64: Use larger alignment for section with generated code w64: Fix data types in cpu-all.h, exec.c w64: Fix type casts used in some macros in cpu-all.h tcg/i386: Add support for w64 ABI tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
| * | | w64: Fix time conversion for some versions of MinGW-w64Stefan Weil2012-04-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tb.time is a time value, but not necessarily of the same size as time_t: while time_t is 64 bit for w64, tb.time still is 32 bit only. Therefore we need en explicit conversion. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | | nbd: Fix compiler warning (w64)Stefan Weil2012-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Portable printing of dev_offset (data type off_t) needs a type cast. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | | disas: Replace 'unsigned long' by 'uintptr_t'Stefan Weil2012-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is needed for w64. It changes nothing for other hosts. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | | cpu-exec: Remove non-portable type cast and fix format stringStefan Weil2012-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change is needed for w64, but also changes the code for other hosts. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | | target-mips: Fix type cast for w64 (uintptr_t)Stefan Weil2012-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This changes nothing for other hosts. Signed-off-by: Stefan Weil <sw@weilnetz.de>
OpenPOWER on IntegriCloud