Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Lei Li
On 08/21/2013 06:48 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. You should implement this entirely in the hook. It will be a little less efficient because of the

Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
On 08/23/2013 01:34 PM, Paolo Bonzini wrote: On 08/21/2013 06:40 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: It should set negative error value if there has been an error. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |2 +- 1 files changed, 1

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-23 Thread Bharata B Rao
On Wed, Aug 21, 2013 at 05:40:11PM +0200, Paolo Bonzini wrote: We could just use a bottom half, too. Add a bottom half to acb, schedule it in gluster_finish_aiocb, delete it in the bottom half's own callback. I tried this approach (the patch at the end of this mail), but see this occasional

Re: [Qemu-devel] VNC key presses not correct

2013-08-23 Thread Erik Rull
On August 23, 2013 at 7:42 AM Markus Armbruster arm...@redhat.com wrote: Anthony Liguori anth...@codemonkey.ws writes: On Aug 22, 2013 4:55 PM, Erik Rull erik.r...@rdsoftware.de wrote: Markus Armbruster wrote: Erik Rull erik.r...@rdsoftware.de writes: Markus Armbruster wrote:

[Qemu-devel] [PATCH] migration: Fix debug print type

2013-08-23 Thread Christoffer Dall
The printf args are uint64_t and with -Werr QEMU doesn't compile with migration debugging turned on unless this is fixed. Fix it. Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- migration.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c

Re: [Qemu-devel] [PATCH] migration: Fix debug print type

2013-08-23 Thread Stefan Weil
See my comment below. Am 23.08.2013 09:06, schrieb Christoffer Dall: The printf args are uint64_t and with -Werr QEMU doesn't compile with migration debugging turned on unless this is fixed. Fix it. Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- migration.c |2 +- 1

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 08:48, Bharata B Rao ha scritto: On Wed, Aug 21, 2013 at 05:40:11PM +0200, Paolo Bonzini wrote: We could just use a bottom half, too. Add a bottom half to acb, schedule it in gluster_finish_aiocb, delete it in the bottom half's own callback. I tried this approach (the patch

Re: [Qemu-devel] [PATCH 07/18] arch_init: export RAM_SAVE_xxx flags

2013-08-23 Thread Paolo Bonzini
Il 22/08/2013 22:14, Michael R. Hines ha scritto: On 08/21/2013 06:49 AM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Export RAM_SAVE_xxx flags for localhost migration. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- arch_init.c | 12

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-23 Thread Paolo Bonzini
Il 22/08/2013 22:50, Michael R. Hines ha scritto: On 08/21/2013 11:18 AM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: } else if (strstart(uri, unix:, p)) { +if (s-enabled_capabilities[MIGRATION_CAPABILITY_LOCALHOST]) { +

Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local()

2013-08-23 Thread Lei Li
On 08/23/2013 04:42 AM, Michael R. Hines wrote: On 08/21/2013 03:18 AM, Lei Li wrote: Introduce read/write backend of QEMUFileLocal used by localhost migration. The unix domain socket will be replaced by PIPE with vmsplice mechanism. Signed-off-by: Lei Li li...@linux.vnet.ibm.com ---

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 08:25, Lei Li ha scritto: On 08/21/2013 06:48 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. You should implement this entirely in the hook. It will

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-23 Thread Lei Li
On 08/23/2013 03:40 PM, Paolo Bonzini wrote: Il 22/08/2013 22:50, Michael R. Hines ha scritto: On 08/21/2013 11:18 AM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: } else if (strstart(uri, unix:, p)) { +if (s-enabled_capabilities[MIGRATION_CAPABILITY_LOCALHOST])

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Alex Bligh
--On 23 August 2013 09:48:42 +0200 Paolo Bonzini pbonz...@redhat.com wrote: As a matter of fact, 2^28 madvise system calls will take much, much longer than 100ms. Probably a stupid question, but why would you need to do one call per page? It takes a 'size_t length' parameter. -- Alex

[Qemu-devel] [PATCH] mips/malta: prevent writes to reset flash mapping faulting

2013-08-23 Thread Leon Alrae
From: James Hogan james.ho...@imgtec.com Commit a427338 (mips_malta: correct reading MIPS revision at 0x1fc00010) altered the behaviour of the monitor flash mapping at the reset address by making it read only. However this causes data bus error exceptions when it is written to since it is

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 09:51, Lei Li ha scritto: Because in these patches, the local URI is only present in the destination (which is wrong: the destination should autodetect local mode using the load-page hook). As you can see above, a unix URI will examine the capability and pick the appropriate

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 09:57, Alex Bligh ha scritto: --On 23 August 2013 09:48:42 +0200 Paolo Bonzini pbonz...@redhat.com wrote: As a matter of fact, 2^28 madvise system calls will take much, much longer than 100ms. Probably a stupid question, but why would you need to do one call per page?

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-23 Thread Bharata B Rao
On Fri, Aug 23, 2013 at 09:33:21AM +0200, Paolo Bonzini wrote: (gdb) p *bh $1 = {ctx = 0x0, cb = 0x555ffdcd qemu_gluster_aio_bh, opaque = 0x7fffd00419c0, next = 0x56345e70, scheduled = false, idle = false, deleted = true} This looks like a use-after-free, with bh-ctx

[Qemu-devel] [PATCH V9 08/15] monitor: avoid direct use of global variable *mon_cmds

2013-08-23 Thread Wenchao Xia
New member *cmd_table is added in structure Monitor to avoid direct usage of *mon_cmds. Now monitor have an associated command table, when global variable *info_cmds is also discarded, structure Monitor would gain full control about how to deal with user input. Signed-off-by: Wenchao Xia

[Qemu-devel] [PATCH V9 03/15] monitor: avoid use of global *cur_mon in block_completion_it()

2013-08-23 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- monitor.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 30819fa..6171c75 100644 --- a/monitor.c +++ b/monitor.c @@ -4090,14

[Qemu-devel] [PATCH V9 01/15] monitor: avoid use of global *cur_mon in cmd_completion()

2013-08-23 Thread Wenchao Xia
A new local variable *mon is added in monitor_find_completion() to make compile pass, which will be removed later in conversion patch for monitor_find_completion(). Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- monitor.c | 13 +++--

[Qemu-devel] [PATCH V9 00/15] monitor: support sub command group in auto completion and help

2013-08-23 Thread Wenchao Xia
This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global variables are not directly used in those functions any more. With this series, cmd_table is a member of structure Monitor so it is possible to create a

[Qemu-devel] [PATCH V9 04/15] monitor: avoid use of global *cur_mon in monitor_find_completion()

2013-08-23 Thread Wenchao Xia
Parameter *mon is added, and local variable *mon added in previous patch is removed. The caller readline_completion(), pass rs-mon as value, which should be initialized in readline_init() called by monitor_init(). Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake

[Qemu-devel] [PATCH V9 06/15] monitor: call sortcmdlist() only one time

2013-08-23 Thread Wenchao Xia
It doesn't need to be done for every monitor, so change it. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- monitor.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 63a779f..bf019e2 100644 --- a/monitor.c +++ b/monitor.c @@

[Qemu-devel] [PATCH V9 10/15] monitor: refine parse_cmdline()

2013-08-23 Thread Wenchao Xia
Since this function will be used by help_cmd() later, so improve it to make it more generic and easier to use. free_cmdline_args() is added too as paired function to free the result. One change of this function is that, when the valid args in input exceed the limit of MAX_ARGS, it fails now,

[Qemu-devel] [PATCH V9 11/15] monitor: support sub command in help

2013-08-23 Thread Wenchao Xia
The old code in help_cmd() uses global 'info_cmds' and treats it as a special case. Actually 'info_cmds' is a sub command group of 'mon_cmds', in order to avoid direct use of it, help_cmd() needs to change its work mechanism to support sub command and not treat it as a special case any more. To

[Qemu-devel] [PATCH V9 05/15] monitor: avoid use of global *cur_mon in readline_completion()

2013-08-23 Thread Wenchao Xia
Now all completion functions do not use *cur_mon any more, instead they use rs-mon. In short, structure ReadLineState decide where the complete action would be taken now. Tested with the case that qemu have two telnet monitors, auto completion function works normal. Signed-off-by: Wenchao Xia

[Qemu-devel] [PATCH V9 02/15] monitor: avoid use of global *cur_mon in file_completion()

2013-08-23 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- monitor.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index e0154a8..30819fa 100644 --- a/monitor.c +++ b/monitor.c @@ -4034,7 +4034,7 @@

[Qemu-devel] [PATCH V9 12/15] monitor: refine monitor_find_completion()

2013-08-23 Thread Wenchao Xia
In order to support sub command in auto completion, a reentrant function is needed, so monitor_find_completion() is split into two parts. The first part does parsing of user input which need to be done only once, the second part does the auto completion job according to the parsing result, which

[Qemu-devel] [PATCH V9 07/15] monitor: split off monitor_data_init()

2013-08-23 Thread Wenchao Xia
In qmp_human_monitor_command(), the monitor need to initialized for basic functionalities, and later more init code will be added, so split off this function. Note that it is different with QMP mode monitor which accept json string from monitor's input, qmp_human_monitor_command() retrieve the

[Qemu-devel] [PATCH V9 15/15] monitor: improve auto complete of help for single command in sub group

2013-08-23 Thread Wenchao Xia
Now special case help * in auto completion can work with sub commands, such as help info u*. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- monitor.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/monitor.c

[Qemu-devel] [PATCH V9 09/15] monitor: code move for parse_cmdline()

2013-08-23 Thread Wenchao Xia
help_cmd() need this function later, so move it. get_str() is called by parse_cmdline() so it is moved also. Some code style error reported by check script, is also fixed. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- monitor.c | 191

[Qemu-devel] [PATCH V9 14/15] monitor: allow help show message for single command in sub group

2013-08-23 Thread Wenchao Xia
A new parameter type 'S' is introduced to allow user input any string. help info block works normal now. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- hmp-commands.hx |2 +- monitor.c | 27 +++ 2 files

[Qemu-devel] [PATCH V9 13/15] monitor: support sub command in auto completion

2013-08-23 Thread Wenchao Xia
This patch allows auto completion work normal for sub command case, info block [DEVICE] can auto complete now, by re-enter the completion function. In original code info is treated as a special case, now it is treated as a sub command group, global variable info_cmds is not used any more. help

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-23 Thread Asias He
On Thu, Aug 22, 2013 at 11:51:00AM +0200, Paolo Bonzini wrote: Il 22/08/2013 11:50, Asias He ha scritto: On Wed, Aug 21, 2013 at 10:16:02AM +0200, Paolo Bonzini wrote: Il 21/08/2013 04:02, Asias He ha scritto: In block/gluster.c, we have gluster_finish_aiocb { if (retval !=

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-23 Thread Andrew Jones
- Original Message - Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by: Wanlong Gao

Re: [Qemu-devel] [PATCH V9 08/12] NUMA: set guest numa nodes memory policy

2013-08-23 Thread Andrew Jones
- Original Message - Set the guest numa nodes memory policies using the mbind(2) system call node by node. After this patch, we are able to set guest nodes memory policies through the QEMU options, this arms to solve the guest cross nodes memory access performance issue. And as you

Re: [Qemu-devel] pvpanic plans?

2013-08-23 Thread Paolo Bonzini
Il 22/08/2013 22:39, Anthony Liguori ha scritto: On Thu, Aug 22, 2013 at 3:36 PM, Laszlo Ersek ler...@redhat.com wrote: On 08/22/13 22:09, Anthony Liguori wrote: The difference is that ACPI or platform devices in general are unexpected to be added. By definition it means that the motherboard

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Lei Li
On 08/23/2013 03:48 PM, Paolo Bonzini wrote: Il 23/08/2013 08:25, Lei Li ha scritto: On 08/21/2013 06:48 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. You should

[Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23

2013-08-23 Thread Paolo Bonzini
Anthony, The following changes since commit f03d07d4683b2e8325a7cb60b4e14b977b1a869c: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-23 10:57:23 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for

[Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-23 Thread Paolo Bonzini
From: Arthur Chunqi Li yzt...@gmail.com The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com Signed-off-by: Gleb Natapov

[Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h

2013-08-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-i386/cpu.h | 192 +++--- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3a52f94..af4c0f7 100644 --- a/target-i386/cpu.h +++

[Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support

2013-08-23 Thread Paolo Bonzini
From: Vincenzo Maffione v.maffi...@gmail.com Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as resamplefd. See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 10:32, Asias He ha scritto: On Thu, Aug 22, 2013 at 11:51:00AM +0200, Paolo Bonzini wrote: Il 22/08/2013 11:50, Asias He ha scritto: On Wed, Aug 21, 2013 at 10:16:02AM +0200, Paolo Bonzini wrote: Il 21/08/2013 04:02, Asias He ha scritto: In block/gluster.c, we have

[Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled

2013-08-23 Thread Paolo Bonzini
From: Liu Jinsong jinsong@intel.com This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623 IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs or kvm_get_msrs. Signed-off-by: Liu

[Qemu-devel] [PULL 3/9] kvm: migrate vPMU state

2013-08-23 Thread Paolo Bonzini
Reviewed-by: Gleb Natapov gnata...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-i386/cpu.h | 23 + target-i386/kvm.c | 93 --- target-i386/machine.c | 44 3 files changed, 155

[Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io

2013-08-23 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com Now that cpu_in/out is just a wrapper around address_space_rw, we can also call the latter directly. As host endianness == guest endianness, there is no need for the memory access helpers st*_p/ld*_p as well. Signed-off-by: Jan Kiszka

[Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti mtosa...@redhat.com maxcpus, which specifies the maximum number of hotpluggable CPUs, should not exceed KVM's vcpu limit. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com [Reword message. - Paolo] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- kvm-all.c | 7 +++

[Qemu-devel] [PULL 8/9] kvm: i386: fix LAPIC TSC deadline timer save/restore

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti mtosa...@redhat.com The configuration of the timer represented by MSR_IA32_TSCDEADLINE depends on: - APIC LVT Timer register. - TSC value. Change the order to respect the dependency. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Paolo Bonzini
get_real_device() has 5 parameters with the last 4 is contained in the first structure. This patch removes the last 4 parameters and directly use them from the first parameter. Acked-by: Alex Williamson alex.william...@redhat.com Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com Signed-off-by:

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Lei Li
On 08/23/2013 01:34 PM, Paolo Bonzini wrote: Say, In ram_save_iterate(), the current logic is: ret = qemu_file_rate_limit(); while(ret == 0) { save RAM blocks until no more to send. } if (ret 0) { return ret; } ... And in savevm layer, qemu_savevm_state_iterate() set an error if

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 11:00, Lei Li ha scritto: The performance assurance is very important to this feature, our goal is 100ms of downtime for a 1TB guest. I honestly doubt that 100ms of downtime is possible while the machine is stopped. A 1TB guest has 2^28 = 268*10^6 pages, which you want to

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 11:11, Lei Li ha scritto: In qemu_savevm_state_iterate(), if the return of ram_save_iterate 0, it will set error in QEMUFile by qemu_file_set_error(f, ret), the error reported by qemu_file_get_error() in the QEMUFile is got from qemu_file_set_error() by reading the

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Lei Li
On 08/23/2013 05:14 PM, Paolo Bonzini wrote: Il 23/08/2013 11:11, Lei Li ha scritto: In qemu_savevm_state_iterate(), if the return of ram_save_iterate 0, it will set error in QEMUFile by qemu_file_set_error(f, ret), the error reported by qemu_file_get_error() in the QEMUFile is got from

[Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-23 Thread Alexey Kardashevskiy
From: Nikunj A Dadhania nik...@linux.vnet.ibm.com This implements capabilities exchange between host and client. As at the moment no capability is supported, put zero flags everywhere and return. Signed-off-by: Nikunj A Dadhania nik...@linux.vnet.ibm.com Signed-off-by: Alexey Kardashevskiy

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-23 Thread Lei Li
On 08/23/2013 04:01 PM, Paolo Bonzini wrote: Il 23/08/2013 09:51, Lei Li ha scritto: Because in these patches, the local URI is only present in the destination (which is wrong: the destination should autodetect local mode using the load-page hook). As you can see above, a unix URI will examine

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 11:18, Lei Li ha scritto: And now as qemu_file_rate_limit() never return negative value, what's the meaning for the check: if (qemu_file_rate_limit(f) 0) in ram_save_iterate()? I only see a while ((ret = qemu_file_rate_limit(f)) == 0), no less-than-zero check. Are we

[Qemu-devel] [PATCH] spapr-vscsi: Report error on unsupported MAD requests

2013-08-23 Thread Alexey Kardashevskiy
The existing driver just dropped unsupported requests. This adds error responses to those unhandled requests. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- hw/scsi/spapr_vscsi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/scsi/spapr_vscsi.c

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Lei Li
On 08/23/2013 05:22 PM, Paolo Bonzini wrote: Il 23/08/2013 11:18, Lei Li ha scritto: And now as qemu_file_rate_limit() never return negative value, what's the meaning for the check: if (qemu_file_rate_limit(f) 0) in ram_save_iterate()? I only see a while ((ret = qemu_file_rate_limit(f)) ==

Re: [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Wei Yang
Paolo, Is it necessary to add this? From: Wei Yang weiy...@linux.vnet.ibm.com On Fri, Aug 23, 2013 at 11:03:35AM +0200, Paolo Bonzini wrote: get_real_device() has 5 parameters with the last 4 is contained in the first structure. This patch removes the last 4 parameters and directly use them

Re: [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 11:37, Wei Yang ha scritto: Paolo, Is it necessary to add this? From: Wei Yang weiy...@linux.vnet.ibm.com Right, I'll send v2 right away. Paolo On Fri, Aug 23, 2013 at 11:03:35AM +0200, Paolo Bonzini wrote: get_real_device() has 5 parameters with the last 4 is contained

[Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23

2013-08-23 Thread Paolo Bonzini
Anthony, The following changes since commit f03d07d4683b2e8325a7cb60b4e14b977b1a869c: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-23 10:57:23 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for

[Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io

2013-08-23 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com Now that cpu_in/out is just a wrapper around address_space_rw, we can also call the latter directly. As host endianness == guest endianness, there is no need for the memory access helpers st*_p/ld*_p as well. Signed-off-by: Jan Kiszka

[Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-23 Thread Paolo Bonzini
From: Arthur Chunqi Li yzt...@gmail.com The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com Signed-off-by: Gleb Natapov

[Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti mtosa...@redhat.com maxcpus, which specifies the maximum number of hotpluggable CPUs, should not exceed KVM's vcpu limit. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com [Reword message. - Paolo] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- kvm-all.c | 7 +++

[Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h

2013-08-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-i386/cpu.h | 192 +++--- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3a52f94..af4c0f7 100644 --- a/target-i386/cpu.h +++

[Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support

2013-08-23 Thread Paolo Bonzini
From: Vincenzo Maffione v.maffi...@gmail.com Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as resamplefd. See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for

[Qemu-devel] [PULL 8/9] kvm: i386: fix LAPIC TSC deadline timer save/restore

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti mtosa...@redhat.com The configuration of the timer represented by MSR_IA32_TSCDEADLINE depends on: - APIC LVT Timer register. - TSC value. Change the order to respect the dependency. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Paolo Bonzini
get_real_device() has 5 parameters with the last 4 is contained in the first structure. This patch removes the last 4 parameters and directly use them from the first parameter. Acked-by: Alex Williamson alex.william...@redhat.com Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com Signed-off-by:

[Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled

2013-08-23 Thread Paolo Bonzini
From: Liu Jinsong jinsong@intel.com This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623 IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs or kvm_get_msrs. Signed-off-by: Liu

[Qemu-devel] [PULL 3/9] kvm: migrate vPMU state

2013-08-23 Thread Paolo Bonzini
Reviewed-by: Gleb Natapov gnata...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-i386/cpu.h | 23 + target-i386/kvm.c | 93 --- target-i386/machine.c | 44 3 files changed, 155

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Paolo Bonzini
Il 22/08/2013 17:39, Andrew Jones ha scritto: The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of vcpus that kvm supports. It is, but by always returning the maximum number supported. The maximum number

[Qemu-devel] [PATCH 1/3] savevm: add comments for qemu_file_get_error()

2013-08-23 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++

[Qemu-devel] [PATCH 2/3] savevm: wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..fb17a6f 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags)

[Qemu-devel] [PATCH 3/3] arch_init: right return for ram_save_iterate

2013-08-23 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- arch_init.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 94d45e1..a34437c 100644 --- a/arch_init.c +++ b/arch_init.c @@ -709,16 +709,11 @@ static int ram_save_iterate(QEMUFile *f,

Re: [Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-23 Thread Andreas Färber
Am 23.08.2013 11:39, schrieb Paolo Bonzini: From: Arthur Chunqi Li yzt...@gmail.com The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li

Re: [Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 12:10, Andreas Färber ha scritto: Am 23.08.2013 11:39, schrieb Paolo Bonzini: From: Arthur Chunqi Li yzt...@gmail.com The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add

Re: [Qemu-devel] [PATCH 2/3] savevm: wrong error set by ram_control_load_hook()

2013-08-23 Thread Paolo Bonzini
Il 23/08/2013 12:03, Lei Li ha scritto: Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..fb17a6f 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,7 @@ void

Re: [Qemu-devel] [PATCH 0/3] Patchset description

2013-08-23 Thread Gerd Hoffmann
On Fr, 2013-08-23 at 03:18 +0200, Ákos Kovács wrote: Patch 1: Move sysbus and PCI specific code to a new files from hw/usb/hcd-ohci.c. Looks good, except that it breaks ohci due to not compiling the new files. Patch 2: Make them new configuration variables *_OHCI_SYSBUS and *_OHCI_PCI and

Re: [Qemu-devel] [PATCH] qcow2: Change default for new images to compat=1.1

2013-08-23 Thread Ján Tomko
On 08/19/2013 11:25 AM, Kevin Wolf wrote: By the time that qemu 1.7 will be released, enough time will has passed since qemu 1.1, which is the first version to understand version 3 images, that changing the default shouldn't hurt many people any more and the benefits of using the new format

Re: [Qemu-devel] [PATCH] mips/malta: prevent writes to reset flash mapping faulting

2013-08-23 Thread Andreas Färber
Am 23.08.2013 09:59, schrieb Leon Alrae: From: James Hogan james.ho...@imgtec.com Commit a427338 (mips_malta: correct reading MIPS revision at 0x1fc00010) altered the behaviour of the monitor flash mapping at the reset address by making it read only. However this causes data bus error

Re: [Qemu-devel] [PATCH] pseries: Update SLOF firmware image

2013-08-23 Thread Alexey Kardashevskiy
On 08/23/2013 07:17 PM, Alexey Kardashevskiy wrote: This has reworked USB OHCI and adds support of USB EHCI, VIRTIO-SCSI and various fixes (IBM VSCSI, VGA and more). Oh. Please ignore that, just found out that there are more patches for SLOF. -- Alexey

Re: [Qemu-devel] [PATCH 1/3] hw/usb/hcd-ohci.c: Move sysbus and PCI code to new files

2013-08-23 Thread Andreas Färber
Am 23.08.2013 03:18, schrieb Ákos Kovács: Move the existing sysbus and PCI logic to hcd-ohci-sysbus.c and hcd-ohci-pci.c from hcd-ohci.c. Create a new hcd-ohci.h header for the shared declarations and macros. Signed-off-by: Ákos Kovács akoskov...@gmx.com --- hw/usb/hcd-ohci-pci.c|

[Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-23 Thread Alexey Kardashevskiy
PAPR+ requires two RTAS calls to be supported by the hypervisor in order to allow hotplugging VCPUs from the guest. The start-cpu RTAS call was already there but stop-self was not. This adds the stop-self RTAS call. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- hw/ppc/spapr_rtas.c | 14

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Andrew Jones
- Original Message - Am 22.08.2013 18:12, schrieb Eduardo Habkost: On 22/08/2013, at 12:39, Andrew Jones drjo...@redhat.com wrote: The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Andrew Jones
- Original Message - Il 22/08/2013 17:39, Andrew Jones ha scritto: The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of vcpus that kvm supports. It is, but by always returning the maximum

Re: [Qemu-devel] [PATCH v3 2/8] xics: add pre_save/post_load/cpu_setup dispatchers

2013-08-23 Thread Andreas Färber
Am 23.08.2013 05:39, schrieb Alexey Kardashevskiy: On 08/19/2013 11:54 PM, Andreas Färber wrote: Am 19.08.2013 07:55, schrieb Alexey Kardashevskiy: The upcoming support of in-kernel XICS will redefine migration callbacks for both ICS and ICP so classes and callback pointers are added. This

Re: [Qemu-devel] [PATCH v3 0/8] xics: reworks and in-kernel support

2013-08-23 Thread Andreas Färber
Am 19.08.2013 07:55, schrieb Alexey Kardashevskiy: Yet another try with XICS-KVM. v2-v3: Addressed multiple comments from Andreas; Added 2 patches for XICS from Ben - I included them into the series as they are about XICS and they won't rebase automatically if moved before XICS rework so

[Qemu-devel] [PATCH v3] xics: Add H_IPOLL implementation

2013-08-23 Thread Alexey Kardashevskiy
From: Benjamin Herrenschmidt b...@kernel.crashing.org This adds support for the H_IPOLL hypercall which the guest uses to poll for a pending interrupt. This hypercall is mandatory for PAPR+ and there is no way for the guest to detect whether it is supported or not so just add it. Signed-off-by:

[Qemu-devel] [PATCH v3] xics: Implement H_XIRR_X

2013-08-23 Thread Alexey Kardashevskiy
From: Benjamin Herrenschmidt b...@kernel.crashing.org This implements H_XIRR_X hypercall in addition to H_XIRR as it is mandatory for PAPR+ and there is no way for the guest to detect whether it is supported or not so just add it. As the Partition Adjunct Option is not supported at the moment,

Re: [Qemu-devel] [PATCH v3 0/8] xics: reworks and in-kernel support

2013-08-23 Thread Alexey Kardashevskiy
On 08/23/2013 09:56 PM, Andreas Färber wrote: Am 19.08.2013 07:55, schrieb Alexey Kardashevskiy: Yet another try with XICS-KVM. v2-v3: Addressed multiple comments from Andreas; Added 2 patches for XICS from Ben - I included them into the series as they are about XICS and they won't rebase

[Qemu-devel] [PATCH] kvm: sync cpu state on internal error before dump

2013-08-23 Thread James Hogan
When a KVM internal error occurs QEMU dumps the CPU state, however it doesn't synchronise the state from KVM first so the dumped state is out of date. Add the synchronisation calls before the dump in both locations (which is used depends on whether the arch says to stop or not). Note that x86

Re: [Qemu-devel] [PATCH v4 0/6] Clean up bogus default boot order

2013-08-23 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: On Fri, Aug 16, 2013 at 01:13:44PM +0200, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com The first five patches are admittedly related to the stated purpose of this series pretty much only by I can't stand perpetuating this

Re: [Qemu-devel] [PATCH 2/3] savevm: wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
On 08/23/2013 06:12 PM, Paolo Bonzini wrote: Il 23/08/2013 12:03, Lei Li ha scritto: Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..fb17a6f 100644 --- a/savevm.c +++

Re: [Qemu-devel] [PATCH] kvm: sync cpu state on internal error before dump

2013-08-23 Thread Gleb Natapov
On Fri, Aug 23, 2013 at 01:26:00PM +0100, James Hogan wrote: When a KVM internal error occurs QEMU dumps the CPU state, however it doesn't synchronise the state from KVM first so the dumped state is out of date. Add the synchronisation calls before the dump in both locations (which is used

[Qemu-devel] [PATCH v2] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Andrew Jones
The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of vcpus that kvm supports. It is, but by always returning the maximum number supported. The maximum number should only be used for development purposes. qemu

[Qemu-devel] [PATCH resend 1/3] savevm: add comments for qemu_file_get_error()

2013-08-23 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++

[Qemu-devel] [PATCH resend 3/3] arch_init: right return for ram_save_iterate

2013-08-23 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- arch_init.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 94d45e1..a34437c 100644 --- a/arch_init.c +++ b/arch_init.c @@ -709,16 +709,11 @@ static int ram_save_iterate(QEMUFile *f,

[Qemu-devel] [PATCH 0/2] object_initialize: check size of passed in memory

2013-08-23 Thread Peter Maydell
This patchset addresses a concern that came up with Andreas' recent patches for using embedded objects in some of the ARM CPU devices: object_initialize() doesn't check that there's actually enough space for the type being added, so if you have: struct MyDevice { ... SomeObject obj; };

Re: [Qemu-devel] [PATCH] kvm: sync cpu state on internal error before dump

2013-08-23 Thread James Hogan
On 23/08/13 13:58, Gleb Natapov wrote: On Fri, Aug 23, 2013 at 01:26:00PM +0100, James Hogan wrote: When a KVM internal error occurs QEMU dumps the CPU state, however it doesn't synchronise the state from KVM first so the dumped state is out of date. Add the synchronisation calls before the

[Qemu-devel] [PATCH resend 2/3] savevm: fix wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
It should set negative error value if there has been an error. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..a0be109 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,7 @@

  1   2   3   >