* [Qemu-devel] [PATCH] xen-platform: Fix IO port read/write functions
@ 2011-11-04 15:35 Anthony PERARD
2011-11-07 8:07 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2011-11-04 15:35 UTC (permalink / raw)
To: QEMU-devel; +Cc: Anthony PERARD, qemu-trivial, Stefano Stabellini
Somehow, the read/write functions handle an offset that does not exist anymore.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
hw/xen_platform.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index 6e3ba8b..5e792f5 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -113,7 +113,7 @@ static void platform_fixed_ioport_writew(void *opaque, uint32_t addr, uint32_t v
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
/* Unplug devices. Value is a bitmask of which devices to
unplug, with bit 0 the IDE devices, bit 1 the network
@@ -152,7 +152,7 @@ static void platform_fixed_ioport_writew(void *opaque, uint32_t addr, uint32_t v
static void platform_fixed_ioport_writel(void *opaque, uint32_t addr,
uint32_t val)
{
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
/* PV driver version */
break;
@@ -163,7 +163,7 @@ static void platform_fixed_ioport_writeb(void *opaque, uint32_t addr, uint32_t v
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0: /* Platform flags */ {
hvmmem_type_t mem_type = (val & PFFLAG_ROM_LOCK) ?
HVMMEM_ram_ro : HVMMEM_ram_rw;
@@ -186,7 +186,7 @@ static uint32_t platform_fixed_ioport_readw(void *opaque, uint32_t addr)
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
if (s->drivers_blacklisted) {
/* The drivers will recognise this magic number and refuse
@@ -205,7 +205,7 @@ static uint32_t platform_fixed_ioport_readb(void *opaque, uint32_t addr)
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
/* Platform flags */
return s->flags;
@@ -221,7 +221,7 @@ static void platform_fixed_ioport_reset(void *opaque)
{
PCIXenPlatformState *s = opaque;
- platform_fixed_ioport_writeb(s, XEN_PLATFORM_IOPORT, 0);
+ platform_fixed_ioport_writeb(s, 0, 0);
}
const MemoryRegionPortio xen_platform_ioport[] = {
@@ -251,7 +251,7 @@ static void platform_fixed_ioport_init(PCIXenPlatformState* s)
static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
{
if (addr == 0) {
- return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);
+ return platform_fixed_ioport_readb(opaque, 0);
} else {
return ~0u;
}
@@ -263,7 +263,7 @@ static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, uint32_t val
switch (addr) {
case 0: /* Platform flags */
- platform_fixed_ioport_writeb(opaque, XEN_PLATFORM_IOPORT, val);
+ platform_fixed_ioport_writeb(opaque, 0, val);
break;
case 8:
log_writeb(s, val);
@@ -321,7 +321,7 @@ static int xen_platform_post_load(void *opaque, int version_id)
{
PCIXenPlatformState *s = opaque;
- platform_fixed_ioport_writeb(s, XEN_PLATFORM_IOPORT, s->flags);
+ platform_fixed_ioport_writeb(s, 0, s->flags);
return 0;
}
--
tg: (47abe9a..) fix/pci-platform (depends on: master)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] xen-platform: Fix IO port read/write functions
2011-11-04 15:35 [Qemu-devel] [PATCH] xen-platform: Fix IO port read/write functions Anthony PERARD
@ 2011-11-07 8:07 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-11-07 8:07 UTC (permalink / raw)
To: Anthony PERARD; +Cc: qemu-trivial, QEMU-devel, Stefano Stabellini
On Fri, Nov 04, 2011 at 03:35:11PM +0000, Anthony PERARD wrote:
> Somehow, the read/write functions handle an offset that does not exist anymore.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
>
> ---
> hw/xen_platform.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-07 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04 15:35 [Qemu-devel] [PATCH] xen-platform: Fix IO port read/write functions Anthony PERARD
2011-11-07 8:07 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
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).