Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution

2015-08-10 Thread Frederic Konrad
On 10/08/2015 18:15, Paolo Bonzini wrote: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: void qemu_mutex_lock_iothread(void) { -atomic_inc(&iothread_requesting_mutex); -/* In the simple case there is no need to bump the VCPU thread out of - * TCG code execution. - */

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-10 Thread Frederic Konrad
On 10/08/2015 18:36, Paolo Bonzini wrote: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: diff --git a/cpu-exec.c b/cpu-exec.c index f3358a9..a012e9d 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -131,6 +131,8 @@ static void init_delay_params(SyncClocks *sc, const CPUState *cpu) void cpu

Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG.

2015-08-10 Thread Frederic Konrad
On 11/08/2015 08:15, Benjamin Herrenschmidt wrote: On Mon, 2015-08-10 at 17:26 +0200, fred.kon...@greensocs.com wrote: From: KONRAD Frederic This is the 7th round of the MTTCG patch series. It can be cloned from: g...@git.greensocs.com:fkonrad/mttcg.git branch multi_tcg_v7. This patch-set t

Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG.

2015-08-10 Thread Benjamin Herrenschmidt
On Mon, 2015-08-10 at 17:26 +0200, fred.kon...@greensocs.com wrote: > From: KONRAD Frederic > > This is the 7th round of the MTTCG patch series. > > > It can be cloned from: > g...@git.greensocs.com:fkonrad/mttcg.git branch multi_tcg_v7. > > This patch-set try to address the different issues i

Re: [Qemu-devel] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-10 Thread Alexey Kardashevskiy
On 08/11/2015 10:57 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 10:24:56PM +1000, David Gibson wrote: On Fri, Aug 07, 2015 at 01:33:32PM +1000, Gavin Shan wrote: The patch supports RTAS calls "ibm,{open,close}-errinjct" to manupliate the token, which is passed to RTAS call "ibm,errinjct" to i

Re: [Qemu-devel] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-10 Thread Gavin Shan
On Mon, Aug 10, 2015 at 10:24:56PM +1000, David Gibson wrote: >On Fri, Aug 07, 2015 at 01:33:32PM +1000, Gavin Shan wrote: >> The patch supports RTAS calls "ibm,{open,close}-errinjct" to >> manupliate the token, which is passed to RTAS call "ibm,errinjct" >> to indicate the valid context for error

Re: [Qemu-devel] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-10 Thread David Gibson
On Fri, Aug 07, 2015 at 01:33:32PM +1000, Gavin Shan wrote: > The patch supports RTAS calls "ibm,{open,close}-errinjct" to > manupliate the token, which is passed to RTAS call "ibm,errinjct" > to indicate the valid context for error injection. Each VM is > permitted to have only one token at once a

[Qemu-devel] [PATCH v4 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-10 Thread Gavin Shan
The patch supports RTAS calls "ibm,{open,close}-errinjct" to manupliate the token, which is passed to RTAS call "ibm,errinjct" to indicate the valid context for error injection. Each VM is permitted to have only one token at once and we simply have one random number for that. Signed-off-by: Gavin

[Qemu-devel] [PATCH v4 3/3] sPAPR: Support RTAS call ibm,errinjct

2015-08-10 Thread Gavin Shan
The patch supports RTAS call "ibm,errinjct" to allow injecting EEH errors to VFIO PCI devices. The implementation is similiar to EEH support for VFIO PCI devices: The RTAS request is captured by QEMU and routed to sPAPRPHBClass::eeh_inject_error() where the request is translated to VFIO container I

[Qemu-devel] [PATCH v4 0/3] sPAPR: Support EEH Error Injection

2015-08-10 Thread Gavin Shan
The patchset depends on below Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") According to PAPR specification 2.7, there're 3 RTAS calls relevent to error injection: "ibm,open-errinjct", "ibm,

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

2015-08-10 Thread Gavin Shan
The header file was introduced by following Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") Signed-off-by: Gavin Shan --- linux-headers/asm-powerpc/eeh.h | 56 +++

Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG.

2015-08-10 Thread Frederic Konrad
On 10/08/2015 20:34, Alex Bennée wrote: fred.kon...@greensocs.com writes: From: KONRAD Frederic This is the 7th round of the MTTCG patch series. It can be cloned from: g...@git.greensocs.com:fkonrad/mttcg.git branch multi_tcg_v7. I'm not seeing this yet, did you remember to push? oops sor

[Qemu-devel] [PATCH v14 4/8] i.MX: Add FEC Ethernet Emulator

2015-08-10 Thread Jean-Christophe Dubois
This is based on mcf_fec.c FEC implementation for Coldfire * A generic PHY was added (borrowwed from LAN9118) * The buffer management is also modified as buffers are slightly different between Coldfire and i.MX Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Ch

[Qemu-devel] [PATCH v14 7/8] i.MX: Add qtest support for I2C device emulator.

2015-08-10 Thread Jean-Christophe Dubois
This is using a ds1338 RTC chip on the I2C bus. This RTC chip is not present on the real 3DS PDK board. Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * not present on v1 Changes since v2: * use a common header file for I2C regs definition Changes since v3: * rework GP

[Qemu-devel] [PATCH v14 3/8] i.MX: Add I2C controller emulator

2015-08-10 Thread Jean-Christophe Dubois
The slave mode is not implemented. Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * none Changes since v2: * use QOM cast * reworked debug printf * use CamelCase for state type * warn with qemu_log_mask(LOG_GUEST_ERROR) or qemu_lo

[Qemu-devel] [PATCH v14 8/8] i.MX: Add i2C devices to i.MX31 SOC

2015-08-10 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * not present on v1 Changes since v2: * not present on v2 Changes since v3: * not present on v3 Changes since v4: * not present on v4 Changes since v5: * not present on v5 Changes since v6:

[Qemu-devel] [PATCH v14 6/8] i.MX: Add the i.MX25 PDK plateform

2015-08-10 Thread Jean-Christophe Dubois
Tested by booting a minimal Linux system on the emulated platform Tested by booting the Xvisor hyprvisor on the emulated platform Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * Added a ds1338 I2C device for qtest purpose. Changes since v2: * none Changes since v3

[Qemu-devel] [PATCH v14 1/8] i.MX: Add SOC support for i.MX31

2015-08-10 Thread Jean-Christophe Dubois
For now we support the following devices: * CPU: ARM1136 * Interrupt Controller: AVIC * CCM * UART x 2 * EPIT x 2 * GPT Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * not present on v1 Changes since v2: * not present on v2

[Qemu-devel] [PATCH v14 2/8] i.MX: KZM now uses the standalone i.MX31 SOC support

2015-08-10 Thread Jean-Christophe Dubois
Tested by booting a minimal Linux system on the emulated platform Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * not present on v1 Changes since v2: * not present on v2 Changes since v3: * not present on v3 Changes since v4: * not present on v4 Changes

[Qemu-devel] [PATCH v14 5/8] i.MX: Add SOC support for i.MX25

2015-08-10 Thread Jean-Christophe Dubois
For now we support the following devices: * CPU: ARM926 * Interrupt Controller: AVIC * CCM * UART x 5 * EPIT x 2 * GPT x 4 * FEC * I2C x 3 Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * not present on v1 Changes since v2:

[Qemu-devel] [PATCH v14 0/8] i.MX: Add i.MX25 support through the PDK evaluation board

2015-08-10 Thread Jean-Christophe Dubois
This series of patches is generated against Peter Maydell GIT tree: https://git.linaro.org/people/peter.maydell/qemu-arm.git branch target-arm-post-2.4 This series of patches add the support for the i.MX25 processor through the Freescale PDK evaluation board. For now a limited set of devices is

Re: [Qemu-devel] QEMU 2.4 for Windows - current status

2015-08-10 Thread Stefan Weil
Am 10.08.2015 um 16:00 schrieb Paolo Bonzini: > > > On 10/08/2015 13:39, Stefan Weil wrote: >>> Could somebody add some notes to the 'Known issues' section >>> of the changelog summarising the problems, please (whether >>> it affects all Windows build environments or only some, >>> whether this i

Re: [Qemu-devel] [PATCH v4 05/11] qemu-log: Improve the "exec" TB execution logging

2015-08-10 Thread Christopher Covington
Hi Peter, Alex, On 08/03/2015 05:14 AM, Alex Bennée wrote: > From: Peter Maydell > > Improve the TB execution logging so that it is easier to identify > what is happening from trace logs: > * move the "Trace" logging of executed TBs into cpu_tb_exec() >so that it is emitted if and only if w

Re: [Qemu-devel] [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-08-10 Thread Greg KH
On Mon, Aug 10, 2015 at 03:02:22PM -0400, Gabriel L. Somlo wrote: > Mainly, qemu's fw_cfg is a read-only "device", so one wouldn't ever > care to try writing anything to it. /sys/firmware/... feels like a fit > because fw_cfg contains binary blobs originally meant to be used by > the bios (it's how

Re: [Qemu-devel] [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Gabriel L. Somlo
On Mon, Aug 10, 2015 at 11:54:00AM -0700, Greg KH wrote: > On Mon, Aug 10, 2015 at 02:43:10PM -0400, Gabriel L. Somlo wrote: > > On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote: > > > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote: > > > > From: "Gabriel Somlo" > > > > >

Re: [Qemu-devel] [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-08-10 Thread Gabriel L. Somlo
On Mon, Aug 10, 2015 at 11:30:54AM -0700, Greg KH wrote: > On Mon, Aug 10, 2015 at 12:31:18PM -0400, Gabriel L. Somlo wrote: > > From: "Gabriel Somlo" > > > > Make fw_cfg entries of type "file" available via sysfs. Entries > > are listed under /sys/firmware/fw_cfg/by_select, in folders named > >

Re: [Qemu-devel] [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Greg KH
On Mon, Aug 10, 2015 at 02:43:10PM -0400, Gabriel L. Somlo wrote: > On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote: > > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote: > > > From: "Gabriel Somlo" > > > > > > Signed-off-by: Gabriel Somlo > > > --- > > > lib/kobject.c |

Re: [Qemu-devel] [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Greg KH
On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote: > From: "Gabriel Somlo" > > Signed-off-by: Gabriel Somlo > --- > lib/kobject.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/kobject.c b/lib/kobject.c > index 3e3a5c3..f9754a0 100644 > --- a/lib/kobject.c > +++ b/

Re: [Qemu-devel] [RFC PATCH V7 19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG)

2015-08-10 Thread Alex Bennée
Paolo Bonzini writes: > On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: >> From: Alex Bennée >> >> Testing with Alexander's bare metal syncronisation tests fails in MTTCG >> leaving one CPU spinning forever waiting for the second CPU to wake up. >> We simply need to poke the halt_cond on

Re: [Qemu-devel] [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names

2015-08-10 Thread Greg KH
On Mon, Aug 10, 2015 at 12:31:20PM -0400, Gabriel L. Somlo wrote: > From: "Gabriel Somlo" > > Each fw_cfg entry of type "file" has an associated 56-char, > nul-terminated ASCII string which represents its name. While > the fw_cfg device doesn't itself impose any specific naming > convention, QEMU

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-10 Thread Alex Bennée
Paolo Bonzini writes: > On 10/08/2015 18:36, Paolo Bonzini wrote: >>> > diff --git a/target-arm/translate.c b/target-arm/translate.c >>> > index 69ac18c..960c75e 100644 >>> > --- a/target-arm/translate.c >>> > +++ b/target-arm/translate.c >>> > @@ -11166,6 +11166,8 @@ static inline void >>> > g

Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG.

2015-08-10 Thread Alex Bennée
fred.kon...@greensocs.com writes: > From: KONRAD Frederic > > This is the 7th round of the MTTCG patch series. > > > It can be cloned from: > g...@git.greensocs.com:fkonrad/mttcg.git branch multi_tcg_v7. I'm not seeing this yet, did you remember to push? > > This patch-set try to address the

Re: [Qemu-devel] [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Gabriel L. Somlo
On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote: > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote: > > From: "Gabriel Somlo" > > > > Signed-off-by: Gabriel Somlo > > --- > > lib/kobject.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lib/kobject.c b/l

Re: [Qemu-devel] [RFC PATCH V7 13/19] add a callback when tb_invalidate is called.

2015-08-10 Thread Alex Bennée
Paolo Bonzini writes: > On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: >> From: KONRAD Frederic >> >> Instead of doing the jump cache invalidation directly in tb_invalidate delay >> it >> after the exit so we don't have an other CPU trying to execute the code being >> invalidated. >>

Re: [Qemu-devel] [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-08-10 Thread Greg KH
On Mon, Aug 10, 2015 at 12:31:18PM -0400, Gabriel L. Somlo wrote: > From: "Gabriel Somlo" > > Make fw_cfg entries of type "file" available via sysfs. Entries > are listed under /sys/firmware/fw_cfg/by_select, in folders named > after each entry's selector key. Filename, selector value, and > size

Re: [Qemu-devel] [PATCH v4 07/11] qemu-log: new option -dfilter to limit output

2015-08-10 Thread Alex Bennée
Christopher Covington writes: > Hi Alex, > > On 08/03/2015 05:14 AM, Alex Bennée wrote: >> When debugging big programs or system emulation sometimes you want both >> the verbosity of cpu,exec et all but don't want to generate lots of logs >> for unneeded stuff. This patch adds a new option -dfil

Re: [Qemu-devel] [PATCH v8 2/5] Extract some reusable vGIC code

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 13:06, Pavel Fedin wrote: > These functions are useful also for vGICv3 implementation. Make them > accessible > from within other modules. > > Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but > they would require two extra parameters (s->dev_fd and

Re: [Qemu-devel] [PATCH v8 1/5] Implement GIC-500 base class

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 13:06, Pavel Fedin wrote: > From: Shlomo Pongratz > > This class is to be used by both software and KVM implementations of GICv3 > > Currently it is mostly a placeholder, but in future it is supposed to hold > qemu's representation of GICv3 state, which is necessary for migra

Re: [Qemu-devel] [PATCH v8 4/5] Initial implementation of vGICv3

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 13:06, Pavel Fedin wrote: > Get/put routines are missing, live migration is not possible. This commit message is too terse. Otherwise Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v8 5/5] Add gicversion option to virt machine

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 13:06, Pavel Fedin wrote: > Set kernel_irqchip_type according to value of the option and pass it > around where necessary. Instantiate devices and fdt nodes according > to the choice. > > max_cpus for virt machine increased to 64. GICv2 compatibility check > happens inside arm

Re: [Qemu-devel] [PATCH v13 13/19] i.MX: KZM now uses the standalone i.MX31 SOC support

2015-08-10 Thread Jean-Christophe DUBOIS
Le 10/08/2015 18:23, Peter Maydell a écrit : On 10 August 2015 at 17:15, Jean-Christophe DUBOIS wrote: Le 07/08/2015 15:45, Peter Maydell a écrit : On 16 July 2015 at 22:21, Jean-Christophe Dubois wrote: memory_region_allocate_system_memory() needs to be called once and only once by a board i

Re: [Qemu-devel] [PATCH v4 07/11] qemu-log: new option -dfilter to limit output

2015-08-10 Thread Christopher Covington
Hi Alex, On 08/03/2015 05:14 AM, Alex Bennée wrote: > When debugging big programs or system emulation sometimes you want both > the verbosity of cpu,exec et all but don't want to generate lots of logs > for unneeded stuff. This patch adds a new option -dfilter which allows > you to specify interes

Re: [Qemu-devel] [PATCH v2] error: only prepend timestamp on stderr

2015-08-10 Thread Frank Schreuder
Op 8/10/2015 om 3:15 PM schreef Stefan Hajnoczi: > The -msg timestamp=on option prepends a timestamp to error messages. > This is useful on stderr where it allows users to identify when an error > was raised. > > Timestamps do not make sense on the monitor since error_report() is > called in respon

Re: [Qemu-devel] [RFC PATCH V7 13/19] add a callback when tb_invalidate is called.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > From: KONRAD Frederic > > Instead of doing the jump cache invalidation directly in tb_invalidate delay > it > after the exit so we don't have an other CPU trying to execute the code being > invalidated. > > Signed-off-by: KONRAD Frederic

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 18:36, Paolo Bonzini wrote: >> > diff --git a/target-arm/translate.c b/target-arm/translate.c >> > index 69ac18c..960c75e 100644 >> > --- a/target-arm/translate.c >> > +++ b/target-arm/translate.c >> > @@ -11166,6 +11166,8 @@ static inline void >> > gen_intermediate_code_internal(A

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 13:06, Pavel Fedin wrote: > This patch introduces kernel_irqchip_type member in Machine class, which > is passed to kvm_arch_irqchip_create. Machine models which can use vGIC > now use it in order to supply correct GIC type for KVM capability > verification. The variable is de

Re: [Qemu-devel] [RFC PATCH V7 19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG)

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > From: Alex Bennée > > Testing with Alexander's bare metal syncronisation tests fails in MTTCG > leaving one CPU spinning forever waiting for the second CPU to wake up. > We simply need to poke the halt_cond once we have processed the PSCI

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > diff --git a/cpu-exec.c b/cpu-exec.c > index f3358a9..a012e9d 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -131,6 +131,8 @@ static void init_delay_params(SyncClocks *sc, const > CPUState *cpu) > void cpu_loop_exit(CPUState *cpu) > {

[Qemu-devel] [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-08-10 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Make fw_cfg entries of type "file" available via sysfs. Entries are listed under /sys/firmware/fw_cfg/by_select, in folders named after each entry's selector key. Filename, selector value, and size read-only attributes are included for each entry. Also, a "raw" attribute all

[Qemu-devel] [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Signed-off-by: Gabriel Somlo --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject.c b/lib/kobject.c index 3e3a5c3..f9754a0 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -1058,3 +1058,4 @@ EXPORT_SYMBOL(kobject_del); EXPORT_SYMBOL(kset_re

[Qemu-devel] [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names

2015-08-10 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Each fw_cfg entry of type "file" has an associated 56-char, nul-terminated ASCII string which represents its name. While the fw_cfg device doesn't itself impose any specific naming convention, QEMU developers have traditionally used path name semantics (i.e. "etc/acpi/rsdp")

[Qemu-devel] [PATCH 0/3] SysFS driver for QEMU firmware config device (fw_cfg)

2015-08-10 Thread Gabriel L. Somlo
From: "Gabriel Somlo" This patch set makes QEMU fw_cfg blobs available for viewing (read-only) via SysFS. Several different architectures supported by QEMU are set up with a "firmware configuration" (fw_cfg) device, used to pass configuration "blobs" into the guest by the host running QEMU. His

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > + > +void tb_flush_safe(CPUState *cpu) > +{ > +#if 0 /* !MTTCG */ > +tb_flush(cpu); > +#else > +async_run_safe_work_on_cpu(cpu, tb_flush_work, cpu); > +#endif /* MTTCG */ > +} > + I think this can use first_cpu unconditionally; tb_f

[Qemu-devel] OVMF BoF @ KVM Forum 2015

2015-08-10 Thread Laszlo Ersek
Hi. Let's do an OVMF BoF at this year's KVM Forum too. Paolo will present Securing secure boot: system management mode in KVM and Tiano Core on Thursday, August 20, in the 5:00pm - 5:30pm time slot. Right after that, the BoF section starts at 5:30pm: http://events.linuxfoundation.org/even

Re: [Qemu-devel] [PATCH v13 13/19] i.MX: KZM now uses the standalone i.MX31 SOC support

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 17:15, Jean-Christophe DUBOIS wrote: > Le 07/08/2015 15:45, Peter Maydell a écrit : > > On 16 July 2015 at 22:21, Jean-Christophe Dubois > wrote: > > memory_region_allocate_system_memory() needs to be called once and > only once by a board init. You're going to end up callin

Re: [Qemu-devel] [RFC PATCH V7 06/19] add support for spin lock on POSIX systems exclusively

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > From: Guillaume Delbergue > > WARNING: spin lock is currently not implemented on WIN32 > > Signed-off-by: Guillaume Delbergue Should go before patch 12 (and IIUC Alvise's work should go in first anyway). Paolo > --- > include/qemu/th

Re: [Qemu-devel] [PATCH v13 00/19] i.MX: Add i.MX25 support through the PDK evaluation board

2015-08-10 Thread Jean-Christophe DUBOIS
Le 07/08/2015 16:13, Peter Maydell a écrit : On 16 July 2015 at 22:21, Jean-Christophe Dubois wrote: This series of patches add the support for the i.MX25 processor through the Freescale PDK evaluation board. For now a limited set of devices is supported. * GPT timers (from i.MX31) *

Re: [Qemu-devel] [PATCH v13 18/19] i.MX: Add qtest support for I2C device emulator.

2015-08-10 Thread Jean-Christophe DUBOIS
Le 07/08/2015 15:05, Peter Maydell a écrit : On 16 July 2015 at 22:21, Jean-Christophe Dubois wrote: This is using a ds1338 RTC chip on the I2C bus. This RTC chip is not present on the real 3DS PDK board. Signed-off-by: Jean-Christophe Dubois 'make check' doesn't pass with this patch, becaus

Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > void qemu_mutex_lock_iothread(void) > { > -atomic_inc(&iothread_requesting_mutex); > -/* In the simple case there is no need to bump the VCPU thread out of > - * TCG code execution. > - */ > -if (!tcg_enabled() || qemu_

Re: [Qemu-devel] [PATCH v13 13/19] i.MX: KZM now uses the standalone i.MX31 SOC support

2015-08-10 Thread Jean-Christophe DUBOIS
Le 07/08/2015 15:45, Peter Maydell a écrit : On 16 July 2015 at 22:21, Jean-Christophe Dubois wrote: Tested by booting a minimal Linux system on the emulated platform Signed-off-by: Jean-Christophe Dubois --- This said: - * 0x8000-0x87ff RAM EMULATED - * 0x

Re: [Qemu-devel] [RFC PATCH V7 08/19] tcg: remove tcg_halt_cond global variable.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com 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 > --- > cpus.c | 18 +++--- > 1 file changed, 7 insertions(

Re: [Qemu-devel] [RFC PATCH V7 04/19] replace spinlock by QemuMutex.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com 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 Q

Re: [Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 18:04, Frederic Konrad wrote: > On 10/08/2015 17:59, Paolo Bonzini wrote: >> >> On 10/08/2015 17:26, fred.kon...@greensocs.com wrote: >>> +qemu_mutex_lock(&cpu->work_mutex); >>> while ((wi = cpu->queued_work_first)) { >>> cpu->queued_work_first = wi->next; >>>

Re: [Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread Frederic Konrad
On 10/08/2015 17:59, Paolo Bonzini wrote: On 10/08/2015 17:26, fred.kon...@greensocs.com wrote: +qemu_mutex_lock(&cpu->work_mutex); while ((wi = cpu->queued_work_first)) { cpu->queued_work_first = wi->next; +qemu_mutex_unlock(&cpu->work_mutex); wi->func(

Re: [Qemu-devel] [RFC PATCH V7 14/19] cpu: introduce tlb_flush*_all.

2015-08-10 Thread Peter Maydell
On 10 August 2015 at 16:54, Paolo Bonzini wrote: > On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: >> From: KONRAD Frederic >> >> Some architectures allow to flush the tlb of other VCPUs. This is not a >> problem >> when we have only one thread for all VCPUs but it definitely needs to be a

Re: [Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:26, fred.kon...@greensocs.com wrote: > > +qemu_mutex_lock(&cpu->work_mutex); > while ((wi = cpu->queued_work_first)) { > cpu->queued_work_first = wi->next; > +qemu_mutex_unlock(&cpu->work_mutex); > wi->func(wi->data); > +qemu_mutex_loc

Re: [Qemu-devel] [RFC PATCH V7 14/19] cpu: introduce tlb_flush*_all.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > From: KONRAD Frederic > > Some architectures allow to flush the tlb of other VCPUs. This is not a > problem > when we have only one thread for all VCPUs but it definitely needs to be an > asynchronous work when we are in true multithreade

Re: [Qemu-devel] [RFC PATCH V7 18/19] mttcg: signal the associated cpu anyway.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > diff --git a/cpus.c b/cpus.c > index 2c5ca72..f61530c 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -674,8 +674,7 @@ static void cpu_signal(int sig) > cpu_exit(current_cpu); > } > > -/* FIXME: We might want to check if the cp

Re: [Qemu-devel] [RFC PATCH V7 10/19] cpu: remove exit_request global.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > { > if (current_cpu) { > cpu_exit(current_cpu); > } > -exit_request = 1; > + > +/* FIXME: We might want to check if the cpu is running? */ > +tcg_thread_cpu->exit_request = true; > } > > #ifdef CONFIG_LINU

[Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic tb_flush is not thread safe we definitely need to exit VCPUs to do that. This introduces tb_flush_safe which just creates an async safe work which will do a tb_flush later. Signed-off-by: KONRAD Frederic --- include/exec/exec-all.h | 1 + translate-all.c | 15 +++

[Qemu-devel] [RFC PATCH V7 18/19] mttcg: signal the associated cpu anyway.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic We might have a race here. If current_cpu is about to be set then cpu_exit won't be called and we don't exit TCG. This was probably an issue with old implementation as well. Signed-off-by: KONRAD Frederic --- cpus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[Qemu-devel] [RFC PATCH V7 13/19] add a callback when tb_invalidate is called.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic Instead of doing the jump cache invalidation directly in tb_invalidate delay it after the exit so we don't have an other CPU trying to execute the code being invalidated. Signed-off-by: KONRAD Frederic --- translate-all.c | 61 +

[Qemu-devel] [RFC PATCH V7 10/19] cpu: remove exit_request global.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This removes exit_request global and adds a variable in CPUState for this. Only the flag for the first cpu is used for the moment as we are still with one TCG thread. Signed-off-by: KONRAD Frederic --- cpu-exec.c | 15 --- cpus.c | 17 ++--- 2

[Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This finally allows TCG to benefit from the iothread introduction: Drop the global mutex while running pure TCG CPU code. Reacquire the lock when entering MMIO or PIO emulation, or when leaving the TCG loop. We have to revert a few optimization for the current TCG threading

Re: [Qemu-devel] virtio 1 issues

2015-08-10 Thread Cornelia Huck
On Mon, 10 Aug 2015 14:22:07 +0800 Jason Wang wrote: > > > On 08/07/2015 06:49 PM, Cornelia Huck wrote: > > On Fri, 07 Aug 2015 13:07:35 +0800 > > Jason Wang wrote: > > > >>> 2. ring resizing is broken - it actually has a comment: > >>> /* TODO: need a way to put num back on reset. */

[Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-10 Thread fred . konrad
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: An other CPU can be executing code during a flush. This can be fixed later by making all other TCG thread exiting before calling tb_flush().

[Qemu-devel] [RFC PATCH V7 19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG)

2015-08-10 Thread fred . konrad
From: Alex Bennée Testing with Alexander's bare metal syncronisation tests fails in MTTCG leaving one CPU spinning forever waiting for the second CPU to wake up. We simply need to poke the halt_cond once we have processed the PSCI power on call. Tested-by: Alex Bennée CC: Alexander Spyridakis

[Qemu-devel] [RFC PATCH V7 14/19] cpu: introduce tlb_flush*_all.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic Some architectures allow to flush the tlb of other VCPUs. This is not a problem when we have only one thread for all VCPUs but it definitely needs to be an asynchronous work when we are in true multithreaded work. TODO: Some test case, I fear some bad results in case a VCPU

[Qemu-devel] [RFC PATCH V7 17/19] translate-all: (wip) use tb_flush_safe when we can't alloc more tb.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This changes just the tb_flush called from tb_alloc. TODO: * changes the other tb_flush. Signed-off-by: KONRAD Frederic --- translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translate-all.c b/translate-all.c index 7094bf0..cabce75 10064

[Qemu-devel] [RFC PATCH V7 08/19] tcg: remove tcg_halt_cond global variable.

2015-08-10 Thread fred . konrad
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 --- cpus.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/cpus.c b/cpus.c index 2250296..2550be2 1

[Qemu-devel] [RFC PATCH V7 04/19] replace spinlock by QemuMutex.

2015-08-10 Thread fred . konrad
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 this case. It allows as well to reuse tb_lock mut

[Qemu-devel] [RFC PATCH V7 12/19] Use atomic cmpxchg to atomically check the exclusive value in a STREX

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This mechanism replaces the existing load/store exclusive mechanism which seems to be broken for multithread. It follows the intention of the existing mechanism and stores the target address and data values during a load operation and checks that they remain unchanged before

[Qemu-devel] [RFC PATCH V7 06/19] add support for spin lock on POSIX systems exclusively

2015-08-10 Thread fred . konrad
From: Guillaume Delbergue WARNING: spin lock is currently not implemented on WIN32 Signed-off-by: Guillaume Delbergue --- include/qemu/thread-posix.h | 4 include/qemu/thread-win32.h | 4 include/qemu/thread.h | 7 +++ util/qemu-thread-posix.c| 45 +++

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

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This switches on multithread. Signed-off-by: KONRAD Frederic Changes V5 -> V6: * make qemu_cpu_kick calling qemu_cpu_kick_thread in case of TCG. --- cpus.c | 93 -- 1 file changed, 33 insertions(+), 60 del

[Qemu-devel] [RFC PATCH V7 15/19] arm: use tlb_flush*_all

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This just use the new mechanism to ensure that each VCPU thread flush its own VCPU. Signed-off-by: KONRAD Frederic --- target-arm/helper.c | 45 +++-- 1 file changed, 7 insertions(+), 38 deletions(-) diff --git a/target-arm/helper.

[Qemu-devel] [RFC PATCH V7 03/19] cpus: introduce async_run_safe_work_on_cpu.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic We already had async_run_on_cpu but we need all VCPUs outside their execution loop to execute some tb_flush/invalidate task: async_run_on_cpu_safe schedule a work on a VCPU but the work start when no more VCPUs are executing code. When a safe work is pending cpu_has_work re

[Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This flag indicates the state of the VCPU thread: * 0 if the VCPU is allowed to execute code. * 1 if the VCPU is currently executing code. * -1 if the VCPU is not allowed to execute code. This allows to atomically check and run safe work or check and continue the TCG

[Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This is the 7th round of the MTTCG patch series. It can be cloned from: g...@git.greensocs.com:fkonrad/mttcg.git branch multi_tcg_v7. This patch-set try to address the different issues in the global picture of MTTCG, presented on the wiki. == Needed patch for our work ==

[Qemu-devel] [RFC PATCH V7 05/19] remove unused spinlock.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This just removes spinlock as it is not used anymore. Signed-off-by: KONRAD Frederic Changes V6 -> V7: * Drop the checkpatch part. --- include/exec/spinlock.h | 49 - 1 file changed, 49 deletions(-) delete mode 100644 in

[Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This protects queued_work_* used by async_run_on_cpu, run_on_cpu and flush_queued_work with a new lock (work_mutex) to prevent multiple (concurrent) access. Signed-off-by: KONRAD Frederic Reviewed-by: Alex Bennée Changes V1 -> V2: * Unlock the mutex while running the c

Re: [Qemu-devel] dmidecode repository (Was: [ARM SMBIOS V1 PATCH 0/6] SMBIOS Support for ARM)

2015-08-10 Thread Laszlo Ersek
On 08/10/15 14:26, Jean Delvare wrote: > Hi Laszlo, > > On Mon, 10 Aug 2015 13:58:31 +0200, Laszlo Ersek wrote: >> On 08/10/15 09:43, Jean Delvare wrote: >>> OK, I think I came up with something that looks reasonably good: >>> >>> http://git.savannah.gnu.org/cgit/dmidecode.git >>> >>> Can anyone p

Re: [Qemu-devel] [Patch] s390x/kvm: make setting of in-kernel irq routes more efficient

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 16:02, Jens Freimann wrote: > When we add new adapter routes we call kvm_irqchip_add_route() for every > virtqueue and in the same step also do the KVM_SET_GSI_ROUTING ioctl. > > This is unnecessary costly as the interface allows us to set multiple > routes in one go. Let's first a

[Qemu-devel] MTTCG Call Summary 10/8/2015

2015-08-10 Thread Alex Bennée
Hi, Here is the summary of today's MTTCG call. Fred: Fred talked about the current status of his v7 patches. They are ready to go save for two bugs that were triggered when running Alex's Debian Jessie images. After discussion it seems there may be multiple bug manifestations. They are: - Bug

[Qemu-devel] [Patch] s390x/kvm: make setting of in-kernel irq routes more efficient

2015-08-10 Thread Jens Freimann
When we add new adapter routes we call kvm_irqchip_add_route() for every virtqueue and in the same step also do the KVM_SET_GSI_ROUTING ioctl. This is unnecessary costly as the interface allows us to set multiple routes in one go. Let's first add all routes to the table stored in the global kvm_st

Re: [Qemu-devel] QEMU 2.4 for Windows - current status

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 13:39, Stefan Weil wrote: > > Could somebody add some notes to the 'Known issues' section > > of the changelog summarising the problems, please (whether > > it affects all Windows build environments or only some, > > whether this is a regression or not, etc): > > http://wiki.qemu.or

[Qemu-devel] [Bug 660366] Re: "qemu-img convert -O qcow2 -o backing_file" makes huge images

2015-08-10 Thread sakishrist
Is this reintroduced? I am on version 2.3.0 $ dd if=/dev/urandom of=disk bs=1M count=1024 $ qemu-img convert -f raw -O qcow2 disk disk.qcow $ qemu-img convert -f raw -O qcow2 -o backing_file=disk.qcow disk disk1.qcow $ ls -l total 3146388 -rw-r--r-- 1 sakis sakis 1073741824 10 авг 15,29 disk -r

Re: [Qemu-devel] virtio-9p

2015-08-10 Thread Linda
On 8/10/2015 4:10 AM, Stefan Hajnoczi wrote: On Fri, Aug 07, 2015 at 10:21:47AM -0600, Linda wrote: As background, for the backend, I have been looking at the code, written by Anthony Liguori, and maintained by Aneesh Kumar (who I sent this email to, earlier). It looks to me (please corr

Re: [Qemu-devel] [PATCH v2] error: only prepend timestamp on stderr

2015-08-10 Thread Daniel P. Berrange
On Mon, Aug 10, 2015 at 02:15:41PM +0100, Stefan Hajnoczi wrote: > The -msg timestamp=on option prepends a timestamp to error messages. > This is useful on stderr where it allows users to identify when an error > was raised. > > Timestamps do not make sense on the monitor since error_report() is >

[Qemu-devel] [PATCH v2] error: only prepend timestamp on stderr

2015-08-10 Thread Stefan Hajnoczi
The -msg timestamp=on option prepends a timestamp to error messages. This is useful on stderr where it allows users to identify when an error was raised. Timestamps do not make sense on the monitor since error_report() is called in response to a synchronous monitor command and the user already kno

[Qemu-devel] [PATCH 2/4] target-sparc: Split cpu_put_psr into side-effect and no-side-effect parts

2015-08-10 Thread Peter Maydell
For inbound migration we really want to be able to set the PSR without having any side effects, but cpu_put_psr() calls cpu_check_irqs() which might try to deliver CPU interrupts. Split cpu_put_psr() into the no-side-effect and side-effect parts. This includes reordering the cpu_check_irqs() to th

  1   2   >