From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@amazon.com>,
virtualization@lists.linux-foundation.org
Subject: [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0
Date: Mon, 2 Mar 2015 12:40:28 +0100 [thread overview]
Message-ID: <1425296404-12903-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1425296404-12903-1-git-send-email-mst@redhat.com>
virtio 1.0 config space is in LE format for all
devices, use modern wrappers when accessed through
the 1.0 BAR.
Reported-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/virtio-pci.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 4c9a0b8..49ea7fc 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1198,13 +1198,13 @@ static uint64_t virtio_pci_device_read(void *opaque, hwaddr addr,
switch (size) {
case 1:
- val = virtio_config_readb(vdev, addr);
+ val = virtio_config_modern_readb(vdev, addr);
break;
case 2:
- val = virtio_config_readw(vdev, addr);
+ val = virtio_config_modern_readw(vdev, addr);
break;
case 4:
- val = virtio_config_readl(vdev, addr);
+ val = virtio_config_modern_readl(vdev, addr);
break;
}
return val;
@@ -1216,13 +1216,13 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr,
VirtIODevice *vdev = opaque;
switch (size) {
case 1:
- virtio_config_writeb(vdev, addr, val);
+ virtio_config_modern_writeb(vdev, addr, val);
break;
case 2:
- virtio_config_writew(vdev, addr, val);
+ virtio_config_modern_writew(vdev, addr, val);
break;
case 4:
- virtio_config_writel(vdev, addr, val);
+ virtio_config_modern_writel(vdev, addr, val);
break;
}
}
--
MST
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: cornelia.huck@de.ibm.com, Rusty Russell <rusty@rustcorp.com.au>,
Anthony Liguori <aliguori@amazon.com>,
virtualization@lists.linux-foundation.org
Subject: [Qemu-devel] [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0
Date: Mon, 2 Mar 2015 12:40:28 +0100 [thread overview]
Message-ID: <1425296404-12903-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1425296404-12903-1-git-send-email-mst@redhat.com>
virtio 1.0 config space is in LE format for all
devices, use modern wrappers when accessed through
the 1.0 BAR.
Reported-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/virtio-pci.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 4c9a0b8..49ea7fc 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1198,13 +1198,13 @@ static uint64_t virtio_pci_device_read(void *opaque, hwaddr addr,
switch (size) {
case 1:
- val = virtio_config_readb(vdev, addr);
+ val = virtio_config_modern_readb(vdev, addr);
break;
case 2:
- val = virtio_config_readw(vdev, addr);
+ val = virtio_config_modern_readw(vdev, addr);
break;
case 4:
- val = virtio_config_readl(vdev, addr);
+ val = virtio_config_modern_readl(vdev, addr);
break;
}
return val;
@@ -1216,13 +1216,13 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr,
VirtIODevice *vdev = opaque;
switch (size) {
case 1:
- virtio_config_writeb(vdev, addr, val);
+ virtio_config_modern_writeb(vdev, addr, val);
break;
case 2:
- virtio_config_writew(vdev, addr, val);
+ virtio_config_modern_writew(vdev, addr, val);
break;
case 4:
- virtio_config_writel(vdev, addr, val);
+ virtio_config_modern_writel(vdev, addr, val);
break;
}
}
--
MST
next prev parent reply other threads:[~2015-03-02 11:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 11:40 [PATCH 1/2] virtio: add modern config accessors Michael S. Tsirkin
2015-03-02 11:40 ` [Qemu-devel] " Michael S. Tsirkin
2015-03-02 11:40 ` Michael S. Tsirkin [this message]
2015-03-02 11:40 ` [Qemu-devel] [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0 Michael S. Tsirkin
2015-03-02 11:56 ` Cornelia Huck
2015-03-02 11:56 ` [Qemu-devel] " Cornelia Huck
2015-03-02 12:16 ` Michael S. Tsirkin
2015-03-02 12:16 ` [Qemu-devel] " Michael S. Tsirkin
2015-03-04 0:36 ` Rusty Russell
2015-03-04 0:36 ` [Qemu-devel] " Rusty Russell
2015-03-04 10:14 ` Michael S. Tsirkin
2015-03-04 10:14 ` [Qemu-devel] " Michael S. Tsirkin
2015-03-05 0:13 ` Rusty Russell
2015-03-05 0:13 ` Rusty Russell
2015-03-02 11:55 ` [PATCH 1/2] virtio: add modern config accessors Cornelia Huck
2015-03-02 11:55 ` [Qemu-devel] " Cornelia Huck
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=1425296404-12903-2-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
--cc=virtualization@lists.linux-foundation.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.