Re: [Qemu-devel] [PATCH] ivshmem: add 64bit option

2012-08-21 Thread Cam Macdonell
gt; Memory at fd40 (32-bit, non-prefetchable) [disabled] [size=256] > Memory at 804000 (64-bit, prefetchable) [size=1G] > > [ v3: rebase & adapt to latest master ] > [ v2: default to on as suggested by avi, > turn off for pc-$old using compat property

[Qemu-devel] ivshmem assertion failure with EventNotifier

2012-08-21 Thread Cam Macdonell
Hi Paolo, I've noticed an assertion error when sending interrupts via ivshmem. I bisected to this patch. commit 563027cc0c94aa4846c18f9d665a4c90f8c42ba8 Author: Paolo Bonzini Date: Thu Jul 5 17:16:25 2012 +0200 ivshmem: use EventNotifier and memory API All of ivshmem's usage of event

Re: [Qemu-devel] ivshmem assertion failure with EventNotifier

2012-08-22 Thread Cam Macdonell
On Wed, Aug 22, 2012 at 6:01 AM, Paolo Bonzini wrote: > Il 22/08/2012 06:29, Cam Macdonell ha scritto: >> Hi Paolo, >> >> I've noticed an assertion error when sending interrupts via ivshmem. >> I bisected to this patch. > > Does this help? Yes, that solves i

[Qemu-devel] MSI-X bug with ivshmem since msix_reset moved to PCI

2012-08-23 Thread Cam Macdonell
Hi Jan, I've bisected a bug in which MSI interrupts are not being delivered to the following patch, where msix_reset was moved in tot he PCI core. commit cbd2d4342b3d42ab33baa99f5b7a23491b5692f2 Author: Jan Kiszka Date: Tue May 15 20:09:56 2012 -0300 msi: Invoke msi/msix_reset from PCI co

Re: [Qemu-devel] [PATCH v2][for 1.2?] msix: Drop tracking of used vectors

2012-08-24 Thread Cam Macdonell
also unbreaks MSI-X after reset for ivshmem and megasas as device > models can't easily mark their vectors used afterward (megasas didn't > even try). > > Signed-off-by: Jan Kiszka Tested-by: Cam Macdonell > --- > > This patch has been posted some moons again, and we had

[Qemu-devel] [PATCH for-1.2] ivshmem: remove redundant ioeventfd configuration

2012-08-27 Thread Cam Macdonell
setup_ioeventfds() is unnecessary and actually causes a segfault when used ioeventfd=on is used on the command-line. Since ioeventfds are handled within the memory API, it can be removed. Signed-off-by: Cam Macdonell --- hw/ivshmem.c | 15 --- 1 files changed, 0 insertions(+), 15

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-04 Thread Cam Macdonell
On Tue, Dec 4, 2012 at 4:10 AM, Andrew Jones wrote: > > > - Original Message - >> On Thu, Nov 29, 2012 at 1:34 AM, liu ping fan >> wrote: >> > On Thu, Nov 29, 2012 at 12:42 PM, Cam Macdonell >> > wrote: >> >> On Tue, Nov 27, 2012 at 7:5

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-04 Thread Cam Macdonell
On Sat, Nov 24, 2012 at 8:51 PM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Using irqfd, so we can avoid switch between kernel and user when > VMs interrupts each other. > Hi Liu Ping, With this patch applied I was still seeing transitions to user-level on the receipt of an msi interrupt. un

Re: [Qemu-devel] [PATCH v2 1/2] ivshmem: remove msix_write_config

2012-12-04 Thread Cam Macdonell
On Sat, Nov 24, 2012 at 8:51 PM, Liu Ping Fan wrote: > From: Liu Ping Fan > > This logic has been integrated into pci core, so remove it. > > Signed-off-by: Liu Ping Fan Signed-off-by: Cam Macdonell > --- > hw/ivshmem.c |1 - > 1 files changed, 0 insertions(+),

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-05 Thread Cam Macdonell
On Wed, Dec 5, 2012 at 1:50 AM, Jan Kiszka wrote: > On 2012-12-05 06:34, Cam Macdonell wrote: >>> static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address, >>> uint32_t val, int len) >>> { >>> +bool is_ena

Re: [Qemu-devel] [PATCH for-1.2] msix: make [un]use vectors on reset/load optional

2012-08-29 Thread Cam Macdonell
Yes, will test shortly. Cam On Wed, Aug 29, 2012 at 10:47 AM, Michael S. Tsirkin wrote: > On Wed, Aug 29, 2012 at 06:44:49PM +0200, Jan Kiszka wrote: >> On 2012-08-29 18:40, Michael S. Tsirkin wrote: >> > The facility to use/unuse vectors dynamically is helpful >> > for virtio but little else: e

Re: [Qemu-devel] [PATCH for-1.2] msix: make [un]use vectors on reset/load optional

2012-08-29 Thread Cam Macdonell
and load. > For virtio, clear it explicitly. > This should fix regressions reported with ivshmem - though > I didn't test this, I verified that virtio keeps > working like it did. > > Signed-off-by: Michael S. Tsirkin Tested-by: Cam Macdonell > --- > hw/msix.c

Re: [Qemu-devel] [PATCH v4] ivshmem: add 64bit option

2012-08-31 Thread Cam Macdonell
turn off for pc-$old using compat property ] > > Signed-off-by: Gerd Hoffmann > Tested-by: Cam Macdonell > --- > hw/ivshmem.c | 13 ++--- > hw/pc_piix.c |4 > 2 files changed, 14 insertions(+), 3 deletions(-) > > diff --git a/hw/ivshmem.c b/hw/ivsh

Re: [Qemu-devel] [Bug 1314857] Re: seg fault in ivshmem when using ioeventfd=on

2014-05-15 Thread Cam Macdonell
Hello, The patch for this later bug has been proposed. I'm not sure why it's not merged. http://patchwork.ozlabs.org/patch/316785/ Cheers, Cam On Thu, May 1, 2014 at 10:53 AM, Gene Snider wrote: > When I tried the same thing with git master (latest) I get a different > error: > qemu_chr_f

[Qemu-devel] [RFC] mmap of BAR0 fails for ivshmem device

2014-08-29 Thread Cam Macdonell
Hello, A bug was reported to me regarding mmaping of BAR0 in ivshmem. Indeed the mmap fails. This bug will affect those using the ivshmem server as BAR0 contains the registers for sending and receiving interrupts. It does not affect those mapping just the shared memory region. I have bisected

Re: [Qemu-devel] [PATCH master/v1.0.x] ivshmem: add missing msix calls

2012-01-13 Thread Cam Macdonell
fields, > and reset is rarely used, but the patch 'msix: track function masked > in pci device state' broke that. Fix by adding appropriate calls. > > Signed-off-by: Michael S. Tsirkin > Reported-by: Cam Macdonell > Tested-by: Cam Macdonell > > --- > > Please

Re: [Qemu-devel] [PATCH] ivshmem: fix guest unable to start with ioeventfd

2012-01-13 Thread Cam Macdonell
Can this patch please be merged? It fixes an important regression with ioeventfd. Thanks, Cam On Thu, Nov 24, 2011 at 3:05 AM, wrote: > From: Hongyong Zang > > When a guest boots with ioeventfd, an error (by gdb) occurs: >  Program received signal SIGSEGV, Segmentation fault. >  0x006

Re: [Qemu-devel] [PATCH] vmstate: Add unmigratable flag

2011-06-19 Thread Cam Macdonell
On Thu, Jun 9, 2011 at 2:39 PM, Jan Kiszka wrote: > On 2011-06-09 22:00, Anthony Liguori wrote: >> On 06/09/2011 11:44 AM, Jan Kiszka wrote: >>> A first step towards getting rid of register_device_unmigratable >>> (ivshmem and lacking vmstate support in virtio are blocking this): >>> >>> Allow to

Re: [Qemu-devel] [PATCH] vmstate: Add unmigratable flag

2011-06-21 Thread Cam Macdonell
On Mon, Jun 20, 2011 at 3:05 AM, Jan Kiszka wrote: > On 2011-06-19 22:46, Cam Macdonell wrote: >> On Thu, Jun 9, 2011 at 2:39 PM, Jan Kiszka wrote: >>> On 2011-06-09 22:00, Anthony Liguori wrote: >>>> On 06/09/2011 11:44 AM, Jan Kiszka wrote: >>>

Re: [Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time

2011-11-15 Thread Cam Macdonell
On Sun, Nov 13, 2011 at 8:56 PM, wrote: > From: Hongyong Zang > > Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running on > the same host. Currently, guest notifies qemu by reading or writing ivshmem > device's PCI MMIO BAR0(Doorbell). > > This patch, changes this PCI MMIO

Re: [Qemu-devel] Questions regarding ivshmem spec

2011-08-29 Thread Cam Macdonell
On Mon, Aug 29, 2011 at 9:25 AM, Sasha Levin wrote: > On Thu, 2011-08-25 at 16:29 +0300, Sasha Levin wrote: >> Hello, >> >> I am looking to implement an ivshmem device for KVM tools, the purpose >> is to provide same functionality as QEMU and interoperability with QEMU. > > [snip] > >> 1. File han

Re: [Qemu-devel] Questions regarding ivshmem spec

2011-08-30 Thread Cam Macdonell
On Thu, Aug 25, 2011 at 7:29 AM, Sasha Levin wrote: > Hello, > > I am looking to implement an ivshmem device for KVM tools, the purpose > is to provide same functionality as QEMU and interoperability with QEMU. > > Going through the spec (I found here: > https://gitorious.org/nahanni/guest-code/bl

Re: [Qemu-devel] [PATCH RFC] char: fix avail_connections init in qemu_chr_open_eventfd()

2014-02-13 Thread Cam Macdonell
Hi David, I'm not sure which is the correct approach. You could either do what you did or you could simply remove the qemu_chr_fe_claim_no_fail() from ivshmem.c. I'm not sure how your change impacts other devices. Sincerely, Cam On Tue, Feb 4, 2014 at 2:17 PM, David Marchand wrote: > Hello,

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-11-27 Thread Cam Macdonell
On Sat, Nov 24, 2012 at 8:51 PM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Using irqfd, so we can avoid switch between kernel and user when > VMs interrupts each other. Nice work. Due to a hardware failure, there will be a small delay in me being able to test this. I'll follow up as soon as

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-11-28 Thread Cam Macdonell
On Tue, Nov 27, 2012 at 7:53 PM, liu ping fan wrote: > On Wed, Nov 28, 2012 at 5:48 AM, Cam Macdonell wrote: >> On Sat, Nov 24, 2012 at 8:51 PM, Liu Ping Fan wrote: >>> From: Liu Ping Fan >>> >>> Using irqfd, so we can avoid switch between kernel and use

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-11-29 Thread Cam Macdonell
On Thu, Nov 29, 2012 at 1:34 AM, liu ping fan wrote: > On Thu, Nov 29, 2012 at 12:42 PM, Cam Macdonell wrote: >> On Tue, Nov 27, 2012 at 7:53 PM, liu ping fan wrote: >>> On Wed, Nov 28, 2012 at 5:48 AM, Cam Macdonell wrote: >>>> On Sat, Nov 24, 2012 at 8:51 PM, L

Re: [Qemu-devel] help me for nahanni device

2013-07-02 Thread Cam Macdonell
Hello Dai, Which qemu version you are using? When you say QEMU/KVM "doesn't work", do you mean it does not start? Cam On Mon, Jul 1, 2013 at 12:39 AM, DAI Weibin wrote: > Hi all, > When use nahanni device as following, The QEMU/KVM doesn’t work. > I attach two ivshmem devices to VM, QEMU/KV

Re: [Qemu-devel] help me for nahanni device

2013-07-03 Thread Cam Macdonell
; ** ** > > Dai weibin > > ** ** > > *From:* c...@ualberta.ca [mailto:c...@ualberta.ca] *On Behalf Of *Cam > Macdonell > *Sent:* 2013年7月3日 0:20 > *To:* DAI Weibin > *Cc:* qemu-devel@nongnu.org > *Subject:* Re: [Qemu-devel] help me for nahanni device > >

Re: [Qemu-devel] [PATCH] ivshmem: fix guest unable to start with ioeventfd

2011-11-24 Thread Cam Macdonell
On Thu, Nov 24, 2011 at 3:05 AM, wrote: > From: Hongyong Zang > > When a guest boots with ioeventfd, an error (by gdb) occurs: >  Program received signal SIGSEGV, Segmentation fault. >  0x006009cc in setup_ioeventfds (s=0x171dc40) >      at /home/louzhengwei/git_source/qemu-kvm/hw/ivshme

Re: [Qemu-devel] [PATCH v2] ivshmem: add a new PIO BAR3(Doorbell) besides MMIO BAR0 to reduce notification time

2011-11-28 Thread Cam Macdonell
On Thu, Nov 17, 2011 at 10:50 PM, wrote: > From: Hongyong Zang > > This patch, adds a PIO BAR3 for guest notifying qemu. And we find the new > notification way of PIO BAR3 reduces 30% time in comparison with the original > MMIO BAR0 way. Come to think of it, should we bump the PIO to BAR4 so

Re: [Qemu-devel] [PATCH] ivshmem: fix guest unable to start with ioeventfd

2011-11-30 Thread Cam Macdonell
2011/11/30 Zang Hongyong : > Can this bug fix patch be applied yet? Sorry, for not replying yet. I'll test your patch within the next day. > With this bug, guest os cannot successfully boot with ioeventfd. > Thus the new PIO DoorBell patch cannot be posted. Well, you can certainly post the new

Re: [Qemu-devel] [PATCH] ivshmem: fix guest unable to start with ioeventfd

2011-12-02 Thread Cam Macdonell
2011/11/30 Cam Macdonell : > 2011/11/30 Zang Hongyong : >> Can this bug fix patch be applied yet? > > Sorry, for not replying yet. I'll test your patch within the next day. Have you confirmed the proper receipt of interrupts in the receiving guests? I can confirm the bug o

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-02 Thread Cam Macdonell
Based on a git bisect, this patch breaks msi-x interrupt delivery in the ivshmem device. On Mon, Nov 21, 2011 at 9:57 AM, Michael S. Tsirkin wrote: > Only go over the table when function is masked. > This is not really important for qemu.git but helps > fix a bug in qemu-kvm.git. > > Signed-off-b

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-04 Thread Cam Macdonell
On Sun, Dec 4, 2011 at 3:20 AM, Michael S. Tsirkin wrote: > On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: >> Based on a git bisect, this patch breaks msi-x interrupt delivery in >> the ivshmem device. > > I think the following should fix it. Compiled-only -

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-05 Thread Cam Macdonell
On Mon, Dec 5, 2011 at 2:08 AM, Michael S. Tsirkin wrote: > On Sun, Dec 04, 2011 at 04:47:17PM -0700, Cam Macdonell wrote: >> On Sun, Dec 4, 2011 at 3:20 AM, Michael S. Tsirkin wrote: >> > On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: >> >> Bas

Re: [Qemu-devel] [PATCH] ivshmem: fix guest unable to start with ioeventfd

2011-12-05 Thread Cam Macdonell
2011/12/2 Cam Macdonell : > 2011/11/30 Cam Macdonell : >> 2011/11/30 Zang Hongyong : >>> Can this bug fix patch be applied yet? >> >> Sorry, for not replying yet. I'll test your patch within the next day. > > Have you confirmed the proper receipt of inte

Re: [Qemu-devel] [PATCH 1/2] docs: update ivshmem device spec

2014-06-26 Thread Cam Macdonell
Hi, Thank you for everyone's interest and work on this. Sorry I haven't been...better. I will offer my knowledge where it helps. And the server is GPL in case that was seen as an issue. On Mon, Jun 23, 2014 at 8:18 AM, Claudio Fontana wrote: > Hi, > > we were reading through this quickly tod

Re: [Qemu-devel] [PATCH 1/2] docs: update ivshmem device spec

2014-06-26 Thread Cam Macdonell
Hi Vince, Yes, I did see the patches for the new server. I will review within the week. Cheers, Cam On Thu, Jun 26, 2014 at 9:37 AM, Vincent JARDIN wrote: > Hi Cam, > > FYI, David did implement a new server. > http://lists.nongnu.org/archive/html/qemu-devel/2014-06/msg04978.html > > which

Re: [Qemu-devel] Why I advise against using ivshmem

2014-06-26 Thread Cam Macdonell
Hello, Just to add my two bits. I will fully support getting all the necessary parts of ivshmem into tree where appropriate, both qemu and a driver in Linux. I understand those concerns. I do not have the time to fully maintain ivshmem at the level needed, but I will help as much as I can. Sor

[Qemu-devel] Cannot not unplug cold-plugged devices

2010-11-11 Thread Cam Macdonell
Hi, I was trying to do a "device_del" on my ivshmem device and it won't work unless the device is added via hotplug. If the device is coldplugged (added at startup) then nothing happens. I think I tracked this behaviour to the patch below. Is not allowing coldplugged devices to be unplugged the

[Qemu-devel] Re: [PATCH] pci: allow hotplug removal of cold-plugged devices

2010-11-15 Thread Cam Macdonell
so fixes an assert on hotplug removal of coldplugged > express devices. > > Reported-by: by Cam Macdonell . > Signed-off-by: Isaku Yamahata > Signed-off-by: Michael S. Tsirkin Acked-by: Cam Macdonell > --- > > So I think the below would be the cleanest way > to fix t

[Qemu-devel] [PATCH 0/2] fixups for ivshmem unplug/migration

2010-11-30 Thread Cam Macdonell
We added qemu_ram_alloc_from_ptr, but we need its corresponding "free" function. With that, we can properly remove the ivshmem memory on unplug. Cam Macdonell (2): add qemu_ram_free_from_ptr Unregister shared memory on unplug. cpu-common.h |1 + exec.c | 13 +++

[Qemu-devel] [PATCH 1/2] add qemu_ram_free_from_ptr

2010-12-01 Thread Cam Macdonell
add function to free memory from Qemu that was added via qemu_ram_alloc_from_ptr. Name is a little weird. This is copied from qemu_ram_unmap from qemu-kvm. Signed-off-by: Cam Macdonell --- cpu-common.h |1 + exec.c | 13 + 2 files changed, 14 insertions(+), 0

[Qemu-devel] [PATCH 2/2] Unregister shared memory on unplug.

2010-12-01 Thread Cam Macdonell
This allows 'peer' ivshmem guests to detach from shared memory before migration and re-attach after migration is complete. Signed-off-by: Cam Macdonell --- hw/ivshmem.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c ind

[Qemu-devel] [PATCH] RFC: delay pci_update_mappings for 64-bit BARs

2010-12-13 Thread Cam Macdonell
Do not call pci_update_mappings on the lower 32-bits of a 64-bit bar. Wait for the upper 32 or else Qemu will try to map on just the lower 32 which is probably going to corrupt memory. I was encountering crashes when mapping certain PCI region sizes. The problem turns out that pci_update_mapp

Re: [Qemu-devel] [PATCH] RFC: delay pci_update_mappings for 64-bit BARs

2010-12-14 Thread Cam Macdonell
On Mon, Dec 13, 2010 at 8:00 PM, Isaku Yamahata wrote: > On Mon, Dec 13, 2010 at 03:43:44PM -0700, Cam Macdonell wrote: >> Do not call pci_update_mappings on the lower 32-bits of a 64-bit bar.  Wait >> for the upper 32 or else Qemu will try to map on just the lower 32 which is &g

[Qemu-devel] [PATCH] Use signed 16-bit values for ivshmem register writes

2010-08-30 Thread Cam Macdonell
fixes gcc 4.1 warning Signed-off-by: Cam Macdonell --- hw/ivshmem.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..fa9c684 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -181,8 +181,8 @@ static void ivshmem_io_writel(void

[Qemu-devel] Re: [PATCH] hw/ivshmem.c don't check for negative values on unsigned data types

2010-08-31 Thread Cam Macdonell
{ > +            if (vector < s->peers[dest].nb_eventfds) { >                 IVSHMEM_DPRINTF("Writing %" PRId64 " to VM %d on vector %d\n", >                                                     write_one, dest, vector); >                 if (write(s->peers[dest].eventfds[vector], > -- > 1.7.2.2 > > Acked-by: Cam Macdonell I sent a patch yesterday that addressed it, but it is probably better to remove the tests that switched to signed 16-bit ints. Anthony, please apply this one. Cam

[Qemu-devel] Re: [PATCH] hw/ivshmem.c don't check for negative values on unsigned data types

2010-08-31 Thread Cam Macdonell
On Tue, Aug 31, 2010 at 6:51 PM, Hao, Xudong wrote: > Hao, Xudong wrote: >> jes.soren...@redhat.com wrote: >>> From: Jes Sorensen >>> >>> There is no need to check for dest < 0 or vector >= 0 as both are >>> uint16_t. >>> >>> This should fix problems with broken build with aggressive compiler >>>

[Qemu-devel] Re: [PATCH] hw/ivshmem.c don't check for negative values on unsigned data types

2010-08-31 Thread Cam Macdonell
On Tue, Aug 31, 2010 at 9:56 PM, Cam Macdonell wrote: > On Tue, Aug 31, 2010 at 6:51 PM, Hao, Xudong wrote: >> Hao, Xudong wrote: >>> jes.soren...@redhat.com wrote: >>>> From: Jes Sorensen >>>> >>>> There is no need to check for dest < 0

Re: [Qemu-devel] virtio-serial question

2010-09-03 Thread Cam Macdonell
On Fri, Sep 3, 2010 at 2:57 AM, Vasiliy G Tolstov wrote: > Hello. Can somebody provide minimal example code that using > virtio-serial to communicate with guest os? (work on guest side and > hypervisor side) Hi Vasiliy, There are basic examples here: http://fedoraproject.org/wiki/Features/Virti

[Qemu-devel] Guest cannot handle a PCI BAR > 1GB

2010-09-03 Thread Cam Macdonell
Hi, I'm trying to test 2 GB (and eventually larger) BARs with ivshmem and I get an error in the guest that it is able to find a mem resource for a BAR larger than 1GB. I'm using 64-bit BARs. when running with 6GB of RAM and a 1GB BAR for ivshmem, it finds a resource (and searches beyond 32-bit v

Re: [Qemu-devel] Guest cannot handle a PCI BAR > 1GB

2010-09-06 Thread Cam Macdonell
On Sun, Sep 5, 2010 at 10:50 AM, Avi Kivity wrote: > On 09/04/2010 01:22 AM, Cam Macdonell wrote: > >> Hi, >> >> I'm trying to test 2 GB (and eventually larger) BARs with ivshmem and >> I get an error in the guest that it is able to find a mem resource for &

Re: [Qemu-devel] Guest cannot handle a PCI BAR > 1GB

2010-09-06 Thread Cam Macdonell
On Mon, Sep 6, 2010 at 10:37 AM, Cam Macdonell wrote: > > > On Sun, Sep 5, 2010 at 10:50 AM, Avi Kivity wrote: >> >>  On 09/04/2010 01:22 AM, Cam Macdonell wrote: >>> >>> Hi, >>> >>> I'm trying to test 2 GB (and eventually larger) BA

Re: [Qemu-devel] [solved] Guest cannot handle a PCI BAR > 1GB

2010-09-07 Thread Cam Macdonell
tic inline resource_size_t pci_resource_alignment(struct pci_dev *dev, struct resource *res) { #ifdef CONFIG_PCI_IOV On Mon, Sep 6, 2010 at 11:24 AM, Cam Macdonell wrote: > On Mon, Sep 6, 2010 at 10:37 AM, Cam Macdonell wrote: >> >> >>

[Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM

2010-09-17 Thread Cam Macdonell
After fixing the resource_size_t return value with pci_resource_alignment, I see one other strange behaviour only when using 4GB of RAM and a 2GB BAR. I haven't found any other combination of RAM/BAR size that triggers this bug. I am using 2.6.36-rc3. ACPI Error: The DSDT has been corrupted or r

Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM

2010-09-17 Thread Cam Macdonell
On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright wrote: > * Cam Macdonell (c...@cs.ualberta.ca) wrote: >> After fixing the resource_size_t return value with >> pci_resource_alignment, I see one other strange behaviour only when >> using 4GB of RAM and a 2GB BAR.  I ha

Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM

2010-09-17 Thread Cam Macdonell
On Fri, Sep 17, 2010 at 2:52 PM, Cam Macdonell wrote: > On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright wrote: >> * Cam Macdonell (c...@cs.ualberta.ca) wrote: >>> After fixing the resource_size_t return value with >>> pci_resource_alignment, I see one other strange be

Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM

2010-09-17 Thread Cam Macdonell
On Fri, Sep 17, 2010 at 3:15 PM, Chris Wright wrote: > * Cam Macdonell (c...@cs.ualberta.ca) wrote: >> On Fri, Sep 17, 2010 at 2:52 PM, Cam Macdonell wrote: >> > On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright wrote: >> >> * Cam Macdonell (c...@cs.ualberta.ca)

[Qemu-devel] [PATCH RFC 2/2] Add support for marking memory to not be migrated

2010-05-23 Thread Cam Macdonell
Non-migrated memory is useful for devices that do not want to take memory region data with them on migration. As suggested by Avi, an alternative approach could add a "flags" parameter to cpu_register_physical_memory() rather than explicityly call cpu_mark_pages_no_migrate(). However, having a se

[Qemu-devel] [PATCH RFC 1/2] Change phys_ram_dirty to phys_ram_status

2010-05-23 Thread Cam Macdonell
The phys_ram_dirty array consists of 8-bit values for storing 3 dirty bits. Change to more generic phys_ram_flags and use lower 4-bits for dirty status and leave upper 4 for other uses of marking memory pages. One potential use for upper bits is to mark certain device pages to not be migrated. So

[Qemu-devel] migrating guest with msi-x interrupts

2010-05-25 Thread Cam Macdonell
Hi, I'm trying to migrate a guest device with MSI-X interrupts. However, the interrupts are not injected into the guest. I've added some tracing to msix.c and it seems that the MSI-X vectors are masked when the guest is resumed (I'm testing with static migration). In particular, in msix.c, msix

[Qemu-devel] [PATCH v6 2/6] Add function to assign ioeventfd to MMIO.

2010-06-04 Thread Cam Macdonell
--- kvm-all.c | 32 kvm.h |1 + 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 47f58a6..2982631 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1257,6 +1257,38 @@ int kvm_set_signal_mask(CPUState *env, const sigset_

[Qemu-devel] [PATCH v6 0/6] Inter-VM Shared Memory Device with migration support

2010-06-04 Thread Cam Macdonell
n guest joined (let application handle it) v4: - moved to single Doorbell register and use datamatch to trigger different VMs rather than one register per eventfd - remove writing arbitrary values to eventfds. Only values of 1 are now written to ensure correct usage Cam Macdonell

[Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device

2010-06-04 Thread Cam Macdonell
: + * Cam Macdonell + * + * Based On: cirrus_vga.c + * Copyright (c) 2004 Fabrice Bellard + * Copyright (c) 2004 Makoto Suzuki (suzu) + * + * and rtl8139.c + * Copyright (c) 2006 Igor Kovalenko + * + * This code is licensed under the GNU GPL v2. + */ +#include

[Qemu-devel] [PATCH v6 4/6] Add support for marking memory to not be migrated. On migration, memory is checked for the NO_MIGRATION_FLAG.

2010-06-04 Thread Cam Macdonell
This is useful for devices that do not want to take memory regions data with them on migration. --- arch_init.c | 28 cpu-all.h|2 ++ cpu-common.h |2 ++ exec.c | 12 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/

[Qemu-devel] [PATCH v6 3/6] Change phys_ram_dirty to phys_ram_status

2010-06-04 Thread Cam Macdonell
phys_ram_dirty are 8-bit values storing 3 dirty bits. Change to more generic phys_ram_flags and use lower 4-bits for dirty status and leave upper 4 for other uses. The names of functions may need to be changed as well, such as c_p_m_get_dirty(). --- cpu-all.h | 16 +--- exec.c

[Qemu-devel] [PATCH v6 6/6] the stand-alone shared memory server for inter-VM shared memory

2010-06-04 Thread Cam Macdonell
this code is a standalone server which will pass file descriptors for the shared memory region and eventfds to support interrupts between guests using inter-VM shared memory. --- contrib/ivshmem-server/Makefile | 16 ++ contrib/ivshmem-server/README | 30 +++ contrib/ivshmem-

[Qemu-devel] [PATCH v6 1/6] Device specification for shared memory PCI device

2010-06-04 Thread Cam Macdonell
--- docs/specs/ivshmem_device_spec.txt | 96 1 files changed, 96 insertions(+), 0 deletions(-) create mode 100644 docs/specs/ivshmem_device_spec.txt diff --git a/docs/specs/ivshmem_device_spec.txt b/docs/specs/ivshmem_device_spec.txt new file mode 100644 i

[Qemu-devel] [PATCH v6] Shared memory uio_pci driver

2010-06-04 Thread Cam Macdonell
* UIO IVShmem Driver + * + * (C) 2009 Cam Macdonell + * based on Hilscher CIF card driver (C) 2007 Hans J. Koch + * + * Licensed under GPL version 2 only. + * + */ + +#include +#include +#include +#include + +#include + +#define IntrStatus 0x04 +#define IntrMask 0x00 + +struct ivshmem_info { +

Re: [Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device

2010-06-07 Thread Cam Macdonell
On Sat, Jun 5, 2010 at 3:44 AM, Blue Swirl wrote: > On Fri, Jun 4, 2010 at 9:45 PM, Cam Macdonell wrote: >> Support an inter-vm shared memory device that maps a shared-memory object as >> a >> PCI device in the guest.  This patch also supports interrupts between guest &

Re: [Qemu-devel] [RFC PATCH 2/6] ram_blocks: Convert to a QLIST

2010-06-09 Thread Cam Macdonell
On Tue, Jun 8, 2010 at 1:15 PM, Alex Williamson wrote: > This makes the RAM block list easier to manipulate.  Also incorporate > relevant variables into the RAMList struct. > > Signed-off-by: Alex Williamson > --- > >  arch_init.c |   14 ++- >  cpu-all.h   |   28 --- >

[Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-06-11 Thread Cam Macdonell
On Mon, Apr 19, 2010 at 10:41 AM, Cam Macdonell wrote: > Hi, > > I'm trying to use a 64-bit BAR for my shared memory device.  In simply > changing the memory type in pci_register_bar() to > PCI_BASE_ADDRESS_MEM_TYPE_64 I get an unusual physical address for > that BAR (a

[Qemu-devel] Re: [PATCH v6 0/6] Inter-VM Shared Memory Device with migration support

2010-06-11 Thread Cam Macdonell
Hi Anthony, Is my implementation of master/peer roles acceptable? I realize with Alex's RAMList changes I may need to modify my patch, but is the approach of marking memory non-migratable an acceptable implementation? Thanks, Cam On Fri, Jun 4, 2010 at 3:45 PM, Cam Macdonell wrote: >

Re: [Qemu-devel] [PATCH v6 4/6] Add support for marking memory to not be migrated. On migration, memory is checked for the NO_MIGRATION_FLAG.

2010-06-14 Thread Cam Macdonell
On Mon, Jun 14, 2010 at 9:51 AM, Anthony Liguori wrote: > On 06/04/2010 04:45 PM, Cam Macdonell wrote: >> >> This is useful for devices that do not want to take memory regions data >> with them on migration. >> --- >>  arch_init.c  |   28 ---

Re: [Qemu-devel] [PATCH v6 6/6] the stand-alone shared memory server for inter-VM shared memory

2010-06-14 Thread Cam Macdonell
On Mon, Jun 14, 2010 at 9:53 AM, Anthony Liguori wrote: > On 06/04/2010 04:45 PM, Cam Macdonell wrote: >> >> this code is a standalone server which will pass file descriptors for the >> shared >> memory region and eventfds to support interrupts between guests using &

[Qemu-devel] [PATCH RFC] Mark a device as non-migratable

2010-06-15 Thread Cam Macdonell
How does this look for marking the device as non-migratable? It adds a field 'no_migrate' to the SaveStateEntry and tests for it in vmstate_save. This would replace anything that touches memory. Cam --- hw/hw.h |1 + savevm.c | 32 +--- 2 files changed, 30 in

[Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device

2010-06-15 Thread Cam Macdonell
n guest joined (let application handle it) v4: - moved to single Doorbell register and use datamatch to trigger different VMs rather than one register per eventfd - remove writing arbitrary values to eventfds. Only values of 1 are now written to ensure correct usage Cam Macdonell

[Qemu-devel] [PATCH v7 3/4] Support marking a device as non-migratable

2010-06-15 Thread Cam Macdonell
A non-migratable device should be removed before migration and re-added after. Signed-off-by: Cam Macdonell --- hw/hw.h |1 + savevm.c | 32 +--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index d78d814..894e6b0 100644

[Qemu-devel] [PATCH v7 2/4] Add function to assign ioeventfd to MMIO.

2010-06-15 Thread Cam Macdonell
Signed-off-by: Cam Macdonell --- kvm-all.c | 32 kvm.h |1 + 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 47f58a6..2982631 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1257,6 +1257,38 @@ int

[Qemu-devel] [PATCH v7 4/4] Inter-VM shared memory PCI device

2010-06-15 Thread Cam Macdonell
repo here: www.gitorious.org/nahanni Signed-off-by: Cam Macdonell --- Makefile.target |3 + hw/ivshmem.c| 823 +++ qemu-char.c |6 + qemu-char.h |3 + qemu-doc.texi | 43 +++ 5 files changed, 878 insertions

[Qemu-devel] [PATCH v7 1/4] Device specification for shared memory PCI device

2010-06-15 Thread Cam Macdonell
Signed-off-by: Cam Macdonell --- docs/specs/ivshmem_device_spec.txt | 96 1 files changed, 96 insertions(+), 0 deletions(-) create mode 100644 docs/specs/ivshmem_device_spec.txt diff --git a/docs/specs/ivshmem_device_spec.txt b/docs/specs

[Qemu-devel] Re: [PATCH RFC] Mark a device as non-migratable

2010-06-15 Thread Cam Macdonell
On Tue, Jun 15, 2010 at 10:32 AM, Anthony Liguori wrote: > On 06/15/2010 11:16 AM, Cam Macdonell wrote: >> >> How does this look for marking the device as non-migratable?  It adds a >> field >> 'no_migrate' to the SaveStateEntry and tests for it in vmstate_sav

Re: [Qemu-devel] Re: [PATCH RFC] Mark a device as non-migratable

2010-06-15 Thread Cam Macdonell
On Tue, Jun 15, 2010 at 4:33 PM, Anthony Liguori wrote: > On 06/15/2010 05:26 PM, Cam Macdonell wrote: >> >> On Tue, Jun 15, 2010 at 10:32 AM, Anthony Liguori >>  wrote: >> >>> >>> On 06/15/2010 11:16 AM, Cam Macdonell wrote: >>> >

Re: [Qemu-devel] Re: [PATCH RFC] Mark a device as non-migratable

2010-06-16 Thread Cam Macdonell
On Wed, Jun 16, 2010 at 6:34 AM, Anthony Liguori wrote: > On 06/16/2010 12:05 AM, Cam Macdonell wrote: >> >> On Tue, Jun 15, 2010 at 4:33 PM, Anthony Liguori >>  wrote: >> >>> >>> On 06/15/2010 05:26 PM, Cam Macdonell wrote: >>> >&

[Qemu-devel] [PATCH v7 RESEND 4/4] Inter-VM shared memory PCI device

2010-06-23 Thread Cam Macdonell
, sample programs and init scripts are in a git repo here: www.gitorious.org/nahanni Signed-off-by: Cam Macdonell --- Makefile.target |3 + hw/ivshmem.c| 828 +++ qemu-char.c |6 + qemu-char.h |3 + qemu-doc.texi

[Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-06-24 Thread Cam Macdonell
On Tue, Jun 15, 2010 at 5:04 AM, Avi Kivity wrote: > On 06/11/2010 08:31 PM, Cam Macdonell wrote: >> >> On Mon, Apr 19, 2010 at 10:41 AM, Cam Macdonell >>  wrote: >> >>> >>> Hi, >>> >>> I'm trying to use a 64-bit BAR for

[Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-06-28 Thread Cam Macdonell
On Sun, Jun 27, 2010 at 2:39 AM, Avi Kivity wrote: > On 06/25/2010 12:51 AM, Cam Macdonell wrote: >> >> On Tue, Jun 15, 2010 at 5:04 AM, Avi Kivity  wrote: >> >>> >>> On 06/11/2010 08:31 PM, Cam Macdonell wrote: >>> >>>> >

[Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-06-29 Thread Cam Macdonell
On Tue, Jun 29, 2010 at 12:50 AM, Avi Kivity wrote: > On 06/28/2010 11:38 PM, Cam Macdonell wrote: >> >>> >>>>> Is this really the address the guest programmed, or is qemu >>>>> misinterpreting >>>>> it? >>>>> >>&

[Qemu-devel] Re: [PATCH v7 0/4] Inter-VM shared memory device

2010-07-02 Thread Cam Macdonell
On Tue, Jun 15, 2010 at 2:23 PM, Cam Macdonell wrote: > Latest patch for PCI shared memory device that maps a host shared memory > object > to be shared between guests > > new in this series > >    - replace marking memory from v6 with marking device as unmigratable > i

Re: [Qemu-devel] KVM call minutes for July 6

2010-07-06 Thread Cam Macdonell
On Tue, Jul 6, 2010 at 8:46 AM, Juan Quintela wrote: > > Today was a short call as Anthony didn't attend. > > - Jes reminded people that Linux Plumbers deadline is July 19th > - Qemu 0.13 (from the agenda, we didn't discuss it without Anthony). > > List of patches missing commit/comment/review fro

[Qemu-devel] [PATCH v7 RESEND 4/4] Inter-VM shared memory PCI device

2010-07-08 Thread Cam Macdonell
=,id= The shared memory server, sample programs and init scripts are in a git repo here: www.gitorious.org/nahanni Signed-off-by: Cam Macdonell --- Makefile.target |3 + hw/ivshmem.c| 842 +++ qemu-char.c |6 + qemu-char.h

Re: [Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-07-13 Thread Cam Macdonell
On Tue, Jun 29, 2010 at 9:29 PM, Isaku Yamahata wrote: > On Tue, Jun 29, 2010 at 11:48:13AM -0600, Cam Macdonell wrote: >> On Tue, Jun 29, 2010 at 12:50 AM, Avi Kivity wrote: >> > On 06/28/2010 11:38 PM, Cam Macdonell wrote: >> >> >> >>> >> &g

Re: [Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-07-13 Thread Cam Macdonell
On Tue, Jul 13, 2010 at 2:41 PM, Isaku Yamahata wrote: > On Tue, Jul 13, 2010 at 02:05:51PM -0600, Cam Macdonell wrote: >> >> > Seabios completely ignore the 64-bitness of the BAR. ?Looks like it also >> >> > thinks the second half of the BAR is an I/O region

Re: [Qemu-devel] Re: Unusual physical address when using 64-bit BAR

2010-07-14 Thread Cam Macdonell
On Tue, Jul 13, 2010 at 8:52 PM, Isaku Yamahata wrote: > On Tue, Jul 13, 2010 at 04:48:19PM -0600, Cam Macdonell wrote: >> On Tue, Jul 13, 2010 at 2:41 PM, Isaku Yamahata >> wrote: >> > On Tue, Jul 13, 2010 at 02:05:51PM -0600, Cam Macdonell wrote: >> >> &

Re: [Qemu-devel] virtio-9p is not working

2010-07-21 Thread Cam Macdonell
On Wed, Jul 21, 2010 at 2:27 AM, Dallas Lee wrote: > Hi, > I have trying to use the virtio-9p for my linux in QEMU, but without > success. > Here is my option for booting my qemu: > i386-softmmu/qemu -kernel bzImage -append "console=ttyS0 > video=uvesafb:ywrap,overlay:rgb16,480x800...@60 root=/dev

Re: [Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device

2010-07-26 Thread Cam Macdonell
On Mon, Jul 26, 2010 at 7:48 AM, Anthony Liguori wrote: > On 06/15/2010 03:23 PM, Cam Macdonell wrote: >> >> Latest patch for PCI shared memory device that maps a host shared memory >> object >> to be shared between guests >> > > Is this against qemu.git or

Re: [Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device

2010-07-26 Thread Cam Macdonell
On Mon, Jul 26, 2010 at 1:51 PM, Avi Kivity wrote: >  On 07/26/2010 10:01 PM, Cam Macdonell wrote: >> >>> Is this against qemu.git or qemu-kvm.git?  It depends on functions like >>> qemu_ram_map() which are not present in qemu.git (and are present in >>> qem

Re: [Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device

2010-07-26 Thread Cam Macdonell
On Mon, Jul 26, 2010 at 2:11 PM, Avi Kivity wrote: >  On 07/26/2010 11:03 PM, Cam Macdonell wrote: >> >>> Please add qemu_ram_map() as a separate patch to avoid interdependencies. >>>  Try to keep it at the same place etc., that will reduce merge >>> diffic

Re: [Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device

2010-07-26 Thread Cam Macdonell
On Mon, Jul 26, 2010 at 2:41 PM, Anthony Liguori wrote: > On 07/26/2010 03:27 PM, Avi Kivity wrote: >> >>  On 07/26/2010 10:41 PM, Anthony Liguori wrote: >>> >>> kvm_set_irqfd() is fine, it just needs to be ported.  It should be there >>> due to vhost though? >>> >> >> It should, but isn't. >> >>>

  1   2   >