summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* main-loop: For tools, initialize timers as part of qemu_init_main_loop()Michael Roth2012-02-014-2/+20
| | | | | | | | | | | | | | | | | | | | | | | In some cases initializing the alarm timers can lead to non-negligable overhead from programs that link against qemu-tool.o. At least, setting a max-resolution WinMM alarm timer via mm_start_timer() (the current default for Windows) can increase the "tick rate" on Windows OSs and affect frequency scaling, and in the case of tools that run in guest OSs such has qemu-ga, the impact can be fairly dramatic (+20%/20% user/sys time on a core 2 processor was observed from an idle Windows XP guest). This patch doesn't address the issue directly (not sure what a good solution would be for Windows, or what other situations it might be noticeable), but it at least limits the scope of the issue to programs that "opt-in" to using the main-loop.c functions by only enabling alarm timers when qemu_init_main_loop() is called, which is already required to make use of those facilities, so existing users shouldn't be affected. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* main-loop: Fix SetEvent() on uninitialized handle on win32Michael Roth2012-02-011-1/+4
| | | | | | | | | | | | | | | | | The __attribute__((constructor)) init_main_loop() automatically get called if qemu-tool.o is linked in. On win32, this leads to a qemu_notify_event() call which attempts to SetEvent() on a HANDLE that won't be initialized until qemu_init_main_loop() is manually called, breaking qemu-tools.o programs on Windows at runtime. This patch checks for an initialized event handle before attempting to set it, which is analoguous to how we deal with an unitialized io_thread_fd in the posix implementation. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* optionroms: Silence intermediate file removalJan Kiszka2012-02-011-0/+3
| | | | | | | | | The build process of optionroms spits out an "rm ..." line. Moreover, it removes all .o files that can be handy for debugging purposes. So disable automatic intermediate removal. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Limit sdl_grab_end in handle_activation to Windows hostsJan Kiszka2012-02-011-0/+4
| | | | | | | | | | | | | | There are scenarios on Linux with some SDL versions where handle_activation is continuous invoked with state = SDL_APPINPUTFOCUS and gain = 0 while we grabbed the input. This causes a ping-pong when we grab the input after an absolute mouse entered the window. As this sdl_grab_end was once introduced to work around a Windows-only issue (0294ffb9c8), limit it to that platform. CC: Erik Rull <erik.rull@rdsoftware.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Grab input on end of non-absolute mouse clickJan Kiszka2012-02-011-2/+1
| | | | | | | | | | | By grabbing the input already on button down, we leave the button in that state for the host GUI. Thus it takes another click after releasing the input again to synchronize the mouse button state. Avoid this by grabbing on button up. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "Handle SDL grabs failing (Mark McLoughlin)"Jan Kiszka2012-02-011-6/+3
| | | | | | | | | | | | | | | | This reverts commit 6bb816031f8bc0aafc3476e6dfa4293ee3a5f106. SDL_WM_GrabInput does not reliably bail out if grabbing is impossible. So if we get here, we already lost and will block. But this can no longer happen due to the check in sdl_grab_start. So this patch became obsolete. Conflicts: sdl.c Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Fix block prevention of SDL_WM_GrabInputJan Kiszka2012-02-011-12/+14
| | | | | | | | | Consistently check for SDL_APPINPUTFOCUS before trying to grab the input focus. Just checking for SDL_APPACTIVE doesn't work. Moving the check to sdl_grab_start allows for some consolidation. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Do not grab mouse on mode switch while in backgroundJan Kiszka2012-02-011-14/+16
| | | | | | | | | When the mouse mode changes to absolute while the SDL windows is not in focus, refrain from grabbing the input. It would steal from some other window. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Improve default machine options usabilityJan Kiszka2012-02-011-15/+2
| | | | | | | | | So far we overwrite the machine options completely with defaults if no accel=value is provided. More user friendly is to fill in only unspecified options. The new qemu_opts_set_defaults enables this. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* mc146818rtc: Use lost_tick_policy propertyJan Kiszka2012-02-013-13/+42
| | | | | | | | Allow to configure the MC146818 RTC via the new lost tick policy property and replace rtc_td_hack with this mechanism. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-option: Introduce default mechanismJan Kiszka2012-02-012-8/+52
| | | | | | | | | | | This adds qemu_opts_set_defaults, an interface provide default values for a QemuOpts set. Default options are parsed from a string and then prepended to the list of existing options, or they serve as the sole QemuOpts set. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: Introduce lost tick policy propertyJan Kiszka2012-02-013-0/+69
| | | | | | | | | | | | | | | | | | | | | Potentially tick-generating timer devices will gain a common property: lock_tick_policy. It allows to encode 4 different ways how to deal with tick events the guest did not process in time: discard - ignore lost ticks (e.g. if the guest compensates for them already) delay - replay all lost ticks in a row once the guest accepts them again merge - if multiple ticks are lost, all of them are merged into one which is replayed once the guest accepts it again slew - lost ticks are gradually replayed at a higher frequency than the original tick Not all timer device will need to support all modes. However, all need to accept the configuration via this common property. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Makefile: Remove linux-headers/asm symlink on distcleanPeter Maydell2012-02-011-0/+1
| | | | | | | | configure creates a linux-headers/asm symlink. Remove this when doing a distclean. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* exec.c: Clarify comment about tlb_flush() flush_global parameterPeter Maydell2012-02-011-2/+12
| | | | | | | | | | Clarify the comment about tlb_flush()'s flush_global parameter, so it is clearer what it does and why it is OK that the implementation currently ignores it. Reviewed-by: Andreas F=C3=A4rber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw/9pfs: Update MAINTAINERS fileAneesh Kumar K.V2012-02-011-2/+4
| | | | | | Acked-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* MAINTAINERS: Add a section for the host OS and a W32 maintainerStefan Weil2012-02-011-0/+20
| | | | | | | | | | | | | | | | | | | | | | | Up to now, there was no special section for the different host operating systems used with QEMU. scripts/get_maintainer.pl did not show a maintainer for OS specific files and patches. Therefore I added three hosts systems: * POSIX for the majority of host systems which are supported. This includes BSD and Linux host systems. * LINUX is a special case of POSIX needed for some Linux specific files and directories. * W32, W64 for a well known family of closed source operating systems. I also added myself as a maintainer for W32, W64. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ./configure: add link check for nss-smartcardSergei Trofimovich2012-02-011-4/+9
| | | | | | | | | | | | | | | | | | | | Current './configure --static && make' fails for me: LINK qemu-nbd /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lssl3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsmime3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnssutil3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnss3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lplds4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lplc4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnspr4 My system does not provide static libraries for nss, so fix autoconfiguration by link checking. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> CC: qemu-trivial <qemu-trivial@nongnu.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ./configure: request pkg-config to provide private libs when static linkingSergei Trofimovich2012-02-011-3/+8
| | | | | | | | | | Added wrapper around pkg-config to allow: - safe options injection via ${QEMU_PKG_CONFIG_FLAGS} - spaces in path to pkg-config Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> CC: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* m48t59: use rtc_clock for alarm timerPaolo Bonzini2012-01-301-2/+2
| | | | | | | | | | | This lets the RTC get adjustments from the host NTP client. The watchdog still uses the vm_clock. The previous behavior is available with "-rtc clock=vm". Cc: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* GRLIB UART: Add RX channelFabien Chouteau2012-01-302-17/+90
| | | | | | | | This patch implements the RX channel of GRLIB UART with a FIFO to improve data rate. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix off-by-one in dirty bitmap functionsAvi Kivity2012-01-291-4/+6
| | | | | | Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge branch 'target-arm.for-upstream' of ↵Blue Swirl2012-01-282-15/+73
|\ | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: Add Cortex-A15 CPU definition Add dummy implementation of generic timer cp15 registers arm: store the config_base_register during cpu_reset target-arm/helper.c: Don't assume softfloat int32 is 32 bits only target-arm: Fix implementation of TLB invalidate operations
| * Add Cortex-A15 CPU definitionPeter Maydell2012-01-252-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a definition of a Cortex-A15 CPU. Note that for the moment we do not implement any of: * Large Physical Address Extensions (LPAE) * Virtualization Extensions * Generic Timer * TrustZone (this is also true of our existing Cortex-A9 model, etc) This CPU model is sufficient to boot a Linux kernel which has been compiled for an A15 without LPAE enabled. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * Add dummy implementation of generic timer cp15 registersPeter Maydell2012-01-252-2/+11
| | | | | | | | | | | | | | | | | | | | Add a dummy implementation of the cp15 registers for the generic timer (found in the Cortex-A15), just sufficient for Linux to decide that it can't use it. This requires at least CNTP_CTL and CNTFRQ to be implemented as RAZ/WI; we RAZ/WI all of c14. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * arm: store the config_base_register during cpu_resetMark Langsdorf2012-01-251-0/+3
| | | | | | | | | | | | | | | | | | Long term, the config_base_register will be a QDM parameter. In the meantime, models that use it need to be able to preserve it across cpu_reset() calls. Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm/helper.c: Don't assume softfloat int32 is 32 bits onlyPeter Maydell2012-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In the helper routines for VCVT float-to-int conversions, add an explicit cast rather than relying on the softfloat int32 type being exactly 32 bits wide (which it is not guaranteed to be). Without this, if the softfloat type was 64 bits wide we would get zero-extension of the 32 bit value from the ARM register rather than sign-extension, since TCG i32 values are passed as uint32_t. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: Fix implementation of TLB invalidate operationsPeter Maydell2012-01-251-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some bugs in the implementation of the TLB invalidate operations on ARM: * the 'invalidate all' op was not passing flush_global=1 to tlb_flush(); this doesn't have a practical effect since tlb_flush() currently ignores that argument, but is semantically incorrect * 'invalidate by address for all ASIDs' was implemented as flushing the whole TLB, which invalidates much more than strictly necessary. Use tlb_flush_page() instead. We also annotate the ops with the ARM ARM official acronyms. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | unin_pci: Fix typos in device namesAndreas Färber2012-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | Commit 999e12bbe85c5dcf49bef13bce4f97399c7105f4 (sysbus: apic: ioapic: convert to QEMU Object Model) introduced two typos, one of which broke the mac99 machine. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qdev: change ambiguous qdev namesAnthony Liguori2012-01-274-4/+9
| | | | | | | | | | Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | virtio-s390: convert to QEMU Object ModelAnthony Liguori2012-01-271-28/+65
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | sysbus: apic: ioapic: convert to QEMU Object ModelAnthony Liguori2012-01-27131-1296/+2733
| | | | | | | | | | | | | | This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | pci: convert to QEMU Object ModelAnthony Liguori2012-01-2753-1050/+1599
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | unin_pci: Drop unused reset handlerAndreas Färber2012-01-271-7/+0
| | | | | | | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | unin_pci: Drop duplicate busdevAndreas Färber2012-01-271-9/+20
| | | | | | | | | | | | | | PCIHostState already has a busdev. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | unin_pci: Clean up qdev namesAndreas Färber2012-01-271-15/+39
| | | | | | | | | | | | | | | | Add -pcihost to SysBus devices to resolve name conflicts, and clarify PCI vs. Internal PCI. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | virtio-serial: convert to QEMU Object ModelAnthony Liguori2012-01-273-90/+128
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | spapr: convert to QEMU Object Model (v2)Anthony Liguori2012-01-275-71/+126
| | | | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - use QOM to check for the default console
* | scsi: convert to QEMU Object ModelAnthony Liguori2012-01-274-113/+201
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | ide: convert to QEMU Object ModelAnthony Liguori2012-01-272-49/+82
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | hda-codec: convert to QEMU Object ModelAnthony Liguori2012-01-273-44/+71
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | i2c: smbus: convert to QEMU Object ModelAnthony Liguori2012-01-2715-164/+331
| | | | | | | | | | | | | | This converts two types because smbus is implemented as a subclass of i2c. It's extremely difficult to convert these two independently. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | i2c: rename i2c_slave -> I2CSlaveAnthony Liguori2012-01-2715-86/+88
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | ssi: convert to QEMU Object ModelAnthony Liguori2012-01-2710-70/+150
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | ccid: convert to QEMU Object ModelAnthony Liguori2012-01-274-49/+109
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | usb: convert to QEMU Object ModelAnthony Liguori2012-01-2717-303/+528
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | isa: pic: convert to QEMU Object ModelAnthony Liguori2012-01-2728-192/+390
| | | | | | | | | | | | | | This converts two devices at once because PIC subclasses ISA and converting subclasses independently is extremely hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qdev: prepare source tree for code conversionAnthony Liguori2012-01-2715-312/+304
| | | | | | | | | | | | | | | | | | | | These are various small stylistic changes which help make things more consistent such that the automated conversion script can be simpler. It's not necessary to agree or disagree with these style changes because all of this code is going to be rewritten by the patch monkey script anyway. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qdev: add class_init to DeviceInfoAnthony Liguori2012-01-272-0/+9
| | | | | | | | | | | | | | | | | | | | Since we are still dynamically creating TypeInfo, we need to chain the class_init function in order to be able to make use of it within subclasses of TYPE_DEVICE. This will disappear once we register TypeInfos directly. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qdev: add a interface to register subclassesAnthony Liguori2012-01-272-2/+8
| | | | | | | | | | | | | | | | In order to introduce inheritance while still using the qdev registration interfaces, we need to be able to use a parent other than TYPE_DEVICE. Add a new interface that allows this. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qdev: use a wrapper to access reset and promote reset to a class methodAnthony Liguori2012-01-274-9/+27
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud