Re: [Qemu-devel] [PATCH v2 4/9] xen/9pfs: introduce Xen 9pfs backend

2017-03-14 Thread Juergen Gross
On 14/03/17 00:55, Stefano Stabellini wrote: > Introduce the Xen 9pfs backend: add struct XenDevOps to register as a > Xen backend and add struct V9fsTransport to register as v9fs transport. > > All functions are empty stubs for now. > > Signed-off-by: Stefano Stabellini > Reviewed-by: Greg Kurz

Re: [Qemu-devel] [PATCH v2 5/9] xen/9pfs: connect to the frontend

2017-03-14 Thread Juergen Gross
On 14/03/17 00:55, Stefano Stabellini wrote: > Write the limits of the backend to xenstore. Connect to the frontend. > Upon connection, allocate the rings according to the protocol > specification. > > Initialize a QEMUBH to schedule work upon receiving an event channel > notification from the fro

Re: [Qemu-devel] [PATCH v2 21/30] trace: Fix parameter types in hw/net

2017-03-14 Thread Dmitry Fleytman
Reviewed-by: Dmitry Fleytman > On 13 Mar 2017, at 21:55 PM, Eric Blake wrote: > > An upcoming patch will let the compiler warn us when we are silently > losing precision in traces; update the trace definitions to pass > through the full value at the callsite. In one case, the trace > file wan

Re: [Qemu-devel] [PATCH for-2.9 02/47] qapi: Make doc comments optional where we don't need them

2017-03-14 Thread Markus Armbruster
Eric Blake writes: > On 03/13/2017 01:18 AM, Markus Armbruster wrote: >> Since we added the documentation generator in commit 3313b61, doc >> comments are mandatory. That's a very good idea for a schema that >> needs to be documented, but has proven to be annoying for testing. > > As I've found

[Qemu-devel] [PATCH] virtio-pci: reset modern vq meta data

2017-03-14 Thread Jason Wang
We don't reset proxy->vqs[].{num|desc[]|avail[]|used[]}. This means if a driver enable the vq without setting vq address after reset. The old addresses were leaked. Fixing this by resetting modern vq meta data during device reset. Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- hw/virti

Re: [Qemu-devel] [PATCH for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py

2017-03-14 Thread Markus Armbruster
Eric Blake writes: > On 03/13/2017 01:18 AM, Markus Armbruster wrote: >> This reverts commit 3313b61's changes to tests/qapi-schema/, except >> for tests/qapi-schema/doc-*. >> >> Signed-off-by: Markus Armbruster >> --- > > Tested by doing: > > $ git checkout 3313b61 > $ git cherry-pick 07c7b92

Re: [Qemu-devel] [PATCH 0/3] COLO-compare: Make COLO-compare support Xen

2017-03-14 Thread Jason Wang
On 2017年03月13日 15:21, Zhang Chen wrote: On 03/13/2017 03:10 PM, Zhang Chen wrote: On 03/13/2017 02:28 PM, Jason Wang wrote: On 2017年03月13日 14:18, Zhang Chen wrote: Hi~~~ All~ No news for a long time, anyone can give me some comments? Hi, A question is why use two kinds of colo-fram

Re: [Qemu-devel] [PATCH for-2.9 05/47] qapi: Have each QAPI schema declare its returns white-list

2017-03-14 Thread Markus Armbruster
Eric Blake writes: > On 03/13/2017 01:18 AM, Markus Armbruster wrote: >> qapi.py has a hardcoded white-list of command names that may violate >> the rules on permitted return types. Add a new pragma directive >> 'returns-whitelist', and use it to replace the hard-coded white-list. > > So now the

Re: [Qemu-devel] [PATCH for-2.9 06/47] qapi: Have each QAPI schema declare its name rule violations

2017-03-14 Thread Markus Armbruster
Eric Blake writes: > On 03/13/2017 01:18 AM, Markus Armbruster wrote: >> qapi.py has a hardcoded white-list of type names that may violate the >> rule on use of upper and lower case. Add a new pragma directive >> 'name-case-whitelist', and use it to replace the hard-coded >> white-list. >> >> S

[Qemu-devel] [PATCH] hw/net/virtio-net.c: Follow CODING_STYLE

2017-03-14 Thread Zhang Chen
Signed-off-by: Zhang Chen --- hw/net/virtio-net.c | 53 + 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index c321680..ede618e 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c

[Qemu-devel] [PATCH] migration/block: Avoid involve into blk_drain too frequently

2017-03-14 Thread jemmy858585
From: Lidong Chen Increase bmds->cur_dirty after submit io, so reduce the frequency involve into blk_drain, and improve the performance obviously when block migration. Signed-off-by: Lidong Chen --- migration/block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/block.c b/mi

[Qemu-devel] [PULL 2/3] COLO-compare: Fix trace_event print bug

2017-03-14 Thread Jason Wang
From: Zhang Chen Because of inet_ntoa() return a statically allocated buffer, subsequent calls will overwrite, So we fix this bug. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-

[Qemu-devel] [PULL 0/3] Net patches

2017-03-14 Thread Jason Wang
The following changes since commit 5bac3c39c82e149515c10643acafd1d292433775: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-03-13 15:08:01 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to

[Qemu-devel] [PULL 1/3] e1000e: correctly tear down MSI-X memory regions

2017-03-14 Thread Jason Wang
From: Paolo Bonzini MSI-X has been disabled by the time the e1000e device is unrealized, hence msix_uninit is never called. This causes the object to be leaked, which shows up as a RAMBlock with empty name when attempting migration. Reported-by: Dr. David Alan Gilbert Cc: Jason Wang Cc: qemu-

[Qemu-devel] [PULL 3/3] hw/net: implement MIB counters in mcf_fec driver

2017-03-14 Thread Jason Wang
From: Greg Ungerer The FEC ethernet hardware module used on ColdFire SoC parts contains a block of RAM used to maintain hardware counters. This block is accessible via the usual FEC register address space. There is currently no support for this in the QEMU mcf_fec driver. Add support for storing

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Stefan Hajnoczi
On Mon, Mar 13, 2017 at 03:12:07PM +0100, Juan Quintela wrote: > Peter Maydell wrote: > > On 12 March 2017 at 21:45, Juan Quintela wrote: > >> > >> > >> Hi > >> > >> Please, send any topic that you are interested in covering. > >> > >> So far the agenda is: > >> > >> - Direction of QEMU and tools

Re: [Qemu-devel] [PATCH for-2.10 1/8] ppc/xics: add a xics_get_cpu_index_by_pir() helper

2017-03-14 Thread Cédric Le Goater
On 03/14/2017 06:38 AM, David Gibson wrote: > On Wed, Mar 08, 2017 at 11:52:44AM +0100, Cédric Le Goater wrote: >> This helper will be used to translate the server number of the XIVE >> (which is a PIR) into an ICPState index number (which is a cpu index). >> >> Signed-off-by: Cédric Le Goater >

Re: [Qemu-devel] [PATCH for-2.10 2/8] ppc/xics: add an ics_eoi() handler to XICSFabric

2017-03-14 Thread Cédric Le Goater
On 03/14/2017 06:40 AM, David Gibson wrote: > On Wed, Mar 08, 2017 at 11:52:45AM +0100, Cédric Le Goater wrote: >> This handler will be required by PowerPC machines using multiple ICS >> objects, like this is the case for PowerNV. Also update the sPAPR >> machine to use the new handler. >> >> Signe

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Stefan Hajnoczi
On Mon, Mar 13, 2017 at 11:02:01AM +0100, Peter Maydell wrote: > On 12 March 2017 at 21:45, Juan Quintela wrote: > > > > > > Hi > > > > Please, send any topic that you are interested in covering. > > > > So far the agenda is: > > > > - Direction of QEMU and toolstack in light of Google Cloud blog:

Re: [Qemu-devel] [PATCH 0/3] COLO-compare: Make COLO-compare support Xen

2017-03-14 Thread Zhang Chen
On 03/14/2017 03:37 PM, Jason Wang wrote: On 2017年03月13日 15:21, Zhang Chen wrote: On 03/13/2017 03:10 PM, Zhang Chen wrote: On 03/13/2017 02:28 PM, Jason Wang wrote: On 2017年03月13日 14:18, Zhang Chen wrote: Hi~~~ All~ No news for a long time, anyone can give me some comments? Hi,

[Qemu-devel] [PATCH] vnc: fix reverse mode

2017-03-14 Thread Gerd Hoffmann
vnc server in reverse mode (qemu -vnc localhost:$nr,reverse) interprets $nr as display number (i.e. with 5900 offset) in recent qemu versions. Historical and documented behavior is interpreting $nr as port number though. So we should bring code and documentation in line. Given that default listeni

Re: [Qemu-devel] [PATCH for-2.9 01/47] qapi: Factor QAPISchemaParser._include() out of .__init__()

2017-03-14 Thread Marc-André Lureau
On Mon, Mar 13, 2017 at 10:20 AM Markus Armbruster wrote: Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau --- scripts/qapi.py | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi

Re: [Qemu-devel] [PATCH for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py

2017-03-14 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2017 at 10:36 AM Markus Armbruster wrote: > This reverts commit 3313b61's changes to tests/qapi-schema/, except > for tests/qapi-schema/doc-*. > > Do we expect those files to change? If not, or not much, I think i't s rather better to keep the docs to exercise the parser in va

Re: [Qemu-devel] [PATCH for-2.9 04/47] docs/qapi-code-gen.txt: Drop confusing reference to 'gen'

2017-03-14 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2017 at 10:20 AM Markus Armbruster wrote: > Section "Commands" qualifies its rules on permitted argument and > return types "with one exception noted below when 'gen' is used". The > note went away in commit 2d21291. Clean up the dangling references. > > Signed-off-by: Marku

Re: [Qemu-devel] [PATCH V3 0/3] Several fixes for virito region caches

2017-03-14 Thread Zhang Chen
On 03/14/2017 11:01 AM, Jason Wang wrote: Hi: This series contains several fixes for virito region caches, please review. Title and comments typo: S/virito/virtio Thanks Zhang Chen Thanks. Jason Wang (3): virtio: guard against NULL pfn virtio: destroy region cache during reset

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Peter Maydell
On 14 March 2017 at 09:13, Stefan Hajnoczi wrote: > On Mon, Mar 13, 2017 at 11:02:01AM +0100, Peter Maydell wrote: > The minimum requirements for the new language: > 1. Does it support the host operating systems that QEMU runs on? > 2. Does it support the host architectures that QEMU runs on? Spe

Re: [Qemu-devel] [PATCH for-2.9 10/47] qapi2texi: Fix up output around #optional

2017-03-14 Thread Marc-André Lureau
On Mon, Mar 13, 2017 at 10:23 AM Markus Armbruster wrote: > We use tag #optional to mark optional members, like this: > > # @name: #optional The name of the guest > > texi_body() strips #optional, but not whitespace around it. For the > above, we get in qemu-qmp-qapi.texi > > @item @code

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-14 Thread Juan Quintela
Chao Fan wrote: > In function cpu_physical_memory_sync_dirty_bitmap, file > include/exec/ram_addr.h: > > if (src[idx][offset]) { > unsigned long bits = atomic_xchg(&src[idx][offset], 0); > unsigned long new_dirty; > new_dirty = ~dest[k]; > dest[k] |= bits; > new_dirty &= bits;

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-14 Thread Juan Quintela
Chao Fan wrote: > In function cpu_physical_memory_sync_dirty_bitmap, file > include/exec/ram_addr.h: > > if (src[idx][offset]) { > unsigned long bits = atomic_xchg(&src[idx][offset], 0); > unsigned long new_dirty; > new_dirty = ~dest[k]; > dest[k] |= bits; > new_dirty &= bits;

Re: [Qemu-devel] [PATCH for-2.9 09/47] qapi: Fix to reject empty union base gracefully

2017-03-14 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2017 at 10:19 AM Markus Armbruster wrote: > Common Python pitfall: 'assert base_members' fires on [] in addition > to None. Correct to 'assert base_members is not None'. > > Signed-off-by: Markus Armbruster > Reviewed-by: Marc-André Lureau > --- > scripts/qapi.py

Re: [Qemu-devel] [PATCH for-2.9 08/47] tests/qapi-schema: Cover empty union base

2017-03-14 Thread Marc-André Lureau
On Mon, Mar 13, 2017 at 10:19 AM Markus Armbruster wrote: > The new test case shows off qapi.py choking on an empty union base. > > Signed-off-by: Markus Armbruster > Reviewed-by: Marc-André Lureau > --- > tests/Makefile.include | 1 + > tests/qapi-schema/union-base-empty.

Re: [Qemu-devel] [PATCH for-2.9 11/47] qapi: Avoid unwanted blank lines in QAPIDoc

2017-03-14 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2017 at 10:25 AM Markus Armbruster wrote: > We silently fix missing #optional tags for QAPIDoc by appending a line > "#optional" to the section's .content. However, this interferes with > .__repr__ stripping trailing blank lines from .content. > > Use new ArgSection instance

Re: [Qemu-devel] [PATCH for-2.9 12/47] qapi/rocker: Fix up doc comment notes on optional members

2017-03-14 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2017 at 10:31 AM Markus Armbruster wrote: > Talking about #optional like this > > # Note: fields are marked #optional to indicate that they may or may > # not appear ... > > doesn't work so well in generated documentation, because the #optional > tag is not visible the

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Juan Quintela
Stefan Hajnoczi wrote: >> - on the "VM support" side, QEMU is more used because it's the only >> production-quality option in this space, rather than because its >> users love it. (cf the Google choice to replace it.) It's also got >> a pretty poor security record. It wouldn't be to

Re: [Qemu-devel] [PATCH] MAINTAINERS: update for MIPS devices

2017-03-14 Thread Thomas Huth
On 13.03.2017 15:54, Yongbok Kim wrote: > Add myself to MIPSSIM and new entry for Fulong 2E. > Add an entry for Boston machine (Paul Burton). > > Signed-off-by: Yongbok Kim > cc: Paul Burton > --- > MAINTAINERS | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff -

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Juan Quintela
Peter Maydell wrote: > On 14 March 2017 at 09:13, Stefan Hajnoczi wrote: >> On Mon, Mar 13, 2017 at 11:02:01AM +0100, Peter Maydell wrote: >> The minimum requirements for the new language: >> 1. Does it support the host operating systems that QEMU runs on? >> 2. Does it support the host architect

[Qemu-devel] [PATCH] file-posix: clean up max_segments buffer termination

2017-03-14 Thread Stefan Hajnoczi
The following pattern is unsafe: char buf[32]; ret = read(fd, buf, sizeof(buf)); ... buf[ret] = 0; If read(2) returns 32 then a byte beyond the end of the buffer is zeroed. In practice this buffer overflow does not occur because the sysfs max_segments file only contains an unsigned short

Re: [Qemu-devel] [PATCH v2 07/30] trace: Fix parameter types in ui

2017-03-14 Thread Gerd Hoffmann
On Mo, 2017-03-13 at 14:55 -0500, Eric Blake wrote: > An upcoming patch will let the compiler warn us when we are silently > losing precision in traces; update the trace definitions to pass > through the full value at the callsite. > > Signed-off-by: Eric Blake Reviewed-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH v2 27/30] trace: Fix parameter types in hw/usb

2017-03-14 Thread Gerd Hoffmann
On Mo, 2017-03-13 at 14:55 -0500, Eric Blake wrote: > An upcoming patch will let the compiler warn us when we are silently > losing precision in traces; update the trace definitions to pass > through the full value at the callsite, as well as updating a couple > of callers to use consistent typing

Re: [Qemu-devel] [PATCH v2 11/30] trace: Fix parameter types in hw/audio

2017-03-14 Thread Gerd Hoffmann
On Mo, 2017-03-13 at 14:55 -0500, Eric Blake wrote: > An upcoming patch will let the compiler warn us when we are silently > losing precision in traces; update the trace definitions to pass > through the full value at the callsite. > > Signed-off-by: Eric Blake Reviewed-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH V3 1/3] virtio: guard against NULL pfn

2017-03-14 Thread Cornelia Huck
On Tue, 14 Mar 2017 11:01:40 +0800 Jason Wang wrote: > To avoid access stale memory region cache after reset, this patch > check the existence of virtqueue pfn for all exported virtqueue access > helpers before trying to use them. > > Cc: Cornelia Huck > Cc: Paolo Bonzini > Signed-off-by: Jaso

Re: [Qemu-devel] [PATCH 1/6] target/s390x: Implement STORE FACILITIES LIST EXTENDED

2017-03-14 Thread David Hildenbrand
Am 02.03.2017 um 03:41 schrieb Richard Henderson: > At the same time, improve STORE FACILITIES LIST > so that we don't hard-code the list for all cpus. > > Signed-off-by: Richard Henderson > --- > target/s390x/helper.h | 2 ++ > target/s390x/insn-data.def | 2 ++ > target/s390x/misc_helpe

Re: [Qemu-devel] [PATCH 13/16] migration: Create thread infrastructure for multifd recv side

2017-03-14 Thread Paolo Bonzini
On 13/03/2017 13:44, Juan Quintela wrote: > case RAM_SAVE_FLAG_MULTIFD_PAGE: > fd_num = qemu_get_be16(f); > -if (fd_num != 0) { > -/* this is yet an unused variable, changed later */ > -fd_num = fd_num; > -} > +

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Thomas Huth
On 13.03.2017 11:02, Peter Maydell wrote: > On 12 March 2017 at 21:45, Juan Quintela wrote: >> >> Hi >> >> Please, send any topic that you are interested in covering. >> >> So far the agenda is: >> >> - Direction of QEMU and toolstack in light of Google Cloud blog: >> >> https://cloudplatform.g

Re: [Qemu-devel] [PATCH] file-posix: clean up max_segments buffer termination

2017-03-14 Thread Kevin Wolf
Am 14.03.2017 um 10:09 hat Stefan Hajnoczi geschrieben: > The following pattern is unsafe: > > char buf[32]; > ret = read(fd, buf, sizeof(buf)); > ... > buf[ret] = 0; > > If read(2) returns 32 then a byte beyond the end of the buffer is > zeroed. > > In practice this buffer overflow does

Re: [Qemu-devel] [PATCH V3 2/3] virtio: destroy region cache during reset

2017-03-14 Thread Cornelia Huck
On Tue, 14 Mar 2017 11:01:41 +0800 Jason Wang wrote: > We don't destroy region cache during reset which can make the maps > of previous driver leaked to a buggy or malicious driver that don't > set vring address before starting to use the device. Fix this by > destroy the region cache during rese

Re: [Qemu-devel] [PULL 00/12] Block layer fixes for 2.9.0-rc1

2017-03-14 Thread Kevin Wolf
Am 13.03.2017 um 19:05 hat Peter Maydell geschrieben: > On 13 March 2017 at 15:54, Kevin Wolf wrote: > > The following changes since commit dd4d2578215cd380f40a38028a9904e15b135ef3: > > > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-fixes-20170309-1' > > into staging (2017-03-09 13:

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Markus Armbruster
Peter Maydell writes: > On 14 March 2017 at 09:13, Stefan Hajnoczi wrote: >> On Mon, Mar 13, 2017 at 11:02:01AM +0100, Peter Maydell wrote: >> The minimum requirements for the new language: >> 1. Does it support the host operating systems that QEMU runs on? >> 2. Does it support the host archite

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-14 Thread Chao Fan
On Tue, Mar 14, 2017 at 09:38:46AM +0100, Juan Quintela wrote: >Chao Fan wrote: >> In function cpu_physical_memory_sync_dirty_bitmap, file >> include/exec/ram_addr.h: >> >> if (src[idx][offset]) { >> unsigned long bits = atomic_xchg(&src[idx][offset], 0); >> unsigned long new_dirty; >>

Re: [Qemu-devel] [PATCH] file-posix: clean up max_segments buffer termination

2017-03-14 Thread Fam Zheng
On Tue, 03/14 17:09, Stefan Hajnoczi wrote: > The following pattern is unsafe: > > char buf[32]; > ret = read(fd, buf, sizeof(buf)); > ... > buf[ret] = 0; > > If read(2) returns 32 then a byte beyond the end of the buffer is > zeroed. > > In practice this buffer overflow does not occur b

Re: [Qemu-devel] [PATCH for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py

2017-03-14 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Mar 13, 2017 at 10:36 AM Markus Armbruster > wrote: > >> This reverts commit 3313b61's changes to tests/qapi-schema/, except >> for tests/qapi-schema/doc-*. >> >> > Do we expect those files to change? If not, or not much, I think i't s > rather better t

Re: [Qemu-devel] [PATCH for-2.10 3/8] ppc/pnv: create the ICP and ICS objects under the machine

2017-03-14 Thread Cédric Le Goater
On 03/14/2017 06:45 AM, David Gibson wrote: > On Wed, Mar 08, 2017 at 11:52:46AM +0100, Cédric Le Goater wrote: >> Like this is done for the sPAPR machine, we use a simple array under >> the PowerNV machine to store the Interrupt Control Presenters (ICP) >> objects, one for each vCPU. This array is

[Qemu-devel] Requesting Edit Access to the wiki

2017-03-14 Thread Andreas Grapentin
Hello, I wanted to update a link on the wiki on this page: http://wiki.qemu-project.org/Contribute/SubmitAPatch#Use_git_format-patch the page contains this outdated link: http://lxr.free-electrons.com/source/Documentation/email-clients.txt its target has been moved to: http://lxr.free-electrons

Re: [Qemu-devel] [PULL 00/12] Block layer fixes for 2.9.0-rc1

2017-03-14 Thread Peter Maydell
On 14 March 2017 at 10:29, Kevin Wolf wrote: > Am 13.03.2017 um 19:05 hat Peter Maydell geschrieben: >> On 13 March 2017 at 15:54, Kevin Wolf wrote: >> > The following changes since commit >> > dd4d2578215cd380f40a38028a9904e15b135ef3: >> > >> > Merge remote-tracking branch 'remotes/kraxel/tag

Re: [Qemu-devel] [PATCH v2 1/9] configure: change CONFIG_XEN_BACKEND to be a target property

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 00:55, Stefano Stabellini wrote: > CONFIG_XEN_BACKEND is currently set when the host supports Xen, > regardless of the chosen targets. As a consequence, Xen backends can be > enabled even on targets that don't support Xen. > > Fix the issue by setting CONFIG_XEN_BACKEND only for ta

Re: [Qemu-devel] [PATCH for-2.10 5/8] ppc/pnv: map the ICP memory regions

2017-03-14 Thread Cédric Le Goater
On 03/14/2017 06:52 AM, David Gibson wrote: > On Wed, Mar 08, 2017 at 11:52:48AM +0100, Cédric Le Goater wrote: >> and populate the device tree accordingly for the guest to start using >> interrupts. This also links the ICP object to its associated CPUState >> (only used by KVM to control the kerne

Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread

2017-03-14 Thread Paolo Bonzini
On 13/03/2017 19:15, Alex Bennée wrote: >> Well yeah, it's all those that pass qemu_clock_use_for_deadline. > > Have you done any testing with record/replay? So far I have one > reproducible run and one failure. However it is not entirely clear to me > how I am meant to cleanly halt and stop a ma

Re: [Qemu-devel] [PATCH for-2.10 1/1] scripts/update-linux-headers.sh: refactor extra files

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 04:30, Sam Bobroff wrote: > update-linux-headers.sh now has enough code in it to suggest some > refactoring. Parameterize some of it to make adding new files a bit > easier. > > Signed-off-by: Sam Bobroff > --- > scripts/update-linux-headers.sh | 44 > ++-

[Qemu-devel] [PATCH 1/1] scripts/qemugdb/coroutine.py: get pthread pointer from '(gdb) thread info $id' output

2017-03-14 Thread Roman Pen
This is a first step towards coroutines debugging using corefiles. It is much simpler to follow single path and always parse the line * 1Thread 0x7f4475e33700 (LWP 7806) ^^ of a '(gdb) thread info $id' and get pthread pointer instead of rely on libc debugging infor

Re: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() and minor()

2017-03-14 Thread Peter Maydell
On 28 December 2016 at 21:04, Christopher Covington wrote: > The definition of the major() and minor() macros are moving within glibc to > . Include this header when it is available to avoid the > following sorts of build-stopping messages: > > qga/commands-posix.c: In function ‘dev_major_minor’:

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Kevin Wolf
Am 14.03.2017 um 10:24 hat Thomas Huth geschrieben: > > - in all areas our legacy code and back-compatibility requirements > > are threatening to choke forward progress if we don't make serious > > efforts to get on top of them > > ... and don't forget all the code that is in "orphan" st

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 06:14, Xu, Anthony wrote: > Below functions are registered in RCU thread > address_space_dispatch_free, > do_address_space_destroy > flatview_unref > reclaim_ramblock, > qht_map_destroy, > migration_bitmap_free > > first three are address space related, should work without global l

[Qemu-devel] [PATCH 0/1] major / minor macros are to be included from

2017-03-14 Thread Andreas Grapentin
Building qemu fails with glibc-2.25 and gcc-6.3.1: > qemu/qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is > defined > by . For historical compatibility, it is > currently defined by as well, but we plan to > remove this soon. To use "major", include > directly. If you d

[Qemu-devel] [PATCH 1/1] major / minor macros are to be included from

2017-03-14 Thread Andreas Grapentin
--- hw/9pfs/9p.c | 1 + qga/commands-posix.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 76c9247c77..d9cfa8900e 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -12,6 +12,7 @@ */ #include "qemu/osdep.h" +#include #include #include "hw/vir

Re: [Qemu-devel] [PATCH 00/16] Multifd v4

2017-03-14 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Hi > > This is the 4th version of multifd. Changes: > - XBZRLE don't need to be checked for > - Documentation and defaults are consistent > - split socketArgs > - use iovec instead of creating something similar. > - We use now the exported size of tar

Re: [Qemu-devel] [PATCH 1/1] scripts/qemugdb/coroutine.py: get pthread pointer from '(gdb) thread info $id' output

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 11:08, Roman Pen wrote: > For sure under corefile debugging it is not possible to invoke > any syscalls, like arch_prctl(), so avoid doing that. That will > simplify the script. Is the issue that start_thread only works in the main thread stack (i.e. not on coroutines)? > +nu

Re: [Qemu-devel] [PATCH] vnc: fix reverse mode

2017-03-14 Thread Daniel P. Berrange
On Tue, Mar 14, 2017 at 09:26:58AM +0100, Gerd Hoffmann wrote: > vnc server in reverse mode (qemu -vnc localhost:$nr,reverse) interprets > $nr as display number (i.e. with 5900 offset) in recent qemu versions. > Historical and documented behavior is interpreting $nr as port number > though. So we s

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-14 Thread Paolo Bonzini
On 12/03/2017 20:35, Peter Maydell wrote: >> + >> +static inline uint64_t int128_printf1(Int128 a) >> +{ >> +/* We assume 4 highest bits are clear and safe to ignore */ >> +return (int128_gethi(a) << 4) | (int128_getlo(a) >> 60); >> +} >> + >> +static inline uint64_t int128_printf2(Int128

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-14 Thread Paolo Bonzini
On 13/03/2017 04:02, Peter Xu wrote: > On Sun, Mar 12, 2017 at 09:12:43PM +0200, Michael S. Tsirkin wrote: >> info mtree is doing 64 bit math to figure out >> addresses from offsets, this does not work ncorrectly >> incase of overflow. >> >> Overflow usually indicates a guest bug, so this is unus

Re: [Qemu-devel] [PATCH 00/16] Multifd v4

2017-03-14 Thread Daniel P. Berrange
On Tue, Mar 14, 2017 at 10:21:43AM +, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > Hi > > > > This is the 4th version of multifd. Changes: > > - XBZRLE don't need to be checked for > > - Documentation and defaults are consistent > > - split socketArgs > > -

[Qemu-devel] [PATCH] Output dirty-bytes-rate instead of dirty-pages-rate

2017-03-14 Thread Chao Fan
In hmp, dirty-bytes-rate is more friendly than dirty-pages-rate. It's also better for other tools to determine the cpu throttle value in different architecture. Signed-off-by: Chao Fan Signed-off-by: Li Zhijian --- hmp.c | 6 +++--- migration/migration.c | 2 +- qapi-schema.json

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Peter Maydell
On 14 March 2017 at 10:24, Thomas Huth wrote: > On 13.03.2017 11:02, Peter Maydell wrote: >> Are we trying to be: >> . a dev platform before easy h/w availability? >> [not easy for QEMU for several reasons] > > What reasons exactly do you mean here? The main ones I had in mind are: * t

Re: [Qemu-devel] [PATCH 09/16] migration: Start of multiple fd work

2017-03-14 Thread Daniel P. Berrange
On Mon, Mar 13, 2017 at 05:58:06PM +0100, Juan Quintela wrote: > "Daniel P. Berrange" wrote: > > On Mon, Mar 13, 2017 at 01:44:27PM +0100, Juan Quintela wrote: > >> We create new channels for each new thread created. We only send through > >> them a character to be sure that we are creating the ch

[Qemu-devel] join irc chanel

2017-03-14 Thread oussema ben khedher
hi i have a problem when i try to join IRC channel #qemu can someone help ?  

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Peter Maydell
On 14 March 2017 at 09:13, Stefan Hajnoczi wrote: > The minimum requirements for the new language: > 3. Is it safer than C even when writing code to operate on guest RAM >(i.e. it's no good if you must use unsafe primitives to do the >systems programming tasks that QEMU requires)? My imp

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 11:39, Peter Maydell wrote: >> 3. Is it safer than C even when writing code to operate on guest RAM >>(i.e. it's no good if you must use unsafe primitives to do the >>systems programming tasks that QEMU requires)? > My impression is that many of our security vulnerabilities

Re: [Qemu-devel] [PATCH] Output dirty-bytes-rate instead of dirty-pages-rate

2017-03-14 Thread Daniel P. Berrange
On Tue, Mar 14, 2017 at 06:27:47PM +0800, Chao Fan wrote: > In hmp, dirty-bytes-rate is more friendly than dirty-pages-rate. > It's also better for other tools to determine the cpu throttle > value in different architecture. > > Signed-off-by: Chao Fan > Signed-off-by: Li Zhijian > --- > hmp.c

[Qemu-devel] [PATCH] scsi: mptsas: fix the wrong reading size in fetch request

2017-03-14 Thread Li Qiang
When fetching request, it should read sizeof(*hdr), not the pointer hdr. Signed-off-by: Li Qiang --- hw/scsi/mptsas.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c index 2e091c0..765ab53 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/m

Re: [Qemu-devel] KVM call for 2017-03-14

2017-03-14 Thread Peter Maydell
On 14 March 2017 at 09:59, Juan Quintela wrote: > Peter Maydell wrote: >> On 14 March 2017 at 09:13, Stefan Hajnoczi wrote: >>> On Mon, Mar 13, 2017 at 11:02:01AM +0100, Peter Maydell wrote: >>> The minimum requirements for the new language: >>> 1. Does it support the host operating systems that

Re: [Qemu-devel] [PATCH] scsi: mptsas: fix the wrong reading size in fetch request

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 11:56, Li Qiang wrote: > When fetching request, it should read sizeof(*hdr), not the > pointer hdr. > > Signed-off-by: Li Qiang > --- > hw/scsi/mptsas.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c > index 2e0

Re: [Qemu-devel] [PATCH 1/1] scripts/qemugdb/coroutine.py: get pthread pointer from '(gdb) thread info $id' output

2017-03-14 Thread Roman Penyaev
On Tue, Mar 14, 2017 at 11:21 AM, Paolo Bonzini wrote: > > > On 14/03/2017 11:08, Roman Pen wrote: >> For sure under corefile debugging it is not possible to invoke >> any syscalls, like arch_prctl(), so avoid doing that. That will >> simplify the script. > > Is the issue that start_thread only w

Re: [Qemu-devel] [PATCH 1/1] scripts/qemugdb/coroutine.py: get pthread pointer from '(gdb) thread info $id' output

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 12:00, Roman Penyaev wrote: > Linux is always the same, no worries, take a look > >gdb/linux-thread-db.c: thread_db_pid_to_str(): > snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)", > > but e.g. bsd output should be different: > >gdb/bsd-uthread.c: bsd_uthrea

[Qemu-devel] [PATCH] block: quiesce AioContext when detaching from it

2017-03-14 Thread Paolo Bonzini
While it is true that bdrv_set_aio_context only works on a single BlockDriverState subtree (see commit message for 53ec73e, "block: Use bdrv_drain to replace uncessary bdrv_drain_all", 2015-07-07), it works at the AioContext level rather than the BlockDriverState level. Therefore, it is also neces

[Qemu-devel] [PATCH] nbd-client: fix handling of hungup connections

2017-03-14 Thread Paolo Bonzini
After the switch to reading replies in a coroutine, nothing is reentering pending receive coroutines if the connection hangs. Move nbd_recv_coroutines_enter_all to the reply read coroutine, which is the place where hangups are detected. nbd_teardown_connection can simply wait for the reply read co

Re: [Qemu-devel] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution"

2017-03-14 Thread Mark Cave-Ayland
On 14/03/17 10:00, Alex Bennée wrote: > Mark Cave-Ayland writes: > >> I've recently noticed some video artifacts appearing in the form of >> horizontal lines whilst testing OpenBIOS boot on some qemu-system-ppc >> images (see https://www.ilande.co.uk/tmp/qemu/macos9-stripe.png for an >> example)

Re: [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314

2017-03-14 Thread Peter Maydell
git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.9-20170314 > > for you to fetch changes up to 28df75d8d1aebdb09a2cc511c0b97690eac0b7a7: > > dtc: Update submodule to avoid build errors (2017-03-14 12:24:29 +1100) > > --

Re: [Qemu-devel] [PULL RESEND 12/19] vmxnet3: Convert ring values to uint32_t's

2017-03-14 Thread Dr. David Alan Gilbert
* Laurent Vivier (lviv...@redhat.com) wrote: > On 06/03/2017 06:25, Jason Wang wrote: > > From: "Dr. David Alan Gilbert" > > > > The index's in the Vmxnet3Ring were migrated as 32bit ints > > yet are declared as size_t's. They appear to be derived > > from 32bit values loaded from guest memory,

Re: [Qemu-devel] [PULL RESEND 12/19] vmxnet3: Convert ring values to uint32_t's

2017-03-14 Thread Laurent Vivier
On 14/03/2017 12:16, Dr. David Alan Gilbert wrote: > * Laurent Vivier (lviv...@redhat.com) wrote: >> On 06/03/2017 06:25, Jason Wang wrote: >>> From: "Dr. David Alan Gilbert" >>> >>> The index's in the Vmxnet3Ring were migrated as 32bit ints >>> yet are declared as size_t's. They appear to be der

[Qemu-devel] [PATCH 0/5] seccomp: feature refactoring

2017-03-14 Thread Eduardo Otubo
Hi all, This is first attempt of refactoring the seccomp feature, following Daniel's ideas: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg03348.html Best regards, Eduardo Otubo (5): seccomp: changing from whitelist to blacklist seccomp: add obsolete argument to command line sec

[Qemu-devel] [PATCH 2/5] seccomp: add obsolete argument to command line

2017-03-14 Thread Eduardo Otubo
This patch introduces the argument [,obsolete=allow] to the `-sandbox on' option. It allows Qemu to run safely on old system that still relies on old system calls. Signed-off-by: Eduardo Otubo --- include/sysemu/seccomp.h | 4 +++- qemu-options.hx | 9 +++-- qemu-seccomp.c

[Qemu-devel] [PULL 0/2] target-arm queue

2017-03-14 Thread Peter Maydell
Couple of minor patches to sneak in before rc0. The PSCI return values fix is the most important one. -- PMM The following changes since commit 94b5d57d2f5a3c849cecd65e424bb6f50b998df9: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170314' into staging (2017-03-1

[Qemu-devel] [PATCH 1/5] seccomp: changing from whitelist to blacklist

2017-03-14 Thread Eduardo Otubo
This patch changes the default behavior of the seccomp filter from whitelist to blacklist. By default now all system calls are allowed and a small black list of definitely forbidden ones was created. Signed-off-by: Eduardo Otubo --- qemu-seccomp.c | 256 +++---

[Qemu-devel] [PATCH 5/5] seccomp: add resourcecontrol argument to command line

2017-03-14 Thread Eduardo Otubo
This patch adds [,resourcecontrol=deny] to `-sandbox on' option. It blacklists all process affinity and scheduler priority system calls to avoid any bigger of the process. Signed-off-by: Eduardo Otubo --- include/sysemu/seccomp.h | 1 + qemu-options.hx | 5 - qemu-seccomp.c

[Qemu-devel] [PULL 2/2] target/arm/arm-powerctl: Fix psci info return values

2017-03-14 Thread Peter Maydell
From: Andrew Jones The power state spec section 5.1.5 AFFINITY_INFO defines the affinity info return values as 0 ON 1 OFF 2 ON_PENDING I grepped QEMU for power_state to ensure that no assumptions of OFF=0 were being made. Signed-off-by: Andrew Jones Message-id: 20170303123232.4967-1-drj

[Qemu-devel] [PULL 1/2] target/arm: implement armv8 PMUSERENR (user-mode enable bits)

2017-03-14 Thread Peter Maydell
From: Andrew Baumann In armv8, this register implements more than a single bit, with fine-grained enables for read access to event counters, cycles counters, and write access to the software increment. This change implements those checks using custom access functions for the relevant registers.

[Qemu-devel] [PATCH 4/5] seccomp: add spawn argument to command line

2017-03-14 Thread Eduardo Otubo
This patch adds [,spawn=deny] argument to `-sandbox on' option. It blacklists fork and execve syste calls, avoiding Qemu to spawn new threads or processes. Signed-off-by: Eduardo Otubo --- include/sysemu/seccomp.h | 1 + qemu-options.hx | 7 +-- qemu-seccomp.c | 18 +

[Qemu-devel] [PATCH 3/5] seccomp: add elevateprivileges argument to command line

2017-03-14 Thread Eduardo Otubo
This patch introduces the new argument [,elevateprivileges=deny] to the `-sandbox on'. It avoids Qemu process to elevate its privileges by blacklisting all set*uid|gid system calls Signed-off-by: Eduardo Otubo --- include/sysemu/seccomp.h | 1 + qemu-options.hx | 8 ++-- qemu-secc

Re: [Qemu-devel] [PULL RESEND 12/19] vmxnet3: Convert ring values to uint32_t's

2017-03-14 Thread Dr. David Alan Gilbert
* Laurent Vivier (lviv...@redhat.com) wrote: > On 14/03/2017 12:16, Dr. David Alan Gilbert wrote: > > * Laurent Vivier (lviv...@redhat.com) wrote: > >> On 06/03/2017 06:25, Jason Wang wrote: > >>> From: "Dr. David Alan Gilbert" > >>> > >>> The index's in the Vmxnet3Ring were migrated as 32bit ints

Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration

2017-03-14 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 03/13/2017 03:07 PM, Dr. David Alan Gilbert wrote: > > * Eric Blake (ebl...@redhat.com) wrote: > >> An upcoming patch will let the compiler warn us when we are silently > >> losing precision in traces; update the trace definitions to pass > >> through th

[Qemu-devel] [PATCH] coverity-model: model address_space_read/write

2017-03-14 Thread Paolo Bonzini
When more complexity was added to facilitate inlining, Coverity lost the ability to use the address_space_rw model for address_space_read/write. This causes false positive defects when Coverity sees a length-8 write in address_space_read and a length-4 (e.g. int*) buffer to read into. As long as

  1   2   3   4   >