[Qemu-devel] [PULL 2/2] net/net: properly handle multiple packets in net_fill_rstate()

2016-08-17 Thread Jason Wang
From: Zhang Chen When network is busy, we will receive multiple packets at one time. In that situation, we should keep trying to do the receiving instead of finalizing only the first packet. Signed-off-by: Zhang Chen Signed-off-by:

[Qemu-devel] [PULL 1/2] net: vmxnet: use g_new for pkt initialisation

2016-08-17 Thread Jason Wang
From: Li Qiang When network transport abstraction layer initialises pkt, the maximum fragmentation count is not checked. This could lead to an integer overflow causing a NULL pointer dereference. Replace g_malloc() with g_new() to catch the multiplication overflow.

[Qemu-devel] [PULL 0/2] Net patches

2016-08-17 Thread Jason Wang
The following changes since commit 5f0e775348082c355769a3df612e055abea61c06: Update version for v2.7.0-rc3 release (2016-08-16 17:34:30 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to

Re: [Qemu-devel] [PATCH V2] net/net: Bugfix for net_fill_rstate()

2016-08-17 Thread Jason Wang
On 2016年08月18日 11:23, Zhang Chen wrote: When network is busy, we will receive multiple packets at one time. In that situation, this bug will lost all packets except the first one. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian

[Qemu-devel] [PATCH v3 4/4] error-report: leverage error_report_abort()

2016-08-17 Thread Peter Xu
Two cases that can leverage error_report_abort(): Case 1: error_report(...); abort(); Case 2: error_setg(_abort, ...); This patch converts these cases to use error_report_abort(). Script error_report_abort.cocci is added to automate the convertion. Signed-off-by: Peter Xu

[Qemu-devel] [PATCH v3 2/4] error-report: provide error_report_abort()

2016-08-17 Thread Peter Xu
A twin for error_report_fatal(), for programming errors. Signed-off-by: Peter Xu --- include/qemu/error-report.h | 1 + util/qemu-error.c | 12 2 files changed, 13 insertions(+) diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h

[Qemu-devel] [PATCH v3 1/4] error-report: provide error_report_fatal()

2016-08-17 Thread Peter Xu
There are many places in current QEMU codes that needs to print some error and then quit QEMU. Provide a new function for it. Signed-off-by: Peter Xu --- include/qemu/error-report.h | 1 + util/qemu-error.c | 12 2 files changed, 13 insertions(+) diff

[Qemu-devel] [PATCH v3 0/4] Introduce error_report_{fatal|abort}

2016-08-17 Thread Peter Xu
v3 changes: - implement error_report_fatal using function [Markus] - provide error_report_abort as well in seperate patch [Markus, Fam] We have many use cases that first print some error messages, then quit (by either exit() or abort()). This series introduce two helper functions for that. The

Re: [Qemu-devel] [PATCH 3/6] e1000e: fix for migration compatibility

2016-08-17 Thread Dmitry Fleytman
Acked-by: Dmitry Fleytman > On 17 Aug 2016, at 17:39, Cao jin wrote: > > commit 66bf7d58 removed internal msi state flag E1000E_USE_MSI, but it > is used by intr_state which exists in vmstate. Restore it for migration > to older QEMU versions > >

Re: [Qemu-devel] [PATCH 4/6] e1000e: drop unnecessary funtions

2016-08-17 Thread Dmitry Fleytman
> On 17 Aug 2016, at 17:39, Cao jin wrote: > > Internal helper function: e1000e_init_msix(), e1000e_cleanup_msix() > is unnecessary, remove them all. Is there any reason to drop these functions? They exist to improve code readability and modularisation. > MSI-X

Re: [Qemu-devel] [PATCH v2] net: vmxnet: use g_new for pkt initialisation

2016-08-17 Thread Jason Wang
On 2016年08月16日 19:29, Dmitry Fleytman wrote: acked-by: Dmitry Fleytman On 16 Aug 2016, at 14:28, P J P wrote: From: Li Qiang When network transport abstraction layer initialises pkt, the maximum fragmentation count is not

[Qemu-devel] [PATCH V2] net/net: Bugfix for net_fill_rstate()

2016-08-17 Thread Zhang Chen
When network is busy, we will receive multiple packets at one time. In that situation, this bug will lost all packets except the first one. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian --- net/net.c | 8 1 file changed, 4

Re: [Qemu-devel] [PATCH] net/net: Bugfix for net_fill_rstate()

2016-08-17 Thread Zhang Chen
On 08/18/2016 09:31 AM, Li Zhijian wrote: /* * Returns * 0: SocketReadState is not ready * 1: SocketReadState is ready * otherwise error occurs */ int net_fill_rstate(SocketReadState *rs, const uint8_t *buf, int size) it seems you need to fix the returns and comments too. simply, just

Re: [Qemu-devel] [PATCH v5 0/4] ADB improvements

2016-08-17 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1471487270-1490-1-git-send-email-programmingk...@gmail.com Subject: [Qemu-devel] [PATCH v5 0/4] ADB improvements Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

[Qemu-devel] [PATCH v5 4/4] adb.c: prevent NO_KEY value from going to guest

2016-08-17 Thread John Arbuckle
The NO_KEY value should not be sent to the guest. This patch drops that value. Signed-off-by: John Arbuckle --- v5 changes: Added ADB_DPRINTF() call. v4 changes: Added NO_KEY related code to this patch. Added removal of "= 0" code near end of qcode_to_adb_keycode.

[Qemu-devel] [PATCH v5 3/4] adb.c: correct several key assignments

2016-08-17 Thread John Arbuckle
The original pc_to_adb_keycode mapping did have several keys that were incorrectly mapped. This patch fixes these mappings. Signed-off-by: John Arbuckle --- v4 changes: Removed NO_KEY related code. Kept all the "= 0" code near the end of the qcode_to_adb_keycode.

[Qemu-devel] [PATCH v5 2/4] adb.c: add support for QKeyCode

2016-08-17 Thread John Arbuckle
The old pc scancode translation is replaced with QEMU's QKeyCode. This is just a mechanical substitution, which a number of broken mappings left in. Signed-off-by: John Arbuckle --- *v5 changes Merged Power key patch with patch 2/4. Moved qemu_input_handler_register()

[Qemu-devel] [PATCH v5 0/4] ADB improvements

2016-08-17 Thread John Arbuckle
This patch series makes several improvements to the ADB code. To test this code, please implement the patches in the order below. John Arbuckle (4): adb-keys.h: initial commit adb.c: add support for QKeyCode adb.c: correct several key assignments adb.c: prevent NO_KEY value from going to

[Qemu-devel] [PATCH v5 1/4] adb-keys.h: initial commit

2016-08-17 Thread John Arbuckle
Add the adb-keys.h file. It maps ADB transition key codes with values. Signed-off-by: John Arbuckle --- *v5 changes: Uncommented ADB_KEY_POWER constant. *v4 changes: Replaced ADB_KEY_LEFT_COMAND and ADB_KEY_RIGHT_COMAND with ADB_KEY_COMMAND. *v3 changes: Removed

[Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt

2016-08-17 Thread Dou Liyang
This document describes how to use cpu hotplug in QEMU. Signed-off-by: Dou Liyang Reviewed-by: Andrew Jones --- Change log v6 -> v7 From Bharata's advice 1. add "qom_path" property explanation for "info hotpluggable-cpus" command

Re: [Qemu-devel] [PATCH] net/net: Bugfix for net_fill_rstate()

2016-08-17 Thread Li Zhijian
/* * Returns * 0: SocketReadState is not ready * 1: SocketReadState is ready * otherwise error occurs */ int net_fill_rstate(SocketReadState *rs, const uint8_t *buf, int size) it seems you need to fix the returns and comments too. simply, just remove the 'return 1;' would be OK ? because

Re: [Qemu-devel] [PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-08-17 Thread Li, Liang Z
Hi Michael, Could you help to review this version when you have time? Thanks! Liang > -Original Message- > From: Li, Liang Z > Sent: Monday, August 08, 2016 2:35 PM > To: linux-ker...@vger.kernel.org > Cc: virtualizat...@lists.linux-foundation.org; linux...@kvack.org; virtio- >

Re: [Qemu-devel] [FIX PATCH] spapr: Gracefully fail CPU thread unplug

2016-08-17 Thread David Gibson
On Wed, Aug 17, 2016 at 07:31:38PM +0530, Bharata B Rao wrote: > sPAPR supports only Core level CPU plug and unplug, but nothing > prevents user from issuing a device_del on the underlying thread > device by using its qom path directly. This hits g_assert(hotplug_ctrl) > in qdev_unplug(). > >

Re: [Qemu-devel] [PATCH v6] docs: add cpu-hotplug.txt

2016-08-17 Thread Dou Liyang
Hi Bharata, At 08/17/2016 09:47 PM, Bharata B Rao wrote: On Wed, Aug 17, 2016 at 03:01:06PM +0800, Dou Liyang wrote: This document describes how to use cpu hotplug in QEMU. +lists all hot-pluggable CPUs. Such as this: lists all CPUs including the present and possible hot-pluggable CPUs. +

[Qemu-devel] [PATCH v16 07/10] target-avr: adding instruction translation

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/Makefile.objs|1 + target-avr/translate-inst.c | 2641 +++ target-avr/translate.h |1 + 3 files changed, 2643 insertions(+) create mode 100644 target-avr/translate-inst.c

[Qemu-devel] [PATCH v16 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/cpu.h | 10 ++ target-avr/helper.c| 256 - target-avr/helper.h| 7 ++ target-avr/translate.c | 8 ++ 4 files changed, 277 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v16 04/10] target-avr: adding instructions encodings

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/translate-inst.h | 805 1 file changed, 805 insertions(+) create mode 100644 target-avr/translate-inst.h diff --git a/target-avr/translate-inst.h b/target-avr/translate-inst.h new file

[Qemu-devel] [PATCH v16 09/10] target-avr: adding instruction decoder

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/Makefile.objs | 1 + target-avr/decode.c | 693 +++ target-avr/translate.c | 2 + 3 files changed, 696 insertions(+) create mode 100644 target-avr/decode.c diff --git

[Qemu-devel] [PATCH v16 05/10] target-avr: adding AVR interrupt handling

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/helper.c | 55 + 1 file changed, 55 insertions(+) diff --git a/target-avr/helper.c b/target-avr/helper.c index b48222d..8511fb7 100644 --- a/target-avr/helper.c +++

[Qemu-devel] [PATCH v16 03/10] target-avr: adding a sample AVR board

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- MAINTAINERS | 1 + hw/avr/Makefile.objs | 21 ++ hw/avr/sample.c | 112 +++ 3 files changed, 134 insertions(+) create mode 100644 hw/avr/Makefile.objs create mode

[Qemu-devel] [PATCH v16 08/10] target-avr: instruction decoder generator

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/cpugen/CMakeLists.txt | 38 +++ target-avr/cpugen/README.md| 17 ++ target-avr/cpugen/cpu/avr.yaml | 214 ++ target-avr/cpugen/src/CMakeLists.txt | 63

[Qemu-devel] [PATCH v16 02/10] target-avr: adding AVR CPU features/flavors

2016-08-17 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/cpu.c | 311 +++ target-avr/cpu.h | 48 + 2 files changed, 359 insertions(+) diff --git a/target-avr/cpu.c b/target-avr/cpu.c index e99f804..d817266 100644 ---

[Qemu-devel] [PATCH v16 01/10] target-avr: AVR cores support is added.

2016-08-17 Thread Michael Rolnik
1. basic CPU structure 2. registers 3. no instructions 4. saving sreg, rampD, rampX, rampY, rampD, eind in HW representation Signed-off-by: Michael Rolnik --- MAINTAINERS | 5 + arch_init.c | 2 + configure

[Qemu-devel] [PATCH v16 00/10] 8bit AVR cores

2016-08-17 Thread Michael Rolnik
This series of patches adds 8bit AVR cores to QEMU. All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully tested yet. However I was able to execute simple code with functions. e.g fibonacci calculation. This series of patches include a non real, sample board. No fuses support

Re: [Qemu-devel] [PATCH v3 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-08-17 Thread ashish mittal
Thanks Paolo, and everyone else for the corrections :) I will try to fix it in a patch this week or the next. I referred to gluster.c implementation as it was closer to what we wanted to achieve i.e. passing multiple servers for the block device. I picked up the idea of referring to gluster.c

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-17 Thread Marek Vasut
On 08/17/2016 10:26 PM, Peter Maydell wrote: > On 17 August 2016 at 21:19, Marek Vasut wrote: >> On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: >>> If you would prefer to keep error'ing out, then I can suggest to add some >>> verbose message instead of the assertion, like: >>> >>>

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-17 Thread Peter Maydell
On 17 August 2016 at 21:19, Marek Vasut wrote: > On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: >> If you would prefer to keep error'ing out, then I can suggest to add some >> verbose message instead of the assertion, like: >> >> if (!t->freq_hz) { >> error_setg(errp,

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-17 Thread Marek Vasut
On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: [...] Well what is sane clock frequency for hardware which can have arbitrary frequency configured in ? >>> >>> You could set to the one that is used by "10M50 GHRD" patch for example. >> >> That doesn't sound right . I can set it to

[Qemu-devel] [PATCH v4] hw/misc: Add simple measurement hardware

2016-08-17 Thread Matthew Garrett
Trusted Boot is based around having a trusted store of measurement data and a secure communications channel between that store and an attestation target. In actual hardware, that's a TPM. Since the TPM can only be accessed via the host system, this in turn requires that the TPM be able to perform

[Qemu-devel] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-08-17 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v2.6.1 stable release is now available: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 v2.6.1 is now tagged in the official qemu.git repository, and the stable-2.6 branch has been updated accordingly:

Re: [Qemu-devel] [PATCH 2/2] syscall.c: Redefine IFLA_* enums

2016-08-17 Thread Michal Privoznik
On 17.08.2016 17:28, Laurent Vivier wrote: > > > Le 17/08/2016 à 15:49, Michal Privoznik a écrit : >> In 9c37146782 I've tried to fix a broken build with older >> linux-headers. However, I didn't do it properly. The solution >> implemented here is to grab the enums that caused the problem >>

Re: [Qemu-devel] [PATCH] aarch64: use TSX for ldrex/strex

2016-08-17 Thread Richard Henderson
On 08/17/2016 10:58 AM, Emilio G. Cota wrote: (2) that we should start a new TB upon encountering a load-exclusive, so that we maximize the chance of the store-exclusive being a part of the same TB and thus have *nothing* extra between the beginning and commit of the transaction. I don't know

Re: [Qemu-devel] [PATCH] aarch64: use TSX for ldrex/strex

2016-08-17 Thread Emilio G. Cota
On Wed, Aug 17, 2016 at 13:58:00 -0400, Emilio G. Cota wrote: > due to my glaring lack of TCG competence. A related note that might be of interest. I benchmarked an alternative implementation that *does* instrument stores. I wrapped every tcg_gen_qemu_st_i64 (those are enough, right?

[Qemu-devel] [PATCH 1/2] block: fix deadlock in bdrv_co_flush

2016-08-17 Thread Denis V. Lunev
From: Evgeny Yakovlev The following commit commit 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c Author: Evgeny Yakovlev Date: Mon Jul 18 22:39:52 2016 +0300 block: ignore flush requests when storage is clean has introduced a

[Qemu-devel] [PATCH 2/2] block: fix possible reorder of flush operations

2016-08-17 Thread Denis V. Lunev
This patch reduce CPU usage of flush operations a bit. When we have one flush completed we should kick only next operation. We should not start all pending operations in the hope that they will go back to wait on wait_queue. Also there is a technical possibility that requests will get reordered

[Qemu-devel] [PATCH for 2.7 0/2] block: fixes for deadlock in flush code

2016-08-17 Thread Denis V. Lunev
We have suffered from the following deadlock Thread 2 (Thread 0x7f1b7edf9700 (LWP 240293)): #0 0x7f1bd1f0675f in ppoll () from /lib64/libc.so.6 #1 0x7f1bd8c1d78b in ppoll (__ss=0x0, __timeout=0x0, __nfds=, __fds=) at /usr/include/bits/poll2.h:77 #2 qemu_poll_ns (fds=, nfds=,

Re: [Qemu-devel] [PATCH] aarch64: use TSX for ldrex/strex

2016-08-17 Thread Emilio G. Cota
On Wed, Aug 17, 2016 at 10:22:05 -0700, Richard Henderson wrote: > On 08/15/2016 08:49 AM, Emilio G. Cota wrote: > >+void HELPER(xbegin)(CPUARMState *env) > >+{ > >+uintptr_t ra = GETPC(); > >+int status; > >+int retries = 100; > >+ > >+ retry: > >+status = _xbegin(); > >+if

Re: [Qemu-devel] [PATCH v5 17/20] monitor: use qmp_dispatch()

2016-08-17 Thread Marc-André Lureau
Hi - Original Message - > Replace the old manual dispatch and validation code by the generic one > provided by qapi common code. > > Note that it is now possible to call the following commands that used to > be disabled by compile-time conditionals: > - dump-skeys > - query-spice > -

Re: [Qemu-devel] Help: Does Qemu support virtio-pci for net-device and disk device?

2016-08-17 Thread Laine Stump
On 08/17/2016 12:13 PM, Andrew Jones wrote: On Wed, Aug 17, 2016 at 08:08:11PM +0800, Kevin Zhao wrote: Hi all, Now I'm investigating net device hot plug and disk hotplug for AArch64. For virtio , the default address is virtio-mmio. After Libvirt 1.3.5, user can explicitly specify the

[Qemu-devel] [PATCH v5 19/20] qmp-commands.hx: fix some styling

2016-08-17 Thread Marc-André Lureau
Add some missing lines, remove superflous @ in command name, remove trailing spaces. Signed-off-by: Marc-André Lureau --- qmp-commands.hx | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/qmp-commands.hx

[Qemu-devel] [PATCH v5 18/20] build-sys: remove qmp-commands-old.h

2016-08-17 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- Makefile.target | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile.target b/Makefile.target index 0ba50ae..3b1f59f 100644 --- a/Makefile.target +++

Re: [Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2016-08-17 Thread Nish Aravamudan
On 17.08.2016 [13:12:19 -], Chris J Arges wrote: > Can you rebase your fix on 1:2.5+dfsg-5ubuntu10.4 (due to the > regression fix mentioned in #25)? Will do! > Another thing about your backport is that it dropped the qem2 bits > from the patch. Is there a reason for this? If so please

[Qemu-devel] [PATCH v5 14/20] monitor: remove mhandler.cmd_new

2016-08-17 Thread Marc-André Lureau
This is no longer necessary now that we aren't using middle mode anymore. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- monitor.c | 13 +-- docs/writing-qmp-commands.txt | 4 +- hmp-commands-info.hx

Re: [Qemu-devel] [PATCH] aarch64: use TSX for ldrex/strex

2016-08-17 Thread Richard Henderson
On 08/15/2016 08:49 AM, Emilio G. Cota wrote: +void HELPER(xbegin)(CPUARMState *env) +{ +uintptr_t ra = GETPC(); +int status; +int retries = 100; + + retry: +status = _xbegin(); +if (status != _XBEGIN_STARTED) { +if (status && retries) { +retries--; +

[Qemu-devel] [PATCH v5 12/20] monitor: use qmp_find_command() (using generated qapi code)

2016-08-17 Thread Marc-André Lureau
Stop using the so-called 'middle' mode. Instead, use qmp_find_command() from generated qapi commands registry. Update and fix the documentation too. Signed-off-by: Marc-André Lureau --- monitor.c | 10 ++- vl.c | 1 +

[Qemu-devel] [PATCH v5 13/20] monitor: implement 'qmp_query_commands' without qmp_cmds

2016-08-17 Thread Marc-André Lureau
One step towards getting rid of the static qmp_cmds table. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- monitor.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/monitor.c

[Qemu-devel] [PATCH v5 10/20] monitor: register gen:false commands manually

2016-08-17 Thread Marc-André Lureau
Since a few commands are using 'gen': false, they are not registered automatically by the generator. Register manually instead. This is in preparation for removal of qapi 'middle' mode generation. Note that qmp_init_marshal() function isn't run yet, so the commands aren't actually registered,

[Qemu-devel] [PATCH v5 17/20] monitor: use qmp_dispatch()

2016-08-17 Thread Marc-André Lureau
Replace the old manual dispatch and validation code by the generic one provided by qapi common code. Note that it is now possible to call the following commands that used to be disabled by compile-time conditionals: - dump-skeys - query-spice - rtc-reset-reinjection - query-gic-capabilities

[Qemu-devel] [PATCH v5 07/20] qapi-schema: use generated marshaller for 'qmp_capabilities'

2016-08-17 Thread Marc-André Lureau
qapi'fy the 'qmp_capabilities' command, makes the command visible in query-qmp-schema. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- monitor.c| 4 ++-- qapi-schema.json |

[Qemu-devel] [PATCH v5 11/20] qapi: export the marshallers

2016-08-17 Thread Marc-André Lureau
Make it possible to call marshallers manually, without going through qmp_dispatch(). (this is currently only possible in middle-mode, but it's also useful in general) Signed-off-by: Marc-André Lureau --- scripts/qapi-commands.py | 8 ++-- 1 file changed, 2

[Qemu-devel] [PATCH v5 20/20] Replace qmp-commands.hx by doc/qmp-commands.txt

2016-08-17 Thread Marc-André Lureau
The only remaining function of qmp-commands.hx is to let us generate qmp-commands.txt from it. Replace qmp-commands.hx by qmp-commands.txt. We intend to move the documentation into the QAPI schema and generate qapi-commands.txt from it, but not right now. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v5 15/20] qapi: remove the "middle" mode

2016-08-17 Thread Marc-André Lureau
Now that the register function is always generated, we can remove the so-called "middle" mode from the generator script. Signed-off-by: Marc-André Lureau --- scripts/qapi-commands.py | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH v5 05/20] qapi: configure the schema

2016-08-17 Thread Marc-André Lureau
Make parts of the qapi schema conditional based on host and target config. Remove the no longer needed fallback commands implementations. Signed-off-by: Marc-André Lureau --- hmp.c| 2 ++ monitor.c| 22 -- qmp.c

[Qemu-devel] [PATCH v5 08/20] qapi-schema: add 'device_add'

2016-08-17 Thread Marc-André Lureau
Even though device_add is not fully qapi'fied, we may add it to the json schema with 'gen': false, so registration and documentation can be generated. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- qapi-schema.json | 40

[Qemu-devel] [PATCH v5 16/20] qapi: check invalid arguments on no-args commands

2016-08-17 Thread Marc-André Lureau
The generated marshal functions do not visit arguments from commands that take no arguments. Thus they fail to catch invalid members. Visit the arguments, if provided, to throw an error in case of invalid members. Currently, qmp_check_client_args() checks for invalid arguments and correctly

[Qemu-devel] [PATCH v5 09/20] monitor: simplify invalid_qmp_mode()

2016-08-17 Thread Marc-André Lureau
handle_qmp_command() will switch to use qmp_dispatch(). It won't have a pointer to the marshaller function anymore, but only the name of the command to invoke. Simplify invalid_qmp_mode() so it can just be called with the command name. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v5 03/20] build-sys: make qemu qapi per-target

2016-08-17 Thread Marc-André Lureau
The qapi schema has per-target definitions. Generate the marshaller, events and introspection per target. Keep the types, visitors and headers generic to keep common code unaware. However, having per-target events requires block events stubs. The following patch will use config headers to

[Qemu-devel] [PATCH v5 01/20] tests: do qmp introspect validation per target

2016-08-17 Thread Marc-André Lureau
The following commits will move the qmp schema to be per target, and can't be linked. Instead of validating it directly, query it from the target via qmp. Signed-off-by: Marc-André Lureau --- tests/qmp-introspect-test.c | 50

[Qemu-devel] [PATCH v5 06/20] build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}

2016-08-17 Thread Marc-André Lureau
There are better chances to find what went wrong at build time than a later assert in qmp_query_version Signed-off-by: Marc-André Lureau --- qmp.c | 16 +++- scripts/create_config | 6 ++ 2 files changed, 9 insertions(+), 13

[Qemu-devel] [PATCH v5 04/20] build-sys: use config headers to generate qapi

2016-08-17 Thread Marc-André Lureau
Configure the marshaller, events and introspection with config host and target headers. Keep the types, visitors, and command header generic since it will only use what is actually needed, but needs all declarations to be compatible with the various targets. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v5 02/20] qapi.py: add a simple #ifdef conditional

2016-08-17 Thread Marc-André Lureau
Learn to parse #define files provided with -f option, and skip undefined #ifdef blocks in the schema. This is a very simple pre-processing, without stacking support or evaluation (it could be implemented if needed). Signed-off-by: Marc-André Lureau ---

[Qemu-devel] [PATCH v5 00/20] qapi: remove the 'middle' mode

2016-08-17 Thread Marc-André Lureau
Hi, Although some QMP commands are still not fully qapi'fied, it is possible to use more qapi common and generated code by dropping the 'middle' mode and use qmp_dispatch(). v5: - replace the dynamic unregister commands approach by a few preliminary patches to make the json schema #ifdef

Re: [Qemu-devel] Help: Does Qemu support virtio-pci for net-device and disk device?

2016-08-17 Thread Andrea Bolognani
On Wed, 2016-08-17 at 18:13 +0200, Andrew Jones wrote: > On Wed, Aug 17, 2016 at 08:08:11PM +0800, Kevin Zhao wrote: > >  > > Hi all, > >  Now I'm investigating net device hot plug and disk hotplug for > > AArch64. For virtio , the default address is virtio-mmio. After Libvirt > > 1.3.5, user

[Qemu-devel] [Bug 1613817] Re: x86: ret, lret and iret with noncanonical IP saves wrong IP on the exception stack

2016-08-17 Thread Vda-linux
** Description changed: This test program: # compile with: gcc -nostartfiles -nostdlib _start: .globl _start - mov %ss,%eax - push%rax - push%rsp - pushf - mov %cs,%eax -

Re: [Qemu-devel] [RFC v5 5/7] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation

2016-08-17 Thread Auger Eric
Hi Peter, On 12/08/2016 16:03, Peter Maydell wrote: > On 2 August 2016 at 19:07, Eric Auger wrote: >> From: Pavel Fedin >> >> The ITS control frame is in-kernel emulated while accesses to the >> GITS_TRANSLATER are mediated through the KVM_SIGNAL_MSI

Re: [Qemu-devel] Help: Does Qemu support virtio-pci for net-device and disk device?

2016-08-17 Thread Andrew Jones
On Wed, Aug 17, 2016 at 08:08:11PM +0800, Kevin Zhao wrote: > Hi all, > Now I'm investigating net device hot plug and disk hotplug for > AArch64. For virtio , the default address is virtio-mmio. After Libvirt > 1.3.5, user can explicitly specify the address-type to pci and so libvirt > will

Re: [Qemu-devel] [PATCH v4 0/2] trace: Simplify late initialization

2016-08-17 Thread Stefan Hajnoczi
On Fri, Aug 12, 2016 at 05:33:35PM +0200, Lluís Vilanova wrote: > Removes the need for 'trace_events_dstate_init' and does a little cleanup in > how > state values are modified (to avoid implicit conversions from bool). > > Changes in v2 > = > > * Fix late-init state value [Daniel

Re: [Qemu-devel] Reminder: don't trust 32-bit short IDs when using GPG!

2016-08-17 Thread Thomas Huth
On 10.06.2016 16:46, Peter Maydell wrote: > We've noticed recently that the GPG keyservers have fake keys for > some of the QEMU maintainers, which have keys which have been > deliberately constructed to have collisions on the 32-bit "short ID" > field which gpg shows you by default. > >

Re: [Qemu-devel] [RFC v5 1/7] hw/intc/arm_gicv3_its: Implement ITS base class

2016-08-17 Thread Auger Eric
Hi Peter, On 12/08/2016 16:12, Peter Maydell wrote: > On 2 August 2016 at 19:07, Eric Auger wrote: >> From: Pavel Fedin >> >> This is the basic skeleton for both KVM and software-emulated ITS. >> Since we already prepare status structure, we also

Re: [Qemu-devel] [RFC v5 4/7] target-arm/kvm: Pass requester ID to MSI routing functions

2016-08-17 Thread Auger Eric
Hi Peter, On 12/08/2016 16:19, Peter Maydell wrote: > On 2 August 2016 at 19:07, Eric Auger wrote: >> From: Pavel Fedin >> >> Introduce global kvm_arm_msi_use_devid flag and pass device IDs in >> kvm_arch_fixup_msi_route(). Device IDs are required by

Re: [Qemu-devel] [PATCH v4 12/17] qapi: check invalid arguments on no-args commands

2016-08-17 Thread Marc-André Lureau
Hi On Wed, Aug 17, 2016 at 6:49 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > The generated marshal functions do not visit arguments from commands > > that take no arguments. Thus they

Re: [Qemu-devel] a quesion

2016-08-17 Thread Richard Henderson
On 08/17/2016 12:57 AM, Michael Rolnik wrote: another question. is it possible to measure number of executed instruction between two calls to device read/write functions? Not really. I know there is qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) function, but it requires to assume that icount is

Re: [Qemu-devel] [RFC PATCH v2 2/2] utils: Add prefetch for Thunderx platform

2016-08-17 Thread Richard Henderson
On 08/16/2016 04:45 PM, Vijay Kilari wrote: On Tue, Aug 16, 2016 at 11:32 PM, Richard Henderson wrote: On 08/16/2016 05:02 AM, vijay.kil...@gmail.com wrote: +static inline void prefetch_vector_loop(const VECTYPE *p, int index) +{ +#if defined(__aarch64__) +if

Re: [Qemu-devel] [PATCH 2/2] syscall.c: Redefine IFLA_* enums

2016-08-17 Thread Laurent Vivier
Le 17/08/2016 à 15:49, Michal Privoznik a écrit : > In 9c37146782 I've tried to fix a broken build with older > linux-headers. However, I didn't do it properly. The solution > implemented here is to grab the enums that caused the problem > initially, and rename their values so that they are

Re: [Qemu-devel] [PATCH 1/2] Revert "syscall.c: Fix build with older linux-headers"

2016-08-17 Thread Laurent Vivier
Le 17/08/2016 à 15:49, Michal Privoznik a écrit : > The fix I've made there was wrong. I mean, basically what I did > there was equivalent to: > > #if 0 > some code; > #endif > > This reverts commit 9c37146782e7850877d452da47dc451ba73aa62d. > > Signed-off-by: Michal Privoznik

Re: [Qemu-devel] [PATCH v4 00/17] qapi: remove the 'middle' mode

2016-08-17 Thread Markus Armbruster
no-re...@ec2-52-6-146-230.compute-1.amazonaws.com writes: > Hi, > > Your series seems to have some coding style problems. See output below for > more information: [...] > Checking PATCH 16/17: Replace qmp-commands.hx by doc/qmp-commands.txt... > ERROR: trailing whitespace > #168: FILE:

Re: [Qemu-devel] [PATCH v4 16/17] Replace qmp-commands.hx by doc/qmp-commands.txt

2016-08-17 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > The only remaining function of qmp-commands.hx is to let us generate > qmp-commands.txt from it. Replace qmp-commands.hx by qmp-commands.txt. > > (a later update will move the documentation in the

Re: [Qemu-devel] [PATCH v3 14/15] Drop qmp-commands.hx

2016-08-17 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > The only remaining function of qmp-commands.hx is to let us generate >> > qmp-commands.txt from it.

Re: [Qemu-devel] [PATCH v4 12/17] qapi: check invalid arguments on no-args commands

2016-08-17 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > The generated marshal functions do not visit arguments from commands > that take no arguments. Thus they fail to catch invalid > members. Visit the arguments, if provided, to throw an error in case of

[Qemu-devel] [PATCH 1/6] msix_init: assert programming error

2016-08-17 Thread Cao jin
CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Signed-off-by: Cao jin --- hw/pci/msix.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c

[Qemu-devel] [PATCH 2/6] pci: Convert msix_init() to Error and fix callers to check it

2016-08-17 Thread Cao jin
msix_init() has the same issue with msi_init(), which reports errors via error_report(), that is not suitable when it's used in realize(). Fix it by converting it to Error, also fix its callers to handle failure instead of ignoring it. Cc: Jiri Pirko CC: Gerd Hoffmann

[Qemu-devel] [PATCH 6/6] megasas: undo the overwrites of user configuration

2016-08-17 Thread Cao jin
Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. cc: Hannes Reinecke cc: Paolo Bonzini cc: Markus Armbruster cc: Marcel Apfelbaum cc: Michael S. Tsirkin Signed-off-by: Cao

[Qemu-devel] [PATCH 3/6] e1000e: fix for migration compatibility

2016-08-17 Thread Cao jin
commit 66bf7d58 removed internal msi state flag E1000E_USE_MSI, but it is used by intr_state which exists in vmstate. Restore it for migration to older QEMU versions CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Marcel

[Qemu-devel] [PATCH 4/6] e1000e: drop unnecessary funtions

2016-08-17 Thread Cao jin
Internal helper function: e1000e_init_msix(), e1000e_cleanup_msix() is unnecessary, remove them all. MSI-X state flag is used by intr_state which exists in vmstate, keep it for migration compatibility. CC: Dmitry Fleytman CC: Jason Wang CC: Markus

[Qemu-devel] [PATCH 5/6] megasas: remove unnecessary megasas_use_msix()

2016-08-17 Thread Cao jin
megasas overwrites user configuration when msix_init() fail, to indicate internal msi state, which is unsuitable. And megasa_use_msix() is unnecessary, so remove it. cc: Hannes Reinecke cc: Paolo Bonzini cc: Markus Armbruster cc: Marcel

[Qemu-devel] [PATCH 0/6] Convert msix_init() to error

2016-08-17 Thread Cao jin
CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Alex Williamson

[Qemu-devel] [FIX PATCH] spapr: Gracefully fail CPU thread unplug

2016-08-17 Thread Bharata B Rao
sPAPR supports only Core level CPU plug and unplug, but nothing prevents user from issuing a device_del on the underlying thread device by using its qom path directly. This hits g_assert(hotplug_ctrl) in qdev_unplug(). Gracefully reject such unplug requests from ->unplug() handler Reported-by:

[Qemu-devel] [PATCH 1/2] Revert "syscall.c: Fix build with older linux-headers"

2016-08-17 Thread Michal Privoznik
The fix I've made there was wrong. I mean, basically what I did there was equivalent to: #if 0 some code; #endif This reverts commit 9c37146782e7850877d452da47dc451ba73aa62d. Signed-off-by: Michal Privoznik --- linux-user/syscall.c | 86

Re: [Qemu-devel] [PATCH 0/2] virtio: fix VirtQueue->inuse field

2016-08-17 Thread Stefan Hajnoczi
On Mon, Aug 15, 2016 at 01:54:14PM +0100, Stefan Hajnoczi wrote: > The VirtQueue->inuse field is not always updated correctly. These patches fix > it. > > Originally this series was called "virtio-balloon: fix stats vq migration" but > Ladi Prosek posted a nicer fix called "balloon: Fix failure

Re: [Qemu-devel] [PATCH 00/18] Dirty bitmaps postcopy migration

2016-08-17 Thread Vladimir Sementsov-Ogievskiy
On 17.08.2016 15:35, Dr. David Alan Gilbert wrote: * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: v2: some bugs fixed, iotests a bit changed and merged into one test. based on block-next (https://github.com/XanClic/qemu/commits/block-next) clone: tag postcopy-v2 from

  1   2   >