[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci devi
From: |
Isaku Yamahata |
Subject: |
Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci device |
Date: |
Fri, 24 Sep 2010 14:52:13 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Fri, Sep 17, 2010 at 12:14:59PM +0100, address@hidden wrote:
> +static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
> +{
> + static int warnings = 0;
> +
> + if (warnings < 5) {
> + DPRINTF("Warning: attempted read from physical address "
> + "0x" TARGET_FMT_plx " in xen platform mmio space\n", addr);
> + warnings++;
> + }
> + return 0;
> +}
> +
> +static void platform_mmio_write(void *opaque, target_phys_addr_t addr,
> + uint32_t val)
> +{
> + static int warnings = 0;
> +
> + if (warnings < 5) {
> + DPRINTF("Warning: attempted write of 0x%x to physical "
> + "address 0x" TARGET_FMT_plx " in xen platform mmio space\n",
> + val, addr);
> + warnings++;
> + }
> +}
> +
> +static CPUReadMemoryFunc * const platform_mmio_read_funcs[3] = {
> + platform_mmio_read,
> + platform_mmio_read,
> + platform_mmio_read,
> +};
> +
> +static CPUWriteMemoryFunc * const platform_mmio_write_funcs[3] = {
> + platform_mmio_write,
> + platform_mmio_write,
> + platform_mmio_write,
> +};
> +
> +static void platform_mmio_map(PCIDevice *d, int region_num,
> + pcibus_t addr, pcibus_t size, int type)
> +{
> + int mmio_io_addr;
> +
> + mmio_io_addr = cpu_register_io_memory(platform_mmio_read_funcs,
> + platform_mmio_write_funcs, NULL);
> +
> + cpu_register_physical_memory(addr, size, mmio_io_addr);
> +}
Please use cpu_register_io_memory_simple().
--
yamahata
- [Qemu-devel] [PATCH RFC V3 00/12] xen device model support, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 03/12] xen: Introduce --enable-xen command options., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 02/12] xen: Add xen_machine_fv, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 01/12] xen: Support new libxc calls from xen unstable., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 06/12] xen: add a 8259 Interrupt Controller, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci device, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 08/12] Intruduce qemu_ram_ptr_unlock., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 07/12] xen: Introduce the Xen mapcache, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 09/12] vl.c: Introduce getter for shutdown_requested and reset_requested., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 05/12] piix_pci: Introduces Xen specific call for irq., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 11/12] xen: Set running state in xenstore., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 12/12] xen: Add a Xen specific ACPI Implementation to target-xen, anthony . perard, 2010/09/17