Re: [Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:42 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:14PM +0200, Lukáš Doktor wrote: > [...] >> @@ -83,8 +80,11 @@ class QEMUQtestMachine(qemu.QEMUMachine): >> socket_scm_helper=None): >> if name is None: >> name = "qemu-%d" % os.g

Re: [Qemu-devel] [PATCH 09/11] qmp.py: Avoid overriding a builtin object

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:38 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:13PM +0200, Lukáš Doktor wrote: >> The "id" is a builtin method to get object's identity and should not be >> overridden. This might bring some issues in case someone was directly >> calling "cmd(..., id=id)" but I hav

Re: [Qemu-devel] [PATCH 07/11] qmp.py: Use object-based class for QEMUMonitorProtocol

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:35 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:11PM +0200, Lukáš Doktor wrote: >> There is no need to define QEMUMonitorProtocol as old-style class. >> >> Signed-off-by: Lukáš Doktor >> --- >> scripts/qmp/qmp.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deleti

Re: [Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness"

2017-07-20 Thread Philippe Mathieu-Daudé
Hi Alexey, On 07/21/2017 01:19 AM, Alexey Kardashevskiy wrote: This reverts c8e1158cf611 "elf-loader: warn about invalid endianness" as it produces a useless message every time an LE kernel image is passed via -kernel on a ppc64-pseries machine. The pseries machine already checks for ELF_LOAD_WR

Re: [Qemu-devel] [PATCH 5/5] qtest: Document calling conventions

2017-07-20 Thread Markus Armbruster
Eric Blake writes: > On 07/20/2017 03:37 PM, Eric Blake wrote: + * @fmt...: QMP message to send to qemu; only recognizes formats + * understood by json-lexer.c * * Sends a QMP message to QEMU and consumes the response. */ >>> >>> These formats are chosen so that gcc

Re: [Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:27 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:09PM +0200, Lukáš Doktor wrote: >> The naked Exception should not be widely used. It makes sense to be a >> bit more specific and use better-suited custom exceptions. As a benefit >> we can store the full reply in the

Re: [Qemu-devel] [PATCH v2 1/8] usb-ccid: Add support to dump all USB packets

2017-07-20 Thread Gerd Hoffmann
> index bef1f03c42..624dc2c447 100644 > --- a/hw/usb/dev-smartcard-reader.c > +++ b/hw/usb/dev-smartcard-reader.c > @@ -54,9 +54,25 @@ do { \ >  #define D_INFO 2 >  #define D_MORE_INFO 3 >  #define D_VERBOSE 4 > +#define D_TRACE 5 > +#define D_REMOTEIO 10 Considered converting all DPRINTFs into tr

Re: [Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness"

2017-07-20 Thread Philippe Mathieu-Daudé
Hi Jason, Michael, On 07/21/2017 01:55 AM, no-re...@patchew.org wrote: This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. [...] GTester: last random seed: R02Sd7d1d0ad279b9a1e69a

Re: [Qemu-devel] [PATCH v5 17/17] migration: Flush receive queue

2017-07-20 Thread Peter Xu
On Mon, Jul 17, 2017 at 03:42:38PM +0200, Juan Quintela wrote: > Each time that we sync the bitmap, it is a possiblity that we receive > a page that is being processed by a different thread. We fix this > problem just making sure that we wait for all receiving threads to > finish its work before w

[Qemu-devel] [PATCH v4 43/43] tcg: enable multiple TCG contexts in softmmu

2017-07-20 Thread Emilio G. Cota
This enables parallel TCG code generation. However, we do not take advantage of it yet since tb_lock is still held during tb_gen_code. In user-mode we use a single TCG context; see the documentation added to tcg_region_init for the rationale. Note that targets do not need any conversion: targets

[Qemu-devel] [PATCH v4 11/43] tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK

2017-07-20 Thread Emilio G. Cota
This will enable us to decouple code translation from the value of parallel_cpus at any given time. It will also help us minimize TB flushes when generating code via EXCP_ATOMIC. Note that the declaration of parallel_cpus is brought to exec-all.h to be able to define there the "curr_cflags" inline

[Qemu-devel] [PATCH v4 20/43] tcg: check CF_PARALLEL instead of parallel_cpus

2017-07-20 Thread Emilio G. Cota
Thereby decoupling the resulting translated code from the current state of the system. The tb->cflags field is not passed to tcg generation functions. So we add a field to TCGContext, storing there a copy of tb->cflags. Most architectures have <= 32 registers, which results in a 4-byte hole in TC

[Qemu-devel] [PATCH v4 00/43] tcg: support for multiple TCG contexts

2017-07-20 Thread Emilio G. Cota
v3: https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06353.html To ease review/testing, you can pull this series from: https://github.com/cota/qemu/tree/multi-tcg-v4 [ head commit: 1d50a9f24e ] In this iteration I'm sending only the few patches that contain changes from v3; they are

[Qemu-devel] [PATCH v4 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-20 Thread Emilio G. Cota
This is groundwork for supporting multiple TCG contexts. The naive solution here is to split code_gen_buffer statically among the TCG threads; this however results in poor utilization if translation needs are different across TCG threads. What we do here is to add an extra layer of indirection, a

[Qemu-devel] [PATCH v4 35/43] tcg: allocate optimizer temps with tcg_malloc

2017-07-20 Thread Emilio G. Cota
Groundwork for supporting multiple TCG contexts. While at it, also allocate temps_used directly as a bitmap of the required size, instead of using a bitmap of TCG_MAX_TEMPS via TCGTempSet. Performance-wise we lose about 1.12% in a translation-heavy workload such as booting+shutting down debian-ar

[Qemu-devel] [PATCH] target/arm: fix TCG temp leak in aarch64 rev16

2017-07-20 Thread Emilio G. Cota
On Wed, Jul 19, 2017 at 13:34:47 -1000, Richard Henderson wrote: > It is much shorter to reverse all 4 half-words in parallel > than extract, reverse, and deposit each in turn. > > Suggested-by: Aurelien Jarno > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 24 ++

[Qemu-devel] [PATCH] vhost-user: fix watcher need be removed when vhost-user hotplug

2017-07-20 Thread w00273186
From: Yunjian Wang "nc" is freed after hotplug vhost-user, but the watcher don't be removed. The QEMU crash when the watcher access the "nc" on socket disconnect. Program received signal SIGSEGV, Segmentation fault. #0 object_get_class (obj=obj@entry=0x2) at qom/object.c:750 #1 0x0

Re: [Qemu-devel] [PATCH v3 35/43] tcg: dynamically allocate optimizer temps

2017-07-20 Thread Emilio G. Cota
On Thu, Jul 20, 2017 at 14:02:53 -1000, Richard Henderson wrote: > On 07/20/2017 01:53 PM, Emilio G. Cota wrote: > >BTW, is there any chance that the pool will be initialized before we copy > >tcg_init_ctx? That'd mean the main thread has performed translation, which > >seems unlikely to me. But sh

Re: [Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness"

2017-07-20 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness" Message-id: 20170721041952

[Qemu-devel] [FIX PATCH v2] spapr: Fix QEMU abort during memory unplug

2017-07-20 Thread Bharata B Rao
Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState) introduced a new way to track pending LMBs of DIMM device that is marked for removal. Since this commit we can hit the assert in spapr_pending_dimm_unplugs_add() in the following situation: - DIMM device removal fai

Re: [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-20 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip Message-id: 20170721034730.25612-1-cr...@redhat.com === TEST SCRIPT BEGIN === #!/bin/

Re: [Qemu-devel] Unified Datagram Socket Transport

2017-07-20 Thread Anton Ivanov
On 21/07/17 04:55, Jason Wang wrote: On 2017年07月21日 03:12, anton.iva...@cambridgegreys.com wrote: Hi all, This addresses comments so far except Eric's suggestion to use InetSocketAddressBase. If I understand correctly its intended use, it will not be of help for protocols which have no port

[Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness"

2017-07-20 Thread Alexey Kardashevskiy
This reverts c8e1158cf611 "elf-loader: warn about invalid endianness" as it produces a useless message every time an LE kernel image is passed via -kernel on a ppc64-pseries machine. The pseries machine already checks for ELF_LOAD_WRONG_ENDIAN and tries with big_endian=0. Signed-off-by: Alexey Kar

Re: [Qemu-devel] unrecognized option --object

2017-07-20 Thread Fam Zheng
On Thu, 07/20 19:06, 陳培泓 wrote: > I build qemu from the https://github.com/qemu/qemu, and it didn't show any > errors. > > I tried qemu-nbd --object secret,id=sec0... > but it shows unrecognized option '--object ' > > how to solve it? -object it is. Thanks. Fam

Re: [Qemu-devel] Unified Datagram Socket Transport

2017-07-20 Thread Jason Wang
On 2017年07月21日 03:12, anton.iva...@cambridgegreys.com wrote: Hi all, This addresses comments so far except Eric's suggestion to use InetSocketAddressBase. If I understand correctly its intended use, it will not be of help for protocols which have no port (raw sockets - GRE, L2TPv3, etc). It a

[Qemu-devel] [PATCH 1/3] scripts: introduce buildconf.py

2017-07-20 Thread Cleber Rosa
scripts/buildconf.py is a command line utility (but also can be used as a Python module) that introspects the build configuration. It uses the generated host level config-host.mak to obtain the general build configuration, and optionally, also target specific config-target.mak and config-devices.m

[Qemu-devel] [PATCH 2/3] qemu-iotests: add _require_feature() function

2017-07-20 Thread Cleber Rosa
With the previously introduced buildconf.py script, it's possible to determine if a feature needed by a test is present or not. This adds a thin layer on top of scripts/buildconf.py, and allows tests to be skipped when a feature is required. The naming of the function, while different in tense fr

[Qemu-devel] [PATCH 3/3] qemu-iotests: require CONFIG_LINUX_AIO for test 087

2017-07-20 Thread Cleber Rosa
One of the "sub-"tests of test 087 requires CONFIG_LINUX_AIO. As a PoC/RFC, this goes the easy route and skips the test as a whole when that feature is missing. Other approaches include splitting the test and adding extra filtering. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/087 | 1 +

[Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-20 Thread Cleber Rosa
This is a follow up to a previous discussion about reported failures when running some qemu-iotests. Turns out the failures were due to missing libraries, which in turn, reflected on the host build configuration. This series introduces a tool that can check both host and target level build config

Re: [Qemu-devel] Status and RFC of patchew testings on QEMU

2017-07-20 Thread Fam Zheng
On Mon, 07/17 11:02, Daniel P. Berrange wrote: > I'd like to see a web page that provides a list of all mail threads that > the test system has queued, with status of which jobs and running, and > once completed, provides the full logs. The index page already exists (no running jobs information, t

Re: [Qemu-devel] [PATCH v7] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-20 Thread Fam Zheng
On Fri, 07/21 09:20, ZhiPeng Lu wrote: > we can get the network interface statistics inside a virtual machine by > guest-network-get-interfaces command. it is very useful for us to monitor > and analyze network traffic. > > Signed-off-by: ZhiPeng Lu In the future, please add a '---' line between

[Qemu-devel] [PULL 11/14] target/mips: Add segmentation control registers

2017-07-20 Thread Yongbok Kim
From: James Hogan The optional segmentation control registers CP0_SegCtl0, CP0_SegCtl1 & CP0_SegCtl2 control the behaviour and required privilege of the legacy virtual memory segments. Add them to the CP0 interface so they can be read and written when CP0_Config3.SC=1, and initialise them to des

[Qemu-devel] [PULL 10/14] target/mips: Add an MMU mode for ERL

2017-07-20 Thread Yongbok Kim
From: James Hogan The segmentation control feature allows a legacy memory segment to become unmapped uncached at error level (according to CP0_Status.ERL), and in fact the user segment is already treated in this way by QEMU. Add a new MMU mode for this state so that QEMU's mappings don't persist

[Qemu-devel] [PULL 13/14] target/mips: Add EVA support to P5600

2017-07-20 Thread Yongbok Kim
From: James Hogan Add the Enhanced Virtual Addressing (EVA) feature to the P5600 core configuration, along with the related Segmentation Control (SC) feature and writable CP0_EBase.WG bit. This allows it to run Malta EVA kernels. Signed-off-by: James Hogan Reviewed-by: Yongbok Kim Cc: Aurelie

[Qemu-devel] [PULL 14/14] target/mips: Enable CP0_EBase.WG on MIPS64 CPUs

2017-07-20 Thread Yongbok Kim
From: James Hogan Enable the CP0_EBase.WG (write gate) on the I6400 and MIPS64R2-generic CPUs. This allows 64-bit guests to run KVM itself, which uses CP0_EBase.WG to point CP0_EBase at XKPhys. Signed-off-by: James Hogan Cc: Yongbok Kim Cc: Aurelien Jarno Reviewed-by: Yongbok Kim Signed-off-

Re: [Qemu-devel] [PATCH v5 17/17] migration: Flush receive queue

2017-07-20 Thread Peter Xu
On Mon, Jul 17, 2017 at 03:42:38PM +0200, Juan Quintela wrote: > Each time that we sync the bitmap, it is a possiblity that we receive > a page that is being processed by a different thread. We fix this > problem just making sure that we wait for all receiving threads to > finish its work before w

[Qemu-devel] [PULL 03/14] target/mips: Weaken TLB flush on UX, SX, KX, ASID changes

2017-07-20 Thread Yongbok Kim
From: James Hogan There is no need to invalidate any shadow TLB entries when the ASID changes or when access to one of the 64-bit segments has been disabled, since doing so doesn't reveal to software whether any TLB entries have been evicted into the shadow half of the TLB. Therefore weaken the

[Qemu-devel] [PULL 06/14] target/mips: Decode MIPS32 EVA load & store instructions

2017-07-20 Thread Yongbok Kim
From: James Hogan Implement decoding of MIPS32 EVA loads and stores. These access the user address space from kernel mode when implemented, so for each instruction we need to check that EVA is available from Config5.EVA & check for sufficient COP0 privilege (with the new check_eva()), and then ov

[Qemu-devel] [PULL 12/14] target/mips: Implement segmentation control

2017-07-20 Thread Yongbok Kim
From: James Hogan Implement the optional segmentation control feature in the virtual to physical address translation code. The fixed legacy segment and xkphys handling is replaced with a dynamic layout based on the segmentation control registers (which should be set up even when the feature is n

[Qemu-devel] [PULL 09/14] target/mips: Abstract mmu_idx from hflags

2017-07-20 Thread Yongbok Kim
From: James Hogan The MIPS mmu_idx is sometimes calculated from hflags without an env pointer available as cpu_mmu_index() requires. Create a common hflags_mmu_index() for the purpose of this calculation which can operate on any hflags, not just with an env pointer, and update cpu_mmu_index() it

[Qemu-devel] [PULL 08/14] target/mips: Check memory permissions with mem_idx

2017-07-20 Thread Yongbok Kim
From: James Hogan When performing virtual to physical address translation, check the required privilege level based on the mem_idx rather than the mode in the hflags. This will allow EVA loads & stores to operate safely only on user memory from kernel mode. For the cases where the mmu_idx doesn'

[Qemu-devel] [PULL 05/14] target/mips: Prepare loads/stores for EVA

2017-07-20 Thread Yongbok Kim
From: James Hogan EVA load and store instructions access the user mode address map, so they need to use mem_idx of MIPS_HFLAG_UM. Update the various utility functions to allow mem_idx to be more easily overridden from the decoding logic. Specifically we add a mem_idx argument to the op_ld/st_* h

[Qemu-devel] [PULL 02/14] target/mips: Fix TLBWI shadow flush for EHINV, XI, RI

2017-07-20 Thread Yongbok Kim
From: James Hogan Writing specific TLB entries with TLBWI flushes shadow TLB entries unless an existing entry is having its access permissions upgraded. This is necessary as software would from then on expect the previous mapping in that entry to no longer be in effect (even if QEMU has quietly e

[Qemu-devel] [PULL 04/14] target/mips: Add CP0_Ebase.WG (write gate) support

2017-07-20 Thread Yongbok Kim
From: James Hogan Add support for the CP0_EBase.WG bit, which allows upper bits to be written (bits 31:30 on MIPS32, or bits 63:30 on MIPS64), along with the CP0_Config5.CV bit to control whether the exception vector for Cache Error exceptions is forced into KSeg1. This is necessary on MIPS32 to

[Qemu-devel] [PULL 00/14] target-mips queue

2017-07-20 Thread Yongbok Kim
The following changes since commit 25d0233c1ac6cd14a15fcc834f1de3b179037b1d: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20170720-pull-request' into staging (2017-07-20 16:40:01 +0100) are available in the git repository at: git://github.com/yongbok/upstream-qemu.git

[Qemu-devel] [PULL 07/14] target/mips: Decode microMIPS EVA load & store instructions

2017-07-20 Thread Yongbok Kim
From: James Hogan Implement decoding of microMIPS EVA load and store instruction groups in the POOL31C pool. These use the same gen_ld(), gen_st(), gen_st_cond() helpers as the MIPS32 decoding, passing the equivalent MIPS32 opcodes as opc. Signed-off-by: James Hogan Cc: Yongbok Kim Cc: Aurelie

[Qemu-devel] [PULL 01/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host

2017-07-20 Thread Yongbok Kim
From: James Hogan Using MFC0 to read CP0_UserLocal uses tcg_gen_ld32s_tl, however CP0_UserLocal is a target_ulong. On a big endian host with a MIPS64 target this reads and sign extends the more significant half of the 64-bit register. Fix this by using ld_tl to load the whole target_ulong and ex

Re: [Qemu-devel] [PATCH v7] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-20 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [PATCH v7] qga: Add support network interface statistics in guest-network-get-interfaces c

Re: [Qemu-devel] [PATCH] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-20 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [PATCH] qga: Add support network interface statistics in guest-network-get-interfaces comm

Re: [Qemu-devel] Disable image locking for snapshot drive?

2017-07-20 Thread Fam Zheng
On Thu, 07/20 21:49, Andrew Baumann via Qemu-devel wrote: > > From: Fam Zheng [mailto:f...@redhat.com] > > Sent: Wednesday, 19 July 2017 23:53 > > > > On Tue, 07/18 16:19, Andrew Baumann wrote: > > > > From: Eric Blake [mailto:ebl...@redhat.com] > > > > Sent: Tuesday, 18 July 2017 8:07 > > > > On

Re: [Qemu-devel] [FIX PATCH v1] spapr: Fix QEMU abort during memory unplug

2017-07-20 Thread David Gibson
On Thu, Jul 20, 2017 at 09:41:19AM +0530, Bharata B Rao wrote: > Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to > sPAPRMachineState) introduced a new way to track pending LMBs of DIMM > device that is marked for removal. Since this commit we can hit the > assert in spapr_pending_di

Re: [Qemu-devel] Can I mount encrypt qcow2?

2017-07-20 Thread 陳培泓
I re-build qemu from the https://github.com/qemu/qemu, and it didn't show any errors. I tried the cmd you suggested below: > qemu-nbd --object secret,id=sec0,file=passwd.txt,format=raw \ >-c /dev/nbd0 \ >--image-opts driver=qcow2,file.filename= > demo.qcow2,encrypt.format=

[Qemu-devel] [PATCH v7] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-20 Thread ZhiPeng Lu
we can get the network interface statistics inside a virtual machine by guest-network-get-interfaces command. it is very useful for us to monitor and analyze network traffic. Signed-off-by: ZhiPeng Lu v1->v2: - correct some spelling mistake and add the stats data to the guest-network-get-int

[Qemu-devel] [PATCH] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-20 Thread ZhiPeng Lu
we can get the network interface statistics inside a virtual machine by guest-network-get-interfaces command. it is very useful for us to monitor and analyze network traffic. Signed-off-by: ZhiPeng Lu v1->v2: - correct some spelling mistake and add the stats data to the guest-network-get-int

[Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvhost region merge

2017-07-20 Thread peng.hao2
* Michael S. Tsirkin (m...@redhat.com) wrote: >> On Wed, Jul 19, 2017 at 03:24:27PM +0200, Igor Mammedov wrote: > > > On Wed, 19 Jul 2017 12:46:13 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > > > On Wed, 19 Jul 2017 23:17:32 +08

Re: [Qemu-devel] [PATCH for-2.10] Use qemu_tolower() and qemu_toupper(), not tolower() and toupper()

2017-07-20 Thread David Gibson
On Thu, Jul 20, 2017 at 05:31:30PM +0100, Peter Maydell wrote: > On NetBSD, where tolower() and toupper() are implemented using an > array lookup, the compiler warns if you pass a plain 'char' > to these functions: > > gdbstub.c:914:13: warning: array subscript has type 'char' > > This reflects t

Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-20 Thread Richard Henderson
On 07/20/2017 01:23 PM, Emilio G. Cota wrote: That's a nice helper -- will do it this way. For v4, should I send all patches again, or just the handful of patches that are changing from v3? I don't mind if you just send the changed patches. Just be sure to reference the tree in the cover lette

Re: [Qemu-devel] [PATCH v3 35/43] tcg: dynamically allocate optimizer temps

2017-07-20 Thread Richard Henderson
On 07/20/2017 01:53 PM, Emilio G. Cota wrote: BTW, is there any chance that the pool will be initialized before we copy tcg_init_ctx? That'd mean the main thread has performed translation, which seems unlikely to me. But should then we bother clearing the TCGProfile counters after we copy tcg_ini

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-20 Thread Programmingkid
> On Jul 20, 2017, at 3:29 PM, Phil Dennis-Jordan wrote: > > On Thu, Jul 20, 2017 at 6:40 PM, Programmingkid > wrote: >> I noticed that Windows 2000 does not boot up in QEMU recently. After >> bisecting the issue I found the offending commit: > > Ouch. I reckon we have 2 options for fixing th

Re: [Qemu-devel] [PATCH v3 35/43] tcg: dynamically allocate optimizer temps

2017-07-20 Thread Emilio G. Cota
On Wed, Jul 19, 2017 at 21:39:35 -1000, Richard Henderson wrote: > On 07/19/2017 05:09 PM, Emilio G. Cota wrote: > >Groundwork for supporting multiple TCG contexts. > >That is, 2.70% slowdown. > > That's disappointing. How about using tcg_malloc? > > Maximum allocation is sizeof(tcg_temp_info) *

Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-20 Thread Emilio G. Cota
On Thu, Jul 20, 2017 at 11:22:10 -1000, Richard Henderson wrote: > >Perhaps we should then enlarge both the first and last regions so that we > >fully use the buffer. > > I really like the idea. That's a lot of space recovered for 64k page hosts. > > I do think we can make the computation cleare

Re: [Qemu-devel] [Bug 1196727] Re: SLIRP on Windows 7 64-bit host or is it me?

2017-07-20 Thread Kenneth Salerno via Qemu-devel
Hi, you can close this ticket. I can't remember what I did to get it working. Sent from Yahoo Mail on Android On Thu, Jul 20, 2017 at 8:16 AM, Thomas Huth<1196...@bugs.launchpad.net> wrote: Triaging old bug tickets ... can you still reproduce this problem with the latest version of QEMU (c

Re: [Qemu-devel] [PULL 0/8] target/alpha cleanups

2017-07-20 Thread Paolo Bonzini
I am planning to refresh the series for 2.11. Paolo Il 20/lug/2017 11:07, "Peter Maydell" ha scritto: > On 19 July 2017 at 22:52, Richard Henderson wrote: > > On 07/19/2017 06:57 AM, Peter Maydell wrote: > >> > >> On 19 July 2017 at 05:45, Richard Henderson wrote: > >>> > >>> The new title ho

Re: [Qemu-devel] [PATCH for-2.10? v2 0/4] random qapi cleanups

2017-07-20 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [PATCH for-2.10? v2 0/4] random qapi cleanups Message-id: 20170720214008.28494-1-ebl...@red

Re: [Qemu-devel] Disable image locking for snapshot drive?

2017-07-20 Thread Andrew Baumann via Qemu-devel
> From: Fam Zheng [mailto:f...@redhat.com] > Sent: Wednesday, 19 July 2017 23:53 > > On Tue, 07/18 16:19, Andrew Baumann wrote: > > > From: Eric Blake [mailto:ebl...@redhat.com] > > > Sent: Tuesday, 18 July 2017 8:07 > > > On 07/17/2017 07:33 PM, John Snow wrote: > > > > On 07/17/2017 07:30 PM, An

Re: [Qemu-devel] [PATCH for-2.10] Use qemu_tolower() and qemu_toupper(), not tolower() and toupper()

2017-07-20 Thread Peter Maydell
On 20 July 2017 at 22:29, Eric Blake wrote: > On 07/20/2017 04:03 PM, Peter Maydell wrote: >> https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/ctype_inline.h >> The implementation is >> #define toupper(c) ((int)((_toupper_tab_ + 1)[(c)])) >> >> (where I assume _toupper_tab_ is the ob

[Qemu-devel] [PATCH v2 4/4] qtest: Document calling conventions

2017-07-20 Thread Eric Blake
We have two flavors of vararg usage in qtest; make it clear that qmp() has different semantics than hmp(), and let the compiler enforce that hmp() is used correctly. However, qmp() (and friends) only accept a subset of printf flags look-alikes (namely, those that our JSON parser understands), and w

[Qemu-devel] [PATCH v2 2/4] qapi: Visitor documentation tweak

2017-07-20 Thread Eric Blake
Make it clear that the name parameter to visit_start_struct() has the same semantics as for visit_start_int(). Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- v2: tweak wording to avoid overloaded 'OBJ' --- include/qapi/visitor.h | 14 +++--- 1 file changed, 7 insertions(+

[Qemu-devel] [PATCH for-2.10? v2 0/4] random qapi cleanups

2017-07-20 Thread Eric Blake
Doc and testsuite changes only, so safe for softfreeze if we like it (but no real harm if it slips to 2.11). Since v1: - drop changes that conflict with Markus' work-in-progress on virtual alternates - tweak comments per review from Markus Eric Blake (4): tests: Enhance qobject output to cover

[Qemu-devel] [PATCH v2 3/4] qtest: Avoid passing raw strings through hmp()

2017-07-20 Thread Eric Blake
The next patch will add __attribute__((__format__)) to hmp(), which in turn causes gcc to warn about non-literal format strings. Rather than risk an arbitrary string containing % being mis-handled, always pass variable strings along with a %s format. It also makes it easier to prove correctness l

[Qemu-devel] [PATCH v2 1/4] tests: Enhance qobject output to cover partial visit

2017-07-20 Thread Eric Blake
Add a test that proves (at least when run under valgrind) that we are correctly handling allocated memory even when a visit is aborted in the middle for whatever other reason. See commit f24582d "qapi: fix double free in qmp_output_visitor_cleanup()" for a fix that was lacking testsuite exposure p

Re: [Qemu-devel] [RFC] RFC on Backup tool

2017-07-20 Thread Ishani
- On Jul 17, 2017, at 8:02 PM, stefanha stefa...@redhat.com wrote: > On Sun, Jul 16, 2017 at 02:13:21AM +0530, Ishani Chugh wrote: >> +def write_config(self): >> +""" >> +Writes configuration to ini file. >> +""" >> +with open(self.config_file, 'w') as confi

Re: [Qemu-devel] [PATCH for-2.10] Use qemu_tolower() and qemu_toupper(), not tolower() and toupper()

2017-07-20 Thread Eric Blake
On 07/20/2017 04:03 PM, Peter Maydell wrote: > On 20 July 2017 at 19:26, Richard Henderson wrote: >> On 07/20/2017 06:31 AM, Peter Maydell wrote: >>> >>> gdbstub.c:914:13: warning: array subscript has type 'char' >>> >>> This reflects the fact that toupper() and tolower() give >>> undefined behavi

Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-20 Thread Richard Henderson
On 07/20/2017 10:50 AM, Emilio G. Cota wrote: On Wed, Jul 19, 2017 at 22:04:50 -1000, Richard Henderson wrote: On 07/19/2017 05:09 PM, Emilio G. Cota wrote: +/* We do not yet support multiple TCG contexts, so use one region for now */ +n_regions = 1; + +/* start on a page-aligned a

Re: [Qemu-devel] [PATCH for-2.10] util/oslib-posix.c: Avoid warning on NetBSD

2017-07-20 Thread Peter Maydell
On 20 July 2017 at 22:10, Eric Blake wrote: > On 07/20/2017 03:53 PM, Peter Maydell wrote: >> On 20 July 2017 at 19:26, Eric Blake wrote: >>> On 07/20/2017 11:32 AM, Peter Maydell wrote: On NetBSD the compiler warns: util/oslib-posix.c: In function 'sigaction_invoke': util/oslib-po

Re: [Qemu-devel] [RFC] RFC on Backup tool

2017-07-20 Thread Ishani
- On Jul 19, 2017, at 2:59 AM, jsnow js...@redhat.com wrote: > On 07/17/2017 03:37 PM, Ishani wrote: >> - On Jul 17, 2017, at 12:48 PM, Fam Zheng f...@redhat.com wrote: >>> On Sun, 07/16 02:13, Ishani Chugh wrote: > > [...] > >>> Only full backup is implemented in this patch, is the pl

Re: [Qemu-devel] [PATCH for-2.10] util/oslib-posix.c: Avoid warning on NetBSD

2017-07-20 Thread Eric Blake
On 07/20/2017 03:53 PM, Peter Maydell wrote: > On 20 July 2017 at 19:26, Eric Blake wrote: >> On 07/20/2017 11:32 AM, Peter Maydell wrote: >>> On NetBSD the compiler warns: >>> util/oslib-posix.c: In function 'sigaction_invoke': >>> util/oslib-posix.c:589:5: warning: missing braces around initiali

Re: [Qemu-devel] Build failure on git master

2017-07-20 Thread Peter Maydell
On 20 July 2017 at 20:29, Mark Cave-Ayland wrote: > On 19/07/17 18:09, Mark Cave-Ayland wrote: > >> Hi all, >> >> I see the following build failure here on git master with gcc 4.7.2: >> >> cc -I/home/build/src/qemu/git/qemu/block -Iblock >> -I/home/build/src/qemu/git/qemu/tcg >> -I/home/build/src/

Re: [Qemu-devel] [PATCH for-2.10] Use qemu_tolower() and qemu_toupper(), not tolower() and toupper()

2017-07-20 Thread Peter Maydell
On 20 July 2017 at 19:26, Richard Henderson wrote: > On 07/20/2017 06:31 AM, Peter Maydell wrote: >> >> gdbstub.c:914:13: warning: array subscript has type 'char' >> >> This reflects the fact that toupper() and tolower() give >> undefined behaviour if they are passed a value that isn't >> a valid

Re: [Qemu-devel] [PATCH v6] Add manpage for QEMU Backup Tool

2017-07-20 Thread Ishani
- On Jul 20, 2017, at 6:16 PM, stefanha stefa...@redhat.com wrote: > On Tue, Jul 18, 2017 at 12:45:36AM +0530, Ishani Chugh wrote: > > This looks good. I think it makes sense to include this patch with the > patch series that adds the qemu-backup command. That way the command > and its man

Re: [Qemu-devel] [PATCH for-2.10] util/oslib-posix.c: Avoid warning on NetBSD

2017-07-20 Thread Peter Maydell
On 20 July 2017 at 19:26, Eric Blake wrote: > On 07/20/2017 11:32 AM, Peter Maydell wrote: >> On NetBSD the compiler warns: >> util/oslib-posix.c: In function 'sigaction_invoke': >> util/oslib-posix.c:589:5: warning: missing braces around initializer >> [-Wmissing-braces] >> siginfo_t si = {

Re: [Qemu-devel] [PATCH 5/5] qtest: Document calling conventions

2017-07-20 Thread Eric Blake
On 07/20/2017 03:37 PM, Eric Blake wrote: >>> + * @fmt...: QMP message to send to qemu; only recognizes formats >>> + * understood by json-lexer.c >>> * >>> * Sends a QMP message to QEMU and consumes the response. >>> */ >> >> These formats are chosen so that gcc can help us check them. Plea

Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-20 Thread Emilio G. Cota
On Wed, Jul 19, 2017 at 22:04:50 -1000, Richard Henderson wrote: > On 07/19/2017 05:09 PM, Emilio G. Cota wrote: > >+/* We do not yet support multiple TCG contexts, so use one region for > >now */ > >+n_regions = 1; > >+ > >+/* start on a page-aligned address */ > >+buf = QEMU_ALIG

Re: [Qemu-devel] [PATCH 5/5] qtest: Document calling conventions

2017-07-20 Thread Eric Blake
On 07/20/2017 05:10 AM, Markus Armbruster wrote: > Eric Blake writes: > >> We have two flavors of vararg usage in qtest; make it clear that >> qmp() has different semantics than hmp(), and let the compiler >> enforce that hmp() is used correctly. Since qmp() only accepts >> a subset of printf fla

Re: [Qemu-devel] [PATCH 3/5] qapi: Visitor documentation tweak

2017-07-20 Thread Eric Blake
On 07/20/2017 05:00 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Make it clear that the name parameter to visit_start_struct() >> has the same semantics as for visit_start_int(). >> >> Signed-off-by: Eric Blake >> --- >> + * The @name parameter of visit_type_FOO() and visit_start_OBJE

Re: [Qemu-devel] [PATCH 2/5] tests: Enhance qobject output to cover partial visit

2017-07-20 Thread Eric Blake
On 07/20/2017 04:52 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Add a test that proves (at least when run under valgrind) that >> we are correctly handling allocated memory even when a visit >> is aborted in the middle for whatever other reason. >> >> See commit f24582d "qapi: fix doub

Re: [Qemu-devel] [PATCH 1/5] qapi: Further enhance visitor virtual walk doc example

2017-07-20 Thread Eric Blake
On 07/20/2017 04:05 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Markus pointed out that the example given for virtual walks did >> not discuss how to do a virtual walk of an alternate type. It >> turns out that for output, we don't need to visit an alternate >> (just directly visit th

Re: [Qemu-devel] [PATCH v3 1/3] qemu.py: fix is_running()

2017-07-20 Thread Amador Pahim
On Thu, Jul 20, 2017 at 7:49 PM, Eduardo Habkost wrote: > On Thu, Jul 20, 2017 at 05:09:11PM +0200, Markus Armbruster wrote: >> Amador Pahim writes: >> >> > On Thu, Jul 20, 2017 at 1:49 PM, Markus Armbruster >> > wrote: >> >> Amador Pahim writes: >> >> >> >>> Current implementation is broken.

Re: [Qemu-devel] [RFC PATCH for 2.11 00/23] Implementing FP16 for ARMv8.2 using SoftFloat2a and 3c

2017-07-20 Thread Aurelien Jarno
On 2017-07-20 16:04, Alex Bennée wrote: > I then implement a few random functions using the softfloat3c code. To > keep things clean the helper functions are all in advsimd_helper.c. As > the two implementations are sitting side by side we need to copy the > exception flags back and forth to ensure

Re: [Qemu-devel] [RFC PATCH for 2.11 15/23] target/arm/translate-a64.c: AdvSIMD scalar 2 register misc decode

2017-07-20 Thread Richard Henderson
On 07/20/2017 05:04 AM, Alex Bennée wrote: +for (pass = 0; pass < elements; pass++) { +TCGv_i32 tcg_op1 = tcg_temp_new_i32(); +TCGv_i32 tcg_res = tcg_temp_new_i32(); + +read_vec_element_i32(s, tcg_op1, rn, pass, MO_16); + +switch (fpopcode) { +default:

Re: [Qemu-devel] [RFC PATCH for 2.11 14/23] target/arm/translate-a64.c: add ARMv8.2 fadd scalar half-precision

2017-07-20 Thread Richard Henderson
On 07/20/2017 05:04 AM, Alex Bennée wrote: This brings in the initial decode skeleton and the helpers for a scalar half-precision fadd using SoftFloat3c. Signed-off-by: Alex Bennée --- target/arm/advsimd_helper.c | 15 target/arm/translate-a64.c | 60

Re: [Qemu-devel] [RFC PATCH for 2.11 13/23] target/arm/translate-a64.c: add FP16 FADD to AdvSIMD 3 Same

2017-07-20 Thread Richard Henderson
On 07/20/2017 05:04 AM, Alex Bennée wrote: Signed-off-by: Alex Bennée --- target/arm/helper-a64.h| 1 + target/arm/translate-a64.c | 3 +++ 2 files changed, 4 insertions(+) Implementation of the helper wound up somewhere else. r~

Re: [Qemu-devel] [RFC PATCH for 2.11 12/23] target/arm/translate-a64.c: add FP16 FAGCT to AdvSIMD 3 Same

2017-07-20 Thread Richard Henderson
On 07/20/2017 05:04 AM, Alex Bennée wrote: +static softfloat_flags softfloat_mapping_table[] = { +{ float_flag_inexact , softfloat_flag_inexact }, +{ float_flag_underflow, softfloat_flag_underflow }, +{ float_flag_overflow , softfloat_flag_overflow }, +{ float_flag_invalid , sof

Re: [Qemu-devel] Build failure on git master

2017-07-20 Thread Mark Cave-Ayland
On 19/07/17 18:09, Mark Cave-Ayland wrote: > Hi all, > > I see the following build failure here on git master with gcc 4.7.2: > > cc -I/home/build/src/qemu/git/qemu/block -Iblock > -I/home/build/src/qemu/git/qemu/tcg > -I/home/build/src/qemu/git/qemu/tcg/i386 > -I/home/build/src/qemu/git/qemu/li

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-20 Thread Phil Dennis-Jordan
On Thu, Jul 20, 2017 at 6:40 PM, Programmingkid wrote: > I noticed that Windows 2000 does not boot up in QEMU recently. After > bisecting the issue I found the offending commit: Ouch. I reckon we have 2 options for fixing this: 1. Export two FADTs, one ACPI 1.0, one ACPI 2.0. The latter would n

Re: [Qemu-devel] [PATCH V4 08/10] block/qcow2: start using the compress format extension

2017-07-20 Thread Eric Blake
On 07/20/2017 11:30 AM, Peter Lieven wrote: >> The new code is now unconditionally initializing with -15 instead of >> -12. Does that matter, or does decompression work regardless of window >> size used at creation, as long as the initialized size at decompression >> is at least as large? On the

Re: [Qemu-devel] [RFC PATCH for 2.11 05/23] softfloat3c: initial build machinery

2017-07-20 Thread Richard Henderson
On 07/20/2017 05:04 AM, Alex Bennée wrote: +# so they can still be linked when needed. We build these files surpressing so of the normal CFLAGS. "surpressing so" -> "suppressing some" Do we gain any confidence for our still supported but less tested 32-bit hosts (all of which do support a 64

Re: [Qemu-devel] [PATCH for-2.10] Use qemu_tolower() and qemu_toupper(), not tolower() and toupper()

2017-07-20 Thread Richard Henderson
On 07/20/2017 09:04 AM, Eric Blake wrote: And I found this in C11: 7.4 Character handling 1 The header declares several functions useful for classifying and mapping characters. 198) In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equa

[Qemu-devel] [PATCH v2 4/5] Raw Backend for UDST

2017-07-20 Thread anton . ivanov
From: Anton Ivanov Raw Socket Backend for Universal Datagram Socket Transport Signed-off-by: Anton Ivanov --- net/Makefile.objs | 2 +- net/clients.h | 3 ++ net/net.c | 1 + net/raw.c | 123 ++ qapi-schema.json |

[Qemu-devel] [PATCH v2 5/5] Migrate Datagram operation in socket transport to UDST

2017-07-20 Thread anton . ivanov
From: Anton Ivanov Migrate datagram operation to UDST if UDST is available. Signed-off-by: Anton Ivanov --- net/socket.c | 123 --- 1 file changed, 118 insertions(+), 5 deletions(-) diff --git a/net/socket.c b/net/socket.c index f85ef7d6

  1   2   3   4   >