Re: [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-06 Thread Pekka Enberg
On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote:
 The field size is currently wrong, read into a 32bit word instead of 16.  This
 casues trouble when BE.

 Signed-off-by: Matt Evans m...@ozlabs.org
 ---
  tools/kvm/virtio/pci.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

 diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
 index 0ae93fb..6b27ff8 100644
 --- a/tools/kvm/virtio/pci.c
 +++ b/tools/kvm/virtio/pci.c
 @@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, 
 struct kvm *kvm, u16 port,
                break;
        case VIRTIO_PCI_QUEUE_NUM:
                val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
 vpci-queue_selector);
 -               ioport__write32(data, val);
 -               break;
 +               ioport__write16(data, val);
                break;
        case VIRTIO_PCI_STATUS:
                ioport__write8(data, vpci-status);

Looks good to me. Asias, Sasha?
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-06 Thread Asias He
On 12/06/2011 06:26 PM, Pekka Enberg wrote:
 On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote:
 The field size is currently wrong, read into a 32bit word instead of 16.  
 This
 casues trouble when BE.

 Signed-off-by: Matt Evans m...@ozlabs.org
 ---
  tools/kvm/virtio/pci.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

 diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
 index 0ae93fb..6b27ff8 100644
 --- a/tools/kvm/virtio/pci.c
 +++ b/tools/kvm/virtio/pci.c
 @@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, 
 struct kvm *kvm, u16 port,
break;
case VIRTIO_PCI_QUEUE_NUM:
val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
 vpci-queue_selector);
 -   ioport__write32(data, val);
 -   break;
 +   ioport__write16(data, val);
break;
case VIRTIO_PCI_STATUS:
ioport__write8(data, vpci-status);
 
 Looks good to me. Asias, Sasha?

Looks good to me.

-- 
Asias He
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-06 Thread Pekka Enberg
On Tue, Dec 6, 2011 at 1:28 PM, Asias He asias.he...@gmail.com wrote:
 @@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, 
 struct kvm *kvm, u16 port,
                break;
        case VIRTIO_PCI_QUEUE_NUM:
                val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
 vpci-queue_selector);
 -               ioport__write32(data, val);
 -               break;
 +               ioport__write16(data, val);
                break;
        case VIRTIO_PCI_STATUS:
                ioport__write8(data, vpci-status);

 Looks good to me. Asias, Sasha?

 Looks good to me.

Applied, thanks!
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-06 Thread Sasha Levin
On Tue, 2011-12-06 at 12:26 +0200, Pekka Enberg wrote:
 On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote:
  The field size is currently wrong, read into a 32bit word instead of 16.  
  This
  casues trouble when BE.
 
  Signed-off-by: Matt Evans m...@ozlabs.org
  ---
   tools/kvm/virtio/pci.c |3 +--
   1 files changed, 1 insertions(+), 2 deletions(-)
 
  diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
  index 0ae93fb..6b27ff8 100644
  --- a/tools/kvm/virtio/pci.c
  +++ b/tools/kvm/virtio/pci.c
  @@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, 
  struct kvm *kvm, u16 port,
 break;
 case VIRTIO_PCI_QUEUE_NUM:
 val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
  vpci-queue_selector);
  -   ioport__write32(data, val);
  -   break;
  +   ioport__write16(data, val);
 break;
 case VIRTIO_PCI_STATUS:
 ioport__write8(data, vpci-status);
 
 Looks good to me. Asias, Sasha?

Looks good.

-- 

Sasha.

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-06 Thread Pekka Enberg
On Tue, Dec 6, 2011 at 1:28 PM, Asias He asias.he...@gmail.com wrote:
 @@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, 
 struct kvm *kvm, u16 port,
                break;
        case VIRTIO_PCI_QUEUE_NUM:
                val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
 vpci-queue_selector);
 -               ioport__write32(data, val);
 -               break;
 +               ioport__write16(data, val);
                break;
        case VIRTIO_PCI_STATUS:
                ioport__write8(data, vpci-status);

 Looks good to me. Asias, Sasha?

 Looks good to me.

Applied, thanks!
--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-06 Thread Sasha Levin
On Tue, 2011-12-06 at 12:26 +0200, Pekka Enberg wrote:
 On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote:
  The field size is currently wrong, read into a 32bit word instead of 16.  
  This
  casues trouble when BE.
 
  Signed-off-by: Matt Evans m...@ozlabs.org
  ---
   tools/kvm/virtio/pci.c |3 +--
   1 files changed, 1 insertions(+), 2 deletions(-)
 
  diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
  index 0ae93fb..6b27ff8 100644
  --- a/tools/kvm/virtio/pci.c
  +++ b/tools/kvm/virtio/pci.c
  @@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, 
  struct kvm *kvm, u16 port,
 break;
 case VIRTIO_PCI_QUEUE_NUM:
 val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
  vpci-queue_selector);
  -   ioport__write32(data, val);
  -   break;
  +   ioport__write16(data, val);
 break;
 case VIRTIO_PCI_STATUS:
 ioport__write8(data, vpci-status);
 
 Looks good to me. Asias, Sasha?

Looks good.

-- 

Sasha.

--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-05 Thread Matt Evans
The field size is currently wrong, read into a 32bit word instead of 16.  This
casues trouble when BE.

Signed-off-by: Matt Evans m...@ozlabs.org
---
 tools/kvm/virtio/pci.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
index 0ae93fb..6b27ff8 100644
--- a/tools/kvm/virtio/pci.c
+++ b/tools/kvm/virtio/pci.c
@@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, struct 
kvm *kvm, u16 port,
break;
case VIRTIO_PCI_QUEUE_NUM:
val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
vpci-queue_selector);
-   ioport__write32(data, val);
-   break;
+   ioport__write16(data, val);
break;
case VIRTIO_PCI_STATUS:
ioport__write8(data, vpci-status);
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM

2011-12-05 Thread Matt Evans
The field size is currently wrong, read into a 32bit word instead of 16.  This
casues trouble when BE.

Signed-off-by: Matt Evans m...@ozlabs.org
---
 tools/kvm/virtio/pci.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
index 0ae93fb..6b27ff8 100644
--- a/tools/kvm/virtio/pci.c
+++ b/tools/kvm/virtio/pci.c
@@ -116,8 +116,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, struct 
kvm *kvm, u16 port,
break;
case VIRTIO_PCI_QUEUE_NUM:
val = vtrans-virtio_ops-get_size_vq(kvm, vpci-dev, 
vpci-queue_selector);
-   ioport__write32(data, val);
-   break;
+   ioport__write16(data, val);
break;
case VIRTIO_PCI_STATUS:
ioport__write8(data, vpci-status);
--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html