Re: [Qemu-devel] [PATCH v4 3/4] virtio-9p: break device if buffers are misconfigured

2017-06-26 Thread Greg Kurz
On Mon, 26 Jun 2017 16:22:23 -0700 (PDT) Stefano Stabellini wrote: > On Fri, 23 Jun 2017, Greg Kurz wrote: > > The 9P protocol is transport agnostic: if the guest misconfigured the > > buffers, the best we can do is to set the broken flag on the device. > > > > Since virtio_pdu_vmarshal() may be

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-26 Thread Auger Eric
Hi Jean-Philippe, On 26/06/2017 18:13, Jean-Philippe Brucker wrote: > On 26/06/17 09:22, Auger Eric wrote: >> Hi Jean-Philippe, >> >> On 19/06/2017 12:15, Jean-Philippe Brucker wrote: >>> On 19/06/17 08:54, Bharat Bhushan wrote: Hi Eric, I started added replay in virtio-iommu and ca

[Qemu-devel] [PATCH v7 9/9] i386/kvm/pci-assign: Use errp directly rather than local_err

2017-06-26 Thread Mao Zhongyi
In assigned_device_pci_cap_init(), first, error messages are filled to a local_err variable, then through error_propagate() pass to the parameter of errp. It leads to cumbersome code. In order to avoid the extra local_err and error_propagate(), drop it and use errp instead. Cc: pbonz...@redhat.com

[Qemu-devel] [PATCH v7 2/9] pci: Add comment for pci_add_capability2()

2017-06-26 Thread Mao Zhongyi
Comments for pci_add_capability2() to explain the return value. This may help to make a correct return value check for its callers. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum --- hw/pci/pci.c | 6 ++ 1 file change

[Qemu-devel] [PATCH v7 5/9] pci: Replace pci_add_capability2() with pci_add_capability()

2017-06-26 Thread Mao Zhongyi
After the patch 'Make errp the last parameter of pci_add_capability()', pci_add_capability() and pci_add_capability2() now do exactly the same. So drop the wrapper pci_add_capability() of pci_add_capability2(), then replace the pci_add_capability2() with pci_add_capability() everywhere. Cc: pbonz.

[Qemu-devel] [PATCH v7 8/9] i386/kvm/pci-assign: Fix return type of verify_irqchip_kernel()

2017-06-26 Thread Mao Zhongyi
When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success, because it means that the extra local_err variable and error_propagate() will be needed. It leads to cumbersome code, therefore, transmit success/ failure in the return v

[Qemu-devel] [PATCH v7 3/9] pci: Fix the wrong assertion.

2017-06-26 Thread Mao Zhongyi
pci_add_capability returns a strictly positive value on success, correct asserts. Cc: dmi...@daynix.com Cc: jasow...@redhat.com Cc: kra...@redhat.com Cc: alex.william...@redhat.com Cc: arm...@redhat.com Cc: mar...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum --- hw/net/e1

[Qemu-devel] [PATCH v7 6/9] pci: Convert to realize

2017-06-26 Thread Mao Zhongyi
Convert i82801b11, io3130_upstream, io3130_downstream and pcie_root_port devices to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum --- hw/pci-bridge/i82801b11.c | 11 +-- hw/pci-bridge/pcie_root_

[Qemu-devel] [PATCH v7 1/9] pci: Clean up error checking in pci_add_capability()

2017-06-26 Thread Mao Zhongyi
On success, pci_add_capability2() returns a positive value. On failure, it sets an error and return a negative value. pci_add_capability() laboriously checks this behavior. No other caller does. Drop the checks from pci_add_capability(). Cc: m...@redhat.com Cc: mar...@redhat.com Signed-off-by: Ma

[Qemu-devel] [PATCH v7 0/9] Convert to realize and cleanup

2017-06-26 Thread Mao Zhongyi
This series mainly implements the conversions of pci-bridge devices i82801b11, io3130_upstream/downstream and so on to realize(). Naturally part of error messages need to be converted to Error, then propagate to its callers via the argument errp, bonus clean related minor flaw up. In short, the for

[Qemu-devel] [PATCH v7 4/9] pci: Make errp the last parameter of pci_add_capability()

2017-06-26 Thread Mao Zhongyi
Add Error argument for pci_add_capability() to leverage the errp to pass info on errors. This way is helpful for its callers to make a better error handling when moving to 'realize'. Cc: pbonz...@redhat.com Cc: r...@twiddle.net Cc: ehabk...@redhat.com Cc: m...@redhat.com Cc: jasow...@redhat.com Cc

[Qemu-devel] [PATCH v7 7/9] pci: Convert shpc_init() to Error

2017-06-26 Thread Mao Zhongyi
In order to propagate error message better, convert shpc_init() to Error also convert the pci_bridge_dev_initfn() to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum --- hw/pci-bridge/pci_bridge_dev.c | 14 ++--

Re: [Qemu-devel] [PATCH v9 07/26] target: [tcg, i386] Refactor init_disas_context

2017-06-26 Thread Lluís Vilanova
Richard Henderson writes: > On 06/25/2017 02:12 AM, Lluís Vilanova wrote: >> +DisasContext *dc = container_of(db, DisasContext, base); >> CPUX86State *env = cpu->env_ptr; >> -DisasContext dc1, *dc = &dc1; >> -DisasContextBase *db = &dc1.base; >> -uint32_t flags; >> -target_ulon

Re: [Qemu-devel] [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Wang, Wei W
On Tuesday, June 27, 2017 9:51 AM, Eric Blake wrote: > On 06/22/2017 09:32 PM, Wei Wang wrote: > > This patch enables the virtio-net tx queue size to be configurable > > between 256 (the default queue size) and 1024 by the user when the > > vhost-user backend is used. > > When sending a multi-pa

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Wang, Wei W
On Tuesday, June 27, 2017 10:20 AM, Jason Wang wrote: > On 2017年06月27日 05:21, Michael S. Tsirkin wrote: > > On Mon, Jun 26, 2017 at 06:34:25PM +0800, Wei Wang wrote: > >> On 06/26/2017 04:05 PM, Jason Wang wrote: > >>> > But this patch in fact allows 1024 to be used even for vhost-kernel after > mi

[Qemu-devel] [Bug 1081416] Re: Qemu 1.2.0 crashes when using tcp serial console and GRUB boots

2017-06-26 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1081416 Title: Qemu 1.2.0

[Qemu-devel] [PATCH v6 10/10] migration: hmp: dump globals

2017-06-26 Thread Peter Xu
Now we have some globals that can be configured for migration. Dump them in HMP info migration for better debugging. (we can also use this to monitor whether COMPAT fields are applied correctly on compatible machines) Reviewed-by: Juan Quintela Signed-off-by: Peter Xu --- hmp.c

[Qemu-devel] [PATCH v6 07/10] migration: move skip_configuration out

2017-06-26 Thread Peter Xu
It was in SaveState but now moved to MigrationState altogether, reverted its meaning, then renamed to "send_configuration". Again, using HW_COMPAT_2_3 for old PC/SPAPR machines, and accel_register_prop() for xen_init(). Removing savevm_skip_configuration(). Reviewed-by: Juan Quintela Signed-off-

[Qemu-devel] [PATCH v6 08/10] migration: move skip_section_footers

2017-06-26 Thread Peter Xu
Move it into MigrationState, revert its meaning and renaming it to send_section_footer, with a property bound to it. Same trick is played like previous patches. Removing savevm_skip_section_footers(). Reviewed-by: Juan Quintela Signed-off-by: Peter Xu --- hw/i386/pc_piix.c| 1 - hw/pp

[Qemu-devel] [PATCH v6 06/10] migration: move only_migratable to MigrationState

2017-06-26 Thread Peter Xu
One less global variable, and it does only matter with migration. We keep the old "--only-migratable" option, but also now we support: -global migration.only-migratable=true Currently still keep the old interface. Hmm, now vl.c has no way to access migrate_get_current(). Export a function for

[Qemu-devel] [PATCH v6 04/10] migration: let MigrationState be a qdev

2017-06-26 Thread Peter Xu
Let the old man "MigrationState" join the object family. Direct benefit is that we can start to use all the property features derived from current QDev, like: HW_COMPAT_* bits, command line setup for migration parameters (so will never need to set them up each time using HMP/QMP, this is really, re

[Qemu-devel] [PATCH v6 01/10] machine: export register_compat_prop()

2017-06-26 Thread Peter Xu
We have HW_COMPAT_*, however that's only bound to machines, not other things (like accelerators). Behind it, it was register_compat_prop() that played the trick. Let's export the function for further use outside HW_COMPAT_* magic. Meanwhile, move it to qdev-properties.c where seems more proper (

[Qemu-devel] [PATCH v6 05/10] migration: move global_state.optional out

2017-06-26 Thread Peter Xu
Put it into MigrationState then we can use the properties to specify whether to enable storing global state. Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 for x86/power, and AccelClass.global_props for Xen. Reviewed-by: Juan Quintela Signed-off-by: Peter Xu --- hw/i38

[Qemu-devel] [PATCH v6 09/10] migration: merge enforce_config_section somewhat

2017-06-26 Thread Peter Xu
These two parameters: - MachineState::enforce_config_section - MigrationState::send_configuration are playing similar role here. This patch merges the first one into second, then we'll have a single place to reference whether we need to send the configuration section. I didn't remove the Machine

[Qemu-devel] [PATCH v6 03/10] vl: clean up global property registerations

2017-06-26 Thread Peter Xu
It's not that clear on how the global properties are registered to global_props (and also its priority relationship). Let's provide a single function to be called in main() for that, with comment to explain it a bit. Signed-off-by: Peter Xu --- vl.c | 29 - 1 file cha

[Qemu-devel] [PATCH v6 02/10] accel: introduce AccelClass.global_props

2017-06-26 Thread Peter Xu
Introduce this new field for the accelerator classes so that each specific accelerator in the future can register its own global properties to be used further by the system. It works just like how the old machine compatible properties do, but only tailored for accelerators. Introduce register_comp

[Qemu-devel] [PATCH v6 00/10] migration: objectify MigrationState

2017-06-26 Thread Peter Xu
v6: - patch 1: fix comment, and add more comment for register_compat_props() [Eduardo] - patch 2: add more comments for register_compat_props_array() and the new AccelClass.global_props [Eduardo] - patch 3: rename user_register_compat_props() into user_register_global_props, and some update o

Re: [Qemu-devel] [PATCH v4 3/3] migration: add bitmap for received page

2017-06-26 Thread Peter Xu
On Mon, Jun 26, 2017 at 11:35:20AM +0300, Alexey Perevalov wrote: > This patch adds ability to track down already received > pages, it's necessary for calculation vCPU block time in > postcopy migration feature, maybe for restore after > postcopy migration failure. > Also it's necessary to solve sh

Re: [Qemu-devel] [PATCH v9 26/26] target: [tcg, arm] Port to generic translation framework

2017-06-26 Thread Richard Henderson
On 06/25/2017 03:28 AM, Lluís Vilanova wrote: +static TranslatorOps aarch64_translator_ops = { +.init_disas_context = aarch64_trblock_init_disas_context, +.insn_start = aarch64_trblock_insn_start, +.breakpoint_check = aarch64_trblock_breakpoint_check, +.disas_insn = aarch64_trbloc

Re: [Qemu-devel] [PATCH v9 21/26] target: [tcg, arm] Port to insn_start

2017-06-26 Thread Richard Henderson
On 06/25/2017 03:08 AM, Lluís Vilanova wrote: +static void arm_trblock_insn_start(DisasContextBase *db, CPUState *cpu) +{ +DisasContext *dc = container_of(db, DisasContext, base); + +dc->insn_start_idx = tcg_op_buf_count(); +tcg_gen_insn_start(dc->pc, + (dc->cond

[Qemu-devel] [PATCH v5 2/4] net/socket: Convert error message to Error

2017-06-26 Thread Mao Zhongyi
Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and net_socket_fd_init() use the function such as fprintf(), perror() to report an error message. Now, convert these functions to Error. Cc: jasow...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi --- net/socket.c | 7

[Qemu-devel] [PATCH v5 4/4] net/socket: Improve -net socket error reporting

2017-06-26 Thread Mao Zhongyi
When -net socket fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -net socket, qemu-system-x86_64: -net socket: exactly one of fd=, listen=, connect=, mcast= or udp= is required qemu-system-x86_64: -net socket: Device 'socket' could not be

[Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error

2017-06-26 Thread Mao Zhongyi
Cc: berra...@redhat.com Cc: kra...@redhat.com Cc: pbonz...@redhat.com Cc: jasow...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi --- include/qemu/sockets.h | 3 ++- net/net.c | 22 +- net/socket.c | 19 ++- 3 files changed,

[Qemu-devel] [PATCH v5 0/4] Improve error reporting

2017-06-26 Thread Mao Zhongyi
v5: * PATCH 01 make the commit message more exact about the actual function. [Markus Armbruster] * PATCH 02, 03, 04 still retains the original function, but specific content and order of each patch has been adjusted substantially, so that ensure each patch is a completed

[Qemu-devel] [PATCH v5 1/4] net/socket: Don't treat odd socket type as SOCK_STREAM

2017-06-26 Thread Mao Zhongyi
In net_socket_fd_init(), the 'default' case is odd: it warns, then continues as if the socket type was SOCK_STREAM. The comment explains "this could be a eg. a pty", but that makes no sense. If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If @fd was a socket, but neither SOCK_DGRAM

Re: [Qemu-devel] [PATCH v9 04/26] target: [tcg] Add generic translation framework

2017-06-26 Thread Richard Henderson
On 06/26/2017 11:21 AM, Peter Maydell wrote: x86 definitely gets this totally wrong. I would be unsurprised to find that other variable-length-insn targets do too. For x86, doing this optimally is difficult. We *could* fix it simply by single-stepping when executing within the last 15 bytes o

Re: [Qemu-devel] [PATCH v2 02/12] migration: Don't lose errno across aio context changes

2017-06-26 Thread Eric Blake
On 05/16/2017 03:47 PM, Eric Blake wrote: > set_dirty_tracking() was assuming that the errno value set by > bdrv_create_dirty_bitmap() would not be corrupted by either > blk_get_aio_context() or aio_context_release(). Rather than > audit whether this assumption is safe, rewrite the code to just >

Re: [Qemu-devel] [RFC PATCH v9 00/26] translate: [tcg] Generic translation framework

2017-06-26 Thread Eric Blake
On 06/25/2017 03:43 AM, Lluís Vilanova wrote: > This series proposes a generic (target-agnostic) instruction translation > framework. > > It basically provides a generic main loop for instruction disassembly, which > calls target-specific functions when necessary. This generalization makes > inser

Re: [Qemu-devel] [PATCH v9 07/26] target: [tcg, i386] Refactor init_disas_context

2017-06-26 Thread Richard Henderson
On 06/25/2017 02:12 AM, Lluís Vilanova wrote: +DisasContext *dc = container_of(db, DisasContext, base); CPUX86State *env = cpu->env_ptr; -DisasContext dc1, *dc = &dc1; -DisasContextBase *db = &dc1.base; -uint32_t flags; -target_ulong cs_base; -int num_insns; -int

Re: [Qemu-devel] [PATCH v2 3/3] tests: Add a tester for HMP commands

2017-06-26 Thread Eric Blake
On 03/30/2017 02:50 AM, Thomas Huth wrote: > HMP commands do not get any automatic testing yet, so on certain > QEMU machines, some HMP commands were causing crashes in the past. > Thus we should test HMP commands in our test suite, too, to avoid > that such problems creep in again in the future. >

Re: [Qemu-devel] [RFC PATCH 3/4] coccinelle: script to run them all

2017-06-26 Thread Fam Zheng
On Sun, 06/25 16:29, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/check-cocci-scripts.sh | 47 > ++ > 1 file changed, 47 insertions(+) > create mode 100755 scripts/check-cocci-scripts.sh > > diff --git a/scripts/c

Re: [Qemu-devel] [PATCH v9 04/26] target: [tcg] Add generic translation framework

2017-06-26 Thread Richard Henderson
On 06/26/2017 03:14 AM, Alex Bennée wrote: +if ((db->pc_first & TARGET_PAGE_MASK) +!= (db->pc_next & TARGET_PAGE_MASK)) { +db->is_jmp = DJ_TOO_MANY; +break; +} How does the first insn avoid this check? And if it does is that right? I mean I u

Re: [Qemu-devel] [PATCH 1/3] qemu: add capability for vhost-net busy polling

2017-06-26 Thread Eric Blake
On 06/26/2017 09:24 PM, Eduardo Habkost wrote: >> I've posted patches in the past (qemu 2.6 timeframe, if I recall) that >> changed netdev_add into a fully-advertised interface, but we didn't take >> it then because we weren't sure how to handle the fact that netdev_add >> can currently accept both

Re: [Qemu-devel] [PATCH v9 04/26] target: [tcg] Add generic translation framework

2017-06-26 Thread Richard Henderson
On 06/25/2017 01:59 AM, Lluís Vilanova wrote: +static inline void translate_block_tcg_check(const DisasContextBase *db) +{ +if (tcg_check_temp_count()) { +error_report("warning: TCG temporary leaks before "TARGET_FMT_lx, + db->pc_next); +} +} + +void translate_

Re: [Qemu-devel] [Qemu-arm] [PATCH 0/4] cpu: Implement cpu_generic_new()

2017-06-26 Thread Eduardo Habkost
On Mon, Jun 26, 2017 at 02:28:13PM +0100, Alex Bennée wrote: > > Peter Maydell writes: > > > This patchset adds a new function cpu_generic_new() > > which is similar to cpu_generic_init() except that it > > does not realize the created CPU object. This means that > > board code can do a "new cpu

Re: [Qemu-devel] [RFC PATCH 3/4] coccinelle: script to run them all

2017-06-26 Thread Philippe Mathieu-Daudé
On Mon, Jun 26, 2017 at 11:17 PM, Eduardo Habkost wrote: > On Sun, Jun 25, 2017 at 04:29:49PM -0300, Philippe Mathieu-Daudé wrote: [...] >> +test -z "$(${SUDO} docker images -q ${SPATCH_IMAGE})" && ${SUDO} docker >> pull ${SPATCH_IMAGE} >> + > > Can the docker magic be made optional (and disabled

Re: [Qemu-devel] [PATCH v4 5/5] tests: add functional test validating ipv4/ipv6 address flag handling

2017-06-26 Thread Eric Blake
On 06/26/2017 09:10 PM, Eric Blake wrote: > On 06/16/2017 05:12 AM, Daniel P. Berrange wrote: >> The semantics around handling ipv4=on|off & ipv6=on|off are quite >> subtle to understand in combination with the various hostname addresses >> and backend types. Introduce a massive test matrix that la

Re: [Qemu-devel] [PATCH 1/3] qemu: add capability for vhost-net busy polling

2017-06-26 Thread Eduardo Habkost
On Mon, Jun 26, 2017 at 07:23:50AM -0600, Eric Blake wrote: > On 06/17/2017 09:15 PM, Eduardo Habkost wrote: > > (CCing qemu-devel and the QAPI maintainers. I have a question > > about introspection below.) > > > > > > > Fortunately, netdev options are modelled in the QAPI schema as > > union N

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Jason Wang
On 2017年06月27日 05:21, Michael S. Tsirkin wrote: On Mon, Jun 26, 2017 at 06:34:25PM +0800, Wei Wang wrote: On 06/26/2017 04:05 PM, Jason Wang wrote: On 2017年06月26日 12:55, Wei Wang wrote: On 06/26/2017 11:18 AM, Jason Wang wrote: On 2017年06月23日 10:32, Wei Wang wrote: This patch enables the

Re: [Qemu-devel] [RFC PATCH 3/4] coccinelle: script to run them all

2017-06-26 Thread Eduardo Habkost
On Sun, Jun 25, 2017 at 04:29:49PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/check-cocci-scripts.sh | 47 > ++ > 1 file changed, 47 insertions(+) > create mode 100755 scripts/check-cocci-scripts.sh > > d

Re: [Qemu-devel] BUG: KASAN: use-after-free in free_old_xmit_skbs

2017-06-26 Thread Jason Wang
On 2017年06月26日 15:35, Jean-Philippe Menil wrote: On 06/26/2017 04:50 AM, Jason Wang wrote: On 2017年06月24日 06:32, Cong Wang wrote: On Fri, Jun 23, 2017 at 1:43 AM, Jason Wang wrote: On 2017年06月23日 02:53, Michael S. Tsirkin wrote: On Thu, Jun 22, 2017 at 08:15:58AM +0200, jean-philippe me

Re: [Qemu-devel] [PATCH v4 5/5] tests: add functional test validating ipv4/ipv6 address flag handling

2017-06-26 Thread Eric Blake
On 06/16/2017 05:12 AM, Daniel P. Berrange wrote: > The semantics around handling ipv4=on|off & ipv6=on|off are quite > subtle to understand in combination with the various hostname addresses > and backend types. Introduce a massive test matrix that launches QEMU > and validates the ability to conn

Re: [Qemu-devel] [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Eric Blake
On 06/22/2017 09:32 PM, Wei Wang wrote: > This patch enables the virtio-net tx queue size to be configurable > between 256 (the default queue size) and 1024 by the user when the > vhost-user backend is used. When sending a multi-patch series, don't forget the 0/2 cover letter. > > Currently, the

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Michael S. Tsirkin
On Tue, Jun 27, 2017 at 09:06:07AM +0800, Wei Wang wrote: > On 06/27/2017 05:21 AM, Michael S. Tsirkin wrote: > > On Mon, Jun 26, 2017 at 06:34:25PM +0800, Wei Wang wrote: > > > On 06/26/2017 04:05 PM, Jason Wang wrote: > > > > > > > > On 2017年06月26日 12:55, Wei Wang wrote: > > > > > On 06/26/2017

Re: [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used

2017-06-26 Thread Eric Blake
On 06/23/2017 02:25 PM, Eduardo Habkost wrote: > On Fri, Jun 23, 2017 at 01:45:57PM -0300, Philippe Mathieu-Daudé wrote: >> then abort calling error_setg() > > I don't understand the reasons for this. This commit message says > "what" and "how", but not "why". > >> -assert(n >= 0 && n < gpi

Re: [Qemu-devel] [PATCH v6 2/6] queue: Add macro for incremental traversal

2017-06-26 Thread Richard Henderson
On 06/26/2017 05:33 AM, Lluís Vilanova wrote: Richard Henderson writes: On 06/12/2017 07:54 AM, Lluís Vilanova wrote: Adds macro QTAILQ_FOREACH_CONTINUE to support incremental list traversal. Signed-off-by: Lluís Vilanova --- include/qemu/queue.h | 12 1 file changed, 12 insert

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Wei Wang
On 06/27/2017 05:21 AM, Michael S. Tsirkin wrote: On Mon, Jun 26, 2017 at 06:34:25PM +0800, Wei Wang wrote: On 06/26/2017 04:05 PM, Jason Wang wrote: On 2017年06月26日 12:55, Wei Wang wrote: On 06/26/2017 11:18 AM, Jason Wang wrote: On 2017年06月23日 10:32, Wei Wang wrote: This patch enables the

Re: [Qemu-devel] [PATCH v5 04/10] migration: let MigrationState be a qdev

2017-06-26 Thread Eduardo Habkost
On Mon, Jun 26, 2017 at 10:50:35AM +0800, Peter Xu wrote: > On Fri, Jun 23, 2017 at 07:18:19PM -0300, Eduardo Habkost wrote: > > On Fri, Jun 23, 2017 at 12:46:40PM +0800, Peter Xu wrote: > > > Let the old man "MigrationState" join the object family. Direct benefit > > > is that we can start to use

Re: [Qemu-devel] [PATCH v5 02/10] accel: introduce AccelClass.global_props

2017-06-26 Thread Eduardo Habkost
On Mon, Jun 26, 2017 at 10:39:53AM +0800, Peter Xu wrote: > On Fri, Jun 23, 2017 at 06:31:27PM -0300, Eduardo Habkost wrote: > > On Fri, Jun 23, 2017 at 12:46:38PM +0800, Peter Xu wrote: > > > Introduce this new field for the accelerator classes so that each > > > specific accelerator in the future

Re: [Qemu-devel] [PATCHv6 3/5] fw_cfg: move assert() and linking of fw_cfg device to the machine into instance_init()

2017-06-26 Thread Eduardo Habkost
On Sun, Jun 25, 2017 at 07:58:04PM +0100, Mark Cave-Ayland wrote: > On 23/06/17 19:50, Eduardo Habkost wrote: > > >> Really, please go back to the earlier discussion around fw_cfg_init1() > >> and you'll see my original point (which matches what you just voiced). > > > > Yep. I was just not sure

Re: [Qemu-devel] [PATCH] target-i386: add Skylake-Server cpu model

2017-06-26 Thread Eduardo Habkost
On Mon, Jun 26, 2017 at 09:23:00AM +0800, Boqun Feng wrote: > On Fri, Jun 23, 2017 at 10:38:14AM -0300, Eduardo Habkost wrote: > > On Wed, Jun 21, 2017 at 01:29:34PM +0800, Boqun Feng (Intel) wrote: > > > Introduce Skylake-Server cpu mode which inherits the features from > > > Skylake-Client and su

Re: [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used

2017-06-26 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 01:45:57PM -0300, Philippe Mathieu-Daudé wrote: > then abort calling error_setg() > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > index 849952

Re: [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used

2017-06-26 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 01:45:57PM -0300, Philippe Mathieu-Daudé wrote: > then abort calling error_setg() I don't understand the reasons for this. This commit message says "what" and "how", but not "why". > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev.c | 6 +- > 1 file ch

Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups

2017-06-26 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 01:45:54PM -0300, Philippe Mathieu-Daudé wrote: > Sorry to spam so many people, there is no entries in MAINTAINERS for > hw/core/loader.c and hw/core/qdev.c, any volunters? I can apply them through my machine tree, if nobody else volunteers. Do you have a simple way to tri

Re: [Qemu-devel] [PATCH v5 0/1] qemu-ga: add guest-get-osinfo command

2017-06-26 Thread Tomáš Golembiovský
Hi, On Mon, 26 Jun 2017 12:27:57 + Marc-André Lureau wrote: > Hi > > On Wed, Jun 7, 2017 at 2:02 PM Tomáš Golembiovský > wrote: > > > v5: > > - fixed build failure with older glib > > - fixed coding style issues > > - fixed one log string > > > > This is a continuation of the work started

Re: [Qemu-devel] [PATCH v2 7/7] target/m68k: add fmovem

2017-06-26 Thread Richard Henderson
On 06/26/2017 03:03 PM, Laurent Vivier wrote: +static int cpu_st_float64_ra(CPUM68KState *env, uint32_t addr, FPReg *fp, Extra space. Otherwise, Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v4 3/4] virtio-9p: break device if buffers are misconfigured

2017-06-26 Thread Stefano Stabellini
On Fri, 23 Jun 2017, Greg Kurz wrote: > The 9P protocol is transport agnostic: if the guest misconfigured the > buffers, the best we can do is to set the broken flag on the device. > > Since virtio_pdu_vmarshal() may be called by several active PDUs, we > check if the transport isn't broken alread

Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/3] block: add bdrv_get_format_alloc_stat format interface

2017-06-26 Thread John Snow
On 06/06/2017 12:26 PM, Vladimir Sementsov-Ogievskiy wrote: > The function should collect statistics, about used/unused by top-level > format driver space (in its .file) and allocation status > (data/zero/discarded/after-eof) of corresponding areas in this .file. > > Signed-off-by: Vladimir Seme

Re: [Qemu-devel] [PATCH v2 5/7] target/m68k: add fsglmul and fsgldiv

2017-06-26 Thread Richard Henderson
On 06/26/2017 03:03 PM, Laurent Vivier wrote: +void HELPER(fsglmul)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1) +{ +floatx80 a, b; + +PREC_BEGIN(32); +a = floatx80_round(val0->d, &env->fp_status); +b = floatx80_round(val1->d, &env->fp_status); +res->d = floatx80_m

Re: [Qemu-devel] [PATCH v2 1/7] target/m68k: add fscc.

2017-06-26 Thread Richard Henderson
On 06/26/2017 03:03 PM, Laurent Vivier wrote: case 12: /* Unordered or Less Than A || (N && !Z) */ case 28: /* Not Greater than or Equal A || (N && !Z) */ -assert(FPSR_CC_Z == (FPSR_CC_N >> 1)); -tmp = tcg_temp_new(); -tcg_gen_xori_i32(tmp, fpsr, FPSR_CC_Z); -

Re: [Qemu-devel] [Qemu devel v5 PATCH 5/5] msf2: Add Emcraft's Smartfusion2 SOM kit.

2017-06-26 Thread Alistair Francis
On Mon, Jun 26, 2017 at 9:01 AM, sundeep subbaraya wrote: > Hi Alistair, > > On Wed, May 31, 2017 at 4:02 AM, Alistair Francis > wrote: >> >> On Sun, May 28, 2017 at 10:26 PM, sundeep subbaraya >> wrote: >> > Hi Alistair, >> > >> > On Sat, May 27, 2017 at 5:30 AM, Alistair Francis >> > wrote: >

Re: [Qemu-devel] [Qemu-block] [PATCH RFC v3 7/8] block: remove legacy I/O throttling

2017-06-26 Thread Manos Pitsidianakis
On Mon, Jun 26, 2017 at 04:44:44PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 23, 2017 at 03:46:59PM +0300, Manos Pitsidianakis wrote: -void blk_io_limits_disable(BlockBackend *blk) +void blk_io_limits_disable(BlockBackend *blk, Error **errp) { -assert(blk->public.throttle_group_member.throt

Re: [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used

2017-06-26 Thread Alistair Francis
On Fri, Jun 23, 2017 at 9:45 AM, Philippe Mathieu-Daudé wrote: > then abort calling error_setg() The commit message should be able to be read separately from the title. Once you fix up the message: Reviewed-by: Alistair Francis Thanks, Alistair > > Signed-off-by: Philippe Mathieu-Daudé > --

Re: [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as()

2017-06-26 Thread Alistair Francis
On Fri, Jun 23, 2017 at 9:45 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Thanks, Alistair > --- > hw/core/loader.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/core/loader.c b/hw/core/loader.c > ind

Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups

2017-06-26 Thread Alistair Francis
On Fri, Jun 23, 2017 at 9:45 AM, Philippe Mathieu-Daudé wrote: > Sorry to spam so many people, there is no entries in MAINTAINERS for > hw/core/loader.c and hw/core/qdev.c, any volunters? If no one else wants to I could maintain hw/core/loader.c. It's pretty similar to the generic-loader which I

[Qemu-devel] [PATCH 5/7] trace: [tcg] Do not generate TCG code to trace dinamically-disabled events

2017-06-26 Thread Emilio G. Cota
From: Lluís Vilanova If an event is dynamically disabled, the TCG code that calls the execution-time tracer is not generated. Removes the overheads of execution-time tracers for dynamically disabled events. As a bonus, also avoids checking the event state when the execution-time tracer is called

[Qemu-devel] [PATCH 6/7] trace: [tcg, trivial] Re-align generated code

2017-06-26 Thread Emilio G. Cota
From: Lluís Vilanova Last patch removed a nesting level in generated code. Re-align all code generated by backends to be 4-column aligned. Signed-off-by: Lluís Vilanova Signed-off-by: Emilio G. Cota --- scripts/tracetool/backend/dtrace.py | 4 ++-- scripts/tracetool/backend/ftrace.py | 20 ++

[Qemu-devel] [PATCH 1/7] exec: [tcg] Refactor flush of per-CPU virtual TB cache

2017-06-26 Thread Emilio G. Cota
From: Lluís Vilanova The function is reused in later patches. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c| 2 +- accel/tcg/translate-all.c | 15 ++- include/exec/exec-all.h | 6 ++ 3 files chang

[Qemu-devel] [PATCH 7/7] trace: Statically enable all TCG guest events

2017-06-26 Thread Emilio G. Cota
From: Lluís Vilanova The optimizations of this series makes it feasible to have them available on all builds. After this patchset we avoid the ~2X slowdown that enabling TCG events used to incur, as shown in the bar chart below. [orig==before; new==after]

[Qemu-devel] [PATCH 4/7] exec: [tcg] Use different TBs according to the vCPU's dynamic tracing state

2017-06-26 Thread Emilio G. Cota
From: Lluís Vilanova Every vCPU now uses a separate set of TBs for each set of dynamic tracing event state values. Each set of TBs can be used by any number of vCPUs to maximize TB reuse when vCPUs have the same tracing state. This feature is later used by tracetool to optimize tracing of guest

[Qemu-devel] [PATCH 3/7] trace: [tcg] Delay changes to dynamic state when translating

2017-06-26 Thread Emilio G. Cota
From: Lluís Vilanova This keeps consistency across all decisions taken during translation when the dynamic state of a vCPU is changed in the middle of translating some guest code. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson [cota: use CPU_TRACE_DSTATE_MAX_EVENTS instead of tra

[Qemu-devel] [PATCH v9 0/7] trace: Optimize per-vCPU TCG tracing states

2017-06-26 Thread Emilio G. Cota
v8: https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg02335.html Changes from v8: - Rebased on top of the current tracing tree -- the one that includes Lluis' fix (2c321e3c486). - Added Lluis' R-b tag. - Added perf numbers in the commit log of the last patch (tl;dr: no overhead). Thanks

[Qemu-devel] [PATCH v2 7/7] target/m68k: add fmovem

2017-06-26 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 120 +++ target/m68k/helper.h | 6 +++ target/m68k/translate.c | 93 3 files changed, 189 insertions(+), 30 deletions(-) diff --git a/target/m68k/

[Qemu-devel] [PATCH v2 5/7] target/m68k: add fsglmul and fsgldiv

2017-06-26 Thread Laurent Vivier
fsglmul and fsgldiv truncate data to single precision before computing results. Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 22 ++ target/m68k/helper.h | 2 ++ target/m68k/translate.c | 6 ++ 3 files changed, 30 insertions(+) diff --git a/target/m

[Qemu-devel] [PATCH v2 6/7] target/m68k: add explicit single and double precision operations (part 2)

2017-06-26 Thread Laurent Vivier
Add fsabs, fdabs, fsneg, fdneg, fsmove and fdmove. The value is converted using the new floatx80_round() function. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 48 +--- target/m68k/helper.h | 8

[Qemu-devel] [PATCH v2 3/7] target/m68k: add explicit single and double precision operations

2017-06-26 Thread Laurent Vivier
Add fssqrt, fdsqrt, fsadd, fdadd, fssub, fdsub, fsmul, fdmul, fsdiv, fddiv. The precision is managed using set_floatx80_rounding_precision(). Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 80 target/

[Qemu-devel] [PATCH v2 4/7] softfloat: define floatx80_round()

2017-06-26 Thread Laurent Vivier
Add a function to round a floatx80 to the defined precision (floatx80_rounding_precision) Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- fpu/softfloat.c | 15 +++ include/fpu/softfloat.h | 1 + 2 files changed, 16 insertions(+) diff --git a/fpu/softfloat.

[Qemu-devel] [PATCH 2/7] cpu: allocate cpu->trace_dstate in place

2017-06-26 Thread Emilio G. Cota
There's little point in dynamically allocating the bitmap if we know at compile-time the max number of events we want to support. Thus, make room in the struct for the bitmap, which will make things easier later: this paves the way for upcoming changes, in which we'll use a u32 to fully capture cpu

[Qemu-devel] [PATCH v2 0/7] target/m68k: implement 680x0 FPU (part 2)

2017-06-26 Thread Laurent Vivier
Second part of patches submitted in the v3. This series adds a subset of single precision and double precision instructions using set_floatx80_rounding_precision() to round the result. For some other instructions, we introduce a new function, floatx80_round(), to round them manually. It also add

[Qemu-devel] [PATCH v2 2/7] target/m68k: add fmovecr

2017-06-26 Thread Laurent Vivier
fmovecr moves a floating point constant from the FPU ROM to a floating point register. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 30 ++ target/m68k/helper.h | 1 + target/m68k/translate.c | 13 - 3 f

[Qemu-devel] [PATCH v2 1/7] target/m68k: add fscc.

2017-06-26 Thread Laurent Vivier
use DisasCompare with FPU conditions in fscc and fbcc. Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 213 ++-- 1 file changed, 134 insertions(+), 79 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 7aa0fd

Re: [Qemu-devel] [PATCH RFC v2 2/2] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-26 Thread Alexander Graf
On 06/26/2017 05:03 PM, Andrew Jones wrote: On Tue, Dec 13, 2016 at 01:20:50PM +, Peter Maydell wrote: On 14 November 2016 at 14:32, Alexander Graf wrote: When running with KVM enabled, you can choose between emulating the gic in kernel or user space. If the kernel supports in-kernel virtu

[Qemu-devel] [PATCH] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-26 Thread Alexander Graf
When running with KVM enabled, you can choose between emulating the gic in kernel or user space. If the kernel supports in-kernel virtualization of the interrupt controller, it will default to that. If not, if will default to user space emulation. Unfortunately when running in user mode gic emulat

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Laszlo Ersek
On 06/26/17 22:30, Denis V. Lunev wrote: > 3. > > _zstd is multi-threaded, and it’s dangerous_ > > libzstd is single-threaded. > There is a multi-thread extension, which is enabled in the CLI, but not > in the library. > There is also an experimental target which makes it possible to produc

Re: [Qemu-devel] [PATCH] tcg: consistently access cpu->tb_jmp_cache atomically

2017-06-26 Thread Richard Henderson
On 06/14/2017 05:36 PM, Emilio G. Cota wrote: Some code paths can lead to atomic accesses racing with memset() on cpu->tb_jmp_cache, which can result in torn reads/writes and is undefined behaviour in C11. These torn accesses are unlikely to show up as bugs, but from code inspection they seem po

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Michael S. Tsirkin
On Mon, Jun 26, 2017 at 06:34:25PM +0800, Wei Wang wrote: > On 06/26/2017 04:05 PM, Jason Wang wrote: > > > > > > On 2017年06月26日 12:55, Wei Wang wrote: > > > On 06/26/2017 11:18 AM, Jason Wang wrote: > > > > > > > > On 2017年06月23日 10:32, Wei Wang wrote: > > > > > This patch enables the virtio-ne

Re: [Qemu-devel] [PATCH v2 0/2] cpu_env in gen-icount

2017-06-26 Thread Richard Henderson
On 06/16/2017 11:56 AM, Emilio G. Cota wrote: v1: https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg03771.html Changes from v1: - Use tcg_ctx.tcg_env instead of passing cpu_env around as suggested by Richard. - Added Richard's R-b tag to patch 1. Applied to the tcg queue. r~

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 11:54 PM, Peter Lieven wrote: > >> Am 26.06.2017 um 22:30 schrieb Denis V. Lunev : >> >>> On 06/26/2017 11:28 AM, Kevin Wolf wrote: >>> [ Cc: qemu-devel; don't post to qemu-block only! ] >>> >>> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently wor

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
> Am 26.06.2017 um 22:30 schrieb Denis V. Lunev : > >> On 06/26/2017 11:28 AM, Kevin Wolf wrote: >> [ Cc: qemu-devel; don't post to qemu-block only! ] >> >> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: >>> Hi, >>> >>> I am currently working on optimizing speed for compressed QCOW2 >>>

Re: [Qemu-devel] [Qemu-block] Fuzzing event loops

2017-06-26 Thread John Snow
On 06/11/2017 06:47 AM, Stefan Hajnoczi wrote: > I wanted to share this idea about fuzzing event loops: > > https://blog.acolyer.org/2017/06/09/node-fz-fuzzing-the-server-side-event-driven-architecture/ > > The idea is to expose ordering dependencies and atomicity bugs in > event loop callbacks

  1   2   3   >