Statistics
| Branch: | Revision:

root / hw / apic.c @ a6a9239c

History | View | Annotate | Download (26.2 kB)

# Date Author Comment
d8023f31 10/20/2010 07:41 pm Blue Swirl

apic: convert debug printf statements to tracepoints

Replace debug printf statements with tracepoints.

Signed-off-by: Stefan Hajnoczi <>
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 <>

0a3c5921 05/29/2010 11:23 pm Blue Swirl

apic: improve debugging

Add a DPRINTF macro. Use TARGET_FMT_plx for printing target_phys_addr_t
items. Add a separate flag for debugging coalescing interrupts.

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

ea375f9a 03/04/2010 05:29 am Jan Kiszka

KVM: Rework VCPU state writeback API

This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:

- cpu_synchronize_all_states in qemu_savevm_state_complete
(initial sync from kernel before vmsave)...

c1699988 11/07/2009 10:06 am Glauber Costa

v3: don't call reset functions on cpu initialization

There is absolutely no need to call reset functions when initializing
devices. Since we are already registering them, calling qemu_system_reset()
should suffice. Actually, it is what happens when we reboot the machine,...

19a2223f 10/05/2009 05:32 pm Gleb Natapov

set correct CS seg limit and flags on sipi

TCG works with incorrect values somehow.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

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

1c3173b9 09/11/2009 06:18 pm Anthony Liguori

Revert "don't call cpu_sychronize_state from reset handlers"

This reverts commit 733318ea9c6d846a6a047b87619e7d9d6e9707d1.

Signed-off-by: Anthony Liguori <>

733318ea 09/10/2009 01:31 am Glauber Costa

don't call cpu_sychronize_state from reset handlers

Doing this will make the vcpu ioctl be issued from the I/O thread, instead
of cpu thread. The correct behaviour is to call it from within the cpu thread,
as soon as we are ready to go.

Signed-off-by: Glauber Costa <>...

4c0960c0 08/28/2009 04:35 am Avi Kivity

kvm: Simplify cpu_synchronize_state()

cpu_synchronize_state() is a little unreadable since the 'modified'
argument isn't self-explanatory. Simplify it by making it always
synchronize the kernel state into qemu, and automatically flush the
registers back to the kernel if they've been synchronized on this...

695dcf71 08/28/2009 04:30 am Juan Quintela

Port apic to new VMState design

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

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

8d2ba1fb 06/29/2009 10:18 pm Jan Kiszka

kvm: Rework VCPU synchronization

During startup and after reset we have to synchronize user space to the
in-kernel KVM state. Namely, we need to transfer the VCPU registers when
they change due to VCPU as well as APIC reset.

This patch refactors the required hooks so that kvm_init_vcpu registers...

54c96da7 06/24/2009 05:09 pm Michael S. Tsirkin

qemu/apic: minimal MSI/MSI-X implementation for PC

Implement MSI support in APIC. Note that MSI and MMIO APIC registers
are at the same memory location, but actually not on the global bus: MSI
is on PCI bus, APIC is connected directly to the CPU. We map them on the...

b09ea7d5 06/22/2009 06:15 pm Gleb Natapov

Handle init/sipi in a main cpu exec loop. (v2)

This should fix compilation problem in case of CONFIG_USER_ONLY.

Currently INIT/SIPI is handled in the context of CPU that sends IPI.
This patch changes this to handle them like all other events in a main
cpu exec loop. When KVM will gain thread per vcpu capability it will...

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

678e12cc 06/14/2009 03:19 am Gleb Natapov

Don't use cpu_index as apic_id.

(patch is on top of "Apic creation should not depend on pci" series)

Currently cpu_index is used as cpu apic id on x86. This is incorrect
since apic ids not have to be continuous (they can also encode cpu
hierarchy information). This patch uses cpuid_apic_id for initial apic id...

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

2c7c13d4 04/09/2009 01:56 am aurel32

apic: Fix access to non-existent APIC

When running with M isapc, there is no env>apic_state. Fix
cpu_get/set_apic_* helpers to handle this corner case gracefully.

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

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

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

73822ec8 01/15/2009 10:11 pm aliguori

Add -rtc-td-hack option to fix time drift with RTC on Windows (Gleb Natapov)

After my last patch to fix interrupt coalescing was rejected
on the basis that it is too intrusive we decided to make the
fix much more localized and only fix the problem for RTC time...

fad6cb1a 01/05/2009 12:05 am aurel32

Update FSF address in GPL/LGPL boilerplate

The attached patch updates the FSF address in the GPL/LGPL boilerplate
in most GPL/LGPLed files, and also in COPYING.LIB.

Signed-off-by: Stuart Brady <>
Signed-off-by: Aurelien Jarno <>...

16b29ae1 12/18/2008 01:28 am aliguori

Add HPET emulation to qemu (Beth Kon)

This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpet
provides a more finely granular clocksource than otherwise available on PC.
This means that latency-dependent applications (e.g. multimedia) will generally...

3b63c04e 12/06/2008 12:46 pm aurel32

Revert "hw/apic.c: use fls() from host-utils"

This reverts commit 5876.

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5890 c046a42c-6fe2-441c-8c8c-71466251a162

d34ca590 12/04/2008 10:57 pm aurel32

hw/apic.c: use fls() from host-utils

...and fix a bug, the implementation in hw/apic.c was wrong.

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5876 c046a42c-6fe2-441c-8c8c-71466251a162

bb7e7293 10/12/2008 11:16 pm aurel32

hw/apic.c: use functions from host-utils.h

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5469 c046a42c-6fe2-441c-8c8c-71466251a162

bad5b1ec 10/12/2008 07:15 pm aurel32

Define macro QEMU_GNUC_PREREQ and use it

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5467 c046a42c-6fe2-441c-8c8c-71466251a162

5b7ada46 10/12/2008 02:44 pm aurel32

Only use _builtin* with GCC >= 3.4

Fix gcc 3.3 builds, broken in revision 5465.

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5466 c046a42c-6fe2-441c-8c8c-71466251a162

e95f5491 10/12/2008 03:53 am aurel32

hw/apic.c: use __builtin funtions instead of assembly code

Suggested by malc.

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5465 c046a42c-6fe2-441c-8c8c-71466251a162

3003b8bb 10/02/2008 01:01 am aurel32

Reset CPU on INIT IPI

INIT IPI should reset CPU. Also non boot CPU should be halted. It will
be un-halted by SIPI.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5390 c046a42c-6fe2-441c-8c8c-71466251a162

5a964d93 10/02/2008 12:45 am aurel32

hw/apic.c: use bsr and bsf on x86_64

(C.W. Betts)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5382 c046a42c-6fe2-441c-8c8c-71466251a162

fec5fa02 09/02/2008 03:09 am aurel32

Reset I32_APIC_BASE on system RESET

Should be done according to spec.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5128 c046a42c-6fe2-441c-8c8c-71466251a162

1a7de94a 08/21/2008 06:14 am aurel32

De-assert PIC IRQs properly at APIC level

[ Taking latest isapc changes into account. ]

Ensure that PIC-delivered IRQs are properly de-asserted in case the APIC
is in EXTINT or FIXED mode (with level-triggering selected) on LINT0.
Fixes EFI-BIOS boot issues....

681f8c29 08/18/2008 05:19 pm aliguori

APIC: Do not start zero-period timers (Jan Kiszka)

The APIC timer must not start when the initial count is (still) zero.

This caused occasional stalls when booting secondary CPUs of Linux SMP
guests.

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

ce5232c5 05/28/2008 08:14 pm bellard

moved halted field to CPU_COMMON

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4609 c046a42c-6fe2-441c-8c8c-71466251a162

a5b38b51 04/13/2008 07:08 pm aurel32

x86: Rework local IRQ delivery for APICs

(Jan Kiszka)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4207 c046a42c-6fe2-441c-8c8c-71466251a162

e2eb9d3e 04/13/2008 07:08 pm aurel32

x86: Raise inter-processor NMI and SMI

(Jan Kiszka)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4206 c046a42c-6fe2-441c-8c8c-71466251a162

b237db36 03/29/2008 12:31 am aurel32

ignore reads to the EOI register

(Glauber Costa)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4124 c046a42c-6fe2-441c-8c8c-71466251a162

bee8d684 12/17/2007 01:41 am ths

qemu_put signedness fixes, by Andre Przywara.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3824 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

0e21e12b 10/09/2007 06:08 am ths

Don't route PIC interrupts through the local APIC if the local APIC
config says so. By Ari Kivity.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3371 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

be0164f2 08/26/2007 08:33 pm ths

Set apic instance number for savevm, by Ari Kivity.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3144 c046a42c-6fe2-441c-8c8c-71466251a162

eae7629b 04/03/2007 07:38 pm ths

i386 return APIC ID with cpuid, by Bernhard Kauer.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2591 c046a42c-6fe2-441c-8c8c-71466251a162

bf53ca01 01/31/2007 02:22 pm ths

Upgrade the apic version_id, by Don Laor.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2370 c046a42c-6fe2-441c-8c8c-71466251a162

b4511723 10/08/2006 09:20 pm bellard

APIC init fix + APIC get_irq fix (Juergen Keil)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2193 c046a42c-6fe2-441c-8c8c-71466251a162

e6cf6a8c 08/17/2006 01:48 pm bellard

save apic timer

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2116 c046a42c-6fe2-441c-8c8c-71466251a162

26a76461 06/25/2006 09:15 pm bellard

C99 64 bit printf

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2018 c046a42c-6fe2-441c-8c8c-71466251a162

d3e9db93 12/17/2005 03:27 am bellard

initial support for up to 255 CPUs

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1707 c046a42c-6fe2-441c-8c8c-71466251a162

8dd69b8f 11/23/2005 10:59 pm bellard

fummy DM_LOWPRI handling

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1648 c046a42c-6fe2-441c-8c8c-71466251a162

e0fd8781 11/22/2005 01:26 am bellard

APIC fixes - SIPI support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1641 c046a42c-6fe2-441c-8c8c-71466251a162

db6e6ed7 07/24/2005 05:56 pm bellard

do not export fls_bit

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1529 c046a42c-6fe2-441c-8c8c-71466251a162

b1fc0348 07/24/2005 12:43 am bellard

EXTINT delivery mode support for I/O APIC (Filip Navara)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1522 c046a42c-6fe2-441c-8c8c-71466251a162

d592d303 07/23/2005 10:05 pm bellard

IOAPIC support (initial patch by Filip Navara)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1520 c046a42c-6fe2-441c-8c8c-71466251a162

9230e66e 01/23/2005 10:46 pm bellard

CR8 support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1237 c046a42c-6fe2-441c-8c8c-71466251a162

574bbf7b 01/04/2005 01:27 am bellard

initial APIC support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1183 c046a42c-6fe2-441c-8c8c-71466251a162