Re: [Qemu-devel] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3

2015-11-03 Thread Julio Guerra
Ping :) Le mer. 14 oct. 2015 19:43, Julio Guerra a écrit : > Fix the index used to read the IBAT's vector which results in IBAT0..3 > instead > of IBAT4..N. > > The bug appeared by saving/restoring contexts including IBATs values. > > Signed-off-by: Julio Guerra > --- > target-ppc/translate_in

Re: [Qemu-devel] [Qemu-arm] [PATCH] ARM: ACPI: Fix MPIDR value in ACPI table

2015-11-03 Thread Peter Maydell
On 3 November 2015 at 04:33, Peter Crosthwaite wrote: > So, I think this is just another case of the MPIDR information flow > going the wrong way. It should go from board to all of CPU, DT and now > this. I guess we can just fix this incrementally when we fix the > implicit setting of MPIDR in mac

Re: [Qemu-devel] [PATCH 01/13] PPC: Allow Rc bit to be set on mtspr

2015-11-03 Thread Thomas Huth
On 23/10/15 15:56, Mark Cave-Ayland wrote: > From: Alexander Graf > > According to the ISA setting the Rc bit on mtspr is undefined behavior. > Real 750 hardware simply ignores the bit and doesn't touch cr0 though. According to PowerISA 2.07, chapter 1.1.3: "Reserved fields in instructions are

Re: [Qemu-devel] [PATCH 00/19] buffer/vnc: improve vnc buffer hsndling

2015-11-03 Thread Gerd Hoffmann
> >buffer: allow a buffer to shrink gracefully > > The last Patch isn't the latest version. I have one with improved comments > here: > > https://github.com/plieven/qemu/commit/e599748ab1ef381d4b1c88bf1ea1454dd89353fb > > I also had another improvement: > > https://github.com/plieven/qemu/

Re: [Qemu-devel] [PATCH v3 00/11] vl.c: Error message rework

2015-11-03 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, Oct 30, 2015 at 05:23:27PM +0100, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > Changes v2 -> v3: >> > * Removed patch: "vl.c: Convert error sentences to simpler phrases" >> > * Removed patch: "vl.c: Reword -machine help error messages" >> > * Rem

Re: [Qemu-devel] [PATCH] target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code

2015-11-03 Thread Sergey Fedorov
On 02.11.2015 21:29, Peter Maydell wrote: > On 2 November 2015 at 18:16, Sergey Fedorov wrote: >> AArch32 translation code does not distinguish between DISAS_UPDATE and >> DISAS_JUMP. Thus, we cannot use any of them without first updating PC in >> CPU state. Furthermore, it is too complicated to u

Re: [Qemu-devel] SMM error in 2.4 changelog

2015-11-03 Thread Paolo Bonzini
On 02/11/2015 23:26, William Dauchy wrote: > Hello, > > I think there might be a mistake in the 2.4 changelog: > http://wiki.qemu.org/ChangeLog/2.4 > "Support for system management mode (requires Linux 4.1)." > > But I believe it's included in Linux v4.2 see > https://lwn.net/Articles/648995/ f

Re: [Qemu-devel] [PATCH 00/19] buffer/vnc: improve vnc buffer hsndling

2015-11-03 Thread Peter Lieven
Am 03.11.2015 um 09:23 schrieb Gerd Hoffmann: buffer: allow a buffer to shrink gracefully The last Patch isn't the latest version. I have one with improved comments here: https://github.com/plieven/qemu/commit/e599748ab1ef381d4b1c88bf1ea1454dd89353fb I also had another improvement: https:

[Qemu-devel] [PATCH 1/2] io/buffer: allow a buffer to shrink gracefully

2015-11-03 Thread Peter Lieven
the idea behind this patch is to allow the buffer to shrink, but make this a seldom operation. The buffers average size is measured exponentionally smoothed with am alpha of 1/128. Signed-off-by: Peter Lieven --- include/io/buffer.h | 1 + io/buffer.c | 42 ++

[Qemu-devel] [PATCH 2/2] io/buffer: avoid memmove at each qio_buffer_advance

2015-11-03 Thread Peter Lieven
memmove isn't exactly cheap at it involves temporary buffers if the memory areas are overlapping. So make qio_buffer_advance basically a pointer adjustment, but still keep the wasted memory in reasonable limits. Signed-off-by: Peter Lieven --- include/io/buffer.h | 2 ++ io/buffer.c | 4

[Qemu-devel] [PATCH 0/2] vnc buffer enhancements for 2.5

2015-11-03 Thread Peter Lieven
These are 2 patches on top of Gerds improve buffer handling series. Patch 1 is an updated version of the patch included in Gerds series and Patch 2 is a further optimization open for discussion. Peter Peter Lieven (2): io/buffer: allow a buffer to shrink gracefully io/buffer: avoid memmove a

Re: [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled

2015-11-03 Thread Sergey Fedorov
On 02.11.2015 21:28, Peter Maydell wrote: > On 2 November 2015 at 17:51, Sergey Fedorov wrote: >> CPU singlestep is done by generating a debug internal exception. Do not >> raise a real CPU exception in case of singlestepping. >> >> Signed-off-by: Sergey Fedorov >> --- >> target-arm/op_helper.c

Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: _CCA attribute is compulsary

2015-11-03 Thread Shannon Zhao
On 2015/11/3 16:31, Graeme Gregory wrote: > > > On Tue, 3 Nov 2015, at 02:25 AM, Shannon Zhao wrote: >> Hi Graeme, >> >> On 2015/11/2 18:39, Graeme Gregory wrote: >>> According to ACPI specification 6.2.17 _CCA (Cache Coherency Attribute) >>> this attribute is compulsary on ARM systems. Add thi

Re: [Qemu-devel] [RFC PATCH 0/5] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2015-11-03 Thread Dmitry Fleytman
> On 3 Nov 2015, at 07:44 AM, Jason Wang wrote: > > > > On 11/02/2015 03:49 PM, Dmitry Fleytman wrote: >> >>> On 2 Nov 2015, at 05:35 AM, Jason Wang >> >>> >> wrote: >>> >>> >>> >>> On 10/31/2015 01:52 PM,

Re: [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled

2015-11-03 Thread Peter Maydell
On 3 November 2015 at 09:02, Sergey Fedorov wrote: > On 02.11.2015 21:28, Peter Maydell wrote: >> On 2 November 2015 at 17:51, Sergey Fedorov wrote: >>> CPU singlestep is done by generating a debug internal exception. Do not >>> raise a real CPU exception in case of singlestepping. >>> >>> Signed

Re: [Qemu-devel] [PATCH v2 2/2] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-03 Thread Alberto Garcia
On Mon 02 Nov 2015 06:29:14 PM CET, Eric Blake wrote: >>> @@ -103,7 +103,8 @@ function add_snapshot_image() >>> { 'options': >>> { 'driver': 'qcow2', 'node-name': 'snap_"${1}"', >>> "${extra_params}" >>> 'file': >>> - { 'driver': 'file', 'fi

Re: [Qemu-devel] qemu-2.2 using trace event

2015-11-03 Thread Stefan Hajnoczi
On Tue, Nov 3, 2015 at 9:13 AM, 浩樊啊 wrote: Please keep qemu-devel@nongnu.org on CC so the discussion stays on the mailing list where others can participate. > you mean that qemu-system-x86_64 . is a command to start a vm? > can I just start a vm by a xml file and then use qemu-system_x86_6

Re: [Qemu-devel] [PATCH v3 2/5] fw_cfg: amend callback behavior spec to once per select

2015-11-03 Thread Laszlo Ersek
On 11/03/15 01:35, Gabriel L. Somlo wrote: > Currently, the fw_cfg internal API specifies that if an item was set up > with a read callback, the callback must be run each time a byte is read > from the item. This behavior is both wasteful (most items do not have a > read callback set), and impracti

[Qemu-devel] [PULL 1/6] ui/curses: Fix monitor color with -curses when 256 colors

2015-11-03 Thread Gerd Hoffmann
From: OGAWA Hirofumi If TERM=xterm-256color, COLOR_PAIRS==256 and monitor passes chtype like 0x74xx. Then, the code uses uninitialized color pair. As result, monitor uses black for both of fg and bg color, i.e. terminal is filled by black. To fix, this initialize above than 64 with default color

[Qemu-devel] [PULL 0/6] ui patch queue

2015-11-03 Thread Gerd Hoffmann
mu tags/pull-ui-20151103-1 for you to fetch changes up to 4d77b1f23877b579b94421d0cab2bebc79f4e171: vnc: fix bug: vnc server can't start when 'to' is specified (2015-11-03 10:21:49 +0100) ui: fi

[Qemu-devel] [PULL 6/6] vnc: fix bug: vnc server can't start when 'to' is specified

2015-11-03 Thread Gerd Hoffmann
From: Yang Hongyang commit e0d03b8ceb52 converted VNC startup to use SocketAddress, the interface socket_listen don't have a port_offset param, so we need to add the port offset (5900) to both 'port' and 'to' opts. currently only 'port' is added by offset. This patch add the port offset to 'to' o

[Qemu-devel] [PULL 4/6] ui/opengl: Reduce build required libraries for opengl

2015-11-03 Thread Gerd Hoffmann
From: OGAWA Hirofumi We now use epoxy to load opengl libraries. This means we don't need to link opengl libraries directly if interfaces handled by epoxy. With this, we just need epoxy headers and epoxy's *.so to build. Tested with epoxy-1.3.1. - sdl2/gtk/console egl stuff doesn't require other

[Qemu-devel] [PULL 5/6] vnc: allow fall back to RAW encoding

2015-11-03 Thread Gerd Hoffmann
From: Peter Lieven I have observed that depending on the contents and the encoding it happens that sending data as RAW sometimes would take less space than the encoded data. This is especially the case for small updates or areas with high color images. If sending RAW encoded data is beneficial al

[Qemu-devel] [PULL 2/6] ui/curses: Support line graphics chars on -curses mode

2015-11-03 Thread Gerd Hoffmann
From: OGAWA Hirofumi This converts vga code to curses code in console_write_bh(). With this changes, we can see line graphics (for example, dialog uses) correctly. Signed-off-by: OGAWA Hirofumi Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 12 +++- ui/curses.c | 44

[Qemu-devel] [PULL 3/6] ui/curses: Fix pageup/pagedown on -curses

2015-11-03 Thread Gerd Hoffmann
From: OGAWA Hirofumi Current KEY_NPAGE/KEY_PPAGE handling is broken on -curses. Those uses "GREY", but "KEY_MASK" masked out "GREY". To fix, we have to use correct mask value - SCANCODE_KEYMASK. Then, this adds support of "shift + pageup/pagedown". With this, -curses mode can use scroll-up/down

[Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2015-11-03 Thread Gerd Hoffmann
This patch extends the functionality of the max-ram-below-4g option to also allow increasing lowmem. While being at it also rework the lowmem calculation logic and add a longish comment describing how it works and what the compatibility constrains are. Signed-off-by: Gerd Hoffmann --- hw/i386/p

[Qemu-devel] [PATCH for-2.5 1/1] spapr: Handle failure of KVM_PPC_ALLOCATE_HTAB ioctl

2015-11-03 Thread Bharata B Rao
KVM_PPC_ALLOCATE_HTAB ioctl can return -ENOMEM for KVM guests and QEMU never handled this correctly. But this didn't cause any problems till now as KVM_PPC_ALLOCATE_HTAB ioctl returned with smaller than requested HTAB when enough contiguous memory wasn't available in the host. After the proposed ke

[Qemu-devel] [PATCH v3 1/3] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-03 Thread Alberto Garcia
This addresses scenarios like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename': 'new.qcow2', 'node-

[Qemu-devel] [PATCH v3 3/3] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-03 Thread Alberto Garcia
This test checks that it is not possible to create a snapshot if the requested overlay node is a BDS which does not support backing images. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 12 +++- tests/qemu-iotests/085.out | 4 2 files changed, 15 insertions(+), 1 d

[Qemu-devel] [PATCH v3 0/3] Disallow snapshots if the overlay doesn't support backing files

2015-11-03 Thread Alberto Garcia
We are currently allowing snapshots in cases like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename': 'ne

[Qemu-devel] [PATCH v3 2/3] block: Remove inner quotation marks in iotest 085

2015-11-03 Thread Alberto Garcia
This patch removes the inner quotation marks in all cases like this: cmd=" ... "${variable}" ... " Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 ind

Re: [Qemu-devel] [PATCH 1/2] io/buffer: allow a buffer to shrink gracefully

2015-11-03 Thread Gerd Hoffmann
On Di, 2015-11-03 at 10:01 +0100, Peter Lieven wrote: > diff --git a/io/buffer.c b/io/buffer.c > index 0fd3cea..d2a6043 100644 > --- a/io/buffer.c > +++ b/io/buffer.c > @@ -23,6 +23,10 @@ Needs a rebase (current wip branch is available at https://www.kraxel.org/cgit/qemu/log/?h=work/vnc-buffers)

Re: [Qemu-devel] [PATCH 2/2] io/buffer: avoid memmove at each qio_buffer_advance

2015-11-03 Thread Gerd Hoffmann
> diff --git a/include/io/buffer.h b/include/io/buffer.h > index f63869e..43688cc 100644 > --- a/include/io/buffer.h > +++ b/include/io/buffer.h > @@ -39,6 +39,8 @@ struct QIOBuffer { > size_t offset; > uint64_t avg_size; > uint8_t *buffer; > +size_t base_offs; > +uint8_t *ba

Re: [Qemu-devel] [PATCH v3 4/5] fw_cfg: add generic non-DMA read method

2015-11-03 Thread Laszlo Ersek
Thank you for splitting out this patch; it makes it easier to review. However, On 11/03/15 01:35, Gabriel L. Somlo wrote: > Introduce fw_cfg_data_read(), a generic read method which works > on all access widths (1 through 8 bytes, inclusive), and can be > used during both IOPort and MMIO read acce

[Qemu-devel] [PATCH v11 00/12] Block replication is a very important feature which is used for

2015-11-03 Thread Wen Congyang
You can the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt This patch series is based on the following patch series: 1. http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg03860.html 2

[Qemu-devel] [PATCH v11 02/12] Store parent BDS in BdrvChild

2015-11-03 Thread Wen Congyang
We need to access the parent BDS to get the root BDS. Signed-off-by: Wen Congyang --- block.c | 1 + include/block/block_int.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block.c b/block.c index 1d6c115..52a91ad 100644 --- a/block.c +++ b/block.c @@ -1092,6 +1092,7 @@

[Qemu-devel] [PATCH v11 03/12] allow writing to the backing file

2015-11-03 Thread Wen Congyang
For block replication, we have such backing chain: secondary disk <-- hidden disk <-- active disk secondary disk is top BDS (use bacing reference), so it can be opened in read-write mode. But hidden disk is read only, and we need to write to hidden disk (backup job will write data to it). TODO

[Qemu-devel] [PATCH v11 08/12] Add new block driver interfaces to control block replication

2015-11-03 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 | 43 +++ include/block/block.h | 5 + include/block/block_int.h | 14

[Qemu-devel] [PATCH v11 05/12] Allow creating backup jobs when opening BDS

2015-11-03 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 Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH v11 06/12] block: make bdrv_put_ref_bh_schedule() as a public API

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang --- block.c | 25 + blockdev.c| 37 ++--- include/block/block.h | 1 + 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/block.c b/block.c index 32ed776..9a1c20e 100644 --

[Qemu-devel] [PATCH v11 01/12] unblock backup operations in backing file

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang --- block.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block.c b/block.c index 9a2ab68..1d6c115 100644 --- a/block.c +++ b/block.c @@ -1161,6 +1161,24 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd) /*

[Qemu-devel] [PATCH v11 04/12] Backup: clear all bitmap when doing block checkpoint

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Jeff Cody --- block/backup.c | 14 ++ blockjob.c | 11 +++ include/block/blockjob.h | 12 3 files changed, 37 insertions(+) diff --git a/block/

[Qemu-devel] [PATCH v11 11/12] support replication driver in blockdev-add

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Eric Blake --- qapi/block-core.json | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0539dfa..acc85ba 100644

[Qemu-devel] [PATCH v11 07/12] docs: block replication's description

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- docs/block-replication.txt | 251 + 1 file changed, 251 insertions(+) create mode 100644 docs/block-replication.txt diff --git a/docs/block-replication.txt b/docs/bl

[Qemu-devel] [PATCH v11 10/12] Implement new driver for block replication

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

[Qemu-devel] [PATCH v11 09/12] quorum: implement block driver interfaces for block replication

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Alberto Garcia --- block/quorum.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 79afb20..7cb5f91

[Qemu-devel] [PATCH v11 12/12] Add a new API to start/stop replication, do checkpoint to all BDSes

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 83 +++ include/block/block.h | 4 +++ 2 files changed, 87 insertions(+) diff --git a/block.c b/block.c index 04b928c..517fa4b 100644 ---

Re: [Qemu-devel] [PATCH v8.5 1/4] qapi: Drop all_members parameter from check()

2015-11-03 Thread Markus Armbruster
Eric Blake writes: > The implementation of QAPISchemaObjectTypeMember.check() always > adds the member currently being checked to both the all_members > and seen parameters. QAPISchemaObjectTypeMember.check() does four things: 1. Compute self.type Precondition: all types are defined. 2. Ac

Re: [Qemu-devel] [PATCH v3 5/5] fw_cfg: replace ioport data read with generic method

2015-11-03 Thread Laszlo Ersek
On 11/03/15 01:35, Gabriel L. Somlo wrote: > IOPort read access is limited to one byte at a time by > fw_cfg_comb_valid(). As such, fw_cfg_comb_read() may safely > ignore its size argument (which will always be 1), and simply > call its fw_cfg_read() helper function once, returning 8 bits > via the

[Qemu-devel] [PATCH v4 4/7] e1000: Fixing the received/transmitted packets' counters

2015-11-03 Thread Leonid Bloch
According to Intel's specs, these counters (as the other Statistic registers) stick at 0x when this maximal value is reached. Previously, they would reset after the max. value. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman --- hw/net/e1000.c | 16 1 file ch

[Qemu-devel] [PATCH v4 1/7] e1000: Cosmetic and alignment fixes

2015-11-03 Thread Leonid Bloch
This fixes some alignment and cosmetic issues. The changes are made in order that the following patches in this series will look like integral parts of the code surrounding them, while conforming to the coding style. Although some changes in unrelated areas are also made. Signed-off-by: Leonid Blo

[Qemu-devel] [PATCH v4 3/7] e1000: Trivial implementation of various MAC registers

2015-11-03 Thread Leonid Bloch
These registers appear in Intel's specs, but were not implemented. These registers are now implemented trivially, i.e. they are initiated with zero values, and if they are RW, they can be written or read by the driver, or read only if they are R (essentially retaining their zero values). For these

[Qemu-devel] [PATCH v4 0/7] e1000: Various fixes and registers' implementation

2015-11-03 Thread Leonid Bloch
This series fixes issues with packet/octet counting in e1000's Statistic registers, fixes a bug in the packet address filtering procedure, and implements many MAC registers that were absent before, some Statistic counters among them. Besides this, the series introduces a parameter which, if set to

[Qemu-devel] [PATCH v4 5/7] e1000: Fixing the received/transmitted octets' counters

2015-11-03 Thread Leonid Bloch
Previously, these 64-bit registers did not stick at their maximal values when (and if) they reached them, as they should do, according to the specs. This patch introduces a function that takes care of such registers, avoiding code duplication, making the relevant parts more compatible with the QEM

[Qemu-devel] [PATCH v4 2/7] e1000: Add support for migrating the entire MAC registers' array

2015-11-03 Thread Leonid Bloch
This patch enables the migration of the entire array of MAC registers during live migration. The entire array is just 128 KB long, so practically no penalty should be felt when transmitting it, over the individual registers. But the advantages are more compact code, and no need to introduce new vms

[Qemu-devel] [PATCH v4 6/7] e1000: Fixing the packet address filtering procedure

2015-11-03 Thread Leonid Bloch
Previously, if promiscuous unicast was enabled, a packet was received straight away, even if it was a multicast or a broadcast packet. This patch fixes that behavior, while making the filtering procedure a bit more human-readable. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman --- h

[Qemu-devel] [PULL 0/2] usb patch queue

2015-11-03 Thread Gerd Hoffmann
available in the git repository at: git://git.kraxel.org/qemu tags/pull-usb-20151103-1 for you to fetch changes up to a9be4e7c48c4892c836bda1be4d550bb1a6732bd: usb-host: fix usb3ep0quirk test (2015-11-03 11:56:23 +0100) usb: tw

[Qemu-devel] [PATCH v4 7/7] e1000: Implementing various counters

2015-11-03 Thread Leonid Bloch
This implements the following Statistic registers (various counters) according to Intel's specs: TSCTC GOTCL GOTCH GORCL GORCH MPRC BPRC RUCROC BPTC MPTC PTC... PRC... Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman --- hw/net/e1000.c | 78 ++

Re: [Qemu-devel] [PATCH 2/2] io/buffer: avoid memmove at each qio_buffer_advance

2015-11-03 Thread Markus Armbruster
Peter Lieven writes: > memmove isn't exactly cheap at it involves temporary buffers > if the memory areas are overlapping. Really? The memmove() I've seen detect whether to copy forward or backward. None of them copies through a bounce buffer. Avoiding it can be worthwhile regardless. >

[Qemu-devel] [PULL 2/2] usb-host: fix usb3ep0quirk test

2015-11-03 Thread Gerd Hoffmann
usb->speed is the usb speed the device is actually running on in the qemu emulation (i.e. from the guests point of view). So when plugging usb3 devices into ehci hostadapter this is HIGH not SUPER. To figure whenever the host talks to the device with superspeed we have to check speedmask instead

Re: [Qemu-devel] [PULL 0/6] ui patch queue

2015-11-03 Thread Peter Maydell
02' > into staging (2015-11-02 11:11:39 +) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-ui-20151103-1 > > for you to fetch changes up to 4d77b1f23877b579b94421d0cab2bebc79f4e171: > >

[Qemu-devel] [PULL 1/2] ehci: clear suspend bit on detach

2015-11-03 Thread Gerd Hoffmann
When a device is detached, clear the suspend bit (PORTSC_SUSPEND) in the port status register. The specs are not *that* clear what is supposed to happen in case a suspended device is unplugged. But the enable bit (PORTSC_PED) is cleared, and the specs mention setting suspend with enable being uns

Re: [Qemu-devel] [PATCH] configure: add missing --disable-modules option

2015-11-03 Thread Stefan Hajnoczi
On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote: > On Mon, 11/02 14:06, Stefan Hajnoczi wrote: > Actually the document is wrong about module support, the default is off: These issues are independent of this patch, but... > > Optional features, enabled with --enable-FEATURE and > > disab

Re: [Qemu-devel] [Qemu-block] [PATCH v4 3/3] aio: Introduce aio-epoll.c

2015-11-03 Thread Stefan Hajnoczi
On Mon, Nov 02, 2015 at 09:33:19PM +0800, Fam Zheng wrote: > On Mon, 11/02 13:19, Stefan Hajnoczi wrote: > > On Mon, Nov 02, 2015 at 10:32:54AM +0800, Fam Zheng wrote: > > > On Fri, 10/30 10:07, Stefan Hajnoczi wrote: > > > > On Fri, Oct 30, 2015 at 12:06:29PM +0800, Fam Zheng wrote: > > > > > To c

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-11-03 Thread Igor Mammedov
On Mon, 2 Nov 2015 17:43:16 + Stefan Hajnoczi wrote: > On Wed, Oct 28, 2015 at 05:48:02PM +0200, Michael S. Tsirkin wrote: > > Use address_space_read to make sure we handle the case of an indirect > > descriptor crossing DIMM boundary correctly. > > > > Signed-off-by: Michael S. Tsirkin > >

Re: [Qemu-devel] [PATCH] configure: add missing --disable-modules option

2015-11-03 Thread Daniel P. Berrange
On Tue, Nov 03, 2015 at 11:22:13AM +, Stefan Hajnoczi wrote: > On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote: > > On Mon, 11/02 14:06, Stefan Hajnoczi wrote: > > Actually the document is wrong about module support, the default is off: > > These issues are independent of this patch,

[Qemu-devel] [PATCH] configure: remove help string for 'vnc-tls' option

2015-11-03 Thread Daniel P. Berrange
The '--enable-vnc-tls' option to configure was removed in commit 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 Author: Daniel P. Berrange Date: Thu Aug 6 14:39:32 2015 +0100 ui: convert VNC server to use QCryptoTLSSession This removes the corresponding help string. Signed-off-by: Daniel

Re: [Qemu-devel] [PATCH v3 00/11] simplify usage of tracepoints, and connect them to logging

2015-11-03 Thread Denis V. Lunev
On 10/29/2015 11:44 PM, Denis V. Lunev wrote: This series does three things: 1) add a "-trace [enable=]foo" option to enable one or more trace events, and a "-trace help" option to show the list of tracepoints (patches 4-5) 2) change the stderr tracing backend so that it prints to the -D log fi

Re: [Qemu-devel] [PATCH v8 40/54] Page request: Consume pages off the post-copy queue

2015-11-03 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > When transmitting RAM pages, consume pages that have been queued by > > MIG_RPCOMM_REQPAGE commands and send them ahead of normal page scanning. > > > > Note: > > a) A

Re: [Qemu-devel] [PATCH] configure: add missing --disable-modules option

2015-11-03 Thread Peter Maydell
On 3 November 2015 at 11:22, Stefan Hajnoczi wrote: > On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote: >> On Mon, 11/02 14:06, Stefan Hajnoczi wrote: >> Actually the document is wrong about module support, the default is off: > > These issues are independent of this patch, but... > >> >

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

2015-11-03 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: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- configure | 11 +++ 1 file changed, 11 insertions(+) diff --git

[Qemu-devel] [PATCH COLO-Frame v10 17/38] COLO: synchronize PVM's state to SVM periodically

2015-11-03 Thread zhanghailiang
Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- migration/colo.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 0efab21..a6791f4 100644 --- a/migration/colo.c +++

[Qemu-devel] [PATCH COLO-Frame v10 09/38] COLO: Implement colo checkpoint protocol

2015-11-03 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 'checkpoint-request'

[Qemu-devel] [PATCH COLO-Frame v10 10/38] COLO: Add a new RunState RUN_STATE_COLO

2015-11-03 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: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake --- qapi-schema.json | 7 ++

[Qemu-devel] [PATCH COLO-Frame v10 32/38] netfilter: Add a public API to release all the buffered packets

2015-11-03 Thread zhanghailiang
For COLO or MC FT, We need a function to release all the buffered packets actively. Signed-off-by: zhanghailiang Cc: Jason Wang --- v10: new patch --- include/net/filter.h | 1 + include/net/net.h| 4 net/filter-buffer.c | 15 +++ net/net.c| 24 ++

[Qemu-devel] [PATCH COLO-Frame v10 11/38] QEMUSizedBuffer: Introduce two help functions for qsb

2015-11-03 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 v10 25/38] COLO failover: Don't do failover during loading VM's state

2015-11-03 Thread zhanghailiang
We should not do failover work while the main thread is loading VM's state, otherwise it will destroy the consistent of VM's memory and device state. Here we add a new failover status 'RELAUNCH' which means we should relaunch the process of failover. Signed-off-by: zhanghailiang Signed-off-by: L

[Qemu-devel] [PATCH COLO-Frame v10 04/38] migration: Add state records for migration incoming

2015-11-03 Thread zhanghailiang
For migration destination, we also need to know its state, we will use it in COLO. Here we add a new member 'state' for MigrationIncomingState, and also use migrate_set_state() to modify its value. We fix the first parameter of migrate_set_state(), and make it public. Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH COLO-Frame v10 07/38] migration: Rename the'file' member of MigrationState and MigrationIncomingState

2015-11-03 Thread zhanghailiang
Rename the 'file' member of MigrationState to 'to_dst_file' and Rename the 'file' member of MigrationIncomingState to 'from_src_file'. For now, there are only one path direction for migration, it is from source side to destination side, but for colo and post-copy, we need both directions communica

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

2015-11-03 Thread zhanghailiang
This is the 10th version of COLO. Still, this version of COLO is only support periodic checkpoint, just like MicroCheckpointing and Remus does. We call it 'periodic' mode, the normal 'colo' mode is based on packets compare module, which is not supported for now. The compare module 'proxy' is in th

[Qemu-devel] [PATCH COLO-Frame v10 15/38] ram/COLO: Record pages received from PVM by re-using migration dirty bitmap

2015-11-03 Thread zhanghailiang
We need to record the address of the dirty pages that received from PVM, It will help flushing pages that cached into SVM. Signed-off-by: zhanghailiang --- v10: - New patch split from v9's patch 13 - Rebase to master to use 'migration_bitmap_rcu' --- migration/ram.c | 35

[Qemu-devel] [PATCH COLO-Frame v10 12/38] COLO: Save PVM state to secondary side when do checkpoint

2015-11-03 Thread zhanghailiang
The main process of checkpoint is to synchronize SVM with PVM. VM's state includes ram and device state. So we will migrate PVM's state to SVM when do checkpoint, just like migration does. We will cache PVM's state in slave, we use QEMUSizedBuffer to store the data, we need to know the size of VM

[Qemu-devel] [PATCH COLO-Frame v10 28/38] COLO: Update the global runstate after going into colo state

2015-11-03 Thread zhanghailiang
If we start qemu with -S, the runstate will change from 'prelaunch' to 'running' after going into colo state. So it is necessary to update the global runstate after going into colo state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- migration/colo.c | 5 + 1 file changed, 5 in

[Qemu-devel] [PATCH COLO-Frame v10 19/38] COLO failover: Introduce state to record failover process

2015-11-03 Thread zhanghailiang
When handling failover, we do different things according to the different stage of failover process, here we introduce a global atomic variable to record the status of failover. We add four failover status to indicate the different stage of failover process. You should use the helpers to get and s

[Qemu-devel] [PATCH COLO-Frame v10 27/38] COLO: Process shutdown command for VM in COLO state

2015-11-03 Thread zhanghailiang
If VM is in COLO FT state, we should do some extra work before normal shutdown process. SVM will ignore the shutdown command if this command is issued directly to it, PVM will send the shutdown command to SVM if it gets this command. Cc: Paolo Bonzini Signed-off-by: zhanghailiang Signed-off-by:

[Qemu-devel] [PATCH COLO-Frame v10 22/38] COLO: implement default failover treatment

2015-11-03 Thread zhanghailiang
If we detect some error in colo, we will wait for some time, hoping users also detect it. If users don't issue failover command. We will go into default failover procedure, which the PVM will takeover work while SVM is exit in default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian ---

[Qemu-devel] [PATCH COLO-Frame v10 02/38] migration: Introduce capability 'x-colo' to migration

2015-11-03 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 'x-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: Ju

[Qemu-devel] [PATCH COLO-Frame v10 06/38] migration: Integrate COLO checkpoint process into loadvm

2015-11-03 Thread zhanghailiang
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. We add three new members to struct MigrationIncomingState, 'have_colo_incoming_thread' and 'colo_incoming_thread' record the colo related threads for secondary VM, 'migration_incoming_co' records the

[Qemu-devel] [PATCH COLO-Frame v10 05/38] migration: Integrate COLO checkpoint process into migration

2015-11-03 Thread zhanghailiang
Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state after the first live migration successfully finished. We reuse migration thread, so if colo is enabled by user, migration thread will go into the process of colo. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed

[Qemu-devel] [PATCH COLO-Frame v10 23/38] qmp event: Add event notification for COLO error

2015-11-03 Thread zhanghailiang
If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together 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 th

[Qemu-devel] [PATCH COLO-Frame v10 03/38] COLO: migrate colo related info to secondary node

2015-11-03 Thread zhanghailiang
We can know if VM in destination should go into COLO mode by refer to the info that been migrated from PVM. We skip this section if colo is not enabled (i.e. migrate_set_capability colo off), so that, It not break compatibility with migration however the --enable-colo/disable-colo on the source/d

[Qemu-devel] [PATCH COLO-Frame v10 08/38] COLO/migration: establish a new communication path from destination to source

2015-11-03 Thread zhanghailiang
Add a new member 'to_src_file' to MigrationIncomingState and a new member 'from_dst_file' to MigrationState. They will be used for returning messages from destination to source. It will also be used by post-copy migration. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Cc: Dr. David Alan

[Qemu-devel] [PATCH COLO-Frame v10 31/38] COLO: Split qemu_savevm_state_begin out of checkpoint process

2015-11-03 Thread zhanghailiang
It is unnecessary to call qemu_savevm_state_begin() in every checkponit process. It mainly sets up devices and does the first device state pass. These data will not change during the later checkpoint process. So, we split it out of colo_do_checkpoint_transaction(), in this way, we can reduce these

[Qemu-devel] [PATCH COLO-Frame v10 18/38] COLO failover: Introduce a new command to trigger a failover

2015-11-03 Thread zhanghailiang
We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, if the command is sent to the PVM, the Pri

[Qemu-devel] [PATCH COLO-Frame v10 30/38] COLO: Separate the process of saving/loading ram and device state

2015-11-03 Thread zhanghailiang
We separate the process of saving/loading ram and device state when do checkpoint, we add new helpers for save/load ram/device. With this change, we can directly transfer ram from master to slave without using QEMUSizeBuffer as assistant, which also reduce the size of extra memory been used during

[Qemu-devel] [PATCH COLO-Frame v10 16/38] COLO: Flush PVM's cached RAM into SVM's memory

2015-11-03 Thread zhanghailiang
During the time of VM's running, PVM 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 PVM's RAM

[Qemu-devel] [PATCH COLO-Frame v10 26/38] COLO: Control the checkpoint delay time by migrate-set-parameters command

2015-11-03 Thread zhanghailiang
Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- v10: Fix related qmp command --- hmp.c

[Qemu-devel] [PATCH COLO-Frame v10 13/38] COLO: Load PVM's dirty pages into SVM's RAM cache temporarily

2015-11-03 Thread zhanghailiang
We should not load PVM's state directly into SVM, because there maybe some errors happen when SVM is receving data, which will break SVM. We need to ensure receving all data before load the state into SVM. We use an extra memory to cache these data (PVM's ram). The ram cache in secondary side is i

[Qemu-devel] [PATCH COLO-Frame v10 20/38] COLO: Implement failover work for Primary VM

2015-11-03 Thread zhanghailiang
For PVM, if there is failover request from users. The colo thread will exit the loop while the failover BH does the cleanup work and resumes VM. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- v10: Call migration_end() in primary_vm_do_failover() --- include/migration/colo.h |

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

2015-11-03 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: Li Zhijian --- migration/colo.c | 62 ++- migration/migration.c | 10 - trace-

  1   2   3   4   >