Statistics
| Branch: | Revision:

root @ 9ce56db6

# Date Author Comment
49b586a9 06/22/2010 11:15 pm Bernhard M. Wiedemann

Extra scan codes for missing keys

The code comes from
http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02788.html

Without this patch it is not possible to send at least 10 special
characters (\|'"`~:;[]{}) via the monitor sendkey command.

Signed-off-by: Bernhard M. Wiedemann <>...

91ca60e0 06/22/2010 11:15 pm Michael Tokarev

give some useful error messages when tap open

In net/tap-linux.c, when manipulation of /dev/net/tun fails, it prints
(with fprintf) something like this:

warning: could not open /dev/net/tun: no virtual network emulation

this has 2 issues:
1) it is not a warning really, it's a fatal error (kvm exits after...

0db09dd2 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

Flush the debug message out to the log file.

This patch fluesh the debug messages to the log file at the end of each
debug message.

Changes from V1:
Used fflush instead fseek for the flush.

Signed-off-by: Venkateswararao Jujjuri <>...

fac4f111 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Rearrange fileop structures

This patch rearranges the fileop structures by moving the structure definitions
from virtio-9p.c to virtio-9p.h file. No functional changes.

Signed-off-by: Venkateswararao Jujjuri <>
Signed-off-by: Anthony Liguori <>

9ce56db6 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Introduces an option to specify the security model.

The new option is:

-fsdev fstype,id=myid,path=/share_path/,security_model=[mapped|passthrough]
-virtfs fstype,path=/share_path/,security_model=[mapped|passthrough],mnt_tag=tag

In the case of mapped security model, files are created with QEMU user...

f08145fe 06/22/2010 03:38 pm Kevin Wolf

block: Add bdrv_(p)write_sync

Add new functions that write and flush the written data to disk immediately.
This is what needs to be used for image format metadata to maintain integrity
for cache=... modes that don't use O_DSYNC. (Actually, we only need barriers,...

b0ad5a45 06/22/2010 03:38 pm Kevin Wolf

cow: Use bdrv_(p)write_sync for metadata writes

Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash.
While at it, correct the wrong usage of errno.

Signed-off-by: Kevin Wolf <>

5e5557d9 06/22/2010 03:38 pm Kevin Wolf

qcow: Use bdrv_(p)write_sync for metadata writes

Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash.

Signed-off-by: Kevin Wolf <>

8b3b7206 06/22/2010 03:38 pm Kevin Wolf

qcow2: Use bdrv_(p)write_sync for metadata writes

Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash.

Signed-off-by: Kevin Wolf <>

b8852e87 06/22/2010 03:38 pm Kevin Wolf

vmdk: Use bdrv_(p)write_sync for metadata writes

Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash.

Signed-off-by: Kevin Wolf <>

078a458e 06/22/2010 03:38 pm Kevin Wolf

vpc: Use bdrv_(p)write_sync for metadata writes

Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash.

Signed-off-by: Kevin Wolf <>

7d7d975c 06/22/2010 03:38 pm MORITA Kazutaka

qemu-io: check registered fds in command_loop()

Some block drivers use an aio handler and do I/O completion routines
in it. However, the handler is not invoked if we only do
aio_read/write, because registered fds are not checked at all.

This patch registers an aio handler of STDIO to checks whether we can...

20a81e4d 06/22/2010 03:38 pm Yoshiaki Tamura

virtio-blk: fix the list operation in virtio_blk_load().

Although it is really rare to get in to the while loop, the list
operation in the loop is obviously wrong.

Signed-off-by: Yoshiaki Tamura <>
Signed-off-by: Kevin Wolf <>

6882c8fa 06/22/2010 03:38 pm Kevin Wolf

qcow2: Fix qemu-img check segfault on corrupted images

With corrupted images, we can easily get an cluster index that exceeds the
array size of the temporary refcount table.

Signed-off-by: Kevin Wolf <>

f74550fd 06/22/2010 03:38 pm Kevin Wolf

qcow2: Don't try to check tables that couldn't be loaded

Trying to check them leads to a second error message which is more confusing
than helpful:

Can't get refcount for cluster 0: Invalid argument
ERROR cluster 0 refcount=-22 reference=1

Signed-off-by: Kevin Wolf <>

01bedeba 06/22/2010 03:38 pm Nicholas Bellinger

scsi-bus: Add PERSISTENT_RESERVE_OUT SCSIRequest->cmd.mode setup

This patch updates hw/scsi-bus.c to add the PERSISTENT_RESERVE_OUT cdb
case in scsi_req_xfer_mode() to set SCSI_XFER_TO_DEV for outgoing WRITE data.

Signed-off-by: Nicholas A. Bellinger <>...

c7126d5b 06/22/2010 03:38 pm Nicholas Bellinger

scsi-bus: Add MAINTENANCE_IN and MAINTENANCE_OUT SCSIRequest xfer and mode assignments

This patch updates hw/scsi-bus.c to add MAINTENANCE_IN and MAINTENANCE_OUT case in
scsi_req_length() for TYPE_ROM with MMC commands. It also adds the MAINTENANCE_OUT
case in scsi_req_xfer_mode() to set SCSI_XFER_TO_DEV for outgoing write data....

1e297c32 06/22/2010 03:38 pm Christoph Hellwig

block: fix physical_block_size calculation

Both SCSI and virtio expect the physical block size relative to the
logical block size. So get the factor first before calculating the
log2.

Reported-by: Mike Cao <>
Signed-off-by: Christoph Hellwig <>...

3b5276b5 06/22/2010 03:38 pm Eduardo Habkost

monitor: allow device to be ejected if no disk is inserted

This changes the monitor eject_device() function to not check for
bdrv_is_inserted().

Example run where the bug manifests itself:

(output of 'info block' is stripped to include only the CD-ROM device)...

cada87c4 06/20/2010 10:55 am Blue Swirl

Update OpenBIOS images

Update PPC, Sparc32 and Sparc64 OpenBIOS images to R795.

Signed-off-by: Blue Swirl <>

92a16d7a 06/19/2010 10:47 am Blue Swirl

apic: qdev conversion cleanup

Make APICState completely private to apic.c by using DeviceState
in external APIs.

Move apic_init() to pc.c.

Signed-off-by: Blue Swirl <>

8546b099 06/19/2010 10:44 am Blue Swirl

apic: convert to qdev

Convert to qdev.

Use an opaque CPUState pointer because of missing VMState
implementation for CPUState.

Signed-off-by: Blue Swirl <>

0e26b7b8 06/19/2010 10:42 am Blue Swirl

apic: avoid using CPUState internals

Move the actual CPUState contents handling to cpu.h and cpuid.c.

Handle CPU reset and set env->halted in pc.c.

Add a function to get the local APIC state of the current
CPU for the MMIO.

Signed-off-by: Blue Swirl <>

4a942cea 06/19/2010 10:42 am Blue Swirl

apic: avoid passing CPUState from CPU code

Pass only APICState when accessing APIC from CPU code.

Signed-off-by: Blue Swirl <>

cf6d64bf 06/19/2010 10:42 am Blue Swirl

apic: avoid passing CPUState from devices

Pass only APICState from pc.c.

Signed-off-by: Blue Swirl <>

96051119 06/19/2010 10:41 am Blue Swirl

ioapic: convert to qdev

Convert to qdev.

Signed-off-by: Blue Swirl <>

7d0500c4 06/17/2010 07:32 pm Blue Swirl

ioapic: unexport ioapic_set_irq

There's no need to use ioapic_set_irq() outside of ioapic.c, so
make it static.

Signed-off-by: Blue Swirl <>

0e1c9c54 06/16/2010 03:03 pm Paul Brook

GDB exit status for semihosting

Report exit status to GDB when a semihosted application exits.

Signed-off-by: Paul Brook <>

9e0b74a4 06/16/2010 03:03 pm Paul Brook

Strace mprotect flags.

Teach strace code about linux specific mprotect flags.

Signed-off-by: Paul Brook <>

97374d38 06/16/2010 03:03 pm Paul Brook

Usermode exec-stack fix

When loading a shared library that requires an executable stack,
glibc uses the mprotext PROT_GROWSDOWN flag to achieve this.
We don't support PROT_GROWSDOWN.
Add a special case to handle changing the stack permissions in this way....

1884533c 06/16/2010 02:46 pm Edgar E. Iglesias

cris: Move sign extension.

Move it in preparation for further changes.
No functional change.

Signed-off-by: Edgar E. Iglesias <>

7de141cb 06/16/2010 12:49 pm Edgar E. Iglesias

cris: Centralize fetching

Signed-off-by: Edgar E. Iglesias <>

2bece2c8 06/16/2010 12:29 pm Richard Henderson

tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts.

Some hosts (amd64, ia64) have an ABI that ignores the high bits
of the 64-bit register when passing 32-bit arguments. Others
require the value to be properly sign-extended for the type.
I.e. "int32_t" must be sign-extended and "uint32_t" must be...

a699a7be 06/16/2010 12:28 pm Edgar E. Iglesias

cris: Make the CRISv32 insn decoders return signed int.

Prepare to return error from the individual decoders.

Signed-off-by: Edgar E. Iglesias <>

d2c5efd8 06/16/2010 12:43 am Stefan Weil

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 <>
Cc: Anthony Liguori <>...

167e609a 06/15/2010 11:59 am Jan Kiszka

xen: Fix build error due to missing include

Signed-off-by: Jan Kiszka <>
Signed-off-by: Kevin Wolf <>

5ffbbc67 06/15/2010 10:42 am Blue Swirl

block: fix a warning and possible truncation

Fix a warning from OpenBSD gcc (3.3.5 (propolice)):
/src/qemu/block.c: In function `bdrv_info_stats_bs':
/src/qemu/block.c:1548: warning: long long int format, long unsigned
int arg (arg 6)

There may be also truncation effects....

122bb9e3 06/15/2010 10:41 am Christoph Hellwig

cow: use pread/pwrite

Use pread/pwrite instead of lseek + read/write in preparation of using the
qemu block API.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

893a9cb4 06/15/2010 10:41 am Christoph Hellwig

cow: stop using mmap

We don't have an equivalent to mmap in the qemu block API, so read and
write the bitmap directly. At least in the dumb implementation added
in this patch this is a lot less efficient, but it means cow can also
work on windows, and over nbd or curl. And it fixes qemu-iotests testcase...

2063392a 06/15/2010 10:41 am Christoph Hellwig

cow: use qemu block API

Use bdrv_pwrite to access the backing device instead of pread, and
convert the driver to implementing the bdrv_open method which gives
it an already opened BlockDriverState for the underlying device.

Signed-off-by: Christoph Hellwig <>...

abd7f68d 06/15/2010 10:41 am Markus Armbruster

block: Move error actions from DriveInfo to BlockDriverState

That's where they belong semantically (block device host part), even
though the actions are actually executed by guest device code.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

6ab4b5ab 06/15/2010 10:41 am Markus Armbruster

block: Decouple block device "commit all" from DriveInfo

do_commit() and mux_proc_byte() iterate over the list of drives
defined with drive_init(). This misses host block devices defined by
other means. Such means don't exist now, but will be introduced later...

ac59eb95 06/15/2010 10:41 am Markus Armbruster

monitor: Make "commit FOO" complain when FOO doesn't exist

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

2f399b0a 06/15/2010 10:41 am Markus Armbruster

block: New bdrv_next()

This is a more flexible alternative to bdrv_iterate().

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

dbc13590 06/15/2010 10:41 am Markus Armbruster

block: Decouple savevm from DriveInfo

We find snapshots by iterating over the list of drives defined with
drive_init(). This misses host block devices defined by other means.
Such means don't exist now, but will be introduced later in this
series.

Iterate over all host block devices instead, with bdrv_next()....

c9b62a7e 06/15/2010 10:41 am Markus Armbruster

blockdev: Give drives internal linkage

This is the list of drives defined with drive_init(). Hide it, so it
doesn't get abused.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

bb350a5e 06/15/2010 10:41 am Jes Sorensen

Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE

Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE in hw/fdc.c

Per https://bugs.launchpad.net/qemu/+bug/424453 the correct values
for FD_CMD_SAVE is 0x2e and FD_CMD_RESTORE is 0x4e. Verified against...

6c6ea921 06/15/2010 10:41 am Kevin Wolf

vpc: Read/write multiple sectors at once

This changes the vpc block driver (for VHD) to read/write multiple sectors at
once instead of doing a request for each single sector.

Before this, running qemu-iotests for VPC took ages, now it's actually quite
reasonable to run it always (down from ~1 hour to 40 seconds for me)....

018faafd 06/15/2010 10:41 am Kevin Wolf

qcow2: Allow get_refcount to return errors

get_refcount might need to load a refcount block from disk, so errors may
happen. Return the error code instead of assuming a refcount of 1 and change
the callers to respect error return values.

Signed-off-by: Kevin Wolf <>

2eaa8f63 06/15/2010 10:41 am Kevin Wolf

qcow2: Allow alloc_clusters_noref to return errors

Currently it would consider blocks for which get_refcount fails used. However,
it's unlikely that get_refcount would succeed for the next cluster, so it's not
really helpful. Return an error instead.

Signed-off-by: Kevin Wolf <>

e14e8ba5 06/15/2010 10:41 am Kevin Wolf

qcow2: Return real error code in load_refcount_block

This fixes load_refcount_block which completely ignored the return value of
write_refcount_block and always returned -EIO for bdrv_pwrite failure.

Signed-off-by: Kevin Wolf <>

feeee5ac 06/15/2010 10:41 am Miguel Di Ciurcio Filho

savevm: Really verify if a drive supports snapshots

Both bdrv_can_snapshot() and bdrv_has_snapshot() does not work as advertized.

First issue: Their names implies different porpouses, but they do the same thing
and have exactly the same code. Maybe copied and pasted and forgotten?...

dd5b0d71 06/15/2010 10:41 am Markus Armbruster

Fix regression for "-drive file="

Empty file used to create an empty drive (no media). Since commit
9dfd7c7a, it's an error: "qemu: could not open disk image : No such
file or directory". Older versions of libvirt can choke on this.

Signed-off-by: Markus Armbruster <>...

68dba0bf 06/15/2010 10:41 am Kevin Wolf

qcow2: Restore L1 entry on l2_allocate failure

If writing the L1 table to disk failed, we need to restore its old content in
memory to avoid inconsistencies.

Reported-by: Juan Quintela <>
Signed-off-by: Kevin Wolf <>

faa1f8dd 06/14/2010 11:46 pm Yoshiaki Tamura

migration: use qemu_free() instead of free().

Although there is no difference, other migration related code use
qemu_free(), and it should be better to be consistent.

Signed-off-by: Yoshiaki Tamura <>
Signed-off-by: Anthony Liguori <>

304e3a7c 06/14/2010 11:46 pm Yoshiaki Tamura

migration-tcp: call migrate_fd_error() instead of close() and free().

This patch fixes the following error report. When changing
migration-tcp.c to call migrate_fd_error() instead of close() and
free() by itself, monitor is resumed, and returns allocated mig_state...

55541c8a 06/14/2010 11:46 pm Paolo Bonzini

make qemu_thread_create block all signals

All signals will thus be routed through the IO thread.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

46aaebff 06/14/2010 11:46 pm Jes Sorensen

un-register kbd driver in case of USB kbd unplug.

If a USB keyboard is unplugged, the keyboard eventhandler is never
removed, and events will continue to be passed through to the device,
causing crashes or memory corruption.

Signed-off-by: Jes Sorensen <>...

7e608e89 06/14/2010 11:46 pm Christoph Hellwig

virtio-blk: stop tracking old_bs

There is a 1:1 relation between VirtIOBlock and BlockDriverState instances,
no need to track it because it won't change.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Anthony Liguori <>

c20fd872 06/14/2010 11:46 pm Christoph Hellwig

virtio-blk: simplify multiwrite calling conventions

Pass the MultiReqBuffer structure down all the way to the I/O submission
instead of takin it apart. Also mark num_writes unsigned as it can't
go negative, and take the check for any pending I/O requests into the...

3709c1b7 06/14/2010 11:46 pm Daniel P. Berrange

Clarify error message when a PCI slot is already in use (v2)

When mistakenly configuring two devices in the same PCI slot,
QEMU gives a not entirely obvious message about a 'devfn' being
in use:

$ qemu -device rtl8139 -device virtio-balloon-pci,bus=pci.0,addr=0x3...

1bb65042 06/14/2010 11:46 pm Markus Armbruster

qdev: Revert the hack to let -net nic and pci_add set qdev ID

Setting the ID in pci_nic_init() is a blatant violation of the
DeviceState abstraction. Which even carries a comment advising
against this:

/* This structure should not be accessed directly. We declare it here...

b560a9ab 06/14/2010 11:46 pm Markus Armbruster

qemu-option: Reject anti-social IDs

Restrict IDs to letters, digits, '-', '.', '_', starting with a
letter.

This takes care of '/' in qdev IDs breaking qbus_find().

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

4cf3e6f3 06/14/2010 11:46 pm Alex Williamson

acpi_piix4: save gpe and pci hotplug slot status

PCI hotplug currently doesn't work after a migration because
we don't migrate the enable bits of the GPE state. Pull hotplug
structs into vmstate.

Signed-off-by: Alex Williamson <>...

fd42deeb 06/14/2010 11:46 pm Gerd Hoffmann

Add exit notifiers.

Hook up any cleanup work which needs to be done here. Advantages over
using atexit(3):

(1) You get passed in a pointer to the notifier.  If you embed that
into your state struct you can use container_of() to get get your
state info....
f2fcffbb 06/14/2010 07:41 pm Edgar E. Iglesias

etrax-ser: Support the uart rx fifo.

Add support for the rx fifo to speed up bulk transfers.

Signed-off-by: Edgar E. Iglesias <>

bd69fe84 06/14/2010 07:12 pm Kevin Wolf

qemu-option: Fix uninitialized value in append_option_parameter

When dest is NULL, i.e. a new copy of the list is created, we don't get a
properly terminated list after the realloc. Initialize it as an empty list.

Signed-off-by: Kevin Wolf <>...

072c2c31 06/14/2010 07:12 pm Jan Kiszka

hpet: Init capability register only once

The capability register is read-only from guest POV, so we do not need
to update it on reset.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

40ac17cd 06/14/2010 07:12 pm Gleb Natapov

pass info about hpets to seabios.]

Currently HPET ACPI table is created regardless of whether qemu actually
created hpet device. This may confuse some guests that don't check that
hpet is functional before using it. Solve this by passing info about
hpets in qemu to seabios via fw config interface. Additional benefit is...

2ffcb18d 06/14/2010 07:12 pm Markus Armbruster

Make netdev_del delete the netdev even when it's in use

To hot-unplug guest and host part of a network device, you do:

device_del NIC-ID
netdev_del NETDEV-ID

For PCI devices, device_del merely tells ACPI to unplug the device.
The device goes away for real only after the guest processed the ACPI...

f471a17e 06/14/2010 07:12 pm Alex Williamson

ram_blocks: Convert to a QLIST

This makes the RAM block list easier to manipulate. Also incorporate
relevant variables into the RAMList struct.

Signed-off-by: Alex Williamson <>
Acked-by: Chris Wright <>
Signed-off-by: Anthony Liguori <>

ac7045cf 06/14/2010 06:58 pm Jes Sorensen

Remove unused DEBUG defines from hw/msix.c

Remove unused DEBUG defines from hw/msix.c to avoid having anything
define the word DEBUG without any additions such as MSIX_DEBUG.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

27124888 06/14/2010 06:58 pm Jes Sorensen

Change #define DEBUG to #define E1000_DEBUG in hw/e1000.c

Change #define DEBUG to #define E1000_DEBUG in hw/e1000.c to make
it possible to build QEMU with -DDEBUG

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

a4673e27 06/14/2010 06:33 pm Anthony Liguori

Merge remote branch 'kwolf/for-anthony' into staging

Conflicts:
hw/pc.c

a2da0395 06/14/2010 05:39 pm Anthony Liguori

Merge remote branch 'qmp/for-anthony' into staging

09564574 06/14/2010 01:37 am Paul Brook

OHCI address decoding fix

Ignore high address bits when PCI memory window is not mapped on a page
boundary.

Signed-off-by: Paul Brook <>

11165820 06/13/2010 09:00 pm Paul Brook

Move stdbool.h

Move inclusion of stdbool.h to common header files, instead of including
in an ad-hoc manner.

Signed-off-by: Paul Brook <>

ea4e78e5 06/13/2010 03:33 pm Jan Kiszka

monitor/QMP: Drop info hpet / query-hpet

This command was of minimal use before, now it is useless as the hpet
become a qdev device and is thus easily discoverable. We should
definitely not set query-hpet in QMP's stone, and there is also no good
reason to keep it for the interactive monitor....

cea1adfd 06/13/2010 03:33 pm Jan Kiszka

vmstate: Add VMSTATE_STRUCT_VARRAY_UINT8

Required for hpet.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

be4b44c5 06/13/2010 03:33 pm Jan Kiszka

hpet: Make number of timers configurable

One HPET block supports up to 32 timers. Allow to instantiate more than
the recommended and implemented minimum of 3. The number is configured
via the qdev property "timers". It is also saved/restored so that it
need not match between migration peers....

8caa0065 06/13/2010 03:33 pm Jan Kiszka

hpet: Add MSI support

This implements the HPET capability of routing IRQs to the front-side
bus, 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...

7d932dfd 06/13/2010 03:33 pm Jan Kiszka

hpet/rtc: Rework RTC IRQ replacement by HPET

Allow the intercept the RTC IRQ for the HPET legacy mode. Then push
routing to IRQ8 completely into the HPET. This allows to turn
hpet_in_legacy_mode() into a private function. Furthermore, this stops
the RTC from clearing IRQ8 even if the HPET is in control....

b7eaa6c7 06/13/2010 03:33 pm Jan Kiszka

hpet: Drop static state

Instead of keeping a static reference around, pass the state to
hpet_enabled and hpet_get_ticks. All callers now have it at hand. Will
once allow to instantiate the HPET more than a single time.

Signed-off-by: Jan Kiszka <>...

22a9fe38 06/13/2010 03:33 pm Jan Kiszka

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 <>
Signed-off-by: Blue Swirl <>

ad0a6551 06/13/2010 03:32 pm Jan Kiszka

hpet: Silence warning on write to running main counter

Setting the main counter while the HPET is enabled may not be a good
idea of the guest, but it is supported and should, thus, not spam the
host console with warnings.

Signed-off-by: Jan Kiszka <>...

7afbecc9 06/13/2010 03:32 pm Jan Kiszka

hpet: Move static timer field initialization

Properly initialize HPETTimer::tn and HPETTimer::state once during
hpet_init instead of (re-)writing them on every reset.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

822557eb 06/13/2010 03:32 pm Jan Kiszka

hpet: Convert to qdev

Register the HPET as a sysbus device and create it that way. As it can
route 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 vmstate
registration into its hands as well....

9cec89e8 06/13/2010 03:32 pm Jan Kiszka

hpet: Start/stop timer when HPET_TN_ENABLE is modified

We have to update the qemu timer when the per-timer enable bit is
toggled, just like for HPET_CFG_ENABLE changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

6982d664 06/13/2010 03:32 pm Jan Kiszka

hpet: Catch out-of-bounds timer access

Also prevent out-of-bounds write access to the timers but don't spam the
host console if it triggers.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

27bb0b2d 06/13/2010 03:32 pm Jan Kiszka

hpet: Coding style cleanups and some refactorings

This moves the private HPET structures into the C module, simplifies
some helper functions and fixes most coding style issues (biggest chunk
was improper switch-case indention). No functional changes.

Signed-off-by: Jan Kiszka <>...

c3d96978 06/13/2010 01:50 pm Jan Kiszka

configure: Fix evaluation of config-host.mak in create_config

Only match on true dir variable assignments, avoid generating garbage
due to the "# Configured with: ..." line which may contain "*dir=" as
well.

Signed-off-by: Jan Kiszka <>...

d66ed0ea 06/13/2010 01:28 pm Aurelien Jarno

tcg-s390: correctly detect s390 with a 64-bit kernel

Signed-off-by: Aurelien Jarno <>

b0cb640a 06/12/2010 08:49 am Blue Swirl

Compile OS specific files only once for all targets

OS specific files are not target dependent, so they can be compiled
once for all targets.

Signed-off-by: Blue Swirl <>

59a5264b 06/12/2010 08:49 am Jes Sorensen

Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c

Introduce OS specific cmdline argument handling by calling
os_parse_cmd_args() at the end of switch() statement. Move option
enum to qemu-options.h and have it included from os-posix.c and...

8847cfe8 06/12/2010 08:49 am Jes Sorensen

Move runas handling from vl.c to OS specific files.

Move code to handle runas, ie. change of user id of QEMU process
to OS specific files and provide dummy stub for Win32.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...

0766379d 06/12/2010 08:49 am Jes Sorensen

Move chroot handling to OS specific files.

Move chroot handling to OS specific files.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

eb505be1 06/12/2010 08:49 am Jes Sorensen

Move daemonize handling to OS specific files

Move daemonize handling from vl.c to OS specific files. Provide dummy
stubs for Win32.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>...

e06eb601 06/12/2010 08:49 am Jes Sorensen

Make os_change_process_uid and os_change_root os-posix.c local

os_change_process_uid() and os_change_root() are now only called
from os-posix.c, so no need to keep win32 stubs for them.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...

9156d763 06/12/2010 08:49 am Jes Sorensen

Move line-buffering setup to OS specific files.

Move line-buffering setup to OS specific files.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

ce798cf2 06/12/2010 08:49 am Jes Sorensen

Move set_proc_name() to OS specific files.

Move handling to change process name to POSIX specific files
plus add a better error message to cover the case where the
feature isn't supported.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...