mirror of
https://github.com/mii443/qemu.git
synced 2025-08-28 18:09:35 +00:00
target-i386: Move APIC to ICC bus
It allows APIC to be hotplugged. * map APIC's mmio at board level if it is present * do not register mmio region for each APIC, since only one is used/mapped Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
committed by
Andreas Färber
parent
62fc403f11
commit
53a89e262b
@ -22,6 +22,7 @@
|
||||
#ifndef ICC_BUS_H
|
||||
#define ICC_BUS_H
|
||||
|
||||
#include "exec/memory.h"
|
||||
#include "hw/qdev-core.h"
|
||||
|
||||
#define TYPE_ICC_BUS "icc-bus"
|
||||
@ -37,6 +38,8 @@ typedef struct ICCBus {
|
||||
/*< private >*/
|
||||
BusState parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
MemoryRegion *apic_address_space;
|
||||
} ICCBus;
|
||||
|
||||
#define ICC_BUS(obj) OBJECT_CHECK(ICCBus, (obj), TYPE_ICC_BUS)
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define QEMU_APIC_INTERNAL_H
|
||||
|
||||
#include "exec/memory.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/cpu/icc_bus.h"
|
||||
#include "qemu/timer.h"
|
||||
|
||||
/* APIC Local Vector Table */
|
||||
@ -78,7 +78,7 @@ typedef struct APICCommonState APICCommonState;
|
||||
|
||||
typedef struct APICCommonClass
|
||||
{
|
||||
SysBusDeviceClass parent_class;
|
||||
ICCDeviceClass parent_class;
|
||||
|
||||
void (*init)(APICCommonState *s);
|
||||
void (*set_base)(APICCommonState *s, uint64_t val);
|
||||
@ -92,7 +92,7 @@ typedef struct APICCommonClass
|
||||
} APICCommonClass;
|
||||
|
||||
struct APICCommonState {
|
||||
SysBusDevice busdev;
|
||||
ICCDevice busdev;
|
||||
|
||||
MemoryRegion io_memory;
|
||||
X86CPU *cpu;
|
||||
|
Reference in New Issue
Block a user