Statistics
| Branch: | Revision:

root / hw / ioapic.c @ 93148aa5

History | View | Annotate | Download (7.4 kB)

# Date Author Comment
83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

39bffca2 02/03/2012 06:41 pm Anthony Liguori

qdev: register all types natively through QEMU Object Model

This was done in a mostly automated fashion. I did it in three steps and then
rebased it into a single step which avoids repeatedly touching every file in
the tree.

The first step was a sed-based addition of the parent type to the subclass...

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

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

750ecd44 11/28/2011 03:38 pm Avi Kivity

sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()

Signed-off-by: Avi Kivity <>

1a440963 11/24/2011 06:31 pm Jan Kiszka

ioapic: Reject non-dword accesses to IOWIN register

Aligns the model with the spec.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Avi Kivity <>

4d5bf5f6 11/24/2011 06:31 pm Jan Kiszka

ioapic: Convert to memory API

This maintains the old imprecise access size handling.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Avi Kivity <>

1f6f408c 08/22/2011 10:37 pm Jan Kiszka

target-i386: Remove unused polarity arguments from APIC API

Polarity of external interrupts needs to be handled in the IOAPIC.
Passing it to the APIC is pointless. So remove all these arguments.

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

0035e509 08/22/2011 10:37 pm Jan Kiszka

ioapic: Implement polarity

If the polarity bit is set in the redirection table, the input level
simply has to inverted as it is low active in this case.

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

47f7be39 04/27/2011 09:04 pm Jan Kiszka

ioapic: Do not set irr for masked edge IRQs

So far we set IRR for edge IRQs even if the pin is masked. If the guest
later on unmasks and switches the pin to level-triggered mode, irr will
remain set, causing an IRQ storm. The point is that setting IRR is not...

449aa4a4 04/04/2011 08:14 am Aurelien Jarno

Revert "ioapic: when switches to level trigger mode, interrupts raised repeatedly."

This reverts commit 9bcfc7daabb138b0fe3d64d74892942d482e5bbd.

9bcfc7da 04/03/2011 10:52 pm Isaku Yamahata

ioapic: when switches to level trigger mode, interrupts raised repeatedly.

- the trigger mode is edge at first
- During initializatoin, the interrupt is raised as edge which is masked.
The corresponding bit of irr is set.
- Then the mode is switched to level and it's unmasked....

0280b571 02/04/2011 02:33 pm Jan Kiszka

ioapic: Implement EOI handling for level-triggered IRQs

Add the missing EOI broadcast from local APIC to the IOAPICs on
completion of level-triggered IRQs. This ensures that a still asserted
IRQ source properly re-triggers an APIC IRQ.

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

35a74c5c 02/04/2011 02:33 pm Jan Kiszka

ioapic: Save/restore irr

This is a guest modifiable state that must be saved/restored properly.

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

5dce4999 02/04/2011 02:33 pm Jan Kiszka

ioapic: Add support for qemu-kvm's vmstate v2

qemu-kvm carries the IOAPIC base address in its v2 vmstate. We only
support the default base address so far, and saving even that in the
device state was rejected.

Add a padding field to be able to read qemu-kvm's old state, but...

1f5e71a8 02/04/2011 02:33 pm Jan Kiszka

ioapic: Style & magics cleanup

Fix a few style issues and convert magic numbers into prober symbolic
constants, also fixing the wrong but unused IOAPIC_DM_SIPI value.

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

2507c12a 12/11/2010 05:24 pm Alexander Graf

Add endianness as io mem parameter

As stated before, devices can be little, big or native endian. The
target endianness is not of their concern, so we need to push things
down a level.

This patch adds a parameter to cpu_register_io_memory that allows a
device to choose its endianness. For now, all devices simply choose...

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

9af9b330 05/31/2010 09:59 pm Blue Swirl

ioapic: improve debugging

Add a DPRINTF macro, use it also to see irq deliveries.

Signed-off-by: Blue Swirl <>

aa28b9bf 03/21/2010 09:46 pm Blue Swirl

Move x86 specific PC declarations to a separate file

x86 definitions (especially CPUState uses) prevent many files from
being compiled within libhw.

Move x86 specific declarations (APIC stuff) to a separate file.

Signed-off-by: Blue Swirl <>

c227f099 10/02/2009 12:12 am Anthony Liguori

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. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

3e9e9888 09/11/2009 07:10 pm Juan Quintela

vmstate: port ioapic device

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

1632dc6a 08/24/2009 04:01 pm Avi Kivity

Route IOAPIC interrupts via ISA bus

Instead of calling the IOAPIC from the PIC, raise IOAPIC irqs via the ISA bus.
As a side effect, IOAPIC lines 16-23 are enabled.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

a08d4367 06/29/2009 10:18 pm Jan Kiszka

Revert "Introduce reset notifier order"

This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

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

1eed09cb 06/16/2009 11:18 pm Avi Kivity

Remove io_index argument from cpu_register_io_memory()

The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty). Remove the parameter to reduce
the API's power, thus facilitating future change.

Signed-off-by: Avi Kivity <>...

8217606e 05/22/2009 06:50 pm Jan Kiszka

Introduce reset notifier order

Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0....

610626af 03/12/2009 10:25 pm aliguori

From 67e94ae77f8de4d5d822917f1723cefa7ebfb64d Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <>
Date: Tue, 3 Mar 2009 13:33:13 +0800
Subject: [PATCH] Split ioapic logic from the current apic.

Add a new ioapic.c to hold ioapic's logic, and also...