[PATCHv2 01/13] qemu: make default_write_config use mask table

2009-06-02 Thread Michael S. Tsirkin
devices, depending on capabilities present. As a result, writing a single byte in BAR registers now works as it should. Writing to upper limit registers in the bridge also works as it should. Code is also shorter. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 145

[PATCHv2 02/13] qemu: capability bits in pci save/restore

2009-06-02 Thread Michael S. Tsirkin
Add support for capability bits in save/restore for pci. These will be used for MSI, where the capability might be present or not as requested by user, which does not map well into a single version number. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 14 -- hw/pci.h |4

[PATCHv2 03/13] qemu: add routines to manage PCI capabilities

2009-06-02 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 98 -- hw/pci.h | 18 +++- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hw/pci.c b

[PATCHv2 06/13] qemu: add flag to disable MSI-X by default

2009-06-02 Thread Michael S. Tsirkin
Add global flag to disable MSI-X by default. This is useful primarily to make images loadable by older qemu (without msix). Even when MSI-X is disabled by flag, you can still load images that have MSI-X enabled. Signed-off-by: Michael S. Tsirkin --- hw/msix.c |3 +++ qemu-options.hx

[PATCHv2 04/13] qemu: helper routines for pci access.

2009-06-02 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h b/hw/pci.h

[PATCHv2 11/13] qemu: request 3 vectors in virtio-net

2009-06-02 Thread Michael S. Tsirkin
Request up to 3 vectors in virtio-net. Actual bindings might supply less. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 60aa6da..6118fe3 100644 --- a/hw/virtio-net.c +++ b/hw

[PATCHv2 08/13] qemu: add support for resizing regions

2009-06-02 Thread Michael S. Tsirkin
Make it possible to resize PCI regions. This will be used by virtio with MSI-X, where the region size depends on whether MSI-X is enabled, and can change across load/save. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 54 -- hw/pci.h

[PATCHv2 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-02 Thread Michael S. Tsirkin
reserved in APIC MMIO and vice versa. Signed-off-by: Michael S. Tsirkin --- hw/apic.c | 50 ++ 1 files changed, 46 insertions(+), 4 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 8c8b2de..d831709 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -19,6

[PATCHv2 09/13] qemu: virtio support for many interrupt vectors

2009-06-02 Thread Michael S. Tsirkin
to bindings yet, so they are left stubbed out for now. Signed-off-by: Michael S. Tsirkin --- hw/syborg_virtio.c | 13 -- hw/virtio-pci.c| 24 +++ hw/virtio.c| 63 ++- hw/virtio.h| 10 ++- 4

[PATCHv2 13/13] qemu: add pci_get/set_byte

2009-06-02 Thread Michael S. Tsirkin
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 4072f16..e1e4fb4 100644 --- a/hw/pci.h

[PATCHv2 05/13] qemu: MSI-X support functions

2009-06-02 Thread Michael S. Tsirkin
Add functions implementing MSI-X support. First user will be virtio-pci. Note that platform must set a flag to declare MSI supported. For PC this will be set by APIC. Signed-off-by: Michael S. Tsirkin --- Makefile.target |2 +- hw/msix.c | 423

[PATCHv2 10/13] qemu: MSI-X support in virtio PCI

2009-06-02 Thread Michael S. Tsirkin
This enables actual support for MSI-X in virtio PCI. First user will be virtio-net. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 152 -- 1 files changed, 112 insertions(+), 40 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio

[PATCHv2 12/13] qemu: virtio save/load bindings

2009-06-02 Thread Michael S. Tsirkin
Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 49 - hw/virtio.c | 31 ++- hw/virtio.h |4 3 files changed, 66 insertions

Re: find_vqs operation starting at arbitrary index

2009-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2009 at 08:53:07AM +0930, Rusty Russell wrote: > On Mon, 1 Jun 2009 05:33:48 pm Amit Shah wrote: > > Hello, > > > > The recent find_vqs operation doesn't allow for a vq to be found at an > > arbitrary location; it's meant to be called once at startup to find all > > possible queues

Re: find_vqs operation starting at arbitrary index

2009-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2009 at 10:39:16PM +0530, Amit Shah wrote: > On (Tue) Jun 02 2009 [19:32:27], Michael S. Tsirkin wrote: > > On Tue, Jun 02, 2009 at 08:53:07AM +0930, Rusty Russell wrote: > > > On Mon, 1 Jun 2009 05:33:48 pm Amit Shah wrote: > > > > Hello, >

TODO list for qemu+KVM networking performance v2

2009-06-04 Thread Michael S. Tsirkin
As I'm new to qemu/kvm, to figure out how networking performance can be improved, I went over the code and took some notes. As I did this, I tried to record ideas from recent discussions and ideas that came up on improving performance. Thus this list. This includes a partial overview of networki

Re: TODO list for qemu+KVM networking performance v2

2009-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2009 at 01:16:05PM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > As I'm new to qemu/kvm, to figure out how networking performance can be > > improved, I > > went over the code and took some notes. As I did this, I tried to record

Re: TODO list for qemu+KVM networking performance v2

2009-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2009 at 01:50:20PM -0400, Gregory Haskins wrote: > Suit yourself, but I suspect that by the time you build the prototype > you will either end up re-solving all the same problems anyway, or have > diminished functionality (or both). /me goes to look at vbus patches. -- MST _

[PATCHv3 04/13] qemu: helper routines for pci access.

2009-06-05 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h b/hw/pci.h

[PATCHv3 08/13] qemu: add support for resizing regions

2009-06-05 Thread Michael S. Tsirkin
Make it possible to resize PCI regions. This will be used by virtio with MSI-X, where the region size depends on whether MSI-X is enabled, and can change across load/save. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 54 -- hw/pci.h

[PATCHv3 00/13] qemu: MSI-X support

2009-06-05 Thread Michael S. Tsirkin
table patch that I posted previously, and which is now included in the series. -- MST Changelog: v3: mask->wmask rename Removed an unused struct definition. v2. Incorporated a minor fix pointed out by Isaku Yamahata. v1. First working version. Michael S. Tsi

[PATCHv3 06/13] qemu: add flag to disable MSI-X by default

2009-06-05 Thread Michael S. Tsirkin
Add global flag to disable MSI-X by default. This is useful primarily to make images loadable by older qemu (without msix). Even when MSI-X is disabled by flag, you can still load images that have MSI-X enabled. Signed-off-by: Michael S. Tsirkin --- hw/msix.c |3 +++ qemu-options.hx

[PATCHv3 02/13] qemu: capability bits in pci save/restore

2009-06-05 Thread Michael S. Tsirkin
Add support for capability bits in save/restore for pci. These will be used for MSI, where the capability might be present or not as requested by user, which does not map well into a single version number. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 14 -- hw/pci.h |4

[PATCHv3 10/13] qemu: MSI-X support in virtio PCI

2009-06-05 Thread Michael S. Tsirkin
This enables actual support for MSI-X in virtio PCI. First user will be virtio-net. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 152 -- 1 files changed, 112 insertions(+), 40 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio

[PATCHv3 13/13] qemu: add pci_get/set_byte

2009-06-05 Thread Michael S. Tsirkin
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 8e74033..7cc9a8a 100644 --- a/hw/pci.h

[PATCHv3 01/13] qemu: make default_write_config use mask table

2009-06-05 Thread Michael S. Tsirkin
devices, depending on capabilities present. As a result, writing a single byte in BAR registers now works as it should. Writing to upper limit registers in the bridge also works as it should. Code is also shorter. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 145

[PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-05 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 98 -- hw/pci.h | 18 +++- 2 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hw/pci.c b

[PATCHv3 09/13] qemu: virtio support for many interrupt vectors

2009-06-05 Thread Michael S. Tsirkin
to bindings yet, so they are left stubbed out for now. Signed-off-by: Michael S. Tsirkin --- hw/syborg_virtio.c | 13 -- hw/virtio-pci.c| 24 +++ hw/virtio.c| 63 ++- hw/virtio.h| 10 ++- 4

[PATCHv3 05/13] qemu: MSI-X support functions

2009-06-05 Thread Michael S. Tsirkin
Add functions implementing MSI-X support. First user will be virtio-pci. Note that platform must set a flag to declare MSI supported. For PC this will be set by APIC. Signed-off-by: Michael S. Tsirkin --- Makefile.target |2 +- hw/msix.c | 423

[PATCHv3 11/13] qemu: request 3 vectors in virtio-net

2009-06-05 Thread Michael S. Tsirkin
Request up to 3 vectors in virtio-net. Actual bindings might supply less. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 60aa6da..6118fe3 100644 --- a/hw/virtio-net.c +++ b/hw

[PATCHv3 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-05 Thread Michael S. Tsirkin
reserved in APIC MMIO and vice versa. Signed-off-by: Michael S. Tsirkin --- hw/apic.c | 43 +++ 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 8c8b2de..ed03a36 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -19,6 +19,8

[PATCHv3 12/13] qemu: virtio save/load bindings

2009-06-05 Thread Michael S. Tsirkin
Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 49 - hw/virtio.c | 31 ++- hw/virtio.h |4 3 files changed, 66 insertions

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 12:19:42AM +0100, Paul Brook wrote: > On Monday 25 May 2009, Michael S. Tsirkin wrote: > > Add functions implementing MSI-X support. First user will be virtio-pci. > > Note that platform must set a flag to declare MSI supported. > > For PC thi

Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:11:14PM -0300, Glauber Costa wrote: > On Fri, Jun 05, 2009 at 01:23:15PM +0300, Michael S. Tsirkin wrote: > > Add routines to manage PCI capability list. First user will be MSI-X. > > > > Signed-off-by: Michael S. Tsirkin > &g

Re: [Qemu-devel] [PATCHv3 05/13] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:26:27PM -0300, Glauber Costa wrote: > On Fri, Jun 05, 2009 at 01:23:31PM +0300, Michael S. Tsirkin wrote: > > Add functions implementing MSI-X support. First user will be virtio-pci. > > Note that platform must set a flag to declare MSI supported. > >

Re: [Qemu-devel] [PATCHv3 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:33:33PM -0300, Glauber Costa wrote: > > env = cpu_single_env; > > if (!env) > > @@ -727,7 +762,6 @@ static void apic_mem_writel(void *opaque, > > target_phys_addr_t addr, uint32_t val) > > printf("APIC write: %08x = %08x\n", (uint32_t)addr, val); > > #end

Re: [Qemu-devel] [PATCHv3 08/13] qemu: add support for resizing regions

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:36:21PM -0300, Glauber Costa wrote: > On Fri, Jun 05, 2009 at 01:23:55PM +0300, Michael S. Tsirkin wrote: > > Make it possible to resize PCI regions. This will be used by virtio > > with MSI-X, where the region size depends on whether MSI-X is enabl

Re: [Qemu-devel] [PATCHv3 12/13] qemu: virtio save/load bindings

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:45:54PM -0300, Glauber Costa wrote: > duplicated save config. > > > diff --git a/hw/virtio.h b/hw/virtio.h > > index 04a3c3d..ce05517 100644 > > --- a/hw/virtio.h > > +++ b/hw/virtio.h > > @@ -72,6 +72,10 @@ typedef struct VirtQueueElement > > > > typedef struct { > >

Re: [Qemu-devel] [PATCHv3 08/13] qemu: add support for resizing regions

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:36:21PM -0300, Glauber Costa wrote: > On Fri, Jun 05, 2009 at 01:23:55PM +0300, Michael S. Tsirkin wrote: > > Make it possible to resize PCI regions. This will be used by virtio > > with MSI-X, where the region size depends on whether MSI-X is enabl

Re: [Qemu-devel] [PATCHv3 12/13] qemu: virtio save/load bindings

2009-06-10 Thread Michael S. Tsirkin
On Tue, Jun 09, 2009 at 02:45:54PM -0300, Glauber Costa wrote: > duplicated save config. Good catch. Fixed. -- MST ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualizat

[PATCHv4 01/13] qemu: make default_write_config use mask table

2009-06-10 Thread Michael S. Tsirkin
devices, depending on capabilities present. As a result, writing a single byte in BAR registers now works as it should. Writing to upper limit registers in the bridge also works as it should. Code is also shorter. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 145

[PATCHv4 02/13] qemu: capability bits in pci save/restore

2009-06-10 Thread Michael S. Tsirkin
Add support for capability bits in save/restore for pci. These will be used for MSI, where the capability might be present or not as requested by user, which does not map well into a single version number. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 17 ++--- hw/pci.h |4

[PATCHv4 03/13] qemu: add routines to manage PCI capabilities

2009-06-10 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 79 ++ hw/pci.h | 18 +- 2 files changed, 96 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b

[PATCHv4 04/13] qemu: helper routines for pci access

2009-06-10 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h b/hw/pci.h

[PATCHv4 05/13] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
set by APIC. Signed-off-by: Michael S. Tsirkin --- Makefile.target |2 +- hw/msix.c | 417 +++ hw/msix.h | 35 + hw/pci.h| 20 +++ 4 files changed, 473 insertions(+), 1 deletions(-) create mode 100644 hw/msix.c

[PATCHv4 06/13] qemu: add flag to disable MSI-X by default

2009-06-10 Thread Michael S. Tsirkin
Add global flag to disable MSI-X by default. This is useful primarily to make images loadable by older qemu (without msix). Even when MSI-X is disabled by flag, you can still load images that have MSI-X enabled. Signed-off-by: Michael S. Tsirkin --- hw/msix.c |3 +++ qemu-options.hx

[PATCHv4 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-10 Thread Michael S. Tsirkin
reserved in APIC MMIO and vice versa. Signed-off-by: Michael S. Tsirkin --- hw/apic.c | 43 +++ 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 8c8b2de..ed03a36 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -19,6 +19,8

[PATCHv4 00/13] qemu: MSI-X support

2009-06-10 Thread Michael S. Tsirkin
I posted previously, and which is included in the series. -- MST Michael S. Tsirkin (13): qemu: make default_write_config use mask table qemu: capability bits in pci save/restore qemu: add routines to manage PCI capabilities qemu: helper routines for pci access qemu: MSI-X support functions q

[PATCHv4 09/13] qemu: virtio support for many interrupt vectors

2009-06-10 Thread Michael S. Tsirkin
to bindings yet, so they are left stubbed out for now. Signed-off-by: Michael S. Tsirkin --- hw/syborg_virtio.c | 13 -- hw/virtio-pci.c| 24 hw/virtio.c| 59 ++- hw/virtio.h| 10 +++- 4

[PATCHv4 10/13] qemu: MSI-X support in virtio PCI

2009-06-10 Thread Michael S. Tsirkin
This enables actual support for MSI-X in virtio PCI. First user will be virtio-net. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 152 -- 1 files changed, 112 insertions(+), 40 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio

[PATCHv4 08/13] qemu: add support for resizing regions

2009-06-10 Thread Michael S. Tsirkin
Make it possible to resize PCI regions. This will be used by virtio with MSI-X, where the region size depends on whether MSI-X is enabled, and can change across load/save. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 54 -- hw/pci.h

[PATCHv4 11/13] qemu: request 3 vectors in virtio-net

2009-06-10 Thread Michael S. Tsirkin
Request up to 3 vectors in virtio-net. Actual bindings might supply less. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 60aa6da..6118fe3 100644 --- a/hw/virtio-net.c +++ b/hw

[PATCHv4 12/13] qemu: virtio save/load bindings

2009-06-10 Thread Michael S. Tsirkin
Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 50 +- hw/virtio.c | 33 - hw/virtio.h |4 3 files changed, 69 insertions

[PATCHv4 13/13] qemu: add pci_get/set_byte

2009-06-10 Thread Michael S. Tsirkin
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 9455e4c..07404c5 100644 --- a/hw/pci.h

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
't add an option for platforms to disable MSI-X in all devices. Paul Brook will find and fix all platforms that have broken MSI-X emulation. Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/apic.c b/hw/apic.c index ed03a36..9d44061 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -945,7 +

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 03:39:05PM +0100, Paul Brook wrote: > > > If we really need to avoid MSI-X capable devices then that should be done > > > explicity per-device. i.e. you have a different virtio-net device that > > > does not use MSI-X. > > > > > > Paul > > > > Why should it be done per-devic

Re: TODO list for qemu+KVM networking performance v2

2009-06-10 Thread Michael S. Tsirkin
On Thu, Jun 11, 2009 at 12:09:33AM +0930, Rusty Russell wrote: > On Wed, 10 Jun 2009 03:56:31 pm Dor Laor wrote: > > Rusty Russell wrote: > > > The current theoretical hole is that the host suppresses notifications > > > using the VIRTIO_AVAIL_F_NO_NOTIFY flag, but we can get a number of > > > noti

Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 11:55:40AM -0300, Glauber Costa wrote: > On Wed, Jun 10, 2009 at 12:54:15PM +0300, Michael S. Tsirkin wrote: > > On Tue, Jun 09, 2009 at 02:11:14PM -0300, Glauber Costa wrote: > > > On Fri, Jun 05, 2009 at 01:23:15PM +0300, Michael S. Tsirkin wrote: >

Re: TODO list for qemu+KVM networking performance v2

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 06:18:01PM +0300, Avi Kivity wrote: > Michael S. Tsirkin wrote: >> But I don't understand how aio will make implementing it easier - >> or are you merely saying that it will make it worthwhile? >> > > If you have aio, the the NIC and th

Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 04:24:28PM +0100, Paul Brook wrote: > > > caps can be anywhere, but we don't expect it to change during machine > > > execution lifetime. > > > > > > Or I am just confused by the name "pci_device_load" ? > > > > Right. So I want to load an image and it has capability X at of

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 04:15:04PM +0100, Paul Brook wrote: > > > That's seems just plain wrong to me. > > > Loading a VM shouldn't not > > > do anything that can't happen during normal operation. > > > > At least wrt pci, we are very far from this state: load just overwrites > > all registers, rea

Re: TODO list for qemu+KVM networking performance v2

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 07:08:49PM +0300, Avi Kivity wrote: > Michael S. Tsirkin wrote: >> On Wed, Jun 10, 2009 at 06:18:01PM +0300, Avi Kivity wrote: >> >>> Michael S. Tsirkin wrote: >>> >>>> But I don't understand how aio will make impl

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 05:08:15PM +0100, Paul Brook wrote: > On Wednesday 10 June 2009, Michael S. Tsirkin wrote: > > On Wed, Jun 10, 2009 at 04:15:04PM +0100, Paul Brook wrote: > > > > > That's seems just plain wrong to me. > > > > > Loading a VM sh

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 05:46:03PM +0100, Paul Brook wrote: > > > If you can't create an identical machine from scratch then I don't > > > consider snapshot/migration to be a useful feature. i.e. as soon as you > > > shutdown and restart the guest it is liable to break anyway. > > > > Why is liable

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 06:30:16PM +0100, Paul Brook wrote: > On Wednesday 10 June 2009, Michael S. Tsirkin wrote: > > On Wed, Jun 10, 2009 at 05:46:03PM +0100, Paul Brook wrote: > > > > > If you can't create an identical machine from scratch then I don't > &

Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 06:43:02PM +0100, Jamie Lokier wrote: > Paul Brook wrote: > > > > caps can be anywhere, but we don't expect it to change during machine > > > > execution lifetime. > > > > > > > > Or I am just confused by the name "pci_device_load" ? > > > > > > Right. So I want to load an i

Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions

2009-06-11 Thread Michael S. Tsirkin
On Wed, Jun 10, 2009 at 08:04:13PM +0100, Paul Brook wrote: > > > If we can't start a new qemu with the same hardware configuration then we > > > should not be allowing migration or loading of snapshots. > > > > OK, so I'll add an option in virtio-net to disable msi-x, and such > > an option will b

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Michael S. Tsirkin
On Fri, Jun 12, 2009 at 09:43:29AM +0100, Mark McLoughlin wrote: > = Solution - Separate configuration from compat hints = > > As I suggested before: > > - Allow the VM manager to dump compat hints; this would be an opaque > file format, more like the savevm format than a config file Why

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-14 Thread Michael S. Tsirkin
On Fri, Jun 12, 2009 at 04:53:27PM +0100, Mark McLoughlin wrote: > On Fri, 2009-06-12 at 09:55 -0500, Anthony Liguori wrote: > > Mark McLoughlin wrote: > > > On Wed, 2009-06-10 at 20:27 +0100, Jamie Lokier wrote: > > > > > > = Solution - Separate configuration from compat hints = > > > > > > As

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-14 Thread Michael S. Tsirkin
On Sun, Jun 14, 2009 at 12:37:13PM +0300, Avi Kivity wrote: > Michael S. Tsirkin wrote: >> >> If we want to remove a device from under a running guest, you need >> hotplug. So we can't just remove several lines from the config and hope >> that it'll work sim

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-14 Thread Michael S. Tsirkin
On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: > However, in order to retain compat for that SCSI device (e.g. ensuring > the PCI address doesn't change as other devices are added an removed), > we're back to the same problem ... either: > > 1) Use '-drive file=foo.img,if=scsi,

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 12:43:48PM +0300, Avi Kivity wrote: > On 06/14/2009 12:50 PM, Michael S. Tsirkin wrote: >> On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: >> >>> However, in order to retain compat for that SCSI device (e.g. ensuring >>&g

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 12:27:08PM +0300, Avi Kivity wrote: > On 06/15/2009 12:08 PM, Mark McLoughlin wrote: >>> This last option makes sense to me: in a real world the user has >>> control over where he places the device on the bus, so why >>> not with qemu? >>> >> >> Yep, most people seem t

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 01:44:56PM +0300, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 01:32:49PM +0300, Michael S. Tsirkin wrote: > > > You do need to export available slot numbers from qemu. > > > > Why would a slot be unavailable? > > > Because it does not

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 01:52:13PM +0300, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 01:46:53PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 15, 2009 at 01:44:56PM +0300, Gleb Natapov wrote: > > > On Mon, Jun 15, 2009 at 01:32:49PM +0300, Michael S. Tsirkin wrote: > &

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 02:14:15PM +0300, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 02:07:53PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 15, 2009 at 01:52:13PM +0300, Gleb Natapov wrote: > > > On Mon, Jun 15, 2009 at 01:46:53PM +0300, Michael S. Tsirkin wrote: >

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 02:27:14PM +0300, Avi Kivity wrote: > On 06/15/2009 01:32 PM, Michael S. Tsirkin wrote: >>> You do need to export available slot numbers from qemu. >>> >> >> Why would a slot be unavailable? >> > > A slot needs to

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 02:56:42PM +0300, Avi Kivity wrote: > On 06/15/2009 02:48 PM, Michael S. Tsirkin wrote: >>> A slot needs to be configured in ACPI, >>> >> >> Can we configure all possible 32 slots? >> > > That's what we do. But

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 09:20:00AM -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: >> On Mon, 2009-06-15 at 07:48 -0500, Anthony Liguori wrote: >> Eventually the default configuration becomes increasingly unusable and you need a new baseline. You must still be able to fall bac

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 09:24:32AM -0500, Anthony Liguori wrote: > Dor Laor wrote: >> Libvirt does not support r2d. I hope it won't start to support it. > > It supports mips, sparc, and ppc machines now. I don't see why it > wouldn't support r2d. For ppcemb, I expect this same problem to occur.

Re: [PATCHv4 01/13] qemu: make default_write_config use mask table

2009-06-17 Thread Michael S. Tsirkin
On Tue, Jun 16, 2009 at 03:40:13PM -0500, Anthony Liguori wrote: > Michael S. Tsirkin wrote: >> Change much of hw/pci to use symbolic constants and a table-driven >> design: add a mask table with writable bits set and readonly bits unset. >> Detect change by comparing origi

[PATCHv5 02/13] qemu: capability bits in pci save/restore

2009-06-18 Thread Michael S. Tsirkin
Add support for capability bits in save/restore for pci. These will be used for MSI, where the capability might be present or not as requested by user, which does not map well into a single version number. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 17 ++--- hw/pci.h |4

[PATCHv5 03/13] qemu: add routines to manage PCI capabilities

2009-06-18 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 79 ++ hw/pci.h | 18 +- 2 files changed, 96 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b

[PATCHv5 01/13] qemu: make default_write_config use mask table

2009-06-18 Thread Michael S. Tsirkin
devices, depending on capabilities present. As a result, writing a single byte in BAR registers now works as it should. Writing to upper limit registers in the bridge also works as it should. Code is also shorter. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 145

[PREFIXv5 00/13] qemu: MSI-X support

2009-06-18 Thread Michael S. Tsirkin
PIC and MSI-X implementation This uses the mask table patch that I posted previously, and which is included in the series. -- MST Michael S. Tsirkin (13): qemu: make default_write_config use mask table qemu: capability bits in pci save/restore qemu: add routines to manage PCI capabili

[PATCHv5 05/13] qemu: MSI-X support functions

2009-06-18 Thread Michael S. Tsirkin
set by APIC. Signed-off-by: Michael S. Tsirkin --- Makefile.target |2 +- hw/msix.c | 417 +++ hw/msix.h | 35 + hw/pci.h| 20 +++ 4 files changed, 473 insertions(+), 1 deletions(-) create mode 100644 hw/msix.c

[PATCHv5 06/13] qemu: add flag to disable MSI-X by default

2009-06-18 Thread Michael S. Tsirkin
Add global flag to disable MSI-X by default. This is useful primarily to make images loadable by older qemu (without msix). Even when MSI-X is disabled by flag, you can still load images that have MSI-X enabled. Signed-off-by: Michael S. Tsirkin --- hw/msix.c |5 - qemu

[PATCHv5 04/13] qemu: helper routines for pci access

2009-06-18 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h b/hw/pci.h

[PATCHv5 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-18 Thread Michael S. Tsirkin
reserved in APIC MMIO and vice versa. Signed-off-by: Michael S. Tsirkin --- hw/apic.c | 43 +++ 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 3e04132..3bcab46 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -19,6 +19,8

[PATCHv5 12/13] qemu: virtio save/load bindings

2009-06-18 Thread Michael S. Tsirkin
Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 50 +- hw/virtio.c | 33 - hw/virtio.h |4 3 files changed, 69 insertions

[PATCHv5 08/13] qemu: add support for resizing regions

2009-06-18 Thread Michael S. Tsirkin
Make it possible to resize PCI regions. This will be used by virtio with MSI-X, where the region size depends on whether MSI-X is enabled, and can change across load/save. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 53 +++-- hw/pci.h

[PATCHv5 13/13] qemu: add pci_get/set_byte

2009-06-18 Thread Michael S. Tsirkin
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 67e4b4d..303179d 100644 --- a/hw/pci.h

[PATCHv5 11/13] qemu: request 3 vectors in virtio-net

2009-06-18 Thread Michael S. Tsirkin
Request up to 3 vectors in virtio-net. Actual bindings might supply less. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index d584287..c8dabbe 100644 --- a/hw/virtio-net.c +++ b/hw

[PATCHv5 09/13] qemu: virtio support for many interrupt vectors

2009-06-18 Thread Michael S. Tsirkin
to bindings yet, so they are left stubbed out for now. Signed-off-by: Michael S. Tsirkin --- hw/syborg_virtio.c | 13 -- hw/virtio-pci.c| 24 hw/virtio.c| 59 ++- hw/virtio.h| 10 +++- 4

[PATCHv5 10/13] qemu: MSI-X support in virtio PCI

2009-06-18 Thread Michael S. Tsirkin
This enables actual support for MSI-X in virtio PCI. First user will be virtio-net. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 152 -- rules.mak |2 +- 2 files changed, 113 insertions(+), 41 deletions(-) diff --git a

Re: [Qemu-devel] [PATCHv5 08/13] qemu: add support for resizing regions

2009-06-18 Thread Michael S. Tsirkin
On Thu, Jun 18, 2009 at 05:32:11PM +0100, Paul Brook wrote: > On Thursday 18 June 2009, Michael S. Tsirkin wrote: > > Make it possible to resize PCI regions. This will be used by virtio > > with MSI-X, where the region size depends on whether MSI-X is enabled, > > and can ch

[PATCHv6 00/12] qemu: MSI-X support

2009-06-21 Thread Michael S. Tsirkin
d due to mask -> wmask rename. Isaku Yamahata, maybe you want to update your patch series with that. -- MST Michael S. Tsirkin (12): qemu/pci: make default_write_config use mask table qemu/pci: helper routines for pci access qemu/pci: add routines to manage PCI capabilities qemu/pci: che

[PATCHv6 01/12] qemu/pci: make default_write_config use mask table

2009-06-21 Thread Michael S. Tsirkin
devices, depending on capabilities present. As a result, writing a single byte in BAR registers now works as it should. Writing to upper limit registers in the bridge also works as it should. Code is also shorter. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 145

[PATCHv6 02/12] qemu/pci: helper routines for pci access

2009-06-21 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h b/hw/pci.h

[PATCHv6 03/12] qemu/pci: add routines to manage PCI capabilities

2009-06-21 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 74 +- hw/pci.h | 18 ++- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b

<    1   2   3   4   5   6   7   8   9   10   >