Re: [Qemu-devel] QEMU produces invalid JSON due to locale-dependent code

2015-08-25 Thread Gerd Hoffmann
Hi, > > It seems the only thing that we really care about being localized is > > the messages catalogue, so the GTK UI gets internationalization in > > its menus / dialogs / etc. As such I think that we should do the > > opposite of (C). ie run every LC_* in the C locale, except for > > LC_MESSA

Re: [Qemu-devel] [PATCH v2 RFC 0/8] block: persistent dirty bitmaps

2015-08-25 Thread Vladimir Sementsov-Ogievskiy
On 12.06.2015 13:36, Stefan Hajnoczi wrote: On Fri, Jun 12, 2015 at 12:58:35PM +0300, Denis V. Lunev wrote: On 11/06/15 23:06, Stefan Hajnoczi wrote: The load/store API is not scalable when bitmaps are 1 MB or larger. For example, a 500 GB disk image with 64 KB granularity requires a 1 MB bitm

Re: [Qemu-devel] [PATCH 5/6] virtio-pci: introduce pio notification capability for modern device

2015-08-25 Thread Jason Wang
On 08/25/2015 07:48 PM, Michael S. Tsirkin wrote: > On Fri, Aug 21, 2015 at 05:05:49PM +0800, Jason Wang wrote: >> > We used to use mmio for notification. This could be slow on some arch >> > (e.g on x86 without EPT). So this patch introduces pio bar and a pio >> > notification cap for modern dev

Re: [Qemu-devel] [RFC PATCH v0 1/3] pc-dimm: Add a field to PCDIMMDevice to mark device deletion state

2015-08-25 Thread Bharata B Rao
On Mon, Aug 24, 2015 at 09:30:35PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2015-08-19 01:56:09) > > Add a field to PCDIMMDevice to note that the device has been marked > > for removal. This will be used by PowerPC memory hotplug code to > > honour the LMB removal requests of only those

[Qemu-devel] [FIX PATCH] spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add

2015-08-25 Thread Bharata B Rao
If drmgr is used in the guest to hotplug a device before a device_add has been issued via the QEMU monitor, QEMU segfaults in configure_connector call. This occurs due to accessing of NULL FDT which otherwise would have been created and associated with the DRC during device_add command. Check for

Re: [Qemu-devel] [PATCH] vhost-scsi: fix wrong vhost-scsi firmware path

2015-08-25 Thread Gonglei
On 2015/8/26 9:52, arei.gong...@huawei.com wrote: > From: Gonglei > > vhost-scsi bootindex does't work because Qemu passes > wrong fireware path to seabios. > > before: > /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0 > after applying the patch: > /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0 > > R

[Qemu-devel] [PATCH] vhost-scsi: fix wrong vhost-scsi firmware path

2015-08-25 Thread arei.gonglei
From: Gonglei vhost-scsi bootindex does't work because Qemu passes wrong fireware path to seabios. before: /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0 after applying the patch: /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0 Reported-by: Subo Signed-off-by: Gonglei --- hw/scsi/vhost-scsi.c | 2

Re: [Qemu-devel] [RFC 35/38] cputlb: use cpu_tcg_sched_work for tlb_flush_all

2015-08-25 Thread Paolo Bonzini
- Original Message - > From: "Emilio G. Cota" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, mt...@greensocs.com, "guillaume delbergue" > , "alex > bennee" , "mark burton" , > "a rigo" > , "Frederic Konrad" > Sent: Wednesday, August 26, 2015 12:31:22 AM > Subject: Re: [RFC 35/38]

Re: [Qemu-devel] [PATCH 3/4] linux-user: call rcu_(un)register_thread on thread creation/deletion

2015-08-25 Thread Paolo Bonzini
On 25/08/2015 02:41, Emilio G. Cota wrote: > Note that the right place to call rcu_register_thread() is > do_cpu_loop() and not just in clone_func(), since the > original 'main' thread needs to call rcu_register_thread() > as well. > > Signed-off-by: Emilio G. Cota It doesn't actually, see rcu

[Qemu-devel] [PATCH 8/9] use qemu_cpu_kick instead of cpu_exit or qemu_cpu_kick_thread

2015-08-25 Thread Paolo Bonzini
Use the same API to trigger interruption of a CPU, no matter if under TCG or KVM. There is no difference: these calls come from the CPU thread, so the qemu_cpu_kick calls will send a signal to the running thread and it will be processed synchronously, just like a call to cpu_exit. The only differ

[Qemu-devel] [PATCH 7/9] tcg: synchronize exit_request and tcg_current_cpu accesses

2015-08-25 Thread Paolo Bonzini
Synchronize the remaining pair of accesses in cpu_signal. The wrongly-ordered accesses in cpu_signal are currently not an issue on Windows because they execute atomically between SuspendProcess and ResumeProcess. Only cpu_exec can be split (and the newly introduced atomic_mb_read would be needed

[Qemu-devel] [PATCH 5/9] tcg: assign cpu->current_tb in a simpler place

2015-08-25 Thread Paolo Bonzini
TCG has not been reading cpu->current_tb from signal handlers for years. The code that synchronized cpu_exec with the signal handler is not needed anymore. Signed-off-by: Paolo Bonzini --- cpu-exec.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cpu-exec.c b/cpu-ex

[Qemu-devel] [PATCH 9/9] tcg: signal-free qemu_cpu_kick

2015-08-25 Thread Paolo Bonzini
Signals are slow and do not exist on Win32. The previous patches have done most of the legwork to introduce memory barriers (some of them were even there already for the sake of Windows!) and we can now set the flags directly in the iothread. qemu_cpu_kick_thread is not used anymore on TCG, since

[Qemu-devel] [PATCH 3/9] tcg: introduce tcg_current_cpu

2015-08-25 Thread Paolo Bonzini
This is already useful on Windows in order to remove tls.h, because accesses to current_cpu are done from a different thread on that platform. It will be used on POSIX platforms as soon TCG stops using signals to interrupt the execution of translated code. Signed-off-by: Paolo Bonzini --- cpu-e

[Qemu-devel] [PATCH 6/9] tcg: synchronize cpu->exit_request and cpu->tcg_exit_req accesses

2015-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- cpu-exec.c | 6 +- qom/cpu.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpu-exec.c b/cpu-exec.c index 7fcc46f..2128bf1 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -542,8 +542,12 @@ int cpu_exec(CPUState *cpu)

[Qemu-devel] [PATCH 1/9] i8257: rewrite DMA_schedule to avoid hooking into the CPU loop

2015-08-25 Thread Paolo Bonzini
The i8257 DMA controller uses an idle bottom half, which by default does not cause the main loop to exit. Therefore, the DMA_schedule function is there to ensure that the CPU relinquishes the iothread mutex to the iothread. However, this is not enough since the iothread will call aio_compute_time

[Qemu-devel] [PATCH 4/9] remove qemu/tls.h

2015-08-25 Thread Paolo Bonzini
TLS is now required on all platforms, so DECLARE_TLS/DEFINE_TLS is not needed anymore. Removing it does not break Windows because of the previous patch. Signed-off-by: Paolo Bonzini --- exec.c | 2 +- include/qemu/tls.h | 52 inc

[Qemu-devel] [PATCH 2/9] i8257: remove cpu_request_exit irq

2015-08-25 Thread Paolo Bonzini
This is unused. cpu_exit now is almost exclusively an internal function to the CPU execution loop. The next patch will change the remaining occurrences to qemu_cpu_kick, making it truly internal. Signed-off-by: Paolo Bonzini --- hw/dma/i82374.c | 5 + hw/dma/i8257.c | 13

[Qemu-devel] [PATCH v2 0/9] tcg: signal-free qemu_cpu_kick

2015-08-25 Thread Paolo Bonzini
This version of the signal-free qemu_cpu_kick patches is, ehm, much better. Variable are accessed either with Java-style volatiles or protected by memory barriers, and the cleanups go further by removing qemu/tls.h and C volatiles. The logic is relatively simple. The I/O thread does (letters in

Re: [Qemu-devel] [Qemu-ppc] [PATCH v6 7/8] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-25 Thread Gavin Shan
On Tue, Aug 25, 2015 at 04:07:35PM +0200, Thomas Huth wrote: >On 24/08/15 14:03, Gavin Shan wrote: >> This 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 permitt

Re: [Qemu-devel] [PATCH v6 3/8] scripts: Submit changes while updating linux headers

2015-08-25 Thread Gavin Shan
On Tue, Aug 25, 2015 at 04:09:22PM +0100, Peter Maydell wrote: >On 25 August 2015 at 00:58, Gavin Shan wrote: >> On Mon, Aug 24, 2015 at 03:08:33PM +0100, Peter Maydell wrote: >>>On 24 August 2015 at 13:03, Gavin Shan wrote: +cd $to +name=$(git config --get user.name) +

[Qemu-devel] [PATCH 0/1] ahci: fix ATAPI PIO

2015-08-25 Thread John Snow
Fixes ATAPI PIO for transfers of greater than one sector, and centralizes the fix applied for HDD PIO transfers all in one place, finally. For convenience, this branch is available at: https://github.com/jnsnow/qemu.

[Qemu-devel] [PATCH 1/1] ide: unify io_buffer_offset increments

2015-08-25 Thread John Snow
IDEState's io_buffer_offset was originally added to keep track of offsets in AHCI rather exclusively, but it was added to IDEState instead of an AHCI-specific structure. AHCI fakes all PIO transfers using DMA and a scatter-gather list. When the core or atapi layers invoke HBA-specific mechanisms f

Re: [Qemu-devel] [PATCH v2 11/12] qga: add --dump-conf option

2015-08-25 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 1:13 AM, Michael Roth wrote: > Since we have the list_join() helper to convert config->blacklist, it > makes me wonder if there's really any need to add/init config->bliststr > in the previous patch. It is just to keep the string in memory. split_list() doesn't dup the

Re: [Qemu-devel] [PATCH v2 10/12] qga: add an optionnal qemu-ga.conf system configuration

2015-08-25 Thread Michael Roth
Quoting Marc-André Lureau (2015-08-25 18:18:16) > Hi > > On Wed, Aug 26, 2015 at 1:09 AM, Michael Roth > wrote: > > We should probably do this in init_dfl_pathnames() for consistency. > > QGA_FSFREEZE_HOOK_DEFAULT is also initialized here > > in init_dfl_pathnames(), it depends on the value of

Re: [Qemu-devel] [PATCH v2 10/12] qga: add an optionnal qemu-ga.conf system configuration

2015-08-25 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 1:09 AM, Michael Roth wrote: > We should probably do this in init_dfl_pathnames() for consistency. QGA_FSFREEZE_HOOK_DEFAULT is also initialized here in init_dfl_pathnames(), it depends on the value of get_local_state_pathname() while here it's static. >> >> static

Re: [Qemu-devel] [PATCH v2 12/12] qga: start a man page

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:24) > From: Marc-André Lureau > > Add a simple man page for the qemu agent. > > Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth > --- > Makefile | 14 +- > qemu-doc.texi | 6 +++ > qemu-ga.texi | 136 > ++

Re: [Qemu-devel] [PATCH v2 11/12] qga: add --dump-conf option

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:23) > From: Marc-André Lureau > > This new option allows to review the agent configuration, > and ease the task of writing a configuration file. > > Signed-off-by: Marc-André Lureau > --- > qga/main.c | 62 > +++

Re: [Qemu-devel] [PATCH v2 10/12] qga: add an optionnal qemu-ga.conf system configuration

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:22) > From: Marc-André Lureau > > Learn to configure the agent with a system configuration. > > This may simplify command-line handling, especially when the blacklist > is long. > > Among the other benefits, this may standardize the configur

[Qemu-devel] [PATCH v4 2/4] iotests: Add dependency info to groups list

2015-08-25 Thread John Snow
Add a few external dependency groups to the iotests groups list, such as "qemu", "nbd", and "scm". This will assist us in knowing which tests need to be re-run when those dependencies are updated, or by helping us to avoid tests that we know are broken for a certain file. qemu-img and qemu-io are

[Qemu-devel] [PATCH v4 4/4] iotests: clarify help text

2015-08-25 Thread John Snow
Split the help text to highlight the groups of options a little better, carving out a clear "format" and "protocols" section. Reviewed-by: Fam Zheng Signed-off-by: John Snow --- tests/qemu-iotests/common | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests

[Qemu-devel] [PATCH v4 1/4] iotests: fix exclusion option

2015-08-25 Thread John Snow
If you are running out-of-tree, the -x option to exclude a certain iotest is broken. Replace porcelain usage of ls with a sturdier awk command. Reviewed-by: Fam Zheng Signed-off-by: John Snow --- tests/qemu-iotests/common | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/te

[Qemu-devel] [PATCH v4 0/4] iotests: skip tests with unchanged dependencies

2015-08-25 Thread John Snow
This patchset is a little off the beaten path, but: Add the ability to skip tests that have already been run whose external dependencies have remained unchanged since the last test run. This is useful for, say, re-running a test set to see if a failure was a one-off or is reproducible by just re-

[Qemu-devel] [PATCH v4 3/4] iotests: add timestamp skip feature

2015-08-25 Thread John Snow
Like a makefile, try to skip tests if we know they have already been executed using the current set of external dependencies. If a user passes the -ts option to ./check, if a test or its output or its dependencies (qemu, qemu-nbd, qemu-io, qemu-img, socket-scm-helper) have been modified, the test

Re: [Qemu-devel] [PATCH v2 07/12] qga: fill default options in main()

2015-08-25 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 12:46 AM, Michael Roth wrote: > I think this needs to be config->method and config->device_path. It gets > fixed in the next patch, but looks like it'll break build bisect. indeed > Since that requires a respin anyway: there's an extra space in > 'int main()' that get

Re: [Qemu-devel] [RFC 20/38] tcg/i386: implement fences

2015-08-25 Thread Paolo Bonzini
> lfence and sfence here serve two purposes: > > 1) Template for other architectures Ok, this makes sense. > 2) x86 code does sometimes have lfence/sfence (e.g. movntq+sfence), >so I guessed they should remain in the translated code. >If on x86 we always ignore the Write-Combining from

Re: [Qemu-devel] [PATCH v2 08/12] qga: move agent run in a seperate function

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:20) > From: Marc-André Lureau > > Once the options are populated, move the running state to > a run_agent() function. > > Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth > --- > qga/main.c | 164 >

Re: [Qemu-devel] [RFC 05/38] thread-posix: inline qemu_spin functions

2015-08-25 Thread Paolo Bonzini
> > I just tested a fetch-and-swap+exp.backoff spinlock with usermode on a > > program that spawns N threads and each thread performs an 2**M atomic > > increments > > on the same variable. That is, a degenerate worst-case kind of contention. > > N varies from 1 to 64, and M=15 on all runs, 5 runs

Re: [Qemu-devel] [RFC 22/38] cpu: update interrupt_request atomically

2015-08-25 Thread Paolo Bonzini
> This patch is needed as is. One real risk this is protecting > against is the call of cpu_interrupt(cpu_foo) when the calling > thread is not cpu_foo's thread--this write to interrupt_request > might race with other writes, e.g. another call to cpu_interrupt > from another thread, or the clearin

Re: [Qemu-devel] [PATCH 0/7] remove useless muldiv64()

2015-08-25 Thread Paolo Bonzini
> Originally, timers were ticks based, and it made sense to > add ticks to current time to know when to trigger an alarm. > > But since commit: > > 7447545 change all other clock references to use nanosecond resolution > accessors > > All timers use nanoseconds and we need to convert ticks to na

Re: [Qemu-devel] [RFC 26/38] cpu: protect tb_jmp_cache with seqlock

2015-08-25 Thread Paolo Bonzini
> The seqlock for tb_jmp_cache is necessary the moment that the > array can be wiped out with a memset(), as shown above. That > function (tb_flush_jmp_cache) is called by tlb_flush_page, > which has many callers. > > One could argue that we could enforce calling tlb_flush_page to be > a) always d

Re: [Qemu-devel] [PATCH v2 06/12] qga: move option parsing to seperate function

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:18) > From: Marc-André Lureau > > Move option parsing out of giant main(). > > Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth > --- > qga/main.c | 165 > +++-- > 1 file

Re: [Qemu-devel] [PATCH v2 07/12] qga: fill default options in main()

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:19) > From: Marc-André Lureau > > Fill all default options during main(). This is a preparation patch > to allow to dump the configuration. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Michael Roth > --- > qga/main.c | 36 ++

Re: [Qemu-devel] [PATCH] target-mips: remove wrong checks for recip.fmt and rsqrt.fmt

2015-08-25 Thread Petar Jovanovic
-Original Message- From: Leon Alrae [mailto:leon.al...@imgtec.com] Sent: Tuesday, August 25, 2015 7:58 PM To: Petar Jovanovic ; qemu-devel@nongnu.org Cc: petar.jovano...@imgtec.com; aurel...@aurel32.net Subject: Re: [Qemu-devel] [PATCH] target-mips: remove wrong checks for recip.fmt and rs

Re: [Qemu-devel] [RFC 00/38] MTTCG: i386, user+system mode

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 19:01:28 -0700, Paolo Bonzini wrote: > > * tb_flush: do it once all other CPUs have been put to sleep by calling > > rcu_synchronize(). > > We also instrument tb_lock to make sure that only one tb_flush request > > can > > happen at a given time. > > What do

Re: [Qemu-devel] [PATCH v2 01/12] qga: misc spelling

2015-08-25 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 12:30 AM, Eric Blake wrote: > It's best to edit your commit message and manually add in that notation, > when sending a v2, so that reviewers know that nothing changed since > last time they approved it: > http://wiki.qemu.org/Contribute/SubmitAPatch Weird, I thought

Re: [Qemu-devel] [PATCH v2 04/12] qga: rename 'path' to 'channel_path'

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:16) > From: Marc-André Lureau > > 'path' is already a global function, rename the variable since it's > going to be in global scope in a later patch. > > Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth > --- > qga/main.c | 9 +

Re: [Qemu-devel] [PATCH v2 05/12] qga: copy argument strings

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:17) > From: Marc-André Lureau > > A following patch will return allocated string. > > Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth > --- > qga/main.c | 57 +++-- > 1 file

Re: [Qemu-devel] [PATCH v2 02/12] qga: use exit() when parsing options

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:14) > From: Marc-André Lureau > > The option parsing is going to be moved to a separate function, > use exit() consistently. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Denis V. Lunev > Reviewed-by: Eric Blake Reviewed-by: Michael

Re: [Qemu-devel] [PATCH v2 01/12] qga: misc spelling

2015-08-25 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-08-25 17:10:13) > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth > --- > qga/qapi-schema.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.jso

Re: [Qemu-devel] [RFC 35/38] cputlb: use cpu_tcg_sched_work for tlb_flush_all

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 18:29:33 -0700, Paolo Bonzini wrote: > > > On 23/08/2015 17:24, Emilio G. Cota wrote: > > Signed-off-by: Emilio G. Cota > > --- > > cputlb.c | 41 +++-- > > 1 file changed, 11 insertions(+), 30 deletions(-) > > As suggested by me and

Re: [Qemu-devel] [PATCH v2 01/12] qga: misc spelling

2015-08-25 Thread Eric Blake
On 08/25/2015 04:10 PM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > qga/qapi-schema.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This already had Reviewed-by in version 1: http://thread.gmane.org/gmane.comp.emulators

[Qemu-devel] [PATCH v2 12/12] qga: start a man page

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Add a simple man page for the qemu agent. Signed-off-by: Marc-André Lureau --- Makefile | 14 +- qemu-doc.texi | 6 +++ qemu-ga.texi | 136 ++ 3 files changed, 154 insertions(+), 2 deletions(-) create

Re: [Qemu-devel] [RFC 33/38] cpu: introduce cpu_tcg_sched_work to run work while other CPUs sleep

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 18:24:55 -0700, Paolo Bonzini wrote: > On 23/08/2015 17:24, Emilio G. Cota wrote: > > This is similar in intent to the async_safe_work mechanism. The main > > differences are: > > > > - Work is run on a single CPU thread *after* all others are put to sleep > > > > - Sleepi

[Qemu-devel] [PATCH v2 10/12] qga: add an optionnal qemu-ga.conf system configuration

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Learn to configure the agent with a system configuration. This may simplify command-line handling, especially when the blacklist is long. Among the other benefits, this may standardize the configuration of a init service (instead of distro-specific init keys/files) Sign

[Qemu-devel] [PATCH v2 08/12] qga: move agent run in a seperate function

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Once the options are populated, move the running state to a run_agent() function. Signed-off-by: Marc-André Lureau --- qga/main.c | 164 + 1 file changed, 89 insertions(+), 75 deletions(-) diff --git a/qga/mai

[Qemu-devel] [PATCH v2 11/12] qga: add --dump-conf option

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau This new option allows to review the agent configuration, and ease the task of writing a configuration file. Signed-off-by: Marc-André Lureau --- qga/main.c | 62 ++ 1 file changed, 62 insertions(+) diff --git

[Qemu-devel] [PATCH v2 09/12] qga: free a bit more

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Now that main() has a single exit point, we can free a few more allocations. Signed-off-by: Marc-André Lureau --- qga/main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 118847c..58f2fc7 100644 --- a/qga/main.c

[Qemu-devel] [PATCH v2 04/12] qga: rename 'path' to 'channel_path'

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau 'path' is already a global function, rename the variable since it's going to be in global scope in a later patch. Signed-off-by: Marc-André Lureau --- qga/main.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qga/main.c b/qga/main.c index e

[Qemu-devel] [PATCH v2 07/12] qga: fill default options in main()

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Fill all default options during main(). This is a preparation patch to allow to dump the configuration. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth --- qga/main.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-

[Qemu-devel] [PATCH v2 06/12] qga: move option parsing to seperate function

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Move option parsing out of giant main(). Signed-off-by: Marc-André Lureau --- qga/main.c | 165 +++-- 1 file changed, 96 insertions(+), 69 deletions(-) diff --git a/qga/main.c b/qga/main.c index 83b7804..a8dda38 1

[Qemu-devel] [PATCH v2 05/12] qga: copy argument strings

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau A following patch will return allocated string. Signed-off-by: Marc-André Lureau --- qga/main.c | 57 +++-- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/qga/main.c b/qga/main.c index ede5306..83b7804

[Qemu-devel] [PATCH v2 03/12] qga: move string split in separate function

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau The function is going to be reused in a later patch. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth --- qga/main.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/qga/main.c b/qga/main.c index 10bb2f7.

[Qemu-devel] [PATCH v2 02/12] qga: use exit() when parsing options

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau The option parsing is going to be moved to a separate function, use exit() consistently. Signed-off-by: Marc-André Lureau Reviewed-by: Denis V. Lunev Reviewed-by: Eric Blake --- qga/main.c | 24 1 file changed, 12 insertions(+), 12 deletions(-

[Qemu-devel] [PATCH v2 00/12] qemu-ga: add a configuration file

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Hi, The following patches for the qemu agent add support for an optionnal configuration file, and a man page. Since v1: - spelling fixes - change device_path to channel_path - moving config to GAConfig struct - do check_is_frozen() during main - use g_key_file_to_data()

[Qemu-devel] [PATCH v2 01/12] qga: misc spelling

2015-08-25 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- qga/qapi-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index 18e3cc3..6b0bd16 100644 --- a/qga/qapi-schema.json +++ b/qga/qapi-schema.json @@ -793,7 +793,7

Re: [Qemu-devel] [RFC 0/2] Reduce the VM downtime about 300us

2015-08-25 Thread Li, Liang Z
> W dniu 2015-08-25 o 07:52, Liang Li pisze: > > This patch is for kvm live migration optimization, it fixes the issue > > which commit 317b0a6d8ba tries to fix in another way, and it can > > reduce the live migration VM downtime about 300us. > > > > *This patch is not tested for the issue commit 3

Re: [Qemu-devel] [PATCH 04/12] qga: rename 'path' to 'device_path'

2015-08-25 Thread Marc-André Lureau
hi On Tue, Aug 25, 2015 at 5:55 PM, Michael Roth wrote: > Quoting Marc-André Lureau (2015-07-01 06:47:39) >> 'path' is already a global function, rename the variable since it's >> going to be in global scope in a later patch. >> >> Signed-off-by: Marc-André Lureau > > I think I'd prefer somethin

Re: [Qemu-devel] [PATCH 06/12] qga: move option parsing to seperate function

2015-08-25 Thread Marc-André Lureau
hi On Tue, Aug 25, 2015 at 6:24 PM, Michael Roth wrote: > Since we want to pass these around as a representation of the > configuration state, I'd rather we package them into a GAConfig > structure or something of the sort that and pass it around as arguments > rather than as globals. Between par

Re: [Qemu-devel] [PATCH 08/12] qga: move agent run in a seperate function

2015-08-25 Thread Marc-André Lureau
On Tue, Aug 25, 2015 at 6:51 PM, Michael Roth wrote: > It's hard to draw the line between what should be in main() as opposed > to run_agent(), but we have some s->frozen initialization happening > here, and then the statefile-based setting s->frozen values being set > in run_agent(), so at least

Re: [Qemu-devel] [PATCH v3 3/4] qemu-ga: Created a separate component for each installed file in the MSI

2015-08-25 Thread Michael Roth
Quoting Michael Roth (2015-08-25 16:48:25) > Quoting Leonid Bloch (2015-08-03 12:54:23) > > This is done to follow the recommendations given here: > > https://msdn.microsoft.com/en-us/library/aa368269%28VS.85%29.aspx > > > > Signed-off-by: Leonid Bloch > > --- > > qga/installer/qemu-ga.wxs | 47

Re: [Qemu-devel] [PATCH 10/12] qga: add --dump-conf option

2015-08-25 Thread Marc-André Lureau
On Tue, Aug 25, 2015 at 7:11 PM, Michael Roth wrote: > I think we're missing fsfreeze_hook option here. > good catch > To me it seems cleaner to actually create the GKeyFile from current > options, then let GLib do all the work of generation a config file > we can spit out (g_key_file_to_data()

Re: [Qemu-devel] [PATCH 12/12] qga: start a man page

2015-08-25 Thread Marc-André Lureau
On Tue, Aug 25, 2015 at 7:43 PM, Michael Roth wrote: > Quoting Marc-André Lureau (2015-07-01 06:47:47) >> Add a simple man page for the qemu agent. >> >> Signed-off-by: Marc-André Lureau >> --- >> Makefile | 14 +- >> qemu-doc.texi | 6 +++ >> qemu-ga.texi | 135 >>

Re: [Qemu-devel] [PATCH v3 0/4] qemu-ga: Fixes to the QEMU GA MSI installer

2015-08-25 Thread Michael Roth
Quoting Leonid Bloch (2015-08-03 12:54:20) > The main purpose here is to fix a bug that caused the QEMU GA VSS service to > be unregistered on reinstallation using the .msi file. > Also, two fixes are introduced to the .wxs file, which is used to create the > MSI with Wixl: GUID capitalization an

Re: [Qemu-devel] [RFC 31/38] cpu: protect l1_map with tb_lock in full-system mode

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 18:07:04 -0700, Paolo Bonzini wrote: > On 23/08/2015 17:24, Emilio G. Cota wrote: > > Note that user-only uses mmap_lock for this. > > > > Signed-off-by: Emilio G. Cota > > Why is this needed? The RCU-like page_find should work just fine. Ouch, you're right, forgot abou

Re: [Qemu-devel] [PATCH] qemu-ga: implement win32 guest-set-user-password

2015-08-25 Thread Marc-André Lureau
ping On Tue, Jun 30, 2015 at 4:37 PM, Marc-André Lureau wrote: > Use NetUserSetInfo() to set the user password. > > This function is notoriously known to be problematic for users with EFS > encrypted files. But the alternative, NetUserChangePassword() requires > the old password. Nevertheless, Th

Re: [Qemu-devel] [PATCH v3 3/4] qemu-ga: Created a separate component for each installed file in the MSI

2015-08-25 Thread Michael Roth
Quoting Leonid Bloch (2015-08-03 12:54:23) > This is done to follow the recommendations given here: > https://msdn.microsoft.com/en-us/library/aa368269%28VS.85%29.aspx > > Signed-off-by: Leonid Bloch > --- > qga/installer/qemu-ga.wxs | 47 > --- > 1

Re: [Qemu-devel] [RFC 26/38] cpu: protect tb_jmp_cache with seqlock

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 18:14:58 -0700, Paolo Bonzini wrote: > On 23/08/2015 17:23, Emilio G. Cota wrote: > > This paves the way for a lockless tb_find_fast. > > > > Signed-off-by: Emilio G. Cota > > --- (snip) > > @@ -1707,12 +1735,14 @@ void tb_flush_jmp_cache(CPUState *cpu, target_ulong > > a

Re: [Qemu-devel] [PATCH v14 30/33] target-tilegx: Handle atomic instructions

2015-08-25 Thread Chen Gang
On 8/25/15 22:28, Richard Henderson wrote: > On 08/25/2015 06:12 AM, Chen Gang wrote: Consider a bundle like { add r0, r0, r1 ; exch r2, r0, r3 } In Chen's implementation, the writeback to r0 would occur before the exception, and so the exch would happen to the w

Re: [Qemu-devel] [PATCH 4/7] arm: remove muldiv64()

2015-08-25 Thread Laurent Vivier
On 25/08/2015 23:11, Peter Crosthwaite wrote: > On Tue, Aug 25, 2015 at 1:44 PM, Laurent Vivier wrote: >> muldiv64() is used to convert microseconds to nanoseconds. >> >> Use qemu_clock_get_ns() instead of qemu_clock_get_us() >> to avoid this operation. >> >> Signed-off-by: Laurent Vivier >> --

Re: [Qemu-devel] [RFC 24/38] cpu-exec: reset mmap_lock after exiting the CPU loop

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 19:01:39 -0700, Paolo Bonzini wrote: > On 23/08/2015 17:23, Emilio G. Cota wrote: > > Otherwise after an exception we end up in a deadlock. > > Can you explain better the path that exits cpu_exec with the lock taken? In fact I cannot :-) So please ignore this patch. I wro

Re: [Qemu-devel] [PATCH 4/7] arm: remove muldiv64()

2015-08-25 Thread Peter Crosthwaite
On Tue, Aug 25, 2015 at 1:44 PM, Laurent Vivier wrote: > muldiv64() is used to convert microseconds to nanoseconds. > > Use qemu_clock_get_ns() instead of qemu_clock_get_us() > to avoid this operation. > > Signed-off-by: Laurent Vivier > --- > target-arm/helper.c | 9 +++-- > 1 file changed,

[Qemu-devel] [PATCH 6/7] bt: remove muldiv64()

2015-08-25 Thread Laurent Vivier
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm. But since commit: 7447545 change all other clock references to use nanosecond resolution accessors All timers use nanoseconds and we need to convert ticks to nanoseconds. As get

[Qemu-devel] [PATCH 5/7] hpet: remove muldiv64()

2015-08-25 Thread Laurent Vivier
hpet defines a clock period in femtoseconds but then converts it to nanoseconds to use the internal timers. We can define the period in nanoseconds and use it directly, this allows to remove muldiv64(). We only need to convert the period to femtoseconds to put it in internal hpet capability regis

[Qemu-devel] [PATCH 3/7] openrisc: remove muldiv64()

2015-08-25 Thread Laurent Vivier
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm. But since commit: 7447545 change all other clock references to use nanosecond resolution accessors All timers use nanoseconds and we need to convert ticks to nanoseconds, by doin

[Qemu-devel] [PATCH 1/7] PCI: remove muldiv64()

2015-08-25 Thread Laurent Vivier
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm. But since commit: 7447545 change all other clock references to use nanosecond resolution accessors All timers use nanoseconds and we need to convert ticks to nanoseconds, by doin

[Qemu-devel] [PATCH 7/7] net: remove muldiv64()

2015-08-25 Thread Laurent Vivier
muldiv64() is used to convert nanoseconds to microseconds. x = muldiv64(y, 100, get_ticks_per_sec()); As get_ticks_per_sec() is 10^9, it can be replaced by: x = y / 1000; Signed-off-by: Laurent Vivier --- net/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[Qemu-devel] [PATCH 0/7] remove useless muldiv64()

2015-08-25 Thread Laurent Vivier
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm. But since commit: 7447545 change all other clock references to use nanosecond resolution accessors All timers use nanoseconds and we need to convert ticks to nanoseconds, by doin

[Qemu-devel] [PATCH 4/7] arm: remove muldiv64()

2015-08-25 Thread Laurent Vivier
muldiv64() is used to convert microseconds to nanoseconds. Use qemu_clock_get_ns() instead of qemu_clock_get_us() to avoid this operation. Signed-off-by: Laurent Vivier --- target-arm/helper.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target-arm/helper.c b/tar

[Qemu-devel] [PATCH 2/7] mips: remove muldiv64()

2015-08-25 Thread Laurent Vivier
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm. But since commit: 7447545 change all other clock references to use nanosecond resolution accessors All timers use nanoseconds and we need to convert ticks to nanoseconds, by doin

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

2015-08-25 Thread Christopher Covington
Hi Peter, On 08/13/2015 12:35 PM, Peter Maydell wrote: > 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

Re: [Qemu-devel] [RFC 22/38] cpu: update interrupt_request atomically

2015-08-25 Thread Emilio G. Cota
On Sun, Aug 23, 2015 at 18:09:48 -0700, Paolo Bonzini wrote: > On 23/08/2015 17:23, Emilio G. Cota wrote: > > Signed-off-by: Emilio G. Cota > > --- > > cpu-exec.c | 9 ++--- > > exec.c | 2 +- > > hw/openrisc/cputimer.c | 2 +-

Re: [Qemu-devel] [PATCH 02/12] qga: use exit() when parsing options

2015-08-25 Thread Denis V. Lunev
On 07/01/2015 02:47 PM, Marc-André Lureau wrote: The option parsing is going to be moved to a seperate function, use exit() consistantly. s/seperate/separate/ s/consistantly/consistently/ Signed-off-by: Marc-André Lureau --- qga/main.c | 24 1 file changed, 12 inse

Re: [Qemu-devel] ARM softmmu breakpoint misbehavior

2015-08-25 Thread Christopher Covington
On 08/24/2015 01:36 PM, Sergey Fedorov wrote: > Hi all, > > Seems there is a bug in ARM breakpoint emulation. I am not sure how to > fix it and I would appreciate any suggestion. It is best illustrated by > a simple test which sets up and enables an unlinked address match > breakpoint but does not

Re: [Qemu-devel] [RFC 05/38] thread-posix: inline qemu_spin functions

2015-08-25 Thread Emilio G. Cota
On Mon, Aug 24, 2015 at 22:30:03 -0400, Emilio G. Cota wrote: > On Sun, Aug 23, 2015 at 18:04:46 -0700, Paolo Bonzini wrote: > > On 23/08/2015 17:23, Emilio G. Cota wrote: > (snip) > > Applied, but in the end the spinlock will probably simply use a simple > > test-and-test-and-set lock, or an MCS l

Re: [Qemu-devel] [RFC 0/2] Reduce the VM downtime about 300us

2015-08-25 Thread Marcin Gibuła
W dniu 2015-08-25 o 07:52, Liang Li pisze: This patch is for kvm live migration optimization, it fixes the issue which commit 317b0a6d8ba tries to fix in another way, and it can reduce the live migration VM downtime about 300us. *This patch is not tested for the issue commit 317b0a6d8ba tries to

Re: [Qemu-devel] [PATCH] CODING_STYLE: update line length and mixed declaration rules

2015-08-25 Thread John Snow
On 08/25/2015 02:20 PM, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 19/06/2015 10:09, Andreas Färber wrote: > -Lines are 80 characters; not longer. > +Lines should be 80 characters; try not to make them longer. > + > +Sometimes it is hard to do, especially when deal

Re: [Qemu-devel] [PATCH] arm: Use g_new() & friends where that makes obvious sense

2015-08-25 Thread Eric Blake
On 08/25/2015 11:39 AM, Markus Armbruster wrote: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > This commi

Re: [Qemu-devel] [PATCH] target-sparc: Store mmu index in TB flags

2015-08-25 Thread Dennis Luehring
Am 25.08.2015 um 20:09 schrieb Richard Henderson: But you're right, it would be nice to put together a coherent set of benchmarks. Ideally, a guest kernel plus minimal ramdisk with the tests pre-loaded so that we can boot and run ./benchmark at the prompt. That's the sort of thing we can easily

Re: [Qemu-devel] [PATCH] qdev-monitor.c: Add device id generation

2015-08-25 Thread Programmingkid
On Aug 25, 2015, at 2:30 PM, Markus Armbruster wrote: > Programmingkid writes: > >> On Aug 25, 2015, at 11:33 AM, Peter Maydell wrote: >> >>> On 25 August 2015 at 16:25, Programmingkid >>> wrote: On Aug 25, 2015, at 8:42 AM, Markus Armbruster wrote: > Eric Blake writes: >

  1   2   3   >