Re: [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type

2013-06-14 Thread Hu Tao
On Thu, Jun 13, 2013 at 06:51:49PM +0800, Hu Tao wrote: > Since it's called in object_initialize_with_type later. > > Signed-off-by: Hu Tao > --- > qom/object.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/qom/object.c b/qom/object.c > index 803b94b..38dc45e 100644 > --- a/qom/obj

[Qemu-devel] hw/ssi/xilinx_spips.c:52:1: warning: "CS" redefined

2013-06-14 Thread Michael Tokarev
This warning is produced when compiling qemu on solaris (openindiana). /usr/include/sys/regset.h:98:1: warning: this is the location of the previous definition (I don't know how regset.h is included) The code reads: ... #define MANUAL_CS (1 << 14) #define CS (0x

[Qemu-devel] [PATCH v2] piix: fix some printf errors when debug is enabled

2013-06-14 Thread Hu Tao
And use PRIxxx macros if possible. Signed-off-by: Hu Tao --- cputlb.c| 4 ++-- hw/acpi/piix4.c | 12 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cputlb.c b/cputlb.c index 8c8..1230e9e 100644 --- a/cputlb.c +++ b/cputlb.c @@ -262,8 +262,8 @@ void tlb_s

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] piix: fix some printf errors when debug is enabled

2013-06-14 Thread Michael Tokarev
14.06.2013 11:11, Hu Tao wrote: > And use PRIxxx macros if possible. > > Signed-off-by: Hu Tao > --- > cputlb.c| 4 ++-- > hw/acpi/piix4.c | 12 ++-- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/cputlb.c b/cputlb.c > index 8c8..1230e9e 100644 > --- a/

[Qemu-devel] [PATCH 1/6] mips_malta: fix BIOS endianness swapping

2013-06-14 Thread Leon Alrae
From: Paul Burton If the target is little endian (mipsel) then the BIOS image endianness is swapped so that the big endian BIOS binaries commonly produced can be loaded correctly. When using the -bios argument the BIOS is loaded using load_image_targphys, however this doesn't perform the load to

[Qemu-devel] [PATCH 0/6] mips_malta: fixes to support YAMON firmware

2013-06-14 Thread Leon Alrae
From: Paul Burton This patchset fixes some bugs with MIPS malta emulation allowing the YAMON firmware to run. YAMON can be found at http://www.mips.com/products/system-software/yamon/ You can then boot to a YAMON prompt by passing the path to yamon-XX.bin to the -bios argument or by writing yam

[Qemu-devel] [PATCH 6/6] pflash_cfi01: duplicate status byte from bits 23:16 for 32bit reads

2013-06-14 Thread Leon Alrae
From: Paul Burton The firmware commonly used with MIPS Malta boards (YAMON) reads the status of the pflash with a 32bit memory access. On real hardware this results in the status byte being mirrored in the upper 16 bits of the read value. For example if the status byte is represented by SS then t

[Qemu-devel] [PATCH 3/6] mips_malta: generate SPD EEPROM data at runtime

2013-06-14 Thread Leon Alrae
From: Paul Burton The SPD EEPROM specifies the amount of memory present in the system and thus its correct contents can only be known at runtime. Calculating parts of the data on init allows the data to accurately reflect the amount of target memory present and allow YAMON to boot with an arbitra

[Qemu-devel] [PATCH 2/6] mips_malta: correct reading MIPS revision at 0x1fc00010

2013-06-14 Thread Leon Alrae
From: Paul Burton Rather than modifying the BIOS code at its original location, copy it for the 0x1fc0 region & modify the copy. This means the original ROM code is correctly readable at 0x1e10 whilst the MIPS revision is readable at 0x1fc00010. Additionally the code previously operated

[Qemu-devel] [PATCH 4/6] mips_malta: cap BIOS endian swap length at 0x3e0000 bytes

2013-06-14 Thread Leon Alrae
From: Paul Burton This preserves the final sector of the pflash which is used by YAMON to hold environment variables. If the endianness of the environment data is swapped then YAMON will fail to load environment variables from pflash. Signed-off-by: Paul Burton Signed-off-by: Leon Alrae --- h

[Qemu-devel] [PATCH 5/6] mips_malta: generate SMBUS EEPROM data

2013-06-14 Thread Leon Alrae
From: Paul Burton The malta contains 2 EEPROMs, one containing SPD data for the SDRAM and another containing board information such as serial number and MAC address. These are both exposed via the PIIX4 SMBUS. Generating this data and providing it to smbus_eeprom_init will allow YAMON to read a s

[Qemu-devel] [PATCH v6] net: add support of mac-programming over macvtap in QEMU side

2013-06-14 Thread Amos Kong
Currently macvtap based macvlan device is working in promiscuous mode, we want to implement mac-programming over macvtap through Libvirt for better performance. Design: QEMU notifies Libvirt when rx-filter config is changed in guest, then Libvirt query the rx-filter information by a monitor comm

Re: [Qemu-devel] [PATCH RFC 6/8] exec: Clean up unnecessary S390 ifdeffery

2013-06-14 Thread Markus Armbruster
Paolo Bonzini writes: > Il 13/06/2013 03:02, Markus Armbruster ha scritto: >> +} else if (kvm_enabled() && kvm_arch_ram_alloc) { >> +/* some s390/kvm configurations have special constraints */ >> +if (mem_path) { >> +fprintf(stderr, >> +"-mem-pa

Re: [Qemu-devel] [PATCH 5/5] block: Always enable discard on the protocol level

2013-06-14 Thread Kevin Wolf
Am 14.06.2013 um 00:06 hat Paolo Bonzini geschrieben: > Il 13/06/2013 07:47, Kevin Wolf ha scritto: > > Turning on discard options in qcow2 doesn't help a lot when the discard > > requests that it issues are thrown away by the raw-posix layer. This > > patch always enables discard functionality on

Re: [Qemu-devel] [PATCH 3/5] qcow2: Options to enable discard for freed clusters

2013-06-14 Thread Kevin Wolf
Am 14.06.2013 um 00:10 hat Paolo Bonzini geschrieben: > Il 13/06/2013 07:47, Kevin Wolf ha scritto: > > +s->discard_passthrough[QCOW2_DISCARD_NEVER] = false, > > +s->discard_passthrough[QCOW2_DISCARD_ALWAYS] = true, > > +s->discard_passthrough[QCOW2_DISCARD_REQUEST] = > > +qemu_

Re: [Qemu-devel] [PATCH] Remove hardcoded xen-platform device initialization

2013-06-14 Thread Paul Durrant
> -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: 13 June 2013 18:33 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xen.org > Subject: Re: [Qemu-devel] [PATCH] Remove hardcoded xen-platform device > initialization > > On Thu,

Re: [Qemu-devel] [Xen-devel] [PATCH] Remove hardcoded xen-platform device initialization

2013-06-14 Thread Paul Durrant
> -Original Message- > From: Ian Campbell > Sent: 13 June 2013 18:44 > To: Stefano Stabellini > Cc: Paul Durrant; qemu-devel@nongnu.org; xen-de...@lists.xen.org > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Remove hardcoded xen- > platform device initialization > > On Thu, 2013-06-13 at

Re: [Qemu-devel] [Xen-devel] [PATCH] Remove hardcoded xen-platform device initialization

2013-06-14 Thread Paul Durrant
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: 13 June 2013 19:03 > To: Ian Campbell > Cc: Stefano Stabellini; Paul Durrant; qemu-devel@nongnu.org; xen- > de...@lists.xen.org > Subject: Re: [Xen-devel] [PATCH] Remove hardcode

Re: [Qemu-devel] [PATCH 1/2] piix: use type-safe cast instead of directly access of parent dev

2013-06-14 Thread Andreas Färber
Hi, Am 14.06.2013 08:49, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/pci-host/piix.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > index f9e68c3..ba9a8f0 100644 > --- a/hw/pci-host/piix.c > +++ b/hw/pci-host

[Qemu-devel] [Bug 1182716] Re: guest cannot boot up when Intel 82572 NIC assigned

2013-06-14 Thread Yongjie Ren
Re-tested this bug with: kvm.git(next tree):e47a5f5fb715b90b40747e9e235de557c6abd56c qemu-kvm.git(uq/master tree): 199472259a41677417fb7de168bd8c589383c6de This bug has been fixed. ** Changed in: qemu Status: New => Fix Committed ** Changed in: qemu Status: Fix Committed => Fix Rel

Re: [Qemu-devel] [RFC] sanitize memory on system reset

2013-06-14 Thread Alexander Graf
Am 14.06.2013 um 08:56 schrieb Christian Borntraeger : > On 13/06/13 13:56, Anthony Liguori wrote: >> Markus Armbruster writes: >> >>> Peter Lieven writes: >>> On 13.06.2013 10:40, Stefan Hajnoczi wrote: > On Thu, Jun 13, 2013 at 08:09:09AM +0200, Peter Lieven wrote: >> I was th

[Qemu-devel] [RFC 03/13] block: add BlockDevOps->drain_threads_cb()

2013-06-14 Thread Stefan Hajnoczi
There are times when the QEMU main loop wishes to drain I/O requests. Up until now bdrv_drain_all() meant that no new guest I/O will be processed until the next event loop iteration. This is no longer true with dataplane since it runs outside the QEMU global mutex. The BlockDevOps->drain_threads_

[Qemu-devel] [RFC 00/13] dataplane: use block layer

2013-06-14 Thread Stefan Hajnoczi
This series adds image format, QMP 'transation', and QMP 'block_resize' support to dataplane. This is done by replacing custom Linux AIO code with QEMU block layer APIs. In order for block layer APIs to be safe, bdrv_drain_all() is modified to be aware of device emulation threads (like dataplane)

[Qemu-devel] [RFC 01/13] block: fix bdrv_flush() ordering in bdrv_close()

2013-06-14 Thread Stefan Hajnoczi
Since 80ccf93b we flush the block device during close. The bdrv_drain_all() call should come before bdrv_flush() to ensure guest write requests have completed. Otherwise we may miss pending writes when flushing. However, there is still a slight change that cancelling a blockjob or doing bdrv_flu

[Qemu-devel] [RFC 07/13] block: add thread_aio_context TLS variable

2013-06-14 Thread Stefan Hajnoczi
BH and fd handler APIs need to know which AioContext (event loop) to run inside. Passing it around everywhere is not feasible since it would require adding arguments to any call-chain that invokes BH and fd handler APIs (hint: there are many and they change). Instead make the AioContext pointer t

[Qemu-devel] [RFC 02/13] dataplane: sync virtio.c and vring.c virtqueue state

2013-06-14 Thread Stefan Hajnoczi
Load the virtio.c state into vring.c when we start dataplane mode and vice versa when stopping dataplane mode. This patch makes it possible to start and stop dataplane any time while the guest is running. This is very useful since it will allow us to go back to QEMU main loop for bdrv_drain_all()

[Qemu-devel] [RFC 11/13] dataplane: use block layer for I/O

2013-06-14 Thread Stefan Hajnoczi
Use the QEMU block layer instead of custom Linux AIO code. A couple of changes are necessary to make request processing work in this new environment: 1. Replace ioq_*() calls with bdrv_aio_*(). We finally support asynchronous flush since we get it for free from the QEMU block layer! 2. Ad

[Qemu-devel] [RFC 08/13] block: drop bdrv_get_aio_context()

2013-06-14 Thread Stefan Hajnoczi
Associating a BlockDriverState with a single AioContext is not flexible enough. Once we make BlockDriverState thread-safe, it will be possible to call bdrv_*() functions from multiple event loops. Use the thread-local AioContext pointer instead of bdrv_get_aio_context(). Signed-off-by: Stefan Ha

[Qemu-devel] [RFC 04/13] virtio-blk: implement BlockDevOps->drain_threads_cb()

2013-06-14 Thread Stefan Hajnoczi
Drain and stop the dataplane thread when bdrv_drain_all() is called. Note that the thread will be restarted in virtio_blk_handle_output() the next time the guest kicks the virtqueue. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 12 1 file changed, 12 insertions(+) dif

[Qemu-devel] [RFC 10/13] block: disable I/O throttling outside main loop

2013-06-14 Thread Stefan Hajnoczi
Timers only work in the main loop. This means threads running their own AioContext cannot use I/O throttling for now. Signed-off-by: Stefan Hajnoczi --- block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block.c b/block.c index d986fc8..2d7a0f8 100644 --- a/block.c +++ b/block.c @

[Qemu-devel] [RFC 09/13] main-loop: use thread-local AioContext

2013-06-14 Thread Stefan Hajnoczi
qemu_bh_new() and several other functions use qemu_aio_context, the global QEMU main loop AioContext. Now that we have introduced threads with their own AioContext and a thread-local AioContext pointer, convert qemu_bh_new() and friends to use the thread-local AioContext pointer. qemu_bh_new() no

[Qemu-devel] [RFC 12/13] dataplane: drop ioq Linux AIO request queue

2013-06-14 Thread Stefan Hajnoczi
virtio-blk data plane used a custom Linux AIO request queue called "ioq". Now that virtio-blk data plane uses the QEMU block layer we can drop ioq. Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/Makefile.objs | 2 +- hw/block/dataplane/ioq.c | 117 --

[Qemu-devel] [RFC 13/13] block: drop raw_get_aio_fd()

2013-06-14 Thread Stefan Hajnoczi
virtio-blk data plane only worked with -drive format=raw,aio=native. It used raw_get_aio_fd() to fetch the file descriptor from raw-posix. This was a layering violation and is no longer necessary now that virtio-blk data plane uses the QEMU block layer. Signed-off-by: Stefan Hajnoczi --- block

[Qemu-devel] [RFC 05/13] exec: do not use qemu/tls.h

2013-06-14 Thread Stefan Hajnoczi
From: Paolo Bonzini The next patch will change qemu/tls.h to support more platforms, but at some performance cost. Declare cpu_single_env directly instead of using the tls.h abstractions. Signed-off-by: Paolo Bonzini --- exec.c | 10 -- include/exec/cpu-all.h | 14

[Qemu-devel] [RFC 06/13] qemu-thread: add TLS wrappers

2013-06-14 Thread Stefan Hajnoczi
From: Paolo Bonzini Fast TLS is not available on some platforms, but it is always nice to use it. This wrapper implementation falls back to pthread_get/setspecific on POSIX systems that lack __thread, but uses the dynamic linker's TLS support on Linux and Windows. The user shall call alloc_foo(

Re: [Qemu-devel] [PATCH v2 03/17] memory: add ref/unref calls

2013-06-14 Thread Alexey Kardashevskiy
Hi. Ok. Back to the bug with this patch. The initial problem with this patch is that "make check" fails. Please help with subpages. It turned out that tests use MALLOC_PERTURB_ which is normally off. Who does not know - this is a way to tell glibc to fill released memory with some value and then

Re: [Qemu-devel] [Qemu-trivial] [PATCH] cputlb: fix debug logs

2013-06-14 Thread Michael Tokarev
05.06.2013 16:16, Hervé Poussineau wrote: > 'pd' variable has been removed in 06ef3525e1f271b6a842781a05eace5cf63b95c2. Thanks, applied to the trivial patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] spapr: add yet another maintainer

2013-06-14 Thread Michael Tokarev
12.06.2013 18:27, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy > --- > MAINTAINERS |1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 13c0cc5..1e00bb1 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -430,6 +430,7 @@ F: hw/isa/pc

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] piix: fix some printf errors when debug is enabled

2013-06-14 Thread Michael Tokarev
14.06.2013 11:11, Hu Tao wrote: > And use PRIxxx macros if possible. Thanks, applied to the trivial patches queue, on top of the patch by Hervé Poussineau which I mentioned before. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] spapr: add yet another maintainer

2013-06-14 Thread Alexander Graf
Am 14.06.2013 um 12:20 schrieb Michael Tokarev : > 12.06.2013 18:27, Alexey Kardashevskiy wrote: >> Signed-off-by: Alexey Kardashevskiy >> --- >> MAINTAINERS |1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 13c0cc5..1e00bb1 100644 >> --- a/MAINTA

[Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-06-14 Thread Nikunj A Dadhania
Hi, I have a working usb echi storage support for SLOF. I found that with latest qemu HEAD, USB EHCI registers(HCSPARAMS) started appearing funnily - in place of being LE it appeared BE. Bisecting it down I could get to this zero to the following commit: commit 08521e28c7e6e8cc1f53424a0f845f58d

Re: [Qemu-devel] [Xen-devel] [PATCH] Remove hardcoded xen-platform device initialization

2013-06-14 Thread Paul Durrant
> -Original Message- > From: qemu-devel-bounces+paul.durrant=citrix@nongnu.org > [mailto:qemu-devel-bounces+paul.durrant=citrix@nongnu.org] On > Behalf Of Paul Durrant > Sent: 14 June 2013 10:01 > To: Paolo Bonzini; Ian Campbell > Cc: xen-de...@lists.xen.org; qemu-devel@nongnu.org;

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-06-14 Thread Nikunj A Dadhania
Nikunj A Dadhania writes: > commit 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 > Author: Paolo Bonzini > Date: Fri May 24 12:54:01 2013 +0200 > > memory: add big endian support to access_with_adjusted_size > > This will be used to split 8-byte access down to two four-byte accesses. >

[Qemu-devel] [PULL 03/26] configure: remove ${config_host_ld} variable

2013-06-14 Thread Michael Tokarev
From: Ed Maste It was only used in one place (and already expanded in one other). Signed-off-by: Ed Maste Signed-off-by: Michael Tokarev --- configure |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index 1654413..e197b91 100755 --- a/configure +

[Qemu-devel] [PULL 05/26] intc/xilinx_intc: Use qemu_set_irq

2013-06-14 Thread Michael Tokarev
From: Peter Crosthwaite Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). No functional change, just reduces verbosity. Cc: qemu-triv...@nongnu.org Signed-off-by: Peter Crosthwaite Signed-off-by: Michael Tokarev --- hw/intc/xilinx_intc.c |6 +- 1 file changed, 1 insertio

Re: [Qemu-devel] [PULL 00/26] Trivial-patches pull request for 2013-06-14

2013-06-14 Thread Michael Tokarev
14.06.2013 14:50, Michael Tokarev wrote: > are available in the git repository at: > > git://git.corpit.ru/qemu.git trivial-patches-next And this is the same as git://git.corpit.ru/qemu.git trivial-patches *Sigh*. /mjt

[Qemu-devel] [PULL 19/26] KVM: S390: Add dummy kvm_arch_init_irq_routing()

2013-06-14 Thread Michael Tokarev
From: Alexey Kardashevskiy The common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Tokarev

[Qemu-devel] [PULL 11/26] Unbreak -no-quit for GTK, validate SDL options

2013-06-14 Thread Michael Tokarev
From: Peter Wu Certain options (-no-frame, -alt-grab, -ctrl-grab) only make sense with SDL. When compiling without SDL, these options (and -no-quit) print an error message and exit qemu. In case QEMU is compiled with SDL support, the three aforementioned options still do not make sense with othe

[Qemu-devel] [PULL 12/26] Makefile: Install qemu-img and qemu-nbd man pages only if built

2013-06-14 Thread Michael Tokarev
From: Andreas Färber When splitting openSUSE's qemu and qemu-linux-user packages we noticed that for linux-user-only builds unrelated man pages got installed. It's surely possible to delete them before packaging, but not installing them in the first place seems more logical. Cc: qemu-sta...@nong

[Qemu-devel] [PULL 06/26] curl: Whitespace only changes.

2013-06-14 Thread Michael Tokarev
From: "Richard W.M. Jones" Trivial patch to remove odd whitespace. Signed-off-by: Richard W.M. Jones Signed-off-by: Michael Tokarev --- block/curl.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/curl.c b/block/curl.c index b8935fd..4dc3b4b 100644 --- a/block

[Qemu-devel] [PULL 10/26] gtk: implement -full-screen

2013-06-14 Thread Michael Tokarev
From: Peter Wu Aiming for GTK as replacement for SDL, a feature like -full-screen should also be implemented. Bringing the window into full-screen mode is done by activating the "Fullscreen" menu item. This is done after showing the windows to make the cursor and menu hidden. v2: drop -no-frame

[Qemu-devel] [PULL 25/26] cputlb: fix debug logs

2013-06-14 Thread Michael Tokarev
From: Hervé Poussineau 'pd' variable has been removed in 06ef3525e1f271b6a842781a05eace5cf63b95c2. Signed-off-by: Hervé Poussineau Signed-off-by: Michael Tokarev --- cputlb.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cputlb.c b/cputlb.c index 8c8..1230e9e

[Qemu-devel] [PULL 14/26] hw/scsi: Don't increment a boolean value

2013-06-14 Thread Michael Tokarev
From: Stefan Weil This fixes a warning from cppcheck. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/scsi/vmw_pvscsi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 48d12f4..446f723 100644 --- a/hw/sc

[Qemu-devel] [PULL 23/26] main-loop: do not include slirp/slirp.h, use libslirp.h instead

2013-06-14 Thread Michael Tokarev
The header slirp/slirp.h is an internal header for slirp, and main-loop.c does not use internals from there. Instead, it uses public functions (slirp_update_timeout(), slirp_pollfds_fill() etc) which are declared in slirp/libslirp.h. Including slirp/slirp.h is somewhat dangerous since it redefine

[Qemu-devel] [PULL 17/26] ivshmem: add missing error exit(2)

2013-06-14 Thread Michael Tokarev
From: Stefan Hajnoczi If the user fails to specify 'chardev' or 'shm' then we cannot continue. Exit right away so that we don't invoke shm_open(3) with a NULL pointer. It would be nice to replace exit(1) with error returns in the PCI device .init() function, but leave that for another patch sinc

[Qemu-devel] [PULL 07/26] char/serial: cosmetic fixes.

2013-06-14 Thread Michael Tokarev
From: Peter Crosthwaite Some cosmetic fixes to char/serial fixing some checkpatch errors. Cc: qemu-triv...@nongnu.org Signed-off-by: Peter Crosthwaite Reviewed-by: Andreas Färber Signed-off-by: Michael Tokarev --- hw/char/serial.c | 30 +++--- 1 file changed, 19 in

[Qemu-devel] [PULL 15/26] target-sparc: Replace free by g_free

2013-06-14 Thread Michael Tokarev
From: Stefan Weil The wrong function was reported by cppcheck. Signed-off-by: Stefan Weil Reviewed-by: Andreas Färber Signed-off-by: Michael Tokarev --- target-sparc/cpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index 290

[Qemu-devel] [PULL 09/26] char/serial: serial_ioport_write: Factor out common code

2013-06-14 Thread Michael Tokarev
From: Peter Crosthwaite These three lines are common to both FIFO and regular mode. Just factor them out to outside the if rather than replicate the same lines inside both if and else. Cc: qemu-triv...@nongnu.org Signed-off-by: Peter Crosthwaite Reviewed-by: Andreas Färber Signed-off-by: Mich

[Qemu-devel] [PULL 26/26] piix: fix some printf errors when debug is enabled

2013-06-14 Thread Michael Tokarev
From: Hu Tao And use PRIxxx macros if possible. Signed-off-by: Hu Tao Signed-off-by: Michael Tokarev --- hw/acpi/piix4.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index e6525ac..756df3b 100644 --- a/hw/acpi/piix4.c +++

Re: [Qemu-devel] [PATCH v3 01/17] block: stop relying on io_flush() in bdrv_drain_all()

2013-06-14 Thread Stefan Hajnoczi
On Thu, Jun 13, 2013 at 10:33:58AM -0400, Paolo Bonzini wrote: > Il 10/06/2013 10:38, Stefan Hajnoczi ha scritto: > > On Mon, Jun 10, 2013 at 02:25:57PM +0200, Stefan Hajnoczi wrote: > >> @@ -1427,26 +1456,18 @@ void bdrv_close_all(void) > >> void bdrv_drain_all(void) > >> { > >> BlockDriver

[Qemu-devel] [PULL 22/26] libcacard/vscclient: fix leakage of socket on error paths

2013-06-14 Thread Michael Tokarev
From: Alon Levy Spotted by Coverity. Signed-off-by: Alon Levy Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- libcacard/vscclient.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index ac23647..5180d

[Qemu-devel] [PULL 20/26] KVM: PPC: Add dummy kvm_arch_init_irq_routing()

2013-06-14 Thread Michael Tokarev
From: Scott Wood The common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this. Unlike x86, PPC does not have one default irqchip, so there's no common code th

[Qemu-devel] [PULL 08/26] char/serial: Use generic Fifo8

2013-06-14 Thread Michael Tokarev
From: Peter Crosthwaite Use the generic Fifo8 helper provided by QEMU, rather than re-implement privately. Signed-off-by: Peter Crosthwaite Signed-off-by: Michael Tokarev --- hw/char/serial.c | 98 -- include/hw/char/serial.h | 15 +++---

[Qemu-devel] [PULL 18/26] KVM: ARM: Add dummy kvm_arch_init_irq_routing()

2013-06-14 Thread Michael Tokarev
From: Alexey Kardashevskiy The common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Tokarev

Re: [Qemu-devel] RFC: Full introspection support for QMP (with draft patch)

2013-06-14 Thread Eric Blake
On 06/14/2013 10:52 AM, Amos Kong wrote: > On Fri, Jun 07, 2013 at 06:17:26PM +0800, Amos Kong wrote: >> On Fri, Jun 07, 2013 at 06:12:30PM +0800, Amos Kong wrote: >>> Sent out a draft patch in the end of this week. It doesn't support: >>> * output all stuffs in one shot. >>> * introspect event >>>

[Qemu-devel] [PULL 21/26] linux-headers: Update to v3.10-rc5

2013-06-14 Thread Michael Tokarev
From: Alexey Kardashevskiy This adds symbols required for PPC64 pseries platform features: 1. sPAPR live migration; 2. in-kernel XICS interrupt controller. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Tokarev --- linux-headers/asm-arm/kvm.h | 12 ++-- linux-headers/asm-m

[Qemu-devel] [PULL 01/26] qemu-char: remove a few needless #includes

2013-06-14 Thread Michael Tokarev
This removes since we don't use syslogging, and removes second, solaris-specific, include of (which is included in a common part of the file) Signed-off-by: Michael Tokarev --- qemu-char.c |2 -- 1 file changed, 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 0b6ae95..596bf9e

Re: [Qemu-devel] [Xen-devel] [BUG 1747]Guest could't find bootable device with memory more than 3600M

2013-06-14 Thread George Dunlap
On Thu, Jun 13, 2013 at 6:22 PM, Ian Campbell wrote: > On Thu, 2013-06-13 at 17:55 +0100, Stefano Stabellini wrote: > >> > > We could have a xenstore flag somewhere that enables the old behaviour >> > > so that people can revert back to qemu-xen-traditional and make the pci >> > > hole below 4G ev

Re: [Qemu-devel] [RFC] sanitize memory on system reset

2013-06-14 Thread Stefan Hajnoczi
On Thu, Jun 13, 2013 at 10:46:39AM +0200, Peter Lieven wrote: > On 13.06.2013 10:40, Stefan Hajnoczi wrote: > >On Thu, Jun 13, 2013 at 08:09:09AM +0200, Peter Lieven wrote: > >>I was thinking if it would be a good idea to zeroize all memory resources > >>on system reset and > >>madvise dontneed th

[Qemu-devel] [PULL 16/26] hw/xen: Use g_free instead of free and fix potential memory leaks

2013-06-14 Thread Michael Tokarev
From: Stefan Weil The wrong functions and the missing calls of g_free were reported by cppcheck. Signed-off-by: Stefan Weil Acked-by: Stefano Stabellini Signed-off-by: Michael Tokarev --- hw/xen/xen_pt_config_init.c |4 ++-- xen-all.c |8 +--- 2 files changed, 7

[Qemu-devel] [PULL 24/26] create qemu_openpty_raw() helper function and move it to a separate file

2013-06-14 Thread Michael Tokarev
In two places qemu uses openpty() which is very system-dependent, and in both places the pty is switched to raw mode as well. Make a wrapper function which does both steps, and move all the system-dependent complexity into a separate file, together with static/local implementations of openpty() and

Re: [Qemu-devel] [Bug 1190525] [NEW] fdisk still shows the "/dev/sdb" partitions even after the removal of scsi disk

2013-06-14 Thread Stefan Hajnoczi
On Thu, Jun 13, 2013 at 09:33:37AM -, chandrashekar shastri wrote: > Steps to reproduce the issue: > > I. Add the SCSI disk through the virt-manager. > 2. Create the partition using fdisk (eg: /dev/sbb) > 3. Create a filesystem and format using mkfs.ext3 or mkfs.ext4 > 4. Remove the scsi di

Re: [Qemu-devel] RFC: Full introspection support for QMP (with draft patch)

2013-06-14 Thread Eric Blake
On 06/14/2013 10:52 AM, Amos Kong wrote: >>From 2b39fe0f380eea6a96de3589b3d148673d28c1ff Mon Sep 17 00:00:00 2001 > From: Amos Kong > Date: Fri, 7 Jun 2013 18:02:21 +0800 > Subject: [PATCH] full introspection support for QMP > > Signed-off-by: Amos Kong > --- > qapi-schema.json | 6 ++

[Qemu-devel] [PULL 04/26] configure: Disable host-bsd USB on FreeBSD

2013-06-14 Thread Michael Tokarev
From: Ed Maste It hasn't built since FreeBSD 8.x, and is disabled by a patch in the FreeBSD ports tree. FreeBSD is migrating to QEMU's libusb support. Signed-off-by: Ed Maste Signed-off-by: Michael Tokarev --- configure |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 02/26] gitignore: unignore *.patch

2013-06-14 Thread Michael Tokarev
This partially reverts: commit 082369e62c5bbaba89f173c2b803bc24115bb111 Author: liguang Date: Fri Mar 22 16:44:13 2013 +0800 gitignore: ignore more files I'm not sure how this went in. The thing is that ignoring *.patch, in my opinion, is just wrong. Especially for downstreams who app

[Qemu-devel] [PATCH v3 00/16] -boot and -no-fd-bootchk fixes

2013-06-14 Thread Markus Armbruster
This has been rotting in my tree since February. Sorry about that. I'm afraid -boot regressed in 1.4, specifically commit e4ada29e. This series fixes it, along with related bugs, and tops off with tests. PATCH 01-03 fix the regression, PATCH 04 cleans up afterwards. I'm refraining from nominat

[Qemu-devel] [PATCH v3 02/16] qemu-option: check_params() is now unused, drop it

2013-06-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qemu/option.h | 2 -- util/qemu-option.c| 30 -- 2 files changed, 32 deletions(-) diff --git a/include/qemu/option.h b/include/qemu/option.h index bdb6d21..a83c700 100644 --- a/include/qemu/option.h +++ b/include/qemu

[Qemu-devel] [PATCH v3 04/16] vl: Rename *boot_devices to *boot_order, for consistency

2013-06-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/hw/hw.h | 4 ++-- vl.c| 16 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/hw/hw.h b/include/hw/hw.h index 1fb9afa..cc9f847 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -44,9 +44,9 @@ vo

[Qemu-devel] [PATCH v3 07/16] qtest: Don't reset on qtest chardev connect

2013-06-14 Thread Markus Armbruster
libqtest's qtest_init() connecting to the qtest socket triggers reset. This was coded in the hope we could use the same QEMU process for multiple tests that way. Never used. Injects an extra reset even when it's not used, and that can mess up tests such as the one of -boot once I'm about to add.

[Qemu-devel] [PATCH v3 03/16] vl: Fix -boot order and once regressions, and related bugs

2013-06-14 Thread Markus Armbruster
Option "once" sets up a different boot order just for the initial boot. Boot order reverts back to normal on reset. Option "order" changes the normal boot order. The reversal is implemented by reset handler restore_boot_devices(), which takes the boot order to revert to as argument. restore_boot

[Qemu-devel] [PATCH v3 10/16] boot-order-test: Cover -boot once in ppc tests

2013-06-14 Thread Markus Armbruster
Cc: Andreas Färber Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c index c1cc2a6..f6dece6 100644 --- a/tests/boot-order-test.c +++ b/test

[Qemu-devel] [PATCH v3 12/16] boot-order-test: Code motion for better readability

2013-06-14 Thread Markus Armbruster
Cc: Andreas Färber Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c ind

[Qemu-devel] [PATCH v3 01/16] vl: Clean up parsing of -boot option argument

2013-06-14 Thread Markus Armbruster
Commit 3d3b8303 threw in some QemuOpts parsing without replacing the existing ad hoc parser, resulting in a confusing mess. Clean it up. Two user-visible changes: 1. Invalid options are reported more nicely. Before: qemu: unknown boot parameter 'x' in 'x=y' After: qemu-sys

[Qemu-devel] [PATCH v3 09/16] boot-order-test: Add tests for PowerMacs

2013-06-14 Thread Markus Armbruster
From: Andreas Färber They set the boot device via fw_cfg, which is then translated to a boot path of "hd" or "cd" in OpenBIOS. Signed-off-by: Andreas Färber Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- tests/Makefile | 2 ++ tests/boot-order-test.

[Qemu-devel] [PATCH v3 13/16] boot-order-test: Add tests for PowerPC PREP

2013-06-14 Thread Markus Armbruster
Cc: Andreas Färber Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c index 003140f..0060905 100644 --- a/tests

[Qemu-devel] [PATCH v3 05/16] pc: Make -no-fd-bootchk stick across boot order changes

2013-06-14 Thread Markus Armbruster
Option -no-fd-bootchk asks the BIOS to attempt booting from a floppy even when the boot sector signature isn't there, by setting a bit in RTC CMOS. It was added back in 2006 (commit 52ca8d6a). Two years later, commit 0ecdffbb added monitor command boot_set. Implemented by new function pc_boot_set

[Qemu-devel] [PATCH v3 06/16] doc: Drop ref to Bochs from -no-fd-bootchk documentation

2013-06-14 Thread Markus Armbruster
Manual page and qemu-doc on talk about "Bochs BIOS". We use SeaBIOS, and it implements the feature. Replace by just "BIOS", and drop the TODO line wondering about the Bochs reference. Signed-off-by: Markus Armbruster --- qemu-options.hx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[Qemu-devel] [PATCH v3 08/16] boot-order-test: New; covering just PC for now

2013-06-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/Makefile | 2 ++ tests/boot-order-test.c | 68 + 2 files changed, 70 insertions(+) create mode 100644 tests/boot-order-test.c diff --git a/tests/Makefile b/tests/Makefile index c107489..394e029

Re: [Qemu-devel] [PATCH] make screendump an async command

2013-06-14 Thread Gerd Hoffmann
Hi, > Note: due to QAPI not generating async commands yet I had to remove the > schema screendump definition. Hmm, that will break libvirt I suspect. Guess this one has to wait until QAPI gained proper async command support. cheers, Gerd

[Qemu-devel] [PATCH v3 14/16] boot-order-test: Add tests for Sun4m

2013-06-14 Thread Markus Armbruster
Cc: Blue Swirl Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c index 0060905..7b1edc1 100644 --- a/tests/boot-order-test.c +++ b/tests/boot-order-test.c @@ -178,6 +1

[Qemu-devel] [PATCH v3 16/16] boot-order-test: Add tests for Sun4u

2013-06-14 Thread Markus Armbruster
Cc: Blue Swirl Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c index d1d99f8..37c7227 100644 --- a/tests/boot-order-test.c +++ b/tests/boot-order-test.c @@ -198,6 +1

[Qemu-devel] [PATCH v3 11/16] boot-order-test: Better separate target-specific and generic parts

2013-06-14 Thread Markus Armbruster
The initial version did just PC. I didn't bother to separate out generic parts, because I don't like to abstract from a single case. Now we have two cases, PC and PowerMac, and I'm about to add two more. Time to do it right. To ease review, this commit changes the code without in-place, and only

[Qemu-devel] [PULL 13/26] device tree: Fix cppcheck warning

2013-06-14 Thread Michael Tokarev
From: Stefan Weil Fix this cppcheck warning: Checking device_tree.c... device_tree.c:216: style: Checking if unsigned variable 'r' is less than zero. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- device_tree.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Qemu-devel] [PATCH v3 15/16] boot-order-test: Support fw_cfg in I/O space

2013-06-14 Thread Markus Armbruster
Next commit needs it. Cc: Blue Swirl Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c index 7b1edc1..d1d99f8 100644 --- a/tests/boot-order-

[Qemu-devel] [PULL 00/26] Trivial-patches pull request for 2013-06-14

2013-06-14 Thread Michael Tokarev
This is yet another pull request from the trivial-patches queue. There are many changes this time, most are really trivial, but some, while also of trivial nature, are large(ish). These include: - linux headers update request, which syncs copy of linux headers with 3.10-rc5, together with 3 pr

[Qemu-devel] [PATCH] arm/boot: Free dtb blob memory after use

2013-06-14 Thread Peter Maydell
The dtb blob returned by load_device_tree() is in memory allocated with g_malloc(). Free it accordingly once we have copied its contents into the guest memory. To make this easy, we need also to clean up the error handling in load_dtb() so that we consistently handle errors in the same way (by prin

Re: [Qemu-devel] [Xen-devel] [BUG 1747]Guest could't find bootable device with memory more than 3600M

2013-06-14 Thread Ian Campbell
On Fri, 2013-06-14 at 11:53 +0100, George Dunlap wrote: > On Thu, Jun 13, 2013 at 6:22 PM, Ian Campbell wrote: > > On Thu, 2013-06-13 at 17:55 +0100, Stefano Stabellini wrote: > > > >> > > We could have a xenstore flag somewhere that enables the old behaviour > >> > > so that people can revert bac

[Qemu-devel] [PATCH 3/6] sun4: Don't prematurely explode QEMUMachineInitArgs

2013-06-14 Thread Markus Armbruster
Don't explode QEMUMachineInitArgs before passing it to sun4m_hw_init(), sun4uv_init(). Signed-off-by: Markus Armbruster --- hw/sparc/sun4m.c | 113 - hw/sparc64/sun4u.c | 52 +++- 2 files changed, 40 insertions(+), 125 de

[Qemu-devel] [PATCH 0/6] Clean up bogus default boot order

2013-06-14 Thread Markus Armbruster
This is on top of "[PATCH v3 00/16] -boot and -no-fd-bootchk fixes", so it's protected by the tests there. The first five patches are admittedly related to the stated purpose of this series pretty much only by "I can't stand perpetuating this stupid crap". Max Filippov and Peter Maydell already c

[Qemu-devel] [PATCH 4/6] ppc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-06-14 Thread Markus Armbruster
Don't explode when the variable is used just once, and never changed. Signed-off-by: Markus Armbruster --- hw/ppc/e500plat.c | 18 ++ hw/ppc/mpc8544ds.c | 18 ++ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.

  1   2   3   >