From: Julien Grall <julien.grall@citrix.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
Julian Pidancet <julian.pidancet@citrix.com>
Subject: Re: [QEMU][RFC PATCH 3/6] memory: Add xen memory hook
Date: Fri, 23 Mar 2012 15:08:21 +0000 [thread overview]
Message-ID: <4F6C91E5.2030507@citrix.com> (raw)
In-Reply-To: <4F6B6508.7080205@web.de>
On 03/22/2012 05:44 PM, Jan Kiszka wrote:
>>
>> static void core_region_nop(MemoryListener *listener,
>> diff --git a/ioport.c b/ioport.c
>> index 78a3b89..073ed75 100644
>> --- a/ioport.c
>> +++ b/ioport.c
>> @@ -28,6 +28,7 @@
>> #include "ioport.h"
>> #include "trace.h"
>> #include "memory.h"
>> +#include "hw/xen.h"
>>
>> /***********************************************************/
>> /* IO Port */
>> @@ -155,6 +156,11 @@ int register_ioport_read(pio_addr_t start, int length, int size,
>> i);
>> ioport_opaque[i] = opaque;
>> }
>> +
>> + if (xen_enabled()) {
>> + xen_map_iorange(start, length, 0);
>> + }
>> +
>> return 0;
>> }
>>
>> @@ -175,7 +181,13 @@ int register_ioport_write(pio_addr_t start, int length, int size,
>> i);
>> ioport_opaque[i] = opaque;
>> }
>> +
>> + if (xen_enabled()) {
>> + xen_map_iorange(start, length, 0);
>> + }
>> +
>> return 0;
>> +
>> }
>>
>> static uint32_t ioport_readb_thunk(void *opaque, uint32_t addr)
>> @@ -260,6 +272,11 @@ void isa_unassign_ioport(pio_addr_t start, int length)
>> ioport_destructor_table[start](ioport_opaque[start]);
>> ioport_destructor_table[start] = NULL;
>> }
>> +
>> + if (xen_enabled()) {
>> + xen_unmap_iorange(start, length, 0);
>> + }
>> +
>> for(i = start; i< start + length; i++) {
>> ioport_read_table[0][i] = NULL;
>> ioport_read_table[1][i] = NULL;
>>
> memory_listener_register(xen_hooks, system_io)?
>
QEMU doesn't seem to call region_add/region_del for ioport.
Moreover, some of ioport are directly register without
using memory hook (for example cirrus vga).
What is the best way to do it ?
> Even if that is not yet powerful enough, tuning the hooks is usually
> better than open-coding.
>
> Jan
>
>
next prev parent reply other threads:[~2012-03-23 15:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 16:01 [QEMU][RFC PATCH 0/6] QEMU disaggregation Julien Grall
2012-03-22 16:01 ` [QEMU][RFC PATCH 1/6] option: Add -xen-dmid Julien Grall
2012-03-22 17:36 ` Jan Kiszka
2012-03-23 10:42 ` Stefano Stabellini
2012-03-22 16:01 ` [QEMU][RFC PATCH 2/6] xen: Add functions to register PCI and IO in Xen Julien Grall
2012-03-23 10:44 ` Stefano Stabellini
2012-03-22 16:01 ` [QEMU][RFC PATCH 3/6] memory: Add xen memory hook Julien Grall
2012-03-22 17:44 ` Jan Kiszka
2012-03-23 15:08 ` Julien Grall [this message]
2012-03-23 16:37 ` Jan Kiszka
2012-03-25 10:44 ` Avi Kivity
2012-03-26 11:01 ` Stefano Stabellini
2012-03-26 11:02 ` Avi Kivity
2012-03-26 11:24 ` Julien Grall
2012-03-26 13:13 ` Avi Kivity
2012-03-23 16:47 ` Anthony Liguori
2012-03-22 16:01 ` [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen Julien Grall
2012-03-22 17:47 ` Jan Kiszka
2012-03-22 19:58 ` Anthony Liguori
2012-03-23 11:02 ` Stefano Stabellini
2012-03-25 12:09 ` Avi Kivity
2012-03-26 11:45 ` Stefano Stabellini
2012-03-26 11:57 ` Avi Kivity
2012-03-26 12:20 ` Stefano Stabellini
2012-03-26 12:33 ` Avi Kivity
2012-03-26 13:56 ` Stefano Stabellini
2012-03-22 16:01 ` [QEMU][RFC PATCH 5/6] xen-io: Handle the new ioreq type IOREQ_TYPE_PCI_CONFIG Julien Grall
2012-03-22 16:01 ` [QEMU][RFC PATCH 6/6] xen: handle qemu disaggregation Julien Grall
2012-03-23 11:07 ` Stefano Stabellini
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=4F6C91E5.2030507@citrix.com \
--to=julien.grall@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=jan.kiszka@web.de \
--cc=julian.pidancet@citrix.com \
--cc=qemu-devel@nongnu.org \
--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).