Re: [Qemu-devel] [PATCH v2 6/7] exec: Factor out section_covers_addr

2016-02-29 Thread Peter Xu
On Tue, Mar 01, 2016 at 02:18:23PM +0800, Fam Zheng wrote: > This will be shared by the next patch. > > Also add a comment explaining the unobvious condition on "size.hi". > > Signed-off-by: Fam Zheng Reviewed-by: Peter Xu > --- > exec.c | 14 +++--- > 1 file changed, 11 insertions(+

[Qemu-devel] [PULL 0/2] vga: minor cirrus/qxl bugfixes.

2016-02-29 Thread Gerd Hoffmann
Hi, Yet another small bugfix pull request, this time for vga. please pull, Gerd The following changes since commit 071608b519adf62bc29c914343a21c5407ab1ac9: Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160229-1' into staging (2016-02-29 12:24:26 +) are av

[Qemu-devel] [PULL 2/2] qxl: lock current_async update in qxl_soft_reset

2016-02-29 Thread Gerd Hoffmann
This should fix a defect report from Coverity. Signed-off-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- hw/display/qxl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index a423dee..919dc5c 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1

[Qemu-devel] [PULL 1/2] cirrus_vga: fix off-by-one in blit_region_is_unsafe

2016-02-29 Thread Gerd Hoffmann
From: Paolo Bonzini The "max" value is being compared with >=, but addr + width points to the first byte that will _not_ be copied. Laszlo suggested using a "greater than" comparison, instead of subtracting one like it is already done above for the height, so that max remains always positive. T

Re: [Qemu-devel] [PATCH v2 3/7] memory: Implement memory_region_get_ram_addr with mr->ram_block

2016-02-29 Thread Gonglei (Arei)
> Subject: [PATCH v2 3/7] memory: Implement memory_region_get_ram_addr > with mr->ram_block > > Signed-off-by: Fam Zheng > --- > include/exec/memory.h | 8 +--- > memory.c | 5 + > 2 files changed, 6 insertions(+), 7 deletions(-) > Reviewed-by: Gonglei > diff --git a/in

Re: [Qemu-devel] [PATCH V2 1/3] net/filter-traffic: add filter-traffic.h

2016-02-29 Thread Zhang Chen
On 03/01/2016 11:02 AM, Li Zhijian wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by filter-mirror, filter-redirector and so on. Is the main purpose to export filter_traffic_send() ? IMO, define it as a public API would be better. Using MirrorState and Redire

[Qemu-devel] Postcopy Migration: Recovery from a broken network connection (GSOC 2016)

2016-02-29 Thread Ashijeet Acharya
Hi Dr. David, Congratulations to Qemu for getting selected as a mentoring organization in GSOC 2016. I am keen on working on postcopy migration recovery during a network failure as my project work for GSOC 2016 . I am aware of your recent work related to postcopy and have already gone through the

Re: [Qemu-devel] [PATCH v2 1/2] net: check packet payload length

2016-02-29 Thread P J P
Hello Jason, +-- On Fri, 26 Feb 2016, Jason Wang wrote --+ | Should we count mac header here? Did "plen + hlen >= length" imply "14 + | hlen + csum_offset + 1" < length? | | Looks not. Consider a TCP packet can report evil plen (e.g 20) but just | have 10 bytes payload in fact. In this case: |

Re: [Qemu-devel] [PATCH] Use special code for sigsetjmp only in cpu-exec.c

2016-02-29 Thread Andrew Baumann
> From: Stefan Weil [mailto:s...@weilnetz.de] > Sent: Monday, 29 February 2016 9:08 PM > > The rest of the code can use longjmp with stack unwinding. > > Signed-off-by: Stefan Weil > --- > > This is a bug fix needed for 64 bit Windows. > > QEMU for Windows currently gets the wrong definition f

[Qemu-devel] [PATCH v2 7/7] exec: Introduce AddressSpaceDispatch.mru_section

2016-02-29 Thread Fam Zheng
Under heavy workloads the lookup will likely end up with the same MemoryRegionSection from last time. Using a pointer to cache the result, like ram_list.mru_block, significantly reduces cost of address_space_translate. During address space topology update, as->dispatch will be reallocated so the p

[Qemu-devel] [PATCH v2 3/7] memory: Implement memory_region_get_ram_addr with mr->ram_block

2016-02-29 Thread Fam Zheng
Signed-off-by: Fam Zheng --- include/exec/memory.h | 8 +--- memory.c | 5 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index d5284c2..810d2c0 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -

[Qemu-devel] [PATCH v2 6/7] exec: Factor out section_covers_addr

2016-02-29 Thread Fam Zheng
This will be shared by the next patch. Also add a comment explaining the unobvious condition on "size.hi". Signed-off-by: Fam Zheng --- exec.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index ad8b826..b4e2eb5 100644 --- a/exec.c +++ b/exe

[Qemu-devel] [PATCH v2 2/7] memory: Move assignment to ram_block to memory_region_init_*

2016-02-29 Thread Fam Zheng
We don't force "const" qualifiers with pointers in QEMU, but it's still good to keep a clean function interface. Assigning to mr->ram_block is in this sense ugly - one initializer mutating its owning object's state. Move it to memory_region_init_*, where mr->ram_addr is assigned. Reviewed-by: Gon

[Qemu-devel] [PATCH v2 5/7] exec: Pass RAMBlock pointer to qemu_ram_free

2016-02-29 Thread Fam Zheng
The only caller now knows exactly which RAMBlock to free, so it's not necessary to do the lookup. Reviewed-by: Gonglei Signed-off-by: Fam Zheng --- exec.c | 21 +++-- include/exec/ram_addr.h | 2 +- memory.c| 4 ++-- 3 files changed, 10 inserti

[Qemu-devel] [PATCH v2 4/7] memory: Drop MemoryRegion.ram_addr

2016-02-29 Thread Fam Zheng
All references to mr->ram_addr are replaced by memory_region_get_ram_addr(mr) (except for a few assertions that are replaced with mr->ram_block). Reviewed-by: Gonglei Signed-off-by: Fam Zheng --- cputlb.c | 4 +-- exec.c| 3 ++- hw/misc/ivshmem.c | 9 ---

[Qemu-devel] [PATCH v2 1/7] exec: Return RAMBlock pointer from allocating functions

2016-02-29 Thread Fam Zheng
Previously we return RAMBlock.offset; now return the pointer to the whole structure. ram_block_add returns void now, error is completely passed with errp. Reviewed-by: Gonglei Signed-off-by: Fam Zheng --- exec.c | 51 + include/e

[Qemu-devel] [PATCH v2 0/7] memory: Clean up MemoryRegion.ram_addr and optimize address_space_translate

2016-02-29 Thread Fam Zheng
v2: In the optimization patch, factor out section_covers_addr() and use it. [Paolo, Peter] Check "ram_block == NULL" in patch 3. [Gonglei] Add Gonglei's rev-by in patches 1, 2, 4 and 5. The first four patches drop ram_addr from MemoryRegion on top of Gonglei's optimization. The next p

Re: [Qemu-devel] [Qemu-ppc] [PATCH] dbdma: warn when using unassigned channel

2016-02-29 Thread Thomas Huth
On 26.02.2016 06:02, David Gibson wrote: > On Thu, Feb 25, 2016 at 01:02:11PM +0100, Hervé Poussineau wrote: >> With this, it's easier to know if a guest uses an invalid and/or >> unimplemented >> DMA channel. >> >> Signed-off-by: Hervé Poussineau > > Merged to ppc-for-2.6, thanks. > > Btw, you

[Qemu-devel] [PATCH v3 2/2] filter-buffer: Add status_changed callback processing

2016-02-29 Thread zhanghailiang
While the status of filter-buffer changing from 'on' to 'off', it need to release all the buffered packets, and delete the related timer, while switch from 'off' to 'on', it need to resume the release packets timer. Here, we extract the process of setup timer into a new helper, which will be used

[Qemu-devel] [PATCH v3 1/2] filter: Add 'status' property for filter object

2016-02-29 Thread zhanghailiang
With this property, users can control if this filter is 'on' or 'off'. The default behavior for filter is 'on'. For some types of filters, they may need to react to status changing, So here, we introduced status changing callback/notifier for filter class. We will skip the disabled ('off') filter

[Qemu-devel] [PATCH v3 0/2] Introduce 'status' property for netfilter

2016-02-29 Thread zhanghailiang
This is picked from COLO series, which is to realize the new 'status' property for filter. With this property, users can control if the filter is enabled or disabled. ChangeLog: v3: - Use 'bool on' instead of member 'char *status' (Jason) - Extract the process of setup timer into a new helper zh

Re: [Qemu-devel] [PATCH v1 00/17] ARM big-endian and setend support

2016-02-29 Thread Stefan Weil
Am 18.01.2016 um 08:12 schrieb Peter Crosthwaite: > Hi All, > > This patch series adds system-mode big-endian support for ARM. It also > implements the setend instruction, and loading of BE binaries even in > LE emulation mode. > > Based on Paolo's original work. I have moved all the BE32 related w

[Qemu-devel] [PATCH v12 17/18] qapi: Simplify semantics of visit_next_list()

2016-02-29 Thread Eric Blake
We have two uses of list visits in the entire code base: one in spapr_drc (which completely avoids visit_next_list(), feeding in integers from a different source than uint8List), and one in qapi-visit.py (that is, all other list visitors are generated in qapi-visit.c, and share the same paradigm ba

[Qemu-devel] [PATCH v12 13/18] qapi: Split visit_end_struct() into pieces

2016-02-29 Thread Eric Blake
As mentioned in previous patches, we want to call visit_end_struct() functions unconditionally, so that visitors can release resources tied up since the matching visit_start_struct() without also having to worry about error priority if more than one error occurs. Even though error_propagate() can

[Qemu-devel] [PATCH v12 16/18] qmp-input: Require struct push to visit members of top dict

2016-02-29 Thread Eric Blake
Don't embed the root of the visit into the stack of current containers being visited. That way, we no longer get confused on whether the first visit of a dictionary is to the dictionary itself or to one of the members of the dictionary, and we no longer have to require the root visit to pass name=

[Qemu-devel] [PATCH v12 15/18] qom: Wrap prop visit in visit_start_struct

2016-02-29 Thread Eric Blake
The qmp-input visitor was playing rather fast and loose: when visiting a QDict, you could grab members of the root dictionary without first pushing into the dict. But we are about to tighten the input visitor, at which point user_creatable_add_type() MUST follow the same paradigms as everyone else

[Qemu-devel] [PATCH v12 14/18] qapi-commands: Wrap argument visit in visit_start_struct

2016-02-29 Thread Eric Blake
The qmp-input visitor was playing rather fast and loose: when visiting a QDict, you could grab members of the root dictionary without first pushing into the dict. But we are about to tighten the input visitor, at which point the generated marshal code MUST follow the same paradigms as everyone els

[Qemu-devel] [PATCH v12 12/18] qmp: Tighten output visitor rules

2016-02-29 Thread Eric Blake
Add a new qmp_output_visitor_reset(), which must be called before reusing an exising QmpOutputVisitor on a new root object. Tighten assertions to require that qmp_output_get_qobject() can only be called after pairing a visit_end_* for every visit_start_* (rather than allowing it to return a partia

[Qemu-devel] [PATCH v12 06/18] qmp-input: Refactor when list is advanced

2016-02-29 Thread Eric Blake
Refactor the code to advance the QListEntry pointer at the point where visit_type_FOO() is called, rather than visit_next_list(). This will allow a future patch to move the visit of the list head into visit_start_list(), and get rid of the 'first' flag. Signed-off-by: Eric Blake --- v12: new pat

[Qemu-devel] [PATCH v12 18/18] qapi: Change visit_type_FOO() to no longer return partial objects

2016-02-29 Thread Eric Blake
Returning a partial object on error is an invitation for a careless caller to leak memory. As no one outside the testsuite was actually relying on these semantics, it is cleaner to just document and guarantee that ALL pointer-based visit_type_FOO() functions always leave a safe value in *obj durin

[Qemu-devel] [PATCH v12 08/18] tests: Add check-qnull

2016-02-29 Thread Eric Blake
Add a new test, for checking reference counting of qnull(). As part of the new file, move a previous reference counting change added in commit a861564 into a more logical place. Signed-off-by: Eric Blake --- v12: new patch --- tests/check-qnull.c | 60 +++

[Qemu-devel] [PATCH v12 09/18] qapi: Add visit_type_null() visitor

2016-02-29 Thread Eric Blake
Right now, qmp-output-visitor happens to produce a QNull result if nothing is actually visited between the creation of the visitor and the request for the resulting QObject. A stronger protocol would require that a QMP output visit MUST visit something. But to still be able to produce a JSON 'nul

[Qemu-devel] [PATCH v12 02/18] qapi: Guarantee NULL obj on input visitor callback error

2016-02-29 Thread Eric Blake
Our existing input visitors were not very consistent on errors in a function taking 'TYPE **obj'. While all of them set '*obj' to allocated storage on success, it was not obvious whether '*obj' was guaranteed safe on failure, or whether it was left uninitialized. But a future patch wants to guaran

[Qemu-devel] [PATCH v12 11/18] spapr_drc: Expose 'null' in qom-get when there is no fdt

2016-02-29 Thread Eric Blake
Now that the QMP output visitor supports an explicit null output, we should utilize it to make it easier to diagnose the difference between a missing fdt ('null') vs. a present-but-empty one ('{}'). (Note that this reverts the behavior of commit ab8bf1d, taking us back to the behavior of commit 6c

[Qemu-devel] [PATCH v12 10/18] qmp: Support explicit null during visits

2016-02-29 Thread Eric Blake
Implement the new type_null() callback for the qmp input and output visitors. While we don't yet have a use for this in QAPI input (the generator will need some tweaks first), one usage is already envisioned: when changing blockdev parameters, it would be nice to have a difference between leaving a

[Qemu-devel] [PATCH v12 04/18] qmp-input: Clean up stack handling

2016-02-29 Thread Eric Blake
Management of the top of stack was a bit verbose; creating a temporary variable and adding some comments makes the existing code more legible before the next few patches improve things. No semantic changes other than asserting that we are always visiting a QObject, and not a NULL value. Signed-off

[Qemu-devel] [PATCH v12 01/18] qapi-visit: Add visitor.type classification

2016-02-29 Thread Eric Blake
We have three classes of QAPI visitors: input, output, and dealloc. Currently, all implementations of these visitors have one thing in common based on their visitor type: the implementation used for the visit_type_enum() callback. But since we plan to add more such common behavior, in relation to

[Qemu-devel] [PATCH v12 07/18] qapi: Document visitor interfaces, add assertions

2016-02-29 Thread Eric Blake
The visitor interface for mapping between QObject/QemuOpts/string and QAPI is scandalously under-documented, making changes to visitor core, individual visitors, and users of visitors difficult to coordinate. Among other questions: when is it safe to pass NULL, vs. when a string must be provided;

[Qemu-devel] [PATCH v12 03/18] qmp: Drop dead command->type

2016-02-29 Thread Eric Blake
Ever since QMP was first added back in commit 43c20a43, we have never had any QmpCommandType other than QCT_NORMAL. It's pointless to carry around the cruft. Signed-off-by: Eric Blake --- v12: new patch --- include/qapi/qmp/dispatch.h | 6 -- qapi/qmp-dispatch.c | 18 +++--

[Qemu-devel] [PATCH v12 05/18] qmp-input: Don't consume input when checking has_member

2016-02-29 Thread Eric Blake
Commit e8316d7 mistakenly passed consume=true when checking if an optional member was present, but the mistake was silently ignored since the code happily let us extract a member more than once. Tighten up the input visitor to ensure that a member is consumed exactly once. To keep the testsuite h

[Qemu-devel] [PATCH v12 00/18] qapi visitor cleanups (post-introspection cleanups subset E)

2016-02-29 Thread Eric Blake
Requires these patches first: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg06079.html v12: This series (finally) finishes the review comments against the tail end of my v9 subset E series: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03504.html v10 and v11 of the series de

[Qemu-devel] [PATCH] Use special code for sigsetjmp only in cpu-exec.c

2016-02-29 Thread Stefan Weil
The rest of the code can use longjmp with stack unwinding. Signed-off-by: Stefan Weil --- This is a bug fix needed for 64 bit Windows. QEMU for Windows currently gets the wrong definition for sigsetjmp. It uses stack unwinding for longjmp which results in a crash when it is called from generate

Re: [Qemu-devel] [WIP:COLO: 1] Flush colo ram in parallel

2016-02-29 Thread Li Zhijian
Great work!! I like this patch very much. On 02/29/2016 08:41 PM, Hailiang Zhang wrote: On 2016/2/29 18:19, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Flush the colo ram cache in parallel; use the same number of threads as CPU cores. On a VM with 4 cores, and 4GB RAM

Re: [Qemu-devel] [PATCH V2 2/3] net/filter-redirector:Add filter-redirector

2016-02-29 Thread Li Zhijian
On 02/29/2016 08:23 PM, Zhang Chen wrote: 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

Re: [Qemu-devel] [RFC PATCH v2 1/3] vGPU Core driver

2016-02-29 Thread Jike Song
On 03/01/2016 07:17 AM, Neo Jia wrote: > On Mon, Feb 29, 2016 at 05:39:02AM +, Tian, Kevin wrote: >>> From: Kirti Wankhede >>> Sent: Wednesday, February 24, 2016 12:24 AM >>> >>> Signed-off-by: Kirti Wankhede >>> Signed-off-by: Neo Jia >> >> Hi, Kirti/Neo, >> >> Thanks a lot for you updated v

Re: [Qemu-devel] [PATCH V2 1/3] net/filter-traffic: add filter-traffic.h

2016-02-29 Thread Li Zhijian
On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by filter-mirror, filter-redirector and so on. Is the main purpose to export filter_traffic_send() ? IMO, define it as a public API would be better. Using MirrorState and RedirectorState are clearer rather than TrafficStat

Re: [Qemu-devel] How to make changes to qapi-types.h

2016-02-29 Thread Fam Zheng
On Mon, 02/29 21:38, Programmingkid wrote: > > On Feb 29, 2016, at 8:59 PM, Fam Zheng wrote: > > > On Mon, 02/29 20:26, Programmingkid wrote: > >> I need to add a variable to the QKeyCode enum in the file qapi-types.h. > >> This > >> file is auto-generated so using traditional means to create a

Re: [Qemu-devel] [PATCH 3/6] memory: Implement memory_region_get_ram_addr with mr->ram_block

2016-02-29 Thread Fam Zheng
On Tue, 03/01 02:32, Gonglei (Arei) wrote: > > > Subject: [Qemu-devel] [PATCH 3/6] memory: Implement > > memory_region_get_ram_addr with mr->ram_block > > > > Signed-off-by: Fam Zheng > > --- > > include/exec/memory.h | 8 +--- > > memory.c | 5 + > > 2 files changed, 6 ins

Re: [Qemu-devel] [PATCH 5/6] exec: Pass RAMBlock pointer to qemu_ram_free

2016-02-29 Thread Gonglei (Arei)
> Subject: [Qemu-devel] [PATCH 5/6] exec: Pass RAMBlock pointer to > qemu_ram_free > > The only caller now knows exactly which RAMBlock to free, so it's not > necessary to do the lookup. > > Signed-off-by: Fam Zheng > --- > exec.c | 21 +++-- > include/exec/ram

Re: [Qemu-devel] [PATCH v2 2/2] filter-buffer: Add status_changed callback processing

2016-02-29 Thread Jason Wang
On 02/29/2016 03:36 PM, Hailiang Zhang wrote: > On 2016/2/29 15:27, Jason Wang wrote: >> >> >> On 02/29/2016 09:46 AM, zhanghailiang wrote: >>> While the status of filter-buffer changing from 'on' to 'off', >>> it need to release all the buffered packets, and delete the related >>> timer, while s

Re: [Qemu-devel] [PATCH 4/6] memory: Drop MemoryRegion.ram_addr

2016-02-29 Thread Gonglei (Arei)
> Subject: [Qemu-devel] [PATCH 4/6] memory: Drop MemoryRegion.ram_addr > > All references to mr->ram_addr are replaced by > memory_region_get_ram_addr(mr) (except for a few assertions that are > replaced with mr->ram_block). > > Signed-off-by: Fam Zheng > --- > cputlb.c | 4 +-- >

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-02-29 Thread Li Zhijian
On 03/01/2016 04:04 AM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM co

Re: [Qemu-devel] How to make changes to qapi-types.h

2016-02-29 Thread Programmingkid
On Feb 29, 2016, at 8:59 PM, Fam Zheng wrote: > On Mon, 02/29 20:26, Programmingkid wrote: >> I need to add a variable to the QKeyCode enum in the file qapi-types.h. This >> file is auto-generated so using traditional means to create a patch is not >> possible. Would anyone know how I can add to

Re: [Qemu-devel] [PATCH v2 1/2] filter: Add 'status' property for filter object

2016-02-29 Thread Jason Wang
On 02/29/2016 03:34 PM, Hailiang Zhang wrote: > On 2016/2/29 15:26, Jason Wang wrote: >> >> >> On 02/29/2016 09:46 AM, zhanghailiang wrote: >>> With this property, users can control if this filter is 'on' >>> or 'off'. The default behavior for filter is 'on'. >>> >>> For some types of filters, th

Re: [Qemu-devel] [PATCH 3/6] memory: Implement memory_region_get_ram_addr with mr->ram_block

2016-02-29 Thread Gonglei (Arei)
> Subject: [Qemu-devel] [PATCH 3/6] memory: Implement > memory_region_get_ram_addr with mr->ram_block > > Signed-off-by: Fam Zheng > --- > include/exec/memory.h | 8 +--- > memory.c | 5 + > 2 files changed, 6 insertions(+), 7 deletions(-) > > diff --git a/include/exec/mem

Re: [Qemu-devel] [PATCH 2/6] memory: Move assignment to ram_block to memory_region_init_*

2016-02-29 Thread Gonglei (Arei)
> Subject: [Qemu-devel] [PATCH 2/6] memory: Move assignment to ram_block to > memory_region_init_* > > We don't force "const" qualifiers with pointers in QEMU, but it's still > good to keep a clean function interface. Assigning to mr->ram_block is > in this sense ugly - one initializer mutating i

Re: [Qemu-devel] [PATCH 1/6] exec: Return RAMBlock pointer from allocating functions

2016-02-29 Thread Gonglei (Arei)
> > Subject: [Qemu-devel] [PATCH 1/6] exec: Return RAMBlock pointer from > allocating functions > > Previously we return RAMBlock.offset; now return the pointer to the > whole structure. > > ram_block_add returns void now, error is completely passed with errp. > > Signed-off-by: Fam Zheng > ---

Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-29 Thread Peter Xu
On Mon, Feb 29, 2016 at 05:30:36PM +0100, Andrea Bolognani wrote: > On Mon, 2016-02-22 at 09:35 +0800, Peter Xu wrote: > > On Fri, Feb 19, 2016 at 01:33:09PM +0100, Andrea Bolognani wrote: > > >  > > > I didn't say it would be hard :) > > >  > > > I just said that such compatibility code would have

Re: [Qemu-devel] How to make changes to qapi-types.h

2016-02-29 Thread Fam Zheng
On Mon, 02/29 20:26, Programmingkid wrote: > I need to add a variable to the QKeyCode enum in the file qapi-types.h. This > file is auto-generated so using traditional means to create a patch is not > possible. Would anyone know how I can add to this file? The file to look at is qapi-schema.json.

Re: [Qemu-devel] make distclean can fail do to a configuration check

2016-02-29 Thread Fam Zheng
On Mon, 02/29 11:49, John Snow wrote: > > > On 02/14/2016 02:17 AM, Fam Zheng wrote: > Fam, didn't you have patches to allow e.g. cleans and "make tags" and so > on without re-incurring a full reconfiguration? Do you mean this? fam@fam-t430:~/work/qemu [master]$ git grep UNCHECKED_GOALS

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-29 Thread David Gibson
On Mon, Feb 29, 2016 at 04:42:58PM +0100, Igor Mammedov wrote: > On Thu, 25 Feb 2016 14:52:06 -0300 > Eduardo Habkost wrote: > > > On Wed, Feb 24, 2016 at 03:42:18PM +0100, Igor Mammedov wrote: > > > On Tue, 23 Feb 2016 18:26:20 -0300 > > > Eduardo Habkost wrote: > > > > > > > On Tue, Feb 23,

Re: [Qemu-devel] [RFC PATCH v0 2/6] spapr: CPU core device

2016-02-29 Thread David Gibson
On Mon, Feb 29, 2016 at 04:15:25PM +0100, Igor Mammedov wrote: > On Mon, 29 Feb 2016 18:25:25 +0530 > Bharata B Rao wrote: > > On Mon, Feb 29, 2016 at 11:03:16AM +0100, Igor Mammedov wrote: > > > On Mon, 29 Feb 2016 11:20:19 +0530 > > > Bharata B Rao wrote: [snip] > > > > > "slot" seems intended

[Qemu-devel] How to make changes to qapi-types.h

2016-02-29 Thread Programmingkid
I need to add a variable to the QKeyCode enum in the file qapi-types.h. This file is auto-generated so using traditional means to create a patch is not possible. Would anyone know how I can add to this file?

Re: [Qemu-devel] [PATCH v2 03/15] docker: Add images

2016-02-29 Thread Fam Zheng
On Mon, 02/29 17:18, Alex Bennée wrote: > > Fam Zheng writes: > > > Signed-off-by: Fam Zheng > > I think we need to include the dtc libs in here unless we need to ship > all submodules in the tree as well. OK, will take a look. > > Is there a way to get a plain install shell? PAUSE=1 on the

Re: [Qemu-devel] [PATCH v2 01/15] tests: Add utilities for docker testing

2016-02-29 Thread Fam Zheng
On Mon, 02/29 16:46, Alex Bennée wrote: > > Fam Zheng writes: > > > docker_run: A wrapper for "docker run" (or "sudo -n docker run" if > > necessary), which takes care of killing and removing the running > > container at SIGINT. > > > > docker_clean: A tool to tear down all the containers includ

Re: [Qemu-devel] [PATCH v2 02/15] Makefile: Rules for docker testing

2016-02-29 Thread Fam Zheng
On Mon, 02/29 17:08, Alex Bennée wrote: > > Fam Zheng writes: > > > This adds a group of make targets to run docker tests, all are available > > in source tree without running ./configure. > > > > The usage is shown by "make docker". > > > > Besides the fixed ones, dynamic targets for building e

Re: [Qemu-devel] [PATCH v2 00/16] qapi: Allow blockdev-add for NBD

2016-02-29 Thread Max Reitz
On 01.03.2016 00:24, Eric Blake wrote: > On 02/29/2016 04:19 PM, Max Reitz wrote: >> Turns out NBD is not so simple to do if you do it right. Anyway, this >> series adds blockdev-add support for NBD clients. >> >> Patches 1 and 2 add one less and one more complicated QDict function, >> respectively

[Qemu-devel] [PATCH v2 10/16] block/nbd: Accept SocketAddress

2016-02-29 Thread Max Reitz
Add a new option "address" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: Max Reitz --- block/nbd.c | 93 +

[Qemu-devel] [PATCH v2 11/16] block/nbd: Use SocketAddress options

2016-02-29 Thread Max Reitz
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: Max Reitz --- block/nbd.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH v2 00/16] qapi: Allow blockdev-add for NBD

2016-02-29 Thread Eric Blake
On 02/29/2016 04:19 PM, Max Reitz wrote: > Turns out NBD is not so simple to do if you do it right. Anyway, this > series adds blockdev-add support for NBD clients. > > Patches 1 and 2 add one less and one more complicated QDict function, > respectively, which I needed in later NBD patches: Patch

[Qemu-devel] [PATCH v2 09/16] block/nbd: "address" in nbd_refresh_filename()

2016-02-29 Thread Max Reitz
As of a future patch, the NBD block driver will accept a SocketAddress structure for a new "address" option. In order to support this, nbd_refresh_filename() needs some changes. The two TODOs introduced by this patch will be removed in the very next one. They exist to explain that it is currently

[Qemu-devel] [PATCH v2 15/16] socket_scm_helper: Accept fd directly

2016-02-29 Thread Max Reitz
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Signed-off-by: Max Reitz --- tests/qemu-iotests/socket_scm_helper.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/socket_scm_

[Qemu-devel] [PATCH v2 07/16] block/nbd: Use qdict_put()

2016-02-29 Thread Max Reitz
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Signed-off-by: Max Reitz --- block/nbd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 8d9a217..145db39 100644 --- a/block/nbd.c ++

[Qemu-devel] [PATCH v2 12/16] qapi: Allow blockdev-add for NBD

2016-02-29 Thread Max Reitz
Signed-off-by: Max Reitz --- qapi/block-core.json | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 9bf1b22..21760e0 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1633,13 +1633,14 @@ #

[Qemu-devel] [PATCH v2 14/16] iotests.py: Allow concurrent qemu instances

2016-02-29 Thread Max Reitz
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b

[Qemu-devel] [PATCH v2 06/16] block/nbd: Default port in nbd_refresh_filename()

2016-02-29 Thread Max Reitz
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Signed-off-by: Max Reitz --- block/nbd.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/block/nbd.c

[Qemu-devel] [PATCH v2 16/16] iotests: Add test for NBD's blockdev-add interface

2016-02-29 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 194 + tests/qemu-iotests/147.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 200 insertions(+) create mode 100755 tests/qemu-iotests/147 create mode 100644 tests/qemu-iotest

[Qemu-devel] [PATCH v2 04/16] block/nbd: Drop trailing "." in error messages

2016-02-29 Thread Max Reitz
Signed-off-by: Max Reitz --- block/nbd.c | 4 ++-- tests/qemu-iotests/051.out| 4 ++-- tests/qemu-iotests/051.pc.out | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index db57b49..ce31119 100644 --- a/block/nbd.c +++ b/block

[Qemu-devel] [PATCH v2 03/16] check-qdict: Add a test for qdict_unflatten()

2016-02-29 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/check-qdict.c | 267 1 file changed, 267 insertions(+) diff --git a/tests/check-qdict.c b/tests/check-qdict.c index a43056c..f6a5cda 100644 --- a/tests/check-qdict.c +++ b/tests/check-qdict.c @@ -325,6 +325,2

[Qemu-devel] [PATCH v2 13/16] iotests.py: Add qemu_nbd function

2016-02-29 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 0a238ec..dd8805a 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotes

[Qemu-devel] [PATCH v2 08/16] block/nbd: Add nbd_has_filename_options_conflict()

2016-02-29 Thread Max Reitz
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring as to test each option whether its key has an "address." prefix. Therefore, we

[Qemu-devel] [PATCH v2 05/16] block/nbd: Reject port parameter without host

2016-02-29 Thread Max Reitz
This is better than the generic block layer finding out later that the port parameter has not been used. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/nbd.c | 4 1 file changed, 4 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index ce31119..6a2fc27 100644 --- a/block/n

[Qemu-devel] [PATCH v2 02/16] qdict: Add qdict_unflatten()

2016-02-29 Thread Max Reitz
The QMP input visitor is rather unhappy with flattened QDicts, which is how they are generally used in the block layer. This function allows unflattening a QDict so we can use an input visitor on it. Signed-off-by: Max Reitz --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 189 ++

[Qemu-devel] [PATCH v2 01/16] qdict: Add qdict_change_key()

2016-02-29 Thread Max Reitz
This is a shorthand function for changing a QDict's entry's key. Signed-off-by: Max Reitz --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 71b8eb0.

[Qemu-devel] [PATCH v2 00/16] qapi: Allow blockdev-add for NBD

2016-02-29 Thread Max Reitz
Turns out NBD is not so simple to do if you do it right. Anyway, this series adds blockdev-add support for NBD clients. Patches 1 and 2 add one less and one more complicated QDict function, respectively, which I needed in later NBD patches: Patch 1 for handling legacy options (move "host" to "addr

Re: [Qemu-devel] [RFC PATCH v2 1/3] vGPU Core driver

2016-02-29 Thread Neo Jia
On Mon, Feb 29, 2016 at 05:39:02AM +, Tian, Kevin wrote: > > From: Kirti Wankhede > > Sent: Wednesday, February 24, 2016 12:24 AM > > > > Signed-off-by: Kirti Wankhede > > Signed-off-by: Neo Jia > > Hi, Kirti/Neo, > > Thanks a lot for you updated version. Having not looked into detail > co

[Qemu-devel] [PATCH RFC] bcm2835_dma: add emulation of Raspberry Pi DMA controller

2016-02-29 Thread Andrew Baumann
Signed-off-by: Andrew Baumann --- This patch applies on top of the previous series for Windows and framebuffer support: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg06387.html After preparing that, I was disappointed to discover that Raspbian won't boot cleanly without the DMA contr

Re: [Qemu-devel] [PATCH v3 2/2] docs: Add a generic loader explanation document

2016-02-29 Thread Alistair Francis
On Fri, Feb 26, 2016 at 7:59 AM, Peter Maydell wrote: > On 19 February 2016 at 20:40, Alistair Francis > wrote: >> Signed-off-by: Alistair Francis >> --- >> >> docs/generic-loader.txt | 21 + >> 1 file changed, 21 insertions(+) >> create mode 100644 docs/generic-loader.txt

Re: [Qemu-devel] [Qemu-block] [PATCH v3 11/15] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-02-29 Thread John Snow
On 02/27/2016 04:20 AM, Fam Zheng wrote: > We use a loop over bs->dirty_bitmaps to make sure the caller is > only releasing a bitmap owned by bs. Let's also assert that in this case > the caller is releasing a bitmap that does exist. > > Signed-off-by: Fam Zheng > --- > block/dirty-bitmap.c |

Re: [Qemu-devel] [Qemu-block] [PATCH v3 09/15] block: Support meta dirty bitmap

2016-02-29 Thread John Snow
On 02/27/2016 04:20 AM, Fam Zheng wrote: > The added group of operations enables tracking of the changed bits in > the dirty bitmap. > > Signed-off-by: Fam Zheng > --- > block/dirty-bitmap.c | 51 > > include/block/dirty-bitmap.h | 9 +

Re: [Qemu-devel] [Qemu-block] [PATCH v3 08/15] tests: Add test code for meta bitmap

2016-02-29 Thread John Snow
On 02/27/2016 04:20 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > Reviewed-by: John Snow > --- > tests/test-hbitmap.c | 116 > +++ > 1 file changed, 116 insertions(+) > > diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c > index abe1

Re: [Qemu-devel] [PATCH v2 7/9] i.MX: Add i.MX6 SOC implementation.

2016-02-29 Thread Jean-Christophe DUBOIS
Le 29/02/2016 22:14, Peter Maydell a écrit : On 29 February 2016 at 20:34, Jean-Christophe DUBOIS wrote: Le 29/02/2016 18:58, Peter Maydell a écrit : To answer the question of "which of these is the correct thing to do" we need to look at what the real hardware does when it's running Linux: do

Re: [Qemu-devel] [PATCH] target-arm: Implement MRS (banked) and MSR (banked) instructions

2016-02-29 Thread Edgar E. Iglesias
On Mon, Feb 29, 2016 at 04:18:54PM +, Peter Maydell wrote: > Starting with the ARMv7 Virtualization Extensions, the A32 and T32 > instruction sets provide instructions "MSR (banked)" and "MRS > (banked)" which can be used to access registers for a mode other > than the current one: > * R_ > *

Re: [Qemu-devel] [PATCH v2 7/9] i.MX: Add i.MX6 SOC implementation.

2016-02-29 Thread Peter Maydell
On 29 February 2016 at 20:34, Jean-Christophe DUBOIS wrote: > Le 29/02/2016 18:58, Peter Maydell a écrit : >> To answer the question of "which of these is the correct thing to do" >> we need to look at what the real hardware does when it's running Linux: >> does it run Linux in Secure or Nonsecure

Re: [Qemu-devel] [PATCH v2 7/9] i.MX: Add i.MX6 SOC implementation.

2016-02-29 Thread Jean-Christophe DUBOIS
Le 29/02/2016 18:58, Peter Maydell a écrit : On 19 February 2016 at 06:32, Jean-Christophe DUBOIS wrote: If I set has_el3 to false, I can boot the 4 cores without problem. With has_el3 set to true (default value) I am getting the above behavior (boot OK in uniprocessor mode, and misbehaving if

Re: [Qemu-devel] [Qemu-ppc] Migrating decrementer

2016-02-29 Thread Mark Cave-Ayland
On 29/02/16 03:57, David Gibson wrote: > On Fri, Feb 26, 2016 at 12:29:51PM +, Mark Cave-Ayland wrote: >> On 26/02/16 04:35, David Gibson wrote: >> Sign. And let me try that again, this time after caffeine: cpu_start/resume(): cpu->tb_env->tb_offset = muldi

Re: [Qemu-devel] [PATCH v2 5/9] i.MX: Add i.MX6 CCM and ANALOG device.

2016-02-29 Thread Jean-Christophe DUBOIS
Le 29/02/2016 18:33, Peter Maydell a écrit : On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: Signed-off-by: Jean-Christophe Dubois --- +static uint64_t imx6_ccm_read(void *opaque, hwaddr offset, unsigned size) +{ +uint32 value = 0; This should be 'uint32_t', not 'uint32'. (Yo

[Qemu-devel] [PULL 08/12] mirror: Rewrite mirror_iteration

2016-02-29 Thread Jeff Cody
From: Fam Zheng The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. The output of iotests 109 is updated beca

[Qemu-devel] [PULL 07/12] vhdx: Simplify vhdx_set_shift_bits()

2016-02-29 Thread Jeff Cody
From: Max Reitz For values which are powers of two (and we do assume all of these to be), sizeof(x) * 8 - 1 - clz(x) == ctz(x). Therefore, use ctz(). Signed-off-by: Max Reitz Message-id: 1450451066-13335-3-git-send-email-mre...@redhat.com Signed-off-by: Jeff Cody --- block/vhdx.c | 8

[Qemu-devel] [PULL 12/12] iotests/124: Add cluster_size mismatch test

2016-02-29 Thread Jeff Cody
From: John Snow If a backing file isn't specified in the target image and the cluster_size is larger than the bitmap granularity, we run the risk of creating bitmaps with allocated clusters but empty/no data which will prevent the proper reading of the backup in the future. Signed-off-by: John S

  1   2   3   >