Statistics
| Branch: | Revision:

root / hw @ 4e4fa398

# Date Author Comment
4e4fa398 02/01/2012 10:45 pm Jan Kiszka

qdev: Introduce lost tick policy property

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...

1d849502 01/30/2012 09:14 pm Paolo Bonzini

m48t59: use rtc_clock for alarm timer

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 <>
Reviewed-by: Andreas Färber <>...

0c685d28 01/30/2012 09:13 pm Fabien Chouteau

GRLIB UART: Add RX channel

This patch implements the RX channel of GRLIB UART with a FIFO to
improve data rate.

Signed-off-by: Fabien Chouteau <>
Signed-off-by: Blue Swirl <>

0f36036c 01/27/2012 10:55 pm Andreas Färber

unin_pci: Fix typos in device names

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

19b6914a 01/27/2012 06:50 pm Anthony Liguori

virtio-s390: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

73093354 01/27/2012 06:50 pm Anthony Liguori

qdev: change ambiguous qdev names

Reported-by: Blue Swirl <>
Signed-off-by: Anthony Liguori <>

6e4ec3f9 01/27/2012 06:50 pm Andreas Färber

unin_pci: Drop unused reset handler

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

40021f08 01/27/2012 06:50 pm Anthony Liguori

pci: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

999e12bb 01/27/2012 06:50 pm Anthony Liguori

sysbus: apic: ioapic: convert to QEMU Object Model

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 <>

d148211c 01/27/2012 06:50 pm Anthony Liguori

ide: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

b9eea3e6 01/27/2012 06:50 pm Anthony Liguori

scsi: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

3954d33a 01/27/2012 06:50 pm Anthony Liguori

spapr: convert to QEMU Object Model (v2)

Signed-off-by: Anthony Liguori <>
---
v1 -> v2
- use QOM to check for the default console

f82e35e3 01/27/2012 06:50 pm Anthony Liguori

virtio-serial: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

70f9c987 01/27/2012 06:50 pm Andreas Färber

unin_pci: Clean up qdev names

Add -pcihost to SysBus devices to resolve name conflicts,
and clarify PCI vs. Internal PCI.

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

ff452ace 01/27/2012 06:50 pm Andreas Färber

unin_pci: Drop duplicate busdev

PCIHostState already has a busdev.

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

dbaa7904 01/27/2012 06:50 pm Anthony Liguori

hda-codec: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

e855761c 01/27/2012 06:50 pm Anthony Liguori

qdev: prepare source tree for code conversion

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...

8f04ee08 01/27/2012 06:50 pm Anthony Liguori

isa: pic: convert to QEMU Object Model

This converts two devices at once because PIC subclasses ISA and converting
subclasses independently is extremely hard.

Signed-off-by: Anthony Liguori <>

62aed765 01/27/2012 06:50 pm Anthony Liguori

usb: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

ba7c0520 01/27/2012 06:50 pm Anthony Liguori

ccid: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

cd6c4cf2 01/27/2012 06:50 pm Anthony Liguori

ssi: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

9e07bdf8 01/27/2012 06:50 pm Anthony Liguori

i2c: rename i2c_slave -> I2CSlave

Signed-off-by: Anthony Liguori <>

b5ea9327 01/27/2012 06:50 pm Anthony Liguori

i2c: smbus: convert to QEMU Object Model

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 <>

94afdadc 01/27/2012 06:50 pm Anthony Liguori

qdev: use a wrapper to access reset and promote reset to a class method

Signed-off-by: Anthony Liguori <>

3cc90eb2 01/27/2012 06:50 pm Anthony Liguori

qdev: add a interface to register subclasses

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 <>

3dde52d2 01/27/2012 06:50 pm Anthony Liguori

qdev: add class_init to DeviceInfo

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....

f79f2bfc 01/27/2012 06:50 pm Anthony Liguori

qdev: don't access name through info

We already have a QOM interface for this so let's use it.

Signed-off-by: Anthony Liguori <>

30fbb9fc 01/27/2012 06:50 pm Anthony Liguori

qdev: move qdev->info to class

Right now, DeviceInfo acts as the class for qdev. In order to switch to a
proper ObjectClass derivative, we need to ween all of the callers off of
interacting directly with the info pointer.

Signed-off-by: Anthony Liguori <>

d8c51b05 01/27/2012 06:28 pm Anthony Liguori

macio: convert to qdev

This is a "shallow", half hearted, and untested conversion.

Signed-off-by: Anthony Liguori <>

8a5faa1d 01/27/2012 06:28 pm Anthony Liguori

openpic: remove dead code to make a PCI device version

bus is always NULL so the code in this if clause is dead (and therefore
untested).

Signed-off-by: Anthony Liguori <>

6fc4925b 01/27/2012 06:28 pm Anthony Liguori

pci: call reset unconditionally

Because now all PCI devices are converted to qdev.

Signed-off-by: Anthony Liguori <>

32fea402 01/27/2012 06:28 pm Anthony Liguori

qdev: integrate with QEMU Object Model (v2)

This is a very shallow integration. We register a TYPE_DEVICE but only use
QOM as basically a memory allocator. This will make all devices show up as
QOM objects but they will all carry the TYPE_DEVICE.

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

31841e46 01/27/2012 05:00 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging

  • pmaydell/arm-devs.for-upstream:
    arm: SoC model for Calxeda Highbank
    arm_boot: support board IDs more than 16 bits wide
    arm: add secondary cpu boot callbacks to arm_boot.c
    ahci: add support for non-PCI based controllers...
21fe5bc6 01/27/2012 04:58 pm Anthony Liguori

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

  • kwolf/for-anthony: (22 commits)
    scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command
    qcow: Use bdrv functions to replace file operation
    qcow: Return real error code in qcow_open...
9f2a8d7a 01/27/2012 08:21 am Jan Kiszka

pcnet: Preserve link state across device reset

A device reset does not affect the link state, only set_link does.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

b1927cf1 01/27/2012 08:20 am Jan Kiszka

e1000: Preserve link state across device reset

A device reset does not affect the link state, only set_link does.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

c455d17c 01/27/2012 07:50 am Jan Kiszka

qdev-property: Make bit property parsing stricter

By using strncasecmp, we allow for arbitrary characters after the
"on"/"off" string. Fix this by switching to strcasecmp.

Reviewed-by: Andreas Färber <>
Reviewed-by: Markus Armbruster <>...

81b6b9fa 01/26/2012 03:49 pm Stefan Hajnoczi

virtio-blk: add virtio_blk_handle_read trace event

There already exists a virtio_blk_handle_write trace event as well as
completion events. Add the virtio_blk_handle_read event so it's easy to
trace virtio-blk requests for both read and write operations....

e2f0c49f 01/26/2012 03:49 pm Thomas Higdon

scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command

Limit the return value (corresponding to the length of the buffer to be
DMAed back to the intiator) to the value in req->cmd.xfer, which is the
amount of data that the initiator expects. Eliminate now-duplicate code...

f8414cb5 01/26/2012 01:49 pm Peter Maydell

arm_boot: support board IDs more than 16 bits wide

Support passing a board ID value to the kernel in r1
that is more than 16 bits wide. This is needed to pass
the '-1 == invalid' value for boards which only support
device tree booting.

Signed-off-by: Peter Maydell <>...

2488514c 01/26/2012 01:49 pm Rob Herring

arm: SoC model for Calxeda Highbank

Adds support for Calxeda's Highbank SoC.

Signed-off-by: Rob Herring <>
Signed-off-by: Mark Langsdorf <>
Signed-off-by: Peter Maydell <>

9d5ba9bf 01/26/2012 01:43 pm Mark Langsdorf

arm: add secondary cpu boot callbacks to arm_boot.c

Create two functions, write_secondary_boot() and secondary_cpu_reset_hook(),
to allow platforms more control of how secondary CPUs are brought up. The
new functions default to NULL and aren't called unless they are populated...

4c0e167c 01/26/2012 01:43 pm Rob Herring

Add xgmac ethernet model

This adds very basic support for the xgmac ethernet core. Missing things
include:

- statistics counters
- WoL support
- rx checksum offload
- chained descriptors (only linear descriptor ring)
- broadcast and multicast handling

Signed-off-by: Rob Herring <>...

d9fa31a3 01/26/2012 01:43 pm Rob Herring

ahci: add support for non-PCI based controllers

Add support for ahci on sysbus.

Signed-off-by: Rob Herring <>
Signed-off-by: Mark Langsdorf <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Peter Maydell <>

33163643 01/25/2012 08:32 pm Blue Swirl

vga: compile cirrus_vga in hwlib

Remove target dependencies and compile Cirrus VGA in hwlib.

Address masking can be removed since memory API handles that now.

Signed-off-by: Blue Swirl <>

fd4aa979 01/25/2012 08:32 pm Blue Swirl

memory: change dirty setting APIs to take a size

Instead of each target knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.

Signed-off-by: Blue Swirl <>

5b4448d2 01/23/2012 07:00 pm Anthony Liguori

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

  • qemu-kvm/uq/master:
    kvm: Activate in-kernel irqchip support
    kvm: x86: Add user space part for in-kernel IOAPIC
    kvm: x86: Add user space part for in-kernel i8259
    kvm: x86: Add user space part for in-kernel APIC...
c4ccbeac 01/23/2012 06:58 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/prep-up' into staging

  • afaerber/prep-up:
    prep: Use i82378 PCI->ISA bridge for 'prep' machine
    prep: Add i82378 PCI-to-ISA bridge emulation
    prep: Add i82374 DMA emulation
    MAINTAINERS: Add PCI host bridge files to PReP machine...
65f82df0 01/23/2012 03:30 pm Anthony Liguori

e1000: bounds packet size against buffer size

Otherwise we can write beyond the buffer and corrupt memory. This is tracked
as CVE-2012-0029.

Signed-off-by: Anthony Liguori <>

6618f909 01/22/2012 09:29 am Blue Swirl

sga: fix copypasta

Fix the name of the init function.

Reviewed-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

3d402831 01/22/2012 09:28 am Blue Swirl

vga: make Cirrus ISA device optional

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

a369da5f 01/22/2012 09:27 am Blue Swirl

vga: improve VGA logic

Improve VGA selection logic, push check for device availabilty to vl.c.
Create the devices at board level unconditionally.

Remove now unused pci_try_create*() functions.

Make PCI VGA devices optional.

Reviewed-by: Jan Kiszka <>...

0ae46996 01/21/2012 06:17 am Andreas Färber

grackle_pci: Clean up qdev names

Rename SysBus device from 'grackle' to 'grackle-pcihost' to resolve a
name conflict.

Also mark both devices as no_user.

Signed-off-by: Andreas Färber <>
Cc: Alexander Graf <>
Cc: Anthony Liguori <>...

3f7565c9 01/21/2012 06:17 am Benjamin Herrenschmidt

pseries: Support PCI extended config space in RTAS calls

On the pseries machine (which expexts a paravirtualized guest), guest
access to PCI config space is via host-provided RTAS functions. This
patch extends these RTAS functions to permit access to PCI extended...

c9c3c80a 01/21/2012 06:17 am David Gibson

pseries: Use correct dispatcher for PCI config space accesses

The pseries machine expects a para-virtualized guest and so supplies RTAS
functions (via a hypercall) for performing PCI config space access.
Currently the implementation of these calls into
pci_default_{read,write}_config(). However this would be incorrect for...

4d8d5467 01/21/2012 06:17 am Benjamin Herrenschmidt

pseries: SLOF PCI flag day

Currently on the pseries machine the SLOF firmware is used normally,
but we bypass it when -kernel is specified. Having these two

different boot paths can cause some confusion.

In particular at present we need to "probe" the (emulated) PCI bus and...

88045ac5 01/21/2012 06:17 am Alexander Graf

PPC: Pseries: Check for PCI boundaries

We call pci_host_config_{read,write}_common() which perform PCI config
accesses. However they don't do all limit checking the way we expect
it to.

So let's introduce a small wrapper around them, making them behave the...

623f7c21 01/21/2012 06:17 am Alexander Graf

PPC: 4xx: Qdevify the 440 PCI host controller

Due to popular demand, this qdevifies the PCI host controller of 4xx SoCs
the same way as e500.

We have to introduce a small stub function for pci init that will be
removed in a later patch, once we qdev'ified the board, to keep the build...

3960b04d 01/21/2012 06:17 am Alexander Graf

PPC: Bamboo: fold ppc440.c and ppc440_bamboo.c into a single file

The separation of ppc440 and ppc440_bamboo makes some sense, since ppc440
is the SoC while ppc440_bamboo is the actual board. But the separation
makes things harder for us for no good reason, so let's just fold them...

34ba1dc8 01/21/2012 06:17 am Alexander Graf

PPC: Bamboo: Integrate SoC instatiation, use qdev for PCI

Now that we have the SoC init function in the same file, let's integrate
it with the board initialization.

While at it, also make use of the newly qdev'ified PCI host controller.

Signed-off-by: Alexander Graf <>

82afa586 01/21/2012 06:17 am Benjamin Herrenschmidt

virtio-pci: Fix endianness of virtio config

The virtio config area in PIO space is a bit special. The initial
header is little endian but the rest (device specific) is guest
native endian.

The PIO accessors for PCI on machines that don't have native IO ports...

06dbfc6f 01/21/2012 06:17 am Alexander Graf

virtio: change memcpy to guest reads

When accessing the device specific virtio config space, we memcpy
the data into a variable in QEMU. At that point we're basically
pulling host endianness into the game which is a really bad idea.

So instead, let's use the target specific load/store helpers for...

17df768c 01/21/2012 06:17 am Benjamin Herrenschmidt

load_image_targphys() should enforce the max size

load_image_targphys() gets passed a max size for the file, but doesn't
enforce it at all. Add a check and return -1 (error) if the file is
too big, without loading it. Fix the bracing style in the function...

964455f3 01/21/2012 06:17 am David Gibson

Correct types in bmdma_addr_{read,write}

Back when I made patches introducing dma_addr_t and various PCI DMA
wrapper functions, I made a mistake. The bmdma_addr_{read,write} functions
need to take target_phys_addr_t not dma_addr_t, since they are assigned...

72718e9a 01/21/2012 06:17 am Alexander Graf

PPC: Bamboo: Set initial TLB entry

Back in the day when the bamboo target got introduced, the initial TLB was
dictated by KVM. TCG has been missing initial TLB values ever since, rendering
the target unusable for TCG usage.

This patch adds linear TLB maps the way Linux expects them, making the target...

d49bc1fb 01/21/2012 06:17 am Alexander Graf

PPC: 440: Ignore invalid PCI IRQs

When running a 440 target, we currently get invalid irq_num values (-1)
which completely confuse the IRQ setting code.

This is most likely due to the missing qdev conversion.

While this shouldn't happen in the first place and should really rather...

e5ba83c5 01/21/2012 06:17 am Alexander Graf

PPC: 440: Default to 440EP CPU

Today we're exposing a Virtex 440 CPU to the guest despite the fact
that we're telling the guest that we're running on a 440EP one in the
device tree.

So let's better default to a real 440EP to make things synced again.

Signed-off-by: Alexander Graf <>

d3c4548b 01/21/2012 06:17 am Alexander Graf

PPC: bamboo: remove old machine descriptions

Nobody needs to run bamboo in 0.12 compat mode. Remove the machine.

Signed-off-by: Alexander Graf <>

acd1bf90 01/21/2012 06:17 am Alexander Graf

PPC: bamboo: fix whitespace

Tabs followed by spaces are a no-go. My editor shows it red, distracting
me from actual work! :)

Signed-off-by: Alexander Graf <>

d29d3404 01/21/2012 06:16 am Alexander Graf

PPC: 440EP: Initialize timer

When using TCG with a BookE PowerPC core, we need to explicitly initialize
the BookE timers with the correct frequencies.

This was missing for 440EP, since that code came from KVM and was never used
with TCG.

Signed-off-by: Alexander Graf <>

b10a04b5 01/21/2012 06:16 am Alexander Graf

PPC: Bamboo: Register CPU reset

To be able to support CPU reset, we need to put all register initialization
and initial state into a CPU reset hook instead of a function that is only
called once on bootup.

This is a preparation step for the initial TLB setting code and brings bamboo...

506b7ddf 01/20/2012 01:27 am Andreas Färber

prep: Use i82378 PCI->ISA bridge for 'prep' machine

Speaker I/O, ISA bus, i8259 PIC, RTC and DMA are no longer set up
individually by the machine. Effectively, no-op speaker I/O is replaced
by pcspk; PIT and i82374 DMA are introduced.

Signed-off-by: Hervé Poussineau <>...

809680c0 01/20/2012 01:27 am Andreas Färber

prep: Fix offset of BIOS MemoryRegion

Since 0c90c52fab5ea92d7f12b29bfe26a7cd75d9efcb (ppc_prep: convert to memory
API) OHW was "Trying to execute code outside RAM or ROM at 0xfff00700".

The BIOS MemoryRegion is created with a fixed size of 1 MiB.
Ensure that the full size can be accessed since the exception...

48e93728 01/20/2012 01:27 am Andreas Färber

prep: Use ISA m48t59

This simplifies the code later when the i8259 moves to the i82378
PCI->ISA bridge and happens to fix a SysBus m48t59 io_base issue
introduced by commit 0fb56ffc5edd66f12ccfc0d71af5f9c79c0a2612 (m48t59:
drop obsolete address base arithmetic). Suggested by Hervé and Jan....

55526054 01/20/2012 01:27 am Andreas Färber

prep: qdev'ify Raven host bridge (PCIDevice)

Move initialization of vendor ID, etc. to PCIDeviceInfo.
Introduce VMState.

Signed-off-by: Andreas Färber <>
Reviewed-by: Alexander Graf <>
Cc: Hervé Poussineau <>...

9c95f183 01/20/2012 01:27 am Andreas Färber

prep_pci: Simplify I/O endianness

The prep PowerPC CPU is Big Endian. An explicit byte swap therefore
effectively becomes Little Endian.

Remove explicit byte swaps and mark as Little Endian.

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

7e5610ff 01/20/2012 01:27 am Andreas Färber

prep_pci: Update I/O to MemoryRegion ops

Convert to new-style read/write callbacks.

Signed-off-by: Andreas Färber <>
Cc: Alexander Graf <>
Cc: Michael S. Tsirkin <>
Cc: Avi Kivity <>
Cc: Benoît Canet <>

8ca8c7bc 01/20/2012 01:27 am Andreas Färber

prep: qdev'ify Raven host bridge (SysBus)

Drop pci_prep_init() in favor of extended device state. Inspired by
patches from Hervé and Alex.

Assign the 4 IRQs from the board after device instantiation. This moves
the knowledge out of prep_pci and allows for future machines with...

23b96cdb 01/20/2012 01:27 am Andreas Färber

prep: Add i82374 DMA emulation

Prepare Intel 82374 emulation for use by Intel 82378 PCI->ISA bridge.

Signed-off-by: Hervé Poussineau <>

Confine to CONFIG_I82374. Add VMState.

Signed-off-by: Andreas Färber <>
Reviewed-by: Alexander Graf <>

a04ff940 01/20/2012 01:27 am Andreas Färber

prep: Add i82378 PCI-to-ISA bridge emulation

Prepare Intel 82378 emulation for use by PReP platforms.

Signed-off-by: Hervé Poussineau <>

Create ISA bus in this device (suggested by Markus).
Rebase onto Memory API, mark memory ops as Little Endian....

51568923 01/19/2012 08:51 pm Anthony Liguori

Merge remote-tracking branch 'spice/spice.v47' into staging

  • spice/spice.v47:
    qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
a75e6678 01/19/2012 05:23 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    Makefile: Remove generated headers on clean
    Makefile: Exclude tests/Makefile in unconfigured tree
    lm32: Fix mixup of uint32 and uint32_t
    tests: Silence gtester in Makefile...
5414b325 01/19/2012 05:19 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging

  • pmaydell/arm-devs.for-upstream:
    arm: make the number of GIC interrupts configurable
    hw/lan9118: Add save/load support
    arm: Remove incorrect comment in arm_timer
    vexpress, realview: Add (dummy) L2 cache controller
9ca2140a 01/19/2012 04:34 pm Anthony Liguori

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

  • kraxel/usb.37:
    usb-redir: Improve some debugging messages
    usb-redir: Try to keep our buffer size near the target size
    usb-redir: Pre-fill our isoc input buffer before sending pkts to the host...
9b5b76d4 01/19/2012 01:14 pm Jan Kiszka

kvm: x86: Establish IRQ0 override control

KVM is forced to disable the IRQ0 override when we run with in-kernel
irqchip but without IRQ routing support of the kernel. Set the fwcfg
value correspondingly. This aligns us with qemu-kvm.

Signed-off-by: Jan Kiszka <>

680c1c6f 01/19/2012 01:14 pm Jan Kiszka

kvm: x86: Add user space part for in-kernel APIC

This introduces the alternative APIC device which makes use of KVM's
in-kernel device model. External NMI injection via LINT1 is emulated by
checking the current state of the in-kernel APIC, only injecting a NMI...

10b61882 01/19/2012 01:14 pm Jan Kiszka

kvm: x86: Add user space part for in-kernel i8259

Introduce the alternative 'kvm-i8259' device model that exploits KVM
in-kernel acceleration.

The PIIX3 initialization code is furthermore extended by KVM specific
IRQ route setup. GSI injection differs in KVM mode from the user space...

a39c1d47 01/19/2012 01:14 pm Jan Kiszka

kvm: x86: Add user space part for in-kernel IOAPIC

This introduces the KVM-accelerated IOAPIC model 'kvm-ioapic' and
extends the IRQ routing setup by the 0->2 redirection when needed.

The kvm-ioapic model has a property that allows to define its GSI base...

ac791b88 01/19/2012 01:14 pm Jan Kiszka

ioapic: Drop post-load irr initialization

As all devices undergo a reset prior to vmloa, and the reset value of
irr is 0, we do not need to do this clearing for older vmstates
explicitly. Dropping this redundant code will also make KVM integration
a bit simpler....

244ac3af 01/19/2012 01:14 pm Jan Kiszka

ioapic: Factor out base class for KVM reuse

Split up the IOAPIC analogously to APIC and i8259. KVM will share the
IOAPICCommonState, the vmstate, reset logic and certain init parts with
the user space model.

Signed-off-by: Jan Kiszka <>

02c09195 01/19/2012 01:14 pm Jan Kiszka

apic: Inject external NMI events via LINT1

On real hardware, NMI button events are injected via the LINT1 line of
the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC
LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that...

343270ea 01/19/2012 01:14 pm Jan Kiszka

apic: Introduce apic_report_irq_delivered

The in-kernel i8259 and IOAPIC backends for KVM will need this, so
encapsulate the shared bits.

Signed-off-by: Jan Kiszka <>

dae01685 01/19/2012 01:14 pm Jan Kiszka

apic: Factor out base class for KVM reuse

The KVM in-kernel APIC model will reuse parts of the user space model
while providing the same frontend view to guest and most management
interfaces.

Factor out an APIC base class to encapsulate those parts that will be...

7a380ca3 01/19/2012 01:14 pm Jan Kiszka

apic: Open-code timer save/restore

To enable migration between accelerated and non-accelerated APIC models,
we will need to handle the timer saving and restoring specially and can
no longer rely on the automatics of VMSTATE_TIMER. Specifically,
accelerated model will not start any QEMUTimer....

9aa78c42 01/19/2012 01:14 pm Jan Kiszka

i8259: Completely privatize PicState

Use DeviceState instead of PicState in the public i8259 API. This is
cleaner and allows to reorganize the PIC data structures for KVM reuse.

Signed-off-by: Jan Kiszka <>

512709f5 01/19/2012 01:14 pm Jan Kiszka

i8259: Factor out base class for KVM reuse

Analogously to the APIC, we will reuse some parts of the user space
i8259 model for KVM. The base class provides a common device state, the
vmstate, the property list, a reset core and some shared init bits.

This also introduces a common helper to instantiate a single i8259 chip...

60ba3cc2 01/19/2012 01:14 pm Jan Kiszka

msi: Generalize msix_supported to msi_supported

Rename msix_supported to msi_supported and control MSI and MSI-X
activation this way. That was likely to original intention for this
flag, but MSI support came after MSI-X.

Signed-off-by: Jan Kiszka <>

3b9a6ee5 01/19/2012 01:14 pm Jan Kiszka

kvm: Move kvmclock into hw/kvm folder

More KVM-specific devices will come, so let's start with moving the
kvmclock into a dedicated folder.

Signed-off-by: Jan Kiszka <>

ab388a98 01/19/2012 01:14 pm Jan Kiszka

apic: Stop timer on reset

All LVTs are masked on reset, so the timer becomes ineffective. Letting
it tick nevertheless is harmless, but will at least create a spurious
trace event.

Signed-off-by: Jan Kiszka <>

0f3c3cc9 01/19/2012 10:16 am Andreas Färber

lm32: Fix mixup of uint32 and uint32_t

Commit d23948b15a9920fb7f6374b55a6db1ecff81f3ee (lm32: add Milkymist
VGAFB support) introduced a stray usage of the softfloat uint32 type.

Use uint32_t instead.

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