[Qemu-devel] [PATCH][Outreachy]

2016-03-04 Thread Sarah Khan
util/envlist.c:This patch replaces malloc with g_malloc This replacement was suggested as part of the bite-sized tasks. Signed-off-by: Sarah Khan -- diff --git a/util/envlist.c b/util/envlist.c index e86857e..0324fe2 100644 --- a/util/envlist.c +++ b/util/envlist.c @@ -25,7 +25,7 @@ env

[Qemu-devel] [PATCH v3 4/4] ui/cocoa.m: switch to QKeyCode

2016-03-04 Thread Programmingkid
This patch removes the pc/xt keycode map and replaces it with the QKeyCode keymap. Signed-off-by: John Arbuckle --- Removed the LARGEST_KEYCODE marco. Changed macToQKeyCodeMap to mac_to_qkeycode_map. ui/cocoa.m | 317 +++-- 1 file changed

[Qemu-devel] [PATCH v3 3/4] hw/input/adb.c: implement QKeyCode support

2016-03-04 Thread Programmingkid
Remove the old pc_to_adb_keycode array and replace it with QKeyCode support. Signed-off-by: John Arbuckle --- Some of the keys do not translate as logically as we would think they would. For example the Q_KEY_CODE_CTRL_R does not work with ADB_KEY_RIGHT_CONTROL. The wrong key would show up in th

[Qemu-devel] [PATCH v3 2/4] qapi-schema.json: Add power and keypad equal keys

2016-03-04 Thread Programmingkid
Add the power and keypad equal keys. These keys are found on a real Macintosh keyboard. Signed-off-by: John Arbuckle --- qapi-schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index 8d04897..5cf34bf 100644 --- a/qapi-schema.json

[Qemu-devel] [PATCH v3 1/4] adb-keys.h: initial commit

2016-03-04 Thread Programmingkid
This commit implements the adb-keys.h file. It holds information on adb keycode values. Signed-off-by: John Arbuckle --- Changed name of file from MacKeys.h to adb-keys.h. Changed name of constants from MAC_KEYS_ to ADB_KEYS_. include/hw/input/adb-keys.h | 160 +

[Qemu-devel] [PATCH v3 0/4] Implement some QKeyCode support

2016-03-04 Thread Programmingkid
This patchset adds QKeyCode support the adb and cocoa code. Note: you do not need to be on a Mac to test out the adb.c, qapi-schema.json, and adb-keys.h files. Only the cocoa.m file changes are Mac specific. If you are using Linux, then the xev command is what you could use to test out these pa

[Qemu-devel] [PATCH v3 1/3] hw/timer: Add ASPEED timer device model

2016-03-04 Thread Andrew Jeffery
Implement basic AST2400 timer functionality: Up to 8 timers can independently be configured, enabled, reset and disabled. A couple of hardware features are not implemented, namely clock value matching and pulse generation, but the implementation is enough to boot the Linux kernel configured with as

[Qemu-devel] [PATCH v3 2/3] hw/intc: Add (new) ASPEED VIC device model

2016-03-04 Thread Andrew Jeffery
Implement a basic ASPEED VIC device model, enough to boot a Linux kernel configured with aspeed_defconfig. The model implements the 'new' (revised) register set and while the hardware exposes both the new and legacy register sets, accesses to the legacy register set will not be serviced (though the

[Qemu-devel] [PATCH v3 3/3] hw/arm: Add ASPEED AST2400 machine model

2016-03-04 Thread Andrew Jeffery
Adds an AST2400 ARM machine[1], based around an AST2400 SOC containing an ARM926 processor, ASPEED VIC and timer devices, and a 8250 UART. The new machine type is functional enough to boot an aspeed_defconfig Linux kernel to userspace. [1] http://www.aspeedtech.com/products.php?fPath=20&rId=376 S

[Qemu-devel] [PATCH v3 0/3] Add ASPEED AST2400 machine model

2016-03-04 Thread Andrew Jeffery
This patch series models enough of the ASPEED AST2400 ARM9 SoC[0] to boot an aspeed_defconfig Linux kernel[1]. Specifically, the series implements the timer and VIC devices and integrates them into a new ast2400 machine through a AST2400SOC model. The device model patches only partially implement t

Re: [Qemu-devel] QCow2 compression

2016-03-04 Thread mgreger
Eric Blake wrote: > [any way you could convince your mailer to not break threading?] > > On 03/03/2016 09:24 PM, mgre...@cinci.rr.com wrote: > >> > >> The zeros are not part of the compressed data, though, that's why the > >> Compressed Cluster Descriptor indicates a shorter size. Had ano

Re: [Qemu-devel] [PATCH v4 08/16] bitops: Add ONES macro

2016-03-04 Thread Alistair Francis
On Mon, Feb 29, 2016 at 3:51 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> From: Peter Crosthwaite >> >> Little macro that just gives you N ones (justified to LSB). >> >> Signed-off-by: Peter Crosthwaite >> Signed-off-by: Alistair Francis >> --- >> >> include/qemu/bitops.h | 2 ++ >

Re: [Qemu-devel] QCow2 compression

2016-03-04 Thread Eric Blake
[any way you could convince your mailer to not break threading?] On 03/03/2016 09:24 PM, mgre...@cinci.rr.com wrote: >> >> The zeros are not part of the compressed data, though, that's why the >> Compressed Cluster Descriptor indicates a shorter size. Had another >> compressed cluster been writt

Re: [Qemu-devel] [PATCH v4 09/16] dma: Add Xilinx Zynq devcfg device model

2016-03-04 Thread Alistair Francis
On Mon, Feb 29, 2016 at 4:20 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> From: Peter Crosthwaite >> >> Minimal device model for devcfg module of Zynq. DMA capabilities and >> interrupt generation supported. >> >> Signed-off-by: Peter Crosthwaite >> Signed-off-by: Alistair Francis

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-04 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 04/03/2016 15:26, Li, Liang Z wrote: > >> > > >> > The memory usage will keep increasing due to ever growing caches, etc, so > >> > you'll be left with very little free memory fairly soon. > >> > > > I don't think so. > > > > Roman is righ

Re: [Qemu-devel] [PATCH 01/38] exec: Fix memory allocation when memory path names new file

2016-03-04 Thread Markus Armbruster
Paolo Bonzini writes: > On 29/02/2016 19:40, Markus Armbruster wrote: >> -if (!stat(path, &st) && S_ISDIR(st.st_mode)) { >> +ret = stat(path, &st); >> +if (!ret && S_ISDIR(st.st_mode)) { >> +/* path names a directory -> create a temporary file there */ >> /* Make name

Re: [Qemu-devel] [PATCH v4 14/16] register: Add GPIO API

2016-03-04 Thread Alistair Francis
On Mon, Feb 29, 2016 at 4:22 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> From: Peter Crosthwaite >> >> Add GPIO functionality to the register API. This allows association >> and automatic connection of GPIOs to bits in registers. GPIO inputs >> will attach to handlers that automatic

Re: [Qemu-devel] [PATCH 4/7] target-i386: Dump illegal opcodes with -d unimp

2016-03-04 Thread Richard Henderson
On Mar 4, 2016 04:41, Paolo Bonzini wrote: > Any thoughts about patch 7? > > Paolo I think I like my version, since it unifies the code testing and setting the bit.  I was planning to refresh the series on Saturday; feel free to do a pull request earlier if you want. r~

Re: [Qemu-devel] [RFC PATCH v1 05/10] cpu: Abstract CPU core type

2016-03-04 Thread Igor Mammedov
On Fri, 4 Mar 2016 16:32:53 +0530 Bharata B Rao wrote: > On Fri, Mar 04, 2016 at 11:38:45AM +0100, Igor Mammedov wrote: > > On Fri, 4 Mar 2016 12:24:16 +0530 > > Bharata B Rao wrote: > > > > > Add an abstract CPU core type that could be used by machines that want > > > to define and hotplug

Re: [Qemu-devel] [PATCH v8 6/7] s390x/cpu: Add error handling to cpu creation

2016-03-04 Thread Igor Mammedov
On Fri, 4 Mar 2016 12:50:05 +0100 David Hildenbrand wrote: > > On Fri, Mar 04, 2016 at 12:07:28PM +0100, David Hildenbrand wrote: > > > > > > > > cpu_exec_init(cs, &err); > > > > > if (err != NULL) { > > > > > error_propagate(errp, err); > > > > > return; > > >

Re: [Qemu-devel] [PATCH v4 RFC 00/17] qcow2: persistent dirty bitmaps

2016-03-04 Thread John Snow
On 02/17/2016 10:28 AM, Vladimir Sementsov-Ogievskiy wrote: > This series add persistent dirty bitmaps feature to qcow2. > Specification is in docs/spec/qcow2.txt (not merged yet, see > [PATCH v10] spec: add qcow2 bitmaps extension specification) > > This series are based on Fam's > [PATCH v2 00

Re: [Qemu-devel] [PATCH v15 8/9] Implement new driver for block replication

2016-03-04 Thread Stefan Hajnoczi
On Fri, Feb 05, 2016 at 12:18:07PM +0800, Changlong Xie wrote: > +static void secondary_do_checkpoint(BDRVReplicationState *s, Error **errp) > +{ > +Error *local_err = NULL; > +int ret; > + > +if (!s->secondary_disk->bs->job) { > +error_setg(errp, "Backup job was cancelled unexp

Re: [Qemu-devel] [PULL 00/12] QAPI patches for 2016-03-04

2016-03-04 Thread Peter Maydell
On 4 March 2016 at 16:45, Markus Armbruster wrote: > The following changes since commit 3c0f12df65da872d5fbccae469f2cb21ed1c03b7: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20160304' into staging (2016-03-04 > 11:46:32 +) >

Re: [Qemu-devel] [PATCH v15 8/9] Implement new driver for block replication

2016-03-04 Thread Stefan Hajnoczi
On Fri, Feb 05, 2016 at 12:18:07PM +0800, Changlong Xie wrote: > +static void replication_start(ReplicationState *rs, ReplicationMode mode, > + Error **errp) > +{ > +BlockDriverState *bs = rs->opaque; > +BDRVReplicationState *s = bs->opaque; > +int64_t activ

[Qemu-devel] [PATCH v9 7/7] s390x/cpu: Allow hotplug of CPUs

2016-03-04 Thread Matthew Rosato
Implement cpu hotplug routine and add the machine hook. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 10 ++ target-s390x/cpu.c | 7 +++ 2 files changed, 17 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s39

[Qemu-devel] [PATCH v9 5/7] s390x/cpu: Add CPU property links

2016-03-04 Thread Matthew Rosato
Link each CPUState as property machine/cpu[n] during initialization. Add a hotplug handler to s390-virtio-ccw machine and set the state during plug. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 34 ++ hw/s390x/s390

[Qemu-devel] [PATCH v9 6/7] s390x/cpu: Add error handling to cpu creation

2016-03-04 Thread Matthew Rosato
Check for and propogate errors during s390 cpu creation. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 2 +- target-s390x/cpu-qom.h | 1 + target-s390x/cpu.c | 73 +++--- target-s390x/cpu.h | 2 ++ target-s390x/helper.c | 41 ++

[Qemu-devel] [PATCH v9 2/7] s390x/cpu: Set initial CPU state in common routine

2016-03-04 Thread Matthew Rosato
Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/

[Qemu-devel] [PATCH v9 3/7] s390x/cpu: Get rid of side effects when creating a vcpu

2016-03-04 Thread Matthew Rosato
In preparation for hotplug, defer some CPU initialization until the device is actually being realized, including cpu_exec_init. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- target-s390x/cpu-qom.h | 2 ++ target-s390x/cpu.c | 20 +++- 2 files changed, 17

[Qemu-devel] [PATCH v9 4/7] s390x/cpu: Tolerate max_cpus

2016-03-04 Thread Matthew Rosato
Once hotplug is enabled, interrupts may come in for CPUs with an address > smp_cpus. Allocate for this and allow search routines to look beyond smp_cpus. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/s

[Qemu-devel] [PATCH v9 1/7] s390x/cpu: Cleanup init in preparation for hotplug

2016-03-04 Thread Matthew Rosato
Ensure a valid cpu_model is set upfront by setting the default value directly into the MachineState when none is specified. This is needed to ensure hotplugged CPUs share the same cpu_model. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2 +- hw/

[Qemu-devel] [PATCH v9 0/7] Allow hotplug of s390 CPUs

2016-03-04 Thread Matthew Rosato
Changes from v8->v9: * Patch 4: fix bug introduced during split, only init smp_cpus (David) * Patch 6: * nit change to error_propagate handling in realizefn (David) * scc->next_cpu_id++ (David) * s/s390_cpu_set_id/s390x_cpu_set_id/ (David) * s/s390_new_cpu/s390x_new_cpu/ (Dav

[Qemu-devel] [PATCH v2][Outreachy Round 12]

2016-03-04 Thread Sarah Khan
Replaced g_malloc() with g_new() as it would detect multiplication overflow if nb_fields ever oversize. There is no corresponding free(). thunk_register_struct() is called only at startup from the linux-user code in order to populate the struct_entries array; this data structure then remains live

Re: [Qemu-devel] [PATCH v2 0/3] add missing virtio aliases

2016-03-04 Thread Markus Armbruster
Sascha Silbe writes: > Split out from the series fixing qemu-iotest 140 on s390x [1]. > > This series makes crafting qemu command lines that work across > multiple (virtio-supporting) platforms at lot easier. > > Changes since the original series: > - included patch to improve the error message w

[Qemu-devel] [PULL 05/12] qapi-visit: Expose visit_type_FOO_members()

2016-03-04 Thread Markus Armbruster
From: Eric Blake Dan Berrange reported a case where he needs to work with a QCryptoBlockOptions union type using the OptsVisitor, but only visit one of the branches of that type (the discriminator is not visited directly, but learned externally). When things were boxed, it was easy: just visit t

[Qemu-devel] [PULL 11/12] chardev: Drop useless ChardevDummy type

2016-03-04 Thread Markus Armbruster
From: Eric Blake Commit d0d7708b made ChardevDummy be an empty wrapper type around ChardevCommon. But there is no technical reason for this indirection, so simplify the code by directly using the base type. Also change the fallback assignment to assign u.null rather than u.data, since a future

[Qemu-devel] [PULL 08/12] util: Shorten references into SocketAddress

2016-03-04 Thread Markus Armbruster
From: Eric Blake An upcoming patch will alter how simple unions, like SocketAddress, are laid out, which will impact all lines of the form 'addr->u.XXX' (expanding it to the longer 'addr->u.XXX.data'). For better legibility in that patch, and less need for line wrapping, it's better to use a tem

[Qemu-devel] [PULL 12/12] qapi: Drop useless 'data' member of unions

2016-03-04 Thread Markus Armbruster
From: Eric Blake We started moving away from the use of the 'void *data' member in the C union corresponding to a QAPI union back in commit 544a373; recent commits have gotten rid of other uses. Now that it is completely unused, we can remove the member itself as well as the FIXME comment. Upda

[Qemu-devel] [PULL 03/12] qapi: Rename 'fields' to 'members' in generator

2016-03-04 Thread Markus Armbruster
From: Eric Blake C types and JSON objects don't have fields, but members. We shouldn't gratuitously invent terminology. This patch is a strict renaming of generator code internals (including testsuite comments), before later patches rename C interfaces. No change to generated code with this pa

[Qemu-devel] [PULL 09/12] ui: Shorten references into InputEvent

2016-03-04 Thread Markus Armbruster
From: Eric Blake An upcoming patch will alter how simple unions, like InputEvent, are laid out, which will impact all lines of the form 'evt->u.XXX' (expanding it to the longer 'evt->u.XXX.data'). For better legibility in that patch, and less need for line wrapping, it's better to use a temporar

[Qemu-devel] [PULL 00/12] QAPI patches for 2016-03-04

2016-03-04 Thread Markus Armbruster
The following changes since commit 3c0f12df65da872d5fbccae469f2cb21ed1c03b7: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160304' into staging (2016-03-04 11:46:32 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull

[Qemu-devel] [PULL 02/12] qapi-dealloc: Reduce use outside of generated code

2016-03-04 Thread Markus Armbruster
From: Eric Blake No need to roll our own use of the dealloc visitors when we can just directly use the qapi_free_FOO() functions that do what we want in one line. In net.c, inline net_visit() into its remaining lone caller. After this patch, test-visitor-serialization.c is the only non-generate

[Qemu-devel] [PULL 01/12] qmp-shell: fix pretty printing of JSON responses

2016-03-04 Thread Markus Armbruster
From: "Daniel P. Berrange" Pretty printing of JSON responses is important to be able to understand large responses from query commands in particular. Unfortunately this was broken during the addition of the verbose flag in commit 1ceca07e48ead0dd2e41576c81d40e6a91cafefd Author: John Snow

[Qemu-devel] [PULL 06/12] qapi: Update docs to match recent generator changes

2016-03-04 Thread Markus Armbruster
From: Eric Blake Several commits have been changing the generator, but not updating the docs to match: - The implicit tag member is named "type", not "kind". Screwed up in commit 39a1815. - Commit 9f08c8ec made list types lazy, and thereby dropped UserDefOneList if nothing explicitly uses the li

[Qemu-devel] [PULL 07/12] chardev: Shorten references into ChardevBackend

2016-03-04 Thread Markus Armbruster
From: Eric Blake An upcoming patch will alter how simple unions, like ChardevBackend, are laid out, which will impact all lines of the form 'backend->u.XXX' (expanding it to the longer 'backend->u.XXX.data'). For better legibility in that patch, and less need for line wrapping, it's better to us

[Qemu-devel] [PULL 10/12] qapi: Avoid use of 'data' member of QAPI unions

2016-03-04 Thread Markus Armbruster
From: Eric Blake QAPI code generators currently create a 'void *data' member as part of the anonymous union embedded in the C struct corresponding to a QAPI union. However, directly assigning to this member of the union feels a bit fishy, when we can assign to another member of the struct instea

[Qemu-devel] [PULL 04/12] qapi: Rename 'fields' to 'members' in generated C code

2016-03-04 Thread Markus Armbruster
From: Eric Blake C types and JSON objects don't have fields, but members. We shouldn't gratuitously invent terminology. This patch is a strict renaming of static genarated functions, plus the naming of the dummy filler member for empty structs, before the next patch exposes some of that naming

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Peter Maydell
On 4 March 2016 at 16:35, Eric Blake wrote: > On 03/04/2016 09:06 AM, Peter Maydell wrote: > +++ b/thunk.c @@ -88,7 +88,7 @@ void thunk_register_struct(int id, const char *name, const argtype *types) for(i = 0;i < 2; i++) { offset = 0; max_alig

Re: [Qemu-devel] [PATCH v3 00/10] easier unboxed visits/qapi implicit types

2016-03-04 Thread Markus Armbruster
Eric Blake writes: > This is patches 1-9 of v2: > https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg06079.html > > the rest of that series needs a bit more work on commit messages, > so I'll post it later as v4. > > Depends on Markus' qapi-next branch. Applied to my qapi-next branch with

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Eric Blake
On 03/04/2016 09:06 AM, Peter Maydell wrote: >>> +++ b/thunk.c >>> @@ -88,7 +88,7 @@ void thunk_register_struct(int id, const char *name, >>> const argtype *types) >>> for(i = 0;i < 2; i++) { >>> offset = 0; >>> max_align = 1; >>> -se->field_offsets[i] = malloc(nb_f

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Sarah Khan
Ok. Will complete the required. Thanks, Sarah On 4 March 2016 at 15:44, Eric Blake wrote: > On 03/04/2016 07:53 AM, Sarah Khan wrote: >> This patch replaces malloc() with g_malloc() as stated to be done in bitesized task >> >> diff --git a/thunk.c b/thunk.c >> index f057d86..bddabae 100644 >> ---

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-04 Thread Paolo Bonzini
On 04/03/2016 15:26, Li, Liang Z wrote: >> > >> > The memory usage will keep increasing due to ever growing caches, etc, so >> > you'll be left with very little free memory fairly soon. >> > > I don't think so. > Roman is right. For example, here I am looking at a 64 GB (physical) machine wh

Re: [Qemu-devel] [Qemu-block] [PATCH v15 7/9] Introduce new APIs to do replication operation

2016-03-04 Thread Stefan Hajnoczi
On Fri, Feb 05, 2016 at 12:18:06PM +0800, Changlong Xie wrote: > diff --git a/replication.h b/replication.h > new file mode 100644 > index 000..faea649 > --- /dev/null > +++ b/replication.h > @@ -0,0 +1,53 @@ > +/* > + * Replication filter > + * > + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Peter Maydell
On 4 March 2016 at 15:44, Eric Blake wrote: > On 03/04/2016 07:53 AM, Sarah Khan wrote: >> This patch replaces malloc() with g_malloc() as stated to be done in >> bitesized task >> >> diff --git a/thunk.c b/thunk.c >> index f057d86..bddabae 100644 >> --- a/thunk.c >> +++ b/thunk.c >> @@ -88,7 +88

[Qemu-devel] [PATCH] target-arm: Fix descriptor address masking in ARM address translation

2016-03-04 Thread Sergey Sorokin
There is a bug in ARM address translation regime with a long-descriptor format. On the descriptor reading its address is formed from an index which is a part of the input address. And on the first iteration this index is incorrectly masked with 'grainsize' mask. But it can be wider according to pse

[Qemu-devel] [PATCH v6 3/4] nvdimm acpi: let qemu handle _DSM method

2016-03-04 Thread Xiao Guangrong
If dsm memory is successfully patched, we let qemu fully emulate the dsm method This patch saves _DSM input parameters into dsm memory, tell dsm memory address to QEMU, then fetch the result from the dsm memory Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 120 +++

[Qemu-devel] [PATCH v6 1/4] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-04 Thread Xiao Guangrong
32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this port to tell QEMU the final address of the DSM memory and notify QEMU to emulate the DSM method Signed-off-by: Xiao Guan

[Qemu-devel] [PATCH v6 2/4] nvdimm acpi: introduce patched dsm memory

2016-03-04 Thread Xiao Guangrong
The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int32 object named "MEMA" Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 +--- 1 file changed, 17 insertio

[Qemu-devel] [PATCH v6 4/4] nvdimm acpi: emulate dsm method

2016-03-04 Thread Xiao Guangrong
Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c| 56 + include/hw/mem/nvdimm.h | 8 +++ 2 files changed, 64 insert

[Qemu-devel] [PATCH v6 0/4] NVDIMM ACPI: introduce the framework of QEMU emulated DSM

2016-03-04 Thread Xiao Guangrong
This patchset is against commit f6547bcd9a1b6 (fw-cfg: support writeable blobs) on pci branch of Michael's git tree and can be found at: https://github.com/xiaogr/qemu.git nvdimm-acpi-v6 Michael, two suggestions from you was not followed in this version, one is using ssdt->buf->len to indica

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Eric Blake
On 03/04/2016 08:49 AM, Eric Blake wrote: > Oh, I see you DID include a S-o-b, but in the subject line of the patch > instead of the commit body. Which still needs work. You need a > one-line summary as the subject, not your S-o-b, so the commit message > should look more like: > > thunk: Repla

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-04 Thread Jan Kiszka
On 2016-03-04 09:41, Thomas Huth wrote: > On 22.02.2016 20:28, Samuel Thibault wrote: >> Hello, >> >> This is another respin of IPv6 in Qemu -net user mode. >> >> These patches add ICMPv6, NDP, make UDP and TCP compatible with IPv6, and add >> TFTP over IPv6. > > *ping* > > Jan, Jason, > > coul

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-04 Thread Li, Liang Z
> > > > > > Only detect the unmapped/zero mapped pages is not enough. > > > Consider > > > > > the > > > > > > situation like case 2, it can't achieve the same result. > > > > > > > > > > Your case 2 doesn't exist in the real world. If people could > > > > > stop their main memory consumer in the

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Eric Blake
On 03/04/2016 08:44 AM, Eric Blake wrote: > On 03/04/2016 07:53 AM, Sarah Khan wrote: >> This patch replaces malloc() with g_malloc() as stated to be done in >> bitesized task >> >> diff --git a/thunk.c b/thunk.c >> index f057d86..bddabae 100644 >> --- a/thunk.c >> +++ b/thunk.c >> @@ -88,7 +88,7

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Eric Blake
On 03/04/2016 07:53 AM, Sarah Khan wrote: > This patch replaces malloc() with g_malloc() as stated to be done in > bitesized task > > diff --git a/thunk.c b/thunk.c > index f057d86..bddabae 100644 > --- a/thunk.c > +++ b/thunk.c > @@ -88,7 +88,7 @@ void thunk_register_struct(int id, const char *n

[Qemu-devel] [PATCH v3.5 09/10] chardev: Drop useless ChardevDummy type

2016-03-04 Thread Eric Blake
Commit d0d7708b made ChardevDummy be an empty wrapper type around ChardevCommon. But there is no technical reason for this indirection, so simplify the code by directly using the base type. Also change the fallback assignment to assign u.null rather than u.data, since a future patch will remove t

Re: [Qemu-devel] [PATCH v5 2/5] nvdimm acpi: introduce patched dsm memory

2016-03-04 Thread Xiao Guangrong
On 03/03/2016 09:12 PM, Michael S. Tsirkin wrote: /* copy AML table into ACPI tables blob and patch header there */ g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len); +mem_addr_offset = build_append_named_dword(table_data, +

Re: [Qemu-devel] [PATCH v3 09/10] chardev: Drop useless ChardevDummy type

2016-03-04 Thread Eric Blake
On 03/04/2016 07:40 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Commit d0d7708b made ChardevDummy be an empty wrapper type around >> ChardevCommon. But there is no technical reason for this indirection, >> so simplify the code by directly using the base type. >> >> Also change the fal

Re: [Qemu-devel] [Qemu-arm] [PATCH] target-arm: Fix translation level on early translation faults

2016-03-04 Thread Peter Maydell
On 4 March 2016 at 15:03, Sergey Sorokin wrote: > Do we really need to rearrange the code? > In pseudo-code the level is set explicitly as well, in case of a fault. That's why when I originally brought the point up I said "but I'm not sure it's worth rearranging that code"... If you want to neate

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-04 Thread Li, Liang Z
> > Maybe I am not clear enough. > > > > I mean if we inflate balloon before live migration, for a 8GB guest, it > > takes > about 5 Seconds for the inflating operation to finish. > > And these 5 seconds are spent where? > The time is spent on allocating the pages and send the allocated pages p

Re: [Qemu-devel] [PATCH v2 1/2] trace: include CPU index in trace_memory_region_*()

2016-03-04 Thread Stefan Hajnoczi
On Wed, Mar 02, 2016 at 12:12:54PM -0800, Hollis Blanchard wrote: > Knowing which CPU performed an action is essential for understanding SMP guest > behavior. > > However, cpu_physical_memory_rw() may be executed by a machine init function, > before any VCPUs are running, when there is no CPU runn

Re: [Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method

2016-03-04 Thread Xiao Guangrong
On 03/03/2016 09:23 PM, Michael S. Tsirkin wrote: + * + * They are RAM mapping on host so that these accesses never cause + * VM-EXIT. + */ +field = aml_field("NRAM", AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE); +aml_append(field, aml_named_field("HDLE", + si

Re: [Qemu-devel] [Qemu-arm] [PATCH] target-arm: Fix translation level on early translation faults

2016-03-04 Thread Sergey Sorokin
03.03.2016, 19:54, "Peter Maydell" : >  On 3 March 2016 at 16:37, Sergey Fedorov wrote: >>   On 03.03.2016 17:55, Peter Maydell wrote: >>>   Yes, this patch is definitely fixing a bug; I'm just mentioning that other >>>   code path because it seems to be the result of previously fixing the bug >

Re: [Qemu-devel] [PATCH v5 0/4] Extend TPM support with a QEMU-external

2016-03-04 Thread Trevor Vaughan
Hi All, I was wondering if there was any additional traction on this patch? I'm toward performing automated testing against the swtpm package and it would be ideal to not need to patch and recompile QEMU on all of my test systems. Thanks, Trevor -- Trevor Vaughan Vice President, Onyx Point, I

[Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan

2016-03-04 Thread Sarah Khan
This patch replaces malloc() with g_malloc() as stated to be done in bitesized task diff --git a/thunk.c b/thunk.c index f057d86..bddabae 100644 --- a/thunk.c +++ b/thunk.c @@ -88,7 +88,7 @@ void thunk_register_struct(int id, const char *name, const argtype *types) for(i = 0;i < 2; i++) {

Re: [Qemu-devel] [PATCH v2 0/3] add missing virtio aliases

2016-03-04 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Thu, Feb 18, 2016 at 10:44:11PM +0100, Sascha Silbe wrote: >> Split out from the series fixing qemu-iotest 140 on s390x [1]. >> >> This series makes crafting qemu command lines that work across >> multiple (virtio-supporting) platforms at lot easier. >> >> Chan

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-04 Thread Michael S. Tsirkin
On Fri, Mar 04, 2016 at 02:26:49PM +, Li, Liang Z wrote: > > Subject: Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration > > optimization > > > > On Fri, Mar 04, 2016 at 09:08:44AM +, Li, Liang Z wrote: > > > > On Fri, Mar 04, 2016 at 01:52:53AM +, Li, Liang Z wrote: > >

Re: [Qemu-devel] [PATCH v3 09/10] chardev: Drop useless ChardevDummy type

2016-03-04 Thread Markus Armbruster
Eric Blake writes: > Commit d0d7708b made ChardevDummy be an empty wrapper type around > ChardevCommon. But there is no technical reason for this indirection, > so simplify the code by directly using the base type. > > Also change the fallback assignment to assign u.null rather than > u.data, si

Re: [Qemu-devel] [PATCH v2 19/19] qapi: Make c_type() more OO-like

2016-03-04 Thread Eric Blake
On 03/03/2016 06:29 AM, Markus Armbruster wrote: > Eric Blake writes: > >> QAPISchemaType.c_type() was a bit awkward. Rather than having two >> optional orthogonal boolean flags that should never both be true, >> and where all callers pass a compile-time constant, provide three >> different meth

Re: [Qemu-devel] [PATCH v2 18/19] qapi: Use anonymous base in CpuInfo

2016-03-04 Thread Eric Blake
On 03/03/2016 06:08 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Now that the generator supports it, we might as well use an >> anonymous base rather than breaking out a single-use CpuInfoBase >> structure. >> >> Signed-off-by: Eric Blake > > Again, introspection value remains the sam

Re: [Qemu-devel] [PATCH v2 16/19] qapi: Allow anonymous base for flat union

2016-03-04 Thread Eric Blake
On 03/03/2016 06:04 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Rather than requiring all flat unions to explicitly create >> a separate base struct, we can allow the qapi schema to specify >> the common members via an inline dictionary. This is similar to >> how commands can specify a

Re: [Qemu-devel] [mttcg] cputlb: Use async tlb_flush_by_mmuidx

2016-03-04 Thread alvise rigo
A small update on this. I have a working implementation of the "halted state" mechanism for waiting all the pending flushes to be completed. However, the way I'm going back to the cpus.c loop (the while(1) in qemu_tcg_cpu_thread_fn) is a bit convoluted. In the case of the TLB ops that always end th

Re: [Qemu-devel] [PATCH v2 15/19] qapi-visit: Move error check into gen_visit_members_call()

2016-03-04 Thread Eric Blake
On 03/03/2016 04:56 AM, Markus Armbruster wrote: > Eric Blake writes: > >> When first introduced, neither branch of gen_visit_members_call() >> would output a goto. But now that the implicit struct visit >> always ends with a goto, we should do the same for regular >> struct visits, so that call

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-04 Thread Li, Liang Z
> Subject: Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration > optimization > > On Fri, Mar 04, 2016 at 09:08:44AM +, Li, Liang Z wrote: > > > On Fri, Mar 04, 2016 at 01:52:53AM +, Li, Liang Z wrote: > > > > > I wonder if it would be possible to avoid the kernel changes >

Re: [Qemu-devel] [PATCH v8 4/7] s390x/cpu: Tolerate max_cpus

2016-03-04 Thread Matthew Rosato
On 03/04/2016 03:05 AM, David Hildenbrand wrote: >> Once hotplug is enabled, interrupts may come in for CPUs >> with an address > smp_cpus. Allocate for this and allow >> search routines to look beyond smp_cpus. >> >> Signed-off-by: Matthew Rosato >> --- >> hw/s390x/s390-virtio.c | 13 +++---

Re: [Qemu-devel] [PULL 00/30] target-arm queue

2016-03-04 Thread Peter Maydell
0164e1b9287304bc70dd6ed071ba3e8dfc: > > Merge remote-tracking branch 'remotes/amit-virtio-rng/tags/rng-for-2.6-1' > into staging (2016-03-03 13:13:36 +) > > are available in the git repository at: > > > git://git.linaro.org/people/p

Re: [Qemu-devel] [Nbd] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-03-04 Thread Paolo Bonzini
On 04/03/2016 10:54, Kevin Wolf wrote: >>> - pls write the following amount of zeroes in either way (even calling >>> > >write directly), i.e. ensure that the data is zeroed and the space on >>> > >the file system is allocated for that. >> > >> > IOW, you *don't* want to have a sparse fi

Re: [Qemu-devel] [RFC] host and guest kernel trace merging

2016-03-04 Thread Steven Rostedt
On Fri, 4 Mar 2016 11:19:33 + Stefan Hajnoczi wrote: > > 2. Build a trace-cmd-server > > > > Which does the following: > > > > 1. Receive trace-cmd record commands from a guest, > > to be performed in the host > > Sometimes the opposite is desirable: the host control

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-04 Thread Michael S. Tsirkin
On Fri, Mar 04, 2016 at 01:57:05PM +0100, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Fri, Mar 04, 2016 at 09:42:02AM +0100, Markus Armbruster wrote: > >> Plugging an MSI-capable device into an MSI-incapable board works just > >> fine, both for physical and for virtual hardwa

Re: [Qemu-devel] [PATCH v8 0/7] Allow hotplug of s390 CPUs

2016-03-04 Thread Cornelia Huck
On Thu, 3 Mar 2016 16:30:26 -0500 Matthew Rosato wrote: > Matthew Rosato (7): > s390x/cpu: Cleanup init in preparation for hotplug > s390x/cpu: Set initial CPU state in common routine > s390x/cpu: Get rid of side effects when creating a vcpu > s390x/cpu: Tolerate max_cpus > s390x/cpu:

Re: [Qemu-devel] [PATCH v2 0/3] add missing virtio aliases

2016-03-04 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 10:44:11PM +0100, Sascha Silbe wrote: > Split out from the series fixing qemu-iotest 140 on s390x [1]. > > This series makes crafting qemu command lines that work across > multiple (virtio-supporting) platforms at lot easier. > > Changes since the original series: > - incl

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-04 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Fri, Mar 04, 2016 at 09:42:02AM +0100, Markus Armbruster wrote: >> Plugging an MSI-capable device into an MSI-incapable board works just >> fine, both for physical and for virtual hardware. What doesn't work is >> plugging an MSI-capable device into an MSI-capab

Re: [Qemu-devel] [PATCH v2 0/3] add missing virtio aliases

2016-03-04 Thread Sascha Silbe
Sascha Silbe writes: [...] > This series makes crafting qemu command lines that work across > multiple (virtio-supporting) platforms at lot easier. [...] Ping. Conny has already given her Reviewed-By; Markus gave it for a previous version of the third patch. Are there any other opinions on this

Re: [Qemu-devel] [PATCH 4/7] target-i386: Dump illegal opcodes with -d unimp

2016-03-04 Thread Paolo Bonzini
On 03/03/2016 20:06, Richard Henderson wrote: > On 03/03/2016 02:08 AM, Paolo Bonzini wrote: >>> Do you want LOG_UNIMP or LOG_GUEST_ERROR? >> >> I would actually use LOG_IN_ASM. As you noticed, guests sometimes use >> illegal opcodes; another example is Xen's hypercall interface. >> >> On 03/03/

[Qemu-devel] [PATCH V3 3/3] tests/test-filter-redirector: Add unit test for filter-redirector

2016-03-04 Thread Zhang Chen
In this unit test,we will test the filter redirector function. Case 1, tx traffic flow: qemu side | test side | +-+| +---+ | backend <---+ sock0 | +++| +---+ | | +v+ +--

[Qemu-devel] [PATCH V3 0/3] Introduce filter-redirector

2016-03-04 Thread Zhang Chen
Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect filter's net packet to outdev. and redirect indev's packet to filter. filter + | |

[Qemu-devel] [PATCH V3 2/3] net/filter-mirror:Add filter-redirector func

2016-03-04 Thread Zhang Chen
Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect filter's net packet to outdev. and redirect indev's packet to filter. filter + | |

[Qemu-devel] [PATCH V3 1/3] net/filter-mirror: Change filter_mirror_send interface

2016-03-04 Thread Zhang Chen
Change filter_mirror_send interface to make it easier to used by other filter Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- net/filter-mirror.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index ee13d94..4ff

[Qemu-devel] [PULL 19/30] target-arm: pass DisasContext to gen_aa32_ld*/st*

2016-03-04 Thread Peter Maydell
From: Paolo Bonzini We'll need the DisasContext in the next patch to retrieve the desired endianness, so pass it as a whole to gen_aa32_ld*/st*. Unfortunately we cannot let those functions call get_mem_index, because of user-mode load/store instructions. Signed-off-by: Paolo Bonzini [ PC chang

Re: [Qemu-devel] [PATCH v8 6/7] s390x/cpu: Add error handling to cpu creation

2016-03-04 Thread David Hildenbrand
> On Fri, Mar 04, 2016 at 12:07:28PM +0100, David Hildenbrand wrote: > > > > > > cpu_exec_init(cs, &err); > > > > if (err != NULL) { > > > > error_propagate(errp, err); > > > > return; > > > > } > > > > +scc->next_cpu_id = cs->cpu_index + 1; > > > > > >

  1   2   3   >