[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: |
Sun, 09 Sep 2012 17:22:48 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
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();
--
error compiling committee.c: too many arguments to function
- [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 1/8] isa: add isa_address_space_io, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 2/8] hw/apm.c: replace register_ioport*, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 3/8] smb: replace_register_ioport*, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/04
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*,
Avi Kivity <=
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Avi Kivity, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Jan Kiszka, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Stefano Stabellini, 2012/09/10
[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