Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-25 Thread Gerd Hoffmann
Hi, >> The only reason I ask is whether this is something we can add >> new features to. I can't think of one off hand, but it can't >> hurt to work this out up front. > > Multiport e.g. (to save PCI slots). There was some proposal > recently to add a model of an real multiport PCI card, just

Re: [Qemu-devel] [PATCH 09/17] aio: prepare for introducing GSource-based dispatch

2012-09-25 Thread Paolo Bonzini
Il 26/09/2012 00:01, Anthony Liguori ha scritto: > > +revents = node->pfd.revents & node->pfd.events; > > +node->pfd.revents &= ~revents; > > This is interesting and I must admit I don't understand why it's > necessary. What case are you trying to handle? That's for the case wher

Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-25 Thread Gerd Hoffmann
On 09/26/12 01:43, Anthony Liguori wrote: > Gerd Hoffmann writes: > >> Hi, >> >> Two patches, first split up serial.c a bit, >> then actually add the pci-based serial device. > > The series looks good to me. A couple requests: > > 1) Could you add a spec describing this new PCI device? Does

Re: [Qemu-devel] [PATCH 11/17] aio: make AioContexts GSources

2012-09-25 Thread Paolo Bonzini
Il 26/09/2012 00:06, Anthony Liguori ha scritto: >> > if (node) { >> > +g_source_remove_poll(&ctx->source, &node->pfd); >> > + > Why remove vs. setting events = 0? Because otherwise you'd get a dangling pointer to node->pfd. :) Paolo > add_poll/remove_poll also comes with an

Re: [Qemu-devel] [PATCH] target-xtensa: de-optimize EXTUI

2012-09-25 Thread Aurelien Jarno
On Wed, Sep 26, 2012 at 03:05:18AM +0400, Max Filippov wrote: > On Wed, Sep 26, 2012 at 2:57 AM, Aurelien Jarno wrote: > > Now that and with 0xff, 0x and 0x is optimized in > > tcg/tcg-op.h, there is no need to do it in target-xtensa/translate.c. > > > > Cc: Max Filippov > > Signed-of

Re: [Qemu-devel] [PATCH 14/17] main-loop: use GSource to poll AIO file descriptors

2012-09-25 Thread Paolo Bonzini
Il 26/09/2012 00:09, Anthony Liguori ha scritto: > What do you think about deprecating bottom halves in the !block code in > favor of idle functions? I don't see any reason to keep using bottom > halves... The ptimer.c code uses bottom halves internally. Otherwise I'd agree. Paolo > Reviewed-b

Re: [Qemu-devel] [PATCH 3/6] target-ppc: Extend FPU state for newer POWER CPUs

2012-09-25 Thread Aurelien Jarno
On Wed, Sep 26, 2012 at 01:12:18PM +1000, David Gibson wrote: > This patch adds some extra FPU state to CPUPPCState. Specifically, fpscr > is extended to 64 bits, since some recent CPUs now have more status bits > than fit inside 64 bits, and we add the 32 VSR registers present on CPUs > with VSX

Re: [Qemu-devel] [PATCH 09/17] aio: prepare for introducing GSource-based dispatch

2012-09-25 Thread Paolo Bonzini
Il 26/09/2012 00:01, Anthony Liguori ha scritto: >> > +node->pfd.events = G_IO_ERR; >> > +node->pfd.events |= (io_read ? G_IO_IN | G_IO_HUP : 0); >> > +node->pfd.events |= (io_write ? G_IO_OUT : 0); >> > } > Should we even set G_IO_ERR? I think that corresponds to exce

Re: [Qemu-devel] [PATCH] usb: Fix usb_packet_map() in the presence of IOMMUs

2012-09-25 Thread Gerd Hoffmann
On 09/26/12 04:59, David Gibson wrote: > With the IOMMU infrastructure introduced before 1.2, we need to use > dma_memory_map() to obtain a qemu pointer to memory from an IO bus address. > However, dma_memory_map() alters the given length to reflect the length > over which the used DMA translation

Re: [Qemu-devel] [PATCH 06/17] aio: introduce AioContext, move bottom halves there

2012-09-25 Thread Paolo Bonzini
Il 25/09/2012 23:51, Anthony Liguori ha scritto: >> > typedef struct QEMUTimer QEMUTimer; >> > typedef struct QEMUFile QEMUFile; >> > +typedef struct QEMUBH QEMUBH; >> > typedef struct DeviceState DeviceState; >> > >> > struct Monitor; > Any reason to do this here vs. just #include "qemu-aio.

[Qemu-devel] ARM bootloader boot blobbing.

2012-09-25 Thread Peter Crosthwaite
Hi All, Can anyone think of a reason why the arm primary bootloader cant be done by just direct interaction with the CPU? Currently we have this ... /* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */ static uint32_t bootloader[] = { 0xe3a0, /* mov r0, #0 */

Re: [Qemu-devel] [RfC] using pixman in qemu for raster ops

2012-09-25 Thread Gerd Hoffmann
Hi, > $ yum -C search pixman > Loaded plugins: downloadonly, fastestmirror > === Matched: pixman > > qpixman.i386 : Modified version of pixman for spice > qpixman.x86_64 : Modified version of pixman for spice > qpixman-devel.i386 : Pi

[Qemu-devel] [0/6] Pending pseries updates

2012-09-25 Thread David Gibson
Hi Alex, Here's another batch of updates for pseries, some of which affect wider target-ppc code. I have sent a few of these before, but I don't believe any have made it into ppc-next so far. 5/6 is an important bugfix we've discussed before, which I've CCed to qemu-stable.

[Qemu-devel] [PATCH 1/6] pseries: Set hash table size based on RAM size

2012-09-25 Thread David Gibson
Currently the pseries machine code always attempts to set the size of the guests's hash page table to 16MB. However, because of the way the POWER MMU works, a suitable hash page table size should really depend on memory size. 16MB will be excessive for guests with <1GB and RAM, and may not be eno

[Qemu-devel] [PATCH 4/6] savevm: Add VMSTATE_ helpers for target_phys_addr_t

2012-09-25 Thread David Gibson
The savevm code contains VMSTATE_ helpers for a number of commonly used types, but not for target_phys_addr_t. This patch fixes that deficiency implementing VMSTATE_TPA helpers in terms of VMSTATE_UINT32 or VMSTATE_UINT64 helpers as appropriate. Signed-off-by: David Gibson --- targphys.h | 19

[Qemu-devel] [PATCH 5/6] pseries: Don't test for MSR_PR for hypercalls under KVM

2012-09-25 Thread David Gibson
PAPR hypercalls should only be invoked from the guest kernel, not guest user programs, that is, with MSR[PR]=0. Currently we check this in spapr_hypercall, returning H_PRIVILEGE if MSR[PR]=1. However, under KVM the state of MSR[PR] is already checked by the host kernel before passing the hypercal

[Qemu-devel] [PATCH 3/6] target-ppc: Extend FPU state for newer POWER CPUs

2012-09-25 Thread David Gibson
This patch adds some extra FPU state to CPUPPCState. Specifically, fpscr is extended to 64 bits, since some recent CPUs now have more status bits than fit inside 64 bits, and we add the 32 VSR registers present on CPUs with VSX (these extend the standard FP regs, which together with the Altivec/VM

[Qemu-devel] [PATCH 4/6] pseries: Implement PAPR NVRAM

2012-09-25 Thread David Gibson
The PAPR specification requires a certain amount of NVRAM, accessed via RTAS, which we don't currently implement in qemu. This patch addresses this deficiency, implementing the NVRAM as a VIO device, with some glue to instantiate it automatically based on a machine option. The machine option spec

[Qemu-devel] [RESEND PATCH v5 2/4] Update Linux kernel headers

2012-09-25 Thread Alex Williamson
Based on Linux as of 1a95620. Signed-off-by: Alex Williamson Acked-by: Michael S. Tsirkin --- linux-headers/linux/vfio.h | 368 1 file changed, 368 insertions(+) create mode 100644 linux-headers/linux/vfio.h diff --git a/linux-headers/linux/vfio.

[Qemu-devel] [RESEND PATCH v5 4/4] vfio: Enable vfio-pci and mark supported

2012-09-25 Thread Alex Williamson
Enabled for all softmmu guests supporting PCI on Linux hosts. Note that currently only x86 hosts have the kernel side VFIO IOMMU support for this. PPC (g3beige) is the only non-x86 guest known to work. ARM (veratile) hangs in firmware, others untested. Signed-off-by: Alex Williamson Acked-by: M

[Qemu-devel] [0/6] Fill gaps in savevm support

2012-09-25 Thread David Gibson
This is a series of fairly straightforward patches to fix some fairly obvious gaps in the set of helpers for VMStateDescription buffers. These just extend existing practice to some data types that didn't yet have helper functions, presumably because there were not yet any users. I have draft savev

[Qemu-devel] [PATCH 6/6] ppc/pseries: Reset VPA registration on CPU reset

2012-09-25 Thread David Gibson
The ppc specific CPU state contains several variables which track the VPA, SLB shadow and dispatch trace log. These are structures shared between OS and hypervisor that are used on the pseries machine to track various per-CPU quantities. The address of these structures needs to be registered by t

[Qemu-devel] [PATCH 2/6] target-ppc: Remove unused power_mode field from cpu state

2012-09-25 Thread David Gibson
CPUPPCState includes a variable 'power_mode' which is used nowhere. This patch removes it. This includes saving a dummy zero in its place during vmsave, to avoid breaking the save format. Signed-off-by: David Gibson --- target-ppc/cpu.h |1 - target-ppc/machine.c |4 ++-- 2 files c

[Qemu-devel] [PATCH 1/6] savevm: Add VMSTATE_UINT64_EQUAL helpers

2012-09-25 Thread David Gibson
The savevm code already includes a number of *_EQUAL helpers which act as sanity checks verifying that the configuration of the saved state matches that of the machine we're loading into to work. Variants already exist for 8 bit 16 bit and 32 bit integers, but not 64 bit integers. This patch fill

[Qemu-devel] [PATCH 3/6] savevm: Add VMSTATE_FLOAT64 helpers

2012-09-25 Thread David Gibson
The current savevm code includes VMSTATE helpers for a number of commonly used data types, but not for the float64 type used by the internal floating point emulation code. This patch fixes the deficiency. Signed-off-by: David Gibson --- savevm.c | 23 +++ vmstate.h | 15

[Qemu-devel] [RESEND PATCH v5 1/4] Update kernel header script to include vfio

2012-09-25 Thread Alex Williamson
Signed-off-by: Alex Williamson Acked-by: Michael S. Tsirkin --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 53a6f87..67be2ef 100755 --- a/scripts/update-linux-heade

[Qemu-devel] [RESEND PATCH v5 0/4] VFIO-based PCI device assignment

2012-09-25 Thread Alex Williamson
Only change is adding Michael's ack. Thanks, Alex --- Alex Williamson (4): vfio: Enable vfio-pci and mark supported vfio: vfio-pci device assignment driver Update Linux kernel headers Update kernel header script to include vfio MAINTAINERS |5

[Qemu-devel] [PATCH 5/6] savevm: Add VMSTATE_STRUCT_VARRAY_POINTER_UINT32

2012-09-25 Thread David Gibson
Currently the savevm code contains a VMSTATE_STRUCT_VARRAY_POINTER_INT32 helper (a variably sized array with the number of elements in an int32_t), but not VMSTATE_STRUCT_VARRAY_POINTER_UINT32 (... with the number of elements in a uint32_t). This patch (trivially) fixes the deficiency. Signed-off

[Qemu-devel] [PATCH 2/6] savevm: Add VMSTATE_UINTTL_EQUAL helper

2012-09-25 Thread David Gibson
This adds an _EQUAL VMSTATE helper for target_ulongs, defined in terms of VMSTATE_UINT32_EQUAL or VMSTATE_UINT64_EQUAL as appropriate. Signed-off-by: David Gibson --- hw/hw.h |6 ++ vmstate.h |7 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/hw.h b/hw/h

[Qemu-devel] [PATCH 6/6] savevm: Fix bugs in the VMSTATE_VBUFFER_MULTIPLY definition

2012-09-25 Thread David Gibson
The VMSTATE_BUFFER_MULTIPLY macro is misnamed - it actually specifies a variably sized buffer with VMS_VBUFFER, so should be named VMSTATE_VBUFFER_MULTIPLY. This patch fixes this (the macro had no current users under either name). In addition, unlike the other VMSTATE_VBUFFER variants, this macro

Re: [Qemu-devel] [PATCH v2] Align PCI capabilities in pci_find_space

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 20:01 -0500, m...@cs.wisc.edu wrote: > From: Matt Renzelmann > > The current implementation of pci_find_space does not correctly align > PCI capabilities in the PCI configuration space. This patch fixes > this issue. > > Signed-off-by: Matt Renzelmann > --- > > Alex Will

[Qemu-devel] [PATCH] usb: Fix usb_packet_map() in the presence of IOMMUs

2012-09-25 Thread David Gibson
With the IOMMU infrastructure introduced before 1.2, we need to use dma_memory_map() to obtain a qemu pointer to memory from an IO bus address. However, dma_memory_map() alters the given length to reflect the length over which the used DMA translation is valid - which could be either more or less t

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-25 Thread David Gibson
On Wed, Sep 26, 2012 at 03:03:10AM +0200, Alexander Graf wrote: > On 26.09.2012, at 02:27, David Gibson wrote: > > On Mon, Sep 24, 2012 at 12:38:59PM +0200, Alexander Graf wrote: > >> On 24.09.2012, at 02:31, David Gibson wrote: [snip] > >>> So, if you look at the patch there is actually a -device

[Qemu-devel] [PATCH v2] Align PCI capabilities in pci_find_space

2012-09-25 Thread mjr
From: Matt Renzelmann The current implementation of pci_find_space does not correctly align PCI capabilities in the PCI configuration space. This patch fixes this issue. Signed-off-by: Matt Renzelmann --- Alex Williamson wrote: > I think you could just search every 4th byte. In fact, this w

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-25 Thread Alexander Graf
On 26.09.2012, at 02:27, David Gibson wrote: > On Mon, Sep 24, 2012 at 12:38:59PM +0200, Alexander Graf wrote: >> >> On 24.09.2012, at 02:31, David Gibson wrote: >> >>> On Sat, Sep 22, 2012 at 01:31:08PM +, Blue Swirl wrote: On Fri, Sep 21, 2012 at 3:08 AM, David Gibson wrote: >>

Re: [Qemu-devel] [PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-25 Thread Minchan Kim
On Tue, Sep 25, 2012 at 10:12:07AM +0100, Mel Gorman wrote: > On Mon, Sep 24, 2012 at 02:26:44PM -0700, Andrew Morton wrote: > > On Mon, 24 Sep 2012 10:39:38 +0100 > > Mel Gorman wrote: > > > > > On Fri, Sep 21, 2012 at 02:36:56PM -0700, Andrew Morton wrote: > > > > > > > Also, what has to be do

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-25 Thread David Gibson
On Mon, Sep 24, 2012 at 12:38:59PM +0200, Alexander Graf wrote: > > On 24.09.2012, at 02:31, David Gibson wrote: > > > On Sat, Sep 22, 2012 at 01:31:08PM +, Blue Swirl wrote: > >> On Fri, Sep 21, 2012 at 3:08 AM, David Gibson > >> wrote: > >>> Below is a patch which implements the (PAPR mand

Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible

2012-09-25 Thread Minchan Kim
On Tue, Sep 25, 2012 at 02:39:31PM -0700, Andrew Morton wrote: > On Tue, 25 Sep 2012 17:13:27 +0900 > Minchan Kim wrote: > > > I see. To me, your saying is better than current comment. > > I hope comment could be more explicit. > > > > diff --git a/mm/compaction.c b/mm/compaction.c > > index df0

Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-25 Thread Jan Kiszka
On 2012-09-26 01:43, Anthony Liguori wrote: > Gerd Hoffmann writes: > >> Hi, >> >> Two patches, first split up serial.c a bit, >> then actually add the pci-based serial device. > > The series looks good to me. A couple requests: > > 1) Could you add a spec describing this new PCI device? Do

Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-25 Thread Anthony Liguori
Gerd Hoffmann writes: > Hi, > > Two patches, first split up serial.c a bit, > then actually add the pci-based serial device. The series looks good to me. A couple requests: 1) Could you add a spec describing this new PCI device? Doesn't need to be more than a couple paragraphs since the

[Qemu-devel] [PATCH v3 2/5] target-arm: convert add_cc and sub_cc helpers to TCG

2012-09-25 Thread Aurelien Jarno
Now that the setcond TCG op is available, it's possible to replace add_cc and sub_cc helpers by TCG code. The code generated by TCG is actually very close to the one generated by GCC for the helper, and this avoid all the consequences of using an helper: globals saved back to memory, no possible op

[Qemu-devel] [PATCH v3 1/5] target-arm: use globals for CC flags

2012-09-25 Thread Aurelien Jarno
Use globals for CC flags instead of loading/storing them each they are accessed. This allows some optimizations to be performed by the TCG optimization passes. Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-arm/translate.c | 127 ++--

[Qemu-devel] [PATCH v3 4/5] target-arm: mark a few integer helpers const and pure

2012-09-25 Thread Aurelien Jarno
Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-arm/helper.h | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/target-arm/helper.h b/target-arm/helper.h index 794e2b1..8b9adf1 100644 --- a/target-arm/helper.h +++ b/target-arm/helper.h

Re: [Qemu-devel] [PATCH 7/7] target-s390x: Tidy cpu_dump_state

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:53PM -0700, Richard Henderson wrote: > The blank lines inside the single dump make it difficult for the > eye to pick out the block. Worse, with interior newlines, but > no blank line following, the PSW line appears to belong to the > next dump block. > > Cc: Alexand

Re: [Qemu-devel] [PATCH 5/7] target-s390x: Use CPU_LOG_INT

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:51PM -0700, Richard Henderson wrote: > Three places in the interrupt code did we not honor the mask. > > Cc: Alexander Graf > Signed-off-by: Richard Henderson > --- > target-s390x/helper.c | 7 --- > target-s390x/misc_helper.c | 3 ++- > 2 files changed, 6

Re: [Qemu-devel] [PULL 00/12] NBD patches for 2012-09-22

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > The following changes since commit 89c7fd21930de671a6e34793e8b1ee257e2e: > > Remove unused CONFIG_TCG_PASS_AREG0 and dead code (2012-09-15 17:51:14 > +) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git nbd-next > > for you to f

Re: [Qemu-devel] [PULL 0/7] SCSI patches for 2012-09-21

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Anthony, > > The following changes since commit c26032b2c91721245bfec542d94f37a0238e986e: > > target-xtensa: don't emit extra tcg_gen_goto_tb (2012-09-21 03:07:27 +0400) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git scsi-next > > for

Re: [Qemu-devel] [PULL] QOM CPUState patch queue 2012-09-21

2012-09-25 Thread Anthony Liguori
Andreas Färber writes: > Hello Anthony, > > Please pull a small batch of CPUState-related patches towards x86 CPU hotplug > and fixing some issues with alpha-linux-user. > > The branch is mirrored on both GitHub and repo.or.cz for your convenience. :-) > > Regards, > Andreas > > P.S. Will be most

Re: [Qemu-devel] [PULL 00/14] Trivial patches for 15 to 23 September 2012

2012-09-25 Thread Anthony Liguori
Stefan Hajnoczi writes: > The following changes since commit 93b6599734f81328ee3d608f57667742cafeea72: > > audio: Fix warning from static code analysis (2012-09-23 01:34:16 +0400) > > are available in the git repository at: > > git://github.com/stefanha/qemu.git trivial-patches > Pulled. Tha

Re: [Qemu-devel] [PULL 00/19] Block patches

2012-09-25 Thread Anthony Liguori
Kevin Wolf writes: > The following changes since commit d3e8f95753114a827f9cd8e819b1d5cc8333f76b: > > w32: Add implementation of gmtime_r, localtime_r (2012-09-23 17:09:30 +) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git for-anthony Pulled. Thanks. Rega

Re: [Qemu-devel] linux aio and cache mode

2012-09-25 Thread ching
On 09/25/2012 09:33 PM, Kevin Wolf wrote: > Am 25.09.2012 00:40, schrieb ching: >> On 09/24/2012 08:30 PM, Kevin Wolf wrote: >>> Am 24.09.2012 13:32, schrieb ching: Hi all, My host is qemu-1.1.1 and x64 kernel 3.5.4. The guest is using aio="native" I am trying to use unsafe

Re: [Qemu-devel] [PATCH] target-xtensa: de-optimize EXTUI

2012-09-25 Thread Max Filippov
On Wed, Sep 26, 2012 at 2:57 AM, Aurelien Jarno wrote: > Now that and with 0xff, 0x and 0x is optimized in > tcg/tcg-op.h, there is no need to do it in target-xtensa/translate.c. > > Cc: Max Filippov > Signed-off-by: Aurelien Jarno > --- > target-xtensa/translate.c | 15 +-

[Qemu-devel] [PATCH] target-xtensa: de-optimize EXTUI

2012-09-25 Thread Aurelien Jarno
Now that and with 0xff, 0x and 0x is optimized in tcg/tcg-op.h, there is no need to do it in target-xtensa/translate.c. Cc: Max Filippov Signed-off-by: Aurelien Jarno --- target-xtensa/translate.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/

[Qemu-devel] [PATCH v3 3/5] target-arm: convert sar, shl and shr helpers to TCG

2012-09-25 Thread Aurelien Jarno
Now that the movcond TCG op is available, it's possible to replace shl and shr helpers by TCG code. The code generated by TCG is slightly longer than the code generated by GCC for the helper but is still worth it as this avoid all the consequences of using an helper: globals saved back to memory, n

[Qemu-devel] [PATCH v3 5/5] target-arm: use deposit instead of hardcoded version

2012-09-25 Thread Aurelien Jarno
Use the deposit op instead of and hardcoded bit field insertion. It allows the host to emit the corresponding instruction if available. Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-arm/translate.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(

[Qemu-devel] [PATCH v3 0/5] target-arm: misc optimizations

2012-09-25 Thread Aurelien Jarno
This patch series optimizes the ARM target by: - using globals instead of ld/st function - using TCG code instead of helpers - marking some helpers const and pure -- Changes v3 -> v2 - removed useless code from patch 3 Changes v1 -> v2 - updated patch 3 to use movcond instead of setcond. Als

Re: [Qemu-devel] [PATCH 3/7] tcg-i386: Implement movcond

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:54:27PM -0700, Richard Henderson wrote: > On 09/24/2012 02:37 PM, Alex Barcelo wrote: > > just finished a git-bisect and I found this... and now I do not fully > > understand why I have the problem. > > > > To replicate the error (in a i386 machine, at least): > > $ make

Re: [Qemu-devel] [PATCH 0/8] Misc tcg improvements

2012-09-25 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:08PM -0700, Richard Henderson wrote: > The subject of the andi and assertion patches has come up on this > list earlier this week, between Max Filippov, malc and myself. > > The posibility of using deposit to implement concat occurred to > me while working on the MIPS

Re: [Qemu-devel] [PATCH v3 0/2] Optimize movcond

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 01:44:58PM -0700, Richard Henderson wrote: > Changes v2->v3: > Rebase with the first 5 patches committed. > Fix 32/64-bit compile problems. Oops. > > > r~ > > > Richard Henderson (2): > tcg: Streamline movcond_i64 using 32-bit arithmetic > tcg: Streamline movcon

Re: [Qemu-devel] [PATCH 6/7] target-s390x: Avoid double CPU_LOG_TB_CPU

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:52PM -0700, Richard Henderson wrote: > This is already handled generically in cpu_exec. > > Cc: Alexander Graf > Signed-off-by: Richard Henderson > --- > target-s390x/translate.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/target-s390x/translate.c b/ta

Re: [Qemu-devel] [PATCH 4/7] target-unicore32: Call tcg_gen_debug_insn_start

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:50PM -0700, Richard Henderson wrote: > Cc: Guan Xuetao > Signed-off-by: Richard Henderson > --- > target-unicore32/translate.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c > index b786a6b..

Re: [Qemu-devel] [PATCH 3/7] target-s390x: Call tcg_gen_debug_insn_start

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:49PM -0700, Richard Henderson wrote: > Cc: Alexander Graf > Signed-off-by: Richard Henderson > --- > target-s390x/translate.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/target-s390x/translate.c b/target-s390x/translate.c > ind

Re: [Qemu-devel] [PATCH 2/7] target-m68k: Call tcg_gen_debug_insn_start

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:48PM -0700, Richard Henderson wrote: > Cc: Paul Brook > Signed-off-by: Richard Henderson > --- > target-m68k/translate.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/target-m68k/translate.c b/target-m68k/translate.c > index fb707f2..451ef74 100644 >

Re: [Qemu-devel] [PATCH 1/7] Emit debug_insn for CPU_LOG_TB_OP_OPT as well.

2012-09-25 Thread Aurelien Jarno
On Mon, Sep 24, 2012 at 02:55:47PM -0700, Richard Henderson wrote: > For all targets that currently call tcg_gen_debug_insn_start, > add CPU_LOG_TB_OP_OPT to the condition that gates it. > > This is useful for comparing optimization dumps, when the > pre-optimization dump is merely noise. > > Sig

Re: [Qemu-devel] [PATCH v2 3/5] target-arm: convert sar, shl and shr helpers to TCG

2012-09-25 Thread Aurelien Jarno
On Tue, Sep 25, 2012 at 02:57:20PM +0100, Peter Maydell wrote: > On 21 September 2012 20:33, Aurelien Jarno wrote: > > +static void gen_sar(TCGv dest, TCGv t0, TCGv t1) > > +{ > > +TCGv tmp1, tmp2, tmp3; > > +tmp1 = tcg_temp_new_i32(); > > +tcg_gen_andi_i32(tmp1, t1, 0xff); > > +tm

Re: [Qemu-devel] [PATCH 15/17] main-loop: use aio_notify for qemu_notify_event

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini > --- > main-loop.c | 106 > +--- > 1 file modificato, 8 inserzioni(+), 98 rimozioni(-) diffstats like this are always a good sign :-) Reviewed-by: Anthony Liguori Regards, Anthony

Re: [Qemu-devel] [PATCH 16/17] aio: clean up now-unused functions

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Some cleanups can now be made, now that the main loop does not anymore need > hooks into the bottom half code. > > Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > async.c | 23 +++ > oslib-posix.c

Re: [Qemu-devel] [PATCH 14/17] main-loop: use GSource to poll AIO file descriptors

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini > --- > main-loop.c | 23 ++- > main-loop.h | 2 -- > 2 file modificati, 6 inserzioni(+), 19 rimozioni(-) > > diff --git a/main-loop.c b/main-loop.c > index b290c79..209f699 100644 > --- a/main-loop.c > +++ b/main-loop.c

Re: [Qemu-devel] [PATCH 12/17] aio: add aio_notify

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > With this change async.c does not rely anymore on any service from > main-loop.c, i.e. it is completely self-contained. > > Signed-off-by: Paolo Bonzini Other than the coding style bits that need to be fixed first in the previous patch: Reviewed-by: Anthony Liguori Re

Re: [Qemu-devel] [PATCH 13/17] aio: call aio_notify after setting I/O handlers

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > In the current code, this is done by qemu_set_fd_handler2, which is > called by qemu_aio_set_fd_handler. We need to keep the same behavior > even after removing the call to qemu_set_fd_handler2. > > Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, A

Re: [Qemu-devel] [PATCH 11/17] aio: make AioContexts GSources

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > This lets AioContexts be used (optionally) with a glib main loop. > > Signed-off-by: Paolo Bonzini > --- > aio-posix.c | 4 > aio-win32.c | 4 > async.c | 65 > - > qemu-aio.h | 23

Re: [Qemu-devel] [PATCH 09/17] aio: prepare for introducing GSource-based dispatch

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > This adds a GPollFD to each AioHandler. It will then be possible to > attach these GPollFDs to a GSource, and from there to the main loop. > aio_wait examines the GPollFDs and avoids calling select() if any > is set (similar to what it does if bottom halves are available)

Re: [Qemu-devel] [PATCH 08/17] aio: add non-blocking variant of aio_wait

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > This will be used when polling the GSource attached to an AioContext. > > Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > aio.c | 16 > async.c | 2 +- > main-loop.c | 2 +- > qemu-aio.h | 21 +

Re: [Qemu-devel] [PATCH 06/17] aio: introduce AioContext, move bottom halves there

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Start introducing AioContext, which will let us remove globals from > aio.c/async.c, and introduce multiple I/O threads. > > The bottom half functions now take an additional AioContext argument. > A bottom half is created with a specific AioContext that remains the > same

Re: [Qemu-devel] [PATCH 05/17] aio: provide platform-independent API

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > This adds to aio.c a platform-independent API based on EventNotifiers, that > can be used by both POSIX and Win32. > > Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > Makefile.objs | 4 ++-- > aio.c | 9 +

Re: [Qemu-devel] [PATCH 04/17] aio: change qemu_aio_set_fd_handler to return void

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > aio.c | 12 +--- > qemu-aio.h | 10 +- > 2 file modificati, 10 inserzioni(+), 12 rimozioni(-) > > diff --git a/aio.c b/aio.c > index c738a4e..e062aab 1006

Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible

2012-09-25 Thread Andrew Morton
On Tue, 25 Sep 2012 17:13:27 +0900 Minchan Kim wrote: > I see. To me, your saying is better than current comment. > I hope comment could be more explicit. > > diff --git a/mm/compaction.c b/mm/compaction.c > index df01b4e..f1d2cc7 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -542,

Re: [Qemu-devel] [PATCH] Align PCI capabilities in pci_find_space

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 15:59 -0500, m...@cs.wisc.edu wrote: > From: Matt Renzelmann > > The current implementation of pci_find_space does not properly align > PCI capabilities in the PCI configuration space. This patch fixes > this issue. > > Signed-off-by: Matt Renzelmann > --- > > This is my

Re: [Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize

2012-09-25 Thread Anthony Liguori
Michael Tokarev writes: > Current code binds monitor and serial port to the guest console > unless -nographic is specified, which is okay. But when there's > no guest console (-nographic), the code tries to use stdio for > the same default devices. But it does not check for -daemonize > at the

Re: [Qemu-devel] [RfC] using pixman in qemu for raster ops

2012-09-25 Thread Anthony Liguori
Gerd Hoffmann writes: > On 09/25/12 12:48, Peter Maydell wrote: >> On 25 September 2012 11:37, Gerd Hoffmann wrote: >>> On 09/25/12 11:31, Peter Maydell wrote: For me "not a standard library package on RHEL5" is a strong argument against adding a hard dependency. (For instance, most of

Re: [Qemu-devel] KVM Call minutes for 2012-09-25

2012-09-25 Thread Anthony Liguori
Luiz Capitulino writes: > On Tue, 25 Sep 2012 16:59:00 +0200 > Markus Armbruster wrote: > >> Juan Quintela writes: >> >> > Hi >> > >> > This are this week minutes: >> > >> > - URI parsing library for glusterfs: libxml2 vs. in-tree "fork" of the >> > same code. (Paolo) >> > * code hasn't chang

Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization

2012-09-25 Thread Anthony Liguori
Michael Roth writes: > On Tue, Sep 25, 2012 at 08:37:16AM +0200, Paolo Bonzini wrote: >> Il 24/09/2012 20:14, Michael Roth ha scritto: >> >>> > > I went with qUppercase because it avoids all the previous issues with >> >>> > > using leading underscores, and it's reserved in terms of QEMU coding >

Re: [Qemu-devel] [PATCH 18/22] qidl: add lexer library (based on QC parser)

2012-09-25 Thread Anthony Liguori
Michael Roth writes: > On Fri, Sep 21, 2012 at 05:18:09PM -0600, Eric Blake wrote: >> On 09/21/2012 08:07 AM, Michael Roth wrote: >> > Adds an abstract Lexer class to handle tokenizer via a >> > peek/pop/peekline/popline interface, along with an implementation for C >> > based on the lexer from q

Re: [Qemu-devel] [PATCH 0/9] build cleanups

2012-09-25 Thread Anthony Liguori
Paolo Bonzini writes: > Il 17/09/2012 18:44, Paolo Bonzini ha scritto: >> Here are some cleanups to the build system, removing some unused files >> from some of the products or fixing some strange behavior that bit me >> while looking at the tree reorganization. >> >> Paolo >> >> Paolo Bonzini

[Qemu-devel] [PATCH] Align PCI capabilities in pci_find_space

2012-09-25 Thread mjr
From: Matt Renzelmann The current implementation of pci_find_space does not properly align PCI capabilities in the PCI configuration space. This patch fixes this issue. Signed-off-by: Matt Renzelmann --- This is my first patch to QEMU so I hope I'm not screwing up too much. The purpose of thi

[Qemu-devel] [PATCH 2/3] monitor: add Error * argument to monitor_get_fd

2012-09-25 Thread Luiz Capitulino
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- dump.c | 3 +-- migration-fd.c | 2 +- monitor.c | 15 +-- monitor.h | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dump.c b/dump.c index 2bf8d8d..1a3c

[Qemu-devel] [PATCH 3/3] qapi: convert add_client

2012-09-25 Thread Luiz Capitulino
Also fixes a few issues while there: 1. The fd returned by monitor_get_fd() leaks in most error conditions 2. monitor_get_fd() return value is not checked. Best case we get an error that is not correctly reported, worse case one of the functions using the fd (with value of -1) will explo

[Qemu-devel] [PATCH 1/3] pci-assign: use monitor_handle_fd_param

2012-09-25 Thread Luiz Capitulino
From: Paolo Bonzini There is no need to open-code the choice between a file descriptor number or a named one. Just use monitor_handle_fd_param, which also takes care of printing the error message. Signed-off-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- hw/kvm/pci-assign.c | 12 +++---

[Qemu-devel] [PATCH v4 0/3] qapi: convert add_client

2012-09-25 Thread Luiz Capitulino
v4 - Fix misworded error message in monitor_get_fd() [Markus] - small doc & commit log improvements [Markus] Luiz Capitulino (1): qapi: convert add_client Paolo Bonzini (2): pci-assign: use monitor_handle_fd_param monitor: add Error * argument to monitor_get_fd dump.c | 3

Re: [Qemu-devel] [PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-25 Thread Andrew Morton
On Tue, 25 Sep 2012 10:12:07 +0100 Mel Gorman wrote: > First, we'd introduce a variant of get_pageblock_migratetype() that returns > all the bits for the pageblock flags and then helpers to extract either the > migratetype or the PG_migrate_skip. We already are incurring the cost of > get_pageblo

Re: [Qemu-devel] [PATCH v2 5/7] QAPI: add command for live block commit, 'block-commit'

2012-09-25 Thread Jeff Cody
On 09/25/2012 03:42 PM, Eric Blake wrote: > On 09/25/2012 10:29 AM, Jeff Cody wrote: >> The command for live block commit is added, which has the following >> arguments: >> >> device: the block device to perform the commit on (mandatory) >> base: the base image to commit into; optional (if not sp

Re: [Qemu-devel] [PATCH v2 4/7] block: helper function, to find the base image of a chain

2012-09-25 Thread Jeff Cody
On 09/25/2012 03:13 PM, Eric Blake wrote: > On 09/25/2012 10:29 AM, Jeff Cody wrote: >> This is a simple helper function, that will return the base image >> of a given image chain. >> >> Signed-off-by: Jeff Cody >> --- >> block.c | 16 >> block.h | 1 + >> 2 files changed, 17 in

Re: [Qemu-devel] KVM call agenda for September 25th

2012-09-25 Thread Anthony Liguori
Kevin Wolf writes: > Am 25.09.2012 14:57, schrieb Anthony Liguori: >> Paolo Bonzini writes: >> >>> Il 24/09/2012 13:28, Juan Quintela ha scritto: Hi Please send in any agenda items you are interested in covering. >>> >>> URI parsing library for glusterfs: libxml2 vs. in-tree "for

Re: [Qemu-devel] [PATCH v2 5/7] QAPI: add command for live block commit, 'block-commit'

2012-09-25 Thread Eric Blake
On 09/25/2012 10:29 AM, Jeff Cody wrote: > The command for live block commit is added, which has the following > arguments: > > device: the block device to perform the commit on (mandatory) > base: the base image to commit into; optional (if not specified, > it is the underlying original

Re: [Qemu-devel] Dynamic Binary Instrumentation

2012-09-25 Thread Lluís Vilanova
陳韋任 (Wei-Ren Chen) writes: > On Fri, Sep 21, 2012 at 03:39:32PM +0200, Lluís Vilanova wrote: >> Sorry, it's up again. The server is low on RAM and Linux' OOM killer kicks in >> sometimes. > Thanks. I am playing around your qemu-dbi, and has error below. > $ make > LINK i386-softmmu/qemu-sys

Re: [Qemu-devel] [PATCH v2 4/7] block: helper function, to find the base image of a chain

2012-09-25 Thread Eric Blake
On 09/25/2012 10:29 AM, Jeff Cody wrote: > This is a simple helper function, that will return the base image > of a given image chain. > > Signed-off-by: Jeff Cody > --- > block.c | 16 > block.h | 1 + > 2 files changed, 17 insertions(+) Bikeshed question: Any reason patch 1/

Re: [Qemu-devel] [PATCH v2 2/7] block: add live block commit functionality

2012-09-25 Thread Eric Blake
On 09/25/2012 12:58 PM, Jeff Cody wrote: > On 09/25/2012 02:12 PM, Eric Blake wrote: >> On 09/25/2012 10:29 AM, Jeff Cody wrote: >>> This adds the live commit coroutine. This iteration focuses on the >>> commit only below the active layer, and not the active layer itself. >>> >> I think you are m

Re: [Qemu-devel] [PATCH v2 2/7] block: add live block commit functionality

2012-09-25 Thread Jeff Cody
On 09/25/2012 02:12 PM, Eric Blake wrote: > On 09/25/2012 10:29 AM, Jeff Cody wrote: >> This adds the live commit coroutine. This iteration focuses on the >> commit only below the active layer, and not the active layer itself. >> >> The behaviour is similar to block streaming; the sectors are walk

Re: [Qemu-devel] [PATCH v2 6/7] qemu-iotests: add initial tests for live block commit

2012-09-25 Thread Jeff Cody
On 09/25/2012 02:02 PM, Eric Blake wrote: > On 09/25/2012 10:29 AM, Jeff Cody wrote: >> Derived from the streaming test cases (030), this adds the >> following tests: >> >> 1. For the following image chain, commit [mid] into [backing], >>and use qemu-io to verify [backing] has its original data

Re: [Qemu-devel] KVM Call minutes for 2012-09-25

2012-09-25 Thread Luiz Capitulino
On Tue, 25 Sep 2012 16:59:00 +0200 Markus Armbruster wrote: > Juan Quintela writes: > > > Hi > > > > This are this week minutes: > > > > - URI parsing library for glusterfs: libxml2 vs. in-tree "fork" of the > > same code. (Paolo) > > * code hasn't changed in 2 years, it is really stable > >

  1   2   3   >