[PATCH v3 3/3] KVM: make make_all_cpus_request() lockless

2011-01-11 Thread Xiao Guangrong
Now, we have 'vcpu->mode' to judge whether need to send ipi to other cpus, this way is very exact, so checking request bit is needless, then we can drop the spinlock let it's collateral Signed-off-by: Xiao Guangrong --- include/linux/kvm_host.h |6 -- virt/kvm/kvm_main.c |9 +++-

[PATCH v3 2/3] KVM: send IPI to vcpu only when it's in guest mode

2011-01-11 Thread Xiao Guangrong
We can interrupt the vcpu only when it's running in guest mode to reduce IPI Also 1: No need atomically to read/write ->mode in vcpu's thread 2: reorganize struct kvm_vcpu to make ->mode and ->requests in the same cache line explicitly Signed-off-by: Xiao Guangrong --- arch/ia64/kvm/kvm-ia6

[PATCH v3 1/3] KVM: fix rcu usage warning in kvm_arch_vcpu_ioctl_set_sregs()

2011-01-11 Thread Xiao Guangrong
Fix: [ 1001.499596] === [ 1001.499599] [ INFO: suspicious rcu_dereference_check() usage. ] [ 1001.499601] --- [ 1001.499604] include/linux/kvm_host.h:301 invoked rcu_dereference_check() without protect

Re: [PATCH 0/3 v7] MSI-X MMIO support for KVM

2011-01-11 Thread Sheng Yang
On Thursday 06 January 2011 18:19:42 Sheng Yang wrote: > Change from v6: > 1. Discard PBA support. But we can still add it later. > 2. Fix one memory reference bug > 3. Add automatically MMIO unregister after device was deassigned. > 4. Update according to Avi's comments. > 5. Add documents for new

[KVM-AUTOTEST PATCH 3/4] KVM test: don't re-raise a background exception if something went wrong in the main thread

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- .../kvm/tests/migration_with_file_transfer.py |7 ++- client/tests/kvm/tests/migration_with_reboot.py|7 ++- client/tests/kvm/tests/vmstop.py |5 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a

[KVM-AUTOTEST PATCH 4/4] KVM test: VM.migrate(): make sure the VM is alive after migration

2011-01-11 Thread Michael Goldish
Also add a context() call to make the VMDeadError exception more descriptive. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index a69a191..18d10ef

[KVM-AUTOTEST PATCH 2/4] KVM test: kvm_utils.Thread.join(): allow suppressing the exception

2011-01-11 Thread Michael Goldish
If suppress_exception is True, the exception raised in the thread will not be re-raised. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_utils.py | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_u

[KVM-AUTOTEST PATCH 1/4] KVM test: kvm_vm.py: add status and output to VMDeadError

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 0403569..a69a191 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.p

Re: [PATCH] KVM test: qmp_basic: Go through available monitors to find a qmp one

2011-01-11 Thread Luiz Capitulino
On Tue, 11 Jan 2011 14:55:47 -0200 Lucas Meneghel Rodrigues wrote: > It is more convenient to look at all available monitors that the VM > has and return the first qmp monitor than relying that the qmp monitor > will be allways be the primary one. In case we can't find one, just > error the test

[KVM-AUTOTEST 08/26 v3] KVM test: unattended_install.py style changes

2011-01-11 Thread Lucas Meneghel Rodrigues
- Use vm.verify_alive() instead of vm.is_alive(). - Use error.context() so that if verify_alive() fails the resulting error message will be clearer. - Make the code a little bit shorter. - Catch VMAddressError (can be raised by vm.get_address()). - Use double quotes for consistency. - Modify de

[KVM-AUTOTEST,08/26] KVM test: unattended_install.py style changes

2011-01-11 Thread Lucas Meneghel Rodrigues
- Use vm.verify_alive() instead of vm.is_alive(). - Use error.context() so that if verify_alive() fails the resulting error message will be clearer. - Make the code a little bit shorter. - Catch VMAddressError (can be raised by vm.get_address()). - Use double quotes for consistency. - Modify de

Re: [GIT PULL] KVM updates for the 2.6.38 merge window

2011-01-11 Thread Avi Kivity
On 01/11/2011 06:19 PM, Linus Torvalds wrote: On Tue, Jan 11, 2011 at 1:25 AM, Avi Kivity wrote: What are your issues with the patch? My issues are mainly two-fold: - I think "MINOR" is a totally idiotic and meaningless term. It has no technical meaning. Why would IO be special? Is it becau

Re: Using KVM to debug Kernel.

2011-01-11 Thread Prudhvi Krishna Surapaneni
Hi!, Just a note. I tested this on the latest snapshot from the git repo. It still looks like the problem exists. kvm -version 0.13.50 Is this a problem or am i doing it plain wrong?. Is this not a way to debug a kernel? Thanks, Prudhvi Krishna Surapaneni. -- To unsubscribe from this list: send

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-11 Thread Jan Kiszka
Am 11.01.2011 09:53, Gerd Hoffmann wrote: > Hi, > >> Actually, there is already a channel to pass pointers to qdev devices: >> the pointer property hack. I'm not sure we should contribute to its user >> base or take the chance for a cleanup, but we are not alone with this >> requirement. Point b

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 06:26 PM, Anthony Liguori wrote: Visible, yes, but not in live migration, or in 'info i8254', or similar. We can live migrate between qcow2 and qed (using block migration), we should be able to do the same for the two i8254 implementations. I'm not happy about separate implem

Re: [PATCH 2/2 v2] KVM Test: Fix qmp_basic test failure in qmp-kvm-0.12.*

2011-01-11 Thread Lucas Meneghel Rodrigues
On Mon, 2011-01-10 at 18:48 +0800, qz...@redhat.com wrote: > From: Qingtang Zhou > > QMP in qemu-kvm-0.12.* has some difference from QMP in qemu-kvm-0.13.*. > These difference cause 'qmp_basic' test fail while running on older qemu-kvm. > > This patch will fix these failures, make 'qmp_basic' ru

[PATCH] KVM test: qmp_basic: Go through available monitors to find a qmp one

2011-01-11 Thread Lucas Meneghel Rodrigues
It is more convenient to look at all available monitors that the VM has and return the first qmp monitor than relying that the qmp monitor will be allways be the primary one. In case we can't find one, just error the test with a more descriptive message Also, clarify the exception thrown when the

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
Visible, yes, but not in live migration, or in 'info i8254', or similar. We can live migrate between qcow2 and qed (using block migration), we should be able to do the same for the two i8254 implementations. I'm not happy about separate implementations, but that's a minor details. We can

Re: [GIT PULL] KVM updates for the 2.6.38 merge window

2011-01-11 Thread Linus Torvalds
On Tue, Jan 11, 2011 at 1:25 AM, Avi Kivity wrote: > > What are your issues with the patch? My issues are mainly two-fold: - I think "MINOR" is a totally idiotic and meaningless term. It has no technical meaning. Why would IO be special? Is it because of deadlock concerns with filesystem or blo

Errors on MMIO read access on VM suspend / resume operations

2011-01-11 Thread Stefan Berger
Hi! I am currently doing some long-term testing of a device model using memory mapped IO (TPM TIS) and am seeing some strange errors when the suspend occurs in the middle of a read operation in the Linux TPM TIS device driver where the driver reads the result packet from the mmio location.

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 05:55 PM, Anthony Liguori wrote: One thing I've been considering is essentially migration filters. It would be a set of rules that essentially were "hpet-kvm.* = hpet.*" which would allow migration from hpet to hpet-kvm given a translation of state. I think this sort of high

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
On 01/11/2011 09:37 AM, Avi Kivity wrote: Why not? Whatever state the kernel keeps, we expose to userspace and allow sending it over the wire. What exactly is the scenario you're concerned about? Migration between userspace HPET and in-kernel HPET? Yes. To a lesser extent, a client doing '

KVM call minutes for Jan 11

2011-01-11 Thread Chris Wright
KVM Forum 2011 - expand the scope? yes, continue up the stack - how long? 2 days (maybe 2 1/2 - 3 space permitting) - where? Vancouver with LinuxCon Spice guest agent: - virt agent, matahari, spice agent...what is in spice agent? - spice char device - mouse, copy 'n paste, screen resolution ch

Using KVM to debug Kernel.

2011-01-11 Thread Prudhvi Krishna Surapaneni
Hi List, I am trying to use KVM to debug Linux kernel with GDB. However, when i set a break-point at start_kernel, it doesn't break at the function. It continues without any break-point. The kvm cmd line i used: kvm -s -S -had /dev/zero -kernel /home/prudhvi/kbuilds/linux-2.6.37/arch/x86/boot/bz

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 05:12 PM, Anthony Liguori wrote: No, it really doesn't :-) Cirrus VGA and std VGA share a lot of code. But that doesn't mean that we treat them as one device. Cirrus and VGA really are separate devices. They share code because on evolved from the other, and is backwards compat

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Alexander Graf
On 11.01.2011, at 16:12, Anthony Liguori wrote: > On 01/11/2011 08:56 AM, Avi Kivity wrote: >> On 01/11/2011 04:36 PM, Anthony Liguori wrote: They need to use the same device id then. And if they share code, that indicates that they need to be the same device even more. >>> >>> >>>

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
On 01/11/2011 08:56 AM, Avi Kivity wrote: On 01/11/2011 04:36 PM, Anthony Liguori wrote: They need to use the same device id then. And if they share code, that indicates that they need to be the same device even more. No, it really doesn't :-) Cirrus VGA and std VGA share a lot of code. B

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 04:36 PM, Anthony Liguori wrote: They need to use the same device id then. And if they share code, that indicates that they need to be the same device even more. No, it really doesn't :-) Cirrus VGA and std VGA share a lot of code. But that doesn't mean that we treat them as

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 04:28 PM, Anthony Liguori wrote: On 01/11/2011 08:18 AM, Avi Kivity wrote: On 01/11/2011 04:00 PM, Anthony Liguori wrote: On 01/11/2011 03:01 AM, Avi Kivity wrote: On 01/10/2011 10:23 PM, Anthony Liguori wrote: I don't see how ioapic, pit, or pic have a system scope. They are no

Re: BUG: sleeping function called from invalid context at mm/slub.c:793

2011-01-11 Thread Christoph Lameter
Reviewed-by: Christoph Lameter -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Qemu-devel] Re: KVM call agenda for Jan 11

2011-01-11 Thread Anthony Liguori
On 01/11/2011 07:41 AM, Juan Quintela wrote: Kevin Wolf wrote: Am 10.01.2011 14:32, schrieb Juan Quintela: Juan Quintela wrote: Juan Quintela wrote: Now sent it to the right kvm list. Sorry for the second sent. Please send any agenda items you are interested

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
On 01/11/2011 08:22 AM, Avi Kivity wrote: On 01/11/2011 04:09 PM, Anthony Liguori wrote: Disadvantages: 1) you lose migration / savevm between KVM and non-KVM VMs This doesn't work today and it's never worked. KVM exposes things that TCG cannot emulate (like pvclock). If you run kvm witho

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
On 01/11/2011 08:18 AM, Avi Kivity wrote: On 01/11/2011 04:00 PM, Anthony Liguori wrote: On 01/11/2011 03:01 AM, Avi Kivity wrote: On 01/10/2011 10:23 PM, Anthony Liguori wrote: I don't see how ioapic, pit, or pic have a system scope. They are not bound to any CPU like the APIC which you may h

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Alexander Graf
On 11.01.2011, at 15:09, Anthony Liguori wrote: > On 01/11/2011 08:06 AM, Alexander Graf wrote: >> On 11.01.2011, at 15:00, Anthony Liguori wrote: >> >> >>> On 01/11/2011 03:01 AM, Avi Kivity wrote: >>> On 01/10/2011 10:23 PM, Anthony Liguori wrote: >>> I don't see h

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 04:09 PM, Anthony Liguori wrote: Disadvantages: 1) you lose migration / savevm between KVM and non-KVM VMs This doesn't work today and it's never worked. KVM exposes things that TCG cannot emulate (like pvclock). If you run kvm without pvclock, or implement pvclock in qemu, i

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Avi Kivity
On 01/11/2011 04:00 PM, Anthony Liguori wrote: On 01/11/2011 03:01 AM, Avi Kivity wrote: On 01/10/2011 10:23 PM, Anthony Liguori wrote: I don't see how ioapic, pit, or pic have a system scope. They are not bound to any CPU like the APIC which you may have in mind. And none of the above inter

Re: [PATCH unit-tests 3/3] Test that vcpu does not continue to run after issuing S3.

2011-01-11 Thread Gleb Natapov
On Tue, Jan 11, 2011 at 04:08:21PM +0200, Avi Kivity wrote: > On 01/11/2011 03:54 PM, Gleb Natapov wrote: > >On Tue, Jan 11, 2011 at 03:53:08PM +0200, Avi Kivity wrote: > >> On 01/11/2011 03:30 PM, Gleb Natapov wrote: > >> >+ > >> >+asm ( > >> >+".global resume_start\n" > >> >+

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
On 01/11/2011 08:06 AM, Alexander Graf wrote: On 11.01.2011, at 15:00, Anthony Liguori wrote: On 01/11/2011 03:01 AM, Avi Kivity wrote: On 01/10/2011 10:23 PM, Anthony Liguori wrote: I don't see how ioapic, pit, or pic have a system scope. They are not bound t

Re: [PATCH unit-tests 3/3] Test that vcpu does not continue to run after issuing S3.

2011-01-11 Thread Avi Kivity
On 01/11/2011 03:54 PM, Gleb Natapov wrote: On Tue, Jan 11, 2011 at 03:53:08PM +0200, Avi Kivity wrote: > On 01/11/2011 03:30 PM, Gleb Natapov wrote: > >+ > >+asm ( > >+".global resume_start\n" > >+ ".global resume_end\n" > >+ ".code16\n" > >+ "resume_start:\n" > >+

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Alexander Graf
On 11.01.2011, at 15:00, Anthony Liguori wrote: > On 01/11/2011 03:01 AM, Avi Kivity wrote: >> On 01/10/2011 10:23 PM, Anthony Liguori wrote: > I don't see how ioapic, pit, or pic have a system scope. They are not bound to any CPU like the APIC which you may have in mind. >>> >>> And no

Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-11 Thread Anthony Liguori
On 01/11/2011 03:01 AM, Avi Kivity wrote: On 01/10/2011 10:23 PM, Anthony Liguori wrote: I don't see how ioapic, pit, or pic have a system scope. They are not bound to any CPU like the APIC which you may have in mind. And none of the above interact with KVM. They're implemented by kvm. Wha

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-11 Thread Anthony Liguori
On 01/11/2011 03:31 AM, Markus Armbruster wrote: Jan Kiszka writes: Am 10.01.2011 22:06, Jan Kiszka wrote: kvmclock should be created with kvm_state as a parameter and kvm_vm_ioctl() is passed the stored reference. Taking a global reference to kvm_state in machine_init is not a

Re: [PATCH unit-tests 3/3] Test that vcpu does not continue to run after issuing S3.

2011-01-11 Thread Gleb Natapov
On Tue, Jan 11, 2011 at 03:53:08PM +0200, Avi Kivity wrote: > On 01/11/2011 03:30 PM, Gleb Natapov wrote: > >+ > >+asm ( > >+".global resume_start\n" > >+".global resume_end\n" > >+".code16\n" > >+"resume_start:\n" > >+"mov 0x0, %eax\n" > >+"mov $0xf4, %dx\n" > >+"ou

Re: [PATCH unit-tests 3/3] Test that vcpu does not continue to run after issuing S3.

2011-01-11 Thread Avi Kivity
On 01/11/2011 03:30 PM, Gleb Natapov wrote: + +asm ( +".global resume_start\n" + ".global resume_end\n" + ".code16\n" + "resume_start:\n" + "mov 0x0, %eax\n" + "mov $0xf4, %dx\n" + "out %eax, %dx\n" + "1: hlt\n" + "jmp 1b\n" + "resume_

Re: KVM call agenda for Jan 11

2011-01-11 Thread Juan Quintela
Kevin Wolf wrote: > Am 10.01.2011 14:32, schrieb Juan Quintela: >> Juan Quintela wrote: >>> Juan Quintela wrote: >>> >>> Now sent it to the right kvm list. Sorry for the second sent. >>> Please send any agenda items you are interested in covering. - KVM Forum 2011 (Jes). >>>

[PATCH unit-tests 1/3] Task stack pointer should point to the end of the page.

2011-01-11 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- lib/x86/desc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/x86/desc.c b/lib/x86/desc.c index 1bd4421..11bd2a2 100644 --- a/lib/x86/desc.c +++ b/lib/x86/desc.c @@ -362,7 +362,7 @@ void setup_tss32(void) tss[i].cr3 =

[PATCH unit-tests 2/3] Test that error code is pushed on exception's task stack.

2011-01-11 Thread Gleb Natapov
If exception with error code is handled by task gate, error code should be pushed to new task stack. Signed-off-by: Gleb Natapov --- x86/taskswitch2.c | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/x86/taskswitch2.c b/x86/taskswitc

[PATCH unit-tests 3/3] Test that vcpu does not continue to run after issuing S3.

2011-01-11 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- config-x86-common.mak |5 +- x86/s3.c | 167 + 2 files changed, 171 insertions(+), 1 deletions(-) create mode 100644 x86/s3.c diff --git a/config-x86-common.mak b/config-x86-common.mak index cca8f

[KVM-AUTOTEST PATCH 13/26] KVM test: beautify VM, shell, monitor and login exception messages

2011-01-11 Thread Michael Goldish
- Separate different logical parts of the messages with 4 spaces. - Add output info to all login and SCP messages. - Add 'using arping' to VMAddressVerificationError. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_monitor.py|4 +- client/tests/kvm/kvm_subprocess.py | 23 ++

[KVM-AUTOTEST PATCH 07/26] KVM test: VM.destroy(): modify logging messages

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 4c3ab14..b0b3ea6 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -913,

[KVM-AUTOTEST PATCH 14/26] KVM test: VMMigrateStateMismatchError: call base constructor

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 98ad0c3..c9f779f 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -149,6

[KVM-AUTOTEST PATCH 23/26] KVM test: migrate.with_file_transfer: don't limit file_size to 10MB with rtl8139

2011-01-11 Thread Michael Goldish
It can take less than a second to transfer 10MB, even with rtl8139. Signed-off-by: Michael Goldish --- client/tests/kvm/tests_base.cfg.sample |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample

[KVM-AUTOTEST PATCH 24/26] KVM test: vmstop: ignore exceptions raised in the background thread

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/tests/vmstop.py |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests/vmstop.py b/client/tests/kvm/tests/vmstop.py index 0fb48fa..4d47471 100644 --- a/client/tests/kvm/tests/vmstop.py +++ b/client/te

[KVM-AUTOTEST PATCH 26/26] KVM test: don't attempt to run clock_getres on Windows

2011-01-11 Thread Michael Goldish
It compiles something on the host, sends it to the guest and runs it, so it's a Linux-only test. Signed-off-by: Michael Goldish --- client/tests/kvm/tests_base.cfg.sample |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/

[KVM-AUTOTEST PATCH 25/26] KVM test: VM.destroy(): allow keeping the MAC addresses

2011-01-11 Thread Michael Goldish
Sometimes (e.g. in guest_s4) we want to destroy and restart a VM without changing its MAC addresses. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/

[KVM-AUTOTEST PATCH 21/26] KVM test: rss_file_transfer.py: timeout fixes

2011-01-11 Thread Michael Goldish
- Make some changes to the way timeouts are handled internally. - Increase default timeout from 10 to 60 or 20 for various functions. - Set a timeout for _send() as well. Signed-off-by: Michael Goldish --- client/tests/kvm/rss_file_transfer.py | 115 +--- 1 files cha

[KVM-AUTOTEST PATCH 22/26] KVM test: rss_file_transfer: optionally log some statistics

2011-01-11 Thread Michael Goldish
This may be useful in migration_with_file_transfer, for example, as it will show how the transfer speed drops during migration. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_utils.py | 20 -- client/tests/kvm/kvm_vm.py | 14 +++- cli

[KVM-AUTOTEST PATCH 19/26] KVM test: log qemu command and qemu output as INFO rather than DEBUG

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index c9f779f..1fcb352 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -833

[KVM-AUTOTEST PATCH 20/26] KVM test: rss_file_transfer.py: refactor exceptions

2011-01-11 Thread Michael Goldish
- Override the __init__() and __str__() methods of some exceptions. - Use FileTransferSocketError instead of FileTransferSendError. - Embed the socket error message and/or the current filename in raised exceptions. Signed-off-by: Michael Goldish --- client/tests/kvm/rss_file_transfer.py | 68

[KVM-AUTOTEST PATCH 18/26] KVM test: _remote_login(): fail if a login prompt is received after a password prompt

2011-01-11 Thread Michael Goldish
No need to wait for the password prompt to appear twice. If a login prompt is received after a password prompt, it means the password/username was incorrect. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_utils.py |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff

[KVM-AUTOTEST PATCH 17/26] KVM test: kill_unresponsive_vms: log exception message

2011-01-11 Thread Michael Goldish
If a VM is unresponsive (login() raises an exception), log it. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index

[KVM-AUTOTEST PATCH 09/26] KVM test: make reboot() a VM method

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py | 54 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index b0b3ea6..525c065 100755 --- a/client/tests/kvm/kvm_vm.py

[KVM-AUTOTEST PATCH 15/26] KVM test: kvm_monitor.py: don't unpack socket.error args

2011-01-11 Thread Michael Goldish
I couldn't find any guarantee in Python docs that all socket.error exceptions in Python 2.4 contain a (errno, msg) tuple, so it's probably safer not to assume that they do. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_monitor.py | 14 +++--- 1 files changed, 7 insertions(+),

[KVM-AUTOTEST PATCH 16/26] KVM test: kvm_monitor: make MonitorSocketError.__init__() receive a socket.error

2011-01-11 Thread Michael Goldish
Receive a socket.error exception and store it as an attribute. It's cleaner and probably a bit easier to maintain than embedding the error message in the string passed to the constructor. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_monitor.py | 19 --- 1 files chang

[KVM-AUTOTEST PATCH 10/26] KVM test: use VM.reboot() instead of kvm_test_utils.reboot()

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/tests/boot.py | 16 +--- client/tests/kvm/tests/guest_test.py|4 ++-- client/tests/kvm/tests/iofuzz.py|3 +-- client/tests/kvm/tests/kdump.py |2 +- client/te

[KVM-AUTOTEST PATCH 12/26] KVM test: kvm_preprocessing.py: remove some unnecessary debug messages

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index 5a452fa..7b3b75b 100644 --- a/client/tests/kvm/kvm_preproc

[KVM-AUTOTEST PATCH 11/26] KVM test: cleanup and contextify stress_boot

2011-01-11 Thread Michael Goldish
- Minor style changes. - Make the code a bit shorter. - Use contexts. Signed-off-by: Michael Goldish --- client/tests/kvm/tests/stress_boot.py | 45 +--- 1 files changed, 18 insertions(+), 27 deletions(-) diff --git a/client/tests/kvm/tests/stress_boot.py b/client

[KVM-AUTOTEST PATCH 06/26] KVM test: clock_getres: fix dmesg logging

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/tests/clock_getres.py |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/tests/clock_getres.py b/client/tests/kvm/tests/clock_getres.py index 1a762e5..5ab4d33 100644 --- a/client/tests/kvm/tests/clock_ge

[KVM-AUTOTEST PATCH 05/26] KVM test: migration: minor style changes

2011-01-11 Thread Michael Goldish
Mainly moving a logging call from kvm_monitor.py to kvm_vm.py. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_monitor.py |1 - client/tests/kvm/kvm_vm.py |6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests

[KVM-AUTOTEST PATCH 08/26] KVM test: unattended_install.py style changes

2011-01-11 Thread Michael Goldish
- Use vm.verify_alive() instead of vm.is_alive(). - Use error.context() so that if verify_alive() fails the resulting error message will be clearer. - Make the code a little bit shorter. - Catch VMAddressError (can be raised by vm.get_address()). - Use double quotes for consistency. - Modify debu

[KVM-AUTOTEST PATCH 03/26] KVM test: migrate.mig_cancel: set mig_cancel to 'yes' instead of 'True'

2011-01-11 Thread Michael Goldish
The tests using mig_cancel expect it to be 'yes', not 'True'. This is consistent with other boolean test parameters. Signed-off-by: Michael Goldish --- client/tests/kvm/tests_base.cfg.sample |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg

[KVM-AUTOTEST PATCH 04/26] KVM test: migrate_with_file_transfer: respect 'mig_cancel'

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish --- .../kvm/tests/migration_with_file_transfer.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests/migration_with_file_transfer.py b/client/tests/kvm/tests/migration_with_file_transfer.py index 8a2cc77..58601b4

[KVM-AUTOTEST PATCH 02/26] error.py: Unhandled*: don't keep references to unhandled exceptions

2011-01-11 Thread Michael Goldish
Instead of keeping a reference to the unhandled exception, keep only a string describing it, and account for the possibility of receiving that same string in __init__() upon unpickling. If references to unhandled exceptions are kept in the Unhandled* wrappers, the unhandled exceptions too are subj

[KVM-AUTOTEST PATCH 01/26] error.py: clear context when setting base_context

2011-01-11 Thread Michael Goldish
Because base_context is one level higher than context, it makes sense to clear context when base_context is changed. This can prevent mistakes and save a little bit of code. Signed-off-by: Michael Goldish --- client/common_lib/error.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-)

Re: [KVM-AUTOTEST PATCH 4/5] kvm_config: add helper to raise exception informing line number

2011-01-11 Thread Eduardo Habkost
On Tue, Jan 11, 2011 at 01:48:22AM -0200, Lucas Meneghel Rodrigues wrote: > On Thu, 2011-01-06 at 14:12 -0200, Eduardo Habkost wrote: > > +for num,line in enumerate(str.splitlines(), 1): > > ^ enumerate in py 2.4 takes exactly 1 argument, so it's not possible to > provide the enumerate sta

Re: BUG: sleeping function called from invalid context at mm/slub.c:793

2011-01-11 Thread Pekka Enberg
On Tue, Jan 11, 2011 at 1:13 PM, Kirill A. Shutemov wrote: >> Please try out the attached patch. > > It helps. > > Reported-and-tested-by: Kirill A. Shutemov Acked-by: Pekka Enberg -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kerne

Re: [Qemu-devel] Re: KVM call agenda for Jan 11

2011-01-11 Thread Kevin Wolf
Am 10.01.2011 14:32, schrieb Juan Quintela: > Juan Quintela wrote: >> Juan Quintela wrote: >> >> Now sent it to the right kvm list. Sorry for the second sent. >> >>> Please send any agenda items you are interested in covering. >>> >>> - KVM Forum 2011 (Jes). >>> >>> thanks, Juan. > > - migratio

Re: BUG: sleeping function called from invalid context at mm/slub.c:793

2011-01-11 Thread Kirill A. Shutemov
On Tue, Jan 11, 2011 at 12:29:41PM +0200, Avi Kivity wrote: > On 01/11/2011 11:49 AM, Avi Kivity wrote: > > On 01/10/2011 09:31 PM, Kirill A. Shutemov wrote: > >> On Mon, Jan 10, 2011 at 10:52:05AM -0600, Christoph Lameter wrote: > >> > > >> > On Mon, 10 Jan 2011, Kirill A. Shutemov wrote: > >> >

[PATCH 00/19] Kemari for KVM v0.2.3

2011-01-11 Thread Yoshiaki Tamura
Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu.git 05bf441eb69a813d3893174d54faa6afa8c0d39b. The changes from v0.2.2 -> v0.2.3 are: - queue async net requests without copying (MST) -- if not async, con

[PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-11 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 163a683..a506688 100644 --- a/hw/

[PATCH 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-11 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 148 ++ 2 files changed, 153 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h ind

[PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-01-11 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index edc9ad6..737d347 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static void tcp_chr_telnet_init(int

[PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-11 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura --- savevm.c | 88 ++ sysemu.h |2 + 2 files changed, 90 inser

[PATCH 07/19] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-01-11 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[PATCH 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-11 Thread Yoshiaki Tamura
For regular migration inuse == 0 always as requests are flushed before save. However, event-tap log when enabled introduces an extra queue for requests which is not being flushed, thus the last inuse requests are left in the event-tap queue. Move the last_avail_idx value sent to the remote back to

[PATCH 09/19] Introduce event-tap.

2011-01-11 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.targe

[PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-11 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644 ---

[PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-11 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 12 migration.h |3 +++ 3 files changed, 30 insertions(+), 0 de

[PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-11 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() sets ft_trans_incoming() as a callback, and call qemu_file_get_notify() to receive FT transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. Signed-off

[PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-11 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions(-)

[PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-11 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h

[PATCH 16/19] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-11 Thread Yoshiaki Tamura
Introduce migrate_ft_trans_put_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_trans_file and turn on event_tap. To end or cancel FT transaction, ft_mode and event_tap is turned off. migrate_ft_trans_get_ready() is called to receive ack from

[PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-11 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..85bd8b8 100644 --- a/block.c +++ b/block.c @@

[PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-11 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 49c28b1..4a171cc 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h" #include "kvm.h

[PATCH 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-11 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index aa4188a..74aebf5 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "ioport.h" #include

[PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-11 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura --- hmp-commands.hx |7 --- migration.c |3 +++ qmp-commands.hx |7 --- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hm

[PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-11 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 6e22d2a..4aa7fdf 100644 --- a/migration.c +++ b/migration.c @@ -42,9 +42,16 @@ static Migrat

[PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-11 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h" #include "qe

Re: [PATCH 2/2] KVM test: Run client tests of autotest in parallel with migration

2011-01-11 Thread Michael Goldish
On 01/11/2011 07:22 AM, Lucas Meneghel Rodrigues wrote: > From: Jason Wang > > Run some workload in the background and do the migration would be helpful to > verfiy the correctness, so this patch use the Thread class to wait for the > completion of autotest cmd -- "bin/autotest control" and do th

Re: BUG: sleeping function called from invalid context at mm/slub.c:793

2011-01-11 Thread Avi Kivity
On 01/11/2011 11:49 AM, Avi Kivity wrote: On 01/10/2011 09:31 PM, Kirill A. Shutemov wrote: On Mon, Jan 10, 2011 at 10:52:05AM -0600, Christoph Lameter wrote: > > On Mon, 10 Jan 2011, Kirill A. Shutemov wrote: > > > Every time I run qemu with KVM enabled I get this in dmesg: > > > > [ 182.87

  1   2   >