[Qemu-devel] [PATCH QEMU] vmstate: Remove redefinition of VMSTATE_UINT32_ARRAY

2015-08-13 Thread Soren Brinkmann
The macro is defined twice in identical ways. Signed-off-by: Soren Brinkmann --- I have the feeling I'm missing a tiny one-letter difference or some ifdef, but I believe the mentioned macro is defined twice. Sören --- include/migration/vmstate.h | 3 --- 1 file changed, 3 deletions(-)

Re: [Qemu-devel] [Bug 1483070] [NEW] VIRTIO Sequential Write IOPS limits not working

2015-08-13 Thread Alberto Garcia
On Fri 14 Aug 2015 01:34:50 AM CEST, Peter Lieven wrote: >>> IOPS limit does not work for VIRTIO devices if the disk workload is >>> a sequential write. >> This is probably due to I/O request merging: >> >> Your benchmark application may generate 32 x 4KB write requests, but >> they are merged

Re: [Qemu-devel] [PATCH RFC] pseries: define coldplugged devices as "configured"

2015-08-13 Thread Bharata B Rao
On Thu, Aug 13, 2015 at 02:53:02PM +0200, Laurent Vivier wrote: > When a device is hotplugged, attach() sets "configured" to > false, waiting an action from the OS to configure it and then > to call ibm,configure-connector. On ibm,configure-connector, > the hypervisor sets "configured" to true. >

[Qemu-devel] [PATCH qemu v3] target-ppc: Define get_monitor_def

2015-08-13 Thread Alexey Kardashevskiy
At the moment get_monitor_def() prints only registers from monitor_defs. However there is a lot of BOOK3S SPRs which are not in the list and cannot be printed. This makes use of the new get_monitor_def() callback and prints all registered SPRs and fails on unregistered ones proving the user inform

Re: [Qemu-devel] [PATCH qemu] pseries: Update SLOF firmware image to qemu-slof-20150813

2015-08-13 Thread Alexey Kardashevskiy
On 08/13/2015 07:24 PM, Alexey Kardashevskiy wrote: The changes are: 1. GPT support; 2. Much faster VGA support. The full changelog is: > Add missing half word access case to _FASTRMOVE and _FASTMOVE > Remove unused RMOVE64 stub > fbuffer: Implement RFILL as an accelerated primitive

Re: [Qemu-devel] Plan for using softmmu with linux-user

2015-08-13 Thread gchen gchen
Firstly, thank you very much for your details information! Based on your details information, for me, I guess it is not quite difficult for me to implement it. :-) On 2015年08月14日 00:55, Richard Henderson wrote: > > My best guess that this is 3-4 months of work. > After communicated with my comp

Re: [Qemu-devel] Plan for using softmmu with linux-user

2015-08-13 Thread gchen gchen
Firstly, thank you very much for your details information! Based on yourdetails information, for me, I guess it is not quite difficult for me toimplement it. :-)On 2015年08月14日 00:55, Richard Henderson wrote:>> My best guess that this is 3-4 months of work.>After communicated with my company rel

Re: [Qemu-devel] [PATCH v6 00/10] For QEMU 2.5: Add a netfilter object and netbuffer filter

2015-08-13 Thread Yang Hongyang
Hi Jason, Sorry for the late reply, just come back from vacation, and I won't have much time until after kvm forum 2015, anyway, I will address the comments and send a v7 if I have time. On 08/10/2015 05:17 PM, Jason Wang wrote: On 08/07/2015 10:46 AM, Yang Hongyang wrote: Add multiqueue s

Re: [Qemu-devel] about the patch kvmclock Ensure proper env->tsc value for kvmclock_current_nsec calculation

2015-08-13 Thread Li, Liang Z
> On Thu, Aug 13, 2015 at 01:25:29AM +, Li, Liang Z wrote: > > Hi Paolo & Marcelo, > > > > Could please point out what issue the patch 317b0a6d8ba44e try to fix? > > I > found in live migration the cpu_synchronize_all_states will be called twice, > and it will take more than 1 ms sometime

Re: [Qemu-devel] [PATCH v4 1/3] linux-headers: Add eeh.h

2015-08-13 Thread Gavin Shan
On Thu, Aug 13, 2015 at 11:42:59AM +1000, David Gibson wrote: >On Thu, Aug 13, 2015 at 11:30:37AM +1000, Gavin Shan wrote: >> On Wed, Aug 12, 2015 at 12:00:35PM +1000, Alexey Kardashevskiy wrote: >> >On 08/11/2015 07:11 PM, Peter Maydell wrote: >> >>On 10 August 2015 at 08:13, Gavin Shan wrote: >>

Re: [Qemu-devel] [Bug 1483070] [NEW] VIRTIO Sequential Write IOPS limits not working

2015-08-13 Thread Peter Lieven
Am 10.08.2015 um 11:59 schrieb Stefan Hajnoczi : > On Mon, Aug 10, 2015 at 12:15:25AM -, James Watson wrote: >> IOPS limit does not work for VIRTIO devices if the disk workload is a >> sequential write. >> >> To confirm: >> IDE disk devices - the IOPS limit works fine. Disk transfer speed l

Re: [Qemu-devel] [PATCHv2] macio: handle non-block ATAPI DMA transfers the same as block DMA transfers

2015-08-13 Thread John Snow
On 08/13/2015 06:03 PM, Mark Cave-Ayland wrote: > On 01/08/15 19:33, Aurelien Jarno wrote: > >> On 2015-08-01 17:54, Mark Cave-Ayland wrote: >>> The existing code incorrectly changes the dma_active flag when a non-block >>> transfer has completed leading to a hang on newer versions of Linux beca

Re: [Qemu-devel] [PATCH qemu v2] target-ppc: Define get_monitor_def

2015-08-13 Thread David Gibson
On Fri, Aug 14, 2015 at 01:52:18AM +1000, Alexey Kardashevskiy wrote: > At the moment get_monitor_def() prints only registers from monitor_defs. > However there is a lot of BOOK3S SPRs which are not in the list and > cannot be printed. > > This makes use of the new get_monitor_def() callback and p

Re: [Qemu-devel] [PATCH 0/4] target-sparc: Update to use VMStateDescription

2015-08-13 Thread Mark Cave-Ayland
On 10/08/15 13:34, Peter Maydell wrote: > This patchset updates target-sparc to use VMStateDescription > rather than hand-written save/load functions. (This and CRIS > are the last two targets still using the old approach.) > > It's based on some patches from back in 2012 by Juan which > I've upd

Re: [Qemu-devel] about the patch kvmclock Ensure proper env->tsc value for kvmclock_current_nsec calculation

2015-08-13 Thread Marcelo Tosatti
On Thu, Aug 13, 2015 at 01:25:29AM +, Li, Liang Z wrote: > Hi Paolo & Marcelo, > > Could please point out what issue the patch 317b0a6d8ba44e try to fix? I > found in live migration the cpu_synchronize_all_states will be called twice, > and it will take more than 1 ms sometimes. I try t

Re: [Qemu-devel] [PATCHv2] macio: handle non-block ATAPI DMA transfers the same as block DMA transfers

2015-08-13 Thread Mark Cave-Ayland
On 01/08/15 19:33, Aurelien Jarno wrote: > On 2015-08-01 17:54, Mark Cave-Ayland wrote: >> The existing code incorrectly changes the dma_active flag when a non-block >> transfer has completed leading to a hang on newer versions of Linux because >> the >> IDE and DMA engines deadlock waiting for e

Re: [Qemu-devel] [PATCH RFC 00/10] Enable repository wide style checking

2015-08-13 Thread Peter Maydell
On 13 August 2015 at 19:27, Eric Blake wrote: > It's worth asking the gnulib folks for an opinion on whether relaxing > the license on maint.mk and GNUmakefile to explicitly go back to GPLv2+, > and/or explicitly add some explicit exception clause like gcc that makes > it clear that using these fi

Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-13 Thread Emilio G. Cota
On Thu, Aug 13, 2015 at 10:13:32 +0200, Paolo Bonzini wrote: > On 12/08/2015 22:37, Emilio G. Cota wrote: > > > page_find is reading the radix tree outside all locks, so it has to > > > use the RCU primitives. It does not need RCU critical sections > > > because the PageDescs are never removed, so

Re: [Qemu-devel] [PATCH RFC 00/10] Enable repository wide style checking

2015-08-13 Thread Eric Blake
[adding the gnulib list] On 08/13/2015 11:53 AM, Peter Maydell wrote: > On 31 July 2015 at 17:30, Daniel P. Berrange wrote: >> Historically QEMU has relied on the checkpatch.pl script, >> borrowed from Linux, to check coding style compliance on >> patches which are submitted. For what it is desig

Re: [Qemu-devel] [PATCH for-2.5 08/30] m68k: update CPU flags management

2015-08-13 Thread Laurent Vivier
Le 12/08/2015 07:12, Richard Henderson a écrit : > On 08/09/2015 01:13 PM, Laurent Vivier wrote: >> @@ -798,9 +796,9 @@ void HELPER(mac_set_flags)(CPUM68KState *env, > >> @@ -1706,16 +1745,18 @@ DISAS_INSN(branch) >> /* bsr */ >> gen_push(s, tcg_const_i32(s->pc)); >> }

Re: [Qemu-devel] [PATCH RFC 02/10] maint: remove double semicolons in many files

2015-08-13 Thread Peter Maydell
On 31 July 2015 at 17:30, Daniel P. Berrange wrote: > A number of source files have statements accidentally > terminated by a double semicolon - eg 'foo = bar;;'. > This is harmless but a mistake none the less. > > The tcg/ia64/tcg-target.c file is whitelisted because > it has valid use of ';;' in

Re: [Qemu-devel] [PATCH RFC 00/10] Enable repository wide style checking

2015-08-13 Thread Peter Maydell
On 31 July 2015 at 17:30, Daniel P. Berrange wrote: > Historically QEMU has relied on the checkpatch.pl script, > borrowed from Linux, to check coding style compliance on > patches which are submitted. For what it is designed for, > it does a reasonable job, but I feel that QEMU would benefit > fr

Re: [Qemu-devel] MIPS: reading kernel memory when guest Linux is in user mode

2015-08-13 Thread Igor R
>> I try to use cpu_memory_rw_debug() to read from 0x8xxx kernel virtual >> address, when the guest is in user mode. Obviously, it fails. >> Is it possible to modify some control registers to allow such an access? I >> tried to set/clear the kernel mode bits in CP0_Status, but it doesn't help.

Re: [Qemu-devel] Win32 stdio not working if SDL is enabled

2015-08-13 Thread Stefan Weil
Am 13.08.2015 um 14:06 schrieb Daniel P. Berrange: > When debugging some patches on Windows, I discovered that nothing printed > to stderr ever appears on the console. Eventually I discovered that if I > build with --disable-sdl, then stderr appears just fine. > > Looking at the code in vl.c I see

Re: [Qemu-devel] [ARM SMBIOS V4 PATCH 1/2] smbios: add smbios 3.0 support

2015-08-13 Thread Laszlo Ersek
On 08/13/15 19:09, Wei Huang wrote: > This patch adds support for SMBIOS 3.0 entry point. When caller invokes > smbios_set_defaults(), it can specify entry point as 2.1 or 3.0. Then > smbios_get_tables() will return the entry point table in right format. > > Acked-by: Gabriel Somlo > Tested-by: G

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-08-13 Thread Peter Maydell
On 22 July 2015 at 17:43, Peter Maydell wrote: > This series makes a start at cleaning up some of our headers > to avoid the common problem of header files including qemu-common.h > (which then in turn can lead to awkward circular includes). The general consensus here seems to be that patches 1-9

Re: [Qemu-devel] [PATCH for-2.5] piix: Document coreboot-specific RAM size config register

2015-08-13 Thread Richard Smith
On 08/09/2015 09:48 PM, Ed Swierk wrote: References to coreboot commits: * Original commit adding code reading register offsets 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x56, 0x57 to Intel 440bx code in coreboot: cb8eab482ff09ec256456312ef2d6e7710123551 I have vague recollection I may have been re

[Qemu-devel] [ARM SMBIOS V4 PATCH 2/2] smbios: implement smbios support for mach-virt

2015-08-13 Thread Wei Huang
This patch generates smbios tables for ARM mach-virt. Also add CONFIG_SMBIOS=y for ARM default config. Acked-by: Gabriel Somlo Tested-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Shannon Zhao Tested-by: Leif Lindholm Signed-off-by: Wei Huang --- default-configs/arm-softmmu.mak |

[Qemu-devel] [PATCH 1/9] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb

2015-08-13 Thread Peter Maydell
A spurious trailing "\n" in the gdb syscall format string used for SYS_WRITE0 meant that gdb would reject the remote syscall, with the effect that the output from the guest was silently dropped. Remove the newline so that gdb accepts the packet. Cc: qemu-sta...@nongnu.org --- target-arm/arm-semi.

[Qemu-devel] [ARM SMBIOS V4 PATCH 0/2] SMBIOS Support for ARM

2015-08-13 Thread Wei Huang
SMBIOS tables present userful system hardware info to management applications, such as DMI tools. Even though SMBIOS was originally developed for Intel x86, it has been extended to both Itanium and ARM (32bit & 64bit). More and more ARM server releases, such as RHEL Server for ARM, start to integ

[Qemu-devel] [ARM SMBIOS V4 PATCH 1/2] smbios: add smbios 3.0 support

2015-08-13 Thread Wei Huang
This patch adds support for SMBIOS 3.0 entry point. When caller invokes smbios_set_defaults(), it can specify entry point as 2.1 or 3.0. Then smbios_get_tables() will return the entry point table in right format. Acked-by: Gabriel Somlo Tested-by: Gabriel Somlo Tested-by: Leif Lindholm Signed-o

[Qemu-devel] Plan for using softmmu with linux-user

2015-08-13 Thread Richard Henderson
[ Re-adding qemu-devel so that the plan can be critiqued. ] On 08/13/2015 07:32 AM, Chen Gang wrote: > On 8/13/15 22:05, Richard Henderson wrote: >> On 08/13/2015 12:20 AM, gchen gchen wrote: >>> Excuse me, I am not quite familiar with it, could any members provide >>> more details about "use soft

[Qemu-devel] [PATCH 7/9] target-arm/arm-semi.c: Implement A64 specific SyncCacheRange call

2015-08-13 Thread Peter Maydell
The A64 semihosting ABI defines a new call SyncCacheRange for doing a 'clean D-cache and invalidate I-cache' sequence. Since QEMU doesn't implement caches, we can implement this as a nop. Signed-off-by: Peter Maydell --- target-arm/arm-semi.c | 10 ++ 1 file changed, 10 insertions(+) di

[Qemu-devel] [PATCH 3/9] gdbstub: Implement gdb_do_syscallv()

2015-08-13 Thread Peter Maydell
Implement a variant of the existing gdb_do_syscall() which takes a va_list. Signed-off-by: Peter Maydell --- gdbstub.c | 14 ++ include/exec/gdbstub.h | 27 +++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub.c

[Qemu-devel] [PATCH 4/9] target-arm/arm-semi.c: Factor out repeated 'return env->regs[0]'

2015-08-13 Thread Peter Maydell
Factor out a repeated pattern in the semihosting code: gdb_do_syscall(arm_semi_cb, "system,%s", arg0, (int)arg1+1); /* arm_semi_cb sets env->regs[0] to the syscall return value */ return env->regs[0]; For A64 the return value will go in a different register; pull the sequence out into

[Qemu-devel] [PATCH 5/9] include/exec/softmmu-semi.h: Add support for 64-bit values

2015-08-13 Thread Peter Maydell
Add support for getting and setting 64-bit values in the softmmu semihosting support functions. This will be needed for 64-bit ARM semihosting. Signed-off-by: Peter Maydell --- include/exec/softmmu-semi.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/exec/softmm

[Qemu-devel] [PATCH 6/9] target-arm/arm-semi.c: Support widening APIs to 64 bits

2015-08-13 Thread Peter Maydell
The 64-bit A64 semihosting API has some pervasive changes from the 32-bit version: * all parameter blocks are arrays of 64-bit values, not 32-bit * the semihosting call number is passed in W0 * the return value is a 64-bit value in X0 Implement the necessary handling for this widening. Signed-

[Qemu-devel] [PATCH 9/9] target-arm: Wire up HLT 0xf000 as the A64 semihosting instruction

2015-08-13 Thread Peter Maydell
For the A64 instruction set, the semihosting call instruction is 'HLT 0xf000'. Wire this up to call do_arm_semihosting() if semihosting is enabled. Signed-off-by: Peter Maydell --- linux-user/main.c | 3 +++ target-arm/cpu.h | 1 + target-arm/helper-a64.c| 6 ++ tar

[Qemu-devel] [PATCH 8/9] target-arm/arm-semi.c: SYS_EXIT on A64 takes a parameter block

2015-08-13 Thread Peter Maydell
The A64 semihosting API changes the interface for SYS_EXIT so that instead of taking a single exception type in a register, it takes a parameter block containing the exception type and a sub-code. Implement this. Signed-off-by: Peter Maydell --- target-arm/arm-semi.c | 21 ++---

[Qemu-devel] [PATCH 2/9] target-arm: Improve semihosting debug prints

2015-08-13 Thread Peter Maydell
From: Christopher Covington Print semihosting debugging information before the do_arm_semihosting() call so that angel_SWIreason_ReportException, which causes the function to not return, gets the same debug prints as other semihosting calls. Also print out the semihosting call number. Signed-off

[Qemu-devel] [PULL 2/4] target-mips: simplify LWL/LDL mask generation

2015-08-13 Thread Leon Alrae
From: Aurelien Jarno The LWL/LDL instructions mask the GPR with a mask depending on the address alignement. It is currently computed by doing: mask = 0x7fffull >> (t1 ^ 63) It's simpler to generate it by doing: mask = ~(-1 << t1) It uses one TCG instruction less, and it av

[Qemu-devel] [PULL 4/4] target-mips: Use CPU_LOG_INT for logging related to interrupts

2015-08-13 Thread Leon Alrae
From: Richard Henderson There are now no unconditional uses of qemu_log in the subdirectory. Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno Reviewed-by: Leon Alrae Signed-off-by: Leon Alrae --- target-mips/helper.c| 30 +++--- target-mips/op_helper.

[Qemu-devel] [PULL 3/4] hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accesses

2015-08-13 Thread Leon Alrae
From: Peter Maydell The LDMA and COP memory regions represent four 32 bit registers each, but the memory regions themselves are 0x100 bytes large. Add guards to the read and write accessors so that bogus accesses beyond the four defined registers don't just run off the end of the bonldma and bonc

[Qemu-devel] [PULL 1/4] target-mips: update mips32r5-generic into P5600

2015-08-13 Thread Leon Alrae
From: Yongbok Kim As full specification of P5600 is available, mips32r5-generic should be renamed to P5600 and corrected as its intention. Correct PRid and detail of configuration. Features which are not currently supported are described as FIXME. Fix Config.MM bit location Signed-off-by: Yongb

[Qemu-devel] [PULL 0/4] target-mips queue

2015-08-13 Thread Leon Alrae
the git repository at: git://github.com/lalrae/qemu.git tags/mips-20150813 for you to fetch changes up to c85570163bdf1ba29cb52a63f22ff1c48f1b9398: target-mips: Use CPU_LOG_INT for logging related to interrupts (2015-08-13 16:22:53 +0100

Re: [Qemu-devel] [PULL 00/24] virtio,pc,acpi fixes, cleanups

2015-08-13 Thread Peter Maydell
On 13 August 2015 at 13:14, Michael S. Tsirkin wrote: > The following changes since commit 5c79ae3615d5dafdf1bb09b7a356a3a005714e3d: > > Update version for v2.4.0 release (2015-08-11 15:30:34 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.

[Qemu-devel] [PATCH 0/9] target-arm: Implement A64 semihosting

2015-08-13 Thread Peter Maydell
This patch series implements support for semihosting for the 64-bit ARM instruction set. It owes a significant debt to the patches sent earlier by Christopher Covington (and with code written by Derek Hower). However, it is a full from-scratch rewrite (since there were several things which I felt

Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 17:32, Peter Maydell wrote: >> > TBs are physically-tagged so invalidates are not too frequent unless the >> > guest does self-modifying code or swaps. They shouldn't be a source of >> > tb_lock contention except if you do SMC (not just dynamic recompilation: >> > really self-modif

[Qemu-devel] [PATCH qemu v2] target-ppc: Define get_monitor_def

2015-08-13 Thread Alexey Kardashevskiy
At the moment get_monitor_def() prints only registers from monitor_defs. However there is a lot of BOOK3S SPRs which are not in the list and cannot be printed. This makes use of the new get_monitor_def() callback and prints all registered SPRs and fails on unregistered ones proving the user inform

Re: [Qemu-devel] [PATCH for-2.5 7/8] s390x: Migrate guest storage keys (initial memory only)

2015-08-13 Thread Christian Borntraeger
Am 21.07.2015 um 12:37 schrieb David Hildenbrand: >> >> So if I've got this code right, you send here a "header" that announces >> a packet with all pages ... >> >>> +while (handled_count < total_count) { >>> +cur_count = MIN(total_count - handled_count, >>> S390_SKEYS_BUFFER_SIZE); >>

Re: [Qemu-devel] MIPS: reading kernel memory when guest Linux is in user mode

2015-08-13 Thread Peter Maydell
On 13 August 2015 at 16:23, Igor R wrote: > Hello, > > I try to use cpu_memory_rw_debug() to read from 0x8xxx kernel virtual > address, when the guest is in user mode. Obviously, it fails. > Is it possible to modify some control registers to allow such an access? I > tried to set/clear the ker

Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-13 Thread Peter Maydell
On 13 August 2015 at 15:39, Paolo Bonzini wrote: > TBs are physically-tagged so invalidates are not too frequent unless the > guest does self-modifying code or swaps. They shouldn't be a source of > tb_lock contention except if you do SMC (not just dynamic recompilation: > really self-modifying c

Re: [Qemu-devel] [PATCH v3 0/5] block: Drop BDS.filename

2015-08-13 Thread Kevin Wolf
Am 12.08.2015 um 17:48 hat Max Reitz geschrieben: > The BDS filename field is generally only used when opening disk images > or emitting error or warning messages, the only exception to this rule > is the map command of qemu-img. However, using exact_filename there > instead should not be a problem

Re: [Qemu-devel] [PATCH v3 4/5] block: Drop BlockDriverState.filename

2015-08-13 Thread Kevin Wolf
Am 12.08.2015 um 17:48 hat Max Reitz geschrieben: > That field is now only used during initialization of BlockDriverStates > (opening images) and for error or warning messages. Performance is not > that much of an issue here, so we can drop the field and replace its use > by a call to bdrv_filename

[Qemu-devel] MIPS: reading kernel memory when guest Linux is in user mode

2015-08-13 Thread Igor R
Hello, I try to use cpu_memory_rw_debug() to read from 0x8xxx kernel virtual address, when the guest is in user mode. Obviously, it fails. Is it possible to modify some control registers to allow such an access? I tried to set/clear the kernel mode bits in CP0_Status, but it doesn't help. Tha

Re: [Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread.

2015-08-13 Thread Frederic Konrad
On 13/08/2015 16:58, Paolo Bonzini wrote: On 13/08/2015 16:41, Frederic Konrad wrote: One issue here is that when tcg_cpu_exec returns EXCP_HALTED, the function keeps looping. There is no need to set cpu->exit_request in that case, since in fact there is no request pending, so the while loop p

Re: [Qemu-devel] [PATCH v3 2/5] block: Avoid BlockDriverState.filename

2015-08-13 Thread Kevin Wolf
Am 12.08.2015 um 17:48 hat Max Reitz geschrieben: > In places which directly pass a filename to the OS, we should not use > the filename field at all but exact_filename instead (although the > former currently equals the latter if that is set). > > In qemu-img's map command, we should be using the

Re: [Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread.

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 16:41, Frederic Konrad wrote: >>> >> One issue here is that when tcg_cpu_exec returns EXCP_HALTED, the >> function keeps looping. There is no need to set cpu->exit_request in >> that case, since in fact there is no request pending, so the while loop >> probably should be an "if". >

Re: [Qemu-devel] [Consult] tilegx: About floating point instructions

2015-08-13 Thread Chen Gang
Hello all: For me, I guess for single insns, they are simple, and each calculation insns group can not be mixed with each other. So current implementation should be OK. For double insns, I guess, only mul calculation can be mixed with other calculation groups (add/sub groups or int2float/double g

Re: [Qemu-devel] [PATCH for-2.5 7/8] s390x: Migrate guest storage keys (initial memory only)

2015-08-13 Thread Jason J. Herne
On 07/21/2015 06:37 AM, David Hildenbrand wrote: So if I've got this code right, you send here a "header" that announces a packet with all pages ... +while (handled_count < total_count) { +cur_count = MIN(total_count - handled_count, S390_SKEYS_BUFFER_SIZE); + +ret = skeycl

Re: [Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread.

2015-08-13 Thread Frederic Konrad
On 13/08/2015 13:17, Paolo Bonzini wrote: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: +while (!cpu->exit_request) { qemu_clock_enable(QEMU_CLOCK_VIRTUAL, (cpu->singlestep_enabled & SSTEP_NOTIMER) == 0); @@ -1507,7 +1480,7 @@ static void tcg

Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 15:32, Frederic Konrad wrote: >> I've now extracted parts of your patch "tcg: protect TBContext with >> tb_lock" into a separate "tcg: move tb_find_fast outside the tb_lock >> critical section" that also applies to user-mode emulation. That way I >> get good scalability on Dhrystone,

[Qemu-devel] [PATCH] vl: prevent SDL replacing 'main' on win32 platforms

2015-08-13 Thread Daniel P. Berrange
The SDL provided 'main' replacement on Win32 redirects stdout and stderr to text files, which in turn prevents QEMU from using the console for the monitor (eg -monitor stdio breaks), and also hides error messages and -help output from the user. Block SDL's replacement by simply undefining the 'mai

Re: [Qemu-devel] Win32 stdio not working if SDL is enabled

2015-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2015 at 01:06:43PM +0100, Daniel P. Berrange wrote: > When debugging some patches on Windows, I discovered that nothing printed > to stderr ever appears on the console. Eventually I discovered that if I > build with --disable-sdl, then stderr appears just fine. > > Looking at the c

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

2015-08-13 Thread Peter Maydell
t; are available in the git repository at: > > git://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20150813 > > for you to fetch changes up to f7a6785e12d834d05200b0595070db453344b25d: > > i.MX: Fix UART driver to work with unitialize

Re: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 15:14, Frederic Konrad wrote: > >> Signed-off-by: Paolo Bonzini >> --- >> cpu-exec.c | 6 ++ >> 1 file changed, 6 insertions(+) > What about the icount part in CPUState and the tb_start/end ? > Can't this be removed as well? Yes, here I'm just dropping the parts that needs

Re: [Qemu-devel] [PATCH] block/raw-posix: Use raw_normalize_devicepath()

2015-08-13 Thread Kevin Wolf
Am 12.08.2015 um 17:33 hat Max Reitz geschrieben: > The filename given to qemu_open() in block/raw-posix.c should generally > have been processed by raw_normalize_devicepath(); unless we are only > probing (in which case the caller often checks whether the file is a > block device or not, and this

Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-13 Thread Frederic Konrad
On 13/08/2015 14:59, Paolo Bonzini wrote: On 13/08/2015 14:51, Frederic Konrad wrote: diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 77bbff2..56b1f4d 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -285,7 +285,10 @@ struct CPUState { void *env_ptr; /* CPUArchState *

Re: [Qemu-devel] [PATCH v11 0/5] Update tests/qemu-iotests failing cases for the s390 platform

2015-08-13 Thread Kevin Wolf
Am 03.07.2015 um 09:28 hat Bo Tu geschrieben: > Bo Tu (5): > qemu-iotests: qemu machine type support > qemu-iotests: disable default qemu devices for cross-platform > compatibility > qemu-iotests: s390x: fix test 041 and 055 > qemu-iotests: s390x: fix test 049, reject negative sizes in

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-13 Thread Frederic Konrad
On 13/08/2015 15:12, Paolo Bonzini wrote: On 13/08/2015 14:17, Frederic Konrad wrote: diff --git a/linux-user/main.c b/linux-user/main.c index fdee981..fd06ce9 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -107,7 +107,7 @@ static int pending_cpus; /* Make sure everything is in a

Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable.

2015-08-13 Thread Frederic Konrad
On 13/08/2015 15:08, Paolo Bonzini wrote: On 13/08/2015 15:05, Frederic Konrad wrote: This removes tcg_halt_cond global variable. We need one QemuCond per virtual cpu for multithread TCG. Signed-off-by: KONRAD Frederic Message-Id: <1439220437-23957-9-git-send-email-fred.kon...@greensocs.com>

Re: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY

2015-08-13 Thread Frederic Konrad
On 12/08/2015 18:40, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- cpu-exec.c | 6 ++ 1 file changed, 6 insertions(+) What about the icount part in CPUState and the tb_start/end ? Can't this be removed as well? Fred diff --git a/cpu-exec.c b/cpu-exec.c index 599e64d..bde5fd1 1

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 14:17, Frederic Konrad wrote: >> diff --git a/linux-user/main.c b/linux-user/main.c >> index fdee981..fd06ce9 100644 >> --- a/linux-user/main.c >> +++ b/linux-user/main.c >> @@ -107,7 +107,7 @@ static int pending_cpus; >> /* Make sure everything is in a consistent state for callin

Re: [Qemu-devel] [PATCH v7 04/11] target-mips: improve exception handling

2015-08-13 Thread Leon Alrae
On 10/07/2015 10:57, Pavel Dovgalyuk wrote: > @@ -2364,14 +2363,12 @@ static void gen_st_cond (DisasContext *ctx, uint32_t > opc, int rt, > #if defined(TARGET_MIPS64) > case OPC_SCD: > case R6_OPC_SCD: > -save_cpu_state(ctx, 1); > op_st_scd(t1, t0, rt, ctx); >

Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable.

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 15:05, Frederic Konrad wrote: >> >> >> This removes tcg_halt_cond global variable. >> We need one QemuCond per virtual cpu for multithread TCG. >> >> Signed-off-by: KONRAD Frederic >> Message-Id: <1439220437-23957-9-git-send-email-fred.kon...@greensocs.com> >> [Keep tcg_halt_cond f

Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable.

2015-08-13 Thread Frederic Konrad
On 12/08/2015 18:40, Paolo Bonzini wrote: From: KONRAD Frederic This removes tcg_halt_cond global variable. We need one QemuCond per virtual cpu for multithread TCG. Signed-off-by: KONRAD Frederic Message-Id: <1439220437-23957-9-git-send-email-fred.kon...@greensocs.com> [Keep tcg_halt_cond fo

Re: [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock.

2015-08-13 Thread Frederic Konrad
On 13/08/2015 15:01, Paolo Bonzini wrote: +tb_lock(); tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, max_cycles | CF_NOCACHE); tb_gen_code() calls tb_alloc() which calls tb_flush() we end in a double tb_lock here. But that's probably not r

Re: [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock.

2015-08-13 Thread Paolo Bonzini
> > +tb_lock(); > > tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, > >max_cycles | CF_NOCACHE); > > tb_gen_code() calls tb_alloc() which calls tb_flush() we end in a double > tb_lock here. > But that's probably not really important here as w

Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 14:51, Frederic Konrad wrote: >> diff --git a/include/qom/cpu.h b/include/qom/cpu.h >> index 77bbff2..56b1f4d 100644 >> --- a/include/qom/cpu.h >> +++ b/include/qom/cpu.h >> @@ -285,7 +285,10 @@ struct CPUState { >> void *env_ptr; /* CPUArchState */ >> struct Translati

Re: [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock.

2015-08-13 Thread Frederic Konrad
On 12/08/2015 18:41, Paolo Bonzini wrote: From: KONRAD Frederic This protects TBContext with tb_lock to make tb_* thread safe. We can still have issue with tb_flush in case of multithread TCG: another CPU can be executing code during a flush. This can be fixed later by making all other TCG th

[Qemu-devel] [PATCH RFC] pseries: define coldplugged devices as "configured"

2015-08-13 Thread Laurent Vivier
When a device is hotplugged, attach() sets "configured" to false, waiting an action from the OS to configure it and then to call ibm,configure-connector. On ibm,configure-connector, the hypervisor sets "configured" to true. In case of coldplugged device, attach() sets "configured" to false, but fi

Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-13 Thread Frederic Konrad
On 12/08/2015 18:41, Paolo Bonzini wrote: softmmu requires more functions to be thread-safe, because translation blocks can be invalidated from e.g. notdirty callbacks. Probably the same holds for user-mode emulation, it's just that no one has ever tried to produce a coherent locking there. Thi

Re: [Qemu-devel] [PATCH 1/5] migration/ram.c: Use RAMBlock rather than MemoryRegion

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 12:51, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > RAM migration mainly works on RAMBlocks but in a few places > uses data from MemoryRegions to access the same information that's > already held in RAMBlocks; clean it up just to avoid the > MemoryRegio

[Qemu-devel] [PULL 24/24] MAINTAINERS: list smbios maintainers

2015-08-13 Thread Michael S. Tsirkin
Now that smbios has its own directory, list its maintainers. Same people as ACPI so just reuse that entry. Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 978b717..a059d5d 100644 --- a/MAINTA

[Qemu-devel] [PULL 21/24] smbios: extract x86 smbios building code into a function

2015-08-13 Thread Michael S. Tsirkin
From: Wei Huang This patch extracts out the procedure of buidling x86 SMBIOS tables into a dedicated function. Acked-by: Gabriel Somlo Tested-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Tested-by: Leif Lindholm Signed-off-by: Wei Huang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael

Re: [Qemu-devel] [PATCH 4/5] migration: size_t'ify some of qemu-file

2015-08-13 Thread zhanghailiang
On 2015/8/13 18:51, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" This is a start on using size_t more in qemu-file and friends; it fixes up QEMUFilePutBufferFunc and QEMUFileGetBufferFunc to take size_t lengths and return ssize_t return values (like read(2)) and fixes up a

[Qemu-devel] [PULL 19/24] virtio-net: remove useless codes

2015-08-13 Thread Michael S. Tsirkin
From: Jason Wang After commit 40bad8f3deba15e2074ff34cfe923c12916b1cc5("virtio-net: fix used len for tx"), async_tx.len was no longer used afterwards. So remove useless codes with it. Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/v

[Qemu-devel] [PULL 23/24] smbios: move smbios code into a common folder

2015-08-13 Thread Michael S. Tsirkin
From: Wei Huang To share smbios among different architectures, this patch moves SMBIOS code (smbios.c and smbios.h) from x86 specific folders into new hw/smbios directories. As a result, CONFIG_SMBIOS=y is defined in x86 default config files. Acked-by: Gabriel Somlo Tested-by: Gabriel Somlo Re

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-13 Thread Frederic Konrad
On 12/08/2015 18:40, Paolo Bonzini wrote: From: KONRAD Frederic spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode so better using QemuMutex directly in thi

[Qemu-devel] [PULL 22/24] smbios: remove dependency on x86 e820 tables

2015-08-13 Thread Michael S. Tsirkin
From: Wei Huang Current smbios builds type 19 table from e820, which is x86 specific. This patch removes smbios' dependency on e820 by passing an array of memory area to smbios_get_tables(). Acked-by: Gabriel Somlo Tested-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Tested-by: Leif Lindholm S

[Qemu-devel] [PULL 17/24] pc: Remove redundant arguments from pc_memory_init()

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost Remove arguments that can be found in PCMachineState. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 2 -- hw/i386/pc.c | 18 +- hw/i386/pc_piix.c| 1 - hw/i386/pc

[Qemu-devel] [PULL 18/24] pci: allow 0 address for PCI IO/MEM regions

2015-08-13 Thread Michael S. Tsirkin
From: Laurent Vivier Some kernels program a 0 address for io regions. PCI 3.0 spec section 6.2.5.1 doesn't seem to disallow this. based on patch by Michael Roth Add pci_allow_0_addr in MachineClass to conditionally allow addr 0 for pseries, as this can break other architectures. This patch al

[Qemu-devel] [PULL 13/24] pc: Move {above, below}_4g_mem_size variables to PCMachineState

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost This will make the info readily available for the other initialization functions, and will allow us to simplify their argument list. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 1 + hw/i386

Re: [Qemu-devel] [PATCH 5/5] migration: qemu-file more size_t'ifying

2015-08-13 Thread zhanghailiang
On 2015/8/13 18:51, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" This time convert the external functions: qemu_get_buffer, qemu_peek_buffer qemu_put_buffer and qemu_put_buffer_async Signed-off-by: Dr. David Alan Gilbert --- Reviewed-by: zhanghailiang includ

[Qemu-devel] [PULL 15/24] pc: Remove redundant arguments from *load_linux()

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost Remove arguments that can be found in PCMachineState. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 5 + hw/i386/pc.c | 28 hw/i386/pc_piix.c| 6

[Qemu-devel] [PULL 14/24] pc: Use PCMachineState as pc_guest_info_init() argument

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 3 +-- hw/i386/pc.c | 7 +++ hw/i386/pc_piix.c| 3 +-- hw/i386/pc_q35.c | 3 +-- 4 files changed, 6 insertions(+), 10 deletions

[Qemu-devel] [PULL 11/24] pc: Use PCMachineState for pc_cmos_init() argument

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost pc_cmos_init() already expects a PCMachineState object, there's no point in upcasting it to MachineState before calling the function. While doing it, reorder the arguments so PCMachineState is the first function argument. Signed-off-by: Eduardo Habkost Reviewed-by: Michae

[Qemu-devel] [PULL 09/24] pc: Eliminate pc_common_machine_options()

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost All TYPE_PC_MACHINE subclasses call pc_common_machine_options(). TYPE_PC_MACHINE can simply initialize the common options on class_init directly. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h |

[Qemu-devel] [PULL 10/24] pc: Eliminate pc_default_machine_options()

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost The only PC machines that didn't call pc_default_machine_options() were isaps and xenfv. Both were already overwriting max_cpus, and only isapc was not overwriting hot_add_cpu. After making isapc set hot_add_cpu to NULL, we can move the pc_default_machine_options() code the

[Qemu-devel] [PULL 12/24] pc: Use PCMachineState for pc_memory_init() argument

2015-08-13 Thread Michael S. Tsirkin
From: Eduardo Habkost pc_memory_init() already expects a PCMachineState object, there's no point in upcasting it to MachineState before calling the function. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 2 +- hw/i

  1   2   >