[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Wei-Ren Chen
O.K., the first thing you need to know is llvm-gcc uses GCC as it's frontend to parse your source code, and uses LLVM as it's backend to generate binary. In order to support global register correctly, not only the frontend has to be able to recognize the global register syntax, but also the LLVM

[Qemu-devel] PATCH v5 0/7] RTC: New logic to emulate RTC

2012-05-09 Thread Zhang, Yang Z
Changes in v5: Rebase to latest head. Add Checking of divider, because it also can stop the update. Fixing some bugs. Changes in v4: Rebase to latest head. Changing in patch 6: Set the timer to one second earlier before target alarm when AF bit is clear. In version 3, in order to solve

[Qemu-devel] [PATCH v5 5/7] RTC:Add RTC update-ended interrupt support

2012-05-09 Thread Zhang, Yang Z
There are no need to run a periodic timer to emulate updated-end logic. Only run the timer when the UF or AF was clear. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 94 + 1 files changed, 86 insertions(+), 8

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Stevan Vucenovic
there is no configure option to avoid using global registers ? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in QEMU: New Bug description:

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Michael Tokarev
On 08.05.2012 23:35, Jan Kiszka wrote: Hi, I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those functions get/set also the signal mask of the

[Qemu-devel] [PATCH v5 4/7] RTC: Set internal millisecond register to 500ms when reset divider

2012-05-09 Thread Zhang, Yang Z
The first update cycle begins one - half seconds later when divider reset is removing. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 61 + 1 files changed, 51 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH v5 3/7] RTC: Add UIP(update in progress) check logic

2012-05-09 Thread Zhang, Yang Z
The UIP(update in progress) is set when RTC is updating. And the update cycle begins 244us later after UIP is set. And it is cleared when update end. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 18 ++ 1 files changed, 18 insertions(+), 0

[Qemu-devel] [PATCH v5 6/7] RTC:Add alarm support

2012-05-09 Thread Zhang, Yang Z
Add alarm support. Set the timer to one second earlier before target alarm when AF bit is clear. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 273 ++ 1 files changed, 254 insertions(+), 19 deletions(-) diff --git

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Wei-Ren Chen
You can try to configure QEMU to use TCI (interpreter) rather then TCG (jitter). IIRC, TCI doesn't use global register. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work

[Qemu-devel] [PATCH v5 2/7] RTC: Update the RTC clock only when reading it

2012-05-09 Thread Zhang, Yang Z
There has no need to use two periodic timer to update RTC time. In this patch, we only update it when guest reading it. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 207 +- 1 files changed, 66 insertions(+), 141

Re: [Qemu-devel] ahci drive: how to make it non-bootable?

2012-05-09 Thread Gleb Natapov
On Tue, May 08, 2012 at 09:56:10PM +0400, Michael Tokarev wrote: On 08.05.2012 10:43, Gerd Hoffmann wrote: Hi, bootindex=1 for virtio -drive file=winguest.raw,if=virtio,bootindex=1 -- this does not work: Oops. I through it does, but seems this is only the case for the old

[Qemu-devel] [PATCH v5 1/7] RTC: Remove the logic to update time format when DM bit changed

2012-05-09 Thread Zhang, Yang Z
Change DM(date mode) and 24/12 control bit don't affect the internal registers. It only indicates what format is using for those registers. So we don't need to update time format when it is modified. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 10 +- 1

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Stevan Vucenovic
Can you please show me where to find configure options or specific options to accomplish that ? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in

Re: [Qemu-devel] Semantics of -cpu host (was Re: [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-09 Thread Gleb Natapov
On Wed, May 09, 2012 at 12:07:04AM +0200, Alexander Graf wrote: On 08.05.2012, at 22:14, Eduardo Habkost wrote: On Tue, May 08, 2012 at 02:58:11AM +0200, Alexander Graf wrote: On 07.05.2012, at 20:21, Eduardo Habkost wrote: Andre? Are you able to help to answer the question below?

[Qemu-devel] [PATCH v5 7/7] RTC:Allow to migrate from old version

2012-05-09 Thread Zhang, Yang Z
The new logic is compatible with old. So should not block to migrate from old version. But new version cannot migrate to old. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/mc146818rtc.c | 35 +++ 1 files changed, 31 insertions(+), 4 deletions(-) diff

Re: [Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread 陳韋任
On Wed, May 09, 2012 at 08:05:25AM -, Stevan Vucenovic wrote: Can you please show me where to find configure options or specific options to accomplish that ? `../qemu/configure --enable-tcg-interpreter` will use TCI not TCG. You can use `configure --help` to see what options it provides.

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Wei-Ren Chen
`../qemu/configure --enable-tcg-interpreter` will use TCI not TCG. You can use `configure --help` to see what options it provides. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does

Re: [Qemu-devel] Semantics of -cpu host (was Re: [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-09 Thread Alexander Graf
On 09.05.2012, at 10:14, Gleb Natapov g...@redhat.com wrote: On Wed, May 09, 2012 at 12:07:04AM +0200, Alexander Graf wrote: On 08.05.2012, at 22:14, Eduardo Habkost wrote: On Tue, May 08, 2012 at 02:58:11AM +0200, Alexander Graf wrote: On 07.05.2012, at 20:21, Eduardo Habkost wrote:

[Qemu-devel] Fwd: buildbot failure in qemu on openbsd-default

2012-05-09 Thread Gerd Hoffmann
Original Message Subject: buildbot failure in qemu on openbsd-default Date: Tue, 08 May 2012 19:30:00 +0200 From: build...@spunk.home.kraxel.org To: kraxel+allbuild...@gmail.com The Buildbot has detected a failed build on builder openbsd-default while building qemu. Full

Re: [Qemu-devel] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables

2012-05-09 Thread Michael S. Tsirkin
On Wed, May 09, 2012 at 03:24:52PM +0800, Amos Kong wrote: Boot up a Linux VM with 8 pci block devices which are the 8 functions in one pci slot. | # qemu-kvm ... | -drive file=images/u0,if=none,id=drv0,format=qcow2,cache=none \ | -device

Re: [Qemu-devel] Semantics of -cpu host (was Re: [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-09 Thread Gleb Natapov
On Wed, May 09, 2012 at 10:42:26AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:14, Gleb Natapov g...@redhat.com wrote: On Wed, May 09, 2012 at 12:07:04AM +0200, Alexander Graf wrote: On 08.05.2012, at 22:14, Eduardo Habkost wrote: On Tue, May 08, 2012 at 02:58:11AM +0200,

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Stevan Vucenovic
I was thinking there must be something like that ;-) thanks! btw why this site is so nazi about deleting or editing comments ? :-] makes me feel like I am in court in murder trial -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables

2012-05-09 Thread Amos Kong
On 09/05/12 16:46, Michael S. Tsirkin wrote: On Wed, May 09, 2012 at 03:24:52PM +0800, Amos Kong wrote: Boot up a Linux VM with 8 pci block devices which are the 8 functions in one pci slot. | # qemu-kvm ... | -drive file=images/u0,if=none,id=drv0,format=qcow2,cache=none \ | -device

Re: [Qemu-devel] Semantics of -cpu host (was Re: [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-09 Thread Alexander Graf
On 09.05.2012, at 10:51, Gleb Natapov wrote: On Wed, May 09, 2012 at 10:42:26AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:14, Gleb Natapov g...@redhat.com wrote: On Wed, May 09, 2012 at 12:07:04AM +0200, Alexander Graf wrote: On 08.05.2012, at 22:14, Eduardo Habkost wrote:

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Stevan Vucenovic
It works! with --enable-tcg-interpreter! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in QEMU: New Bug description: Frozen on start. CPU:

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Wei-Ren Chen
You can send launchpad a bug report talking about this. ;-) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in QEMU: New Bug description: Frozen

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Wei-Ren Chen
So O.K. to close? :-) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in QEMU: New Bug description: Frozen on start. CPU: dual-core 64-bit

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Stevan Vucenovic
Sure! thanks again! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in QEMU: New Bug description: Frozen on start. CPU: dual-core 64-bit penryn

[Qemu-devel] [Bug 996303] Re: does not work with clang

2012-05-09 Thread Stevan Vucenovic
** Visibility changed to: Public -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/996303 Title: does not work with clang Status in QEMU: New Bug description: Frozen on start. CPU: dual-core

Re: [Qemu-devel] Semantics of -cpu host (was Re: [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-09 Thread Gleb Natapov
On Wed, May 09, 2012 at 11:05:58AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:51, Gleb Natapov wrote: On Wed, May 09, 2012 at 10:42:26AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:14, Gleb Natapov g...@redhat.com wrote: On Wed, May 09, 2012 at 12:07:04AM +0200,

[Qemu-devel] [PATCH 1.1] vnc: fix segfault in vnc_display_pw_expire()

2012-05-09 Thread Gerd Hoffmann
NULL pointer dereference in case no vnc server is configured. Catch this and return -EINVAL like vnc_display_password() does. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/vnc.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index

Re: [Qemu-devel] [PATCH 02/22] sheepdog: avoid a few buffer overruns

2012-05-09 Thread Kevin Wolf
Am 09.05.2012 11:23, schrieb Jim Meyering: From: Jim Meyering meyer...@redhat.com * parse_vdiname: Use pstrcpy, not strncpy, when the destination buffer must be NUL-terminated. * sd_open: Likewise, avoid buffer overrun. * do_sd_create: Likewise. Leave the preceding memset, since pstrcpy

Re: [Qemu-devel] [PATCH 01/22] block: avoid buffer overrun by using pstrcpy, not strncpy

2012-05-09 Thread Kevin Wolf
Am 09.05.2012 11:23, schrieb Jim Meyering: From: Jim Meyering meyer...@redhat.com Also, use PATH_MAX, rather than the arbitrary 1024. Using PATH_MAX is more consistent with other filename-related variables in this file, like backing_filename and tmp_filename. Signed-off-by: Jim Meyering

[Qemu-devel] [PATCH 0/3][v16] LSI Megaraid SAS HBA emulation

2012-05-09 Thread Hannes Reinecke
This is an updated patchset for megasas. Upon popular demand I've split it into three parts, the header file, the emulation itself, and a patch adding trace events to the emulation. Changes since v15: - Move to new SCSI API - Use generic trace functions for DCMDs - Replace bitfields with defines

[Qemu-devel] [PATCH 1/3] megasas: Add header file

2012-05-09 Thread Hannes Reinecke
This patch adds the header file for megasas. Signed-off-by: Hannes Reinecke h...@suse.de --- hw/mfi.h | 1248 ++ 1 files changed, 1248 insertions(+), 0 deletions(-) create mode 100644 hw/mfi.h diff --git a/hw/mfi.h b/hw/mfi.h new file

Re: [Qemu-devel] [PATCH 19/22] qcow2: mark this file's sole strncpy use as justified

2012-05-09 Thread Kevin Wolf
Am 09.05.2012 11:24, schrieb Jim Meyering: From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com Acked-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-devel] [PATCH] usb-host: handle guest-issued clear halt

2012-05-09 Thread Erik Rull
Looks VERY good, ACK! The DVD drive works now! On May 8, 2012 at 2:06 PM Gerd Hoffmann kra...@redhat.com wrote: Most important here is to update our internal endpoint state so we know the endpoint isn't in halted state any more. Without this usb-host tries to clear halt again with the next

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 21:35, schrieb Jan Kiszka: Hi, I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those functions get/set also the signal mask of the

Re: [Qemu-devel] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables

2012-05-09 Thread Amos Kong
On 09/05/12 16:59, Amos Kong wrote: On 09/05/12 16:46, Michael S. Tsirkin wrote: On Wed, May 09, 2012 at 03:24:52PM +0800, Amos Kong wrote: Boot up a Linux VM with 8 pci block devices which are the 8 functions in one pci slot. | # qemu-kvm ... | -drive

Re: [Qemu-devel] [PATCH 03/22] vmdk: relative_path: avoid buffer overrun

2012-05-09 Thread Kevin Wolf
Am 09.05.2012 11:23, schrieb Jim Meyering: From: Jim Meyering meyer...@redhat.com strncpy does not guarantee NUL-termination. Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1) is a no-op. Use pstrcpy to ensure NUL-termination, not strncpy. It's not, it would only be a no-op

Re: [Qemu-devel] [PATCH v2 for-1.1 4/4] tcg/ppc: Fix CONFIG_TCG_PASS_AREG0 mode

2012-05-09 Thread Alexander Graf
On 05/09/2012 02:28 AM, Andreas Färber wrote: Adjust the tcg_out_qemu_{ld,st}() slow paths to pass AREG0 in r3, based on patches by malc. Also adjust the registers clobbered, based on patch by Alex. Signed-off-by: Andreas Färberafaer...@suse.de --- tcg/ppc/tcg-target.c | 37

[Qemu-devel] [PATCH 3/3] megasas: Add trace events

2012-05-09 Thread Hannes Reinecke
This patch add trace events to the megasas HBA emulation. Signed-off-by: Hannes Reinecke h...@suse.de --- hw/megasas.c | 297 -- trace-events | 79 2 files changed, 328 insertions(+), 48 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2 for-1.1 4/4] tcg/ppc: Fix CONFIG_TCG_PASS_AREG0 mode

2012-05-09 Thread Alexander Graf
On 05/09/2012 02:43 AM, malc wrote: On Wed, 9 May 2012, Andreas F?rber wrote: Adjust the tcg_out_qemu_{ld,st}() slow paths to pass AREG0 in r3, based on patches by malc. Also adjust the registers clobbered, based on patch by Alex. Alexander, my head is splitting now, so i can not calculate

Re: [Qemu-devel] Semantics of -cpu host (was Re: [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-09 Thread Alexander Graf
On 05/09/2012 11:38 AM, Gleb Natapov wrote: On Wed, May 09, 2012 at 11:05:58AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:51, Gleb Natapov wrote: On Wed, May 09, 2012 at 10:42:26AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:14, Gleb Natapovg...@redhat.com wrote: On Wed, May

Re: [Qemu-devel] [PATCH v2 for-1.1 0/4] tcg/ppc: AREG0 support and Darwin fixes

2012-05-09 Thread Alexander Graf
On 05/09/2012 02:33 AM, malc wrote: On Wed, 9 May 2012, Andreas F?rber wrote: Hello malc, Here's an updated series to fix AREG0 and ppc build. Debian/sparc fsck on Darwin/ppc now succeeds. No regressions noticed with Debian/sparc, HelenOS/sparc64, Haiku/i386, Haiku/x86_64. Regards, Andreas

Re: [Qemu-devel] [PATCH] Fix size checking in load_image_targphys to accept max_size INT_MAX

2012-05-09 Thread Christian Borntraeger
On 03/05/12 16:33, Peter Maydell wrote: Since load_image_targphys is declared as taking an int for max_sz, this will fail for ram sizes INT_MAX. Lets change the max_sz parameter to a uint64_t. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com A patch equivalent to this has

Re: [Qemu-devel] [PATCH v2 for-1.1 4/4] tcg/ppc: Fix CONFIG_TCG_PASS_AREG0 mode

2012-05-09 Thread Andreas Färber
Am 09.05.2012 12:27, schrieb Alexander Graf: On 05/09/2012 02:28 AM, Andreas Färber wrote: Adjust the tcg_out_qemu_{ld,st}() slow paths to pass AREG0 in r3, based on patches by malc. Also adjust the registers clobbered, based on patch by Alex. Signed-off-by: Andreas Färberafaer...@suse.de

Re: [Qemu-devel] [PATCH 3/4] ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages

2012-05-09 Thread Fabien Chouteau
On 05/07/2012 06:28 PM, Alexander Graf wrote: Hi Fabien, Could you please elaborate a bit on the case that broke for you with these? The patches shouldn't change any guest facing behavior :o. My bad, The problem comes from my initialization of tlb entries at board reset. I use

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Jan Kiszka
On 2012-05-09 07:11, Kevin Wolf wrote: Am 08.05.2012 21:35, schrieb Jan Kiszka: Hi, I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those functions

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Jan Kiszka
On 2012-05-09 04:32, Michael Tokarev wrote: On 08.05.2012 23:35, Jan Kiszka wrote: Hi, I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Peter Maydell
On 9 May 2012 11:11, Kevin Wolf kw...@redhat.com wrote: Am 08.05.2012 21:35, schrieb Jan Kiszka: I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those

[Qemu-devel] [post 1.1 PATCH] hw/qxl: disallow non sync io for revision = 3

2012-05-09 Thread Alon Levy
The guest drivers should already know how to use async for revision 3. But since it's still possible to have an older driver with revision 3 that doesn't check for the revision, require a new parameter force_async, which we can later turn to 1 by default. Signed-off-by: Alon Levy al...@redhat.com

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Jan Kiszka
On 2012-05-09 08:15, Peter Maydell wrote: On 9 May 2012 11:11, Kevin Wolf kw...@redhat.com wrote: Am 08.05.2012 21:35, schrieb Jan Kiszka: I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls

Re: [Qemu-devel] [PATCH 14/22] vscsi: avoid unwarranted strncpy

2012-05-09 Thread David Gibson
On Wed, May 09, 2012 at 11:23:58AM +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com Don't use strncpy when the source string is known to fit in the destination buffer. Use equivalent memcpy. We could even use strcpy, here, but some static analyzers warn about that, so

Re: [Qemu-devel] [PATCH 03/22] vmdk: relative_path: avoid buffer overrun

2012-05-09 Thread Kevin Wolf
Am 09.05.2012 14:09, schrieb Jim Meyering: Kevin Wolf wrote: Am 09.05.2012 11:23, schrieb Jim Meyering: From: Jim Meyering meyer...@redhat.com strncpy does not guarantee NUL-termination. Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1) is a no-op. Use pstrcpy to ensure

Re: [Qemu-devel] [PATCH 1.1 01/22] block: fix snapshot on QED

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 16:51, schrieb Paolo Bonzini: QED's opaque data includes a pointer back to the BlockDriverState. This breaks when bdrv_append shuffles data between bs_new and bs_top. To avoid this, add a rebind function that tells the driver about the new relationship between the

Re: [Qemu-devel] [PATCH 1.1 04/22] block: fully delete bs-file when closing

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 16:51, schrieb Paolo Bonzini: We are reusing bs-file across close/open, which may not cause any known bugs but is a recipe for trouble. Prefer bdrv_delete, and enjoy the new invariant in the implementation of bdrv_delete. Signed-off-by: Paolo Bonzini pbonz...@redhat.com I

[Qemu-devel] [PATCH 1.1] rebase xen patches

2012-05-09 Thread Stefano Stabellini
Hi all, this patch series is a collection of the outstanding Xen patches for QEMU 1.1: all of them have been sent to qemu-devel at least once already, some of them as many as 6 times. Patch 1 and 2 remove unneeded devices and timers when Xen is enabled, patch 3 and 4 are improvements for

Re: [Qemu-devel] [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER

2012-05-09 Thread Stefano Stabellini
On Thu, 26 Apr 2012, Konrad Rzeszutek Wilk wrote: On Wed, Apr 25, 2012 at 01:23:35PM +0200, Christoph Hellwig wrote: On Wed, Apr 25, 2012 at 12:21:53PM +0100, Stefano Stabellini wrote: That is true, in fact I couldn't figure out what I had to implement just reading the comment. So I went

[Qemu-devel] [PATCH 1.1 3/4] xen_disk: remove syncwrite option

2012-05-09 Thread Stefano Stabellini
This patch removes a dead option. The same can be achieved removing BDRV_O_NOCACHE and BDRV_O_CACHE_WB from the flags passed to bdrv_open. Signed-off-by: Stefano Stabellini stefano.stabell...@eu.citrix.com --- hw/xen_disk.c |8 +--- 1 files changed, 1 insertions(+), 7 deletions(-) diff

Re: [Qemu-devel] [PATCH 1.1 11/22] qemu-io: correctly print non-integer values as decimals

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 16:51, schrieb Paolo Bonzini: qemu-io's cvtstr function sometimes will incorrectly omit the decimal part of the number, and sometimes will incorrectly include it. This patch fixes both. The former is more serious, and can be seen in the patches to 027.out and 033.out. The

Re: [Qemu-devel] [PATCH 1.1 11/22] qemu-io: correctly print non-integer values as decimals

2012-05-09 Thread Paolo Bonzini
Il 09/05/2012 14:46, Kevin Wolf ha scritto: The changes to all other files were scripted with sed, so there were no surprises beyond 027.out and 033.out. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- 035.out has an extra long line which stumps git send-email,

Re: [Qemu-devel] [post 1.1 PATCH] hw/qxl: disallow non sync io for revision = 3

2012-05-09 Thread Gerd Hoffmann
On 05/09/12 13:26, Alon Levy wrote: The guest drivers should already know how to use async for revision 3. But since it's still possible to have an older driver with revision 3 that doesn't check for the revision, require a new parameter force_async, which we can later turn to 1 by default.

[Qemu-devel] [PATCH 1.1 4/4] xen_disk: use bdrv_aio_flush instead of bdrv_flush

2012-05-09 Thread Stefano Stabellini
Use bdrv_aio_flush instead of bdrv_flush. Make sure to call bdrv_aio_writev/readv after the presync bdrv_aio_flush is fully completed and make sure to call the postsync bdrv_aio_flush after bdrv_aio_writev/readv is fully completed. Signed-off-by: Stefano Stabellini

Re: [Qemu-devel] [PATCH 1.1 04/22] block: fully delete bs-file when closing

2012-05-09 Thread Paolo Bonzini
Il 09/05/2012 14:22, Kevin Wolf ha scritto: Am 08.05.2012 16:51, schrieb Paolo Bonzini: We are reusing bs-file across close/open, which may not cause any known bugs but is a recipe for trouble. Prefer bdrv_delete, and enjoy the new invariant in the implementation of bdrv_delete.

[Qemu-devel] [PATCH 04/22] hw/9pfs: avoid buffer overrun

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com v9fs_add_dir_node and qemu_v9fs_synth_add_file used strncpy to form node-name, which requires NUL-termination, but strncpy does not ensure NUL-termination. Use pstrcpy, which does. Signed-off-by: Jim Meyering meyer...@redhat.com ---

Re: [Qemu-devel] [PATCH 2/3] megasas: LSI Megaraid SAS HBA emulation

2012-05-09 Thread Alexander Graf
On 05/09/2012 11:52 AM, Hannes Reinecke wrote: This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. I've tested it to work with Linux, Windows Vista, and Windows7. agraf@wolfberry-1:/home/agraf/git/qemu.megasas git pw am 157890 ERROR: return is not a function, parentheses are not

Re: [Qemu-devel] [PATCH 3/3] megasas: Add trace events

2012-05-09 Thread Alexander Graf
On 05/09/2012 11:52 AM, Hannes Reinecke wrote: This patch add trace events to the megasas HBA emulation. agraf@wolfberry-1:/home/agraf/git/qemu.megasas git pw am 157891 WARNING: line over 80 characters #233: FILE: hw/megasas.c:872: +offset +

[Qemu-devel] [PATCH 1.1 v2 14/22] stream: add testcase for partial streaming

2012-05-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- v1-v2: Delete mid_img in the tearDown() method. tests/qemu-iotests/030 | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index

[Qemu-devel] [Bug 996798] Re: Incorrect order of task switching

2012-05-09 Thread Yury Popov
Some bug in VirtualBox: https://www.virtualbox.org/ticket/10532 ** Bug watch added: Virtualbox Trac #10532 http://www.virtualbox.org/ticket/10532 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] PATCH v5 0/7] RTC: New logic to emulate RTC

2012-05-09 Thread Paolo Bonzini
Il 09/05/2012 09:22, Zhang, Yang Z ha scritto: Changes in v5: Rebase to latest head. Add Checking of divider, because it also can stop the update. Fixing some bugs. At last this passes my tests, great! There's still a few problems, but more or less it's ok: 1) it needs rebase on top of the

Re: [Qemu-devel] [PATCH 11/22] virtio-9p: avoid unwarranted uses of strncpy

2012-05-09 Thread Aneesh Kumar K.V
Jim Meyering j...@meyering.net writes: From: Jim Meyering meyer...@redhat.com In both mp_pacl_listxattr and mp_dacl_listxattr, the uses of strncpy were unnecessary, since at each point of use we know that the NUL-terminated source bytes fit in the destination buffer. Use memcpy in place of

Re: [Qemu-devel] [PATCH 04/22] hw/9pfs: avoid buffer overrun

2012-05-09 Thread Aneesh Kumar K.V
Jim Meyering j...@meyering.net writes: From: Jim Meyering meyer...@redhat.com v9fs_add_dir_node and qemu_v9fs_synth_add_file used strncpy to form node-name, which requires NUL-termination, but strncpy does not ensure NUL-termination. Use pstrcpy, which does. Signed-off-by: Jim Meyering

Re: [Qemu-devel] [PATCH 13/22] virtio-9p: avoid unwarranted use of strncpy

2012-05-09 Thread Aneesh Kumar K.V
Jim Meyering j...@meyering.net writes: From: Jim Meyering meyer...@redhat.com The use of strncpy in pt_listxattr is unnecessary, since we know that the NUL-terminated source bytes fit in the destination buffer. Use memcpy in place of strncpy. Signed-off-by: Jim Meyering

Re: [Qemu-devel] [PATCH 12/22] virtio-9p: avoid unwarranted use of strncpy

2012-05-09 Thread Aneesh Kumar K.V
Jim Meyering j...@meyering.net writes: From: Jim Meyering meyer...@redhat.com The use of strncpy in mp_user_listxattr is unnecessary, since we know that the NUL-terminated source bytes fit in the destination buffer. Use memcpy in place of strncpy. Signed-off-by: Jim Meyering

[Qemu-devel] [PATCH 07/22] ppc: avoid buffer overrun: use pstrcpy, not strncpy

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com A terminal NUL is required by caller's use of strchr. It's better not to use strncpy at all, since there is no need to zero out hundreds of trailing bytes for each iteration. Signed-off-by: Jim Meyering meyer...@redhat.com --- target-ppc/kvm.c | 2 +- 1

Re: [Qemu-devel] [post 1.1 PATCH] hw/qxl: disallow non sync io for revision = 3

2012-05-09 Thread Alon Levy
On Wed, May 09, 2012 at 02:51:01PM +0200, Gerd Hoffmann wrote: On 05/09/12 13:26, Alon Levy wrote: The guest drivers should already know how to use async for revision 3. But since it's still possible to have an older driver with revision 3 that doesn't check for the revision, require a new

[Qemu-devel] [PATCH] booke_206_tlbwe: Discard invalid bits in MAS2

2012-05-09 Thread Fabien Chouteau
The size of EPN field in MAS2 depends on page size. This patch adds a mask to discard invalid bits in EPN field. Definition of EPN field from e500v2 RM: EPN Effective page number: Depending on page size, only the bits associated with a page boundary are valid. Bits that represent offsets within a

Re: [Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup

2012-05-09 Thread Peter Maydell
On 9 May 2012 10:23, Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com Remove unnecessary and unchecked uses of strdup, and add a comment that this strncpy use is ok. Signed-off-by: Jim Meyering meyer...@redhat.com ---  linux-user/elfload.c | 10 ++  1

[Qemu-devel] [PATCH 18/22] acpi: remove strzcpy (strncpy-identical) function; just use strncpy

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Adjust all uses s/strzcpy/strncpy/ and mark these uses of strncpy as ok. Signed-off-by: Jim Meyering meyer...@redhat.com --- hw/acpi.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index

Re: [Qemu-devel] [PATCH 16/22] qemu-ga: prefer pstrcpy: consistently NUL-terminate ifreq.ifr_name

2012-05-09 Thread Luiz Capitulino
On Wed, 9 May 2012 11:24:00 +0200 Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com NUL-termination of the .ifr_name field is not required, but is fine (and preferable to using strncpy and leaving the reader to wonder), since the first thing the linux kernel does

[Qemu-devel] [PATCH 09/22] ui/vnc: simplify and avoid strncpy

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Don't bother with strncpy. There's no need for its zero-fill. Use g_strndup in place of g_malloc+strncpy+NUL-terminate. Signed-off-by: Jim Meyering meyer...@redhat.com --- ui/vnc-auth-sasl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

Re: [Qemu-devel] [PATCH 1.1 19/22] block: implement is_allocated for raw

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 16:51, schrieb Paolo Bonzini: Either FIEMAP, or SEEK_DATA+SEEK_HOLE can be used to implement the is_allocated callback for raw files. Ext4, btrfs and XFS all support it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com This is for 1.2, I'll queue it in block-next. ---

Re: [Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup

2012-05-09 Thread Jim Meyering
Peter Maydell wrote: On 9 May 2012 10:23, Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com Remove unnecessary and unchecked uses of strdup, and add a comment that this strncpy use is ok. Signed-off-by: Jim Meyering meyer...@redhat.com ---  linux-user/elfload.c

Re: [Qemu-devel] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables

2012-05-09 Thread Alex Williamson
On Wed, 2012-05-09 at 15:24 +0800, Amos Kong wrote: Boot up a Linux VM with 8 pci block devices which are the 8 functions in one pci slot. | # qemu-kvm ... | -drive file=images/u0,if=none,id=drv0,format=qcow2,cache=none \ | -device virtio-blk-pci,drive=drv0,id=v0,multifunction=on,addr=0x03.0

Re: [Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup

2012-05-09 Thread Peter Maydell
On 9 May 2012 14:42, Jim Meyering j...@meyering.net wrote: From 5dce6a052cdc2a45ada3e3e96a8c3ef4e90f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 7 May 2012 18:34:26 +0200 Subject: [PATCH] linux-user: remove two unchecked uses of strdup Remove two uses of

[Qemu-devel] [PATCH 06/22] os-posix: avoid buffer overrun

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com os_set_proc_name: Use pstrcpy, in place of strncpy and the ineffectual preceding assignment: name[sizeof(name) - 1] = 0; Signed-off-by: Jim Meyering meyer...@redhat.com --- os-posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 1.1 22/22] stream: move rate limiting to a separate header file

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 16:52, schrieb Paolo Bonzini: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/stream.c | 31 ++-- include/qemu/ratelimit.h | 50 ++ 2 files changed, 52 insertions(+), 29 deletions(-)

[Qemu-devel] [PATCH 03/22] vmdk: relative_path: avoid buffer overrun

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com strncpy does not guarantee NUL-termination. Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1) is a no-op. Use pstrcpy to ensure NUL-termination, not strncpy. Signed-off-by: Jim Meyering meyer...@redhat.com --- block/vmdk.c | 3 +-- 1 file

[Qemu-devel] [PATCH 01/22] block: avoid buffer overrun by using pstrcpy, not strncpy

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Also, use PATH_MAX, rather than the arbitrary 1024. Using PATH_MAX is more consistent with other filename-related variables in this file, like backing_filename and tmp_filename. Signed-off-by: Jim Meyering meyer...@redhat.com --- block.c | 5 +++-- 1 file

[Qemu-devel] [PATCH 17/22] libcacard/vcard_emul_nss: use pstrcpy in place of strncpy

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Replace strncpy+NUL-terminate use with use of pstrcpy. This requires linking with cutils.o (or else vssclient doesn't link), so add that in the Makefile. Signed-off-by: Jim Meyering meyer...@redhat.com --- libcacard/Makefile | 2 +-

Re: [Qemu-devel] [PATCH 1.1 14/22] stream: add testcase for partial streaming

2012-05-09 Thread Kevin Wolf
Am 08.05.2012 16:51, schrieb Paolo Bonzini: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- tests/qemu-iotests/030 | 27 ++- tests/qemu-iotests/030.out |4 ++-- 2 file changed, 28 insertions(+), 3 deletion(-) diff --git a/tests/qemu-iotests/030.out

Re: [Qemu-devel] [PATCH 18/22] acpi: remove strzcpy (strncpy-identical) function; just use strncpy

2012-05-09 Thread Peter Maydell
On 9 May 2012 10:24, Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com Adjust all uses s/strzcpy/strncpy/ and mark these uses of strncpy as ok. Note that this will conflict with Paolo's patch http://patchwork.ozlabs.org/patch/151895/ convert -acpitable to QemuOpts

Re: [Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup

2012-05-09 Thread Jim Meyering
Peter Maydell wrote: On 9 May 2012 14:42, Jim Meyering j...@meyering.net wrote: From 5dce6a052cdc2a45ada3e3e96a8c3ef4e90f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 7 May 2012 18:34:26 +0200 Subject: [PATCH] linux-user: remove two unchecked uses of strdup

Re: [Qemu-devel] [PATCH 03/22] vmdk: relative_path: avoid buffer overrun

2012-05-09 Thread Jim Meyering
Kevin Wolf wrote: Am 09.05.2012 11:23, schrieb Jim Meyering: From: Jim Meyering meyer...@redhat.com strncpy does not guarantee NUL-termination. Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1) is a no-op. Use pstrcpy to ensure NUL-termination, not strncpy. It's not, it

[Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup

2012-05-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Remove unnecessary and unchecked uses of strdup, and add a comment that this strncpy use is ok. Signed-off-by: Jim Meyering meyer...@redhat.com --- linux-user/elfload.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 1.1 19/22] block: implement is_allocated for raw

2012-05-09 Thread Paolo Bonzini
Il 09/05/2012 15:40, Kevin Wolf ha scritto: +#ifndef SEEK_DATA +#define SEEK_DATA 3 +#endif +#ifndef SEEK_HOLE +#define SEEK_HOLE 4 +#endif How is that going to be portable? You assume that on non-Linux you'll get -EINVAL, but what does guarantee that 3 or 4 aren't already used for

Re: [Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup

2012-05-09 Thread Peter Maydell
On 9 May 2012 15:01, Jim Meyering j...@meyering.net wrote: From 402100deb7e27b1d7ac619ebac963f861fae91b0 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 7 May 2012 18:34:26 +0200 Subject: [PATCH] linux-user: remove two unchecked uses of strdup Remove two uses of

[Qemu-devel] [PATCH 1.1 v2 22/22] stream: move rate limiting to a separate header file

2012-05-09 Thread Paolo Bonzini
Make the code reusable. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- v1-v2: Remove SLICE_TIME from ratelimit.h block/stream.c | 31 ++ include/qemu/ratelimit.h | 48 ++ 2 files changed, 50

Re: [Qemu-devel] [PATCH 1.1 19/22] block: implement is_allocated for raw

2012-05-09 Thread Kevin Wolf
Am 09.05.2012 16:05, schrieb Paolo Bonzini: Il 09/05/2012 15:40, Kevin Wolf ha scritto: +#ifndef SEEK_DATA +#define SEEK_DATA 3 +#endif +#ifndef SEEK_HOLE +#define SEEK_HOLE 4 +#endif How is that going to be portable? You assume that on non-Linux you'll get -EINVAL, but what does

  1   2   3   4   >