[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] 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

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] [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] [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

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] 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] 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] [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 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-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 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-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] [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-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 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] [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 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

[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][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] 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] 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] 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] [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

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 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

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 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 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-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] 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] 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 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-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] 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-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] 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] [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] 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] 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] 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

[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 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 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] 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] 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

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)

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 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

[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] [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: >> >> >>

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] 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 &

[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] 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] 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

[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
{ > +            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] [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

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

2010-08-27 Thread Cam Macdonell
On Tue, Aug 24, 2010 at 8:21 PM, Isaku Yamahata wrote: > On Tue, Aug 24, 2010 at 10:52:36AM -0600, Cam Macdonell wrote: >> Hi, 64-bit BARs still do not seem to be working. >> >> When using the latest seabios the guest does not hit a "BUG:" >> statement,

Re: [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X

2010-08-27 Thread Cam Macdonell
On Wed, Aug 25, 2010 at 4:39 PM, Adnan Khaleel wrote: > Hi Isaku, > > I've made some progress in coding the device template but its no where near > complete. > > I've created some files and am attaching it to this note. Based on what I > could gather from the pcie source files I've made a stab at

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

2010-08-24 Thread Cam Macdonell
On Tue, Jul 20, 2010 at 9:49 PM, Isaku Yamahata wrote: > Added Cc: seab...@seabios.org > > On Wed, Jul 21, 2010 at 06:31:01AM +0300, Michael S. Tsirkin wrote: >> On Tue, Jul 20, 2010 at 06:52:23PM +0900, Isaku Yamahata wrote: >> > On Wed, Jul 14, 2010 at 09:10:28AM -0

[Qemu-devel] Re: [qemu-kvm PATCH 0/3] small qemu-kvm cleanups

2010-08-23 Thread Cam Macdonell
On Mon, Aug 23, 2010 at 12:49 AM, Avi Kivity wrote: >  On 08/23/2010 09:45 AM, Paolo Bonzini wrote: >> >> On 08/17/2010 01:29 PM, Avi Kivity wrote: >>> >>> On 08/12/2010 06:29 PM, Paolo Bonzini wrote: Nothing earth shattering. :) Paolo Bonzini (3): move kvm_set_irqfd to kv

Re: [Qemu-devel] [PATCH 1/2] Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

2010-08-14 Thread Cam Macdonell
On Sat, Aug 14, 2010 at 11:24 AM, Andreas Färber wrote: > Am 11.08.2010 um 20:16 schrieb Cam Macdonell: > >> --- >> kvm-stub.c |    5 + >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/kvm-stub.c b/kvm-stub.c >> index 3378bd3..d

[Qemu-devel] [PATCH 2/2] RESEND: Disable build of ivshmem on non-KVM systems

2010-08-14 Thread Cam Macdonell
Signed-off-by: Cam Macdonell --- Makefile.target |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.target b/Makefile.target index b791492..c8281e9 100644 --- a/Makefile.target +++ b/Makefile.target @@ -191,7 +191,7 @@ obj-y += rtl8139.o obj-y += e1000.o

[Qemu-devel] [PATCH 1/2] RESEND: Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

2010-08-14 Thread Cam Macdonell
Signed-off-by: Cam Macdonell --- kvm-stub.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/kvm-stub.c b/kvm-stub.c index 3378bd3..d45f9fa 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val

Re: [Qemu-devel] Re: Latest version in Git doesn't link - any ideas?

2010-08-14 Thread Cam Macdonell
Yup, it was my patch. Sorry about that. Patches are in the list, just need to be merged. Cam On Sat, Aug 14, 2010 at 4:18 PM, Stefan Weil wrote: > Am 14.08.2010 23:35, schrieb Nigel Horne: >> >> I've seen some activity in this area of late, but the code still fails to >> link.  Any clues anyon

Re: [Qemu-devel] [PATCH 1/2] Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

2010-08-11 Thread Cam Macdonell
On Wed, Aug 11, 2010 at 2:28 PM, Stefan Weil wrote: > Am 11.08.2010 20:16, schrieb Cam Macdonell: >> >> --- >> kvm-stub.c | 5 + >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/kvm-stub.c b/kvm-stub.c >> index 3378bd3..d4

[Qemu-devel] [PATCH 2/2] Disable build of ivshmem on non-KVM systems

2010-08-11 Thread Cam Macdonell
--- Makefile.target |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.target b/Makefile.target index b791492..c8281e9 100644 --- a/Makefile.target +++ b/Makefile.target @@ -191,7 +191,7 @@ obj-y += rtl8139.o obj-y += e1000.o # Inter-VM PCI shared memory -obj-y

[Qemu-devel] [PATCH 1/2] Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

2010-08-11 Thread Cam Macdonell
--- kvm-stub.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/kvm-stub.c b/kvm-stub.c index 3378bd3..d45f9fa 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign) { return -

[Qemu-devel] Re: [PATCH 2/2] ivshmem: Fix compilation without kvm

2010-08-11 Thread Cam Macdonell
On Wed, Aug 11, 2010 at 1:05 PM, Paolo Bonzini wrote: > On 08/11/2010 03:38 AM, Stefan Weil wrote: >> >> kvm_set_ioeventfd_mmio_long is only available with CONFIG_KVM. > > We should just disable ivshmem for non-KVM > > diff --git a/Makefile.target b/Makefile.target > index b791492..c8281e9 100644

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

2010-08-11 Thread Cam Macdonell
On Wed, Aug 11, 2010 at 4:35 AM, Stefan Weil wrote: > Am 27.07.2010 18:54, schrieb Cam Macdonell: >> >> resend for bug fix related to removal of irqfd >> >> Support an inter-vm shared memory device that maps a shared-memory object >> as a >> PCI device

[Qemu-devel] [PATCH v8 5/5] RESEND: Inter-VM shared memory PCI device

2010-07-27 Thread Cam Macdonell
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| 828 +++ qemu-char.c |6 + qemu-char.h |3 + qemu

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

2010-07-26 Thread Cam Macdonell
git repo here: www.gitorious.org/nahanni Signed-off-by: Cam Macdonell --- Makefile.target |3 + hw/ivshmem.c| 834 +++ qemu-char.c |6 + qemu-char.h |3 + qemu-doc.texi | 43 +++ 5 files changed, 889

[Qemu-devel] [PATCH v8 2/5] Device specification for shared memory PCI device

2010-07-26 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] [PATCH v8 4/5] Support marking a device as non-migratable

2010-07-26 Thread Cam Macdonell
A non-migratable device should be removed before migration and re-added after. Signed-off-by: Cam Macdonell --- hw/hw.h |2 ++ savevm.c | 44 +--- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index c2de6fe

[Qemu-devel] [PATCH v8 0/5] Inter-VM Shared Memory Device

2010-07-26 Thread Cam Macdonell
than one register per eventfd - remove writing arbitrary values to eventfds. Only values of 1 are now written to ensure correct usage Cam Macdonell (5): Provide a function to add an allocated region of memory to the qemu RAM. Device specification for shared memory PCI device A

[Qemu-devel] [PATCH v8 3/5] Add function to assign ioeventfd to MMIO.

2010-07-26 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 7635f2f..d9a5dd0 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1241,6 +1241,38 @@ int

[Qemu-devel] [PATCH v8 1/5] Add qemu_ram_alloc_from_ptr function

2010-07-26 Thread Cam Macdonell
Provide a function to add an allocated region of memory to the qemu RAM. This patch is copied from Marcelo's qemu_ram_map() in qemu-kvm and given the clearer name qemu_ram_alloc_from_ptr(). Signed-off-by: Cam Macdonell --- cpu-common.h |2 ++ exec.c |

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. >> >>>

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 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 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] 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] 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] 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-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

[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] 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] 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

[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: 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-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] [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

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: >>> >&

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: >>> >

[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

[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] [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 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

  1   2   >