qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ioapic: Convert to memory API


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] ioapic: Convert to memory API
Date: Mon, 17 Oct 2011 12:35:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

On 10/16/2011 07:21 PM, Jan Kiszka wrote:
> From: Jan Kiszka <address@hidden>
>
> Dispatching byte and word accesses like dwords looks strange, but let's
> just convert mechanically.
>
>  
> -static CPUReadMemoryFunc * const ioapic_mem_read[3] = {
> -    ioapic_mem_readl,
> -    ioapic_mem_readl,
> -    ioapic_mem_readl,
> -};
> -
> -static CPUWriteMemoryFunc * const ioapic_mem_write[3] = {
> -    ioapic_mem_writel,
> -    ioapic_mem_writel,
> -    ioapic_mem_writel,
> +static const MemoryRegionOps ioapic_io_ops = {
> +    .old_mmio = {
> +        .read = { ioapic_mem_readl, ioapic_mem_readl, ioapic_mem_readl, },
> +        .write = { ioapic_mem_writel, ioapic_mem_writel, ioapic_mem_writel, 
> },
> +    },
> +    .endianness = DEVICE_NATIVE_ENDIAN,
>  };

Why use old_mmio?  Use the ordinary .read and .write, and ignore the
size parameter.

-- 
error compiling committee.c: too many arguments to function




reply via email to

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