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

2015-08-10 Thread Jean Delvare
On Thu, 6 Aug 2015 10:07:40 +0200, Laszlo Ersek wrote: > On 08/06/15 00:03, Jean Delvare wrote: > > On Wed, 05 Aug 2015 22:39:57 +0300, Ivan Khoronzhuk wrote: > >> There is no git repo for dmidecode. > >> Only CVS: http://savannah.nongnu.org/cvs/?group=dmidecode > > > > Correct. Savannah support g

Re: [Qemu-devel] [RFC v4 6/9] tcg-i386: Implement excl variants of qemu_{ld, st}

2015-08-10 Thread alvise rigo
Good point, I will look at the code you pointed. If we really can avoid to modify every backend, than it's worth more than a look. Thanks, alvise On Sat, Aug 8, 2015 at 3:00 PM, Aurelien Jarno wrote: > On 2015-08-07 19:03, Alvise Rigo wrote: >> Implement exclusive variants of qemu_{ld,st}_{i32,i

Re: [Qemu-devel] [PATCH for-2.5 5/6] qmp: add monitor command to add/remove a child

2015-08-10 Thread Alberto Garcia
On Mon 10 Aug 2015 03:00:32 AM CEST, Wen Congyang wrote: >>> +# @child-add >>> +# >>> +# Add a new child to quorum. This is useful to fix a broken quorum >>> child. >> >> But the idea is that this can be eventually used by other drivers, isn't >> it? > > Yes, but is is only used for quorum now.

Re: [Qemu-devel] [PATCH for-2.5 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-10 Thread Alberto Garcia
On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote: > +static const char *bdrv_get_id_or_node_name(BlockDriverState *bs) > +{ > +if (bs->blk) { > +return blk_name(bs->blk); > +} > + > +return bs->node_name ? bs->node_name : ""; > +} You don't need to add this function, yo

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

2015-08-10 Thread Jason Wang
On 08/07/2015 10:46 AM, Yang Hongyang wrote: > Add multiqueue support in v6. > > This patch add a new object netfilter, capture all network packets. > Also implement a netbuffer based on this object. > the "buffer" netfilter could be used by VM FT solutions like > MicroCheckpointing, to buffer/re

Re: [Qemu-devel] [PATCH v6 02/10] init/cleanup of netfilter object

2015-08-10 Thread Jason Wang
On 08/07/2015 10:46 AM, Yang Hongyang wrote: > QTAILQ_ENTRY global_list but used by filter layer, so that we can > manage all filters together. > QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev is > in this queue. > This is mostly the same with init/cleanup of netdev objec

Re: [Qemu-devel] [PATCH v6 03/10] netfilter: add netfilter_{add|del} commands

2015-08-10 Thread Jason Wang
On 08/07/2015 10:46 AM, Yang Hongyang wrote: > add netfilter_{add|del} commands > This is mostly the same with netdev_{add|del} commands. > > When we delete the netdev, we also delete the netfilter object > attached to it, because if the netdev is removed, the filters > which attached to it is us

Re: [Qemu-devel] [PATCH v6 08/10] netfilter: add a netbuffer filter

2015-08-10 Thread Jason Wang
On 08/07/2015 10:46 AM, Yang Hongyang wrote: > This filter is to buffer/release packets, this feature can be used > when using MicroCheckpointing, or other Remus like VM FT solutions, you > can also use it to simulate the network delay. > It has an interval option, if supplied, this filter will r

Re: [Qemu-devel] [PATCH v3 2/2] make: load only required dependency files.

2015-08-10 Thread Victor Kaplansky
On Sun, Aug 09, 2015 at 12:54:37PM +0100, Peter Maydell wrote: > On 9 August 2015 at 12:39, Michael S. Tsirkin wrote: > > On Sun, Aug 09, 2015 at 12:39:59PM +0300, Victor Kaplansky wrote: > >> -$(eval -include $(addsuffix *.d, $(sort $(dir $($v) > >> +$(eval -include $(patsubst

Re: [Qemu-devel] [PATCH for-2.5 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-10 Thread Wen Congyang
On 08/10/2015 04:19 PM, Alberto Garcia wrote: > On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote: > >> +static const char *bdrv_get_id_or_node_name(BlockDriverState *bs) >> +{ >> +if (bs->blk) { >> +return blk_name(bs->blk); >> +} >> + >> +return bs->node_name ? bs->node

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

2015-08-10 Thread 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 limit works > fine. > VIRTIO disk devices - the IOPS limit

Re: [Qemu-devel] virtio-9p

2015-08-10 Thread Stefan Hajnoczi
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 correct me if I'm wrong, on this or > any other p

Re: [Qemu-devel] [PATCH v3 2/2] make: load only required dependency files.

2015-08-10 Thread Peter Maydell
On 9 August 2015 at 13:20, Michael S. Tsirkin wrote: > Still - just corious about the motivation. > Extra whitespace in input -> extra whitespace in output, should > be harmless in both cases, should it not? Yeah, I agree that it's generally harmless. My rationale for preferring no-space-after-co

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2015-08-10 Thread Stefan Hajnoczi
On Thu, Aug 06, 2015 at 01:10:14PM +0200, Samuel Thibault wrote: > Signed-off-by: Samuel Thibault > > --- > Jan Kiszka, le Wed 29 Jul 2015 09:36:15 +0200, a écrit : > > On 2015-07-29 00:12, Samuel Thibault wrote: > > > Hello, > > > > > > Jan Kiszka, le Mon 27 Jul 2015 15:33:27 +0200, a écrit : >

Re: [Qemu-devel] [PATCH v3 2/2] make: load only required dependency files.

2015-08-10 Thread Michael S. Tsirkin
On Mon, Aug 10, 2015 at 11:14:50AM +0100, Peter Maydell wrote: > On 9 August 2015 at 13:20, Michael S. Tsirkin wrote: > > Still - just corious about the motivation. > > Extra whitespace in input -> extra whitespace in output, should > > be harmless in both cases, should it not? > > Yeah, I agree

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

2015-08-10 Thread Peter Maydell
On 5 August 2015 at 12:03, Stefan Weil wrote: > I recently upgraded my build environment from Debian Wheezy > to Debian Jessie. Obviously the newer MinGW-w64 packages > introduced several problems for QEMU: > > * Compiler warnings caused by newer compiler and changes in > system include files > >

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

2015-08-10 Thread Stefan Weil
Am 10.08.2015 um 12:25 schrieb Peter Maydell: > 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.org/Cha

Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: fix overlapping metadata update

2015-08-10 Thread Stefan Hajnoczi
On Sun, Aug 09, 2015 at 05:03:14PM +0300, Vasiliy Tolstov wrote: > 2015-08-05 21:58 GMT+03:00 Jeff Cody : > > Hi Vasiliy, > > > > If you run configure with --disable-strip, it will not strip the > > debugging symbols from the binary after the build. Then, you can run > > gdb on qemu, and do a bac

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 09:43, Jean Delvare wrote: > On Thu, 6 Aug 2015 10:07:40 +0200, Laszlo Ersek wrote: >> On 08/06/15 00:03, Jean Delvare wrote: >>> On Wed, 05 Aug 2015 22:39:57 +0300, Ivan Khoronzhuk wrote: There is no git repo for dmidecode. Only CVS: http://savannah.nongnu.org/cvs/?group=dmid

[Qemu-devel] [PATCH v8 0/5] vGICv3 support

2015-08-10 Thread Pavel Fedin
This series introduces support for GICv3 by KVM. Software emulation is currently not supported. This patchset applies on top of: http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg00518.html v7 => v8 - Removed all unused SW emulation code - Removed unnecessary attributes from common class

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

2015-08-10 Thread Pavel Fedin
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 migration. Signed-off-by: Shlomo Pongratz Signed-off-by: Pave

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

2015-08-10 Thread Pavel Fedin
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 defined as int in order to be architecture-agnostic for po

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

2015-08-10 Thread Pavel Fedin
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_gic_common_realize(). Signed-off-by: Pavel Fedin --- hw

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

2015-08-10 Thread Pavel Fedin
Get/put routines are missing, live migration is not possible. Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_kvm.c | 143 2 files changed, 144 insertions(+) create mode 100644 hw/intc/arm_gicv3_kvm.c diff --git

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

2015-08-10 Thread Pavel Fedin
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 s->num_cpu) as well as lots of typecasts of 's' to DeviceSta

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

2015-08-10 Thread Jean Delvare
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 please check it out and verify that it looks

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

2015-08-10 Thread Peter Maydell
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 updated, rebased and made some tweaks to. This is a mig

[Qemu-devel] [PATCH 1/4] vmstate: introduce CPU_DoubleU arrays

2015-08-10 Thread Peter Maydell
From: Juan Quintela Add vmstate support for migrating arrays of CPU_DoubleU via VMSTATE_CPUDOUBLE_ARRAY. Signed-off-by: Juan Quintela [PMM: rebased, since files have all moved since 2012; added VMSTATE_CPUDOUBLE_ARRAY_V for consistency with FLOAT64] Signed-off-by: Peter Maydell --- include/m

[Qemu-devel] [PATCH 4/4] target-sparc: Convert to VMStateDescription

2015-08-10 Thread Peter Maydell
From: Juan Quintela Convert the SPARC CPU from cpu_load/save functions to VMStateDescription. Note that this is a migration compatibility break (which is OK as we don't try to support cross-version migration on SPARC). Signed-off-by: Juan Quintela [PMM: * Rebase and update to apply to master

[Qemu-devel] [PATCH 3/4] target-sparc: Don't flush TLB in cpu_load function

2015-08-10 Thread Peter Maydell
There's no need to flush the TLB in the SPARC cpu_load function: we're guaranteed to be loading state into a fresh clean configuration. Signed-off-by: Peter Maydell --- target-sparc/machine.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target-sparc/machine.c b/target-sparc/machine.c index

[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

[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

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 >

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

[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] 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] [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

[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

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

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

[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

[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 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 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 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 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 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 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 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 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 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 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 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().

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 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

[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 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 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 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 +++

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

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 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 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 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 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 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 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 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] [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 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 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] [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] [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 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

[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] [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] [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

[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 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 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

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) > {

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] [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 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] [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] [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] [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 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 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 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 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 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 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 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] [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 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 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] [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

  1   2   >