qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]