[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus |
Date: |
Tue, 09 Apr 2013 13:29:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 05/04/2013 16:37, Igor Mammedov ha scritto:
> @@ -282,12 +284,14 @@ static int apic_load_old(QEMUFile *f, void *opaque, int
> version_id)
> return 0;
> }
>
> -static int apic_init_common(SysBusDevice *dev)
> +static int apic_init_common(ICCDevice *dev)
> {
> APICCommonState *s = APIC_COMMON(dev);
> + DeviceState *d = DEVICE(dev);
> APICCommonClass *info;
> static DeviceState *vapic;
> static int apic_no;
> + static bool mmio_registered;
>
> if (apic_no >= MAX_APICS) {
> return -1;
> @@ -296,8 +300,11 @@ static int apic_init_common(SysBusDevice *dev)
>
> info = APIC_COMMON_GET_CLASS(s);
> info->init(s);
> -
> - sysbus_init_mmio(dev, &s->io_memory);
> + if (!mmio_registered) {
> + MemoryRegion *as = ICC_BUS(d->parent_bus)->apic_address_space;
> + memory_region_add_subregion(as, 0, &s->io_memory);
> + mmio_registered = true;
> + }
Ok for now. When we get IOMMU regions, we could use them to dispatch on
the current CPU's APIC.
Paolo
- [Qemu-devel] [PATCH 10/22] rtc: update rtc_cmos on CPU hot-plug, (continued)
- [Qemu-devel] [PATCH 10/22] rtc: update rtc_cmos on CPU hot-plug, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 11/22] cpu: introduce get_firmware_id() method and override it for target-i386, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 17/22] target-i386: replace MSI_SPACE_SIZE with APIC_SPACE_SIZE, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 16/22] target-i386: cpu: attach ICC bus to CPU on its creation, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 14/22] target-i386: introduce apic-id property, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 09/22] introduce CPU hot-plug notifier, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 21/22] target-i386: expose all possible CPUs as /machine/icc-bridge/cpu[0..N] links, Igor Mammedov, 2013/04/05
- [Qemu-devel] [PATCH 22/22] add cpu-add qmp command and implement CPU hot-add for target-i386, Igor Mammedov, 2013/04/05