Statistics
| Branch: | Revision:

root / hw @ c48c6522

# Date Author Comment
9b574c29 06/19/2012 04:24 pm Andreas Färber

arm_boot: Fix typos in comment

mimicing -> mimicking
thei -> the

Signed-off-by: Andreas Färber <>
Reviewed-by: Stefan Weil <>
Signed-off-by: Peter Maydell <>

acd68428 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Remove NVIC ifdefs from gic_state struct

Remove some NVIC ifdefs from the gic_state struct and its
state save/load functions. This means there are some fields
in it which are present for the NVIC but not used, but means
it always has the same layout and can be pulled out into a...

c48c6522 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Remove the special casing of NCPU for the NVIC

Drop the special casing of NCPU=1 for the NVIC. This slightly
increases the amount of memory used by its state structure,
but removes some ifdeffery and means we can safely move the
GIC state into a common subclass structure....

61558e7a 06/19/2012 03:49 pm Evgeny Voevodin

ARM: Exynos4210 IRQ: Introduce new IRQ gate functionality.

New IRQ gate consists of n_in input qdev gpio lines and one
output sysbus IRQ line. The output IRQ level is formed as OR
between all gpio inputs.

Signed-off-by: Evgeny Voevodin <>...

8aca5215 06/18/2012 06:35 pm Anthony Liguori

Merge remote-tracking branch 'afaerber-or/qom-next-2' into staging

  • afaerber-or/qom-next-2: (22 commits)
    qom: Push error reporting to object_property_find()
    qdev: Remove qdev_prop_exists()
    qbus: Initialize in standard way
    qbus: Make child devices links...
664535c3 06/18/2012 06:35 pm Anthony Liguori

Merge remote-tracking branch 'qmp/queue/qmp' into staging

  • qmp/queue/qmp:
    build: install qmp-commands.txt
    Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events
    Add event notification for guest balloon changes
    Fix some more license versions (GPL2+ instead of GPL2)...
0b0cb9d3 06/18/2012 06:34 pm Anthony Liguori

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

  • kwolf/for-anthony: (39 commits)
    qemu-iotests: add 036 autoclear feature bit test
    qemu-iotests: add qcow2.py set-feature-bit command
    fdc-test: introduced qtest read_without_media
    fdc: fix implied seek while there is no media in drive...
df6606f4 06/18/2012 06:18 pm Anthony Liguori

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

  • mst/tags/for_anthony:
    pci_bridge_dev: fix error path in pci_bridge_dev_initfn()
    qdev: release parent properties on dc->init failure
    msi: Use msi/msix_present more consistently
    msi: Invoke msi/msix_write_config from PCI core...
fdae245f 06/18/2012 04:14 pm Paolo Bonzini

qdev: Remove qdev_prop_set_defaults

Instead, qdev_property_add_static can set the default.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Andreas Färber <>

09e5ab63 06/18/2012 04:14 pm Anthony Liguori

qdev: Use wrapper for qdev_get_path

This makes it easier to remove it from BusInfo.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
[AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()]...

8185d216 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move SysBus initialization to sysbus.c

TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing references
to main_system_bus and system_bus_info there.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

0d936928 06/18/2012 04:14 pm Anthony Liguori

qdev: Convert busses to QEMU Object Model

This is far less interesting than it sounds. We simply add an Object to each
BusState and then register the types appropriately. Most of the interesting
refactoring will follow in the next patches.

Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...

f968fc68 06/18/2012 04:14 pm Anthony Liguori

qdev: Connect busses with their parent devices

This makes SysBus part of the root hierarchy and all busses children of
their respective parent DeviceState.

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

0866aca1 06/18/2012 04:14 pm Anthony Liguori

qbus: Make child devices links

Make qbus children show up as link<> properties. There is no stable
addressing for qbus children so we use an unstable naming convention.

This is okay in QOM though because the composition name is expected to
be what's stable....

ac7d1ba6 06/18/2012 04:14 pm Anthony Liguori

qbus: Initialize in standard way

Move code to an initfn and finalizer.
Replace do_qbus_create_inplace() with qbus_realize().

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

8cb6789a 06/18/2012 04:14 pm Paolo Bonzini

qdev: Remove qdev_prop_exists()

Can be replaced everywhere with object_property_find().

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

89bfe000 06/18/2012 04:14 pm Paolo Bonzini

qom: Push error reporting to object_property_find()

Avoids duplicated error_set().

Signed-off-by: Paolo Bonzini <>
[AF: Also drop error_set() in object_property_del().]
Signed-off-by: Andreas Färber <>

7bc3018b 06/18/2012 04:14 pm Paolo Bonzini

m48t59: Rename "type" property to "model"

This resolves a name conflict with the qdev "type" property that is
about to move into Object.

Signed-off-by: Paolo Bonzini <>
[AF: Add braces missing in original code.]
Signed-off-by: Andreas Färber <>

edc92115 06/18/2012 04:14 pm Andreas Färber

arm_l2x0: Rename "type" property to "cache-type"

Resolves a name conflict with the qdev "type" property that is about to
be moved to Object.

Signed-off-by: Andreas Färber <>
Acked-by: Mark Langsdorf <>

2f262e06 06/18/2012 04:14 pm Paolo Bonzini

qdev: Push "type" property up to Object

Now that Object is a type, add an instance_init function and push
the "type" property from qdev to there.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

3cb75a7c 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move bus properties to a separate global

Simple code movement in order to simplify future refactoring.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

bce54474 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move bus properties to abstract superclasses

In qdev, each bus in practice identified an abstract superclass, but
this was mostly hidden. In QOM, instead, these abstract classes are
explicit so we can move bus properties there.

All bus property walks are removed, and all device property walks...

4b3582b0 06/18/2012 04:14 pm Paolo Bonzini

qdev: Clean up global properties

Now that global properties do not depend on buses anymore, set
them directly in the device instance_init function.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

973603a8 06/15/2012 07:34 pm Daniel P. Berrange

Add event notification for guest balloon changes

After setting a balloon target value, applications have to
continually poll 'query-balloon' to determine whether the
guest has reacted to this request. The virtio-balloon backend
knows exactly when the guest has reacted though, and thus it...

137745c5 06/15/2012 03:03 pm Markus Armbruster

scsi-disk: Don't peek behind the BlockDriverState abstraction

Use the appropriate interface instead.

Signed-off-by: Markus Armbruster <>
Acked-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

7cdd481c 06/15/2012 03:03 pm Paolo Bonzini

ide: support enable/disable write cache

Enabling or disabling the write cache is done with the SET FEATURES
command. The command can be issued with sg_sat_set_features from
sg3-utils.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

8814a051 06/15/2012 03:03 pm Markus Armbruster

xen: Don't change -drive if=xen device name during machine init

A "top" BlockDriverState has a non-empty device_name. If the user
doesn't specify one with -drive parameter id, the system supplies a
default name.

xen_config_dev_blk() changes this name, during machine initialization....

093003b1 06/15/2012 03:03 pm Markus Armbruster

xen: Don't peek behind the BlockDriverState abstraction

First offender is xen_config_dev_blk()'s use of disk->bdrv->filename.
Get the filename from disk->opts instead. Same result, except for
snapshots: there, we now get the filename specified by the user...

c52acf60 06/15/2012 03:03 pm Pavel Hrdina

fdc: fix implied seek while there is no media in drive

The Windows uses 'READ' command at the start of an instalation
without checking the 'dir' register. We have to abort the transfer
with an abnormal termination if there is no media in the drive.

Signed-off-by: Pavel Hrdina <>...

8aab031f 06/15/2012 03:03 pm Max Filippov

xtensa_lx60: add missing #include "blockdev.h"

This should fix the following build failure:

/home/buildbot/slave-public/block_mingw32/build/hw/xtensa_lx60.c: In function 'lx_init':
/home/buildbot/slave-public/block_mingw32/build/hw/xtensa_lx60.c:212: warning: implicit declaration of function 'drive_get'...

dfc65f1f 06/15/2012 03:03 pm Markus Armbruster

Un-inline fdctrl_init_isa()

Signed-off-by: Markus Armbruster <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Kevin Wolf <>

d85ba787 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_axidma: (un)reversed irq initialisation

The axidma irq orders are reversed in both the device model and the instantion.
Undid both reversal (for no net change). Also needs to be reversed for
consistency with Xilinx tools IRQ listing.

Signed-off-by: Peter A. G. Crosthwaite <>...

23d6055e 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_uartlite: changed device name

Changed device name to xlnx,xps-uartlite. This is the exact name of the device
in the xilinx EDK development tools.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

8d4eb373 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_timer: added default frequency

Added a reasonable default frequency for the xilinx timer (the 62MHz from
s3adsp machine model).

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

abe098e4 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_timer: changed nr_timers to one_timer_only

The configurable property for this IP in the Xilinx tools is a boolean switch
"one-timer-only" that flicks this timer from being dual channel to single.
Updated QEMU to work the same way for better match with the IP core and its TRM....

a61e4b07 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_timer: changed device name

Changed device name to xlnx,xps-timer. This is the exact name of the device
in the xilinx EDK development tools.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

24739ab4 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_intc: changed device name

Changed device name to xlnx,xps-intc. This is the exact name of the device
in the xilinx EDK development tools.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

b2d85c34 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_ethlite: tweaked naming of ping-pong props

Changed "txpingpong" prop to "tx-ping-pong". Same for rx. This is done to
make the property name exactly match what is output by the xilinx tools for
this IP.

Signed-off-by: Peter A. G. Crosthwaite <>...

7f4d6755 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_ethlite: changed device name

Changed device name to xlnx,xps-ethernetlite. This is the exact name of the
device in the xilinx EDK development tools.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

ab034c26 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_axienet: droped the c_ on parameters

Even though the xilinx tools do have C_ on all params by default, drop this
for consistency with all the other xilinx IP (I.E. param names are the xilinx
names without the C_ prefix)

Signed-off-by: Peter A. G. Crosthwaite <>...

cec6f8ca 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_axienet: changed device name

Changed device name to xlnx,axi-ethernet. This is the exact name of the
device in the xilinx EDK development tools.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

da9fa17e 06/15/2012 02:08 pm Peter A. G. Crosthwaite

xilinx_axidma: changed device name

Changed device name to xlnx,axi-dma. This is the exact name of the device in the
Xilinx EDK development tools.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

07f9fd48 06/15/2012 01:44 pm Andreas Färber

xilinx_axi*: Share devices between microblaze and microblazeel

Speeds up the build.

Signed-off-by: Andreas Färber <>
Signed-off-by: Edgar E. Iglesias <>

9bbfbb61 06/15/2012 01:44 pm Andreas Färber

hw/xilinx_*: Share Xilinx devices between ppc and microblaze

Speeds up the build.

xilinx_ethlite uses tswap32() and is thus target-dependent.

Signed-off-by: Andreas Färber <>
Signed-off-by: Edgar E. Iglesias <>

266ca11a 06/11/2012 10:55 pm Jason Baron

qdev: release parent properties on dc->init failure

While looking into hot-plugging bridges, I can create a qemu segfault via:

$ device_add pci-bridge

Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. **
ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)...

80aa796b 06/11/2012 10:55 pm Jason Baron

pci_bridge_dev: fix error path in pci_bridge_dev_initfn()

Currently, we do not properly cleanup, if pci_bridge_dev_initfn
fails to initialize properly. Make sure to call pci_bridge_exitfn()
in the error path.

Signed-off-by: Jason Baron <>...

7677e24f 06/11/2012 08:15 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

  • qemu-kvm/uq/master:
    kvm: i8254: Fix conversion of in-kernel to userspace state
    kvm/apic: correct short memset
df332191 06/11/2012 08:15 pm Anthony Liguori

Merge remote-tracking branch 'afaerber-or/qom-next-1' into staging

  • afaerber-or/qom-next-1:
    target-i386: Use uint32 visitor for [x]level properties
    qdev: Remove PropertyInfo range checking
    qdev: Switch property accessors to fixed-width visitor interfaces...
e4d40816 06/11/2012 08:15 pm Anthony Liguori

Merge remote-tracking branch 'afaerber-or/qom-cpu-3a' into staging

  • afaerber-or/qom-cpu-3a: (27 commits)
    target-s390x: Pass S390CPU to s390_cpu_restart()
    s390-virtio: Let s390_cpu_addr2state() return S390CPU
    s390-virtio: Use cpu_s390x_init() to obtain S390CPU...
248bfdc9 06/11/2012 08:15 pm Anthony Liguori

Merge remote-tracking branch 'sstabellini/for_1.1.1' into staging

  • sstabellini/for_1.1.1:
    qemu/xendisk: set maximum number of grants to be used
39cde845 06/11/2012 08:07 pm Anthony Liguori

Merge remote-tracking branch 'kraxel/usb.52' into staging

  • kraxel/usb.52: (37 commits)
    ehci: rework frame skipping
    ehci: adaptive wakeup rate.
    ehci: create ehci_update_frindex
    ehci: remove unused attach_poll_counter
    ehci: fix halt status handling...
0cdd3d14 06/11/2012 02:18 pm Jan Kiszka

kvm: i8254: Fix conversion of in-kernel to userspace state

Due to a offset between the clock used to generate the in-kernel
count_load_time (CLOCK_MONOTONIC) and the clock used for processing this
in userspace (vm_clock), reading back the output of PIT channel 2 via...

64c27e5b 06/11/2012 01:06 pm Jan Beulich

qemu/xendisk: set maximum number of grants to be used

Legacy (non-pvops) gntdev drivers may require this to be done when the
number of grants intended to be used simultaneously exceeds a certain
driver specific default limit.

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

0614cb82 06/11/2012 12:57 pm Jim Meyering

kvm/apic: correct short memset

kvm_put_apic_state's attempt to clear kapic before setting its
bits cleared sizeof(void
) bytes (no more than 8) rather than the
intended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity.

Signed-off-by: Jim Meyering <>...

393a9eab 06/11/2012 01:23 am Andreas Färber

integratorcp: Use cpu_arm_init() to obtain ARMCPU

Needed for arm_load_kernel().

Add missing braces.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

f25608e9 06/11/2012 01:23 am Andreas Färber

musicpal: Use cpu_arm_init() to obtain ARMCPU

Needed for arm_load_kernel().

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

20e93374 06/11/2012 01:23 am Andreas Färber

versatilepb: Use cpu_arm_init() to obtain ARMCPU

Needed for arm_load_kernel().

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

9543b0cd 06/11/2012 01:23 am Andreas Färber

arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot()

Adapt exynos4210 and highbank accordingly.
The parameter itself is unused.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>
Acked-by: Igor Mitsyanko <> (for exynos)

5d309320 06/11/2012 01:23 am Andreas Färber

arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook()

Adapt highbank accordingly.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

9077f01b 06/11/2012 01:23 am Andreas Färber

realview: Use cpu_arm_init() to obtain ARMCPU

Needed for arm_pic_init_cpu().

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

64c9e297 06/11/2012 01:23 am Andreas Färber

vexpress: Use cpu_arm_init() to obtain ARMCPU

Needed for arm_pic_init_cpu().

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

ef6cbcc5 06/11/2012 01:23 am Andreas Färber

exynos4210: Use cpu_arm_init() to store ARMCPU

Needed for arm_pic_init_cpu().

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>
Acked-by: Igor Mitsyanko <>

f161bcd0 06/11/2012 01:23 am Andreas Färber

pxa2xx: Pass ARMCPU to pxa2xx_pic_init()

Cleans up after storing ARMCPU in PXA2xxState.
Prepares for storing ARMCPU in PXA2xxPICState.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

e9d872cf 06/11/2012 01:23 am Andreas Färber

pxa2xx_pic: Store ARMCPU in PXA2xxPICState

Prepares for moving halted field to CPUState.

Add missing braces.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

95d42bb5 06/11/2012 01:23 am Andreas Färber

pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfo

Prepares for moving halted field into CPUState.

Add missing braces.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

17c2f0bf 06/11/2012 01:23 am Andreas Färber

xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU

Needed for arm_load_kernel().

Signed-off-by: Andreas Färber <>
Acked-by: Peter A.G. Crosthwaite <>

3aaa8dfa 06/11/2012 01:23 am Andreas Färber

arm_boot: Pass ARMCPU to arm_load_kernel()

In particular this simplifies the &s->mpu->cpu->env expression again.

first_cpu and ->next_cpu are expected to be QOM'ified later.

Signed-off-by: Andreas Färber <>
Acked-by: Igor Mitsyanko <> (for exynos)...

4bd74661 06/11/2012 01:23 am Andreas Färber

arm_pic: Pass ARMCPU to arm_pic_init_cpu()

Pass it through to arm_pic_cpu_handler().

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>
Acked-by: Igor Mitsyanko <> (for exynos)

a0595d9e 06/11/2012 01:23 am Andreas Färber

xen_machine_pv: Use cpu_x86_init() to obtain X86CPU

Needed for moving halted field to CPUState.

Signed-off-by: Andreas Färber <>
Tested-by: Stefano Stabellini <>

6fc150de 06/11/2012 01:23 am Andreas Färber

s390-virtio: Use cpu_s390x_init() to obtain S390CPU

Needed to store S390CPU in ipi_states[].

Signed-off-by: Andreas Färber <>

45fa769b 06/11/2012 01:23 am Andreas Färber

s390-virtio: Let s390_cpu_addr2state() return S390CPU

Convert ipi_states to S390CPU**.

Needed for s390_cpu_restart() in handle_sigp().

Signed-off-by: Andreas Färber <>

518ec134 06/11/2012 01:23 am Andreas Färber

nseries: Rename n800_s::cpu to mpu

omap_mpu_state_s::env was renamed to cpu while changing its type.
With n800_s::cpu of type omap_mpu_state_s* this leads to s->cpu->cpu.

Rename the field to "mpu" to avoid this ugliness.

Signed-off-by: Andreas Färber <>...

59b91996 06/11/2012 01:23 am Andreas Färber

omap_sx1: Rename omap_mpu_state_s variable

Avoid cpu->cpu by using "mpu" as variable name.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

f1eea068 06/11/2012 01:23 am Andreas Färber

palm: Rename omap_mpu_state_s variable

Avoid cpu->cpu by using "mpu" as variable name.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

1c88de67 06/11/2012 01:23 am Andreas Färber

mainstone: Rename PXA2xxState variable

Avoid cpu->cpu by using "mpu" as variable name.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

2e7ad760 06/11/2012 01:23 am Andreas Färber

spitz: Rename PXA2xxState variable

Avoid cpu->cpu by using "mpu" as variable name.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

8efa35e0 06/11/2012 01:23 am Andreas Färber

tosa: Rename PXA2xxState variable

Avoid cpu->cpu by using "mpu" as variable name.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

5c6f4f17 06/11/2012 01:23 am Andreas Färber

z2: Rename PXA2xxState variable

Avoid cpu->cpu by using "mpu" as variable name.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

8bf502e2 06/11/2012 01:23 am Andreas Färber

strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMState

Adapt collie accordingly.

Signed-off-by: Andreas Färber <>
Acked-by: Peter Maydell <>

7c760cbc 06/09/2012 01:20 pm Andreas Färber

target-ppc: Unbreak kvm_ppc.c build

The file is located in target-ppc/, not hw/.

Signed-off-by: Andreas Färber <>
Cc: Paolo Bonzini <>
Cc: Anthony Liguori <>
Cc: Blue Swirl <>...

4e27e819 06/08/2012 05:11 pm Michael Roth

qapi: Add Visitor interfaces for uint*_t and int*_t

This adds visitor interfaces for fixed-width integers types.
Implementing these in visitors is optional, otherwise we fall back to
visit_type_int() (int64_t) with some additional bounds checking to avoid...

09f1bbcd 06/08/2012 05:11 pm Michael Roth

qdev: Use int32_t container for devfn property

Valid range for devfn is -1 to 255 (-1 for automatic assignment). We do
not currently validate this due to devfn being stored as a uint32_t.
This can lead to segfaults and other strange behavior.

We could technically just cast it to int32_t to implement the checking,...

c08fb2ac 06/08/2012 05:11 pm Michael Roth

qdev: Switch property accessors to fixed-width visitor interfaces

This introduces {get,set}_uint{8,16,32,64}() functions for the
respective qdev types.
TADDR and VLAN are switched to explicit int64, BLOCKSIZE to uint16.

Signed-off-by: Michael Roth <>...

27712df9 06/08/2012 05:11 pm Paolo Bonzini

qdev: Remove PropertyInfo range checking

Range checking in PropertyInfo is now used only for pci_devfn
properties and some error reporting. Remove all code that implements
it in the various property types, and the now unused fields.

Signed-off-by: Paolo Bonzini <>...

44701ab7 06/07/2012 05:19 pm Jan Kiszka

msi: Use msi/msix_present more consistently

Replace some open-coded msi/msix_present checks.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

cbd2d434 06/07/2012 05:19 pm Jan Kiszka

msi: Invoke msi/msix_reset from PCI core

There is no point in pushing this burden to the devices, they tend to
forget to call them (like intel-hda, ahci, xhci did). Instead, reset
functions are now called from pci_device_reset. They do nothing if
MSI/MSI-X is not in use....

7c9958b0 06/07/2012 05:19 pm Jan Kiszka

msi: Guard msi/msix_write_config with msi_present

Terminate msi/msix_write_config early if support is not enabled. This
allows to remove checks at the caller site if MSI is optional.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

95d65800 06/07/2012 05:19 pm Jan Kiszka

msi: Invoke msi/msix_write_config from PCI core

Also this functions is better invoked by the core than by each and every
device. This allows to drop the config_write callbacks from ich and
intel-hda.

CC: Alexander Graf <>
CC: Gerd Hoffmann <>...

868a1a52 06/07/2012 05:18 pm Jan Kiszka

ahci: Fix reset of MSI function

Call msi_reset on device reset as still required by the core.

CC: Alexander Graf <>
CC:
Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

8e729e3b 06/07/2012 05:18 pm Jan Kiszka

intel-hda: Fix reset of MSI function

Call msi_reset on device reset as still required by the core.

CC: Gerd Hoffmann <>
CC:
Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

8ab60a07 06/07/2012 05:18 pm Jan Kiszka

ahci: Clean up reset functions

Properly register reset functions via the device class.

CC: Alexander Graf <>
Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

520064c8 06/07/2012 05:18 pm Jan Kiszka

msi: Guard msi_reset with msi_present

Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

e9adf260 06/07/2012 05:18 pm Michael S. Tsirkin

shpc: unparent device before free

Recent core change removed unparent
so we need to do this in all callers now.

Signed-off-by: Michael S. Tsirkin <>

fee9d348 06/07/2012 05:18 pm Fernando Luis Vazquez Cao

rtl8139: honor RxOverflow flag in can_receive method

Some drivers (Linux' 8139too among them) rely on the NIC
injecting an interrupt in the event of a receive buffer overflow
and, accordingly, set the RxOverflow bit in the interrupt
mask. Unfortunately rtl8139's can_receive method ignores the...

b53f685d 06/07/2012 11:02 am Gerd Hoffmann

ehci: update status bits in ehci_set_state

Update the status register in the ehci_set_state function, to make sure
the guest-visible register is in sync with our internal schedule state.

Signed-off-by: Gerd Hoffmann <>

daf25307 06/07/2012 11:02 am Gerd Hoffmann

ehci: fix halt status handling

When the enable bits for controller / async schedule / periodic schedule
change just make sure we kick the frame timer and let
ehci_advance_periodic_state and ehci_advance_async_state handle the
controller state changes.

This will make ehci set USBSTS_HALT when the controller shutdown is...

863b4741 06/07/2012 11:02 am Gerd Hoffmann

ehci: remove unused attach_poll_counter

Signed-off-by: Gerd Hoffmann <>

6ceced0b 06/07/2012 11:02 am Gerd Hoffmann

ehci: create ehci_update_frindex

Factor out code from ehci_frame_timer.

Signed-off-by: Gerd Hoffmann <>

3a215326 06/07/2012 11:02 am Gerd Hoffmann

ehci: adaptive wakeup rate.

Adapt the frame timer sleeps according to the actual needs. With the
periodic schedule being active we'll have to wakeup 1000 times per
second and go check for work. In case only the async schedule is active
we can be more lazy though. When idle ehci will increate the sleep time...

f020ed36 06/07/2012 11:02 am Gerd Hoffmann

ehci: rework frame skipping

Move the framecount check out of the loop and use the new
ehci_update_frindex function to skip frames if needed.

Signed-off-by: Gerd Hoffmann <>