[Qemu-devel] [PATCH] qmp/hmp: add support for system_suspend

2015-11-27 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for system_suspend command. Signed-off-by: Chen Hanxiao --- hmp-commands.hx | 14 ++ hmp.c | 5 + hmp.h | 1 + qmp.c | 5 + 4 files changed, 25

Re: [Qemu-devel] [PATCH v2 03/21] mirror: Error out when a BDS would get two BBs

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > bdrv_replace_in_backing_chain() asserts that not both old and new > BlockDdriverState have a BlockBackend attached to them because both > would have to end up pointing to the new BDS and we don't support more > than one BB per BDS yet. > > Before we can

[Qemu-devel] [PATCH v2] bt: check struct sizes

2015-11-27 Thread Paolo Bonzini
See http://permalink.gmane.org/gmane.linux.bluez.kernel/36505. For historical reasons these do not use sizeof, and Coverity caught a mistake in EVT_ENCRYPT_CHANGE_SIZE. Note other sizes that seem wrong or inconsistent with the kernel header. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [for-2.6 PATCH 2/2] pc: Add pc-*-2.6 machine classes

2015-11-27 Thread Eduardo Habkost
On Fri, Nov 27, 2015 at 03:11:50PM -0200, Eduardo Habkost wrote: > Add pc-i440fx-2.6 and pc-q35-2.6 machine classes. > > Signed-off-by: Eduardo Habkost Oops, this is broken. I forgot to commit a build fix, please ignore. I will submit v2. -- Eduardo

Re: [Qemu-devel] MinGW build

2015-11-27 Thread Peter Maydell
On 28 November 2014 at 07:14, Stefan Weil wrote: > The libvixl code is correct, but the C++ compiler would need to be > fixed. Here are some examples: > > disas/libvixl/a64/disasm-a64.cc:1340:57: warning: unknown conversion > type character ‘l’ in format [-Wformat] >

Re: [Qemu-devel] [PATCH v2 14/21] blockdev: Set 'format' indicates non-empty drive

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > Creating an empty drive while specifying 'format' doesn't make sense. > The specified format driver would simply be ignored. > > Make a set 'format' option an indication that a non-empty drive should > be created. This makes 'format' consistent with

Re: [Qemu-devel] [RESEND RFC 4/6] device_tree: introduce qemu_fdt_getprop_optional

2015-11-27 Thread Peter Crosthwaite
On Thu, Nov 19, 2015 at 7:22 AM, Eric Auger wrote: > Current qemu_fdt_getprop exits if the property is not found. It is > sometimes needed to read an optional property, in which case we do > not wish to exit but simply returns a null value. > > This is what this new

Re: [Qemu-devel] [PATCH v2 17/21] block: Move cache options into options QDict

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > This adds the cache mode options to the QDict, so that they can be > specified for child nodes (e.g. backing.cache.direct=off). > > The cache modes are not removed from the flags at this point; instead, > options and flags are kept in sync. If the user

Re: [Qemu-devel] [PATCH v2 18/21] blkdebug: Enable reopen

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > Just reopening the children (as block.c does now) is enough. > > Signed-off-by: Kevin Wolf > --- > block/blkdebug.c | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by: Max Reitz signature.asc Description:

Re: [Qemu-devel] [RFC PATCH v3 4/5] kvm_arm: Implement support for ITS emulation by KVM

2015-11-27 Thread Peter Maydell
On 24 November 2015 at 10:13, Pavel Fedin wrote: > This patch relies on new kernel API which is not released yet. > > Signed-off-by: Pavel Fedin > --- > hw/intc/Makefile.objs | 1 + > hw/intc/arm_gicv3_its_common.c | 2 +- >

Re: [Qemu-devel] [SeaBIOS] bug: incorrect uuid in seabios output

2015-11-27 Thread Eduardo Habkost
On Thu, Nov 26, 2015 at 07:40:10PM +0100, Laszlo Ersek wrote: > On 11/26/15 08:43, Gerd Hoffmann wrote: > > On Di, 2015-11-24 at 11:55 -0500, Cole Robinson wrote: > >> Hi, > >> > >> The UUID seabios reports in its boot output doesn't match what is passed > >> via > >> qemu -uuid option. An

Re: [Qemu-devel] [PATCH V3 0/3] hw/pcie: Multi-root support for Q35

2015-11-27 Thread Igor Mammedov
On Thu, 26 Nov 2015 20:35:59 +0200 Marcel Apfelbaum wrote: > On 11/26/2015 07:01 PM, Laszlo Ersek wrote: > > Hello Marcel, > > > > On 11/26/15 17:00, Marcel Apfelbaum wrote: > >> Note: > >> I took the liberty to CC all the reviewers that took their time > >> and had a look on

Re: [Qemu-devel] [PATCH v3 8/8] hw/arm/virt: Add gpio-keys node for Poweroff using DT

2015-11-27 Thread Peter Maydell
On 16 November 2015 at 13:23, wrote: > From: Shannon Zhao > > Add a gpio-keys node. This is used for Poweroff for the systems which > use DT not ACPI. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao

Re: [Qemu-devel] [PATCH v2 04/21] block: Allow references for backing files

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > For bs->file, using references to existing BDSes has been possible for a > while already. This patch enables the same for bs->backing_hd. It's just "backing" now (instead of "backing_hd"). > > Signed-off-by: Kevin Wolf > --- > block.c

Re: [Qemu-devel] [PATCH v2 13/21] block: Introduce bs->explicit_options

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > bs->options doesn't only contain options that the user explicitly > requested, but also option that were derived from flags, the filename or > inherited from the parent node. > > For reopen, it is important to know the difference because reopening the >

[Qemu-devel] [PATCH v3 5/5] crypto: add support for loading encrypted x509 keys

2015-11-27 Thread Daniel P. Berrange
Make use of the QCryptoSecret object to support loading of encrypted x509 keys. The optional 'passwordid' parameter to the tls-creds-x509 object type, provides the ID of a secret object instance that holds the decryption password for the PEM file. # printf "123456" > mypasswd.txt # $QEMU \

[Qemu-devel] [PATCH v3 2/5] qemu-char: convert to use error checked base64 decode

2015-11-27 Thread Daniel P. Berrange
Switch from using g_base64_decode over to qbase64_decode in order to get error checking of the base64 input data. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qapi-schema.json | 2 -- qemu-char.c | 8 +++- qmp-commands.hx | 2

[Qemu-devel] [PATCH v3 3/5] qga: convert to use error checked base64 decode

2015-11-27 Thread Daniel P. Berrange
Switch from using g_base64_decode over to qbase64_decode in order to get error checking of the base64 input data. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qga/commands-posix.c | 11 +-- qga/commands-win32.c | 11 +--

Re: [Qemu-devel] [PATCH v6 20/21] iotests: add incremental backup failure recovery test

2015-11-27 Thread Kevin Wolf
Am 18.04.2015 um 01:50 hat John Snow geschrieben: > Test the failure case for incremental backups. > > Signed-off-by: John Snow > Reviewed-by: Max Reitz > --- > tests/qemu-iotests/124 | 57 > ++ >

Re: [Qemu-devel] [PATCH v2 06/21] block: Exclude nested options only for children in append_open_options()

2015-11-27 Thread Max Reitz
On 27.11.2015 18:58, Max Reitz wrote: > On 23.11.2015 16:59, Kevin Wolf wrote: >> Some drivers have nested options (e.g. blkdebug rule arrays), which >> don't belong to a child node and shouldn't be removed. Don't remove all >> options with "." in their name, but check for the complete prefixes of

[Qemu-devel] [for-2.6 PATCH v2 1/2] pc: Remove redundant code from pc-*-2.3 machine classes

2015-11-27 Thread Eduardo Habkost
Remove the redundant 'alias = NULL' and 'is_default = 0' lines from older machine-types. pc_*_2_4_machine_options() already clear those fields, so they don't need to be cleared by pc_*_2_3_machine_options(). Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 2 --

[Qemu-devel] [for-2.6 PATCH v2 2/2] pc: Add pc-*-2.6 machine classes

2015-11-27 Thread Eduardo Habkost
Add pc-i440fx-2.6 and pc-q35-2.6 machine classes. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Add missing backslash to PC_COMPAT_2_4 --- hw/i386/pc_piix.c| 16 +--- hw/i386/pc_q35.c | 13 +++-- include/hw/compat.h | 3 +++

Re: [Qemu-devel] [PATCH v2 12/21] block: Split out parse_json_protocol()

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > The next patch distinguishes options that were explicitly set and > options that were derived. bdrv_fill_option() added options of both > types: Options given by json: syntax should be counted as explicit, but > the rest is derived. > > In preparation for

Re: [Qemu-devel] target i386 compile problem for hw/core/nmi.c

2015-11-27 Thread Peter Maydell
On 27 November 2015 at 15:03, Tim Sander wrote: > We are trying to call "inject_nmi" from a device on a x386 target. > Unfortunatly it gets called with the wrong defines and the define > TARGET_I386 is *not* defined. If we define TARGET_I386 for testing > the code in the

Re: [Qemu-devel] [PATCH v2 0/8] Add system_powerdown support on ARM for ACPI and DT

2015-11-27 Thread Peter Maydell
On 29 October 2015 at 14:27, Shannon Zhao wrote: > ACPI SPEC 5.0 defines GPIO-signaled ACPI Events for Hardware-reduced > platforms(like ARM). It uses GPIO pin to trigger an event to the guest. > For QEMU, here we add PL061 GPIO controller and use PIN 3 for >

Re: [Qemu-devel] [PATCH 1/2] hw/ppc/spapr: Create pseries-2.6 machine

2015-11-27 Thread Thomas Huth
On 27/11/15 10:55, Alexander Graf wrote: > > On 27.11.15 10:32, Thomas Huth wrote: >> Add a new pseries-2.6 machine class version to make sure we can >> keep the old types compatible to previous versions of QEMU in >> later patches. >> >> Signed-off-by: Thomas Huth >> --- >>

Re: [Qemu-devel] [PATCH v2 06/21] block: Exclude nested options only for children in append_open_options()

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > Some drivers have nested options (e.g. blkdebug rule arrays), which > don't belong to a child node and shouldn't be removed. Don't remove all > options with "." in their name, but check for the complete prefixes of > actually existing child nodes. > >

Re: [Qemu-devel] [PATCH 8/8] block: Implement 'block_disconnect' HMP command

2015-11-27 Thread Eric Blake
On 11/27/2015 07:59 AM, Hannes Reinecke wrote: > Implement a 'block_disconnect' HMP command to simulate a device > communication / link failure. > > Signed-off-by: Hannes Reinecke > --- > +++ b/qapi/block-core.json > @@ -754,6 +754,27 @@ >

[Qemu-devel] [PATCH v3 0/5] Add framework for passing secrets to QEMU

2015-11-27 Thread Daniel P. Berrange
This small series contains just the first two patches for adding the secrets object to QEMU previously shown here: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04748.html The QCryptoSecret object provides a QOM object that allows passing secrets (passwords, encryption keys, etc) to

Re: [Qemu-devel] [PATCH for-2.5] bt: fix two struct sizes

2015-11-27 Thread Markus Armbruster
Paolo Bonzini writes: > On 27/11/2015 16:16, Markus Armbruster wrote: >> Since you also fix RESET_FAILED_CONTACT_COUNTER_RP_SIZE, I assume you >> checked them all. >> >> Reviewed-by: Markus Armbruster >>> > >>> > No, I just copied the

Re: [Qemu-devel] [PATCH] qmp/hmp: add support for system_suspend

2015-11-27 Thread Eric Blake
On 11/27/2015 08:15 AM, Chen Hanxiao wrote: > From: Chen Hanxiao > > This patch add support for system_suspend command. > > Signed-off-by: Chen Hanxiao > --- > hmp-commands.hx | 14 ++ > hmp.c | 5 + > hmp.h |

Re: [Qemu-devel] [PATCH 1/2] hw/ppc/spapr: Create pseries-2.6 machine

2015-11-27 Thread Eduardo Habkost
On Fri, Nov 27, 2015 at 06:18:30PM +0100, Thomas Huth wrote: > On 27/11/15 10:55, Alexander Graf wrote: > > > > On 27.11.15 10:32, Thomas Huth wrote: > >> Add a new pseries-2.6 machine class version to make sure we can > >> keep the old types compatible to previous versions of QEMU in > >> later

Re: [Qemu-devel] [PATCH v2 01/21] qcow2: Add .bdrv_join_options callback

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > qcow2 accepts a few driver-specific options that overlap semantically > (e.g. "overlap-check" is an alias of "overlap-check.template", and any > missing cache size option is derived from the given ones). > > When bdrv_reopen() merges the set of updated

Re: [Qemu-devel] MinGW build

2015-11-27 Thread Stefan Weil
Am 27.11.2015 um 19:49 schrieb Peter Maydell: > On 28 November 2014 at 07:14, Stefan Weil wrote: >> The libvixl code is correct, but the C++ compiler would need to be >> fixed. Here are some examples: >> >> disas/libvixl/a64/disasm-a64.cc:1340:57: warning: unknown conversion >>

Re: [Qemu-devel] [PATCH v9] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-11-27 Thread Programmingkid
On Nov 25, 2015, at 11:23 PM, Eric Blake wrote: > On 11/25/2015 09:10 PM, Programmingkid wrote: >> Mac OS X can be picky when it comes to allowing the user >> to use physical devices in QEMU. Most mounted volumes >> appear to be off limits to QEMU. If an issue is detected, >> a message is

Re: [Qemu-devel] [PATCH v4 3/3] i.MX: Add an i.MX25 specific CCM class/instance.

2015-11-27 Thread Jean-Christophe DUBOIS
Le 27/11/2015 03:39, Peter Crosthwaite a écrit : On Wed, Nov 25, 2015 at 11:16 PM, Jean-Christophe Dubois wrote: Signed-off-by: Jean-Christophe Dubois This seems to slow down boot performance for i.MX25 Linux. Admittedly, the issue looks to be in

Re: [Qemu-devel] [RFC PATCH v3 3/5] kvm_arm: Pass requester ID to MSI routing functions

2015-11-27 Thread Peter Maydell
On 24 November 2015 at 10:13, Pavel Fedin wrote: > Introduce global kvm_arm_msi_use_devid flag and pass device IDs in > kvm_arch_fixup_msi_route(). Device IDs are required by the ITS. > > Signed-off-by: Pavel Fedin > --- > target-arm/kvm.c | 6

Re: [Qemu-devel] [PATCH for-2.5] bt: fix two struct sizes

2015-11-27 Thread Paolo Bonzini
On 27/11/2015 16:16, Markus Armbruster wrote: >>> >> Since you also fix RESET_FAILED_CONTACT_COUNTER_RP_SIZE, I assume you >>> >> checked them all. >>> >> >>> >> Reviewed-by: Markus Armbruster >> > >> > No, I just copied the upstream bluez patch. > At least

[Qemu-devel] [PATCH v3 4/5] crypto: add QCryptoSecret object class for password/key handling

2015-11-27 Thread Daniel P. Berrange
Introduce a new QCryptoSecret object class which will be used for providing passwords and keys to other objects which need sensitive credentials. The new object can provide secret values directly as properties, or indirectly via a file. The latter includes support for file descriptor passing

[Qemu-devel] [PATCH v3 1/5] util: add base64 decoding function

2015-11-27 Thread Daniel P. Berrange
The standard glib provided g_base64_decode doesn't provide any kind of sensible error checking on its input. Add a QEMU custom wrapper qbase64_decode which can be used with untrustworthy input that can contain invalid base64 characters, embedded NUL characters, or not be NUL terminated at all.

[Qemu-devel] [PATCH] virtio-net: Make virtio queue sizes configurable

2015-11-27 Thread Patrik Hermansson
This patch adds the option to specify virtio queue sizes. Currently the queue sizes is hard coded to 256, which might not be suitable for all types of applications. This patch makes it possible to specify the queue size between 256 to 1024. The minimum value is chosen based on the current sizes

[Qemu-devel] [for-2.6 PATCH 2/2] pc: Add pc-*-2.6 machine classes

2015-11-27 Thread Eduardo Habkost
Add pc-i440fx-2.6 and pc-q35-2.6 machine classes. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 16 +--- hw/i386/pc_q35.c | 13 +++-- include/hw/compat.h | 3 +++ include/hw/i386/pc.h | 4 4 files changed, 31 insertions(+), 5

[Qemu-devel] [for-2.6 PATCH 1/2] pc: Remove redundant code from pc-*-2.3 machine classes

2015-11-27 Thread Eduardo Habkost
Remove the redundant 'alias = NULL' and 'is_default = 0' lines from older machine-types. pc_*_2_4_machine_options() already clear those fields, so they don't need to be cleared by pc_*_2_3_machine_options(). Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 2 --

[Qemu-devel] [for-2.6 PATCH 0/2] pc: Add pc-*-2.6 machine classes

2015-11-27 Thread Eduardo Habkost
I am sending this earlier so it can be queued and used as base for patches that need to add compat code to the pc-2.5 machine types. Eduardo Habkost (2): pc: Remove redundant code from pc-*-2.3 machine classes pc: Add pc-*-2.6 machine classes hw/i386/pc_piix.c| 18 +-

Re: [Qemu-devel] [PATCH v1 2/7] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-27 Thread KY Srinivasan
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Friday, November 27, 2015 1:35 AM > To: Andrey Smetanin ; k...@vger.kernel.org > Cc: Gleb Natapov ; KY Srinivasan

[Qemu-devel] [ANNOUNCE] QEMU 2.5.0-rc2 is now available

2015-11-27 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the third release candidate for the QEMU 2.5 release. This release is meant for testing purposes and should not be used in a production environment. http://wiki.qemu.org/download/qemu-2.5.0-rc2.tar.bz2 You can help

Re: [Qemu-devel] [RFC PATCH v3 5/5] arm/virt: Add ITS to the virt board

2015-11-27 Thread Peter Maydell
On 24 November 2015 at 10:13, Pavel Fedin wrote: > If supported by the configuration, ITS will be added automatically. > > This patch also renames v2m_phandle to msi_phandle because it's now used > by both MSI implementations. > > Signed-off-by: Pavel Fedin

Re: [Qemu-devel] [PATCH for-2.5] bt: fix two struct sizes

2015-11-27 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> On 27/11/2015 16:16, Markus Armbruster wrote: > >> Since you also fix RESET_FAILED_CONTACT_COUNTER_RP_SIZE, I assume you > >> checked them all. > >> > >> Reviewed-by: Markus

Re: [Qemu-devel] [PATCH v1 1/7] drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header

2015-11-27 Thread KY Srinivasan
> -Original Message- > From: Andrey Smetanin [mailto:asmeta...@virtuozzo.com] > Sent: Wednesday, November 25, 2015 7:20 AM > To: k...@vger.kernel.org > Cc: Gleb Natapov ; Paolo Bonzini > ; KY Srinivasan ; Haiyang > Zhang

[Qemu-devel] [for-2.6 PATCH v2 0/2] pc: Add pc-*-2.6 machine classes

2015-11-27 Thread Eduardo Habkost
I am sending this earlier so it can be queued and used as base for patches that need to add compat code to the pc-2.5 machine types. Changes v1 -> v2: * Typo fix that I forgot to commit before submitting v1 Eduardo Habkost (2): pc: Remove redundant code from pc-*-2.3 machine classes pc: Add

Re: [Qemu-devel] [PATCH v2 11/21] block: Add infrastructure for option inheritance

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > Options are not actually inherited from the parent node yet, but this > commit lays the grounds for doing so. > > Signed-off-by: Kevin Wolf > --- > block.c | 52 > --- >

Re: [Qemu-devel] [PATCH v2 02/21] block: Fix reopen with semantically overlapping options

2015-11-27 Thread Max Reitz
On 23.11.2015 16:59, Kevin Wolf wrote: > This fixes bdrv_reopen() calls like the following one: > > qemu-io -c 'open -o overlap-check.template=all /tmp/test.qcow2' \ > -c 'reopen -o overlap-check=none' > > The approach taken so far would result in an options QDict that has both >

Re: [Qemu-devel] [PATCH V3 3/3] hw/i386: extend pxb query for all PC machines

2015-11-27 Thread Eduardo Habkost
On Thu, Nov 26, 2015 at 06:00:28PM +0200, Marcel Apfelbaum wrote: > Add bus property to PC machines and use it when looking > for primary PCI root bus (bus 0). > > Signed-off-by: Marcel Apfelbaum I can't pretend I have reviewed the q35 part, but the changes are an improvement

Re: [Qemu-devel] [PATCH for-2.5] bt: fix two struct sizes

2015-11-27 Thread Paolo Bonzini
On 27/11/2015 18:08, Markus Armbruster wrote: >> > evt_encrypt_change 4 5 > Used in bt_hci_event_encrypt_change(). I figure it makes bt_hci_event() > overrun the destination by one byte. Yes, and Coverity complains. > Kernel has > > struct hci_ev_encrypt_change {

Re: [Qemu-devel] [PATCH for-2.5] bt: fix two struct sizes

2015-11-27 Thread Markus Armbruster
Paolo Bonzini writes: > On 27/11/2015 18:08, Markus Armbruster wrote: >>> > evt_encrypt_change 4 5 >> Used in bt_hci_event_encrypt_change(). I figure it makes bt_hci_event() >> overrun the destination by one byte. > > Yes, and Coverity complains. >

Re: [Qemu-devel] [PATCH v2 3/8] dump-guest-memory: add basic "detach" support.

2015-11-27 Thread Peter Xu
On Fri, Nov 27, 2015 at 11:14:17AM +0100, Paolo Bonzini wrote: > > > On 27/11/2015 07:27, Peter Xu wrote: > > If embed the mr pointer into GuestPhyBlock, then we might need to > > ref/unref one MemoryRegion for multiple times (and I am not sure how > > many, maybe it could be a very big number

Re: [Qemu-devel] [PATCH v1 2/7] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-27 Thread Andrey Smetanin
On 11/27/2015 12:34 PM, Paolo Bonzini wrote: On 25/11/2015 16:20, Andrey Smetanin wrote: This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey

Re: [Qemu-devel] [PATCH v2 3/8] dump-guest-memory: add basic "detach" support.

2015-11-27 Thread Peter Xu
On Fri, Nov 27, 2015 at 11:31:00AM +0100, Paolo Bonzini wrote: > [snip] > > + > > +static GlobalDumpState *dump_state_get_global(void) > > +{ > > +static bool init = false; > > +static GlobalDumpState global_dump_state; > > +if (unlikely(!init)) { > > +

Re: [Qemu-devel] [PATCH v2 5/8] dump-query: add "dump-query" command to query dump status

2015-11-27 Thread Peter Xu
On Fri, Nov 27, 2015 at 11:17:52AM +0100, Paolo Bonzini wrote: > > > On 27/11/2015 08:03, Peter Xu wrote: > > > > +{ 'struct': 'DumpStatus', > > > > + 'data': { 'status': 'str', 'percentage': 'str' } } > > > > > > I suggest using enum for "status" and int for "percentage" (or two ints > > >

[Qemu-devel] [PATCH for-2.5] virtio-9p: use QEMU thread pool

2015-11-27 Thread Paolo Bonzini
The QEMU thread pool already has a mechanism to invoke callbacks in the main thread. It does not need an EventNotifier and it is more efficient too. Use it instead of GAsyncQueue + GThreadPool + glue. As a side effect, it silences Coverity's complaint about an unchecked return value for

Re: [Qemu-devel] [PATCH COLO-Frame v11 35/39] filter-buffer: Accept zero interval

2015-11-27 Thread Yang Hongyang
On 2015年11月24日 17:25, zhanghailiang wrote: For default buffer filter, its 'interval' value is zero, so here we should accept zero interval. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang

[Qemu-devel] [PATCH for-2.5] fsdev-proxy-helper: avoid TOC/TOU race

2015-11-27 Thread Paolo Bonzini
There is a minor time of check/time of use race between statfs and chroot. It can be fixed easily by stat-ing the root after it has been changed. Signed-off-by: Paolo Bonzini --- fsdev/virtfs-proxy-helper.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[Qemu-devel] [PATCH 03/15] nbd: convert block client to use I/O channels for connection setup

2015-11-27 Thread Daniel P. Berrange
This converts the NBD block driver client to use the QIOChannelSocket class for initial connection setup. The NbdClientSession struct has two pointers, one to the master QIOChannelSocket providing the raw data channel, and one to a QIOChannel which is the current channel used for I/O. Initially

[Qemu-devel] [PATCH 06/15] nbd: convert to using I/O channels for actual socket I/O

2015-11-27 Thread Daniel P. Berrange
Now that all callers are converted to use I/O channels for initial connection setup, it is possible to switch the core NBD protocol handling core over to use QIOChannel APIs for acutal sockets I/O. Signed-off-by: Daniel P. Berrange --- block/nbd-client.c | 19 ++--

[Qemu-devel] [PATCH 11/15] nbd: pick first exported volume if no export name is requested

2015-11-27 Thread Daniel P. Berrange
The NBD client is currently only capable of using the new style protocol negotiation if an explicit export name is provided. This is a problem, because TLS support will require use of the new style protocol in all cases, and we wish to keep the export name as an optional request for backwards

[Qemu-devel] [PATCH 00/15] Implement TLS support to QEMU NBD server & client

2015-11-27 Thread Daniel P. Berrange
This series of patches implements support for TLS in the QEMU NBD server and client code. It is implementing the NBD_OPT_STARTTLS option that was previously discussed here: https://www.redhat.com/archives/libvir-list/2014-October/msg00506.html And is also described in the NBD spec here:

[Qemu-devel] [RFC PATCH 4/9] colo-proxy: add colo-proxy setup work

2015-11-27 Thread Zhang Chen
From: zhangchen Secondary setup socket server for colo-forward primary setup connect to secondary for colo-forward add data structure will be uesed Signed-off-by: zhangchen --- net/colo-proxy.c | 87

[Qemu-devel] [PATCH 15/15] nbd: enable use of TLS with nbd-server-start command

2015-11-27 Thread Daniel P. Berrange
This modifies the nbd-server-start QMP command so that it is possible to request use of TLS. This is done by adding a new optional parameter "tls-creds" which provides the ID of a previously created QCryptoTLSCreds object instance. TLS is only supported when using an IPv4/IPv6 socket listener.

[Qemu-devel] [RFC PATCH 2/9] jhash: add linux kernel jhashtable in qemu

2015-11-27 Thread Zhang Chen
From: zhangchen This used by colo-proxy to save and lookup connection info Signed-off-by: zhangchen --- include/qemu/jhash.h | 52 1 file changed, 52 insertions(+) create mode

[Qemu-devel] [RFC PATCH 1/9] Init colo-proxy object based on netfilter

2015-11-27 Thread Zhang Chen
From: zhangchen add colo-proxy in vl.c and qemu-options.hx Signed-off-by: zhangchen --- qemu-options.hx | 4 vl.c| 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx

[Qemu-devel] [RFC PATCH 5/9] net/colo-proxy: add colo packet handler

2015-11-27 Thread Zhang Chen
From: zhangchen add primary and secondary handler Signed-off-by: zhangchen --- net/colo-proxy.c | 105 +-- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [RFC PATCH 7/9] net/colo-proxy: add packet enqueue and handle function

2015-11-27 Thread Zhang Chen
From: zhangchen Add common packet handle function and enqueue packet distinguished connection,then we can lookup one connection packet to compare Signed-off-by: zhangchen --- net/colo-proxy.c | 167

Re: [Qemu-devel] [PATCH RFC] i2c-tiny-usb

2015-11-27 Thread Tim Sander
Hi Paolo Am Freitag, 27. November 2015, 10:32:25 schrieb Paolo Bonzini: > On 26/11/2015 17:35, Tim Sander wrote: > > Below is a patch implementing the i2c-tiny-usb device. > > I am currently not sure about the i2c semantics. I think > > incrementing the address on longer reads is wrong? > > Yes,

Re: [Qemu-devel] [PATCH for 2.5 1/1] e1000: fix hang of win2k12 shutdown with flood ping

2015-11-27 Thread Denis V. Lunev
On 11/27/2015 09:50 AM, Denis V. Lunev wrote: On 11/27/2015 09:48 AM, Denis V. Lunev wrote: e1000 driver in Win2k12 is really well rotten. It 100% hangs on shutdown of UP VM under flood ping. The guest checks card state and reinjects itself interrupt in a loop. This is fatal for UP machine.

Re: [Qemu-devel] [PATCH RFC] i2c-tiny-usb

2015-11-27 Thread Alex Bennée
Tim Sander writes: > Hi Alex > > Thanks for your feedback, answers as usual inline. > > Am Donnerstag, 26. November 2015, 18:07:35 schrieb Alex Bennée: >> Tim Sander writes: >> > Hi >> > >> You are missing a s-o-b line and scripts/checkpatch.pl

Re: [Qemu-devel] [PATCH v6 02/23] qapi: Require int64/uint64 implementation

2015-11-27 Thread Markus Armbruster
Eric Blake writes: > Now that all visitors supply both type_int64() and type_uint64() > callbacks, we can drop the redundant type_int() callback (the > public interface visit_type_int() remains, but calls into > type_int64() under the hood). > > Signed-off-by: Eric Blake

[Qemu-devel] [PATCH for-2.5] bt: avoid unintended sign extension

2015-11-27 Thread Paolo Bonzini
In the case of a 4-byte length, shifting a value by 24 may cause an unintended sign extension when converting from int to size_t. Use a uint32_t variable instead. Signed-off-by: Paolo Bonzini --- hw/bt/sdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH for-2.5] fsdev-proxy-helper: avoid TOC/TOU race

2015-11-27 Thread Greg Kurz
On Fri, 27 Nov 2015 12:43:05 +0100 Paolo Bonzini wrote: > There is a minor time of check/time of use race between statfs and chroot. > It can be fixed easily by stat-ing the root after it has been changed. > > Signed-off-by: Paolo Bonzini > ---

Re: [Qemu-devel] [PATCH v1 5/5] x86: Hyper-V SynIC timers test

2015-11-27 Thread Paolo Bonzini
On 27/11/2015 12:30, Andrey Smetanin wrote: >>> >>> + >>> +static void stimer_test_cleanup(void *ctx) >>> +{ >>> +irq_enable(); >> >> Why enable again? > I'll remove it. I guess you can remove the one in stimer_test_prepare too. If the interrupts are disabled you don't get the IPI either,

[Qemu-devel] [PATCH 09/15] nbd: make client request fixed new style if advertized

2015-11-27 Thread Daniel P. Berrange
If the server advertizes support for the fixed new style negotiation, the client should in turn enable new style. This will allow the client to negotiate further NBD options besides the export name. Signed-off-by: Daniel P. Berrange --- nbd.c | 27

[Qemu-devel] [PATCH 10/15] nbd: allow setting of an export name for qemu-nbd server

2015-11-27 Thread Daniel P. Berrange
The qemu-nbd server currently always uses the old style protocol since it never sets any export name. This is a problem because future TLS support will require use of the new style protocol negotiation. This adds a "--exportname NAME" argument to qemu-nbd which allows the user to set an explicit

[Qemu-devel] [PATCH 02/15] qemu-nbd: add support for --object command line arg

2015-11-27 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-nbd via a --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # echo -n letmein > mypasswd.txt # qemu-nbd --object

[Qemu-devel] [RFC PATCH 9/9] net/colo-proxy: add packet compare and notify checkpoint

2015-11-27 Thread Zhang Chen
From: zhangchen Lookup same connection's primary and secondary packet to compare,if same we will send primary packet and drop secondary packet,else send all of primary packets be queued,drop secondary queue and notify colo to do checkpoint Signed-off-by: zhangchen

Re: [Qemu-devel] [PATCH COLO-Frame v11 38/39] colo: Use default buffer-filter to buffer and release packets

2015-11-27 Thread Yang Hongyang
On 2015年11月24日 17:25, zhanghailiang wrote: Enable default filter to buffer packets and release the packets after a checkpoint. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v11: - Use new

Re: [Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-11-27 Thread Markus Armbruster
Eric Blake writes: > Commit 6c2f9a15 ensured that we would not return NULL when the > caller used an output visitor but had nothing to visit. But > in doing so, it added a FIXME about a reference count leak > that could abort qemu in the (unlikely) case of SIZE_MAX such >

Re: [Qemu-devel] [PATCH RFC] i2c-tiny-usb

2015-11-27 Thread Tim Sander
Am Freitag, 27. November 2015, 07:48:21 schrieb Gerd Hoffmann: > On Do, 2015-11-26 at 17:35 +0100, Tim Sander wrote: > > Hi > > > > Below is a patch implementing the i2c-tiny-usb device. > > Is there a specification for this kind of device? http://www.harbaum.org/till/i2c_tiny_usb/index.shtml >

Re: [Qemu-devel] [PATCH v1 0/5] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-11-27 Thread Andrey Smetanin
On 11/27/2015 02:17 PM, Paolo Bonzini wrote: On 26/11/2015 17:29, Andrey Smetanin wrote: The test checks Hyper-V SynIC timers functionality. The test runs on every vCPU and performs start/stop of periodic/one-shot timers (with period=1ms) and checks validity of received expiration messages

Re: [Qemu-devel] [PULL for-2.5 0/3] Net patches for 2.5

2015-11-27 Thread Peter Maydell
On 27 November 2015 at 03:12, Jason Wang wrote: > The following changes since commit b04fc428356a540fdb9065fa8c3c71ee476c2031: > > Update version for v2.5.0-rc2 release (2015-11-26 17:50:12 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v2 6/8] dump-query: implement "status" of "dump-query" command.

2015-11-27 Thread Peter Xu
On Fri, Nov 27, 2015 at 11:22:48AM +0100, Paolo Bonzini wrote: > > > On 27/11/2015 03:48, Peter Xu wrote: > > This patch implements the status changes inside dump process. When > > query dump status, three possible results could be: > > > > 1. never started dump: > > { "status": "NOT_STARTED",

[Qemu-devel] [PATCH for-2.5] bt: fix two struct sizes

2015-11-27 Thread Paolo Bonzini
See http://permalink.gmane.org/gmane.linux.bluez.kernel/36505. For historical reasons these do not use sizeof, and Coverity caught a mistake in EVT_ENCRYPT_CHANGE_SIZE. Signed-off-by: Paolo Bonzini --- include/hw/bt.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH 05/15] nbd: convert blockdev NBD server to use I/O channels for connection setup

2015-11-27 Thread Daniel P. Berrange
This converts the blockdev NBD server to use the QIOChannelSocket class for initial listener socket setup and accepting of client connections. Actual I/O is still being performed against the socket file descriptor using the POSIX socket APIs. Signed-off-by: Daniel P. Berrange

[Qemu-devel] [PATCH 01/15] qom: add user_creatable_add & user_creatable_del methods

2015-11-27 Thread Daniel P. Berrange
The QMP monitor code has two helper methods object_add and qmp_object_del that are called from several places in the code (QMP, HMP and main emulator startup). We soon need to use this code from qemu-img, qemu-io and qemu-nbd too, but don't want those to depend on the monitor. To avoid this,

[Qemu-devel] [PATCH 04/15] nbd: convert qemu-nbd server to use I/O channels for connection setup

2015-11-27 Thread Daniel P. Berrange
This converts the qemu-nbd server to use the QIOChannelSocket class for initial listener socket setup and accepting of client connections. Actual I/O is still being performed against the socket file descriptor using the POSIX socket APIs. In this initial conversion though, all I/O is still

[Qemu-devel] [PATCH 07/15] nbd: invert client logic for negotiating protocol version

2015-11-27 Thread Daniel P. Berrange
The nbd_receive_negotiate() method takes different code paths based on whether 'name == NULL', and then checks the expected protocol version in each branch. This patch inverts the logic, so that it takes different code paths based on what protocol version it receives and then checks if name is

[Qemu-devel] [RFC PATCH 3/9] colo-proxy: add colo-proxy framework

2015-11-27 Thread Zhang Chen
From: zhangchen Colo-proxy is a plugin of qemu netfilter like filter-buffer and dump Signed-off-by: zhangchen --- net/Makefile.objs | 1 + net/colo-proxy.c | 139 ++

[Qemu-devel] [PATCH 08/15] nbd: make server compliant with fixed newstyle spec

2015-11-27 Thread Daniel P. Berrange
If the client does not request the fixed new style protocol, then we should only accept NBD_OPT_EXPORT_NAME. All other options are only valid when fixed new style has been activated. The qemu-nbd client doesn't currently request fixed new style protocol, but this change won't break qemu-nbd,

[Qemu-devel] [RFC PATCH 6/9] net/colo-proxy: add packet forward function

2015-11-27 Thread Zhang Chen
From: zhangchen The packet recv by primary forward to secondary The packet send by secondary forward to primary Signed-off-by: zhangchen --- net/colo-proxy.c | 118 +-- 1 file

[Qemu-devel] [RFC PATCH 0/9] Add colo-proxy based on netfilter

2015-11-27 Thread Zhang Chen
Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM connect normal to Primary VM and compare packets sent by PVM to sent by SVM.if the packet difference,notify COLO do checkpoint

Re: [Qemu-devel] [PATCH RFC] i2c-tiny-usb

2015-11-27 Thread Paolo Bonzini
On 27/11/2015 13:39, Tim Sander wrote: > > I have one more thing, i2cdetect looks like this: > 0 1 2 3 4 5 6 7 8 9 a b c d e f > 00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f > 10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f > 20: 20 21 22 23 24 25 26 27 28 29 2a

Re: [Qemu-devel] [PATCH for-2.5] virtio-9p: use QEMU thread pool

2015-11-27 Thread Paolo Bonzini
On 27/11/2015 13:42, Greg Kurz wrote: > On Fri, 27 Nov 2015 12:43:06 +0100 > Paolo Bonzini wrote: > >> The QEMU thread pool already has a mechanism to invoke callbacks in the main >> thread. It does not need an EventNotifier and it is more efficient too. >> Use it instead

  1   2   >