History | View | Annotate | Download (22.1 kB)
hpet: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
hpet: fix infinite loop in qemu_run_timers with -icount enabled
hpet_timer timer callback rearms itself based on difference betweencurrent HPET tick counter and comparator value. Difference calculated bythe hpet_calculate_diff function is limited to non-negative values....
Remove blanks before \n in output strings
Those blanks violate the coding conventions, seescripts/checkpatch.pl.
Blanks missing after colons in the changed lines were added.
This patch does not try to fix tabs, long lines and otherproblems in the changed lines, therefore checkpatch.pl reports...
hpet: use specific endian ld/st_phys
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
change all other clock references to use nanosecond resolution accessors
This was done with:
sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' )...
isa-bus: Remove bogus IRQ sharing check
Nothing prevented IRQ sharing on the ISA bus in principle. Not allboards supported this, neither each and every card nor driver and OS.Still, there existed valid IRQ sharing scenarios, (at least) two of themcan also be found in QEMU: >2 PC UARTs and the PREP IDE buses....
hpet: make optional
Ignore failure with hpet device creation.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
Fix comparison which always returned false
Comparing an 8 bit value with ~0 does not work as expected.Replace ~0 by UINT8_MAX in comparison and also in assignment(and fix coding style, too).
Cc: Gleb Natapov <gleb@redhat.com>Cc: Anthony Liguori <aliguori@us.ibm.com>...
hpet: Init capability register only once
The capability register is read-only from guest POV, so we do not needto update it on reset.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pass info about hpets to seabios.]
Currently HPET ACPI table is created regardless of whether qemu actuallycreated hpet device. This may confuse some guests that don't check thathpet is functional before using it. Solve this by passing info abouthpets in qemu to seabios via fw config interface. Additional benefit is...
hpet: Make number of timers configurable
One HPET block supports up to 32 timers. Allow to instantiate more thanthe recommended and implemented minimum of 3. The number is configuredvia the qdev property "timers". It is also saved/restored so that itneed not match between migration peers....
hpet: Add MSI support
This implements the HPET capability of routing IRQs to the front-sidebus, aka MSI support. This feature can be enabled via the qdev property"msi" and is off by default.
Note that switching it on can cause guests (at least Linux) to use the...
hpet/rtc: Rework RTC IRQ replacement by HPET
Allow the intercept the RTC IRQ for the HPET legacy mode. Then pushrouting to IRQ8 completely into the HPET. This allows to turnhpet_in_legacy_mode() into a private function. Furthermore, this stopsthe RTC from clearing IRQ8 even if the HPET is in control....
hpet: Drop static state
Instead of keeping a static reference around, pass the state tohpet_enabled and hpet_get_ticks. All callers now have it at hand. Willonce allow to instantiate the HPET more than a single time.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
hpet: Add support for level-triggered interrupts
By implementing this feature we can also remove a nasty way to kill qemu(by trying to enable level-triggered hpet interrupts).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hpet: Silence warning on write to running main counter
Setting the main counter while the HPET is enabled may not be a goodidea of the guest, but it is supported and should, thus, not spam thehost console with warnings.
hpet: Move static timer field initialization
Properly initialize HPETTimer::tn and HPETTimer::state once duringhpet_init instead of (re-)writing them on every reset.
hpet: Convert to qdev
Register the HPET as a sysbus device and create it that way. As it canroute its IRQs to any ISA IRQ, we need to connect it to all 24 of them.Once converted to qdev, we can move reset handler and vmstateregistration into its hands as well....
hpet: Start/stop timer when HPET_TN_ENABLE is modified
We have to update the qemu timer when the per-timer enable bit istoggled, just like for HPET_CFG_ENABLE changes.
hpet: Catch out-of-bounds timer access
Also prevent out-of-bounds write access to the timers but don't spam thehost console if it triggers.
hpet: Coding style cleanups and some refactorings
This moves the private HPET structures into the C module, simplifiessome helper functions and fixes most coding style issues (biggest chunkwas improper switch-case indention). No functional changes.
Do not use dprintf
dprintf is already claimed by POSIX1, and on at least one systemis implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Signed-off-by: malc <av1474@comtv.ru>
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializingdevices. Since we are already registering them, calling qemu_system_reset()should suffice. Actually, it is what happens when we reboot the machine,...
vmstate: remove const from pre_save() functions
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: add version_id argument to post_load
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
vmstate: port hpet device
hpet: it is imposible that qemu_timer field is NULL at this point
Make CPURead/WriteFunc structure 'const'
HPET fixes for reg writes
This patch addresses the problems found by Andriy Gapon:
- The code was incorrectly overwriting the high order 32 bits of the timer and hpet config registers. This didn't show up in testing because linux and windows use hpet in legacy mode,...
Reset HPET config register on hpet_reset
Without this, after system reset, hpet does not detect transition fromnon-legacy to legacy mode.
Signed-off-by: Beth Kon <eak@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update to a hopefully more future proof FSF address
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)
While Intel's spec is not that clear here, latest changes to Linux' HPETcode (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stopHPET_COUNTER when programming periodic mode") strongly suggest that...
hpet config mask fix
I discovered a bug in the hpet code that caused Windows to boot withouthpet. The config mask I was using was preventing the guest from placingthe hpet into 32 bit mode.
(Beth Kon)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6357 c046a42c-6fe2-441c-8c8c-71466251a162
Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplatein most GPL/LGPLed files, and also in COPYING.LIB.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Remove trailing spaces introduced by commit 6081
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6085 c046a42c-6fe2-441c-8c8c-71466251a162
Fix warnings introduced by commit 6081
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6084 c046a42c-6fe2-441c-8c8c-71466251a162
Add HPET emulation to qemu (Beth Kon)
This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpetprovides a more finely granular clocksource than otherwise available on PC.This means that latency-dependent applications (e.g. multimedia) will generally...