Re: [Qemu-devel] [PATCH 3/6] migration: add UFFD_FEATURE_THREAD_ID feature support

2017-04-25 Thread Dr. David Alan Gilbert
* Alexey (a.pereva...@samsung.com) wrote: > + Andrea Arcangeli > > On Mon, Apr 24, 2017 at 06:10:02PM +0100, Dr. David Alan Gilbert wrote: > > * Alexey (a.pereva...@samsung.com) wrote: > > > On Mon, Apr 24, 2017 at 04:12:29PM +0800, Peter Xu wrote: > > > > On Fri, Apr 21, 2017 at 06:22:12PM +0300,

Re: [Qemu-devel] [PATCH v2 02/13] exec-all: inline tb_from_jmp_cache

2017-04-25 Thread Richard Henderson
On 04/25/2017 09:53 AM, Emilio G. Cota wrote: +/* tb_hash_func() in tb-hash.h needs tb_page_addr_t, defined above */ +#include "tb-hash.h" + This causes an include loop (I think), and quite a few targets fail to build. Are you using --target-list in your testing? r~

Re: [Qemu-devel] [PATCH RESEND v2 08/18] ram/COLO: Record the dirty pages that SVM received

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 2:29, Juan Quintela wrote: zhanghailiang wrote: We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log

Re: [Qemu-devel] [PATCH v2 13/13] tb-hash: improve tb_jmp_cache hash function in user mode

2017-04-25 Thread Richard Henderson
On 04/25/2017 09:53 AM, Emilio G. Cota wrote: Optimizations to cross-page chaining and indirect branches make performance more sensitive to the hit rate of tb_jmp_cache. The constraint of reserving some bits for the page number lowers the achievable quality of the hashing function. Reviewed-by:

Re: [Qemu-devel] [PATCH] target-s390x: Mask the SIGP order_code to 8bit.

2017-04-25 Thread Philipp Kern
On 2017-04-25 11:51, Richard Henderson wrote: On 04/24/2017 10:25 AM, Alexander Graf wrote: On 24.04.17 00:32, Aurelien Jarno wrote: From: Philipp Kern According to "CPU Signaling and Response", "Signal-Processor Orders", the order field is bit position 56-63. Without this, the Linux guest ke

Re: [Qemu-devel] [PATCH] tcg: Initialize return value after exit_atomic

2017-04-25 Thread Nikunj A Dadhania
Richard Henderson writes: > Users of tcg_gen_atomic_cmpxchg and do_atomic_op rightfully utilize > the output. Even though this code is dead, it gets translated, and > without the initialization we encounter a tcg_error. > > Reported-by: Nikunj A Dadhania > Signed-off-by: Richard Henderson Wit

Re: [Qemu-devel] [PATCH 2/6] util: introduce glib-helper.c

2017-04-25 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 21 April 2017 at 16:10, Alexey wrote: > > Hello, thank you for so detailed comment, > > > > On Fri, Apr 21, 2017 at 11:27:55AM +0100, Peter Maydell wrote: > > >> Can we have a proper doc comment format comment, please, > >> since this is now

Re: [Qemu-devel] [PATCH v2 07/13] tcg/i386: implement goto_ptr op

2017-04-25 Thread Richard Henderson
On 04/25/2017 09:53 AM, Emilio G. Cota wrote: +case INDEX_op_goto_ptr: +/* save target address into new register */ +tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_EDX, a0); +/* set return value to 0 */ +tgen_arithr(s, ARITH_XOR, TCG_REG_EAX, TCG_REG_EAX); +/* jm

Re: [Qemu-devel] [PATCH] tcg: Initialize return value after exit_atomic

2017-04-25 Thread Richard Henderson
On 04/25/2017 01:21 PM, Nikunj A Dadhania wrote: Richard Henderson writes: Users of tcg_gen_atomic_cmpxchg and do_atomic_op rightfully utilize the output. Even though this code is dead, it gets translated, and without the initialization we encounter a tcg_error. Reported-by: Nikunj A Dadhani

[Qemu-devel] [PULL V2 4/8] net/ftgmac100: add a 'aspeed' property

2017-04-25 Thread Jason Wang
From: Cédric Le Goater The Aspeed SoCs have a different definition of the end of the ring buffer bit. Add a property to specify which set of bits should be used by the NIC. Signed-off-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/net/ftgmac100.c | 17 +++-- include

[Qemu-devel] [PULL V2 2/8] hw/net: add MII definitions

2017-04-25 Thread Jason Wang
From: Cédric Le Goater This adds comments on the Basic mode control and status registers bit definitions. It also adds a couple of bits for 1000BASE-T and the RealTek 8211E PHY for the FTGMAC100 model to use. Signed-off-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ja

[Qemu-devel] [PULL V2 0/8] Net patches

2017-04-25 Thread Jason Wang
The following changes since commit 32c7e0ab755745e961f1772e95cac381cc68769d: Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170421' into staging (2017-04-21 15:59:27 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-reques

[Qemu-devel] [PULL V2 1/8] colo-compare: Fix old packet check bug.

2017-04-25 Thread Jason Wang
From: Zhang Chen If colo-compare find one old packet,we can notify colo-frame do checkpoint, no need continue find more old packet here. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --gi

[Qemu-devel] [PULL V2 6/8] slirp: add a fake NC-SI backend

2017-04-25 Thread Jason Wang
From: Cédric Le Goater NC-SI (Network Controller Sideband Interface) enables a BMC to manage a set of NICs on a system. This model takes the simplest approach and reverses the NC-SI packets to pretend a NIC is present and exercise the Linux driver. The NCSI header file comes from mainline Linux

[Qemu-devel] [PULL V2 7/8] COLO-compare: Optimize tcp compare for option field

2017-04-25 Thread Jason Wang
From: Zhang Chen In this patch we support packet that have tcp options field. Add tcp options field check, If the packet have options field we just skip it and compare tcp payload, Avoid unnecessary checkpoint, optimize performance. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/

[Qemu-devel] [PULL V2 3/8] net: add FTGMAC100 support

2017-04-25 Thread Jason Wang
From: Cédric Le Goater The FTGMAC100 device is an Ethernet controller with DMA function that can be found on Aspeed SoCs (which include NCSI). It is fully compliant with IEEE 802.3 specification for 10/100 Mbps Ethernet and IEEE 802.3z specification for 1000 Mbps Ethernet and includes Reduced Me

[Qemu-devel] [PULL V2 5/8] aspeed: add a FTGMAC100 nic

2017-04-25 Thread Jason Wang
From: Cédric Le Goater There is a second NIC but we do not use it for the moment. We use the 'aspeed' property to tune the definition of the end of ring buffer bit for the Aspeed SoCs. Signed-off-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/arm/aspeed_soc.c | 21 +

[Qemu-devel] [PULL V2 8/8] COLO-compare: Optimize tcp compare trace event

2017-04-25 Thread Jason Wang
From: Zhang Chen Optimize two trace events as one, adjust print format make it easy to read. rename trace_colo_compare_pkt_info_src/dst to trace_colo_compare_tcp_info. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 29 + net/trace-even

Re: [Qemu-devel] [PATCH] target-s390x: Mask the SIGP order_code to 8bit.

2017-04-25 Thread Alexander Graf
On 04/25/2017 01:21 PM, Philipp Kern wrote: On 2017-04-25 11:51, Richard Henderson wrote: On 04/24/2017 10:25 AM, Alexander Graf wrote: On 24.04.17 00:32, Aurelien Jarno wrote: From: Philipp Kern According to "CPU Signaling and Response", "Signal-Processor Orders", the order field is bit pos

Re: [Qemu-devel] question about block size and virtual disks

2017-04-25 Thread Kevin Wolf
Am 21.04.2017 um 18:26 hat Chris Friesen geschrieben: > On 04/20/2017 03:21 PM, Eric Blake wrote: > >On 04/20/2017 04:03 PM, Chris Friesen wrote: > > >>Also, does the 4KB block size get "passed-through" to the guest somehow > >>so that the guest knows it needs to use 4KB blocks, or does that need

Re: [Qemu-devel] [PATCH v2 07/13] tcg/i386: implement goto_ptr op

2017-04-25 Thread Richard Henderson
On 04/25/2017 09:53 AM, Emilio G. Cota wrote: static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) { +static const TCGTargetOpDef ri = { .args_ct_str = { "ri" } }; static const TCGTargetOpDef ri_r = { .args_ct_str = { "ri", "r" } }; static const TCGTargetOpDef re_r = {

Re: [Qemu-devel] [PATCH 1/3] colo-compare: serialize compare thread's initialization with main thread

2017-04-25 Thread Jason Wang
On 2017年04月25日 17:59, Hailiang Zhang wrote: On 2017/4/25 16:41, Jason Wang wrote: On 2017年04月24日 14:03, Hailiang Zhang wrote: On 2017/4/24 12:10, Jason Wang wrote: On 2017年04月20日 15:46, zhanghailiang wrote: We call qemu_chr_fe_set_handlers() in colo-compare thread, it is used to detach wat

Re: [Qemu-devel] [PATCH v2] hw/arm/exynos: Add generic SDHCI devices

2017-04-25 Thread Peter Maydell
On 22 April 2017 at 20:07, Krzysztof Kozlowski wrote: > Exynos4210 has four SD/MMC controllers supporting: > - SD Standard Host Specification Version 2.0, > - MMC Specification Version 4.3, > - SDIO Card Specification Version 2.0, > - DMA and ADMA. > > Add emulation of SDHCI devices which allo

Re: [Qemu-devel] [BUG] QEMU crashes with dpdk virtio pmd

2017-04-25 Thread wangyunjian
The q->tx_bh will free in virtio_net_del_queue() function, when remove virtio queues if the guest doesn't support multiqueue. But it might be still referenced by others (eg . virtio_net_set_status()), which need so set NULL. diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7d091c9..

Re: [Qemu-devel] [PATCH RESEND v2 01/18] net/colo: Add notifier/callback related helpers for filter

2017-04-25 Thread Jason Wang
On 2017年04月22日 16:35, zhanghailiang wrote: We will use this notifier to help COLO to notify filter object to do something, like do checkpoint, or process failover event. Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian --- net/colo.c | 105 +

[Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25

2017-04-25 Thread Alexander Graf
Hi Peter, This is my current patch queue for s390. Please pull. Alex The following changes since commit f4b5b021c847669b1c78050aea26fe9abceef6dd: Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-04-25 09:21:54 +0100) are available in the git repositor

Re: [Qemu-devel] [PATCH v8] Allow setting NUMA distance for different NUMA nodes

2017-04-25 Thread Igor Mammedov
On Tue, 25 Apr 2017 09:52:33 +0800 He Chen wrote: > This patch is going to add SLIT table support in QEMU, and provides > additional option `dist` for command `-numa` to allow user set vNUMA > distance by QEMU command. > > With this patch, when a user wants to create a guest that contains > seve

[Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit.

2017-04-25 Thread Alexander Graf
From: Philipp Kern According to "CPU Signaling and Response", "Signal-Processor Orders", the order field is bit position 56-63. Without this, the Linux guest kernel is sometimes unable to stop emulation and enters an infinite loop of "XXX unknown sigp: 0x0005". Signed-off-by: Philipp

[Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL

2017-04-25 Thread Alexander Graf
From: Aurelien Jarno s390_virtio_hypercall can trigger IO events and interrupts, most notably when using virtio-ccw devices. Reviewed-by: Alexander Graf Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé Fixes: 278f5e98c647 ("s390x/misc_helper.c: wrap IO instructions in BQL") S

Re: [Qemu-devel] [PATCH 3/6] migration: add UFFD_FEATURE_THREAD_ID feature support

2017-04-25 Thread Alexey Perevalov
On 04/25/2017 02:14 PM, Dr. David Alan Gilbert wrote: * Alexey (a.pereva...@samsung.com) wrote: + Andrea Arcangeli On Mon, Apr 24, 2017 at 06:10:02PM +0100, Dr. David Alan Gilbert wrote: * Alexey (a.pereva...@samsung.com) wrote: On Mon, Apr 24, 2017 at 04:12:29PM +0800, Peter Xu wrote: On Fr

Re: [Qemu-devel] [PATCH] ram: Split dirty bitmap by RAMBlock

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 18:11, Juan Quintela wrote: Both the ram bitmap and the unsent bitmap are split by RAMBlock. Signed-off-by: Juan Quintela --- include/exec/ram_addr.h | 13 +- include/migration/postcopy-ram.h | 3 - migration/postcopy-ram.c | 5 +- migration/ram.c

Re: [Qemu-devel] [virtio-comment] Re: [RFC 1/2] spec/vhost-user: Introduce secondary channel for slave initiated requests

2017-04-25 Thread Maxime Coquelin
Hi Wei, On 04/24/2017 10:05 AM, Wei Wang wrote: On 04/14/2017 05:03 PM, Marc-André Lureau wrote: Hi On Tue, Apr 11, 2017 at 5:53 PM Maxime Coquelin mailto:maxime.coque...@redhat.com>> wrote: Hi Marc-André, On 04/11/2017 03:06 PM, Marc-André Lureau wrote: > Hi > > On Tue

Re: [Qemu-devel] [PATCH] COLO-compare: Add compare_lock aviod comparison conflict

2017-04-25 Thread Zhang Chen
On 04/20/2017 02:40 PM, Jason Wang wrote: On 2017年04月20日 14:36, Zhang Chen wrote: On 04/20/2017 02:20 PM, Hailiang Zhang wrote: On 2017/4/20 12:32, Zhang Chen wrote: When network traffic heavy, compare_pri_rs_finalize() and compare_sec_rs_finalize() have a chance to confilct. Both of the

Re: [Qemu-devel] [PATCH 1/2] migration: Move check_migratable() into qdev.c

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:17, Juan Quintela wrote: > The function is only used once, and nothing else in migration knows > about objects. Create the function vmstate_device_is_migratable() in > savem.c that really do the bit that is related with migration. > > Signed-off-by: Juan Quintela Reviewed-by: L

Re: [Qemu-devel] [BUG] QEMU crashes with dpdk virtio pmd

2017-04-25 Thread Jason Wang
On 2017年04月25日 19:37, wangyunjian wrote: The q->tx_bh will free in virtio_net_del_queue() function, when remove virtio queues if the guest doesn't support multiqueue. But it might be still referenced by others (eg . virtio_net_set_status()), which need so set NULL. diff --git a/hw/net/virtio

[Qemu-devel] [PATCH 00/13] armv7m: Implement MPU support

2017-04-25 Thread Peter Maydell
This patchset implements support for the MPU in our v7M cores. Support is on the same level as that for the R profile MPU: it works, but regions smaller than 1K in size are not supported. It likely has some missing corner-case features. The patchset can be divided into three parts: * patches 1.

[Qemu-devel] [PATCH 05/13] arm: Don't clear ARM_FEATURE_PMSA for no-mpu configs

2017-04-25 Thread Peter Maydell
Fix the handling of QOM properties for PMSA CPUs with no MPU: Allow no-MPU to be specified by either: * has-mpu = false * pmsav7_dregion = 0 and make setting one imply the other. Don't clear the PMSA feature bit in this situation. Signed-off-by: Peter Maydell --- target/arm/cpu.c | 8 +++-

[Qemu-devel] [PATCH 03/13] arm: Use different ARMMMUIdx values for M profile

2017-04-25 Thread Peter Maydell
Make M profile use completely separate ARMMMUIdx values from those that A profile CPUs use. This is a prelude to adding support for the MPU and for v8M, which together will require 6 MMU indexes which don't map cleanly onto the A profile uses: non secure User non secure Privileged non secure Pri

[Qemu-devel] [PATCH 06/13] arm: Don't let no-MPU PMSA cores write to SCTLR.M

2017-04-25 Thread Peter Maydell
If the CPU is a PMSA config with no MPU implemented, then the SCTLR.M bit should be RAZ/WI, so that the guest can never turn on the non-existent MPU. Signed-off-by: Peter Maydell --- target/arm/helper.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/arm/helper.c b/target/arm/hel

[Qemu-devel] [PATCH 13/13] arm: Implement HFNMIENA support for M profile MPU

2017-04-25 Thread Peter Maydell
Implement HFNMIENA support for the M profile MPU. This bit controls whether the MPU is treated as enabled when executing at execution priorities of less than zero (in NMI, HardFault or with the FAULTMASK bit set). Doing this requires us to use a different MMU index for "running at execution priori

[Qemu-devel] [PATCH 01/13] arm: Use the mmu_idx we're passed in arm_cpu_do_unaligned_access()

2017-04-25 Thread Peter Maydell
When identifying the DFSR format for an alignment fault, use the mmu index that we are passed, rather than calling cpu_mmu_index() to get the mmu index for the current CPU state. This doesn't actually make any difference since the only cases where the current MMU index differs from the index used f

[Qemu-devel] [PATCH 10/13] arm: All M profile cores are PMSA

2017-04-25 Thread Peter Maydell
All M profile CPUs are PMSA, so set the feature bit. (We haven't actually implemented the M profile MPU register interface yet, but setting this feature bit gives us closer to correct behaviour for the MPU-disabled case.) Signed-off-by: Peter Maydell --- target/arm/cpu.c | 8 1 file cha

[Qemu-devel] [PATCH 11/13] armv7m: Classify faults as MemManage or BusFault

2017-04-25 Thread Peter Maydell
From: Michael Davidsaver General logic is that operations stopped by the MPU are MemManage, and those which go through the MPU and are caught by the unassigned handle are BusFault. Distinguish these by looking at the exception.fsr values, and set the CFSR bits and (if appropriate) fill in the BFA

[Qemu-devel] [PATCH 02/13] arm: Add support for M profile CPUs having different MMU index semantics

2017-04-25 Thread Peter Maydell
The M profile CPU's MPU has an awkward corner case which we would like to implement with a different MMU index. We can avoid having to bump the number of MMU modes ARM uses, because some of our existing MMU indexes are only used by non-M-profile CPUs, so we can borrow one. To avoid that getting to

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Fix macOS 10.12 deprecation warnings

2017-04-25 Thread Peter Maydell
On 25 April 2017 at 07:29, Brendan Shanks wrote: > macOS 10.12 deprecated/replaced many AppKit constants to make naming > more consistent. Use the new constants, and #define them to the > old constants when compiling against a pre-10.12 SDK. > > Signed-off-by: Brendan Shanks > --- > ui/cocoa.m |

[Qemu-devel] [PATCH 08/13] armv7m: Improve "-d mmu" tracing for PMSAv7 MPU

2017-04-25 Thread Peter Maydell
From: Michael Davidsaver Improve the "-d mmu" tracing for the PMSAv7 MPU translation process as an aid in debugging guest MPU configurations: * fix a missing newline for a guest-error log * report the region number with guest-error or unimp logs of bad region register values * add a log mes

Re: [Qemu-devel] [PATCH] COLO-compare: Add compare_lock aviod comparison conflict

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 19:57, Zhang Chen wrote: On 04/20/2017 02:40 PM, Jason Wang wrote: On 2017年04月20日 14:36, Zhang Chen wrote: On 04/20/2017 02:20 PM, Hailiang Zhang wrote: On 2017/4/20 12:32, Zhang Chen wrote: When network traffic heavy, compare_pri_rs_finalize() and compare_sec_rs_finalize() ha

Re: [Qemu-devel] [PATCH v2 06/13] tcg: add goto_ptr opcode

2017-04-25 Thread Richard Henderson
On 04/25/2017 09:53 AM, Emilio G. Cota wrote: +void tcg_gen_goto_ptr(TCGv_ptr ptr) +{ +if (TCG_TARGET_HAS_goto_ptr) { +tcg_gen_op1i(INDEX_op_goto_ptr, GET_TCGV_PTR(ptr)); +} else { +tcg_gen_exit_tb(0); +} +} + I think this function should look more like void tcg_gen

Re: [Qemu-devel] [PATCH] COLO-compare: Add compare_lock aviod comparison conflict

2017-04-25 Thread Zhang Chen
On 04/25/2017 08:07 PM, Hailiang Zhang wrote: On 2017/4/25 19:57, Zhang Chen wrote: On 04/20/2017 02:40 PM, Jason Wang wrote: On 2017年04月20日 14:36, Zhang Chen wrote: On 04/20/2017 02:20 PM, Hailiang Zhang wrote: On 2017/4/20 12:32, Zhang Chen wrote: When network traffic heavy, compare_p

[Qemu-devel] [PATCH 04/13] arm: Clean up handling of no-MPU PMSA CPUs

2017-04-25 Thread Peter Maydell
ARM CPUs come in two flavours: * proper MMU ("VMSA") * only an MPU ("PMSA") For PMSA, the MPU may be implemented, or not (in which case there is default "always acts the same" behaviour, but it isn't guest programmable). QEMU is a bit confused about how we indicate this: we have an ARM_FEATURE_M

[Qemu-devel] [PATCH 09/13] armv7m: Implement M profile default memory map

2017-04-25 Thread Peter Maydell
From: Michael Davidsaver Add support for the M profile default memory map which is used if the MPU is not present or disabled. The main differences in behaviour from implementing this correctly are that we set the PAGE_EXEC attribute on the right regions of memory, such that device regions are n

[Qemu-devel] [PATCH 07/13] arm: Remove unnecessary check on cpu->pmsav7_dregion

2017-04-25 Thread Peter Maydell
Now that we enforce both: * pmsav7_dregion == 0 implies has_mpu == false * PMSA with has_mpu == false means SCTLR.M cannot be set we can remove a check on pmsav7_dregion from get_phys_addr_pmsav7(), because we can only reach this code path if the MPU is enabled (and so region_translation_disabled

[Qemu-devel] [PATCH 12/13] arm: add MPU support to M profile CPUs

2017-04-25 Thread Peter Maydell
From: Michael Davidsaver The M series MPU is almost the same as the already implemented R profile MPU (v7 PMSA). So all we need to implement here is the MPU register interface in the system register space. This implementation has the same restriction as the R profile MPU that it doesn't permit

Re: [Qemu-devel] [PATCH 2/2] migration: to_dst_file at that point is NULL

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:17, Juan Quintela wrote: > We have just arrived as: > > migration.c: qemu_migrate() > > s = migrate_init() <- puts it to NULL > > {tcp,unix}_start_outgoing_migration -> > socket_outgoing_migration > migration_channel_connect() > sets to_dst_

Re: [Qemu-devel] [PATCH v8] Allow setting NUMA distance for different NUMA nodes

2017-04-25 Thread Andrew Jones
On Tue, Apr 25, 2017 at 09:52:33AM +0800, He Chen wrote: > This patch is going to add SLIT table support in QEMU, and provides > additional option `dist` for command `-numa` to allow user set vNUMA > distance by QEMU command. > > With this patch, when a user wants to create a guest that contains >

Re: [Qemu-devel] [PATCH 2/2] migration: to_dst_file at that point is NULL

2017-04-25 Thread Juan Quintela
Laurent Vivier wrote: > On 25/04/2017 12:17, Juan Quintela wrote: >> We have just arrived as: >> >> migration.c: qemu_migrate() >> >> s = migrate_init() <- puts it to NULL >> >> {tcp,unix}_start_outgoing_migration -> >> socket_outgoing_migration >> migration_channel

Re: [Qemu-devel] [PATCH] ram: Split dirty bitmap by RAMBlock

2017-04-25 Thread Juan Quintela
Hailiang Zhang wrote: > On 2017/4/25 18:11, Juan Quintela wrote: >> Both the ram bitmap and the unsent bitmap are split by RAMBlock. >> >> Signed-off-by: Juan Quintela >> --- >> include/exec/ram_addr.h | 13 +- >> include/migration/postcopy-ram.h | 3 - >> migration/postcopy-ram.c

[Qemu-devel] [PATCH] vmw_pvscsi: check message ring page count at initialisation

2017-04-25 Thread P J P
Vmware Paravirtual SCSI emulation uses command descriptors to process SCSI commands. These come with their message ring buffers. A guest could set the message ring page count to an arbitrary value resulting in infinite loop. Add check to avoid it. Reported-by: YY Z Signed-off-by: P J P --- hw/s

[Qemu-devel] [PATCH] input: don't queue delay if paused

2017-04-25 Thread Marc-André Lureau
qemu_input_event_send() discards key event when the guest is paused, but not the delay. The delay ends up in the input queue, and qemu_input_event_send_key() will further fill the queue with upcoming events. VNC uses qemu_input_event_send_key_delay(), not SPICE, which results in a different input

Re: [Qemu-devel] [PATCH 2/2] migration: to_dst_file at that point is NULL

2017-04-25 Thread Laurent Vivier
On 25/04/2017 14:59, Juan Quintela wrote: > Laurent Vivier wrote: >> On 25/04/2017 12:17, Juan Quintela wrote: >>> We have just arrived as: >>> >>> migration.c: qemu_migrate() >>> >>> s = migrate_init() <- puts it to NULL >>> >>> {tcp,unix}_start_outgoing_migration -> >>> so

Re: [Qemu-devel] [PATCH 2/2] migration: to_dst_file at that point is NULL

2017-04-25 Thread Daniel P. Berrange
On Tue, Apr 25, 2017 at 12:17:58PM +0200, Juan Quintela wrote: > We have just arrived as: > > migration.c: qemu_migrate() > > s = migrate_init() <- puts it to NULL > > {tcp,unix}_start_outgoing_migration -> > socket_outgoing_migration > migration_channel_connect() >

Re: [Qemu-devel] [PULL 0/4] hmp queue

2017-04-25 Thread Peter Maydell
gt; staging (2017-04-25 09:21:54 +0100) > > are available in the git repository at: > > git://github.com/dagrh/qemu.git tags/pull-hmp-20170425 > > for you to fetch changes up to 1eb8e78dd1cd4e0b4170fd42f6d8882c867f334b: > > t

Re: [Qemu-devel] [PATCH 1/9] Add ppc.risu file

2017-04-25 Thread Eric Blake
On 04/24/2017 10:17 PM, G 3 wrote: > Add the ppc.risu file. It defines the format for various PowerPC > instructions. Your emails are missing In-Reply-To and References headers, which means you posted 10 top-level threads instead of 9 replies to the 0/9 cover letter. Please fix that, as it becomes

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Eric Blake
On 04/25/2017 01:51 AM, Cédric Le Goater wrote: > Currenlty, the code relies on the fact that open() handles NULL > filenames but that can cause an error with new clang: POSIX doesn't require it to work. Linux is nice and gives you EFAULT, but there are systems where open(NULL) crashes with SIGSEG

[Qemu-devel] [PATCH] hw/s390x/ipl: Fix crash with virtio-scsi-pci device

2017-04-25 Thread Thomas Huth
qemu-system-s390x currently crashes when it is started with a virtio-scsi-pci device, e.g.: qemu-system-s390x -nographic -enable-kvm -device virtio-scsi-pci \ -drive file=/tmp/disk.dat,if=none,id=d1,format=raw \ -device scsi-cd,drive=d1,bootindex=1 The probl

Re: [Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.

2017-04-25 Thread Eric Blake
On 04/25/2017 03:08 AM, Thomas Huth wrote: > If the user needs to specify the disk geometry, the corresponding > parameters of the "-drive" option should be used instead. "-hdachs" > is considered as deprecated and might be removed soon. > > Signed-off-by: Thomas Huth > --- > vl.c | 2 ++ > 1 fi

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

2017-04-25 Thread Eric Blake
On 04/25/2017 12:16 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] [PATCH 1/6] monitor: Remove monitor parameter from save_vmstate

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:24, Juan Quintela wrote: > load_vmstate() already use error_report, so be consistent. There is > an identical error message in load_vmstate() that ends in a > period. Remove it. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier > --- > include/sysemu/sysemu.h |

Re: [Qemu-devel] postcopy migration hangs while loading virtio state

2017-04-25 Thread Christian Borntraeger
On 04/24/2017 09:12 PM, Dr. David Alan Gilbert wrote: > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: >> On 04/24/2017 04:35 PM, Dr. David Alan Gilbert wrote: >>> * Christian Borntraeger (borntrae...@de.ibm.com) wrote: On 04/24/2017 12:53 PM, Dr. David Alan Gilbert wrote: > * Chr

Re: [Qemu-devel] [PATCH] COLO-compare: Add compare_lock aviod comparison conflict

2017-04-25 Thread Eric Blake
On 04/19/2017 11:32 PM, Zhang Chen wrote: In the subject: s/aviod/avoid/ > When network traffic heavy, compare_pri_rs_finalize() and > compare_sec_rs_finalize() have a chance to confilct. s/confilct/conflict/ > Both of them call colo_compare_connection() to compare packet, > But during compare_

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Peter Maydell
On 25 April 2017 at 07:51, Cédric Le Goater wrote: > Currenlty, the code relies on the fact that open() handles NULL > filenames but that can cause an error with new clang: > > hw/core/loader.c:67:15: runtime error: null pointer passed as argument 1, > which is declared to never be null This

Re: [Qemu-devel] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue

2017-04-25 Thread Peter Maydell
On 25 April 2017 at 14:18, Kamil Rytarowski wrote: > Appease pkgsrc and use portable shell variable comparison. > This switches "==" to "=". It should not be a functional change. > > Signed-off-by: Kamil Rytarowski > --- Thanks for this patch; it's an easy bug to let slip in if your /bin/sh happ

Re: [Qemu-devel] [PATCH 3/6] monitor: Move hmp_savevm from savevm.c to hmp.c

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:24, Juan Quintela wrote: > It is a monitor command, and has nothing migration specific in it. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier > --- > hmp.c | 5 + > hmp.h | 1 + > include/sysemu/sysemu.h | 1 - > migration/

Re: [Qemu-devel] [PATCH 4/6] monitor: Move hmp_delvm from savevm.c to hmp.c

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:24, Juan Quintela wrote: > It really uses block/* stuff, not migration one. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier > --- > hmp.c | 13 + > hmp.h | 1 + > include/sysemu/sysemu.h | 1 - > migration/savevm.

Re: [Qemu-devel] [PATCH 2/6] monitor: Move hmp_loadvm from monitor.c to hmp.c

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:24, Juan Quintela wrote: > We are going to move the rest of hmp snapshots functions there instead > of monitor.c. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier > --- > hmp.c | 13 + > hmp.h | 1 + > monitor.c | 13 - > 3 files c

Re: [Qemu-devel] [Qemu-stable] [PATCH v2 1/1] qemu-img: wait for convert coroutines to complete

2017-04-25 Thread Peter Lieven
Am 25.04.2017 um 11:55 schrieb Peter Lieven: Am 24.04.2017 um 22:13 schrieb Anton Nefedov: On 24/04/2017 21:16, Peter Lieven wrote: Am 24.04.2017 um 18:27 schrieb Anton Nefedov : On 04/21/2017 03:37 PM, Peter Lieven wrote: Am 21.04.2017 um 14:19 schrieb Anton Nefedov: On 04/21/2017 01:4

Re: [Qemu-devel] [PATCH v2] crypto_gen_random() now also works on windows

2017-04-25 Thread Daniel P. Berrange
On Mon, Apr 24, 2017 at 07:51:49PM +0200, Geert Martin Ijewski wrote: > If no crypto library is included in the build QEMU uses > qcrypto_random_bytes() to generate random data. That function tried to open > /dev/urandom or /dev/random and if openeing neither file worked it errored > out. > > Thos

Re: [Qemu-devel] NetBSD maintenance

2017-04-25 Thread Kamil Rytarowski
On 24.04.2017 12:12, Peter Maydell wrote: > Upstream we're definitely going to drop SunOS/Solaris support unless > somebody provides us with a machine we can do build/test on. > DragonFly BSD is in my "let's see if anybody complains" list. > OpenBSD is also in this "let's see" list but it seems mor

Re: [Qemu-devel] [PULL V2 0/8] Net patches

2017-04-25 Thread Peter Maydell
On 25 April 2017 at 12:26, Jason Wang wrote: > The following changes since commit 32c7e0ab755745e961f1772e95cac381cc68769d: > > Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170421' > into staging (2017-04-21 15:59:27 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue

2017-04-25 Thread Kamil Rytarowski
On 25.04.2017 15:33, Peter Maydell wrote: > On 25 April 2017 at 14:18, Kamil Rytarowski wrote: >> Appease pkgsrc and use portable shell variable comparison. >> This switches "==" to "=". It should not be a functional change. >> >> Signed-off-by: Kamil Rytarowski >> --- > > Thanks for this patch;

Re: [Qemu-devel] [PATCH v2] crypto_gen_random() now also works on windows

2017-04-25 Thread Eric Blake
On 04/25/2017 08:42 AM, Daniel P. Berrange wrote: > On Mon, Apr 24, 2017 at 07:51:49PM +0200, Geert Martin Ijewski wrote: >> If no crypto library is included in the build QEMU uses >> qcrypto_random_bytes() to generate random data. That function tried to open >> /dev/urandom or /dev/random and if o

Re: [Qemu-devel] [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue

2017-04-25 Thread Eric Blake
On 04/25/2017 08:50 AM, Kamil Rytarowski wrote: > On 25.04.2017 15:33, Peter Maydell wrote: >> On 25 April 2017 at 14:18, Kamil Rytarowski wrote: >>> Appease pkgsrc and use portable shell variable comparison. >>> This switches "==" to "=". It should not be a functional change. >>> >>> Signed-off-b

Re: [Qemu-devel] [PATCH v2] crypto_gen_random() now also works on windows

2017-04-25 Thread Daniel P. Berrange
On Tue, Apr 25, 2017 at 08:52:58AM -0500, Eric Blake wrote: > On 04/25/2017 08:42 AM, Daniel P. Berrange wrote: > > On Mon, Apr 24, 2017 at 07:51:49PM +0200, Geert Martin Ijewski wrote: > >> If no crypto library is included in the build QEMU uses > >> qcrypto_random_bytes() to generate random data.

Re: [Qemu-devel] [PULL 0/4] hmp queue

2017-04-25 Thread Dr. David Alan Gilbert
erge remote-tracking branch 'remotes/cody/tags/block-pull-request' into > > staging (2017-04-25 09:21:54 +0100) > > > > are available in the git repository at: > > > > git://github.com/dagrh/qemu.git tags/pull-hmp-20170425 > > > > for you to f

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Cédric Le Goater
On 04/25/2017 03:31 PM, Peter Maydell wrote: > On 25 April 2017 at 07:51, Cédric Le Goater wrote: >> Currenlty, the code relies on the fact that open() handles NULL >> filenames but that can cause an error with new clang: >> >> hw/core/loader.c:67:15: runtime error: null pointer passed as argume

Re: [Qemu-devel] [PULL 0/4] hmp queue

2017-04-25 Thread Thomas Huth
-tracking branch 'remotes/cody/tags/block-pull-request' into >> staging (2017-04-25 09:21:54 +0100) >> >> are available in the git repository at: >> >> git://github.com/dagrh/qemu.git tags/pull-hmp-20170425 >> >> for you to fetch changes up to 1eb

Re: [Qemu-devel] [PATCH for-2.10 02/23] hw/arm/virt: extract mp-affinity calculation in separate function

2017-04-25 Thread Andrew Jones
On Wed, Mar 22, 2017 at 02:32:27PM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > hw/arm/virt.c | 59 > ++- > 1 file changed, 42 insertions(+), 17 deletions(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 5f62

[Qemu-devel] [PATCH RFC v2] target/openrisc: Support non-busy idle state using PMR SPR

2017-04-25 Thread Stafford Horne
The OpenRISC architecture has the Power Management Register (PMR) special purpose register to manage cpu power states. The interesting modes are: * Doze Mode (DME) - Stop cpu except timer & pic - wake on interrupt * Sleep Mode (SME) - Stop cpu and all units - wake on interrupt * Suspend Model

Re: [Qemu-devel] [PATCH 1/9] Add ppc.risu file

2017-04-25 Thread G 3
On Apr 25, 2017, at 4:14 AM, Peter Maydell wrote: On 25 April 2017 at 04:17, G 3 wrote: Add the ppc.risu file. It defines the format for various PowerPC instructions. Signed-off-by: John Arbuckle --- ppc.risu | 527 +++ 1 file cha

Re: [Qemu-devel] [PATCH 5/6] monitor: Move hmp_info_snapshots from savevm.c to hmp.c

2017-04-25 Thread Laurent Vivier
On 25/04/2017 12:24, Juan Quintela wrote: > It only uses block/* functions, nothing from migration. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Perhaps the monitor.h include in savevm.c can be removed in PATCH 1/6? Laurent > --- > hmp.c | 143 +

Re: [Qemu-devel] [PATCH 3/9] Add risu_reginfo_ppc.c file

2017-04-25 Thread G 3
On Apr 25, 2017, at 4:17 AM, Peter Maydell wrote: On 25 April 2017 at 04:19, G 3 wrote: Add the risu_reginfo_ppc.c file. It handles operations involving the reginfo structure. +/* check each floating point register */ +for (i = 0; i < NUMBER_OF_FPR; i++) { +if (r1->fpr[i]

Re: [Qemu-devel] [PATCH RFC] target/openrisc: Support non-busy idle state using PMR SPR

2017-04-25 Thread Stafford Horne
On Tue, Apr 25, 2017 at 12:11:00PM +0200, Richard Henderson wrote: > On 04/23/2017 11:54 PM, Stafford Horne wrote: > > The OpenRISC architecture has the Power Management Register (PMR) > > special purpose register to manage cpu power states. The interesting > > modes are: > > > > * Doze Mode (D

[Qemu-devel] ping Re: [PATCH 3/4] savevm: fix savevm after migration

2017-04-25 Thread Vladimir Sementsov-Ogievskiy
29.03.2017 18:53, Paolo Bonzini wrote: On 29/03/2017 17:29, Dr. David Alan Gilbert wrote: 'abort' is not very good too I think. migration is completed, nothing to abort.. (may be successful migration to file for suspend, some kind of vm cloning, etc) There is already migrate_cancel. Does it m

Re: [Qemu-devel] [PATCH 2/9] Add risu_ppc.c file

2017-04-25 Thread G 3
On Apr 25, 2017, at 4:36 AM, Peter Maydell wrote: On 25 April 2017 at 04:18, G 3 wrote: Add the risu_ppc.c file. It defines several functions used by risu. Signed-off-by: John Arbuckle --- risu_ppc.c | 41 + 1 file changed, 41 insertions(+) create m

Re: [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25

2017-04-25 Thread Peter Maydell
On 25 April 2017 at 12:42, Alexander Graf wrote: > Hi Peter, > > This is my current patch queue for s390. Please pull. > > Alex > > > The following changes since commit f4b5b021c847669b1c78050aea26fe9abceef6dd: > > Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into > stag

Re: [Qemu-devel] [PATCH for-2.10 02/23] hw/arm/virt: extract mp-affinity calculation in separate function

2017-04-25 Thread Igor Mammedov
On Tue, 25 Apr 2017 16:09:26 +0200 Andrew Jones wrote: > On Wed, Mar 22, 2017 at 02:32:27PM +0100, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/arm/virt.c | 59 > > ++- > > 1 file changed, 42 insertions(+), 17 dele

Re: [Qemu-devel] [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue

2017-04-25 Thread Laurent Vivier
On 25/04/2017 15:33, Peter Maydell wrote: > On 25 April 2017 at 14:18, Kamil Rytarowski wrote: >> Appease pkgsrc and use portable shell variable comparison. >> This switches "==" to "=". It should not be a functional change. >> >> Signed-off-by: Kamil Rytarowski >> --- > > Thanks for this patch;

Re: [Qemu-devel] [PATCH for-2.10 03/23] hw/arm/virt: use machine->possible_cpus for storing possible topology info

2017-04-25 Thread Andrew Jones
On Wed, Mar 22, 2017 at 02:32:28PM +0100, Igor Mammedov wrote: > for now precalculate and store mp_afinity in possible_cpus > as ARM cpus don't have socket/core/thread-id properties yet. > In follow patches possible_cpus will be used for storing > and setting NUMA node mapping and replace legacy bi

Re: [Qemu-devel] [PATCH for-2.10 04/23] hw/arm/virt: explicitly allocate cpu_index for cpus

2017-04-25 Thread Andrew Jones
On Wed, Mar 22, 2017 at 02:32:29PM +0100, Igor Mammedov wrote: > Currently cpu_index is implicitly auto assigned during > cpu.realize() time cpu_exec_realizefn()->cpu_list_add(). > > It happens to match index in possible_cpus so take > control over it and make board initialize cpu_index > to possi

Re: [Qemu-devel] [PATCH for-2.10 03/23] hw/arm/virt: use machine->possible_cpus for storing possible topology info

2017-04-25 Thread Igor Mammedov
On Tue, 25 Apr 2017 16:28:27 +0200 Andrew Jones wrote: > On Wed, Mar 22, 2017 at 02:32:28PM +0100, Igor Mammedov wrote: > > for now precalculate and store mp_afinity in possible_cpus > > as ARM cpus don't have socket/core/thread-id properties yet. > > In follow patches possible_cpus will be used

<    1   2   3   4   5   >