Re: [Qemu-devel] [PATCH] iothread: check iothread->ctx before aio_context_unref to avoid assertion

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 07:29, Lin Ma wrote: > if iothread->ctx is set to NULL, aio_context_unref triggers the assertion: > g_source_unref: assertion 'source != NULL' failed. > The patch fixes it. > > Signed-off-by: Lin Ma > --- > iothread.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/i

Re: [Qemu-devel] [PATCH v2]MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 05:37, zhong...@sangfor.com.cn wrote: > Hi, Paolo > This is a simplified patch according to your advice. Would you please reiview > it again. > > > separation > line > > > MC146818 RTC: coordinate

Re: [Qemu-devel] How does a guest OS differentiate between a Reboot/Shutdown ACPI event

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 04:38, Srinivasan J wrote: > > I have Ubuntu 14.04.1 (ubuntu-14.04.1-server-amd64.iso) guest running > in a KVM host. The host is running Ubuntu 16.04. I'm trying to find > out how Ubuntu 14.04.1 differentiates between virsh shutdown and virsh > reboot commands issued in the host.

Re: [Qemu-devel] [PATCH 2/2] build-sys: put glib_cflags in QEMU_CFLAGS

2016-09-26 Thread Paolo Bonzini
On 25/09/2016 22:57, Marc-André Lureau wrote: > This way, overriding CFLAGS on make command line keeps glib-cflags > and doesn't break the build. > > Signed-off-by: Marc-André Lureau > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configu

Re: [Qemu-devel] [PATCH 0/6] intc: change 'info irq' and 'info pic' to be target-agnostic

2016-09-26 Thread Paolo Bonzini
On 25/09/2016 20:36, Hervé Poussineau wrote: > > This patchset aims at genericizing the 'info irq' and 'info pic' HMP > commands, so > that it is available on all machines and can display details about more than > one > interrupt controller per machine. > > Patch 1 adds a new interface IntCtr

Re: [Qemu-devel] [PATCH]MC146818 RTC: Get correct guest time when irq coalesced

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 06:37, zhong...@sangfor.com.cn wrote: > Hi, Paolo > This is another patch arround RTC. Would you please have a review. > > --separation- > > MC146818 RTC: Get correct guest time when irq coalesced > > When irq coales

Re: [Qemu-devel] [PULL 00/19] virtio, pc: fixes and features

2016-09-26 Thread Paolo Bonzini
On 25/09/2016 02:49, Michael S. Tsirkin wrote: > > Not quite, there's no reason for the ops to be inside AMDVIState rather > > than a (static) global. > > I guess but it's a logic refactoring, not merely a style one. > I feel we can do it on top, tool shouldn't require this. We can do it on top

Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination

2016-09-26 Thread Paolo Bonzini
On 25/09/2016 13:33, Herongguang (Stephen) wrote: > Tested-by: He Rongguang Thanks! Paolo

Re: [Qemu-devel] [PATCH 8/9] target-cris: add v17 CPU

2016-09-26 Thread Rabin Vincent
On Tue, Sep 13, 2016 at 12:18:00AM +0200, Edgar E. Iglesias wrote: > On Mon, Sep 05, 2016 at 01:54:11PM +0200, Rabin Vincent wrote: > > diff --git a/target-cris/translate_v10.c b/target-cris/translate_v10.c > > index a3da425..33d86eb 100644 > > --- a/target-cris/translate_v10.c > > +++ b/target-cri

Re: [Qemu-devel] [PATCH 16/16] cpus-common: lock-free fast path for cpu_exec_start/end

2016-09-26 Thread Paolo Bonzini
On 24/09/2016 22:43, Richard Henderson wrote: >>> I don't see that the cpu_list_lock protects the >>> last two lines in any way. >> >> It does: >> >> qemu_mutex_lock(&qemu_cpu_list_lock); > > What I meant is that I don't see that the mutex avoids the need for > atomic_set. Oh, I see. c

Re: [Qemu-devel] [PATCH 15/16] tcg: Make tb_flush() thread safe

2016-09-26 Thread Paolo Bonzini
On 24/09/2016 22:44, Richard Henderson wrote: > On 09/24/2016 04:51 AM, Paolo Bonzini wrote: >> >> >> - Original Message - >>> From: "Richard Henderson" >>> To: "Paolo Bonzini" , qemu-devel@nongnu.org >>> Cc: "serge fdrv" , c...@braap.org, "alex >>> bennee" , "sergey fedorov" >>> >>> Se

Re: [Qemu-devel] [PATCH 6/9] target-cris: reduce v32isms from v10 log dumps

2016-09-26 Thread Rabin Vincent
On Tue, Sep 13, 2016 at 12:59:51AM +0200, Edgar E. Iglesias wrote: > On Mon, Sep 05, 2016 at 01:54:09PM +0200, Rabin Vincent wrote: > > @@ -3363,14 +3371,16 @@ void cris_cpu_dump_state(CPUState *cs, FILE *f, > > fprintf_function cpu_fprintf, > > cpu_fprintf(f, "\n"); > > } >

Re: [Qemu-devel] [PATCH 16/16] cpus-common: lock-free fast path for cpu_exec_start/end

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > On 24/09/2016 22:43, Richard Henderson wrote: I don't see that the cpu_list_lock protects the last two lines in any way. >>> >>> It does: >>> >>> qemu_mutex_lock(&qemu_cpu_list_lock); >> >> What I meant is that I don't see that the mutex avoids the need

Re: [Qemu-devel] [PATCH 0/3] RDMA error handling

2016-09-26 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@digitalocean.com) wrote: > Reviewed-by: Michael R. Hines > > (By the way, I no longer work for IBM and no longer have direct access to > RDMA hardware. If someone is willing to let me login to something that does > in the future, I don't mind debugging things. I just

Re: [Qemu-devel] [PATCH 1/1] dtc: Update dtc / libfdt submodule to version 1.4.2

2016-09-26 Thread Paul Burton
On Monday, 26 September 2016 00:51:05 BST Jeff Cody wrote: > There are some patch series which rely on version 1.4.2 of dtc, so > update the submodule version. > > Signed-off-by: Jeff Cody > --- > dtc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dtc b/dtc > index 65c

Re: [Qemu-devel] [PATCH 1/1] dtc: Update dtc / libfdt submodule to version 1.4.2

2016-09-26 Thread Thomas Huth
On 26.09.2016 06:51, Jeff Cody wrote: > There are some patch series which rely on version 1.4.2 of dtc, so > update the submodule version. > > Signed-off-by: Jeff Cody > --- > dtc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dtc b/dtc > index 65cc4d2..ec02b34 16

Re: [Qemu-devel] [PATCH 06/16] cpus-common: move CPU list management to common code

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > Add a mutex for the CPU list to system emulation, as it will be used to > manage safe work. Abstract manipulation of the CPU list in new functions > cpu_list_add and cpu_list_remove. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée > Makefile.objs

[Qemu-devel] [PATCH v5 0/9] replay additions

2016-09-26 Thread Pavel Dovgalyuk
This set of patches includes several fixes for replay and adds network record/replay for network devices. It also makes possible saving/restoring vmstate in replay mode. Record and replay for network interactions is performed with the network filter. Each backend must have its own instance of the

[Qemu-devel] [PATCH v5 1/9] replay: move internal data to the structure

2016-09-26 Thread Pavel Dovgalyuk
This patch moves replay static variables into the structure to allow saving and loading them with savevm/loadvm. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-events.c |2 +- replay/replay-internal.c | 20 +--- replay/replay-internal.h |

[Qemu-devel] [PATCH v5 4/9] record/replay: add network support

2016-09-26 Thread Pavel Dovgalyuk
This patch adds support of recording and replaying network packets in irount rr mode. Record and replay for network interactions is performed with the network filter. Each backend must have its own instance of the replay filter as follows: -netdev user,id=net1 -device rtl8139,netdev=net1 -object

[Qemu-devel] [PATCH v5 2/9] replay: vmstate for replay module

2016-09-26 Thread Pavel Dovgalyuk
This patch introduces vmstate for replay data structures. It allows saving and loading vmstate while replaying. Signed-off-by: Pavel Dovgalyuk --- replay/Makefile.objs |1 + replay/replay-internal.h |9 +++ replay/replay-snapshot.c | 60 +

[Qemu-devel] [PATCH v5 3/9] replay: allow replay stopping and restarting

2016-09-26 Thread Pavel Dovgalyuk
This patch fixes bug with stopping and restarting replay through monitor. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c| 15 +-- cpus.c |1 + include/sysemu/replay.h |4 replay/replay-events.c |8 replay/replay-internal.

[Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters

2016-09-26 Thread Pavel Dovgalyuk
This patch disables snapshotting for block driver filters. It is needed, because snapshots should be created in underlying disk images, not in filters itself. Signed-off-by: Pavel Dovgalyuk --- block/snapshot.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/block/snapshot.c b/block/sn

[Qemu-devel] [PATCH v5 5/9] savevm: add public save_vmstate function

2016-09-26 Thread Pavel Dovgalyuk
This patch introduces save_vmstate function to allow saving and loading vmstates from the replay module. Signed-off-by: Pavel Dovgalyuk --- include/sysemu/sysemu.h |1 + migration/savevm.c | 33 ++--- 2 files changed, 23 insertions(+), 11 deletions(-) diff

[Qemu-devel] [PATCH v5 6/9] replay: save/load initial state

2016-09-26 Thread Pavel Dovgalyuk
This patch implements initial vmstate creation or loading at the start of record/replay. It is needed for rewinding the execution in the replay mode. v4 changes: - snapshots are not created by default anymore v3 changes: - added rrsnapshot option Signed-off-by: Pavel Dovgalyuk --- docs/repla

[Qemu-devel] [PATCH v5 9/9] integratorcp: adding vmstate for save/restore

2016-09-26 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk VMState added by this patch preserves correct loading of the integratorcp device state. Signed-off-by: Pavel Dovgalyuk --- hw/arm/integratorcp.c | 62 + 1 file changed, 62 insertions(+) diff --git a/hw/arm/integratorcp.c

Re: [Qemu-devel] [PATCH v5 0/9] replay additions

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 10:07, Pavel Dovgalyuk wrote: > This set of patches includes several fixes for replay and > adds network record/replay for network devices. It also makes possible > saving/restoring vmstate in replay mode. > > Record and replay for network interactions is performed with the network

[Qemu-devel] [PATCH v5 8/9] block: implement bdrv_recurse_is_first_non_filter for blkreplay

2016-09-26 Thread Pavel Dovgalyuk
This patch adds bdrv_recurse_is_first_non_filter implementation for blkreplay driver. It allows creating snapshots when blkreplay is enabled. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |9 + 1 file changed, 9 insertions(+) diff --git a/block/blkreplay.c b/block/blkreplay.c

Re: [Qemu-devel] [PATCH v2 0/3] crypto: add ctr mode support and little inprovement

2016-09-26 Thread Daniel P. Berrange
On Sat, Sep 24, 2016 at 02:29:16AM +, Gonglei (Arei) wrote: > > > > -Original Message- > > From: no-re...@patchew.org [mailto:no-re...@patchew.org] > > Sent: Saturday, September 24, 2016 10:22 AM > > To: Gonglei (Arei) > > Cc: f...@redhat.com; qemu-devel@nongnu.org; Gonglei (Arei); Wu

Re: [Qemu-devel] [PATCH v2 3/3] crypto: add mode check in qcrypto_cipher_new() for cipher-builtin

2016-09-26 Thread Daniel P. Berrange
On Sat, Sep 24, 2016 at 10:10:00AM +0800, Gonglei wrote: > Signed-off-by: Gonglei > --- > crypto/cipher-builtin.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c > index fd59a9e..d710608 100644 > --- a/crypto/cipher-builtin.c

Re: [Qemu-devel] [Qemu-block] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-26 Thread Kevin Wolf
Am 23.09.2016 um 18:42 hat John Snow geschrieben: > On 09/23/2016 12:09 PM, Thomas Huth wrote: > >The folder include/hw/ide/ belongs to the IDE section. > > > >Signed-off-by: Thomas Huth > >--- > > MAINTAINERS | 1 + > > 1 file changed, 1 insertion(+) > > > >diff --git a/MAINTAINERS b/MAINTAINERS >

Re: [Qemu-devel] [PATCH 16/16] cpus-common: lock-free fast path for cpu_exec_start/end

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 09:28, Alex Bennée wrote: > > cpu->running is only read under the mutex, but can be written _by the > > owner thread only_ outside the mutex. So writes outside the mutex must > > be atomic, but writes under the mutex don't because: > > > > - no other thread ever writes to cpu->runn

Re: [Qemu-devel] [PATCH v5 5/9] savevm: add public save_vmstate function

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 10:08, Pavel Dovgalyuk wrote: > -void hmp_savevm(Monitor *mon, const QDict *qdict) > +int save_vmstate(Monitor *mon, const char *name) Please change this to return an Error **. Paolo > { > BlockDriverState *bs, *bs1; > QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] m25p80: add a m25p80_set_rom_storage() routine

2016-09-26 Thread KONRAD Frederic
Le 24/09/2016 à 10:55, Edgar E. Iglesias a écrit : On Sat, Sep 24, 2016 at 10:25:39AM +0200, Cédric Le Goater wrote: On 09/23/2016 08:26 PM, mar.krzeminski wrote: Hi Cedric, W dniu 23.09.2016 o 10:28, Cédric Le Goater pisze: On 09/23/2016 10:17 AM, Peter Maydell wrote: On 23 September 2016

Re: [Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip

2016-09-26 Thread Paolo Bonzini
On 23/09/2016 05:47, Wanpeng Li wrote: > From: Wanpeng Li > > The qemu will crash when info ioapic through hmp if irqchip > is split. Below message is splat: > > KVM_GET_IRQCHIP failed: Unknown error -6 > > This patch fix it by dumping the ioapic state from the qemu > emulated ioapic if irq

Re: [Qemu-devel] [PATCH 14/16] cpus-common: Introduce async_safe_run_on_cpu()

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée > --- > cpus-common.c | 33 +++-- > include/qom/cpu.h | 14 ++ > 2 files changed, 45 insertions(+), 2 deletions(-) > > diff --git a/cpus-common.c b/cpus-common.c > index

Re: [Qemu-devel] [PATCH 13/16] cpus-common: simplify locking for start_exclusive/end_exclusive

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > It is not necessary to hold qemu_cpu_list_mutex throughout the > exclusive section, because no other exclusive section can run > while pending_cpus != 0. > > exclusive_idle() is called in cpu_exec_start(), and that prevents > any CPUs created after start_exclusive() from

Re: [Qemu-devel] [PATCH 10/16] docs: include formal model for TCG exclusive sections

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini > --- > docs/tcg-exclusive.promela | 176 > + > 1 file changed, 176 insertions(+) > create mode 100644 docs/tcg-exclusive.promela > > diff --git a/docs/tcg-exclusive.promela b/docs/tcg-exclusive.

[Qemu-devel] [PATCH v3 0/9] virtio: avoid inappropriate QEMU termination

2016-09-26 Thread Greg Kurz
Stefan Hajnoczi recently posted a patchset to avoid exit() when a virtio device enters invalid states: <1474473146-19337-1-git-send-email-stefa...@redhat.com> The above patchset provides the ability to deactivate a virtio device if it encounters an unrecoverable issue, with the introduction of a

Re: [Qemu-devel] [PATCH v5 0/3] block: allow flush on devices with open tray

2016-09-26 Thread Kevin Wolf
Am 23.09.2016 um 21:38 hat John Snow geschrieben: > On 09/23/2016 11:35 AM, Max Reitz wrote: > >On 23.09.2016 03:45, John Snow wrote: > >> block/block-backend.c | 22 -- > >> block/io.c | 25 + > >> cpus.c

[Qemu-devel] [PATCH v3 1/9] virtio-9p: add parentheses to sizeof operator

2016-09-26 Thread Greg Kurz
Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi --- v3: - added Cornelia's and Stefan's R-b tags --- hw/9pfs/virtio-9p-device.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c i

Re: [Qemu-devel] [PATCH 12/16] cpus-common: remove redundant call to exclusive_idle()

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > No need to call exclusive_idle() from cpu_exec_end since it is done > immediately afterwards in cpu_exec_start. Any exclusive section could > run as soon as cpu_exec_end leaves, because cpu->running is false and the > mutex is not taken, so the call does not add any prot

[Qemu-devel] [PATCH v3 2/9] virtio-blk: make some functions static

2016-09-26 Thread Greg Kurz
Some functions that were called from the dataplane code are now only used locally: virtio_blk_init_request() virtio_blk_handle_request() virtio_blk_submit_multireq() since commit "03de2f527499 virtio-blk: do not use vring in dataplane", and virtio_blk_free_request() since commit "6aa46d8ff1ee v

[Qemu-devel] [PATCH v3 5/9] virtio-net: handle virtio_net_handle_ctrl() error

2016-09-26 Thread Greg Kurz
This error is caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Also we detach the element from the virtqueue and free it. Signed-off-by: Greg Kurz --- v3: - detach and free element - updated changelog --- hw/net/virtio-net.c |7 +-- 1

Re: [Qemu-devel] [PATCH 1/4] target-cris: Do not dump cpu state with -d in_asm

2016-09-26 Thread Alex Bennée
Richard Henderson writes: > Dumping cpu state is what -d cpu is for. > > Cc: Edgar E. Iglesias > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > target-cris/translate.c | 25 ++--- > 1 file changed, 2 insertions(+), 23 deletions(-) > > diff --git a/tar

[Qemu-devel] [PATCH v3 3/9] virtio-9p: handle handle_9p_output() error

2016-09-26 Thread Greg Kurz
A broken guest may send a request without providing buffers for the reply or for the request itself, and virtqueue_pop() will return an element with either in_num == 0 or out_num == 0. All 9P requests are expected to start with the following 7-byte header: uint32_t size_le;

[Qemu-devel] [PATCH v3 4/9] virtio-blk: handle virtio_blk_handle_request() errors

2016-09-26 Thread Greg Kurz
All these errors are caused by a buggy guest: QEMU should not exit. With this patch, if virtio_blk_handle_request() detects a buggy request, it marks the device as broken and returns an error to the caller so it takes appropriate action. In the case of virtio_blk_handle_vq(), we detach the reques

[Qemu-devel] [PATCH v3 6/9] virtio-net: handle virtio_net_receive() errors

2016-09-26 Thread Greg Kurz
All these errors are caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Also we detach the element from the virtqueue and free it. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck --- v3: - detach and free element - updated changelog --- hw/

Re: [Qemu-devel] [PATCH 10/16] docs: include formal model for TCG exclusive sections

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 10:24, Alex Bennée wrote: > > + * To verify it: > > + * spin -a docs/event.promela > > wrong docs name > > > + * ./a.out -a > > Which version of spin did you run? I grabbed the latest src release > (http://spinroot.com/spin/Src/src645.tar.gz) and had to manual

[Qemu-devel] [PATCH v3 7/9] virtio-net: handle virtio_net_flush_tx() errors

2016-09-26 Thread Greg Kurz
All these errors are caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Also we detach the element from the virtqueue and free it. If this happens, virtio_net_flush_tx() also returns -EINVAL, so that all callers can stop processing the virtqueue immed

Re: [Qemu-devel] write_zeroes/trim on the whole disk

2016-09-26 Thread Kevin Wolf
Am 24.09.2016 um 14:27 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 24.09.2016 15:06, Vladimir Sementsov-Ogievskiy wrote: > >On 24.09.2016 00:21, Wouter Verhelst wrote: > >>On Fri, Sep 23, 2016 at 02:00:06PM -0500, Eric Blake wrote: > >>>My preference would be a new flag to the existing comma

Re: [Qemu-devel] [PATCH 1/3] virtio: add virtio_detach_element()

2016-09-26 Thread Greg Kurz
On Mon, 19 Sep 2016 14:28:03 +0100 Stefan Hajnoczi wrote: > During device reset or similar situations a VirtQueueElement needs to be > freed without pushing it onto the used ring or rewinding the virtqueue. > Extract a new function to do this. > > Later patches add virtio_detach_element() calls

[Qemu-devel] [PATCH v3 8/9] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error()

2016-09-26 Thread Greg Kurz
The virtio_scsi_bad_req() function is called when a guest sends a request with missing or ill-sized headers. This generally happens when the virtio_scsi_parse_req() function returns an error. With this patch, virtio_scsi_bad_req() will mark the device as broken, detach the request from the virtque

[Qemu-devel] [PATCH v3 9/9] virtio-scsi: handle virtio_scsi_set_config() error

2016-09-26 Thread Greg Kurz
This error is caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index fca23

Re: [Qemu-devel] [PATCH v2 3/3] crypto: add mode check in qcrypto_cipher_new() for cipher-builtin

2016-09-26 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Monday, September 26, 2016 4:14 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Wubin (H) > Subject: Re: [PATCH v2 3/3] crypto: add mode check in qcrypto_cipher_new() for > cipher-builtin > > On Sat,

[Qemu-devel] [PATCH v3]MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-26 Thread zhong...@sangfor.com.cn
MC146818 RTC: coordinate guest clock base to destination host after migration qemu tracks guest time based on vector [base_rtc, last_update], in which last_update stands for a monotonic tick which is actually uptime of the host. according to rtc implementation codes of recent releases and upstream

Re: [Qemu-devel] [PATCH v2 0/3] crypto: add ctr mode support and little inprovement

2016-09-26 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Monday, September 26, 2016 4:15 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; f...@redhat.com; Wubin (H) > Subject: Re: [Qemu-devel] [PATCH v2 0/3] crypto: add ctr mode support and > little inprove

[Qemu-devel] [PULL 02/27] net: hmp_host_net_remove: Del the -net option of the removed host_net

2016-09-26 Thread Jason Wang
From: Shmulik Ladkani Upon hmp_host_net_remove(), the appropriate -net client is deleted (according to the given vlan_id and device id), as well as the corresponsing hub port. However, the relevant '-net' option that was added by former hmp_host_net_add() call is still present in "net" options g

[Qemu-devel] [PULL 06/27] Jhash: add linux kernel jhashtable in qemu

2016-09-26 Thread Jason Wang
From: Zhang Chen Jhash will be used by colo-compare and filter-rewriter to save and lookup net connection info Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- include/qemu/jhash.h | 59

[Qemu-devel] [PULL 07/27] colo-compare: track connection and enqueue packet

2016-09-26 Thread Jason Wang
From: Zhang Chen In this patch we use kernel jhash table to track connection, and then enqueue net packet like this: + CompareState ++ | | +---+ +---+ +---+ |conn list +--->conn +->conn | +--

[Qemu-devel] [PULL 03/27] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-09-26 Thread Jason Wang
From: Zhang Chen Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Reviewed-by: Daniel

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] m25p80: add a m25p80_set_rom_storage() routine

2016-09-26 Thread Cédric Le Goater
On 09/26/2016 10:25 AM, KONRAD Frederic wrote: > > > Le 24/09/2016 à 10:55, Edgar E. Iglesias a écrit : >> On Sat, Sep 24, 2016 at 10:25:39AM +0200, Cédric Le Goater wrote: >>> On 09/23/2016 08:26 PM, mar.krzeminski wrote: Hi Cedric, W dniu 23.09.2016 o 10:28, Cédric Le Goater pisz

[Qemu-devel] [PULL 13/27] MAINTAINERS: add maintainer for COLO-proxy

2016-09-26 Thread Jason Wang
From: Zhang Chen add Zhang Chen and Li zhijian as co-maintainers of COLO-proxy. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS in

[Qemu-devel] [PULL 08/27] colo-compare: introduce packet comparison thread

2016-09-26 Thread Jason Wang
From: Zhang Chen If primary packet is same with secondary packet, we will send primary packet and drop secondary packet, otherwise notify COLO frame to do checkpoint. If primary packet comes but secondary packet does not, after REGULAR_PACKET_CHECK_MS milliseconds we set the primary packet as old

[Qemu-devel] [PULL 00/27] Net patches

2016-09-26 Thread Jason Wang
The following changes since commit 3b71ec8516bb50e9a743645bf139571de0b39f61: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-09-23 16:15:33 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to

[Qemu-devel] [PULL 14/27] docs: Add documentation for COLO-proxy

2016-09-26 Thread Jason Wang
From: Zhang Chen Introduce the design of COLO-proxy, and how to use it. Signed-off-by: Zhang Chen --- docs/colo-proxy.txt | 188 1 file changed, 188 insertions(+) create mode 100644 docs/colo-proxy.txt diff --git a/docs/colo-proxy.txt b/do

[Qemu-devel] [PULL 09/27] colo-compare: add TCP, UDP, ICMP packet comparison

2016-09-26 Thread Jason Wang
From: Zhang Chen We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. Less checkpoint more efficiency. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- ne

[Qemu-devel] [PULL 10/27] filter-rewriter: introduce filter-rewriter initialization

2016-09-26 Thread Jason Wang
From: Zhang Chen Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's tcp connection established successfully. In this module we will rewrite tcp packet's ack to the secondary from primary,and rewrite tcp packet's seq to the primary from se

[Qemu-devel] [PULL 01/27] virtio-net: allow increasing rx queue size

2016-09-26 Thread Jason Wang
From: "Michael S. Tsirkin" This allows increasing the rx queue size up to 1024: unlike with tx, guests don't put in huge S/G lists into RX so the risk of running into the max 1024 limitation due to some off-by-one seems small. It's helpful for users like OVS-DPDK which don't do any buffering on

Re: [Qemu-devel] [PATCH v3]MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 10:42, zhong...@sangfor.com.cn wrote: > MC146818 RTC: coordinate guest clock base to destination host after migration > > qemu tracks guest time based on vector [base_rtc, last_update], in which > last_update stands for a monotonic tick which is actually uptime of the host. > accor

Re: [Qemu-devel] [Qemu-ppc] [PULL 00/44] ppc-for-2.8 queue 20160922

2016-09-26 Thread Cédric Le Goater
On 09/24/2016 04:31 PM, Alex Bennée wrote: > > David Gibson writes: > >> On Fri, Sep 23, 2016 at 08:42:22AM +0100, Alex Bennée wrote: >>> >>> David Gibson writes: >>> On Thu, Sep 22, 2016 at 03:03:50PM +0100, Peter Maydell wrote: > On 22 September 2016 at 07:36, David Gibson > wr

[Qemu-devel] [PULL 18/27] e1000e: Flush all receive queues on receive enable

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman Before this patch first netdev queue only was flushed. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e.c | 2 +- hw/net/e1000e_core.c | 2 +- hw/net/e1000e_core.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/n

[Qemu-devel] [PULL 05/27] net/colo.c: add colo.c to define and handle packet

2016-09-26 Thread Jason Wang
From: Zhang Chen The net/colo.c is used by colo-compare and filter-rewriter. this can share common data structure like net packet, and other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- net/Makefile.objs | 1 + n

[Qemu-devel] [PULL 11/27] filter-rewriter: track connection and parse packet

2016-09-26 Thread Jason Wang
From: Zhang Chen We use net/colo.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- net/colo.c| 14 ++ net/colo.h| 1 + net/filter-rewriter.c | 50 +

[Qemu-devel] [PULL 17/27] net: limit allocation in nc_sendv_compat

2016-09-26 Thread Jason Wang
From: Peter Lieven we only need to allocate enough memory to hold the packet. This might be less than NET_BUFSIZE. Additionally fail early if the packet is larger than NET_BUFSIZE. Signed-off-by: Peter Lieven Reviewed-by: Stefan Hajnoczi Signed-off-by: Jason Wang --- net/net.c | 8 ++--

[Qemu-devel] [PULL 04/27] colo-compare: introduce colo compare initialization

2016-09-26 Thread Jason Wang
From: Zhang Chen This a COLO net ascii figure: Primary qemu Secondary qemu +--+ ++ | +---

[Qemu-devel] [PULL 16/27] tap: Allow specifying a bridge

2016-09-26 Thread Jason Wang
From: Alexey Kardashevskiy The tap backend is already using qemu-bridge-helper to attach tap interface to a bridge but (unlike the bridge backend) it always uses the default bridge name - br0. This adds a "br" property support to the tap backend. Signed-off-by: Alexey Kardashevskiy Reviewed-by

[Qemu-devel] [PULL 21/27] e1000e: Fix PBACLR implementation

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman This patch fixes incorrect check for interrypt type being used. PBSCLR register is valid for MSI-X only. See spec. 10.2.3.13 MSI—X PBA Clear Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[Qemu-devel] [PATCH v3 0/3] crypto: add ctr mode support and little inprovement

2016-09-26 Thread Gonglei
Please see the detailed description in each patch. v3: - adjust the sequence of patch 1 and 2. (Daniel) - fix a mising 'break' in code logic. (Daniel) v2: - fix qtest complaint in cipher-builtin backend. - introduce patch 2 and patch 3. Gonglei (3): crypto: extend mode as a parameter in qcr

[Qemu-devel] [PULL 12/27] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-09-26 Thread Jason Wang
From: Zhang Chen We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest, secondary get it use filter-

[Qemu-devel] [PULL 19/27] e1000e: Flush receive queues on link up

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index ea2a484..e8d50f6 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -180

[Qemu-devel] [PULL 27/27] imx_fec: fix error in qemu_send_packet argument

2016-09-26 Thread Jason Wang
From: Paolo Bonzini This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 1c415ab..5

[Qemu-devel] [PULL 15/27] e1000: fix buliding complaint

2016-09-26 Thread Jason Wang
From: Gonglei hw/net/e1000e_core.c:56: warning: e1000e_set_interrupt_cause declared inline after being called hw/net/e1000e_core.c:56: warning: previous declaration of e1000e_set_interrupt_cause was here Signed-off-by: Gonglei Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/n

[Qemu-devel] [PULL 20/27] e1000e: Fix CTRL_EXT.EIAME behavior

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman CTRL_EXT.EIAME bit controls clearing of IAM bits, but current code clears IMS bits instead. See spec. 10.2.2.5 Extended Device Control Register. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 4 ++-- hw/net/trace-events | 2 +- 2 fi

Re: [Qemu-devel] [PATCH v3 0/2] Produce better termination message

2016-09-26 Thread Michal Privoznik
On 22.09.2016 18:43, Paolo Bonzini wrote: > > > On 21/09/2016 18:27, Michal Privoznik wrote: >> This is v2 of: >> http://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg05058.html >> >> Diff to v2: >> - In 1/2 I've dropped stdio funcs in favour of g_file_get_contents() (thanks >> Dan!) >> >>

[Qemu-devel] [PULL 23/27] e1000e: Fix spurious RX TCP ACK interrupts

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman Do not raise ACK interrupts when RFCTL.ACKDIS bit is set (see spec. 10.2.5.16). Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_co

Re: [Qemu-devel] [PATCH v3 0/9] virtio: avoid inappropriate QEMU termination

2016-09-26 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 147487882735.6679.8076815106195077844.stgit@bahia Subject: [Qemu-devel] [PATCH v3 0/9] virtio: avoid inappropriate

[Qemu-devel] Questions about gcc linker errors in crypto sub-directory

2016-09-26 Thread Gonglei (Arei)
Hi Daniel, I'm coding cryptodev-vhost-user.c as a new cryptodev backend, but the gcc report some linker errors: crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_crypto_cleanup': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:87: undefined reference to `vhost_dev

[Qemu-devel] [PULL 22/27] e1000e: Fix OTHER interrupts processing for MSI-X

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman Interrupt mask for legacy OTHER causes should not apply to MSI-X OTHER cause. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c

Re: [Qemu-devel] Questions about gcc linker errors in crypto sub-directory

2016-09-26 Thread Daniel P. Berrange
On Mon, Sep 26, 2016 at 09:03:45AM +, Gonglei (Arei) wrote: > Hi Daniel, > > I'm coding cryptodev-vhost-user.c as a new cryptodev backend, > but the gcc report some linker errors: > > crypto/cryptodev-vhost-user.o: In function > `qcrypto_cryptodev_vhost_crypto_cleanup': > /mnt/sdb/gonglei/qe

[Qemu-devel] [PULL 24/27] e1000e: Fix EIAC register implementation

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman This patch fixes 2 issues: 1. Bits set in EIAC register should be cleared from IMS when EIAM is not used. 2. Only bit that corresonds to the interrupt being raised should be cleared. See spec. 10.2.4.7 Interrupt Auto Clear Signed-off-by: Dmitry Fleytman Signed-off-

[Qemu-devel] [PULL 26/27] mcf_fec: fix error in qemu_send_packet argument

2016-09-26 Thread Jason Wang
From: Paolo Bonzini This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/mcf_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c index d31fea1..d

[Qemu-devel] [PATCH v3 3/3] crypto: add mode check in qcrypto_cipher_new() for cipher-builtin

2016-09-26 Thread Gonglei
Signed-off-by: Gonglei --- crypto/cipher-builtin.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index fd59a9e..b4bc2b9 100644 --- a/crypto/cipher-builtin.c +++ b/crypto/cipher-builtin.c @@ -433,6 +433,17 @@ QCryptoCipher *qcryp

[Qemu-devel] [PULL 25/27] net: mcf: limit buffer descriptor count

2016-09-26 Thread Jason Wang
From: Prasad J Pandit ColdFire Fast Ethernet Controller uses buffer descriptors to manage data flow to/fro receive & transmit queues. While transmitting packets, it could continue to read buffer descriptors if a buffer descriptor has length of zero and has crafted values in bd.flags. Set upper li

Re: [Qemu-devel] [PATCH v3 0/2] Produce better termination message

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 11:02, Michal Privoznik wrote: > Huh, this has beacame more hairy than I initially thought. An > alternative suggestion might be to not call PID->name translate function > from the signal handler, but call it just from the qemu_kill_report(). > Yes, this will increase the chances of

Re: [Qemu-devel] [PATCH v2 3/7] block/qapi: Move 'aio' option to file driver

2016-09-26 Thread Kevin Wolf
Am 23.09.2016 um 16:40 hat Eric Blake geschrieben: > On 09/23/2016 09:32 AM, Kevin Wolf wrote: > > The option whether or not to use a native AIO interface really isn't a > > generic option for all drivers, but only applies to the native file > > protocols. This patch moves the option in blockdev-ad

Re: [Qemu-devel] [PATCH 1/1] dtc: Update dtc / libfdt submodule to version 1.4.2

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 10:01:27AM +0200, Thomas Huth wrote: > On 26.09.2016 06:51, Jeff Cody wrote: > > There are some patch series which rely on version 1.4.2 of dtc, so > > update the submodule version. > > > > Signed-off-by: Jeff Cody > > --- > > dtc | 2 +- > > 1 file changed, 1 insertion(+

Re: [Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2016 21:57:39 +0200 Radim Krčmář wrote: > 2016-09-22 16:36+0200, Paolo Bonzini: > > On 22/09/2016 14:50, Igor Mammedov wrote: > >> +#ifdef KVM_CAP_X2APIC_API > >> +if (kvm_check_extension(s, KVM_CAP_X2APIC_API)) { > >> +has_x2apic_ids = !kvm_vm_enable_cap(s, KVM_CAP_X

Re: [Qemu-devel] [PATCH] usb: ehci: fix memory leak in ehci_process_itd

2016-09-26 Thread Thomas Huth
On 19.09.2016 04:48, Li Qiang wrote: > From: Li Qiang > > While processing isochronous transfer descriptors(iTD), if the page > select(PG) field value is out of bands it will return. In this > situation the ehci's sg list doesn't be freed thus leading a memory s/doesn't be/is not/ > leak issue.

Re: [Qemu-devel] Questions about gcc linker errors in crypto sub-directory

2016-09-26 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Monday, September 26, 2016 5:14 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org > Subject: Re: Questions about gcc linker errors in crypto sub-directory > > On Mon, Sep 26, 2016 at 09:03:45AM +000

  1   2   3   4   >