qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: "Hervé Poussineau" <hpoussin@reactos.org>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 05/10] xen_platform: do not use old_portio-style callbacks
Date: Sat, 12 Jan 2013 17:06:26 +0100	[thread overview]
Message-ID: <50F18A02.2080706@suse.de> (raw)
In-Reply-To: <1357334986-13941-6-git-send-email-hpoussin@reactos.org>

Am 04.01.2013 22:29, schrieb Hervé Poussineau:
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
>  hw/xen_platform.c |   21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/hw/xen_platform.c b/hw/xen_platform.c
> index e7611bb..02e0146 100644
> --- a/hw/xen_platform.c
> +++ b/hw/xen_platform.c
> @@ -279,7 +279,8 @@ static void platform_fixed_ioport_init(PCIXenPlatformState* s)
>  
>  /* Xen Platform PCI Device */
>  
> -static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
> +static uint64_t xen_platform_ioport_readb(void *opaque, hwaddr addr,
> +                                          unsigned int size)
>  {
>      if (addr == 0) {
>          return platform_fixed_ioport_readb(opaque, 0);
> @@ -288,30 +289,28 @@ static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
>      }
>  }
>  
> -static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, uint32_t val)
> +static void xen_platform_ioport_writeb(void *opaque, hwaddr addr,
> +                                       uint64_t val, unsigned int size)
>  {
>      PCIXenPlatformState *s = opaque;
>  
>      switch (addr) {
>      case 0: /* Platform flags */
> -        platform_fixed_ioport_writeb(opaque, 0, val);
> +        platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val);
>          break;
>      case 8:
> -        log_writeb(s, val);
> +        log_writeb(s, (uint32_t)val);
>          break;
>      default:
>          break;
>      }
>  }
>  
> -static MemoryRegionPortio xen_pci_portio[] = {
> -    { 0, 0x100, 1, .read = xen_platform_ioport_readb, },
> -    { 0, 0x100, 1, .write = xen_platform_ioport_writeb, },
> -    PORTIO_END_OF_LIST()
> -};
> -
>  static const MemoryRegionOps xen_pci_io_ops = {
> -    .old_portio = xen_pci_portio,
> +    .read  = xen_platform_ioport_readb,
> +    .write = xen_platform_ioport_writeb,
> +    .impl.min_access_size = 1,
> +    .impl.max_access_size = 1,
>  };
>  
>  static void platform_ioport_bar_setup(PCIXenPlatformState *d)

Thanks, applied to memory-ioport queue:
https://github.com/afaerber/qemu-cpu/commits/memory-ioport

Is there some kind of guidance in which cases to use .impl vs. .valid
for the access sizes in these conversions?

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-01-12 16:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 21:29 [Qemu-devel] [PATCH 00/10] memory: remove old_portio usage Hervé Poussineau
2013-01-04 21:29 ` [Qemu-devel] [PATCH 01/10] ppc/newworld: add ISA bus, required by VGA card Hervé Poussineau
2013-01-12 16:03   ` Andreas Färber
2013-01-04 21:29 ` [Qemu-devel] [PATCH 02/10] ppc/oldworld: " Hervé Poussineau
2013-01-04 21:29 ` [Qemu-devel] [PATCH 03/10] uhci: stop using portio lists Hervé Poussineau
2013-01-10 17:18   ` Andreas Färber
2013-01-11  7:38     ` Gerd Hoffmann
2013-01-04 21:29 ` [Qemu-devel] [PATCH 04/10] sun4u: create VGA card after ISA bus Hervé Poussineau
2013-01-10 17:24   ` Andreas Färber
2013-01-10 19:30     ` Hervé Poussineau
2013-01-12 11:42       ` Blue Swirl
2013-01-12 15:58         ` Andreas Färber
2013-01-04 21:29 ` [Qemu-devel] [PATCH 05/10] xen_platform: do not use old_portio-style callbacks Hervé Poussineau
2013-01-12 16:06   ` Andreas Färber [this message]
2013-01-15 17:09     ` Andreas Färber
2013-01-15 17:43       ` Stefano Stabellini
2013-01-04 21:29 ` [Qemu-devel] [PATCH 06/10] acpi-piix4: " Hervé Poussineau
2013-01-12 16:20   ` Andreas Färber
2013-01-12 18:02   ` Andreas Färber
2013-01-12 19:20     ` Hervé Poussineau
2013-01-04 21:29 ` [Qemu-devel] [PATCH 07/10] vga/qxl: do not use portio_list_init/portio_list_add Hervé Poussineau
2013-01-04 21:29 ` [Qemu-devel] [PATCH 08/10] isa: use memory regions instead of portio_list_* functions Hervé Poussineau
2013-01-12 19:21   ` Andreas Färber
2013-01-04 21:29 ` [Qemu-devel] [PATCH 09/10] ioport: remove now useless " Hervé Poussineau
2013-01-04 21:29 ` [Qemu-devel] [PATCH 10/10] memory: remove old_portio-style callbacks support Hervé Poussineau
2013-01-10 17:45   ` Andreas Färber
2013-01-10 19:33     ` Hervé Poussineau

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=50F18A02.2080706@suse.de \
    --to=afaerber@suse.de \
    --cc=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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).