Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-22 Thread Wenchao Xia
于 2013-3-21 23:08, Eric Blake 写道: > On 03/21/2013 08:56 AM, Stefan Hajnoczi wrote: >> On Thu, Mar 21, 2013 at 02:42:23PM +0100, Paolo Bonzini wrote: >>> Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto: There already is a guest RAM cloning mechanism: fork the QEMU process. Then you have a

[Qemu-devel] [PATCH v3] Add option to mlock qemu and guest memory

2013-03-22 Thread Satoru Moriya
ChangeLog: v3 - Modify os_mlock() to return error code - Update configure_realtime() to handle return value from os_mlock() - Change the variable name from is_mlock to enable_mlock in configure_realtime() - Rebase qemu version 1.4.50 v2 - Change option name from -mlock to -realtime mlock=on|

Re: [Qemu-devel] [PATCH v3] pciinit: Enable default VGA device

2013-03-22 Thread Kevin O'Connor
On Wed, Mar 20, 2013 at 10:58:47AM -0600, Alex Williamson wrote: > As QEMU gains PCI bridge and PCIe root port support, we won't always > find the VGA device on the root bus. We therefore need to add support > to find and enable a VGA device and the path to it through the VGA > Enable support in t

Re: [Qemu-devel] qemu / seabios ACPI table interface

2013-03-22 Thread Kevin O'Connor
On Fri, Mar 22, 2013 at 05:09:53PM +0100, Laszlo Ersek wrote: > I'm confused. What are the requirements? Here's my suggested implementation: - Have qemu create the ACPI tables in new fw_cfg "file" entries; one "file" per table. Have QEMU put ACPI tables grouped in /etc/acpi/ - for example /e

Re: [Qemu-devel] [RFC ppc-next PATCH 6/6] kvm/openpic: in-kernel mpic support

2013-03-22 Thread Scott Wood
On 03/21/2013 06:45:31 PM, Alexander Graf wrote: On 21.03.2013, at 22:59, Scott Wood wrote: > On 03/21/2013 04:29:02 PM, Alexander Graf wrote: >> Am 21.03.2013 um 21:50 schrieb Scott Wood : >> > On 03/21/2013 03:41:19 AM, Alexander Graf wrote: >> >> Can't all the stuff above here just simply

Re: [Qemu-devel] [PATCH 08/14] nbd: Accept -drive options for the network connection

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 18:41, Kevin Wolf ha scritto: > + > +if (qdict_haskey(options, "path")) { > +s->is_unix = true; > +} else if (qdict_haskey(options, "host")) { > +s->is_unix = false; > +} else { > +return -EINVAL; > } > -return err; > + > +s->socket_opt

Re: [Qemu-devel] [PATCH 06/14] nbd: Keep hostname and port separate

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 18:41, Kevin Wolf ha scritto: > +QemuOpts *opts = qemu_opts_create_nofail(&socket_optslist); > + > +qemu_opt_set(opts, "host", s->inet_addr->host); > +qemu_opt_set(opts, "port", s->inet_addr->port); > +if (s->inet_addr->has_to) { > +qemu_opt

Re: [Qemu-devel] [Qemu-stable][PATCH v3] tcg: Fix occasional TCG broken problem when ldst optimization enabled

2013-03-22 Thread Aurelien Jarno
On Fri, Mar 22, 2013 at 09:50:17PM +0900, Yeongkyoon Lee wrote: > is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so > that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION > enabled. The reason is code_gen_buffer_max_size does not cover the uppe

Re: [Qemu-devel] [PATCH] qemu-bridge-helper: force usage of a very high MAC address for the bridge

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 22:37, Corey Bryant ha scritto: > Is it desirable to change a mac address under the covers? This is the TAP mac address. It is unrelated to the guest's MAC address. It is a random link-local address, all this patch does is make it less random. > Also it seems like this might be be

Re: [Qemu-devel] [Qemu-ppc] [RFC ppc-next PATCH 3/6] memory: add memory_region_to_address()

2013-03-22 Thread Scott Wood
On 03/22/2013 08:08:57 AM, Peter Maydell wrote: On 21 March 2013 22:43, Scott Wood wrote: > What if the update is to a parent memory region, not to the one directly > associated with the device? > > Or does add() get called for all child regions (recursively) in such cases? The memory API

Re: [Qemu-devel] [PULL 00/58] ppc patch queue 2013-03-22

2013-03-22 Thread Aurélien Jarno
On Fri, Mar 22, 2013 at 03:28:34PM +0100, Alexander Graf wrote: > Hi Blue / Aurelien, > > This is my current patch queue for ppc. Please pull. > > Alex > > > The following changes since commit afed26082219b49443193b4ac32d113bbcf967fd: > Edgar E. Iglesias (1): > microblaze: Ignore non

Re: [Qemu-devel] Abort in monitor_puts.

2013-03-22 Thread Luiz Capitulino
On Fri, 22 Mar 2013 16:50:39 -0400 Luiz Capitulino wrote: > On Fri, 22 Mar 2013 10:17:58 +0100 > KONRAD Frédéric wrote: > > > Hi, > > > > Seems there is an issue with the current git (found by toddf on IRC). > > > > To reproduce: > > > > ./qemu-system-x86_64 --monitor stdio --nographic > >

Re: [Qemu-devel] [PATCH] qemu-bridge-helper: force usage of a very high MAC address for the bridge

2013-03-22 Thread Corey Bryant
On 03/22/2013 12:57 PM, Paolo Bonzini wrote: Linux uses the lowest enslaved MAC address as the MAC address of the bridge. Set MAC address to a high value so that it does not affect the MAC address of the bridge. Changing the MAC address of the bridge could cause a few seconds of network downt

Re: [Qemu-devel] [PATCHv4 0/9] buffer_is_zero / migration optimizations

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 20:20, Peter Lieven ha scritto: >> I think patch 4 is a bit overengineered. I would prefer the simple >> patch you had using three/four non-vectorized accesses. The setup cost >> of the vectorized buffer_is_zero is quite high, and 64 bits are just >> 256k RAM; if the host doesn't to

Re: [Qemu-devel] Abort in monitor_puts.

2013-03-22 Thread Luiz Capitulino
On Fri, 22 Mar 2013 10:17:58 +0100 KONRAD Frédéric wrote: > Hi, > > Seems there is an issue with the current git (found by toddf on IRC). > > To reproduce: > > ./qemu-system-x86_64 --monitor stdio --nographic > > and put "?" it should abort. > > Here is the backtrace: > > #0 0x7f77cd34

Re: [Qemu-devel] [PATCH] qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows

2013-03-22 Thread Luiz Capitulino
On Fri, 22 Mar 2013 14:44:05 -0600 Eric Blake wrote: > On 03/22/2013 02:31 PM, Luiz Capitulino wrote: > > Today we reset fd_counter if it wraps, but it's better to abort() > > instead, as fd_counter should never reach INT64_MAX. > > > > Signed-off-by: Luiz Capitulino > > --- > > qga/main.c | 8

Re: [Qemu-devel] [PATCH] qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows

2013-03-22 Thread Eric Blake
On 03/22/2013 02:31 PM, Luiz Capitulino wrote: > Today we reset fd_counter if it wraps, but it's better to abort() > instead, as fd_counter should never reach INT64_MAX. > > Signed-off-by: Luiz Capitulino > --- > qga/main.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > d

[Qemu-devel] [PATCH uq/master v2 2/2] kvm: forward INIT signals coming from the chipset

2013-03-22 Thread Paolo Bonzini
When an INIT comes in, we can do the entire reset process in userspace. However, we have to be careful and move APs into KVM_MP_STATE_INIT_RECEIVED, so that the in-kernel APIC will listen to startup IPIs. Signed-off-by: Paolo Bonzini --- target-i386/helper.c | 4 target-i386/kvm.c |

[Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method

2013-03-22 Thread Paolo Bonzini
Now that we have a CPU object with a reset method, it is better to keep the KVM reset close to the CPU reset. Using qemu_register_reset as we do now keeps them far apart. As a side effect, a CPU reset (cpu_reset) will reset the KVM state too. Signed-off-by: Paolo Bonzini --- include/sysemu/kvm

[Qemu-devel] [PATCH uq/master v2 0/2] correctly reset the CPU on INIT interrupts

2013-03-22 Thread Paolo Bonzini
These patches finally implement INIT entirely in userspace. The problem here was that the CPU was being reset after kvm_arch_reset_vcpu is called. This made it harder to hook into the reset process and put APs into KVM_MP_STATE_INIT_RECEIVED state (instead of KVM_MP_STATE_UNINITIALIZED which is th

[Qemu-devel] [PATCH] qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows

2013-03-22 Thread Luiz Capitulino
Today we reset fd_counter if it wraps, but it's better to abort() instead, as fd_counter should never reach INT64_MAX. Signed-off-by: Luiz Capitulino --- qga/main.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 74ef788..5f505a2 100644 -

[Qemu-devel] indentation hints [was: [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer]

2013-03-22 Thread Eric Blake
On 03/22/2013 02:03 PM, Peter Lieven wrote: >>> +if (len % (BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR >>> +* sizeof(VECTYPE)) == 0 >>> +&& ((uintptr_t) buf) % sizeof(VECTYPE) == 0) { >> I know that emacs tends to indent the second line to the column after >> the ( th

Re: [Qemu-devel] [PATCHv4 7/9] migration: do not sent zero pages in bulk stage

2013-03-22 Thread Eric Blake
On 03/22/2013 06:46 AM, Peter Lieven wrote: > during bulk stage of ram migration if a page is a > zero page do not send it at all. > the memory at the destination reads as zero anyway. > > even if there is an madvise with QEMU_MADV_DONTNEED > at the target upon receipt of a zero page I have observ

Re: [Qemu-devel] [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer

2013-03-22 Thread Peter Lieven
Am 22.03.2013 20:37, schrieb Eric Blake: > On 03/22/2013 06:46 AM, Peter Lieven wrote: >> this adds buffer_find_nonzero_offset() which is a SSE2/Altivec >> optimized function that searches for non-zero content in a >> buffer. >> >> due to the optimizations used in the function there are restrictio

Re: [Qemu-devel] [PATCHv4 5/9] migration: search for zero instead of dup pages

2013-03-22 Thread Peter Lieven
Am 22.03.2013 20:49, schrieb Eric Blake: > On 03/22/2013 06:46 AM, Peter Lieven wrote: >> virtually all dup pages are zero pages. remove >> the special is_dup_page() function and use the >> optimized buffer_find_nonzero_offset() function >> instead. >> >> here buffer_find_nonzero_offset() is used d

Re: [Qemu-devel] [PATCHv4 5/9] migration: search for zero instead of dup pages

2013-03-22 Thread Eric Blake
On 03/22/2013 06:46 AM, Peter Lieven wrote: > virtually all dup pages are zero pages. remove > the special is_dup_page() function and use the > optimized buffer_find_nonzero_offset() function > instead. > > here buffer_find_nonzero_offset() is used directly > to avoid the unnecssary additional che

Re: [Qemu-devel] Use of flash for x86 BIOS

2013-03-22 Thread Markus Armbruster
Jordan Justen writes: > On Thu, Mar 21, 2013 at 12:45 AM, Markus Armbruster wrote: >> x86 maintainers may wish to *switch it off* until it's done fully and >> properly, by setting "pc-sysfw" property "rom_only" to 1. > > This would completely disable the flash support. Unless the user enables i

Re: [Qemu-devel] [PATCH] virtio-blk-x: fix configuration synchronization.

2013-03-22 Thread Anthony Liguori
KONRAD Frédéric writes: > On 22/03/2013 19:52, Kevin Wolf wrote: >> Am 22.03.2013 um 19:17 hat KONRAD Frédéric geschrieben: >>> On 22/03/2013 17:58, Kevin Wolf wrote: Am 20.03.2013 um 10:00 hat fred.kon...@greensocs.com geschrieben: > From: KONRAD Frederic > > The virtio-blk-x c

Re: [Qemu-devel] [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer

2013-03-22 Thread Eric Blake
On 03/22/2013 06:46 AM, Peter Lieven wrote: > this adds buffer_find_nonzero_offset() which is a SSE2/Altivec > optimized function that searches for non-zero content in a > buffer. > > due to the optimizations used in the function there are restrictions > on buffer address and search length. the fu

Re: [Qemu-devel] [PATCH v3 3/3] hw/arm_gic_common: Use vmstate struct rather than save/load functions

2013-03-22 Thread Igor Mitsyanko
On Mar 22, 2013 10:02 PM, "Peter Maydell" wrote: > > Update the GIC save/restore to use vmstate rather than hand-rolled > save/load functions. > > Signed-off-by: Peter Maydell > --- > hw/arm_gic_common.c | 108 +++ > 1 file changed, 41 insertions(

Re: [Qemu-devel] [PATCH 24/26] libcacard: move atr setting from macro to function

2013-03-22 Thread Alon Levy
> Hi, > > review below > > On Mon, Mar 18, 2013 at 2:11 PM, Alon Levy wrote: > > Only because qemu's checkpatch complains about it. > > > > Signed-off-by: Alon Levy > > --- > > Makefile.objs | 1 + > > libcacard/vcard_emul_nss.c | 11 --- > > libcacard/vcardt.c |

Re: [Qemu-devel] [PATCH 12/26] hw/ccid-card-passthru.c: add atr check

2013-03-22 Thread Alon Levy
> On Mon, Mar 18, 2013 at 2:10 PM, Alon Levy wrote: > > +if (len > 2 + historical_length + opt_bytes) { > > +DPRINTF(card, D_WARN, > > +"atr too long: len %d, but hist/opt %d/%d, T1 0x%X\n", > > +len, historical_length, opt_bytes, data[1]); > > +/* let i

Re: [Qemu-devel] [PATCH v3 1/3] vmstate: Add support for two dimensional arrays

2013-03-22 Thread Igor Mitsyanko
On Mar 22, 2013 10:02 PM, "Peter Maydell" wrote: > > Add support for migrating two dimensional arrays, by defining > a set of new macros VMSTATE_*_2DARRAY paralleling the existing > VMSTATE_*_ARRAY macros. 2D arrays are handled the same for actual > state serialization; the only difference is that

Re: [Qemu-devel] [PATCHv4 0/9] buffer_is_zero / migration optimizations

2013-03-22 Thread Peter Lieven
Am 22.03.2013 18:25, schrieb Paolo Bonzini: > Il 22/03/2013 13:46, Peter Lieven ha scritto: >> this is v4 of my patch series with various optimizations in >> zero buffer checking and migration tweaks. >> >> thanks especially to Eric Blake for reviewing. >> >> v4: >> - do not inline buffer_find_nonz

Re: [Qemu-devel] Use of flash for x86 BIOS (was: [PATCH 0/2] Implement migration support for pflash_cfi01)

2013-03-22 Thread Jordan Justen
On Thu, Mar 21, 2013 at 12:45 AM, Markus Armbruster wrote: > x86 maintainers may wish to *switch it off* until it's done fully and > properly, by setting "pc-sysfw" property "rom_only" to 1. This would completely disable the flash support. At the time this feature was added, I think it was well u

Re: [Qemu-devel] [PATCH] virtio-blk-x: fix configuration synchronization.

2013-03-22 Thread KONRAD Frédéric
On 22/03/2013 19:52, Kevin Wolf wrote: Am 22.03.2013 um 19:17 hat KONRAD Frédéric geschrieben: On 22/03/2013 17:58, Kevin Wolf wrote: Am 20.03.2013 um 10:00 hat fred.kon...@greensocs.com geschrieben: From: KONRAD Frederic The virtio-blk-x configuration is not in sync with virtio-blk configur

Re: [Qemu-devel] [PATCH] virtio-blk-x: fix configuration synchronization.

2013-03-22 Thread Kevin Wolf
Am 22.03.2013 um 19:17 hat KONRAD Frédéric geschrieben: > On 22/03/2013 17:58, Kevin Wolf wrote: > >Am 20.03.2013 um 10:00 hat fred.kon...@greensocs.com geschrieben: > >>From: KONRAD Frederic > >> > >>The virtio-blk-x configuration is not in sync with virtio-blk configuration. > >>So this patch re

Re: [Qemu-devel] Use of flash for x86 BIOS

2013-03-22 Thread Markus Armbruster
Peter Maydell writes: > On 21 March 2013 07:45, Markus Armbruster wrote: >> [Note cc: Jordan, who added flash to x86 in commit bd183c79] >> >> Peter Maydell writes: >> >>> These patches implement migration support for pflash_cfi01. >>> The first patch just drops some useless state so we don't >

Re: [Qemu-devel] [PATCH] virtio-blk-x: fix configuration synchronization.

2013-03-22 Thread KONRAD Frédéric
On 22/03/2013 17:58, Kevin Wolf wrote: Am 20.03.2013 um 10:00 hat fred.kon...@greensocs.com geschrieben: From: KONRAD Frederic The virtio-blk-x configuration is not in sync with virtio-blk configuration. So this patch remove the virtio-blk-x configuration field, and use virtio-blk one for sett

[Qemu-devel] [PATCH v3 0/3] arm_gic: convert to vmstate

2013-03-22 Thread Peter Maydell
Convert the arm_gic save/load support from hand-coded save/load functions to use VMState. This seems like a good thing to do before we get to the point with KVM/ARM that we need to start supporting between-version migration... Changes v2->v3: * implement 2D array support in vmstate.h so we don't

[Qemu-devel] [PATCH v3 2/3] arm_gic: Fix sizes of state fields in preparation for vmstate support

2013-03-22 Thread Peter Maydell
In preparation for switching to vmstate for migration support, fix the sizes of various GIC state fields. In particular, we replace all the bitfields (which VMState can't deal with) with straightforward uint8_t values which we do bit operations on. (The bitfields made more sense when NCPU was set d

[Qemu-devel] [PATCH v3 1/3] vmstate: Add support for two dimensional arrays

2013-03-22 Thread Peter Maydell
Add support for migrating two dimensional arrays, by defining a set of new macros VMSTATE_*_2DARRAY paralleling the existing VMSTATE_*_ARRAY macros. 2D arrays are handled the same for actual state serialization; the only difference is that the type check has to change for a 2D array. Signed-off-by

[Qemu-devel] [PATCH v3 3/3] hw/arm_gic_common: Use vmstate struct rather than save/load functions

2013-03-22 Thread Peter Maydell
Update the GIC save/restore to use vmstate rather than hand-rolled save/load functions. Signed-off-by: Peter Maydell --- hw/arm_gic_common.c | 108 +++ 1 file changed, 41 insertions(+), 67 deletions(-) diff --git a/hw/arm_gic_common.c b/hw/arm_gi

[Qemu-devel] [Bug 1158912] [NEW] QEMU Version 1.4.0 - SLIRP hangs VM

2013-03-22 Thread Kenneth Salerno
Public bug reported: (Note: problem is not present in version 1.3.0) Stacktrace: please see attached gdb log file. Steps to reproduce: 1. gdb -x debug-qemu.gdb testing/qemu-1.4.0/ppc64-softmmu/qemu-system- ppc64 Contents of debug-qemu.gdb: run -L ./testing/qemu-1.4.0/pc-bios -name "[DEBUG] S

[Qemu-devel] [PATCH 12/14] block: Allow omitting the file name when using driver-specific options

2013-03-22 Thread Kevin Wolf
After this patch, using -drive with an empty file name continues to open the file if driver-specific options are used. If no driver-specific options are specified, the semantics stay as it was: It defines a drive without an inserted medium. In order to achieve this, bdrv_open() must be made safe t

[Qemu-devel] [PATCH 13/14] nbd: Use default port if only host is specified

2013-03-22 Thread Kevin Wolf
The URL method already takes care to apply the default port when none is specfied. Directly specifying driver-specific options required the port number until now. Allow leaving it out and apply the default. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/nbd.c | 19 ++---

[Qemu-devel] [PATCH 09/14] block: Introduce .bdrv_parse_filename callback

2013-03-22 Thread Kevin Wolf
If a driver needs structured data and not just a string, it can provide a .bdrv_parse_filename callback now that parses the command line string into separate options. Keeping this separate from .bdrv_open_filename ensures that the preferred way of directly specifying the options always works as wel

[Qemu-devel] [PATCH 07/14] nbd: Remove unused functions

2013-03-22 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/block/nbd.h | 2 -- nbd.c | 19 --- 2 files changed, 21 deletions(-) diff --git a/include/block/nbd.h b/include/block/nbd.h index 9b52d50..0903d7a 100644 --- a/include/block/nbd.h +++ b/include/block/nb

[Qemu-devel] [PATCH 14/14] nbd: Check against invalid option combinations

2013-03-22 Thread Kevin Wolf
A file name may only specified if no host or socket path is specified. The latter two may not appear at the same time either. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/nbd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index 67f

[Qemu-devel] [PATCH 06/14] nbd: Keep hostname and port separate

2013-03-22 Thread Kevin Wolf
The NBD block supports an URL syntax, for which a URL parser returns separate hostname and port fields. It also supports the traditional qemu syntax encoded in a filename. Until now, after parsing the URL to get each piece of information, a new string is built to be fed to socket functions. Instea

[Qemu-devel] [PATCH 04/14] block: Pass bdrv_file_open() options to block drivers

2013-03-22 Thread Kevin Wolf
Specify -drive file.option=... on the command line to pass the option to the protocol instead of the format driver. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block.c | 63 --- 1 file changed, 56 insertions(+), 7 deletions(-

[Qemu-devel] [PATCH 03/14] block: Add options QDict to bdrv_file_open() prototypes

2013-03-22 Thread Kevin Wolf
The new parameter is unused yet. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block.c | 14 +++--- block/blkdebug.c | 5 +++-- block/blkverify.c | 5 +++-- block/cow.c | 2 +- block/curl.c | 3 ++- block/gluster.

[Qemu-devel] [PATCH 10/14] block: Rename variable to avoid shadowing

2013-03-22 Thread Kevin Wolf
bdrv_open() uses two different variables called options. Rename one of them to avoid confusion and to allow the outer one to be accessed everywhere. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a

[Qemu-devel] [PATCH 11/14] block: Make find_image_format safe with NULL filename

2013-03-22 Thread Kevin Wolf
In order to achieve this, the .bdrv_probe callbacks of all drivers must cope with this. The DMG driver is the only one that bases its decision on the filename and it needs to be changed. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/dmg.c | 13 ++--- 1 file changed, 10 ins

[Qemu-devel] [PATCH 01/14] Revert "block: complete all IOs before .bdrv_truncate"

2013-03-22 Thread Kevin Wolf
From: Peter Lieven brdv_truncate() is also called from readv/writev commands on self- growing file based storage. this will result in requests waiting for theirselves to complete. This reverts commit 9a665b2b8640e464f0a778216fc2dca8d02acf33. Signed-off-by: Kevin Wolf --- block.c | 4 1 f

[Qemu-devel] [PATCH 08/14] nbd: Accept -drive options for the network connection

2013-03-22 Thread Kevin Wolf
The existing parsers for the file name now parse everything into the bdrv_open() options QDict. Instead of using these parsers, you can now directly specify the options on the command line, like this: qemu-system-x86_64 -drive file=nbd:,file.port=1234,file.host=::1 Clearly the file=... part c

[Qemu-devel] [PATCH 05/14] qemu-socket: Make socket_optslist public

2013-03-22 Thread Kevin Wolf
Allow other users to create the QemuOpts needed for inet_connect_opts(). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/qemu/sockets.h | 2 ++ util/qemu-sockets.c| 24 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/qemu/sock

[Qemu-devel] [PATCH 02/14] block: complete all IOs before resizing a device

2013-03-22 Thread Kevin Wolf
From: Peter Lieven this patch ensures that all pending IOs are completed before a device is resized. this is especially important if a device is shrinked as it the bdrv_check_request() result is invalidated. Signed-off-by: Peter Lieven Signed-off-by: Kevin Wolf --- blockdev.c | 3 +++ 1 file

[Qemu-devel] [PULL 00/14] Block patches

2013-03-22 Thread Kevin Wolf
The following changes since commit afed26082219b49443193b4ac32d113bbcf967fd: microblaze: Ignore non-cpu accesses to unmapped areas (2013-03-19 17:34:47 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony for you to fetch changes up to 681e7ad024d80123

Re: [Qemu-devel] [PATCHv4 0/9] buffer_is_zero / migration optimizations

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 13:46, Peter Lieven ha scritto: > this is v4 of my patch series with various optimizations in > zero buffer checking and migration tweaks. > > thanks especially to Eric Blake for reviewing. > > v4: > - do not inline buffer_find_nonzero_offset() > - inline can_usebuffer_find_nonzero_

Re: [Qemu-devel] [PATCH 07/26] build-sys: must link with -fstack-protector

2013-03-22 Thread Paolo Bonzini
Il 18/03/2013 14:10, Alon Levy ha scritto: > From: Marc-André Lureau > > It is needed to give that flag to the linker as well, but latest > libtool 2.4.2 still swallows that argument, so let's pass it with > libtool -Wc argument. > > qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference t

Re: [Qemu-devel] qemu / seabios ACPI table interface

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 17:09, Laszlo Ersek ha scritto: > I'm confused. What are the requirements? > > (1) should unpatched qemu work with patched seabios? Yes. > (2) should patched qemu work with unpatched seabios? No. > Considering patched qemu + patched seabios, > (3) should qemu dynamically control

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-22 Thread Anthony Liguori
Hans de Goede writes: > Hi, > > On 03/22/2013 02:50 PM, Anthony Liguori wrote: >> Hans de Goede writes: >> >> We should have never allowed that in the first place and >> I object strongly to extending the concept without making it make sense >> for everything else. >> >>> Frontends end inside t

Re: [Qemu-devel] [PATCH v4 2/8] Add socket_writev_buffer function

2013-03-22 Thread Eric Blake
On 03/22/2013 01:30 AM, Orit Wasserman wrote: >>> >>> +static int socket_writev_buffer(void *opaque, struct iovec *iov, int >>> iovcnt) >> >> Returning int... >> >>> +{ >>> +QEMUFileSocket *s = opaque; >>> +ssize_t len; >>> +ssize_t size = iov_size(iov, iovcnt); >>> + >>> +len =

Re: [Qemu-devel] [PATCH v4 9/9] ASN.1 specific test cases

2013-03-22 Thread Stefan Berger
On 03/21/2013 06:05 PM, Eric Blake wrote: On 03/21/2013 12:29 PM, Stefan Berger wrote: +tests/test-ber-visitor.o: $(addprefix include/qapi/, ber.h ber-input-visitor.h ber-output-visitor.h) $(addprefix qapi/, ber-common.c ber-input-visitor.c ber-output-visitor.c) +tests/test-ber-visitor$(EXESUF

Re: [Qemu-devel] [PATCH] virtio-blk-x: fix configuration synchronization.

2013-03-22 Thread Kevin Wolf
Am 20.03.2013 um 10:00 hat fred.kon...@greensocs.com geschrieben: > From: KONRAD Frederic > > The virtio-blk-x configuration is not in sync with virtio-blk configuration. > So this patch remove the virtio-blk-x configuration field, and use virtio-blk > one for setting the properties. > > This al

[Qemu-devel] [PATCH] qemu-bridge-helper: force usage of a very high MAC address for the bridge

2013-03-22 Thread Paolo Bonzini
Linux uses the lowest enslaved MAC address as the MAC address of the bridge. Set MAC address to a high value so that it does not affect the MAC address of the bridge. Changing the MAC address of the bridge could cause a few seconds of network downtime. Cc: qemu-sta...@nongnu.org Signed-off-by: P

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-22 Thread Hans de Goede
Hi, On 03/22/2013 02:50 PM, Anthony Liguori wrote: Hans de Goede writes: Hi, On 03/21/2013 07:18 PM, Anthony Liguori wrote: Alon Levy writes: Note that the handler is called chr_is_guest_connected and not chr_is_fe_connected, consistent with other members of CharDriverState. Sorry, I d

Re: [Qemu-devel] Use of flash for x86 BIOS (was: [PATCH 0/2] Implement migration support for pflash_cfi01)

2013-03-22 Thread Peter Maydell
On 21 March 2013 07:45, Markus Armbruster wrote: > [Note cc: Jordan, who added flash to x86 in commit bd183c79] > > Peter Maydell writes: > >> These patches implement migration support for pflash_cfi01. >> The first patch just drops some useless state so we don't >> have to think about it for mig

[Qemu-devel] [PATCH 01/58] pseries: Fix breakage in CPU QOM conversion

2013-03-22 Thread Alexander Graf
From: David Gibson Commit 259186a7d2f7184efc96ae99bc5658e6159f53ad "cpu: Move halted and interrupt_request fields to CPUState" broke the pseries machine. That's because it uses CPU() instead of ENV_GET_CPU() to convert from the global first_cpu pointer (still a CPUArchState) to a CPUState. This

Re: [Qemu-devel] [PATCH 14/26] hw/usb/dev-smartcard-reader.c: white space fixes

2013-03-22 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 16/26] hw/usb/dev-smartcard-reader.c: remove aborts (never triggered, but just in case)

2013-03-22 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau -- Marc-André Lureau

[Qemu-devel] qemu / seabios ACPI table interface

2013-03-22 Thread Laszlo Ersek
I'm confused. What are the requirements? (1) should unpatched qemu work with patched seabios? (2) should patched qemu work with unpatched seabios? Considering patched qemu + patched seabios, (3) should qemu dynamically control table origin/contents per table? (4) should qemu be able to suppress/d

[Qemu-devel] [PATCH V10 12/17] hmp: add function hmp_info_snapshots()

2013-03-22 Thread Wenchao Xia
This function will simply call qmp interface qmp_query_snapshots() added in last commit and then dump information in monitor console. To get snapshot info, Now qemu and qemu-img both call block layer function bdrv_query_snapshot_info_list() in their calling path, and then they just translate th

[Qemu-devel] [PATCH 02/58] pseries: Remove "busname" property for PCI host bridge

2013-03-22 Thread Alexander Graf
From: David Gibson Currently the "spapr-pci-host-bridge" device has a "busname" property which can be used to override the default assignment of qbus names for the bus subordinate to the PHB. We use that for the default primary PCI bus, to make libvirt happy, which expects there to be a bus name

[Qemu-devel] [PATCH V10 16/17] hmp: show ImageInfo in 'info block'

2013-03-22 Thread Wenchao Xia
Now human monitor can show image details include internal snapshot info for every block device. Signed-off-by: Wenchao Xia --- hmp.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/hmp.c b/hmp.c index c475d65..49f851b 100644 --- a/hmp.c +++ b/hmp.c

Re: [Qemu-devel] [PATCH 19/26] hw/usb/dev-smartcard-reader.c: dwFeadvertise support for T=0 only

2013-03-22 Thread Marc-André Lureau
Here you could merge with the one where you changed default T=0. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-22 Thread Gerd Hoffmann
Hi, > Okay, let's use your example here with a standard UART. In the > following sequence, I should receive: > > 1) Starts guest > 2) When guest initializes the UART, qemu_chr_fe_open() > 3) Reboot guest > 4) Receive qemu_chr_fe_close() > 5) Boot new guest without a UART driver > 6) Nothing is

Re: [Qemu-devel] [PATCH 18/26] hw/usb/dev-smartcard-reader.c: copy atr's protocol to ccid's parameters (adds todo's)

2013-03-22 Thread Marc-André Lureau
Hi, On Mon, Mar 18, 2013 at 2:11 PM, Alon Levy wrote: > +if (atr_protocol_num == 0) { > +DPRINTF(s, D_WARN, "%s: error: unimplemented ATR T0 parameters" > +" setting\n", __func__); > +t0->bmFindexDindex = 0; > +t0->bmTCCKST0 = 0; > +t0->bGuardT

Re: [Qemu-devel] [PATCH 13/26] ccid-card-passthru, dev-smartcard-reader: add debug environment variables

2013-03-22 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2013 at 2:10 PM, Alon Levy wrote: > From: Alon Levy > > This overrides whatever debug value is set on the corresponding devices > from the command line, and is meant to ease the usage with any > management stack. For libvirt you can set environment variables by > extending the

[Qemu-devel] [PATCH] hw/arm_mptimer: Save the timer state

2013-03-22 Thread Peter Maydell
Add a missing VMSTATE_TIMER() entry to the arm_mptimer vmstate description; this omission meant that we would probably hang on reload when the timer failed to fire. Signed-off-by: Peter Maydell --- hw/arm_mptimer.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ar

Re: [Qemu-devel] [PATCH 3/4] check-qjson: Test noncharacters other than U+FFFE, U+FFFF in strings

2013-03-22 Thread Laszlo Ersek
On 03/22/13 15:37, Markus Armbruster wrote: > Laszlo Ersek writes: > >> On 03/14/13 18:49, Markus Armbruster wrote: >>> These are all broken, too. >> >> What are "these"? And how are they broken? And how does the patch fix them? > > "These" refers to the subject: noncharacters other than U+FFFE,

[Qemu-devel] [PATCH V10 07/17] block: add image info query function bdrv_query_image_info()

2013-03-22 Thread Wenchao Xia
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- block/qapi.c

Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread Peter Maydell
On 22 March 2013 15:19, wrote: > It doesn't make sense to switch compilers because this does build, so I will > either find time to take a stab at moving things out of translate.c Note that we've had problems with several different target-*/translate.c; I think the problem is simply that gcc inl

[Qemu-devel] [PATCH V10 17/17] hmp: add parameter device and -b for info block

2013-03-22 Thread Wenchao Xia
With these parameters, user can choose the information to be showed, to avoid message flood in the montior. Signed-off-by: Wenchao Xia --- hmp.c |7 ++- monitor.c |7 --- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hmp.c b/hmp.c index 49f851b..3a2ba54 10

Re: [Qemu-devel] [PATCH] pcie: Enhance PCIe links

2013-03-22 Thread Alex Williamson
On Thu, 2013-03-21 at 18:56 +0200, Michael S. Tsirkin wrote: > On Tue, Mar 19, 2013 at 04:24:47PM -0600, Alex Williamson wrote: > > Enable PCIe devices to negotiate links. This upgrades our root ports > > and switches to advertising x16, 8.0GT/s and negotiates the current > > link status to the be

Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread qemu-devel
Penned by ? (Wei-Ren Chen) on 20130322 2:30.14, we have: | > Still no joy: | > | > PID USERNAME PRI NICE SIZE RES STATE WAIT TIMECPU COMMAND | > 21212 todd -5 20 1142M 118M sleep/0 - 1:03 37.30% cc1 | > | > cc -I. -I/home/todd/git/sw

[Qemu-devel] [PATCH V10 15/17] block: dump to buffer for bdrv_image_info_dump()

2013-03-22 Thread Wenchao Xia
This allow hmp use this function, just like qemu-img. It also returns a pointer now to make it easy to use. Signed-off-by: Wenchao Xia --- block/qapi.c | 67 +++-- include/block/qapi.h |2 +- qemu-img.c |6 +++- 3 files ch

[Qemu-devel] [PATCH 7/8] gitignore: ignore more files

2013-03-22 Thread Stefan Hajnoczi
From: liguang ignore *.patch, *.gcda, *.gcno Signed-off-by: liguang Reviewed-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 27ad002..9c234a3 100644 --- a/.gitignore +++ b/.gitignore @@ -80,

[Qemu-devel] [PATCH 8/8] qdev: remove redundant abort()

2013-03-22 Thread Stefan Hajnoczi
From: liguang Reviewed-by: Andreas Färber Signed-off-by: liguang Signed-off-by: Stefan Hajnoczi --- hw/qdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 0b20280..708a058 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -117,11 +117,10 @@ DeviceS

[Qemu-devel] [PATCH 3/8] Advertise --libdir in configure --help output

2013-03-22 Thread Stefan Hajnoczi
From: Doug Goldstein The configure script allows you to supply a libdir via --libdir but was not advertising this in --help. Signed-off-by: Doug Goldstein CC: qemu-triv...@nongnu.org Signed-off-by: Stefan Hajnoczi --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/c

[Qemu-devel] [PATCH 4/8] Fix typos and misspellings

2013-03-22 Thread Stefan Hajnoczi
From: Peter Maydell Fix various typos and misspellings. The bulk of these were found with codespell. Signed-off-by: Peter Maydell Reviewed-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- docs/usb-storage.txt | 4 ++-- hw/arm-misc.h| 2 +- hw/pci/pci_host.c| 2 +- h

[Qemu-devel] [PATCH 6/8] Use proper term in TCG README

2013-03-22 Thread Stefan Hajnoczi
From: 陳韋任 (Wei-Ren Chen) In TCG, "target" means the host architecture for which TCG generates the code. Using "guest" rather than "target" to make the document more consistent. Signed-off-by: Chen Wei-Ren Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- tcg/README | 14 +++

[Qemu-devel] [PATCH 5/8] serial: Fix debug format strings

2013-03-22 Thread Stefan Hajnoczi
From: Kevin Wolf This fixes the build of hw/serial.c with DEBUG_SERIAL enabled. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- hw/serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/serial.c b/hw/serial.c index 48a5eb6..0ccc499 100644 --- a/hw/ser

[Qemu-devel] [PATCH 2/8] memory: fix a bug of detection of memory region collision

2013-03-22 Thread Stefan Hajnoczi
From: Hu Tao The collision reports before and after this patch are: before: warning: subregion collision cfc/4 (pci-conf-data) vs cf8/4 (pci-conf-idx) warning: subregion collision 800/f800 (pci-hole) vs 0/800 (ram-below-4g) warning: subregion collision 1/4000 (p

[Qemu-devel] [PATCH 1/8] MinGW: Replace setsockopt by qemu_setsocketopt

2013-03-22 Thread Stefan Hajnoczi
From: Stefan Weil Instead of adding missing type casts which are needed by MinGW for the 4th argument, the patch uses qemu_setsockopt which was invented for this purpose. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- bt-host.c | 2 +- gdbstub.c | 2 +- ne

[Qemu-devel] [PULL 0/8] Trivial patches for 9 to 22 March 2013

2013-03-22 Thread Stefan Hajnoczi
The following changes since commit afed26082219b49443193b4ac32d113bbcf967fd: microblaze: Ignore non-cpu accesses to unmapped areas (2013-03-19 17:34:47 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git trivial-patches for you to fetch changes up to 01ed1d527

Re: [Qemu-devel] [PATCH] gitignore: ignore more files

2013-03-22 Thread Stefan Hajnoczi
On Fri, Mar 22, 2013 at 04:44:13PM +0800, liguang wrote: > ignore *.patch, *.gcda, *.gcno > > Signed-off-by: liguang > --- > .gitignore |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) Merged this and the next patch you sent. Thanks, applied to the trivial patches tree: https://g

[Qemu-devel] [PULL 00/58] ppc patch queue 2013-03-22

2013-03-22 Thread Alexander Graf
Hi Blue / Aurelien, This is my current patch queue for ppc. Please pull. Alex The following changes since commit afed26082219b49443193b4ac32d113bbcf967fd: Edgar E. Iglesias (1): microblaze: Ignore non-cpu accesses to unmapped areas are available in the git repository at: git://gi

Re: [Qemu-devel] [PATCH v3] Use proper term in TCG README

2013-03-22 Thread Stefan Hajnoczi
On Wed, Mar 20, 2013 at 11:42:08AM +0800, 陳韋任 (Wei-Ren Chen) wrote: > In TCG, "target" means the host architecture for which TCG generates > the code. Using "guest" rather than "target" to make the document more > consistent. > > Signed-off-by: Chen Wei-Ren > --- > v3: Adopt Peter's suggestion

  1   2   3   >