Re: [Qemu-devel] [PATCH v2 5/6] msix: Allow full specification of MSIX layout

2012-06-13 Thread Jan Kiszka
On 2012-06-14 06:51, Alex Williamson wrote: > Finally, complete the fully specified interface. msix_add_config() > gets moved to be closer to the setup functions where it's actually > used. msix_mmio_setup() gets folded into msix_init(). And > msix_uninit() gets reworked a bit so we can call it

Re: [Qemu-devel] [PATCH v2 4/6] msix: Split PBA into it's own MemoryRegion

2012-06-13 Thread Jan Kiszka
On 2012-06-14 06:51, Alex Williamson wrote: > These don't have to be contiguous. Size them to only what > they need and use separate MemoryRegions for the vector > table and PBA. > > Signed-off-by: Alex Williamson > --- > > hw/msix.c | 116 > ++

Re: [Qemu-devel] [PATCH v2 2/6] ivshmem: Convert to msix_init_exclusive_bar() interface

2012-06-13 Thread Jan Kiszka
On 2012-06-14 06:51, Alex Williamson wrote: > Trivial conversion, failed to have an uninit before and after. Need not be in this series, but we should fix that trivial bug nevertheless. Jan > > Signed-off-by: Alex Williamson > --- > > hw/ivshmem.c | 10 +++--- > 1 file changed, 3 inser

Re: [Qemu-devel] [PATCH 1/3] msi/msix: added functions to API to set up message address and data

2012-06-13 Thread Jan Kiszka
On 2012-06-14 07:17, Alexey Kardashevskiy wrote: > On 14/06/12 14:56, Alex Williamson wrote: >> On Thu, 2012-06-14 at 14:31 +1000, Alexey Kardashevskiy wrote: >>> Normally QEMU expects the guest to initialize MSI/MSIX vectors. >>> However on POWER the guest uses RTAS subsystem to configure MSI/MSIX

Re: [Qemu-devel] [PATCH 1/3] msi/msix: added functions to API to set up message address and data

2012-06-13 Thread Alexey Kardashevskiy
On 14/06/12 15:38, Alex Williamson wrote: > On Thu, 2012-06-14 at 15:17 +1000, Alexey Kardashevskiy wrote: >> On 14/06/12 14:56, Alex Williamson wrote: >>> On Thu, 2012-06-14 at 14:31 +1000, Alexey Kardashevskiy wrote: Normally QEMU expects the guest to initialize MSI/MSIX vectors. Howeve

Re: [Qemu-devel] [PATCH 1/3] msi/msix: added functions to API to set up message address and data

2012-06-13 Thread Alex Williamson
On Thu, 2012-06-14 at 15:17 +1000, Alexey Kardashevskiy wrote: > On 14/06/12 14:56, Alex Williamson wrote: > > On Thu, 2012-06-14 at 14:31 +1000, Alexey Kardashevskiy wrote: > >> Normally QEMU expects the guest to initialize MSI/MSIX vectors. > >> However on POWER the guest uses RTAS subsystem to c

Re: [Qemu-devel] [PATCH 1/3] msi/msix: added functions to API to set up message address and data

2012-06-13 Thread Alexey Kardashevskiy
On 14/06/12 14:56, Alex Williamson wrote: > On Thu, 2012-06-14 at 14:31 +1000, Alexey Kardashevskiy wrote: >> Normally QEMU expects the guest to initialize MSI/MSIX vectors. >> However on POWER the guest uses RTAS subsystem to configure MSI/MSIX and >> does not write these vectors to device's confi

[Qemu-devel] [PATCH 1/1] Add usb option in machine options.

2012-06-13 Thread zhlcindy
From: Li Zhang For pseries machine, it needs to enable usb to add kbd or usb mouse. -usb option won't be used in the future, and machine options is a better way to enable usb. So this patch is to add usb option to machine options (-machine type=psereis,usb=on/off) to enable/disable usb controlle

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Benjamin Herrenschmidt
< snip thread > So I was looking at this accessor business. We already have them for PCI. PAPR VIO already has its own as well. That leaves us with various devices such as OHCI that can exist on different bus types and use the lower-level "DMAContext" based variant... Now I'm keen to keep it (es

[Qemu-devel] [PATCH v2 5/6] msix: Allow full specification of MSIX layout

2012-06-13 Thread Alex Williamson
Finally, complete the fully specified interface. msix_add_config() gets moved to be closer to the setup functions where it's actually used. msix_mmio_setup() gets folded into msix_init(). And msix_uninit() gets reworked a bit so we can call it as cleanup from msix_init(). Signed-off-by: Alex Wi

Re: [Qemu-devel] [PATCH 1/3] msi/msix: added functions to API to set up message address and data

2012-06-13 Thread Alex Williamson
On Thu, 2012-06-14 at 14:31 +1000, Alexey Kardashevskiy wrote: > Normally QEMU expects the guest to initialize MSI/MSIX vectors. > However on POWER the guest uses RTAS subsystem to configure MSI/MSIX and > does not write these vectors to device's config space or MSIX BAR. > > On the other hand, ms

[Qemu-devel] [PATCH v2 6/6] msix: Fix last PCIDevice naming inconsitency

2012-06-13 Thread Alex Williamson
The previous patches fixed almost all the inconsistent names used for PCIDevice in msix.c, fix the one remaining transgression. Signed-off-by: Alex Williamson --- hw/msix.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/msix.h b/hw/msix.h index 14b1a2e..1786e27 1006

[Qemu-devel] [PATCH v2 4/6] msix: Split PBA into it's own MemoryRegion

2012-06-13 Thread Alex Williamson
These don't have to be contiguous. Size them to only what they need and use separate MemoryRegions for the vector table and PBA. Signed-off-by: Alex Williamson --- hw/msix.c | 116 ++--- hw/pci.h | 15 ++-- 2 files changed, 83 ins

[Qemu-devel] [PATCH v2 3/6] virtio: Convert to msix_init_exclusive_bar() interface

2012-06-13 Thread Alex Williamson
Simple conversion. Signed-off-by: Alex Williamson --- hw/virtio-pci.c | 15 +-- hw/virtio-pci.h |1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 9342eed..3dca37f 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@

[Qemu-devel] [PATCH v2 2/6] ivshmem: Convert to msix_init_exclusive_bar() interface

2012-06-13 Thread Alex Williamson
Trivial conversion, failed to have an uninit before and after. Signed-off-by: Alex Williamson --- hw/ivshmem.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 05559b6..8b49eee 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -70,

[Qemu-devel] [PATCH v2 1/6] msix: Add simple BAR allocation MSIX setup functions

2012-06-13 Thread Alex Williamson
msi_init() takes over a BAR without really specifying or allowing specification of how it does so. Instead, let's split it into two interfaces, one fully specified, and one trivially easy. This implements the latter. msix_init_exclusive_bar() takes over allocating and filling a PCI BAR _exclusiv

[Qemu-devel] [PATCH v2 0/6] msix: Support specifying offsets, BARs, and capability location

2012-06-13 Thread Alex Williamson
v2: - split patch - rename msix_[un]init_bar() to msix_[un]init_exclusive_bar() - add the cherry on top to cleaning up PCIDevice naming Thanks, Alex v1: msix_init has very little configurability as to how it lays out MSIX for a device. It claims to resize BARs, but doesn't actually do this

Re: [Qemu-devel] [PATCH 0/3] adding MSI/MSIX for PCI on POWER

2012-06-13 Thread Alexey Kardashevskiy
Forgot to CC: someone :) On 14/06/12 14:29, Alexey Kardashevskiy wrote: > The following patches add MSIX support for PCI on POWER. > The first aim is virtio-pci so it was tested. It will also support > VFIO when it becomes available in public. > > Alexey Kardashevskiy (3): > msi/msix: added fun

[Qemu-devel] [PATCH] trace: added ability to comment out events in the list

2012-06-13 Thread Alexey Kardashevskiy
It is convenient for debug to be able to switch on/off some events easily. The only possibility now is to remove event name from the file completely and type it again when we want it back. The patch adds '#' symbol handling as a comment specifier. Signed-off-by: Alexey Kardashevskiy --- trace/c

[Qemu-devel] [PATCH] pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dt

2012-06-13 Thread Alexey Kardashevskiy
spapr_populate_pci_devices() populates the device tree only with bus properties and has nothing to do with the devices on it as PCI BAR allocation is done by the system firmware (SLOF). New name - spapr_populate_pci_dt() - describes the functionality better. Signed-off-by: Alexey Kardashevskiy -

[Qemu-devel] [PATCH] pseries pci: removed redundand busdev

2012-06-13 Thread Alexey Kardashevskiy
The PCIHostState struct already contains SysBusDevice so the one in sPAPRPHBState has to go. Signed-off-by: Alexey Kardashevskiy --- hw/spapr_pci.c |4 ++-- hw/spapr_pci.h |1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c index 75943cf..

[Qemu-devel] [PATCH] pseries pci: removed dt_irq from PCI host bus

2012-06-13 Thread Alexey Kardashevskiy
As it is a very quick operation to resolve qirq from IRQ number, it makes no sense to cache it anywhere but its original source i.e. XICS. Signed-off-by: Alexey Kardashevskiy --- hw/spapr_pci.c | 14 +- hw/spapr_pci.h |1 - 2 files changed, 5 insertions(+), 10 deletions(-) dif

[Qemu-devel] [PATCH 3/3] pseries pci: added MSI/MSIX support

2012-06-13 Thread Alexey Kardashevskiy
virtio-pci expects the guest to set up MSI message address and data, and to do other initialization such as a vector number negotiation. It also notifies the guest via writing an MSI message to a previously set address. This patch includes: 1. RTAS call "ibm,change-msi" which sets up number of MS

[Qemu-devel] [PATCH 2/3] pseries: added allocator for a block of IRQs

2012-06-13 Thread Alexey Kardashevskiy
The patch adds a simple helper which allocates a consecutive sequence of IRQs calling spapr_allocate_irq for each and checks that allocated IRQs go consequently. The patch is required for upcoming support of MSI/MSIX on POWER. Signed-off-by: Alexey Kardashevskiy --- hw/spapr.c | 19 +

[Qemu-devel] [PATCH 1/3] msi/msix: added functions to API to set up message address and data

2012-06-13 Thread Alexey Kardashevskiy
Normally QEMU expects the guest to initialize MSI/MSIX vectors. However on POWER the guest uses RTAS subsystem to configure MSI/MSIX and does not write these vectors to device's config space or MSIX BAR. On the other hand, msi_notify()/msix_notify() write to these vectors to signal the guest abou

[Qemu-devel] [PATCH 0/3] adding MSI/MSIX for PCI on POWER

2012-06-13 Thread Alexey Kardashevskiy
The following patches add MSIX support for PCI on POWER. The first aim is virtio-pci so it was tested. It will also support VFIO when it becomes available in public. Alexey Kardashevskiy (3): msi/msix: added functions to API to set up message address and data pseries: added allocator for a blo

Re: [Qemu-devel] BIOS calls in 16bit protected mode

2012-06-13 Thread Roy Tam
ling valid or invalid uses would also >> be helpful. >> >> For those that are willing to run tests, one can compare the standard >> SeaBIOS v1.7.0 image (for KVM/QEMU) at: >> >> http://git.seabios.org/downloads/get/bios.bin-1.7.0.gz >> >> to a test image with the new code at: >> >> http://git.seabios.org/downloads/get/bios.bin-test-20120613.gz >> >> Thanks, >> -Kevin >> >

Re: [Qemu-devel] BIOS calls in 16bit protected mode

2012-06-13 Thread Kevin O'Connor
On Thu, Jun 14, 2012 at 04:17:19AM +0100, Natalia Portillo wrote: > Hi Kevin, > > Long time ago I read about OS/2 calling 16-bit protected mode BIOS, > but the documentation didn't specified if this was constrained to > the separate protected mode BIOS included by PS/2 systems or the > real mode B

Re: [Qemu-devel] BIOS calls in 16bit protected mode

2012-06-13 Thread Natalia Portillo
ful. > > For those that are willing to run tests, one can compare the standard > SeaBIOS v1.7.0 image (for KVM/QEMU) at: > > http://git.seabios.org/downloads/get/bios.bin-1.7.0.gz > > to a test image with the new code at: > > http://git.seabios.org/downloads/get/bios.bin-test-20120613.gz > > Thanks, > -Kevin > signature.asc Description: Message signed with OpenPGP using GPGMail

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 05:17 +0200, Edgar E. Iglesias wrote: > The CPU's MMU is a CPU local thing, it can be ignored in this context... > > Anyway, I might very well be missing or missunderstganding something so > I'm not claiming I'm having the absolute "thruth" here but it seems to me > like imp

Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?

2012-06-13 Thread Wei-Ren Chen
> As a side note, it might be interesting to gather statistics about the hit > rate of the QEMU TLB. Another thing to consider is speeding up the > fast path; see YeongKyoon Lee RFC patch: > > http://www.mail-archive.com/qemu-devel@nongnu.org/msg91294.html I only see PATCH 0/3, any idea on wh

Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?

2012-06-13 Thread Wei-Ren Chen
> Unfortunately, I had the bad idea of rebasing all my series on top of the > latest > makefile changes, and I'll have to go through each patch to check it's still > working (I'm sure some of them broke). Need some help? :) Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institut

Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?

2012-06-13 Thread Wei-Ren Chen
On Wed, Jun 13, 2012 at 12:43:28PM +0200, Laurent Desnogues wrote: > On Wed, Jun 13, 2012 at 5:14 AM, 陳韋任 (Wei-Ren Chen) > wrote: > > Hi all, > > > >  I suspect that guest memory access (qemu_ld/qemu_st) account for the major > > of > > time spent in system mode. I would like to know precisely ho

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Edgar E. Iglesias
On Thu, Jun 14, 2012 at 12:41:06PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2012-06-14 at 04:31 +0200, Edgar E. Iglesias wrote: > > > An AXI device might issue a cycle on the AXI portion, that can be > > > decoded by either a sibling AXI device ... or go up. In most cases > > > > No, it does

[Qemu-devel] BIOS calls in 16bit protected mode

2012-06-13 Thread Kevin O'Connor
seabios.org/downloads/get/bios.bin-test-20120613.gz Thanks, -Kevin

Re: [Qemu-devel] [PATCH 1/6 v10] docs: spec for add-cow file format

2012-06-13 Thread Dong Xu Wang
On Wed, Jun 13, 2012 at 11:10 PM, Eric Blake wrote: > On 06/13/2012 08:36 AM, Dong Xu Wang wrote: >> Introduce a new file format:add-cow. The usage can be found at this patch. >> >> Signed-off-by: Dong Xu Wang >> --- >>  docs/specs/add-cow.txt |   87 >> ++

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 04:31 +0200, Edgar E. Iglesias wrote: > > An AXI device might issue a cycle on the AXI portion, that can be > > decoded by either a sibling AXI device ... or go up. In most cases > > No, it doesn't really go up.. This is where we disagree. Well, not really indeed as the memo

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Edgar E. Iglesias
On Thu, Jun 14, 2012 at 12:16:45PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2012-06-14 at 04:03 +0200, Edgar E. Iglesias wrote: > > Thanks for the clarificatino Ben. > > > > I don't know much about PCI but in the embedded world I've never seen > > anything that resemblems what you describe.

[Qemu-devel] wiki account

2012-06-13 Thread Peter Crosthwaite
Hi, I wish to upload my test images to the wiki, and I see the process for getting an account is to contact via email. Can someone create me an account? Regards, Peter

[Qemu-devel] Broken Microblaze timer

2012-06-13 Thread Peter Crosthwaite
Hi all, For a while now I have had this hack in my tree: Author: Peter A. G. Crosthwaite Date: Fri Mar 30 15:04:05 2012 +1000 async.c: disabled event notifications. This is a nasty hack thats needed to prevent the xilinx timer from deadlocking Signed-off-by: Peter A. G. Crosthwa

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 04:03 +0200, Edgar E. Iglesias wrote: > Thanks for the clarificatino Ben. > > I don't know much about PCI but in the embedded world I've never seen > anything that resemblems what you describe. Devices at the bottom of > the hierharcy (or at any location) that make acceses to

[Qemu-devel] [PATCH v1 4/4] xilinx_zynq: Added SD controllers

2012-06-13 Thread Peter A. G. Crosthwaite
The Xilinx Zynq device has two SDHCI controllers. Added to the machine model. Signed-off-by: Peter A. G. Crosthwaite --- changed from v3: fixed indentation tweaked commit msg hw/xilinx_zynq.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b

Re: [Qemu-devel] [PATCH v1 0/4] Standard SD host controller model

2012-06-13 Thread Peter Crosthwaite
ergh, series version number is incorrect, this is v4. On Thu, Jun 14, 2012 at 12:20 PM, Peter A. G. Crosthwaite wrote: > [Original cover by Igor] > First patch introduces standard SD host controller model. This is accumulated > version of my previous patch I sent a while ago and a recent SDHCI

[Qemu-devel] [PATCH v1 3/4] vl.c: allow for repeated -sd arguments

2012-06-13 Thread Peter A. G. Crosthwaite
Allows for repeating of -sd arugments in the same way as -pflash and -mtdblock. Signed-off-by: Peter A. G. Crosthwaite --- changed from v3: fixed commit msg typo vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 204d85b..b6d624b 100644 --- a/vl.c +

[Qemu-devel] [PATCH v1 2/4] exynos4210: Added SD host controller model

2012-06-13 Thread Peter A. G. Crosthwaite
From: Igor Mitsyanko Custom Exynos4210 SD/MMC host controller, based on SD association standard host controller ver. 2.00. Signed-off-by: Igor Mitsyanko --- changed from v3: rebased for new Makefile system fixed commit msg typo (Andreas review) hw/arm/Makefile.objs |1 + hw/exynos4210.c

[Qemu-devel] [PATCH v1 0/4] Standard SD host controller model

2012-06-13 Thread Peter A. G. Crosthwaite
[Original cover by Igor] First patch introduces standard SD host controller model. This is accumulated version of my previous patch I sent a while ago and a recent SDHCI patch by Peter A. G. Crosthwaite. Second patch introduces Exynos4210-specific SDHCI built on top of standard SDHCI model. [Ne

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Edgar E. Iglesias
On Thu, Jun 14, 2012 at 11:34:10AM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2012-06-14 at 02:00 +0200, Edgar E. Iglesias wrote: > > > > TBH, I don't understand any of the "upstream" access discussion nor > > the specifics of DMA accesses for the memory/system bus accesses. > > > > When a de

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 02:00 +0200, Edgar E. Iglesias wrote: > > TBH, I don't understand any of the "upstream" access discussion nor > the specifics of DMA accesses for the memory/system bus accesses. > > When a device, like a DMA unit accesses the memory/system bus it, > AFAIK, does it from a dif

Re: [Qemu-devel] [RFC] QOMification of AXI stream

2012-06-13 Thread Peter Crosthwaite
On Tue, 2012-06-12 at 09:58 +0200, Edgar E. Iglesias wrote: > On Tue, Jun 12, 2012 at 10:33:51AM +1000, Peter Crosthwaite wrote: > > > > > > Hi, > > > > > > IIRC the word array thing is device specific, not really AXI stream. > > > I think the whole connection to AXI is a bit unfortunate, > > > >

[Qemu-devel] [PATCH] build: install qmp-commands.txt

2012-06-13 Thread Bruce Rogers
File is targeted for install, but is never installed. Signed-off-by: Bruce Rogers --- Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 32550cb..74f5c5f 100644 --- a/Makefile +++ b/Makefile @@ -272,6 +272,7 @@ endif install-doc: $(DOCS)

[Qemu-devel] Adding errno to QMP errors

2012-06-13 Thread Luiz Capitulino
On Thu, 31 May 2012 16:54:47 +0200 Paolo Bonzini wrote: > Wait, I think you're conflating two things. > > One is "do not shoehorn errors into errno values". So for QOM invalid values > we > have PropertyValueBad, not a generic InvalidArgument value. We convert > everything > to Error rather

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Edgar E. Iglesias
On Wed, Jun 13, 2012 at 10:37:41AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-12 at 12:46 +0300, Avi Kivity wrote: > > > I think that transformation function lives in the bus layer > > > MemoryRegion. It's a bit tricky though because you need some sort of > > > notion of "who is asking

Re: [Qemu-devel] [PATCH] msix: Support specifying offsets, BARs, and capability location

2012-06-13 Thread Alex Williamson
On Wed, 2012-06-13 at 23:43 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 12, 2012 at 02:03:26PM -0600, Alex Williamson wrote: > > msix_init has very little configurability as to how it lays out MSIX > > for a device. It claims to resize BARs, but doesn't actually do this > > anymore. This patch

Re: [Qemu-devel] Documentation for highbank model ?

2012-06-13 Thread Andreas Färber
Hi, Am 13.06.2012 14:02, schrieb Jan-Simon Möller: > Is there documentation on how to invoke qemu-system-arm for the highbank > target ? There seem to be some not obvious arguments needed to get it up > and running beside a plain > "qemu-system-arm -M highbank -sd foo.img -append 'root=/dev/mmc

Re: [Qemu-devel] [PATCH v2 2/4] qapi: Add passfd QMP command

2012-06-13 Thread Corey Bryant
On 06/13/2012 04:47 PM, Eric Blake wrote: On 06/13/2012 02:25 PM, Corey Bryant wrote: Also, getfd automatically closes a fd if an existing fdname is passed again. I don't think this is a good behavior, I think pass-fd should fail instead (note that we can't fix getfd though). I agree. It

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Corey Bryant
On 06/13/2012 04:41 PM, Eric Blake wrote: On 06/13/2012 02:17 PM, Corey Bryant wrote: On 06/13/2012 03:42 PM, Luiz Capitulino wrote: On Fri, 8 Jun 2012 11:42:56 -0400 Corey Bryant wrote: v2: - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) - Remove changes that returne

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-06-13 Thread Daniel P. Berrange
On Wed, Jun 13, 2012 at 04:20:22PM -0300, Eduardo Otubo wrote: > I added a syscall struct using priority levels as described in the > libseccomp man page. The priority numbers are based to the frequency > they appear in a sample strace from a regular qemu guest run under > libvirt. > > Libseccomp

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Benjamin Herrenschmidt
On Wed, 2012-06-13 at 15:57 -0500, Anthony Liguori wrote: > I think pci_* wrappers is the right thing to do in the short term (and > probably > long term too). Oh I agree absolutely. Same for vio, I'll do some wrappers. One remaining question is where do the barriers go in that scheme... I'll

Re: [Qemu-devel] [RFC] QOMification of AXI streams

2012-06-13 Thread Anthony Liguori
On 06/12/2012 07:37 PM, Benjamin Herrenschmidt wrote: Not really no, we don't have proper DMA APIs to shoot from devices. What the DMAContext patches provide is a generic dma_* API but if we are going to get rid of DMAContext in favor of a (modified ?) MemoryRegion I'd rather not expose that to

[Qemu-devel] [PATCH 1/3] tests: fix dependency inclusion

2012-06-13 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 32550cb..93046bf 100644 --- a/Makefile +++ b/Makefile @@ -406,4 +406,4 @@ Makefile: $(GENERATED_HEADERS) # Include automatically generated dependency

[Qemu-devel] [PATCH 2/3] qom: reimplement Interfaces

2012-06-13 Thread Anthony Liguori
The current implementation of Interfaces is poorly designed. Each interface that an object implements end up being an object that's tracked by the implementing object. There's all sorts of gymnastics to deal with casting between these objects. By an interface shouldn't be associated with an Obje

[Qemu-devel] [PATCH 0/3] qom: refactor Interfaces

2012-06-13 Thread Anthony Liguori
The interface implementation was pretty busted. The way it created Objects for each interface was extremely clumbsy and brittle. This is a new implementation that does something quite a bit more natural. It simply modifies classes such that they can affectively have more than one super class. I

[Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-13 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- tests/Makefile |5 +- tests/test-object.c | 222 +++ 2 files changed, 226 insertions(+), 1 deletions(-) create mode 100644 tests/test-object.c diff --git a/tests/Makefile b/tests/Makefile index d66ab19.

Re: [Qemu-devel] [PATCH v2 2/4] qapi: Add passfd QMP command

2012-06-13 Thread Eric Blake
On 06/13/2012 02:25 PM, Corey Bryant wrote: >> Also, getfd automatically closes a fd if an existing fdname is passed >> again. >> I don't think this is a good behavior, I think pass-fd should fail >> instead >> (note that we can't fix getfd though). >> > > I agree. It makes sense to fail rather

[Qemu-devel] [PATCH] Makefile: Fix linker failure for vscclient

2012-06-13 Thread Stefan Weil
When QEMU was built with the simple trace backend, linking failed: LINK vscclient oslib-posix.o: In function `trace_qemu_memalign': qemu/bin/debug/x86/./trace.h:31: undefined reference to `trace3' oslib-posix.o: In function `trace_qemu_vmalloc': qemu/bin/debug/x86/./trace.h:35: undefined refere

Re: [Qemu-devel] [PATCH v2 0/2] qemu-ga: Add guest-fstrim command.

2012-06-13 Thread Michael Roth
On Wed, Jun 13, 2012 at 07:41:26AM +0200, Paolo Bonzini wrote: > FITRIM is a mounted filesystem feature to discard (or "trim") blocks which > are not in use by the filesystem. This is useful for solid-state drives > (SSDs) and thinly-provisioned storage. Provide access to the feature > from the ho

Re: [Qemu-devel] [PATCH] msix: Support specifying offsets, BARs, and capability location

2012-06-13 Thread Michael S. Tsirkin
On Tue, Jun 12, 2012 at 02:03:26PM -0600, Alex Williamson wrote: > msix_init has very little configurability as to how it lays out MSIX > for a device. It claims to resize BARs, but doesn't actually do this > anymore. This patch allows MSIX to be fully specified, which is > necessary both for emu

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Eric Blake
On 06/13/2012 02:17 PM, Corey Bryant wrote: > > > On 06/13/2012 03:42 PM, Luiz Capitulino wrote: >> On Fri, 8 Jun 2012 11:42:56 -0400 >> Corey Bryant wrote: >> >>> v2: >>> - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) >>> - Remove changes that returned fd from getfd (lcapitul

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Luiz Capitulino
On Wed, 13 Jun 2012 16:17:30 -0400 Corey Bryant wrote: > > > On 06/13/2012 03:42 PM, Luiz Capitulino wrote: > > On Fri, 8 Jun 2012 11:42:56 -0400 > > Corey Bryant wrote: > > > >> v2: > >> - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) > >> - Remove changes that returned fd f

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-06-13 Thread Daniel P. Berrange
On Wed, Jun 13, 2012 at 04:20:22PM -0300, Eduardo Otubo wrote: > I added a syscall struct using priority levels as described in the > libseccomp man page. The priority numbers are based to the frequency > they appear in a sample strace from a regular qemu guest run under > libvirt. > > Libseccomp

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-06-13 Thread Daniel P. Berrange
On Wed, Jun 13, 2012 at 07:56:06PM +, Blue Swirl wrote: > On Wed, Jun 13, 2012 at 7:20 PM, Eduardo Otubo > wrote: > > I added a syscall struct using priority levels as described in the > > libseccomp man page. The priority numbers are based to the frequency > > they appear in a sample strace

Re: [Qemu-devel] [RFC] [PATCHv2 0/2] Sandboxing Qemu guests with Libseccomp

2012-06-13 Thread Paul Moore
On Wednesday, June 13, 2012 04:20:20 PM Eduardo Otubo wrote: > Hello all, > > This is the second effort to sandbox Qemu guests using Libseccomp[0]. ... > [0] - http://sourceforge.net/projects/libseccomp/ [1] - > http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=e2c > fabdf

[Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy

2012-06-13 Thread root
From: Corey Bryant Reported-by: Kevin Wolf Signed-off-by: Corey Bryant --- block/raw-posix.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index d8eff2f..68886cd 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -946,9 +

Re: [Qemu-devel] [PATCH v2 2/4] qapi: Add passfd QMP command

2012-06-13 Thread Corey Bryant
On 06/13/2012 03:46 PM, Luiz Capitulino wrote: On Fri, 8 Jun 2012 11:42:57 -0400 Corey Bryant wrote: This patch adds the passfd QMP command using the QAPI framework. Like the getfd command, it is used to pass a file descriptor via SCM_RIGHTS. However, the passfd command also returns the re

[Qemu-devel] Accessing input information

2012-06-13 Thread Muhammed Aydin
Dear QEMU list, I actually emailed this to the KVM list, forgetting that my question mostly concerns QEMU (1.1-rc4). I was wondering where I might be able to access the inputs to KVM-QEMU within the code. For example, we can change the amount of memory with the -m flag, and we can specify a differ

Re: [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete

2012-06-13 Thread Edgar E. Iglesias
this is not super on topic and might be a dumb question but now that we use glib, why aren't we using gobjects more than we are? I'm guessing the glib ppl have figured out how all this is suposed to work already... On Jun 13, 2012 3:50 PM, "Anthony Liguori" wrote: > On 06/13/2012 08:38 AM, Paolo

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Corey Bryant
On 06/13/2012 03:42 PM, Luiz Capitulino wrote: On Fri, 8 Jun 2012 11:42:56 -0400 Corey Bryant wrote: v2: - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) - Remove changes that returned fd from getfd (lcapitul...@redhat.com) - Wrap hmp_* functions around qmp_* functions (kw

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Corey Bryant
On 06/13/2012 03:41 PM, Luiz Capitulino wrote: On Fri, 8 Jun 2012 11:42:56 -0400 Corey Bryant wrote: v2: - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) - Remove changes that returned fd from getfd (lcapitul...@redhat.com) - Wrap hmp_* functions around qmp_* functions (kw

[Qemu-devel] Documentation for highbank model ?

2012-06-13 Thread Jan-Simon Möller
Hi! Is there documentation on how to invoke qemu-system-arm for the highbank target ? There seem to be some not obvious arguments needed to get it up and running beside a plain "qemu-system-arm -M highbank -sd foo.img -append 'root=/dev/mmcblk0p1' " So - where is this documented in-tree and ho

Re: [Qemu-devel] CoW image commit+shrink(= make_empty) support

2012-06-13 Thread Supriya Kannery
On 06/12/2012 04:26 PM, Stefan Hajnoczi wrote: On Mon, Jun 11, 2012 at 4:37 PM, Jeff Cody wrote: On 06/11/2012 10:24 AM, Stefan Hajnoczi wrote: On Mon, Jun 11, 2012 at 1:50 PM, Kevin Wolf wrote: Am 11.06.2012 14:09, schrieb Stefan Hajnoczi: On Fri, Jun 8, 2012 at 6:46 PM, Jeff Cody wrote:

[Qemu-devel] IO performance test on the tcm-vhost scsi

2012-06-13 Thread mengcong
Hi folks, I did an IO performance test on the tcm-vhost scsi. I want to share the test result data here. seq-readseq-write rand-read rand-write 8k 256k 8k 256k 8k 256k 8k 256k --

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-06-13 Thread Blue Swirl
On Wed, Jun 13, 2012 at 7:20 PM, Eduardo Otubo wrote: > I added a syscall struct using priority levels as described in the > libseccomp man page. The priority numbers are based to the frequency > they appear in a sample strace from a regular qemu guest run under > libvirt. > > Libseccomp generates

Re: [Qemu-devel] [PATCH v2 2/4] qapi: Add passfd QMP command

2012-06-13 Thread Luiz Capitulino
On Fri, 8 Jun 2012 11:42:57 -0400 Corey Bryant wrote: > This patch adds the passfd QMP command using the QAPI framework. > Like the getfd command, it is used to pass a file descriptor via > SCM_RIGHTS. However, the passfd command also returns the received > file descriptor, which is a differenc

Re: [Qemu-devel] [RFC] [PATCHv2 1/2] Adding support for libseccomp in configure

2012-06-13 Thread Blue Swirl
On Wed, Jun 13, 2012 at 7:20 PM, Eduardo Otubo wrote: > Adding basic options to the configure script to use libseccomp or not. > The default is set to 'no'. If the flag --enable-libseccomp is used, the > script will check for its existence using pkg-config. > > v2: As I removed all the code relate

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Luiz Capitulino
On Fri, 8 Jun 2012 11:42:56 -0400 Corey Bryant wrote: > v2: > - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) > - Remove changes that returned fd from getfd (lcapitul...@redhat.com) > - Wrap hmp_* functions around qmp_* functions (kw...@redhat.com) > - Move hmp_* functions to hm

Re: [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd

2012-06-13 Thread Luiz Capitulino
On Fri, 8 Jun 2012 11:42:56 -0400 Corey Bryant wrote: > v2: > - Convert getfd and closefd to QAPI (lcapitul...@redhat.com) > - Remove changes that returned fd from getfd (lcapitul...@redhat.com) > - Wrap hmp_* functions around qmp_* functions (kw...@redhat.com) > - Move hmp_* functions to hm

[Qemu-devel] [PATCH v6 5/7] trace: [default] Port to generic event information and new control interface

2012-06-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- trace/default.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trace/default.c b/trace/default.c index c9b27a2..6e07a47 100644 --- a/trace/default.c +++ b/trace/default.c @@ -1,7 +1,7 @@ /* * Default implementation for backend init

[Qemu-devel] [PATCH v6 7/7] trace: [stderr] Port to generic event information and new control interface

2012-06-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/stderr.py | 27 --- trace/stderr.c | 34 ++ 2 files changed, 14 insertions(+), 47 deletions(-) diff --git a/scripts/tracetool/backend/stderr.py b/scripts/

[Qemu-devel] [PATCH v6 4/7] trace: [monitor] Use new event control interface

2012-06-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- monitor.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index a3bc2c7..83ce956 100644 --- a/monitor.c +++ b/monitor.c @@ -589,10 +589,19 @@ static void do_trace_event_set_state(Monitor *mon, const QD

[Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-06-13 Thread Eduardo Otubo
I added a syscall struct using priority levels as described in the libseccomp man page. The priority numbers are based to the frequency they appear in a sample strace from a regular qemu guest run under libvirt. Libseccomp generates linear BPF code to filter system calls, those rules are read one

[Qemu-devel] [RFC] [PATCHv2 1/2] Adding support for libseccomp in configure

2012-06-13 Thread Eduardo Otubo
Adding basic options to the configure script to use libseccomp or not. The default is set to 'no'. If the flag --enable-libseccomp is used, the script will check for its existence using pkg-config. v2: As I removed all the code related to seccomp from vl.c, I created qemu-seccomp.[ch]. I am also m

[Qemu-devel] [RFC] [PATCHv2 0/2] Sandboxing Qemu guests with Libseccomp

2012-06-13 Thread Eduardo Otubo
Hello all, This is the second effort to sandbox Qemu guests using Libseccomp[0]. The patches that follows are pretty simple and straightforward. I added the correct options and checks to the configure script and the basic calls to libseccomp in the main loop at vl.c. Details of each one are in the

[Qemu-devel] [PATCH v6 6/7] trace: [simple] Port to generic event information and new control interface

2012-06-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/simple.py | 12 +--- trace/simple.c | 36 --- trace/simple.h |6 +- trace/stderr.h | 11 --- 4 files changed, 10

[Qemu-devel] [PATCH v6 3/7] trace: Provide a detailed event control interface

2012-06-13 Thread Lluís Vilanova
This interface decouples event obtention from interaction. Events can be obtained through three different methods: * identifier * name * simple wildcard pattern Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 42 -- trace/control-internal.h | 67 trace

[Qemu-devel] [PATCH v6 2/7] trace: Provide a generic tracing event descriptor

2012-06-13 Thread Lluís Vilanova
Uses tracetool to generate a backend-independent tracing event description (struct TraceEvent). The values for such structure are generated with the non-public "events" backend ("events-c" frontend). The generation of the defines to check if an event is statically enabled is also moved to the "ev

[Qemu-devel] [PATCH v6 1/7] tracetool: Explicitly identify public backends

2012-06-13 Thread Lluís Vilanova
Public backends are those printed by "--list-backends" and thus considered valid by the configure script. Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |4 ++-- scripts/tracetool/backend/__init__.py | 16 +++- scripts/tracetool/backend/dtrace.py |

[Qemu-devel] [PATCH v6 0/7] trace: Generic event state description

2012-06-13 Thread Lluís Vilanova
NOTE: Not sure if compilation of files in trace/ should be moved from Makefile.objs to trace/Makefile.objs Provides a generic event state description structure (TraceEvent) and a more detailed event control and query interface. This is achieved by creating a new "non-public" tracing backend

Re: [Qemu-devel] IO performance test on the tcm-vhost scsi

2012-06-13 Thread Nicholas A. Bellinger
On Wed, 2012-06-13 at 18:13 +0800, mengcong wrote: > Hi folks, I did an IO performance test on the tcm-vhost scsi. I want to share > the test result data here. > > > seq-readseq-write rand-read rand-write > 8k 256k 8k 256k

Re: [Qemu-devel] memory.c: ml->printed is never set to true

2012-06-13 Thread Blue Swirl
On Tue, Jun 12, 2012 at 3:24 PM, Jason Baron wrote: > Hi, > > I was looking at mtree_info() and noticed that ml->printed is never set > to true, so it does not appear to be doing anything. It seems like we want to > print the hierarchy for all aliases so perhaps it should just be > dropped? The i

Re: [Qemu-devel] [PATCH v4 12/16] target-or32: Add system instructions

2012-06-13 Thread Blue Swirl
On Mon, Jun 11, 2012 at 6:32 AM, Jia Liu wrote: > Add OpenRISC system instruction helpers and translation. > > Signed-off-by: Jia Liu > --- >  target-openrisc/Makefile.objs |    3 +- >  target-openrisc/helper.h      |    4 + >  target-openrisc/sys_helper.c  |  235 > +

  1   2   3   >