From: Jan Kiszka <jan.kiszka@web.de>
To: Julien Grall <julien.grall@citrix.com>
Cc: Stefano.Stabellini@eu.citrix.com, qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: replace register_ioport*
Date: Sun, 26 Aug 2012 11:19:09 +0200 [thread overview]
Message-ID: <5039EA0D.4030806@web.de> (raw)
In-Reply-To: <26cea9d1d7137ffbf0d133e0e553b6b79c9d1e6d.1345549695.git.julien.grall@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]
On 2012-08-22 14:27, Julien Grall wrote:
> This patch replaces all register_ioport* with portio_*. It permits to
> use the new Memory stuff like listener.
>
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
> ---
> hw/cirrus_vga.c | 42 ++++++++++++++++++++++++------------------
> 1 files changed, 24 insertions(+), 18 deletions(-)
>
> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
> index e8dcc6b..adfc855 100644
> --- a/hw/cirrus_vga.c
> +++ b/hw/cirrus_vga.c
> @@ -200,6 +200,7 @@ typedef void (*cirrus_fill_t)(struct CirrusVGAState *s,
> typedef struct CirrusVGAState {
> VGACommonState vga;
>
> + MemoryRegion cirrus_vga_io;
> MemoryRegion cirrus_linear_io;
> MemoryRegion cirrus_linear_bitblt_io;
> MemoryRegion cirrus_mmio_io;
> @@ -2528,12 +2529,15 @@ static uint32_t cirrus_vga_ioport_read(void *opaque, uint32_t addr)
> return val;
> }
>
> -static void cirrus_vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
> +static void cirrus_vga_ioport_write(void *opaque, target_phys_addr_t addr,
> + uint64_t val, unsigned size)
> {
> CirrusVGAState *c = opaque;
> VGACommonState *s = &c->vga;
> int index;
>
> + addr += 0x3b0;
> +
> /* check port range access depending on color/monochrome mode */
> if (vga_ioport_invalid(s, addr)) {
> return;
> @@ -2657,7 +2661,7 @@ static void cirrus_mmio_write(void *opaque, target_phys_addr_t addr,
> if (addr >= 0x100) {
> cirrus_mmio_blt_write(s, addr - 0x100, val);
> } else {
> - cirrus_vga_ioport_write(s, addr + 0x3c0, val);
> + cirrus_vga_ioport_write(s, addr + 0x10, val, size);
> }
> }
>
> @@ -2783,8 +2787,18 @@ static const MemoryRegionOps cirrus_linear_io_ops = {
> },
> };
>
> +static const MemoryRegionOps cirrus_vga_io_ops = {
> + .write = cirrus_vga_ioport_write,
Missing .read. Crashes immediately when you test it.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2012-08-26 9:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 12:27 [Qemu-devel] [PATCH V5 0/8] memory: unifiy ioport registration Julien Grall
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 1/8] isa: add isa_address_space_io Julien Grall
2012-08-24 16:10 ` Andreas Färber
2012-08-28 15:42 ` Julien Grall
2012-08-28 17:08 ` Jan Kiszka
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 2/8] hw/acpi_piix4.c: replace register_ioport* Julien Grall
2012-08-23 18:01 ` Jan Kiszka
2012-08-26 9:10 ` Jan Kiszka
2012-08-26 9:36 ` Jan Kiszka
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: " Julien Grall
2012-08-24 13:44 ` Jan Kiszka
2012-08-24 14:49 ` Julien Grall
2012-08-24 15:01 ` Jan Kiszka
2012-08-26 9:19 ` Jan Kiszka [this message]
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 4/8] hw/serial.c: " Julien Grall
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 5/8] hw/pc.c: " Julien Grall
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 6/8] hw/dma.c: " Julien Grall
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 7/8] hw/apm.c: " Julien Grall
2012-08-22 12:27 ` [Qemu-devel] [PATCH V5 8/8] smb: replace_register_ioport* Julien Grall
2012-08-24 16:19 ` Jan Kiszka
2012-08-23 18:06 ` [Qemu-devel] [PATCH V5 0/8] memory: unifiy ioport registration 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=5039EA0D.4030806@web.de \
--to=jan.kiszka@web.de \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=avi@redhat.com \
--cc=julien.grall@citrix.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.