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

2011-01-11 Thread Gerd Hoffmann
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 below remains valid, though. It is considered

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

2011-01-11 Thread Avi Kivity
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. What deeper interaction do you have in mind?

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

2011-01-11 Thread Avi Kivity
On 01/10/2011 10:11 PM, Anthony Liguori wrote: On 01/08/2011 02:47 AM, Jan Kiszka wrote: OK, but I don't want to argue about the ioeventfd API. So let's put this case aside. :) I often reply too quickly without explaining myself. Let me use ioeventfd as an example to highlight why KVMState

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

2011-01-11 Thread Avi Kivity
On 01/10/2011 09:31 PM, Linus Torvalds wrote: On Mon, Jan 10, 2011 at 1:21 AM, Avi Kivitya...@redhat.com wrote: - asynchronous page faults, which allow a guest to continue processing interrupts even when its memory is being paged in; in the case of a Linux 2.6.38+ guest, it will receive

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

2011-01-11 Thread Markus Armbruster
Jan Kiszka jan.kis...@web.de 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 bad thing, obviously the machine

Re: [PATCH 2/4] KVM: Simplify exit path on decode failure

2011-01-11 Thread Avi Kivity
On 01/10/2011 07:17 PM, Jan Kiszka wrote: Am 04.01.2011 14:14, Avi Kivity wrote: 'goto done' leads to a maze of checks and actions, all pointless. Bail out immediately if we can't decode. Signed-off-by: Avi Kivitya...@redhat.com --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1

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

2011-01-11 Thread Avi Kivity
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.878328] BUG: sleeping function called from invalid

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.878328]

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 jasow...@redhat.com 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

[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 tamura.yoshi...@lab.ntt.co.jp --- hmp-commands.hx |7 --- migration.c |3 +++ qmp-commands.hx |7 --- 3 files changed, 11 insertions(+), 6

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

2011-01-11 Thread Yoshiaki Tamura
The option looks like, -incoming protocol:address:port,ft_mode Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

[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 tamura.yoshi...@lab.ntt.co.jp --- 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

[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 tamura.yoshi...@lab.ntt.co.jp --- block.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..85bd8b8 100644

[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 tamura.yoshi...@lab.ntt.co.jp --- 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 @@

[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 tamura.yoshi...@lab.ntt.co.jp --- 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 @@

[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 tamura.yoshi...@lab.ntt.co.jp --- 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

[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

[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 tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c | 15 +++ migration.c | 12 migration.h |3 +++ 3 files

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

[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 tamura.yoshi...@lab.ntt.co.jp --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15

[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 tamura.yoshi...@lab.ntt.co.jp Signed-off-by:

[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 tamura.yoshi...@lab.ntt.co.jp --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c

[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 tamura.yoshi...@lab.ntt.co.jp --- savevm.c | 88 ++ sysemu.h |

[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 tamura.yoshi...@lab.ntt.co.jp Signed-off-by:

[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

[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 tamura.yoshi...@lab.ntt.co.jp --- 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

[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 tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |5 ++ savevm.c | 148 ++ 2 files changed, 153 insertions(+), 0 deletions(-) diff

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

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

2011-01-11 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

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 quint...@redhat.com wrote: Juan Quintela quint...@redhat.com 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.

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: Every time I

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 kir...@shutemov.name wrote: Please try out the attached patch. It helps. Reported-and-tested-by: Kirill A. Shutemov k...@openvz.org Acked-by: Pekka Enberg penb...@kernel.org -- To unsubscribe from this list: send the line unsubscribe kvm in

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 start

[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 mgold...@redhat.com --- client/common_lib/error.py |1 + 1 files changed, 1

[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

[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 mgold...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[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 mgold...@redhat.com --- .../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

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

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- 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 ---

[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 mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py |1 - client/tests/kvm/kvm_vm.py |6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git

[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

[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 mgold...@redhat.com --- 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

[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 mgold...@redhat.com --- 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 ---

[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 mgold...@redhat.com --- client/tests/kvm/tests/stress_boot.py | 45 +--- 1 files changed, 18 insertions(+), 27 deletions(-) diff --git

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

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- 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 ---

[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 mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 19

[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 mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |9 ++--- 1 files changed, 6 insertions(+),

[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 mgold...@redhat.com --- 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 +++

[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 mgold...@redhat.com ---

[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 mgold...@redhat.com --- client/tests/kvm/rss_file_transfer.py | 115

[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 mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 20 -- client/tests/kvm/kvm_vm.py

[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 mgold...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git

[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 mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py

[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 mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py

[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 mgold...@redhat.com --- 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 ---

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

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- 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 +++

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

2011-01-11 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- 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 +++

[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 mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py|4 +-

[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 mgold...@redhat.com --- 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

[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 g...@redhat.com --- 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

[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 g...@redhat.com --- 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)

[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 g...@redhat.com --- x86/taskswitch2.c | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/x86/taskswitch2.c

Re: KVM call agenda for Jan 11

2011-01-11 Thread Juan Quintela
Kevin Wolf kw...@redhat.com wrote: Am 10.01.2011 14:32, schrieb Juan Quintela: Juan Quintela quint...@redhat.com wrote: Juan Quintela quint...@redhat.com wrote: Now sent it to the right kvm list. Sorry for the second sent. Please send any agenda items you are interested in covering. -

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_end:\n +#ifdef

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 +out %eax, %dx\n +1: hlt\n +

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 Kiszkajan.kis...@web.de 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

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.

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 none of the above

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 + mov 0x0, %eax\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

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 +.global resume_end\n

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

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,

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 how ioapic, pit, or pic have

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

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

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

2011-01-11 Thread Christoph Lameter
Reviewed-by: Christoph Lameter c...@linux.com -- 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 Wolfkw...@redhat.com wrote: Am 10.01.2011 14:32, schrieb Juan Quintela: Juan Quintelaquint...@redhat.com wrote: Juan Quintelaquint...@redhat.com wrote: Now sent it to the right kvm list. Sorry for the second sent.

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

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

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. No, it really

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

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

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

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

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

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: [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 a...@redhat.com 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

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

[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: [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 qz...@redhat.com 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

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

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 below

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 Kivitya...@redhat.com 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

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:

[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

[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

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 l...@redhat.com 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

[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 mgold...@redhat.com --- 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 +++

[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 mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py

  1   2   >