[Qemu-devel] [TestDays] Illegal memory reads in SDL zoom

2011-11-11 Thread Stefan Weil
SDL zoom is based on buggy old code imported from SDL rotozoom. This code shows errors when QEMU is run with Valgrind. Valgrind was started like this from QEMU's source directory on a netbook running Ubuntu (important because the default desktop zooms QEMU's window immediately after the start):

Re: [Qemu-devel] [TestDays] info mtree abort

2011-11-11 Thread Stefan Weil
Am 12.11.2011 03:05, schrieb Andreas Färber: Hello, On current qemu.git master for qemu-system-x86_64 I observe crashes similar to this one when running info mtree on the SDL monitor console: *** glibc detected *** /home/andreas/QEMU/qemu-rl78/rl78-softmmu/qemu-system-rl78: free(): invalid poin

Re: [Qemu-devel] [PATCH] hw/omap_gpio: Fix infinite recursion when doing 8/16 bit reads

2011-11-11 Thread Anthony Liguori
On 11/11/2011 06:38 PM, Peter Maydell wrote: Anthony -- you've committed a bunch of later patches but not this one: did you miss it? Most likely an over zealous delete on my part. I'll requeue. Regards, Anthony Liguori thanks -- PMM On 7 November 2011 13:25, Peter Maydell wrote: Fix a

Re: [Qemu-devel] [TestDays] info mtree abort

2011-11-11 Thread Andreas Färber
Am 12.11.2011 03:05, schrieb Andreas Färber: > On current qemu.git master for qemu-system-x86_64 I observe crashes > similar to this one when running info mtree on the SDL monitor console: > > *** glibc detected *** > /home/andreas/QEMU/qemu-rl78/rl78-softmmu/qemu-system-rl78: free(): > invalid po

[Qemu-devel] [TestDays] info mtree abort

2011-11-11 Thread Andreas Färber
Hello, On current qemu.git master for qemu-system-x86_64 I observe crashes similar to this one when running info mtree on the SDL monitor console: *** glibc detected *** /home/andreas/QEMU/qemu-rl78/rl78-softmmu/qemu-system-rl78: free(): invalid pointer: 0x4545454545454545 *** #0 0x7630

Re: [Qemu-devel] [PATCH] hw/omap_gpio: Fix infinite recursion when doing 8/16 bit reads

2011-11-11 Thread Peter Maydell
Anthony -- you've committed a bunch of later patches but not this one: did you miss it? thanks -- PMM On 7 November 2011 13:25, Peter Maydell wrote: > Fix a long-standing bug which meant that any attempt to do an > 8 or 16 bit read from the OMAP GPIO module would cause qemu to > crash due to an

Re: [Qemu-devel] [PATCH] Documentation: Add section about iSCSI LUNS to qemu-doc

2011-11-11 Thread ronnie sahlberg
Hi, On Sat, Nov 12, 2011 at 10:11 AM, Andreas Färber wrote: > Hi, > > Am 11.11.2011 22:46, schrieb Ronnie Sahlberg: >> Add a new section about using iSCSI LUNs with qemu >> and provide a short example on how to set up a target and access it >> using the built-in initiator >> >> Signed-off-by: Ron

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-11 Thread Scott Wood
On 11/03/2011 03:12 PM, Alex Williamson wrote: > +Many modern system now provide DMA and interrupt remapping facilities > +to help ensure I/O devices behave within the boundaries they've been > +allotted. This includes x86 hardware with AMD-Vi and Intel VT-d as > +well as POWER systems with Partit

[Qemu-devel] [PATCH] Documentation: Add section about iSCSI LUNS to qemu-doc

2011-11-11 Thread Ronnie Sahlberg
Add a new section about using iSCSI LUNs with qemu and provide a short example on how to set up a target and access it using the built-in initiator Signed-off-by: Ronnie Sahlberg --- qemu-doc.texi | 56 1 files changed, 56 insertions(+),

[Qemu-devel] Patch to add iSCSI documentation

2011-11-11 Thread Ronnie Sahlberg
List, Please find an updated patch to add documentation for iSCSI and a simple example how to set up a target to use with qemu. It addresses the issues rised by the review of the first patch. regards ronnie sahlberg

[Qemu-devel] buildbot failure in qemu on default_openbsd_4.9

2011-11-11 Thread qemu
The Buildbot has detected a new failure on builder default_openbsd_4.9 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_openbsd_4.9/builds/83 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_openbsd49 Bui

Re: [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points.

2011-11-11 Thread Andreas Färber
Am 11.11.2011 18:49, schrieb Alexander Graf: > From: Richard Henderson > > Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi. > > Signed-off-by: Richard Henderson Missing Reviewed-by: Andreas Färber Reviewed-by: Stefan Weil > Signed-off-by: Alexander Graf > --- Andreas -- SUS

Re: [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers

2011-11-11 Thread Andreas Färber
Am 11.11.2011 18:49, schrieb Alexander Graf: > From: Richard Henderson > > Most targets did not name the enum; tci used TCGRegister. > > Signed-off-by: Richard Henderson Picking this into s390 was a bit unfortunate. It's missing Reviewed-by: Andreas Färber Reviewed-by: Stefan Weil > Signed

Re: [Qemu-devel] Storage requirements for live migration

2011-11-11 Thread Anthony Liguori
On 11/11/2011 04:43 PM, Ryan Harper wrote: == Image Formats == Image formats are not safe to use with live migration. The reason is that QEMU caches data for image formats and does not have a mechanism to flush those caches. The following attempts to describe the issues with the various format

Re: [Qemu-devel] [PATCH] hw/pxa2xx.c: Fix handling of R/WC bits in PMCR

2011-11-11 Thread Peter Maydell
On 11 November 2011 21:05, andrzej zaborowski wrote: >>> -        s->pm_regs[addr>>  2]&= 0x15&  ~(value&  0x2a); >>> +        /* Clear the write-one-to-clear bits... */ >>> +        s->pm_regs[addr>>  2]&= ~(value&  0x2a); >>> +        /* ...and set the plain r/w bits */ >>>          s->pm_regs[a

Re: [Qemu-devel] [PATCH] Documentation: Add section about iSCSI LUNS to qemu-doc

2011-11-11 Thread Andreas Färber
Hi, Am 11.11.2011 22:46, schrieb Ronnie Sahlberg: > Add a new section about using iSCSI LUNs with qemu > and provide a short example on how to set up a target and access it > using the built-in initiator > > Signed-off-by: Ronnie Sahlberg > --- > qemu-doc.texi | 53 +++

[Qemu-devel] kvm decode cache and guest memory

2011-11-11 Thread Xin Tong
When kvm encounters a trapping instruction, it will vmexits the guest and vmenters the host. the host then emulates the instruction on the vm guest register-saving area. I have a few questions regarding this. 1. There is an emulation context struct x86_emulate_ctxt { struct x86_emulate_op

Re: [Qemu-devel] Storage requirements for live migration

2011-11-11 Thread Ryan Harper
> == Image Formats == > > Image formats are not safe to use with live migration. The reason is that > QEMU caches data for image formats and does not have a mechanism to flush > those caches. The following attempts to describe the issues with the > various formats > > === QCOW2 === > > QCOW

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-11 Thread Andreas Färber
Am 11.11.2011 18:40, schrieb Alexander Graf: > On 11/11/2011 05:44 PM, Peter Maydell wrote: >> On 11 November 2011 16:24, Alexander Graf wrote: >>> On 11/11/2011 05:11 PM, Peter Maydell wrote: Yes, so that's option (2) and you need to be using a target_phys_addr_t. >>> But ram_size is ra

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-11 Thread Christian Benvenuti (benve)
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Friday, November 11, 2011 10:04 AM > To: Christian Benvenuti (benve) > Cc: chr...@sous-sol.org; a...@au1.ibm.com; p...@au1.ibm.com; > d...@au1.ibm.com; joerg.roe...@amd.com; ag...@suse.de; Aaron Fabbri

Re: [Qemu-devel] [PATCH] Documentation: Add section about iSCSI LUNS to qemu-doc

2011-11-11 Thread Stefan Weil
Hi, I have only some small remarks, see my inline comments below. Am 11.11.2011 22:46, schrieb Ronnie Sahlberg: Add a new section about using iSCSI LUNs with qemu and provide a short example on how to set up a target and access it using the built-in initiator Signed-off-by: Ronnie Sahlberg --

[Qemu-devel] [PATCH] Documentation: Add section about iSCSI LUNS to qemu-doc

2011-11-11 Thread Ronnie Sahlberg
Add a new section about using iSCSI LUNs with qemu and provide a short example on how to set up a target and access it using the built-in initiator Signed-off-by: Ronnie Sahlberg --- qemu-doc.texi | 53 + 1 files changed, 53 insertions(+), 0

[Qemu-devel] (no subject)

2011-11-11 Thread Ronnie Sahlberg
List, Please find a patch that adds a new section for iSCSI to qemu-doc. This section provides much more verbose description of iSCSI and its use than the manpage and also includes a short description on how to set up a simple iSCSI target on loopback and then accessing it from QEMU. The example

Re: [Qemu-devel] [PATCH v2] gdbstub: Fix memory leak

2011-11-11 Thread Stefan Weil
Am 18.10.2011 22:25, schrieb Stefan Weil: cppcheck report: gdbstub.c:1781: error: Memory leak: s Rearranging of the code avoids the leak. v2: Replace the g_malloc0() by g_new0() (suggested by Stuart Brady). Signed-off-by: Stefan Weil --- gdbstub.c | 14 -- 1 files changed,

Re: [Qemu-devel] [PATCH] hw/pxa2xx.c: Fix handling of R/WC bits in PMCR

2011-11-11 Thread andrzej zaborowski
Hi, On 11 November 2011 20:45, Anthony Liguori wrote: > On 11/09/2011 02:46 PM, Peter Maydell wrote: >> >> Fix a bug in handling the write-one-to-clear bits in the PMCR >> which meant that we would always clear the bit even if the >> value written was a zero. Spotted by Coverity (see bug 887883).

[Qemu-devel] [PATCH] block/raw-posix.c: add BLKDISCARD support

2011-11-11 Thread e-t172
This adds ioctl(BLKDISCARD) (a.k.a "discard", "TRIM", "UNMAP", "hole punching") support for host devices. This is especially useful if the raw device is a SSD or some kind of thin-provisioned device. Cc: Kevin Wolf Signed-off-by: Etienne Dechamps --- block/raw-posix.c | 20 ++

[Qemu-devel] [PATCH 2/4] ivshmem: use migration blockers to prevent live migration in peer mode

2011-11-11 Thread Anthony Liguori
Now when you try to migrate with ivshmem, you get a proper QMP error: (qemu) migrate tcp:localhost:1025 Migration is disabled when using feature 'peer mode' in device 'ivshmem' (qemu) Signed-off-by: Anthony Liguori --- hw/ivshmem.c | 12 +++- qerror.c |4 qerror.h |

[Qemu-devel] [PATCH 3/4] qcow2: add a migration blocker

2011-11-11 Thread Anthony Liguori
Now when you try to migrate with qcow2, you get: (qemu) migrate tcp:localhost:1025 Block format 'qcow2' used by device 'ide0-hd0' does not support feature 'live migration' (qemu) Signed-off-by: Anthony Liguori --- block/qcow2.c |9 + block/qcow2.h |2 ++ qemu-tool.c |9 ++

[Qemu-devel] [PATCH 1/4] migrate: add migration blockers

2011-11-11 Thread Anthony Liguori
This lets different subsystems register an Error that is thrown whenever migration is attempted. This works nicely because it gracefully supports things like hotplug. Right now, if multiple errors are registered, only one of them is reported. I expect that for 1.1, we'll extend query-migrate to r

[Qemu-devel] [PATCH 4/4] qed: add migration blocker

2011-11-11 Thread Anthony Liguori
Now when you try to migrate with qed, you get: (qemu) migrate tcp:localhost:1025 Block format 'qed' used by device 'ide0-hd0' does not support feature 'live migration' (qemu) Signed-off-by: Anthony Liguori --- block/qed.c | 10 ++ block/qed.h |2 ++ 2 files changed, 12 insertions

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-11 Thread Anthony Liguori
On 11/11/2011 08:44 AM, Kevin Wolf wrote: Am 11.11.2011 15:35, schrieb Anthony Liguori: This is not a bug fix, this is a new feature. We're long past feature freeze. It's not a simple and obvious fix either. It only partially fixes the problem and introduces other problems. It's not a good ca

Re: [Qemu-devel] [Xen-devel] [PATCH V3 08/10] Introduce Xen PCI Passthrough, PCI config space helpers (2/3)

2011-11-11 Thread Ian Campbell
On Fri, 2011-11-11 at 17:40 +, Anthony PERARD wrote: > > > if ((index < 0) && (index < PCI_ROM_SLOT)) > > > > um, which looks wrong. Should it be 'index > 0' ? > > Every other form is a bit confusing to me. I'd like to write > 0 < index < ROM_SLOT, so I know that index is between 0 and ROM_SL

Re: [Qemu-devel] [PATCH] migration: fix detached migration with fd

2011-11-11 Thread Anthony Liguori
On 11/09/2011 02:29 PM, Juan Quintela wrote: Migration with fd uses s->mon to pass the fd. But we only assign the s->mon for !detached migration. Fix it. Once there add a comment indicating that s->mon has two uses. Bug reported by: Wen Congyang Signed-off-by: Juan Quintela CC: Wen Congyan

Re: [Qemu-devel] [PATCH v2] vl.c: prohibit simultaneous use of -icount with kvm or xen

2011-11-11 Thread Anthony Liguori
On 11/10/2011 05:38 AM, Max Filippov wrote: With -icount, The vm_clock is updated with help from TCG (it counts instructions at 2^ICOUNT ns/instructions). With KVM, the instruction count is not available so KVM cannot provide this help. Signed-off-by: Max Filippov Acked-by: Paolo Bonzini Appli

Re: [Qemu-devel] [PATCH 0/5] Plug a few trivial resource leaks

2011-11-11 Thread Anthony Liguori
On 11/11/2011 03:40 AM, Markus Armbruster wrote: As usual, shit happens on error paths. Applied all. Thanks. Regards, Anthony Liguori Markus Armbruster (5): qemu-char: Plug memory leak on qemu_chr_open_pty() error path ui: Plug memory leaks on parse_keyboard_layout() error path q

Re: [Qemu-devel] [PATCH] hw/arm_timer.c: Fix bounds check for Integrator timer accesses

2011-11-11 Thread Anthony Liguori
On 11/11/2011 07:30 AM, Peter Maydell wrote: There are only three counter/timers on the integrator board: correct the bounds check to avoid an array overrun. (Spotted by Coverity, see bug 887883). Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony Liguori --- hw/arm_timer.c

Re: [Qemu-devel] [PATCH] vl.c: Fail gracefully if no machine is found

2011-11-11 Thread Anthony Liguori
On 11/10/2011 09:35 AM, Andreas Färber wrote: machine defaults to find_default_machine(), then gets overridden via -M and machine_parse(). If no -M is specified and find_default_machine() returns NULL (when no machine compiled in), exit with an error. Avoids a segfault when setting machine->max

Re: [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i'

2011-11-11 Thread Anthony Liguori
On 11/10/2011 02:26 PM, Pavel Borzenkov wrote: 'sed -i' is not defined in POSIX. It doesn't work on Mac OS X the way it's used in configure (without suffix argument). This patch implements Peter Maydell's idea of xattr.h detection. Cc: Peter Maydell Signed-off-by: Pavel Borzenkov Applied. Tha

Re: [Qemu-devel] [PATCH v2] vl.c: prohibit simultaneous use of -icount with kvm or xen

2011-11-11 Thread Anthony Liguori
On 11/10/2011 05:38 AM, Max Filippov wrote: With -icount, The vm_clock is updated with help from TCG (it counts instructions at 2^ICOUNT ns/instructions). With KVM, the instruction count is not available so KVM cannot provide this help. Signed-off-by: Max Filippov Acked-by: Paolo Bonzini Appli

Re: [Qemu-devel] [PATCH] hw/pxa2xx.c: Fix handling of R/WC bits in PMCR

2011-11-11 Thread Anthony Liguori
On 11/09/2011 02:46 PM, Peter Maydell wrote: Fix a bug in handling the write-one-to-clear bits in the PMCR which meant that we would always clear the bit even if the value written was a zero. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthon

Re: [Qemu-devel] [PATCH] hw/pl061: Remove pointless comparison of array to null

2011-11-11 Thread Anthony Liguori
On 11/09/2011 02:04 PM, Peter Maydell wrote: Remove a pointless comparison of an array to null. (There is no need to check whether s->out[i] is non-null as qemu_set_irq will do that for us.) Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony

Re: [Qemu-devel] [PATCH] hw/tc58128.c: Remove unnecessary check for g_malloc failure

2011-11-11 Thread Anthony Liguori
On 11/09/2011 01:34 PM, Peter Maydell wrote: Remove a check for g_malloc failing: this never happens. Also use g_malloc rather than g_malloc0 as we immediately memset the entire region and so zero-initialising it is pointless. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH] linux-user/elfload.c: Don't memset(NULL..) if malloc() failed

2011-11-11 Thread Anthony Liguori
On 11/09/2011 01:22 PM, Peter Maydell wrote: If a malloc() in copy_elf_strings() failed we would call memset() before the "did malloc fail?" check. Fix this by moving to the glib alloc/free routines for this memory so we can use g_try_malloc0 rather than having a separate memset(). Spotted by Cov

Re: [Qemu-devel] [PATCH] hw/omap_intc.c: Avoid crash on access to nonexistent banked registers

2011-11-11 Thread Anthony Liguori
On 11/09/2011 12:45 PM, Peter Maydell wrote: Avoid a crash due to null pointer dereference if a guest attempts to access banked registers for a nonexistent bank. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony Liguori --- hw/omap_intc

Re: [Qemu-devel] [ICON] QEMU Mascot Contest v.2

2011-11-11 Thread Stefan Weil
Am 11.11.2011 17:18, schrieb 陳韋任: This is awesome! I'm worried how well it will scale down though. If you do the "emu" part on the right side, vertically, between the bottom of its head and top of its foot, you can shrink the Q part a bit to make the emu's body more proportional and leave more sp

Re: [Qemu-devel] [Xen-devel] [PATCH V3 10/10] Introduce Xen PCI Passthrough, MSI (3/3)

2011-11-11 Thread Anthony PERARD
On Thu, 10 Nov 2011, Konrad Rzeszutek Wilk wrote: > On Fri, Oct 28, 2011 at 04:07:36PM +0100, Anthony PERARD wrote: > > From: Jiang Yunhong > > > > Signed-off-by: Jiang Yunhong > > Signed-off-by: Shan Haitao > > Signed-off-by: Anthony PERARD > > --- > > Makefile.target |

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-11 Thread Alex Williamson
On Wed, 2011-11-09 at 18:57 -0600, Christian Benvenuti (benve) wrote: > Here are few minor comments on vfio_iommu.c ... Sorry, I've been poking sticks at trying to figure out a clean way to solve the force vfio driver attach problem. > > diff --git a/drivers/vfio/vfio_iommu.c b/drivers/vfio/vfio_

Re: [Qemu-devel] Patches for SMSC LAN911X driver

2011-11-11 Thread Peter Maydell
On 11 November 2011 13:44, Cachet Bertrand wrote: > In the driver for the SMSC LAN9118 device (hw/lan9118.c), I modify the code > to update the PM_CTRL register (switch PM_MODE bits to D0 and set (1b) READY > bit ) when writing to the BYTE_TEST register. As Andreas says, if you can submit your pa

Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch

2011-11-11 Thread Anthony Liguori
On 11/09/2011 12:54 PM, Pavel Borzenkov wrote: When SDL support is disabled, there is no way to build QEMU without Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and allows to build QEMU without both SDL and Cocoa frontends. Signed-off-by: Pavel Borzenkov This breaks SDL pr

[Qemu-devel] [PATCH 06/16] qemu-nbd: trap SIGTERM

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini The client process right now uses SIGTERM to interrupt the server side. This does not affect the exit status of "qemu-nbd -v -c" because the server is a child process. This will change when both sides will be in the same process, and anyway cleaning up things nicely upon SIGT

[Qemu-devel] [PATCH 13/16] hw/pc.c: Fix use-while-uninitialized of fd_type[]

2011-11-11 Thread Kevin Wolf
From: Peter Maydell Fix a use-while-uninitialized of the fd_type[] array (introduced in commit 34d4260e1, noticed by Coverity). This is more theoretical than practical, since it's quite hard to get here with floppy==NULL (the qdev_try_create() of the isa-fdc device has to fail). Signed-off-by: P

Re: [Qemu-devel] QEMU Mascot Contest

2011-11-11 Thread Anthony Liguori
On 11/11/2011 08:41 AM, Andreas Färber wrote: Hi, Am 10.11.2011 23:10, schrieb Anthony Liguori: [...] I thought it would be a fun part of the 1.0 release to have a logo competition to create an official image of Q. So break out Gimp, Inkscape, or your favorite image editor and submit an icon

[Qemu-devel] [PATCH 12/16] block: Fix vpc initialization of the Dynamic Disk Header

2011-11-11 Thread Kevin Wolf
From: Charles Arnold The Data Offset field in the Dynamic Disk Header is an 8 byte field. Although the specification (2006-10-11) gives an example of initializing only the first 4 bytes, images generated by Microsoft on Windows initialize all 8 bytes. Failure to initialize all 8 bytes results in

[Qemu-devel] [PATCH 10/16] qemu-nbd: fix socket creation race

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini Now that the client and server are in the same process, there is no need to race on the creation of the socket. We can open the listening socket before starting the client thread. This avoids that "qemu-nbd -v -c" prints this once before connecting successfully to the socket

[Qemu-devel] [PATCH 16/16] block: Make cache=unsafe flush to the OS

2011-11-11 Thread Kevin Wolf
cache=unsafe completely ignored bdrv_flush, because flushing the host disk costs a lot of performance. However, this means that qcow2 images (and potentially any other format) can lose data even after the guest has issued a flush if the qemu process crashes/is killed. In case of a host crash, data

[Qemu-devel] [PATCH 12/16] s390: Fix cpu shutdown for KVM

2011-11-11 Thread Alexander Graf
From: Christian Borntraeger On s390 a shutdown is the state of all CPUs being either stopped or disabled (for interrupts) waiting. We have to track the overall number of running CPUs to call the shutdown sequence accordingly. This patch implements the counting and shutdown handling for the kvm pa

[Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers

2011-11-11 Thread Alexander Graf
From: Richard Henderson Most targets did not name the enum; tci used TCGRegister. Signed-off-by: Richard Henderson Signed-off-by: Alexander Graf --- tcg/arm/tcg-target.h |4 ++-- tcg/hppa/tcg-target.h |4 ++-- tcg/i386/tcg-target.h |4 ++-- tcg/ia64/tcg-target.h |4 ++--

[Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0

2011-11-11 Thread Alexander Graf
Hi Blue, This is my current patch queue for s390. Please pull. It contains a few features, but only because I forgot to send out a pull request for -rc1. These have been lying in my queue for a while. I also have two of Richard's TCG patches in, because without I can't compile and they look perf

[Qemu-devel] [PATCH 05/16] s390x: add ldeb instruction

2011-11-11 Thread Alexander Graf
While running perl, we encountered the ldeb instruction to be used, so we implement it :). Signed-off-by: Alexander Graf --- target-s390x/helpers.h |1 + target-s390x/op_helper.c |9 + target-s390x/translate.c |4 3 files changed, 14 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] [ICON] QEMU Mascot Contest v.2

2011-11-11 Thread David Gilbert
Yes, the Q with the emu head looks nice - I kind of think the middle of the Q starts to look nicely like an egg; but perhaps that's just me. Dave

[Qemu-devel] [PATCH 07/16] s390x: update R and C bits in storage key

2011-11-11 Thread Alexander Graf
When the s390x maps a page or writes happen to a page, the R and C bits get updated. The easiest way to implement this in qemu is to simply update them whenever we map a TLB translation and act according to the permissions. Signed-off-by: Alexander Graf --- target-s390x/cpu.h |4

[Qemu-devel] endless loop when use qemu-system-mipsel to load bios

2011-11-11 Thread rui chen
Hi all, When I try to use command line "qemu-system-mipsel -M malta -L . -nographic" to run redboot, it will have an endless loop, then I find this bug, here is my patch: Author: Chen Rui Date: Sat Nov 12 01:38:23 2011 +0800 resolve an endless loop when use qemu-system-mipsel to load

[Qemu-devel] [PATCH 06/16] s390x: make ipte 31-bit aware

2011-11-11 Thread Alexander Graf
When running 31-bit code we can potentially map the same virtual address twice - once as 0x0yyy and once as 0x8yyy, because the upper bit gets ignored. This also should be reflected in the tlb invalidation path, so we really invalidate also the transparently created tlb entries. Signed-of

[Qemu-devel] [PATCH 11/16] qemu-nbd: open the block device after starting the client thread

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini This is cleaner, because we do not need to close the block device when there is an error opening /dev/nbdX. It was done this way only to print errors before daemonizing. At the same time, use atexit to ensure that the block device is closed whenever we exit. Signed-off-by:

Re: [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region

2011-11-11 Thread Peter Maydell
On 11 November 2011 17:49, Alexander Graf wrote: > When running the s390x virtio machine we can potentially use uninitialized > memory for the virtio device backing ram. That can lead to weird breakge. > > So let's better initialize it to 0 properly. > > Reported-by: Andreas Färber > Signed-off-b

[Qemu-devel] [PATCH 01/16] [S390] Add hotplug support

2011-11-11 Thread Alexander Graf
I just submitted a few patches that enable the s390 virtio bus to receive a hotplug add event. This patch implements the qemu side of it, so that new hotplug events can be submitted to the guest. Signed-off-by: Alexander Graf --- v1 -> v2: - make s390 virtio hoplug code emulate-capable ---

Re: [Qemu-devel] [Xen-devel] [PATCH V3 08/10] Introduce Xen PCI Passthrough, PCI config space helpers (2/3)

2011-11-11 Thread Konrad Rzeszutek Wilk
> > > +case PCI_CAP_ID_EXP: > > > +/* The PCI Express Capability Structure of the VF of Intel 82599 > > > 10GbE > > > + * Controller looks trivial, e.g., the PCI Express Capabilities > > > + * Register is 0. We should not try to expose it to guest. > > > > Why not? > >

[Qemu-devel] [PATCH 03/16] Add generic drive hotplugging

2011-11-11 Thread Alexander Graf
The monitor command for hotplugging is in i386 specific code. This is just plain wrong, as S390 just learned how to do hotplugging too and needs to get drives for that. So let's add a generic copy to generic code that handles drive_add in a way that doesn't have pci dependencies. All pci specific

[Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region

2011-11-11 Thread Alexander Graf
When running the s390x virtio machine we can potentially use uninitialized memory for the virtio device backing ram. That can lead to weird breakge. So let's better initialize it to 0 properly. Reported-by: Andreas Färber Signed-off-by: Alexander Graf --- v1 -> v2: - use target_phys_addr_t

[Qemu-devel] [PATCH 09/16] s390x: implement SIGP restart and shutdown

2011-11-11 Thread Alexander Graf
An s390x OS does reboot and shutdown triggers through hypercalls that we didn't implement on the TCG backend yet. That means that so far we couldn't shut down virtual machines for example, having them hang on shutdown when not using KVM. With this patch, this restriction is gone. We can now shut d

Re: [Qemu-devel] [Xen-devel] [PATCH V3 07/10] Introduce Xen PCI Passthrough, qdevice (1/3)

2011-11-11 Thread Konrad Rzeszutek Wilk
> > > +hw_error("Internal error: Invalid write emulation " > > > + "return value[%d]. I/O emulator exit.\n", rc); > > > > Oh. I hadn't realized this, but you are using hw_error. Which is > > calling 'abort'! Yikes. Is there no way to recover from this? Say re

[Qemu-devel] [PATCH 08/16] s390x: implement rrbe instruction properly

2011-11-11 Thread Alexander Graf
The rrbe instruction resets the reference bit in the given storage key. So far, we merely made it a nop and also returned an invalid CC value, so that the kernel never knew if a page actually got accessed. This patch implements it properly, flushing the R bit and returning the correct CC value. S

[Qemu-devel] [PATCH 13/16] s390x: Add shutdown for TCG s390-virtio machine

2011-11-11 Thread Alexander Graf
Now that we have code in place to do refcounting of online CPUs, we can drag the TCG code along and implement shutdown for that one too, so it doesn't feel left out by its KVM counterpart. Signed-off-by: Alexander Graf --- target-s390x/cpu.h|9 + target-s390x/helper.c | 15

[Qemu-devel] [PATCH 15/16] block: Introduce bdrv_co_flush_to_os

2011-11-11 Thread Kevin Wolf
qcow2 has a writeback metadata cache, so flushing a qcow2 image actually consists of writing back that cache to the protocol and only then flushes the protocol in order to get everything stable on disk. This introduces a separate bdrv_co_flush_to_os to reflect the split. Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH 05/16] nbd: treat EPIPE from NBD_DO_IT as success

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini This can be seen with "qemu-nbd -v -c", which returns 1 instead of 0 when you disconnect with "qemu-nbd -d". Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- nbd.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/nbd.c b/nbd.c index

[Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points.

2011-11-11 Thread Alexander Graf
From: Richard Henderson Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi. Signed-off-by: Richard Henderson Signed-off-by: Alexander Graf --- tcg/arm/tcg-target.c | 13 +++-- tcg/hppa/tcg-target.c | 12 ++-- tcg/i386/tcg-target.c | 13 +++-- tcg/ia6

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-11 Thread Peter Maydell
On 11 November 2011 17:40, Alexander Graf wrote: > Or actually rather this one: > > > Alex > > diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c > index d936809..61b67e8 100644 > --- a/hw/s390-virtio.c > +++ b/hw/s390-virtio.c > @@ -167,6 +167,7 @@ static void s390_init(ram_addr_t my_ram_size, >  

[Qemu-devel] [PATCH 11/16] s390: fix short kernel command lines

2011-11-11 Thread Alexander Graf
From: Christian Borntraeger The default kernel command line for s390 is "root=/dev/ram0 ro" When overriding this line, we have to ensure to also copy the \0 to avoid false lines, for example, -append "root=/dev/vda" will result in "root=/dev/vda0 ro" with the current code. Signed-off-by: Christ

[Qemu-devel] [PATCH 10/16] s390: fix reset hypercall to reset the status

2011-11-11 Thread Alexander Graf
From: Christian Borntraeger This patch fixes the reset hypercall which is supposed to also reset the device status in device memory. This fixes the following bug: [root@localhost driver]# echo virtio0 > unbind [ 35.056966] [ cut here ] [ 35.057054] kernel BUG at drive

Re: [Qemu-devel] [ICON] QEMU Mascot Contest v.2

2011-11-11 Thread Alexander Graf
On 11/11/2011 06:33 PM, Michael Roth wrote: On 11/11/2011 10:18 AM, 陳韋任 wrote: This is awesome! I'm worried how well it will scale down though. If you do the "emu" part on the right side, vertically, between the bottom of its head and top of its foot, you can shrink the Q part a bit to make the

[Qemu-devel] [PATCH 14/16] block: Rename bdrv_co_flush to bdrv_co_flush_to_disk

2011-11-11 Thread Kevin Wolf
There are two different types of flush that you can do: Flushing one level up to the OS (i.e. writing data to the host page cache) or flushing it all the way down to the disk. The existing functions flush to the disk, reflect this in the function name. Signed-off-by: Kevin Wolf --- block.c

[Qemu-devel] [PATCH 04/16] Expose drive_add on all architectures

2011-11-11 Thread Alexander Graf
All architectures can now use drive_add on the monitor. This of course does not mean that there is hotplug support for the specific platform, so in order to actually make use of the new drives you still need to have a hotplug capable device. Signed-off-by: Alexander Graf --- hmp-commands.hx |

[Qemu-devel] [PATCH 02/16] Compile device-hotplug on all targets

2011-11-11 Thread Alexander Graf
All guest targets could potentially implement hotplugging. With the next patches in this set I will also reflect this in the monitor interface. So let's always compile it in. It shouldn't hurt. Signed-off-by: Alexander Graf --- Makefile.target |5 - 1 files changed, 4 insertions(+), 1 d

[Qemu-devel] [PATCH 08/16] qemu-nbd: move client to a thread

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini This avoids that qemu-nbd uses both forking and threads, which do not behave well together. qemu-nbd is already Unix only, and there is no qemu_thread_join, so for now use pthreads. Since the parent and child no longer have separate file descriptors, we can open the NBD devi

[Qemu-devel] [PATCH 09/16] qemu-nbd: print error messages from the daemon through a pipe

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini In order to get nice error messages, keep the qemu-nbd process running until before issuing NBD_DO_IT and connected to the daemon with a pipe. This lets the qemu-nbd process relay error messages from the daemon and exit with a nonzero status if appropriate. Suggested-by: Kevi

[Qemu-devel] [PATCH 02/16] block: add eject request callback

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini Recent versions of udev always keep the tray locked so that the kernel can observe "eject request" events (aka tray button presses) even on discs that aren't mounted. Add support for these events in the ATAPI and SCSI cd drive device models. To let management cope with the b

[Qemu-devel] [PATCH 07/16] qemu-nbd: rename socket variable

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini It will be moved to a global variable by the next patch, and it would conflict with the socket function. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- qemu-nbd.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a

Re: [Qemu-devel] [Xen-devel] [PATCH V3 08/10] Introduce Xen PCI Passthrough, PCI config space helpers (2/3)

2011-11-11 Thread Anthony PERARD
On Thu, 10 Nov 2011, Konrad Rzeszutek Wilk wrote: > On Fri, Oct 28, 2011 at 04:07:34PM +0100, Anthony PERARD wrote: > > From: Allen Kay > > > > Signed-off-by: Allen Kay > > Signed-off-by: Guy Zana > > Signed-off-by: Anthony PERARD > > --- > > Makefile.target |1 + > >

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-11 Thread Alexander Graf
On 11/11/2011 05:44 PM, Peter Maydell wrote: On 11 November 2011 16:24, Alexander Graf wrote: On 11/11/2011 05:11 PM, Peter Maydell wrote: Yes, so that's option (2) and you need to be using a target_phys_addr_t. But ram_size is ram_addr_t and is the ram size that I have available to use, so i

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-11 Thread Alexander Graf
On 11/11/2011 05:44 PM, Peter Maydell wrote: On 11 November 2011 16:24, Alexander Graf wrote: On 11/11/2011 05:11 PM, Peter Maydell wrote: Yes, so that's option (2) and you need to be using a target_phys_addr_t. But ram_size is ram_addr_t and is the ram size that I have available to use, so i

[Qemu-devel] [PATCH 04/16] scsi-disk: implement eject requests

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-disk.c | 24 +--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 1c04872..62f538f 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c

[Qemu-devel] [PATCH 03/16] atapi: implement eject requests

2011-11-11 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/ide/atapi.c | 11 --- hw/ide/core.c | 13 + 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 90b6729..1fed359 100644 --- a/hw/ide/atap

[Qemu-devel] [PATCH 01/16] vvfat: Fix read-write mode

2011-11-11 Thread Kevin Wolf
vvfat used to directly call into the qcow2 block driver instead of using the block.c wrappers. With the coroutine conversion, this stopped working. Signed-off-by: Kevin Wolf Reviewed-by: Paolo Bonzini --- block/vvfat.c | 44 +++- 1 files changed, 23 ins

[Qemu-devel] [PULL 00/16] Block patches for 1.0

2011-11-11 Thread Kevin Wolf
The following changes since commit 0e3b800e71cb7759d099eabbd8ad4c4fe848e381: hw/lan9118.c: Add missing 'break' to fix buffer overrun (2011-11-10 12:29:50 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git block-stable Charles Arnold (1): block: Fix vpc init

[Qemu-devel] [PATCH 02/10] block: add .bdrv_co_is_allocated()

2011-11-11 Thread Stefan Hajnoczi
This patch adds the .bdrv_co_is_allocated() interface which is identical to .bdrv_is_allocated() but runs in coroutine context. Running in coroutine context implies that other coroutines might be performing I/O at the same time. Therefore it must be safe to run while the following BlockDriver fu

Re: [Qemu-devel] [ICON] QEMU Mascot Contest v.2

2011-11-11 Thread Michael Roth
On 11/11/2011 10:18 AM, 陳韋任 wrote: This is awesome! I'm worried how well it will scale down though. If you do the "emu" part on the right side, vertically, between the bottom of its head and top of its foot, you can shrink the Q part a bit to make the emu's body more proportional and leave more s

[Qemu-devel] [PATCH 06/10] vvfat: convert to .bdrv_co_is_allocated()

2011-11-11 Thread Stefan Hajnoczi
It is trivial to switch from the synchronous .bdrv_is_allocated() interface to .bdrv_co_is_allocated() since vvfat_is_allocated() does not block. Signed-off-by: Stefan Hajnoczi --- block/vvfat.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vvfat.c b/block/vvf

[Qemu-devel] [PATCH 09/10] block: drop .bdrv_is_allocated() interface

2011-11-11 Thread Stefan Hajnoczi
Now that all block drivers have been converted to .bdrv_co_is_allocated() we can drop .bdrv_is_allocated(). Note that the public bdrv_is_allocated() interface is still available but is in fact a synchronous wrapper around .bdrv_co_is_allocated(). Signed-off-by: Stefan Hajnoczi --- block.c |

[Qemu-devel] [PATCH 07/10] vdi: convert to .bdrv_co_is_allocated()

2011-11-11 Thread Stefan Hajnoczi
It is trivial to switch from the synchronous .bdrv_is_allocated() interface to .bdrv_co_is_allocated() since vdi_is_allocated() does not block. Signed-off-by: Stefan Hajnoczi --- block/vdi.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/vdi.c b/block/vdi.c i

Re: [Qemu-devel] [ICON] QEMU Mascot Contest v.2

2011-11-11 Thread Michael Roth
On 11/11/2011 10:20 AM, Kevin Wolf wrote: Am 11.11.2011 16:02, schrieb Michael Roth: On 11/11/2011 07:24 AM, 陳韋任 wrote: You might use Inkscape for M$ from http://inkscape.org/download/ and the highest resolution image from Wikipedia (http://upload.wikimedia.org/wikipedia/commons/7/7d/Emu_%28PSF

  1   2   >