qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] ioapic: Convert to memory API
Date: Mon, 17 Oct 2011 12:35:19 +0200	[thread overview]
Message-ID: <4E9C04E7.9040807@redhat.com> (raw)
In-Reply-To: <4E9B12A4.30100@web.de>

On 10/16/2011 07:21 PM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> 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	other threads:[~2011-10-17 10:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16 17:21 [Qemu-devel] [PATCH] ioapic: Convert to memory API Jan Kiszka
2011-10-17 10:35 ` Avi Kivity [this message]
2011-10-17 11:11   ` [Qemu-devel] [PATCH v2 1/2] " Jan Kiszka
2011-10-17 14:57     ` Avi Kivity
2011-10-17 11:11   ` [Qemu-devel] [PATCH 2/2] ioapic: Reject non-dword accesses to IOWIN register Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9C04E7.9040807@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).