[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport* |
Date: |
Mon, 10 Sep 2012 13:44:24 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
On 09/10/2012 01:37 PM, Julien Grall wrote:
> On 09/09/2012 03:22 PM, Avi Kivity wrote:
>> On 09/04/2012 06:13 PM, Julien Grall wrote:
>>
>>> This patch replaces all register_ioport* with the new memory API. It
>>> permits
>>> to use the new Memory stuff like listener.
>>>
>>>
>>
>>> @@ -200,8 +212,11 @@ static void pm_io_space_update(PIIX4PMState *s)
>>>
>>> /* XXX: need to improve memory and ioport allocation */
>>> PIIX4_DPRINTF("PM: mapping to 0x%x\n", pm_io_base);
>>> - iorange_init(&s->ioport,&pm_iorange_ops, pm_io_base, 64);
>>> - ioport_register(&s->ioport);
>>> +
>>> + memory_region_set_address(&s->pm_io, pm_io_base);
>>> + memory_region_set_enabled(&s->pm_io, true);
>>> + } else {
>>> + memory_region_set_enabled(&s->pm_io, false);
>>> }
>>> }
>>>
>>>
>> The entire if () can be simplified to
>>
>> pm_io_base = le32_to_cpu(*(uint32_t *)(s->dev.config + 0x40));
>> pm_io_base&= 0xffc0;
>> memory_region_transaction_begin()
>> memory_region_set_enabled(&s->pm_io, s->dev.config[0x80]& 1);
>> memory_region_set_address(&s->pm_io, pm_io_base);
>> memory_region_transaction_commit();
>>
> I will modify, do I need to resend all the patch series or just this
> patch ?
>
Just this patch would be fine.
--
error compiling committee.c: too many arguments to function
[Qemu-devel] [PATCH V9 5/8] hw/cirrus_vga.c: replace register_ioport*, Julien Grall, 2012/09/04
[Qemu-devel] [PATCH V9 7/8] hw/pc.c: replace register_ioport*, Julien Grall, 2012/09/04
[Qemu-devel] [PATCH V9 6/8] hw/serial.c: replace register_ioport*, Julien Grall, 2012/09/04
[Qemu-devel] [PATCH V9 8/8] hw/dma.c: replace register_ioport*, Julien Grall, 2012/09/04
Re: [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration, Julien Grall, 2012/09/04
[Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/10
Re: [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration, Avi Kivity, 2012/09/11