Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 08:39, Peter Lieven wrote: > > It seems like the mainloop is waiting here: > > #0 0x7606c89c in __lll_lock_wait () >from /lib/x86_64-linux-gnu/libpthread.so.0 > No symbol table info available. > #1 0x76068065 in _L_lock_858 () >from /lib/x86_64-linux-gnu/

Re: [Qemu-devel] [PATCH v7 0/9] Add limited support of VMware's hyper-call rpc

2015-06-18 Thread Gerd Hoffmann
Hi, > we enable this thing by default (why do we?) Historical reasons :( At least we recently got an option to turn it off (-machine $name,vmport=off) cheers, Gerd

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Peter Lieven
Am 18.06.2015 um 08:59 schrieb Paolo Bonzini: On 18/06/2015 08:39, Peter Lieven wrote: It seems like the mainloop is waiting here: #0 0x7606c89c in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #1 0x76068065 in _L_lock_858 (

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-17 15:41, Pavel Dovgalyuk wrote: > > In icount mode every translation block looks as follows: > > > > if icount < n then exit > > icount -= n > > instr1 > > instr2 > > ... > > instrn > > exit > > > > When one of these instructions in

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Peter Lieven
Am 18.06.2015 um 09:03 schrieb Peter Lieven: Am 18.06.2015 um 08:59 schrieb Paolo Bonzini: On 18/06/2015 08:39, Peter Lieven wrote: It seems like the mainloop is waiting here: #0 0x7606c89c in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info avai

Re: [Qemu-devel] linux-user crashes on clone(2) when run on ppc host

2015-06-18 Thread Peter Maydell
On 17 June 2015 at 22:36, Emilio G. Cota wrote: > On Wed, Jun 17, 2015 at 09:58:27 +0100, Peter Maydell wrote: >> On 17 June 2015 at 01:52, Emilio G. Cota wrote: >> > I'm having trouble running a simple multithreaded program on a PowerPC >> > host machine. >> > >> > The machine I'm using is a pp

Re: [Qemu-devel] [ Patch ] for CVE-2015-3242

2015-06-18 Thread Peter Maydell
On 18 June 2015 at 03:40, 罗大龙 wrote: > /qemu-2.3.0/hw/arm/pxa2xx.c > > --- pxa2xx.c.new2015-06-15 17:40:59.285002592 +0800 > +++ pxa2xx.c2015-06-15 17:43:47.001002592 +0800 > @@ -1986,6 +1986,10 @@ > > s->rx_len = qemu_get_byte(f); > s->rx_start = 0; > + if (s->rx_len < 0 || s-

Re: [Qemu-devel] [PATCH v7 01/42] Start documenting how postcopy works.

2015-06-18 Thread Li, Liang Z
> diff --git a/docs/migration.txt b/docs/migration.txt index f6df4be..b4b93d1 > 100644 > --- a/docs/migration.txt > +++ b/docs/migration.txt > @@ -291,3 +291,170 @@ save/send this state when we are in the middle of a > pio operation (that is what ide_drive_pio_state_needed() checks). If > DRQ_STA

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Kevin Wolf
Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben: > Thread 2 (Thread 0x75550700 (LWP 2636)): > #0 0x75d87aa3 in ppoll () from /lib/x86_64-linux-gnu/libc.so.6 > No symbol table info available. > #1 0x55955d91 in qemu_poll_ns (fds=0x563889c0, nfds=3, > timeout=4999424

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Peter Maydell
On 18 June 2015 at 08:12, Pavel Dovgaluk wrote: >> From: Aurelien Jarno [mailto:aurel...@aurel32.net] >> Looking at how icount work, I see it's basically a variable in the CPU >> state (icount_decr.u16.low), which is already accessed from the TB. >> Couldn't we adjust it using additional code befo

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > On 18 June 2015 at 08:12, Pavel Dovgaluk wrote: > >> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > >> Looking at how icount work, I see it's basically a variable in the CPU > >> state (icount_decr.u16.low), which is already accessed

Re: [Qemu-devel] [PATCH v7 0/9] Add limited support of VMware's hyper-call rpc

2015-06-18 Thread Michael S. Tsirkin
On Wed, Jun 17, 2015 at 06:26:06PM -0400, Don Slutz wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 06/17/15 09:44, Paolo Bonzini wrote: > > > > On 12/06/2015 16:05, Don Slutz wrote: > >> Changes v6 to v7: > ... > > Looks good, feel free to send out patches 1+2+3+9 in a pull req

Re: [Qemu-devel] libcacard: use the library?

2015-06-18 Thread Paolo Bonzini
On 17/06/2015 22:15, Michael Tokarev wrote: > I tried autoconf&automake&libtool. It is a HugeMess, I disliked it. > So I rewrote it as a simple shell script. > > The result of both attempts is available at > http://www.corpit.ru/mjt/tmp/libcacard/ > There are 4 files in there: > > configure.

Re: [Qemu-devel] [PATCH v7 01/42] Start documenting how postcopy works.

2015-06-18 Thread Dr. David Alan Gilbert
* Li, Liang Z (liang.z...@intel.com) wrote: > > diff --git a/docs/migration.txt b/docs/migration.txt index f6df4be..b4b93d1 > > 100644 > > --- a/docs/migration.txt > > +++ b/docs/migration.txt > > @@ -291,3 +291,170 @@ save/send this state when we are in the middle of a > > pio operation (that is

Re: [Qemu-devel] libcacard: use the library?

2015-06-18 Thread Michael Tokarev
18.06.2015 11:09, Paolo Bonzini пишет: > On 17/06/2015 22:15, Michael Tokarev wrote: >> I tried autoconf&automake&libtool. It is a HugeMess, I disliked it. >> So I rewrote it as a simple shell script. >> >> The result of both attempts is available at >> http://www.corpit.ru/mjt/tmp/libcacard/ >>

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 07:17, Pavel Dovgaluk wrote: >>> > > >>> > > static inline RES_TYPE >>> > > -glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong >>> > > ptr) >>> > > +glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, >>> > > +

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Aurelien Jarno
On 2015-06-18 10:12, Pavel Dovgaluk wrote: > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > On 2015-06-17 15:41, Pavel Dovgalyuk wrote: > > > In icount mode every translation block looks as follows: > > > > > > if icount < n then exit > > > icount -= n > > > instr1 > > > instr2 > > > ...

Re: [Qemu-devel] libcacard: use the library?

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 10:11, Michael Tokarev wrote: > 18.06.2015 11:09, Paolo Bonzini пишет: >> On 17/06/2015 22:15, Michael Tokarev wrote: >>> I tried autoconf&automake&libtool. It is a HugeMess, I disliked it. >>> So I rewrote it as a simple shell script. >>> >>> The result of both attempts is availab

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Aurelien Jarno
On 2015-06-18 10:16, Paolo Bonzini wrote: > > > On 18/06/2015 07:17, Pavel Dovgaluk wrote: > >>> > > > >>> > > static inline RES_TYPE > >>> > > -glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, > >>> > > target_ulong ptr) > >>> > > +glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPU

Re: [Qemu-devel] [PATCH v7 01/42] Start documenting how postcopy works.

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 09:50, Li, Liang Z wrote: > Do you have any idea or plan to deal with the failure happened during > the postcopy phase? > > Lost the guest is too frightening for a cloud provider, we have a > discussion with Alibaba, they said that they can't use the postcopy > feature unless ther

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Peter Lieven
Am 18.06.2015 um 09:45 schrieb Kevin Wolf: Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben: Thread 2 (Thread 0x75550700 (LWP 2636)): #0 0x75d87aa3 in ppoll () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x55955d91 in qemu_poll_ns (fds=0x5

Re: [Qemu-devel] [PATCH v7 0/9] Add limited support of VMware's hyper-call rpc

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 09:58, Michael S. Tsirkin wrote: > > If I am reading this correctly, I should add > > > > Acked-by: Paolo Bonzini > > > > to these 4 patches. > > > > Since I have never sent a pull request to QEMU before here is what I > > think should be in it: > > I'd like to see a version wi

Re: [Qemu-devel] [PATCH v7 0/9] Add limited support of VMware's hyper-call rpc

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 00:26, Don Slutz wrote: > > The following changes since commit > f754c3c9cce3c4789733d9068394be4256dfe6a8: > > Merge remote-tracking branch > 'remotes/agraf/tags/signed-s390-for-upstream' into staging > (2015-06-17 12:43:26 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH] Add .dir-locals.el file to configure emacs coding style

2015-06-18 Thread Markus Armbruster
Michael Tokarev writes: > So, what is the consensus here? > > Everyone who talked wants the emacs mode, but everyone > offers their own mode. > > I'd pick the stroustrup variant suggested by Marcus > since it is shortest, but while being shortest, it > is looks a bit "magical". I don't think it'

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Kevin Wolf
Am 18.06.2015 um 10:30 hat Peter Lieven geschrieben: > Am 18.06.2015 um 09:45 schrieb Kevin Wolf: > >Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben: > >>Thread 2 (Thread 0x75550700 (LWP 2636)): > >>#0 0x75d87aa3 in ppoll () from /lib/x86_64-linux-gnu/libc.so.6 > >>No symbol table

[Qemu-devel] [PATCH COLO-Block v6 00/16] Block replication for continuous checkpoints

2015-06-18 Thread Wen Congyang
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). Usage: Please refer to docs/block-replication.txt You can get the patch here: https://github.com/wencongyang/qemu-colo/commits/block-replication-v6 The other newest COLO patchse will be sen

[Qemu-devel] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-06-18 Thread Wen Congyang
In some cases, we want to connect/disconnect the remote target when we need, not in bdrv_open()/bdrv_close(). Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 24 include/block/block.h | 3 +++ include

[Qemu-devel] [PATCH COLO-Block v6 01/16] docs: block replication's description

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- docs/block-replication.txt | 179 + 1 file changed, 179 insertions(+) create mode 100644 docs/block-replication.txt diff --git a/docs/b

[Qemu-devel] [PATCH COLO-Block v6 04/16] block: Parse "backing_reference" option to reference existing BDS

2015-06-18 Thread Wen Congyang
Usage: -drive file=xxx,id=Y, \ -drive file=,id=X,backing_reference.drive_id=Y,backing_reference.hidden-disk.* It will create such backing chain: {virtio-blk dev 'Y'} {virtio-blk dev 'X'} |

[Qemu-devel] [PATCH COLO-Block v6 09/16] Introduce a new -drive option to control whether to connect to remote target

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- blockdev.c| 8 include/block/block.h | 1 + qemu-options.hx | 4 3 files changed, 13 insertions(+) diff --git a/blockdev.c b/blockdev.c index 1cd1b79..07b0477 100644 --- a/blockd

[Qemu-devel] [PATCH COLO-Block v6 03/16] Allow creating backup jobs when opening BDS

2015-06-18 Thread Wen Congyang
When opening BDS, we need to create backup jobs for image-fleecing. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Jeff Cody --- block/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/Makefile.objs b/block/Makefile.ob

[Qemu-devel] [PATCH COLO-Block v6 02/16] allow writing to the backing file

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 0ffb855..df4cbce 100644 --- a/block.c +++ b/block.c @@ -745,6 +745,15

[Qemu-devel] [PATCH COLO-Block v6 11/16] Add new block driver interfaces to control block replication

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino Cc: Michael Roth Reviewed-by: Paolo Bonzini --- block.c | 40 include/block/block.h | 5 + include/block/block_int.h | 14 ++

[Qemu-devel] [PATCH COLO-Block v6 05/16] Backup: clear all bitmap when doing block checkpoint

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Jeff Cody --- block/backup.c | 13 + blockjob.c | 10 ++ include/block/blockjob.h | 12 3 files changed, 35 insertions(+) diff --git a/block/backup.c b/

[Qemu-devel] [PATCH COLO-Block v6 06/16] Don't allow a disk use backing reference target

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block.c b/block.c index d1ed227..0b41af4 100644 --- a/block.c +++ b/block.c @@ -1294,6 +1294,14 @@ static int bdrv_open_backing_reference_fil

[Qemu-devel] [PATCH COLO-Block v6 13/16] quorum: implement block driver interfaces for block replication

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/quorum.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 77e55b2..01cfac0 100644 --- a/block/quorum.c +

[Qemu-devel] [PATCH COLO-Block v6 15/16] quorum: allow ignoring child errors

2015-06-18 Thread Wen Congyang
If the child is not ready, read/write/getlength/flush will return -errno. It is not critical error, and can be ignored: 1. read/write: Just not report the error event. 2. getlength: just ignore it. If all children's getlength return -errno, and be ignored, return -EIO. 3. flush: Just ig

[Qemu-devel] [PATCH COLO-Block v6 10/16] NBD client: connect to nbd server later

2015-06-18 Thread Wen Congyang
The secondary qemu starts later than the primary qemu, so we cannot connect to nbd server in bdrv_open(). Introduce a new open flags to control it. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/nbd.c | 12 +++- 1 file changed, 7 insertions(+)

[Qemu-devel] [PATCH COLO-Block v6 08/16] NBD client: implement block driver interfaces to connect/disconnect NBD server

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/nbd.c | 67 - 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 2176186..bc9477a 100644 --- a/block

[Qemu-devel] [PATCH COLO-Block v6 12/16] skip nbd_target when starting block replication

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 12 1 file changed, 12 insertions(+) diff --git a/block.c b/block.c index 06222bf..2108d02 100644 --- a/block.c +++ b/block.c @@ -4430,6 +4430,10 @@ void bdrv_start_replication(BlockDrive

[Qemu-devel] [PATCH COLO-Block v6 14/16] introduce a new API qemu_opts_absorb_qdict_by_index()

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- include/qemu/option.h | 2 ++ util/qemu-option.c| 44 2 files changed, 46 insertions(+) diff --git a/include/qemu/option.h b/include/qemu/option.h index ac0e43b

[Qemu-devel] [PATCH COLO-Block v6 16/16] Implement new driver for block replication

2015-06-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/Makefile.objs | 1 + block/replication.c | 441 2 files changed, 442 insertions(+) create mode 100644 block/replication.c diff --git a/block/Makefil

Re: [Qemu-devel] [PATCH v2 1/6] qapi: qapi for audio backends

2015-06-18 Thread Markus Armbruster
"Kővágó Zoltán" writes: > 2015-06-17 18:06 keltezéssel, Markus Armbruster írta: >> "Kővágó Zoltán" writes: >> >>> 2015-06-17 15:37 keltezéssel, Markus Armbruster írta: "Kővágó Zoltán" writes: > 2015-06-17 13:48 keltezéssel, Markus Armbruster írta: >> "Kővágó Zoltán" writes: >

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-18 10:12, Pavel Dovgaluk wrote: > > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > > On 2015-06-17 15:41, Pavel Dovgalyuk wrote: > > > > In icount mode every translation block looks as follows: > > > > > > > > if icount < n

[Qemu-devel] [PATCH COLO-Frame v6 01/31] configure: Add parameter for configure to enable/disable COLO support

2015-06-18 Thread zhanghailiang
configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is off by default. Signed-off-by: zhanghailiang Signed-off-by: Yang Hongyang Signed-off-by: Gonglei Signed-off-by: Lai Jiangshan --- configure | 14 ++ 1 file changed, 14 insertions(+) diff --git a

[Qemu-devel] [PATCH COLO-Frame v6 00/31] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service

2015-06-18 Thread zhanghailiang
This is the 6th version of COLO, here is only COLO frame part, include: VM checkpoint, failover, proxy API, block replication API, not include block replication. The block part is sent as a separate series. As usuall, we provide two branch which one is 'colo-v1.3-basic', and the other is 'colo-v

[Qemu-devel] [PATCH COLO-Frame v6 03/31] COLO: migrate colo related info to slave

2015-06-18 Thread zhanghailiang
We can know if VM in destination should go into COLO mode by refer to the info that has been migrated from PVM. Signed-off-by: zhanghailiang Signed-off-by: Yang Hongyang Signed-off-by: Lai Jiangshan Signed-off-by: Gonglei --- include/migration/migration-colo.h | 2 ++ migration/Makefile.objs

[Qemu-devel] [PATCH COLO-Frame v6 06/31] COLO: Implement colo checkpoint protocol

2015-06-18 Thread zhanghailiang
We need communications protocol of user-defined to control the checkpoint process. The new checkpoint request is started by Primary VM, and the interactive process like below: Checkpoint synchronizing points, Primary Secondary NEW @

[Qemu-devel] [PATCH COLO-Frame v6 04/31] migration: Integrate COLO checkpoint process into migration

2015-06-18 Thread zhanghailiang
Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state after the first live migration successfully finished. Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Lai Jiangshan --- include/migration/migration-colo.h | 3 +++ include/migration/migration.h | 2

[Qemu-devel] [PATCH COLO-Frame v6 10/31] COLO RAM: Load PVM's dirty page into SVM's RAM cache temporarily

2015-06-18 Thread zhanghailiang
The ram cache is initially the same as SVM/PVM's memory. At checkpoint, we cache the dirty RAM of PVM into RAM cache in the slave (so that RAM cache always the same as PVM's memory at every checkpoint), we will flush cached RAM to SVM after we receive all PVM's vmstate (RAM/device). Signed-off-by

[Qemu-devel] [PATCH COLO-Frame v6 05/31] migration: Integrate COLO checkpoint process into loadvm

2015-06-18 Thread zhanghailiang
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Lai Jiangshan Signed-off-by: Yang Hongyang --- include/migration/migration-colo.h | 13 + migration/colo-comm.c

[Qemu-devel] [PATCH COLO-Frame v6 07/31] COLO: Add a new RunState RUN_STATE_COLO

2015-06-18 Thread zhanghailiang
Guest will enter this state when paused to save/restore VM state under colo checkpoint. Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Lai Jiangshan Reviewed-by: Dr. David Alan Gilbert --- qapi-schema.json | 5 - vl.c

[Qemu-devel] [PATCH COLO-Frame v6 13/31] COLO RAM: Flush cached RAM into SVM's memory

2015-06-18 Thread zhanghailiang
During the time of VM's running, PVM/SVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be some with PVM's memory after checkpoint. Instead of flushing all content of SVM's

[Qemu-devel] [PATCH COLO-Frame v6 15/31] COLO failover: Implement COLO primary/secondary vm failover work

2015-06-18 Thread zhanghailiang
If there are some errors happen, we will give users(administrators) time to get involved in failover verdict, which they can decide which side should take over the work by using 'colo_lost_heartbeat' command. Note: The default verdict is primary VM takes over work while secondary VM exit. So if us

[Qemu-devel] [PATCH COLO-Frame v6 11/31] COLO VMstate: Load VM state into qsb before restore it

2015-06-18 Thread zhanghailiang
We should not destroy the state of secondary until we receive the whole state from the primary, in case the primary fails in the middle of sending the state, so, here we cache the device state in Secondary before restore it. Besides, we should call qemu_system_reset() before load VM state, which c

[Qemu-devel] [PATCH COLO-Frame v6 14/31] COLO failover: Introduce a new command to trigger a failover

2015-06-18 Thread zhanghailiang
We leave users to use whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use command 'colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, If send the command to PVM, Primary will exit COLO mode, and

[Qemu-devel] [PATCH COLO-Frame v6 09/31] COLO: Save VM state to slave when do checkpoint

2015-06-18 Thread zhanghailiang
We should save PVM's RAM/device to slave when needed. For VM state, we will cache them in slave, we use QEMUSizedBuffer to store the data, we need know the data size of VM state, so in master, we use qsb to store VM state temporarily, and then migrate the data to slave. Signed-off-by: zhanghailia

[Qemu-devel] [PATCH COLO-Frame v6 12/31] arch_init: Start to trace dirty pages of SVM

2015-06-18 Thread zhanghailiang
we will use this dirty bitmap together with VM's cache RAM dirty bitmap to decide which page in cache should be flushed into VM's RAM. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- migration/ram.c | 16 1 file changed, 16 insertions(+) diff --git a/migration/ram.c

[Qemu-devel] [PATCH COLO-Frame v6 02/31] migration: Introduce capability 'colo' to migration

2015-06-18 Thread zhanghailiang
We add helper function colo_supported() to indicate whether colo is supported or not, with which we use to control whether or not showing 'colo' string to users, they can use qmp command 'query-migrate-capabilities' or hmp command 'info migrate_capabilities' to learn if colo is supported. Cc: Juan

[Qemu-devel] [PATCH COLO-Frame v6 24/31] COLO: Handle nfnetlink message from proxy module

2015-06-18 Thread zhanghailiang
Proxy module will send message to qemu through nfnetlink. Now, the message only contains the result of packets comparation. We use a global variable 'packet_compare_different' to store the result. And this variable should be accessed by using atomic related function, such as 'atomic_set' 'atomic_x

[Qemu-devel] [PATCH COLO-Frame v6 17/31] COLO failover: Don't do failover during loading VM's state

2015-06-18 Thread zhanghailiang
Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Lai Jiangshan --- migration/colo.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index a65f9ea..76bdd44 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -53,6 +53,7

[Qemu-devel] [PATCH COLO-Frame v6 08/31] QEMUSizedBuffer: Introduce two help functions for qsb

2015-06-18 Thread zhanghailiang
Introduce two new QEMUSizedBuffer APIs which will be used by COLO to buffer VM state: One is qsb_put_buffer(), which put the content of a given QEMUSizedBuffer into QEMUFile, this is used to send buffered VM state to secondary. Another is qsb_fill_buffer(), read 'size' bytes of data from the file i

[Qemu-devel] [PATCH COLO-Frame v6 31/31] COLO: Add block replication into colo process

2015-06-18 Thread zhanghailiang
Make sure master start block replication after slave's block replication started. Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang Signed-off-by: Li Zhijian --- migration/colo.c | 139 ++- trace-events

[Qemu-devel] [PATCH COLO-Frame v6 19/31] COLO NIC: Init/remove colo nic devices when add/cleanup tap devices

2015-06-18 Thread zhanghailiang
When COLO mode, we do some init work for nic that will be used for COLO. Cc: Stefan Hajnoczi Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- include/net/colo-nic.h | 3 +++ net/Makefile.objs | 1 + net/colo-nic.c | 70 ++

[Qemu-devel] [PATCH COLO-Frame v6 23/31] COLO NIC: Some init work related with proxy module

2015-06-18 Thread zhanghailiang
Implement communication protocol with proxy module by using nfnetlink, which requires libnfnetlink libs. Tell proxy module to do initialization work and moreover ask kernel to acknowledge the request. It's is necessary for the first time because Netlink is not a reliable protocol. Cc: Stefan Hajn

[Qemu-devel] [PATCH COLO-Frame v6 21/31] COLO NIC: Implement colo nic device interface configure()

2015-06-18 Thread zhanghailiang
Implement colo nic device interface configure() add a script to configure nic devices: ${QEMU_SCRIPT_DIR}/colo-proxy-script.sh Cc: Stefan Hajnoczi Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- include/net/tap.h| 17 + net/colo-nic.c

[Qemu-devel] [PATCH COLO-Frame v6 26/31] COLO: Improve checkpoint efficiency by do additional periodic checkpoint

2015-06-18 Thread zhanghailiang
Besides normal checkpoint which according to the result of net packets comparing, We do additional checkpoint periodically, it will reduce the number of dirty pages when do one checkpoint, if we don't do checkpoint for a long time (This is a special case when the net packets is always consistent).

[Qemu-devel] [PATCH COLO-Frame v6 29/31] COLO: Disable qdev hotplug when VM is in COLO mode

2015-06-18 Thread zhanghailiang
COLO do not support qdev hotplug migration, disable it. Signed-off-by: zhanghailiang Signed-off-by: Yang Hongyang --- migration/colo.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 0fcadcd..8d6d166 100644 --- a/migration/colo.c +++ b/

[Qemu-devel] [PATCH COLO-Frame v6 25/31] COLO: Do checkpoint according to the result of packets comparation

2015-06-18 Thread zhanghailiang
Only do checkpoint, when the PVM's and SVM's output net packets are inconsistent, We also limit the min time between two continuous checkpoint action, to give VM a change to run. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- include/net/colo-nic.h | 2 ++ migration/colo.c |

[Qemu-devel] [PATCH COLO-Frame v6 20/31] tap: Make launch_script() public

2015-06-18 Thread zhanghailiang
We also change the parameters of launch_script(). Cc: Stefan Hajnoczi Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- include/net/tap.h | 2 ++ net/tap.c | 31 ++- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/i

[Qemu-devel] [PATCH COLO-Frame v6 16/31] qmp event: Add event notification for COLO error

2015-06-18 Thread zhanghailiang
If some errors happen during VM's COLO FT stage, it's import to notify the users this event, Togehter with 'colo_lost_heartbeat', users can intervene in COLO's failover work immediately. If users don't want to get involved in COLO's failover verdict, it is still necessary to notify users that we ex

[Qemu-devel] [PATCH COLO-Frame v6 18/31] COLO: Add new command parameter 'colo_nicname' 'colo_script' for net

2015-06-18 Thread zhanghailiang
The 'colo_nicname' should be assigned with network name, for exmple, 'eth2'. It will be parameter of 'colo_script', 'colo_script' should be assigned with an scirpt path. We parse these parameter in tap. Cc: Stefan Hajnoczi Cc: Jason Wang Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zha

[Qemu-devel] [PATCH COLO-Frame v6 28/31] COLO NIC: Implement NIC checkpoint and failover

2015-06-18 Thread zhanghailiang
Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- include/net/colo-nic.h | 2 ++ migration/colo.c | 21 ++--- net/colo-nic.c | 23 +++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/include/net/colo-nic.h b/include/net/

[Qemu-devel] [PATCH COLO-Frame v6 30/31] COLO: Implement shutdown checkpoint

2015-06-18 Thread zhanghailiang
For Secondary VM, we forbid it shutdown directly when in COLO mode, FOR Primary VM's shutdown, we should do some work to ensure the consistent action between PVM and SVM. Cc: Paolo Bonzini Signed-off-by: zhanghailiang Signed-off-by: Lai Jiangshan Signed-off-by: Li Zhijian --- include/sysemu/

[Qemu-devel] [PATCH COLO-Frame v6 22/31] COLO NIC : Implement colo nic init/destroy function

2015-06-18 Thread zhanghailiang
When in colo mode, call colo nic init/destroy function. Cc: Stefan Hajnoczi Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- include/net/colo-nic.h | 4 +++ migration/colo.c | 15 +++ net/colo-nic.c | 71 +

Re: [Qemu-devel] [PATCH] Add .dir-locals.el file to configure emacs coding style

2015-06-18 Thread Michael Tokarev
18.06.2015 11:36, Markus Armbruster wrote: > Michael Tokarev writes: > >> So, what is the consensus here? >> >> Everyone who talked wants the emacs mode, but everyone >> offers their own mode. >> >> I'd pick the stroustrup variant suggested by Marcus >> since it is shortest, but while being short

[Qemu-devel] [PATCH COLO-Frame v6 27/31] COLO: Add colo-set-checkpoint-period command

2015-06-18 Thread zhanghailiang
With this command, we can control the period of checkpoint, if there is no comparison of net packets. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- hmp-commands.hx| 15 +++ hmp.c | 7 +

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Aurelien Jarno
On 2015-06-18 10:16, Aurelien Jarno wrote: > On x86, this patch brings a 5% boot time improvement on MIPS. One of the > reason is that the TCG code generator has a good knowledge about which > TCG ops or helpers can trigger an exception, so it can optimize out part > of the instructions saving the

Re: [Qemu-devel] libcacard: use the library?

2015-06-18 Thread Markus Armbruster
Paolo Bonzini writes: > On 18/06/2015 10:11, Michael Tokarev wrote: >> 18.06.2015 11:09, Paolo Bonzini пишет: >>> On 17/06/2015 22:15, Michael Tokarev wrote: I tried autoconf&automake&libtool. It is a HugeMess, I disliked it. So I rewrote it as a simple shell script. The resu

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/06/2015 14:42, Pavel Dovgalyuk wrote: > > This patch introduces several helpers to pass return address > > which points to the TB. Correct return address allows correct > > restoring of the guest PC and icount. These functions should be use

Re: [Qemu-devel] libcacard: use the library?

2015-06-18 Thread Daniel P. Berrange
On Thu, Jun 18, 2015 at 11:07:53AM +0200, Markus Armbruster wrote: > Paolo Bonzini writes: > > > On 18/06/2015 10:11, Michael Tokarev wrote: > >> 18.06.2015 11:09, Paolo Bonzini пишет: > >>> On 17/06/2015 22:15, Michael Tokarev wrote: > I tried autoconf&automake&libtool. It is a HugeMess, I

Re: [Qemu-devel] [PATCH v2] Add .dir-locals.el file to configure emacs coding style

2015-06-18 Thread Markus Armbruster
Peter Maydell writes: > On 4 June 2015 at 14:30, Daniel P. Berrange wrote: >> Some default emacs setups indent by 2 spaces and uses tabs >> which is counter to the QEMU coding style rules. Adding a >> .dir-locals.el file in the top level of the GIT repo will >> inform emacs about the QEMU coding

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 11:08, Aurelien Jarno wrote: > For an i386 guest still on an x86 host, I get a 4% slower boot time by > not using retranslation (see patch below). This is not that much > compared to the complexity retranslation bring us. QEMU could just always compute and store the restore_state inf

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Peter Lieven
Am 18.06.2015 um 10:42 schrieb Kevin Wolf: Am 18.06.2015 um 10:30 hat Peter Lieven geschrieben: Am 18.06.2015 um 09:45 schrieb Kevin Wolf: Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben: Thread 2 (Thread 0x75550700 (LWP 2636)): #0 0x75d87aa3 in ppoll () from /lib/x86_64-linux

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 11:24, Pavel Dovgaluk wrote: >>> > > +uint16_t helper_call_ldw_cmmu(CPUArchState *env, target_ulong addr, >>> > > + int mmu_idx, uintptr_t retaddr); >> > >> > What about helper_ret_ldw_cmmu for consistency with the DATA_SIZE == 1 >> > case? > tcg.h bre

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 18/06/2015 11:24, Pavel Dovgaluk wrote: > >>> > > +uint16_t helper_call_ldw_cmmu(CPUArchState *env, target_ulong addr, > >>> > > + int mmu_idx, uintptr_t retaddr); > >> > > >> > What about helper_ret_ldw_cmmu for c

[Qemu-devel] [PULL 0/1] virtio-input: evdev passthrough

2015-06-18 Thread Gerd Hoffmann
0100) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-input-20150618-1 for you to fetch changes up to 535017c3852f72e8706c3636d0bb2587920bf57d: virtio-input: evdev passthrough (2015-06-18 10:4

[Qemu-devel] [PULL 1/1] virtio-input: evdev passthrough

2015-06-18 Thread Gerd Hoffmann
This allows to assign host input devices to the guest: qemu -device virtio-input-host-pci,evdev=/dev/input/event The guest gets exclusive access to the input device, so be careful with assigning the keyboard if you have only one connected to your machine. Signed-off-by: Gerd Hoffmann --- hw/in

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 11:33, Pavel Dovgaluk wrote: > > > /* Temporary aliases until backends are converted. */ > > > #ifdef TARGET_WORDS_BIGENDIAN > > > # define helper_ret_ldsw_mmu helper_be_ldsw_mmu > > > # define helper_ret_lduw_mmu helper_be_lduw_mmu > > > # define helper_ret_ldsl_mmu helper_be_l

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Stefan Hajnoczi
On Thu, Jun 18, 2015 at 10:29 AM, Peter Lieven wrote: > Am 18.06.2015 um 10:42 schrieb Kevin Wolf: >> >> Am 18.06.2015 um 10:30 hat Peter Lieven geschrieben: >>> >>> Am 18.06.2015 um 09:45 schrieb Kevin Wolf: Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben: > > Thread 2 (Thre

[Qemu-devel] [PATCH] ui/egl: use stride and y0_top

2015-06-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- Makefile | 4 +++- include/ui/egl-proto.h | 2 ++ qemu-eglview.c | 14 -- ui/egl.c | 4 ui/shader/texture-blit-flip.vert | 10 ++ 5 files changed, 31 insertions

Re: [Qemu-devel] [PULL 1/1] virtio-input: evdev passthrough

2015-06-18 Thread Michael S. Tsirkin
On Thu, Jun 18, 2015 at 11:33:55AM +0200, Gerd Hoffmann wrote: > This allows to assign host input devices to the guest: > > qemu -device virtio-input-host-pci,evdev=/dev/input/event > > The guest gets exclusive access to the input device, so be careful > with assigning the keyboard if you have on

Re: [Qemu-devel] [PATCH v7 0/9] Add limited support of VMware's hyper-call rpc

2015-06-18 Thread Michael S. Tsirkin
On Thu, Jun 18, 2015 at 10:33:00AM +0200, Paolo Bonzini wrote: > > > On 18/06/2015 09:58, Michael S. Tsirkin wrote: > > > If I am reading this correctly, I should add > > > > > > Acked-by: Paolo Bonzini > > > > > > to these 4 patches. > > > > > > Since I have never sent a pull request to QEMU

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Aurelien Jarno
On 2015-06-18 11:29, Paolo Bonzini wrote: > On 18/06/2015 11:08, Aurelien Jarno wrote: > > For an i386 guest still on an x86 host, I get a 4% slower boot time by > > not using retranslation (see patch below). This is not that much > > compared to the complexity retranslation bring us. > > QEMU cou

[Qemu-devel] How to trigger faults for missing peripherals?

2015-06-18 Thread Liviu Ionescu
In order to make the Cortex-M emulation accurate, I would need to configure the missing address ranges to trigger memory faults. I noticed that the emulator defines a memory range to cover the entire 64-bits memory space. Is it possible to make it trigger exceptions? If not, what would be the s

Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Peter Lieven
Am 18.06.2015 um 11:36 schrieb Stefan Hajnoczi: On Thu, Jun 18, 2015 at 10:29 AM, Peter Lieven wrote: Am 18.06.2015 um 10:42 schrieb Kevin Wolf: Am 18.06.2015 um 10:30 hat Peter Lieven geschrieben: Am 18.06.2015 um 09:45 schrieb Kevin Wolf: Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Frediano Ziglio
For the same reason there is the v >= l test. The v >= l test state that the value can be out of range so it not always a constant in the range. Adding the v < 0 check for every invalid value. As these are executed only for logging should not be a performance penalty. I also hope the compiler is

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 11:42, Aurelien Jarno wrote: >> > QEMU could just always compute and store the restore_state information. >> > TCG needs to help filling it in (a new TCG opcode?), but it should be >> > easy. > Yes, that was another approach I have in mind (I called it exception > table in my othe

Re: [Qemu-devel] [PATCH] cpu-exec: Do not invalidate original TB in cpu_exec_nocache()

2015-06-18 Thread Sergey Fedorov
On 18.06.2015 09:57, Paolo Bonzini wrote: > On 17/06/2015 19:54, Sergey Fedorov wrote: >> >> -/* tb_gen_code can flush our orig_tb, invalidate it now */ >> -tb_phys_invalidate(orig_tb, -1); >> -tb = tb_gen_code(cpu, pc, cs_base, flags, >> +tb = tb_gen_code(cpu, orig_tb->pc, orig_t

Re: [Qemu-devel] [PATCH] ui/egl: use stride and y0_top

2015-06-18 Thread Gerd Hoffmann
On Do, 2015-06-18 at 11:37 +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Oops, wrong patch, scratch that. sorry, Gerd

  1   2   3   4   >