[Qemu-devel] [PATCH v3] migration:fix free XBZRLE decoded_buf wrong

2014-01-22 Thread Gonglei (Arei)
When qemu do live migration with xbzrle, qemu malloc decoded_buf at destination end but free it at source end. It will crash qemu by double free error in some scenarios. Splitting the XBZRLE structure for clear logic distinguishing src/dst side. Signed-off-by: ChenLiang Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH] qapi: store raw expressions to QAPISchema

2014-01-22 Thread Amos Kong
After cleaning up the comments of qapi-schema.json file, we get an range of raw expressions, they are also converted to ordered dictionaries. This patch just addes a member to QAPISchema to store the raw expressions. Actually this patch was split from QMP introspection patchset, it's no longer ne

[Qemu-devel] [PATCH] vmdk: Fix format specific information (create type) for streamOptimized

2014-01-22 Thread Fam Zheng
Previously the field is wrong: $ ./qemu-img create -f vmdk -o subformat=streamOptimized /tmp/a.vmdk 1G $ ./qemu-img info /tmp/a.vmdk image: /tmp/a.vmdk file format: vmdk virtual size: 1.0G (1073741824 bytes) disk size: 12K Format specific information: cid: 1390

Re: [Qemu-devel] [PATCH] configure: helpfully output package names for some missing dependencies.

2014-01-22 Thread Stefan Weil
Hi Steward, Am 23.01.2014 05:54, schrieb Stewart Smith: > This just makes it a tiny bit easier for new developers to get started > by making it easy to see what package they need to install to get > the dependency. > > Signed-off-by: Stewart Smith > --- > configure | 12 ++-- > 1 file c

[Qemu-devel] [PATCH] configure: helpfully output package names for some missing dependencies.

2014-01-22 Thread Stewart Smith
This just makes it a tiny bit easier for new developers to get started by making it easy to see what package they need to install to get the dependency. Signed-off-by: Stewart Smith --- configure | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/configure b/config

Re: [Qemu-devel] [Qemu-ppc] KVM and variable-endianness guest CPUs

2014-01-22 Thread Victor Kamensky
Hi Alex, Sorry, for delayed reply, I was focusing on discussion with Peter. Hope you and other folks may get something out of it :). Please see responses inline On 22 January 2014 02:52, Alexander Graf wrote: > > On 22.01.2014, at 08:26, Victor Kamensky wrote: > >> On 21 January 2014 22:41, Al

Re: [Qemu-devel] [PATCH v3 2/3] qapi: change qapi to convert schema json

2014-01-22 Thread Amos Kong
On Thu, Jan 23, 2014 at 11:05:06AM +0800, Amos Kong wrote: > On Wed, Jan 22, 2014 at 01:06:51PM -0500, Luiz Capitulino wrote: > > On Sun, 5 Jan 2014 20:02:30 +0800 > > Amos Kong wrote: > > > do_c = False > > > do_h = False > > > @@ -309,11 +312,17 @@ for o, a in opts: > > > do_h = Tru

[Qemu-devel] [PATCH v4 1/4] qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()

2014-01-22 Thread Hu Tao
n_start can be actually calculated from offset. The number of sectors to be allocated(n_end - n_start) can be passed in in num. By removing n_start and n_end, we can save two parameters. The side effect is there is a bug in qcow2.c:preallocate() that passes incorrect n_start to qcow2_alloc_cluster

Re: [Qemu-devel] Possible bug in monitor code

2014-01-22 Thread Fam Zheng
On Wed, 01/22 17:53, Stratos Psomadakis wrote: > Hi, > > we've encountered a weird issue regarding monitor (qmp and hmp) behavior > with qemu-1.7 (and qemu-1.5). The following steps will reproduce the issue: > > 1) Client A connects to qmp socket with socat > 2) Client A gets greeting mes

[Qemu-devel] [PATCH v4 0/4] qemu-img: fix bugs when cluster size is larger than the default value

2014-01-22 Thread Hu Tao
This series fixes several bugs of qcow2 when doing preallocation with a cluster_size larger than the default value. v4: - qemu-iotests: use _filter_testdir directly. - remove n_end in qcow2_co_writev() that is never used. Hu Tao (4): qcow2: remove n_start and n_end of qcow2_alloc_cluster_of

[Qemu-devel] [PATCH v4 4/4] qemu-iotests: add test for qcow2 preallocation with different cluster sizes

2014-01-22 Thread Hu Tao
Signed-off-by: Hu Tao --- tests/qemu-iotests/079 | 63 ++ tests/qemu-iotests/079.out | 32 +++ tests/qemu-iotests/group | 1 + 3 files changed, 96 insertions(+) create mode 100755 tests/qemu-iotests/079 create mode 100644 te

[Qemu-devel] [PATCH v4 3/4] qcow2: check for NULL l2meta

2014-01-22 Thread Hu Tao
In case of do preallocating metadata with a large cluster size, qcow2_alloc_cluster_offset() can allocate nothing and returns a NULL l2meta. This patch checks for it and link2 l2 with only valid l2meta. Replace 9 and 512 with BDRV_SECTOR_BITS, BDRV_SECTOR_SIZE respectively while at the function.

Re: [Qemu-devel] [PATCH v3 1/4] qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()

2014-01-22 Thread Hu Tao
On Wed, Jan 22, 2014 at 10:56:58AM +0100, Kevin Wolf wrote: > Am 22.01.2014 um 07:57 hat Hu Tao geschrieben: > > n_start can be actually calculated from offset. The number of > > sectors to be allocated(n_end - n_start) can be passed in in > > num. By removing n_start and n_end, we can save two par

[Qemu-devel] [PATCH v4 2/4] qcow2: fix offset overflow in qcow2_alloc_clusters_at()

2014-01-22 Thread Hu Tao
When cluster size is big enough it can lead offset overflow in qcow2_alloc_clusters_at(). This patch fixes it. The allocation each time is stopped at L2 table boundary (see handle_alloc()), so the possible maximum bytes could be 2^(cluster_bits - 3 + cluster_bits) so int is safe for cluster_bi

Re: [Qemu-devel] [PATCH v3 2/4] qcow2: fix offset overflow in qcow2_alloc_clusters_at()

2014-01-22 Thread Hu Tao
On Wed, Jan 22, 2014 at 08:16:44PM +0100, Max Reitz wrote: > On 22.01.2014 07:57, Hu Tao wrote: > >When cluster size is big enough it can lead offset overflow > >in qcow2_alloc_clusters_at(). This patch fixes it. > > > >The allocation each time is stopped at L2 table boundary > >(see handle_alloc()

Re: [Qemu-devel] [PATCH v3 2/3] qapi: change qapi to convert schema json

2014-01-22 Thread Amos Kong
On Wed, Jan 22, 2014 at 01:06:51PM -0500, Luiz Capitulino wrote: > On Sun, 5 Jan 2014 20:02:30 +0800 > Amos Kong wrote: > > > QMP schema is defined in a json file, it will be parsed by > > qapi scripts and generate C files. > > > > We want to return the schema information to management, > > thi

Re: [Qemu-devel] [PATCH v2] migration:fix free XBZRLE decoded_buf wrong

2014-01-22 Thread Gonglei (Arei)
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Tuesday, January 21, 2014 9:46 PM > To: Gonglei (Arei); qemu-devel@nongnu.org; qemu-sta...@nongnu.org; Peter > Maydell; anth...@codemonkey.ws; pbonz...@redhat.com > Cc: chenliang (T); Luonengjun; Huangweidong (Hardw

Re: [Qemu-devel] [PATCH v3 4/4] qemu-iotests: add test for qcow2 preallocation with different cluster sizes

2014-01-22 Thread Hu Tao
On Wed, Jan 22, 2014 at 11:02:09AM +0100, Kevin Wolf wrote: > Am 22.01.2014 um 07:57 hat Hu Tao geschrieben: > > Signed-off-by: Hu Tao > > --- > > > > Note: the current largest test case number is 074, but Kevin suggested > > picking > > 079 as there are in-flight patches taken lower numbers. >

Re: [Qemu-devel] [PATCH v2] qapi: Add "backing" to BlockStats

2014-01-22 Thread Eric Blake
On 01/22/2014 07:03 PM, Fam Zheng wrote: > Currently there is no way to query BlockStats of the backing chain. This > adds "backing" field into BlockStats to make it possible. > > The comment of "parent" is reworded. > > Signed-off-by: Fam Zheng > > --- > v2: Only add "backing", drop "file". >

[Qemu-devel] [PATCH v2] qapi: Add "backing" to BlockStats

2014-01-22 Thread Fam Zheng
Currently there is no way to query BlockStats of the backing chain. This adds "backing" field into BlockStats to make it possible. The comment of "parent" is reworded. Signed-off-by: Fam Zheng --- v2: Only add "backing", drop "file". Signed-off-by: Fam Zheng --- block/qapi.c | 5 +

Re: [Qemu-devel] [PATCH 10/10] PPC: e500: Move to u-boot as firmware

2014-01-22 Thread Scott Wood
On Mon, 2014-01-20 at 00:44 +0100, Alexander Graf wrote: > Almost all platforms QEMU emulates have some sort of firmware they can load > to expose a guest environment that closely resembles the way it would look > like on real hardware. > > This patch introduces such a firmware on our e500 platfor

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Victor Kamensky
Peter, could I please ask you a favor. Could you please stop deleting pieces of your and my previous responses when you reply. Please just reply inline. Sometimes I would like to reference my or your previous statement, but I could not find it in your response email. It is very bizzar. Sorry, it wi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 04/10] PPC: Add L1CFG1 SPR emulation

2014-01-22 Thread Scott Wood
On Mon, 2014-01-20 at 00:44 +0100, Alexander Graf wrote: > In addition to the L1 data cache configuration register L1CFG0 there is > also another one for the L1 instruction cache called L1CFG1. > > Emulate that one with the same values as the data one. > > Signed-off-by: Alexander Graf > --- >

Re: [Qemu-devel] [PATCH 09/10] PPC: Add u-boot firmware for e500

2014-01-22 Thread Scott Wood
On Mon, 2014-01-20 at 11:04 +0100, Alexander Graf wrote: > > > Am 20.01.2014 um 01:17 schrieb Peter Maydell : > > > >> On 19 January 2014 23:44, Alexander Graf wrote: > >> This adds a special build of u-boot tailored for the e500 platforms we > >> emulate. It is based on patches that are current

Re: [Qemu-devel] [Qemu-ppc] [PATCH 07/10] PPC: guts: Add emulation of a few more registers

2014-01-22 Thread Scott Wood
On Mon, 2014-01-20 at 00:44 +0100, Alexander Graf wrote: > The GUTS device is used by system software to find out about hardware > details of the current system. > > We only emulate the bare minimum to be able to reboot a guest which is > not sufficient to make u-boot happy. > > Add a few more re

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Peter Maydell
On 22 January 2014 22:47, Victor Kamensky wrote: > You deleted my example, but I need it again: > Consider the following ARM code snippets: > > setend le > mov r1, #0x04030201 > str r1, [r0] > > and > > setend be > mov r1, #0x01020304 > str r1, [r0] > > Just for LE host case basically you are sayi

Re: [Qemu-devel] [PATCH] cpu: implementing victim TLB for QEMU system emulated TLB

2014-01-22 Thread Richard Henderson
On 01/22/2014 02:40 PM, Xin Tong wrote: > Thank you very much for your comments. I will provide fixes to the > problems you raised and make sure my next patch passes the > checkpatch.pl. I have a question I would like to make sure. After i go > back and fixed the problems with this patch. I need to

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Victor Kamensky
On 22 January 2014 12:02, Peter Maydell wrote: > On 22 January 2014 19:29, Victor Kamensky wrote: >> On 22 January 2014 09:29, Peter Maydell wrote: >>> This just isn't how real buses work. There is no >>> "address + 1, address + 2". There is a single address >>> for the memory transaction and a

Re: [Qemu-devel] [PATCH] cpu: implementing victim TLB for QEMU system emulated TLB

2014-01-22 Thread Xin Tong
Richard. Thank you very much for your comments. I will provide fixes to the problems you raised and make sure my next patch passes the checkpatch.pl. I have a question I would like to make sure. After i go back and fixed the problems with this patch. I need to send another (different) email with t

Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support

2014-01-22 Thread Peter Maydell
On 22 January 2014 17:55, Peter Maydell wrote: > On 22 January 2014 16:20, Gerd Hoffmann wrote: >> cocoa ui code has been updated, but is totally untested (not even >> compiled). Would be great if someone with macos hardware can give >> it a spin, and send fixup patches if needed. > 3 warnings

Re: [Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2014-01-22 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 16:44:49 (+0100), Kevin Wolf a écrit : > Am 21.01.2014 um 16:36 hat Benoît Canet geschrieben: > > Le Tuesday 21 Jan 2014 à 15:33:09 (+0100), Kevin Wolf a écrit : > > > Am 12.12.2013 um 16:33 hat Benoît Canet geschrieben: > > > > v5: > > > > block empty node names [Kevin

Re: [Qemu-devel] Intel AVX instructions

2014-01-22 Thread Xin Tong
Richard: That is very intelligient way to support AVX. I believe Bochs uses similar technique. On Wed, Jan 22, 2014 at 2:19 PM, Richard Henderson wrote: > On 01/22/2014 11:35 AM, Xin Tong wrote: >> It seems that BOCHS have AVX instructions support in interpreter. I am >> thinking an easy/reliabl

Re: [Qemu-devel] [PATCH] cpu: implementing victim TLB for QEMU system emulated TLB

2014-01-22 Thread Richard Henderson
On 01/22/2014 06:48 AM, Xin Tong wrote: > +#define TLB_XOR_SWAP(X, Y) do {*X = *X ^ *Y; *Y = *X ^ *Y; *X = *X ^ > *Y;}while(0); First, your patch is line wrapped. You really really really need to follow the directions Peter gave you. Second, using xor to swap values is a cute assembler trick, bu

Re: [Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2014-01-22 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 16:44:49 (+0100), Kevin Wolf a écrit : > Am 21.01.2014 um 16:36 hat Benoît Canet geschrieben: > > Le Tuesday 21 Jan 2014 à 15:33:09 (+0100), Kevin Wolf a écrit : > > > Am 12.12.2013 um 16:33 hat Benoît Canet geschrieben: > > > > v5: > > > > block empty node names [Kevin

Re: [Qemu-devel] [PATCH V5 7/7] qmp: Allow to take external snapshots on bs graphs node.

2014-01-22 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 15:28:49 (+0100), Kevin Wolf a écrit : > Am 12.12.2013 um 16:34 hat Benoît Canet geschrieben: > > Signed-off-by: Benoit Canet > > --- > > blockdev.c | 55 > > --- > > hmp.c| 4 +++- > > qapi-schema.js

Re: [Qemu-devel] [PATCH v3 00/29] block: Support for 512b-on-4k emulation

2014-01-22 Thread Christian Borntraeger
On 17/01/14 15:14, Kevin Wolf wrote: > This patch series adds code to the block layer that allows performing > I/O requests in smaller granularities than required by the host backend > (most importantly, O_DIRECT restrictions). It achieves this for reads > by rounding the request to host-side block

Re: [Qemu-devel] [PATCH v3 20/29] block: Align requests in bdrv_co_do_pwritev()

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:10 (+0100), Kevin Wolf a écrit : > This patch changes bdrv_co_do_pwritev() to actually be what its name > promises. If requests aren't properly aligned, it performs a RMW. > > Requests touching the same block are serialised against the RMW request. > Further optimisat

Re: [Qemu-devel] [PATCH v1 0/4] -object/object-add add 2nd stage initialization

2014-01-22 Thread Luiz Capitulino
On Thu, 16 Jan 2014 17:34:35 +0100 Igor Mammedov wrote: > Adds UserCreatable interface that objects must inherit from > If they need to be created with help of -object/object-add > commands. > > Interface also provides an optional complete() callback, > that is called after object properties are

Re: [Qemu-devel] [PATCH v3 19/29] block: Allow wait_serialising_requests() at any point

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:09 (+0100), Kevin Wolf a écrit : > We can only have a single wait_serialising_requests() call per request > because otherwise we can run into deadlocks where requests are waiting > for each other. The same is true when wait_serialising_requests() is not > at the very b

Re: [Qemu-devel] Intel AVX instructions

2014-01-22 Thread Richard Henderson
On 01/22/2014 11:35 AM, Xin Tong wrote: > It seems that BOCHS have AVX instructions support in interpreter. I am > thinking an easy/reliable way to do this would be generate helper > calls to emulate every AVX instruction and follow how BOCHS emulates > them. Then depending on the expected frequenc

Re: [Qemu-devel] [PATCH v3 18/29] block: Make overlap range for serialisation dynamic

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:08 (+0100), Kevin Wolf a écrit : > Copy on Read wants to serialise with all requests touching the same > cluster, so wait_serialising_requests() rounded to cluster boundaries. > Other users like alignment RMW will have different requirements, though > (requests touchin

Re: [Qemu-devel] Intel AVX instructions

2014-01-22 Thread Peter Maydell
On 22 January 2014 19:35, Xin Tong wrote: > It seems that BOCHS have AVX instructions support in interpreter. I am > thinking an easy/reliable way to do this would be generate helper > calls to emulate every AVX instruction and follow how BOCHS emulates > them. Then depending on the expected frequ

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Peter Maydell
On 22 January 2014 19:29, Victor Kamensky wrote: > On 22 January 2014 09:29, Peter Maydell wrote: >> This just isn't how real buses work. There is no >> "address + 1, address + 2". There is a single address >> for the memory transaction and a set of data on >> data lines and some separate size in

Re: [Qemu-devel] [PATCH v3 17/29] block: Generalise and optimise COR serialisation

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:07 (+0100), Kevin Wolf a écrit : > Change the API so that specific requests can be marked serialising. Only I find the spelling "serialising" instead of "serializing" really odd since QEMU code is full of z like the word virtualization. Reviewed-by: Benoit Canet >

Re: [Qemu-devel] [PATCH v3 16/29] block: Make zero-after-EOF work with larger alignment

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:06 (+0100), Kevin Wolf a écrit : > Odd file sizes could make bdrv_aligned_preadv() shorten the request in > non-aligned ways. Fix it by rounding to the required alignment instead > of 512 bytes. > > Signed-off-by: Kevin Wolf > --- > block.c | 7 --- > 1 file cha

Re: [Qemu-devel] [PATCH v3 15/29] block: Allow waiting for overlapping requests between begin/end

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:05 (+0100), Kevin Wolf a écrit : > Previously, it was not possible to use wait_for_overlapping_requests() > between tracked_request_begin()/end() because it would wait for itself. > > Ignore the current request in the overlap check and run more of the > bdrv_co_do_pre

Re: [Qemu-devel] Intel AVX instructions

2014-01-22 Thread Xin Tong
It seems that BOCHS have AVX instructions support in interpreter. I am thinking an easy/reliable way to do this would be generate helper calls to emulate every AVX instruction and follow how BOCHS emulates them. Then depending on the expected frequency and difficulties, one can decide whether to mo

Re: [Qemu-devel] best way to implement a "memclear" type instruction in TCG?

2014-01-22 Thread Peter Maydell
On 22 January 2014 19:24, Xin Tong wrote: > would there be any memory ordering issue ? what if the host processor > has a more relaxed memory ordering then the guest. maybe memset with > membarriers in between. In general we can ignore memory ordering issues because for system emulation every TCG

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Victor Kamensky
On 22 January 2014 09:29, Peter Maydell wrote: > On 22 January 2014 17:19, Victor Kamensky wrote: >> On 22 January 2014 02:22, Peter Maydell wrote: >>> but the major issue here is that the data being >>> transferred is not just a bag of bytes. The data[] >>> array plus the size field are being (

Re: [Qemu-devel] best way to implement a "memclear" type instruction in TCG?

2014-01-22 Thread Xin Tong
would there be any memory ordering issue ? what if the host processor has a more relaxed memory ordering then the guest. maybe memset with membarriers in between. Xin On Wed, Jan 22, 2014 at 1:06 PM, Richard Henderson wrote: > On 01/22/2014 10:58 AM, Peter Maydell wrote: >> In theory we could ju

Re: [Qemu-devel] [PATCH 2/3] target-mips: add support for CP0_Config5

2014-01-22 Thread Eric Johnson
Hi Petar, When Config5 exists, Config4 must exist. So it wouldn't be reserved anymore. You change does not seem to set Config3.M or Config4.M either. They must be set when Config5 is present. Eric -Original Message- From: qemu-devel-bounces+eric.johnson=imgtec@nongnu.org [mailt

Re: [Qemu-devel] [PATCH v3 2/4] qcow2: fix offset overflow in qcow2_alloc_clusters_at()

2014-01-22 Thread Max Reitz
On 22.01.2014 07:57, Hu Tao wrote: When cluster size is big enough it can lead offset overflow in qcow2_alloc_clusters_at(). This patch fixes it. The allocation each time is stopped at L2 table boundary (see handle_alloc()), so the possible maximum bytes could be 2^(cluster_bits - 3 + cluste

Re: [Qemu-devel] best way to implement a "memclear" type instruction in TCG?

2014-01-22 Thread Richard Henderson
On 01/22/2014 10:58 AM, Peter Maydell wrote: > In theory we could just find the pointer to the memory QEMU is backing > the guest RAM with and call memset on it... That's more or less what we do for the s390 insn XC. See mem_helper.c, especially mvc_fast_memset. r~

[Qemu-devel] best way to implement a "memclear" type instruction in TCG?

2014-01-22 Thread Peter Maydell
One of the instructions I need to implement for AArch64 is "DC ZVA", which is basically "clear the block of memory at this address to zeroes". What's the best way in a TCG frontend to implement this sort of thing? The block is a fixed size (implementation-dependent, but less than 2K). The instruct

[Qemu-devel] Possible bug in monitor code

2014-01-22 Thread Stratos Psomadakis
Hi, we've encountered a weird issue regarding monitor (qmp and hmp) behavior with qemu-1.7 (and qemu-1.5). The following steps will reproduce the issue: 1) Client A connects to qmp socket with socat 2) Client A gets greeting message {"QMP": {"version": ..} 3) Client A waits (select on

[Qemu-devel] [PATCH 3/3] target-mips: add user-mode FR switch support for MIPS32r5

2014-01-22 Thread Petar Jovanovic
From: Petar Jovanovic Description of UFR feature: Required in MIPS32r5 if floating point is implemented and user-mode FR switching is supported. The UFR register allows user-mode to clear StatusFR by executing a CTC1 to UFR with GPR[0] as input, and read StatusFR by executing a CFC1 to UFR. hel

[Qemu-devel] [PATCH 2/3] target-mips: add support for CP0_Config5

2014-01-22 Thread Petar Jovanovic
From: Petar Jovanovic Add CP0_Config5, define rw_bitmask and enable modifications. Signed-off-by: Petar Jovanovic --- target-mips/cpu.h| 10 ++ target-mips/helper.h |1 + target-mips/op_helper.c |5 + target-mips/translate.c | 16 ++

[Qemu-devel] [PATCH 1/3] target-mips: add CPU definition for MIPS32R5

2014-01-22 Thread Petar Jovanovic
From: Petar Jovanovic Add mips32r5-generic among CPU definitions for MIPS. Define ISA_MIPS32R3 and ISA_MIPS32R5. Signed-off-by: Petar Jovanovic --- target-mips/mips-defs.h |8 target-mips/translate_init.c | 25 + 2 files changed, 33 insertions(+) di

Re: [Qemu-devel] [PATCH v3 3/3] qmp: full introspection support for QMP

2014-01-22 Thread Luiz Capitulino
On Thu, 9 Jan 2014 17:49:56 +0800 Amos Kong wrote: > On Mon, Jan 06, 2014 at 05:37:19PM +0800, Fam Zheng wrote: > > On 2014年01月05日 20:02, Amos Kong wrote: > > >This patch introduces a new monitor command to query QMP schema > > >information, the return data is a range of schema structs, which > >

Re: [Qemu-devel] [PATCH] spice: hook qemu_chr_fe_set_open() event to ports

2014-01-22 Thread Marc-André Lureau
ping On Sat, Jan 11, 2014 at 12:20 AM, Marc-André Lureau wrote: > This wires up a spice port event on virtio-ports open/close, so the > client is notified when the other end is ready. > > Signed-off-by: Marc-André Lureau > --- > spice-qemu-char.c | 25 - > 1 file changed

Re: [Qemu-devel] [PATCH v3 2/3] qapi: change qapi to convert schema json

2014-01-22 Thread Luiz Capitulino
On Sun, 5 Jan 2014 20:02:30 +0800 Amos Kong wrote: > QMP schema is defined in a json file, it will be parsed by > qapi scripts and generate C files. > > We want to return the schema information to management, > this patch converts the json file to a string table in a > C head file, then we can

Re: [Qemu-devel] [PATCH 08/13 v7] dump: add API to write dump header

2014-01-22 Thread Laszlo Ersek
remarks below On 01/17/14 08:46, qiaonuohan wrote: > the functions are used to write header of kdump-compressed format to vmcore. > Header of kdump-compressed format includes: > 1. common header: DiskDumpHeader32 / DiskDumpHeader64 > 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 > 3. extra in

[Qemu-devel] [PATCH v2 01/42] ui/sdl2 : initial port to SDL 2.0 (v2.0)

2014-01-22 Thread Gerd Hoffmann
From: Dave Airlie I've ported the SDL1.2 code over, and rewritten it to use the SDL2 interface. The biggest changes were in the input handling, where SDL2 has done a major overhaul, and I've had to include a generated translation file to get from SDL2 codes back to qemu compatible ones. I'm stil

Re: [Qemu-devel] [PATCH V5 00/10] qapi script: support enum as discriminator and better enum name

2014-01-22 Thread Luiz Capitulino
On Fri, 20 Dec 2013 13:23:06 +0800 Wenchao Xia wrote: > This series address two issues: > > 1. support using enum as discriminator in union. > For example, if we have following define in qapi schema: > { 'enum': 'EnumOne', > 'data': [ 'value1', 'value2', 'value3' ] } > > { 'type': 'UserDefBas

[Qemu-devel] [PATCH v2 13/42] input: keyboard: switch gtk ui to new core

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 6316f5b..993a9b5 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -55,6 +55,7 @@ #include "trace.h" #include "ui/console.h" +#include "ui/input.h

Re: [Qemu-devel] outlined TLB lookup on x86

2014-01-22 Thread Xin Tong
I have submitted a patch to the QEMU devel list on implementing a victim tlb in QEMU. i should have you 2 CC'ed on the patch email so that you can help review the patch in case no one is reviewing it. The name of the patch is [Qemu-devel] [PATCH] cpu: implementing victim TLB for QEMU system emulate

Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support

2014-01-22 Thread Peter Maydell
On 22 January 2014 16:20, Gerd Hoffmann wrote: > cocoa ui code has been updated, but is totally untested (not even > compiled). Would be great if someone with macos hardware can give > it a spin, and send fixup patches if needed. OBJC ui/cocoa.o /Users/pm215/src/qemu/ui/cocoa.m:673:17: error:

Re: [Qemu-devel] outlined TLB lookup on x86

2014-01-22 Thread Richard Henderson
On 01/22/2014 09:35 AM, Peter Maydell wrote: > I don't really know the details of Alpha, but can you get away with just > "we implement N contexts, and only actually keep the most recently > used N"? This is effectively what we're doing at the moment, with N==1. Yes, I suppose we could do that. R

[Qemu-devel] [PATCH v2 18/42] input: keyboard: switch curses ui to new core

2014-01-22 Thread Gerd Hoffmann
--- ui/curses.c | 47 +-- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index dbc3d5e..b044790 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -30,6 +30,7 @@ #include "qemu-common.h" #include "ui/console.h" +

[Qemu-devel] [PATCH v2 28/42] input: mouse: switch monitor to new core

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- monitor.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index 845f608..d22e720 100644 --- a/monitor.c +++ b/monitor.c @@ -39,6 +39,7 @@ #include "monitor/monitor.h" #include "monitor/re

[Qemu-devel] [PATCH v2 22/42] input: mouse: switch legacy handlers to new core

2014-01-22 Thread Gerd Hoffmann
legacy mouse event handlers are registered in the new core, so they receive events submitted to the new input core. legacy kbd_mouse_event() continues to use the old code paths. So new-core event handlers wouldn't see events submitted via kbd_mouse_event. This leads to the constrain that we we mu

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Peter Maydell
On 22 January 2014 17:19, Victor Kamensky wrote: > On 22 January 2014 02:22, Peter Maydell wrote: >> but the major issue here is that the data being >> transferred is not just a bag of bytes. The data[] >> array plus the size field are being (mis)used to indicate >> that the memory transaction is

Re: [Qemu-devel] [PATCH 06/13 v7] dump: add support for lzo/snappy

2014-01-22 Thread Laszlo Ersek
On 01/17/14 08:46, qiaonuohan wrote: > kdump-compressed format supports three compression format, zlib/lzo/snappy. > Currently, only zlib is available. This patch is used to support lzo/snappy. > '--enable-lzo/--enable-snappy' is needed to be specified with configure to > make > lzo/snappy availab

Re: [Qemu-devel] outlined TLB lookup on x86

2014-01-22 Thread Richard Henderson
On 01/22/2014 08:55 AM, Peter Maydell wrote: > Has anybody ever looked at implementing proper TLB contexts? I've thought about it. The best I could come up with is a pointer within ENV that points to the current TLB context. It definitely adds another load insn on the fast path, but we should be

Re: [Qemu-devel] outlined TLB lookup on x86

2014-01-22 Thread Peter Maydell
On 22 January 2014 17:32, Richard Henderson wrote: > On 01/22/2014 08:55 AM, Peter Maydell wrote: >> Has anybody ever looked at implementing proper TLB contexts? > > I've thought about it. The best I could come up with is a pointer within ENV > that points to the current TLB context. It definite

Re: [Qemu-devel] Intel AVX instructions

2014-01-22 Thread Paolo Bonzini
Il 22/01/2014 17:27, Xin Tong ha scritto: Intel AVX instructions have been out for some time since sandy-bridge. Is there value to support it in QEMU. I am thinking abut a google summer of code this year to bring support for AVX/AVX2.0 to QEMU. Yes, that can be a nice project indeed! Of course

[Qemu-devel] [PATCH v2 25/42] sdl2: switch mouse handling to new core

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 60 +++- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index ac3ac19..e841424 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -329,7 +329,7 @@ static void sdl_hid

Re: [Qemu-devel] [PATCH 05/13 v7] dump: add API to write elf notes to buffer

2014-01-22 Thread Laszlo Ersek
On 01/17/14 08:46, qiaonuohan wrote: > the function can be used by write_elf32_notes/write_elf64_notes to write notes > to a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_notes > will write elf notes to vmcore directly. Instead, if buf_write_note is used, > elf notes will be wri

Re: [Qemu-devel] [Xen-devel] Project idea: make QEMU more flexible

2014-01-22 Thread Wei Liu
On Wed, Jan 22, 2014 at 11:20:38AM +0100, Paolo Bonzini wrote: > Il 21/01/2014 19:27, Wei Liu ha scritto: > >>> > >>> Googling "disable tcg" would have provided an answer, but the patches > >>> were old enough to be basically useless. I'll refresh the current > >>> version in the next few days. C

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-22 Thread Victor Kamensky
Hi Peter, On 22 January 2014 02:22, Peter Maydell wrote: > On 22 January 2014 05:39, Victor Kamensky wrote: >> Hi Guys, >> >> Christoffer and I had a bit heated chat :) on this >> subject last night. Christoffer, really appreciate >> your time! We did not really reach agreement >> during the cha

[Qemu-devel] [PATCH v2 29/42] input: keyboard: switch cocoa ui to new core [untested]

2014-01-22 Thread Gerd Hoffmann
--- ui/cocoa.m | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 8661777..d4af3e5 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -514,16 +514,14 @@ QemuCocoaView *cocoaView; if (keycode) { if (keycode

[Qemu-devel] [PATCH v2 03/42] sdl2: remove text console logic

2014-01-22 Thread Gerd Hoffmann
sdl2 explicitly binds windows to graphics consoles. No need to handle non-graphic consoles anywhere. Also console switching is pointless. Zap code. Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 117 +- 1 file changed, 8 insertions(+), 1

Re: [Qemu-devel] [PATCH 07/13 v7] dump: add members to DumpState and init some of them

2014-01-22 Thread Laszlo Ersek
comments below On 01/17/14 08:46, qiaonuohan wrote: > add some members to DumpState that will be used in writing vmcore in > kdump-compressed format. some of them, like page_size, will be initialized > in the patch. > > Signed-off-by: Qiao Nuohan > --- > dump.c| 30 +++

[Qemu-devel] [PATCH v2 15/42] sdl2: switch keyboard handling to new core

2014-01-22 Thread Gerd Hoffmann
--- ui/sdl2.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index e7a30b3..ac3ac19 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -33,6 +33,7 @@ #include "qemu-common.h" #include "ui/console.h" +#include "ui/input.h" #include "s

[Qemu-devel] [PATCH v2 26/42] input: mouse: switch vnc ui to new core

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 46 ++ ui/vnc.h | 1 + 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 4658559..7dfc94a 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1484,7 +1484,7 @@ static void client

Re: [Qemu-devel] outlined TLB lookup on x86

2014-01-22 Thread Peter Maydell
On 22 January 2014 15:28, Xin Tong wrote: > On Wed, Nov 27, 2013 at 8:12 PM, Richard Henderson wrote: >> I'd be interested to experiment with different TLB sizes, to see what effect >> that has on performance. But I suspect that lack of TLB contexts mean that >> we >> wind up flushing the TLB m

[Qemu-devel] [PATCH v2 38/42] sdl2: simplify keymap handling

2014-01-22 Thread Gerd Hoffmann
sdl2 gives us scancodes (i.e. identifies keys by location not by keysym mapped to it). We can map them directly to QKeyCodes, pass them on to the new input core and be done with it. No need to jump though any keymap hops. Zap the code. Also operate directly on SDL scancodes for any hotkeys. Sig

[Qemu-devel] [PATCH v2 33/42] input-legacy: remove kbd_mouse_has_absolute

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 3 --- ui/input-legacy.c| 21 ++--- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index c7f4e4f..53e956d 100644 --- a/include/ui/console.h +++ b/include/ui/co

[Qemu-devel] [PATCH v2 37/42] input: add input_mouse_mode tracepoint

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- trace-events | 1 + ui/input.c | 1 + 2 files changed, 2 insertions(+) diff --git a/trace-events b/trace-events index a81d71e..322ad11 100644 --- a/trace-events +++ b/trace-events @@ -1026,6 +1026,7 @@ input_event_btn(int conidx, const char *btn, bool down) "c

Re: [Qemu-devel] [PATCH v11 00/11] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD

2014-01-22 Thread Ian Main
On Wed, Jan 08, 2014 at 06:07:41PM +0800, Fam Zheng wrote: > This series adds for point-in-time snapshot NBD exporting based on > blockdev-backup (variant of drive-backup with existing device as target). > > We get a thin point-in-time snapshot by COW mechanism of drive-backup, and > export it thr

[Qemu-devel] [PATCH v2 39/42] sdl2: codestyle fixups

2014-01-22 Thread Gerd Hoffmann
--- ui/Makefile.objs | 2 +- ui/sdl2.c| 173 +-- 2 files changed, 104 insertions(+), 71 deletions(-) diff --git a/ui/Makefile.objs b/ui/Makefile.objs index e6a5ec1..6f2294e 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -15,6

[Qemu-devel] [PATCH v2 20/42] input: mouse: add graphic_rotate support

2014-01-22 Thread Gerd Hoffmann
Transform absolute mouse events according to graphic_rotate. Legacy input code does it for both absolute and relative events, but the logic is broken for relative coordinates, so this is most likely not used anyway. Signed-off-by: Gerd Hoffmann --- ui/input.c | 33 ++

[Qemu-devel] [PATCH v2 42/42] input: remove index_from_keycode (no users)

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 - ui/input-legacy.c| 14 -- 2 files changed, 15 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 9a282cb..3bf69ee 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -329,7 +329,6 @

[Qemu-devel] [PATCH v2 34/42] input-legacy: remove kbd_mouse_is_absolute

2014-01-22 Thread Gerd Hoffmann
--- include/ui/console.h | 1 - ui/input-legacy.c| 11 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 53e956d..21b32e4 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -50,7 +50,6 @@ void kbd_put_leds

Re: [Qemu-devel] [PATCH uq/master] kvm: always update the MPX model specific register

2014-01-22 Thread Paolo Bonzini
Il 22/01/2014 16:29, Marcelo Tosatti ha scritto: > The original patch from Liu Jinsong restricted them to reset or full > state updates, but that's unnecessary (and wrong) since the BNDCFGS > MSR has no side effects. Why is it necessary to save/restore BNDCFGS MSR on states other than FULL and R

Re: [Qemu-devel] outlined TLB lookup on x86

2014-01-22 Thread Richard Henderson
On 01/22/2014 07:28 AM, Xin Tong wrote: > Can you tell me whether ARM is the only architecture that requires > special treatment for increasing tlb size beyond 256 entries so that i > can whip up a patch to the QEMU mainline. The major constraint for the non-arm ports is CPU_TLB_ENTRY_SIZE +

[Qemu-devel] [PATCH v2 36/42] input: move mouse mode notifier to new core

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 4 include/ui/input.h | 4 ui/input-legacy.c| 34 +- ui/input.c | 30 ++ 4 files changed, 35 insertions(+), 37 deletions(-) diff --git a/include/ui/cons

[Qemu-devel] [PATCH v2 40/42] input: move qmp_query_mice to new core

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/input-legacy.c | 23 --- ui/input.c| 29 + 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/ui/input-legacy.c b/ui/input-legacy.c index 7f8e72b..7843482 100644 --- a/ui/input-legacy.c +++ b

[Qemu-devel] Intel AVX instructions

2014-01-22 Thread Xin Tong
Intel AVX instructions have been out for some time since sandy-bridge. Is there value to support it in QEMU. I am thinking abut a google summer of code this year to bring support for AVX/AVX2.0 to QEMU. Xin

[Qemu-devel] [PATCH v2 30/42] input: mouse: switch cocoa ui to new core [untested]

2014-01-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 2 ++ ui/cocoa.m | 63 ++-- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 8543d18..a3062d0 100644 --- a/include/u

  1   2   >