Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Avi Kivity
On 12/27/2010 11:27 PM, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +unsigned long address; +KVMState *s = param; + +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Gleb Natapov
On Mon, Dec 27, 2010 at 07:27:54PM -0200, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +unsigned long address; +KVMState *s = param; + +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Huang Ying
On Tue, 2010-12-28 at 16:27 +0800, Gleb Natapov wrote: On Mon, Dec 27, 2010 at 07:27:54PM -0200, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Avi Kivity
On 12/28/2010 10:32 AM, Huang Ying wrote: On Tue, 2010-12-28 at 16:11 +0800, Avi Kivity wrote: On 12/27/2010 11:27 PM, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Avi Kivity
On 12/28/2010 10:35 AM, Huang Ying wrote: Don't we break huge page to 4k pages during poisoning? Yes. That has not been implemented yet. So in fact, we can not deal with hwpoison+hugetlb in kvm now. Should be a lot easier to deal with using transparent hugepages, since the break-apart

[GIT PULL] kvm upstream updates

2010-12-28 Thread Avi Kivity
The following changes since commit 4cdc1cd137e0b98766916a7cdf2d5a9b3c6632fa: target-mips: fix host CPU consumption when guest is idle (2010-12-27 00:58:06 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Jan Kiszka (4):

[Autotest] [KVM-AUTOTEST PATCH 03/28] KVM test: corrections to migration_with_reboot

2010-12-28 Thread Jason Wang
Michael Goldish writes: - Use wait_for() to try remote_login() multiple times before giving up. - Take VM parameters from vm.params, not params. Is there any differnce between those in current context? Other looks good, thanks. Signed-off-by: Michael Goldish mgold...@redhat.com ---

[Autotest] [KVM-AUTOTEST PATCH 04/28] KVM test: migration_with_reboot: use kvm_utils.Thread

2010-12-28 Thread Jason Wang
Michael Goldish writes: Signed-off-by: Michael Goldish mgold...@redhat.com Looks good, thanks! --- client/tests/kvm/tests/migration_with_reboot.py | 19 +++ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git

Re: [PATCH 2/2][RFC] KVM: Emulate MSI-X table and PBA in kernel

2010-12-28 Thread Avi Kivity
On 12/22/2010 10:44 AM, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. @@ -3817,14 +3819,16 @@ static int emulator_write_emulated_onepage(unsigned long addr, mmio: trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, bytes, gpa, *(u64 *)val); + r =

Re: FIXED: Re: [Qemu-devel] possible regression in qemu-kvm 0.13.0 (memtest)

2010-12-28 Thread Peter Lieven
On 27.12.2010 04:51, Stefan Hajnoczi wrote: On Sun, Dec 26, 2010 at 9:21 PM, Peter Lievenp...@dlh.net wrote: Am 25.12.2010 um 20:02 schrieb Peter Lieven: Am 23.12.2010 um 03:42 schrieb Stefan Hajnoczi: On Wed, Dec 22, 2010 at 10:02 AM, Peter Lievenp...@dlh.net wrote: If I start a VM

[Autotest] [KVM-AUTOTEST PATCH v2] KVM test: migration_with_file_transfer: verify transfer correctness

2010-12-28 Thread Jason Wang
Michael Goldish writes: After the transfer, copy the file back from the guest to the host and make sure the returned file is identical to the one sent to the guest. Changes from v1: - hash_file() is in autotest_lib.client.bin.utils, so import that as client_utils. - Pass

Re: [Autotest] [KVM-AUTOTEST PATCH 03/28] KVM test: corrections to migration_with_reboot

2010-12-28 Thread Michael Goldish
On 12/28/2010 02:25 PM, Jason Wang wrote: Michael Goldish writes: - Use wait_for() to try remote_login() multiple times before giving up. - Take VM parameters from vm.params, not params. Is there any differnce between those in current context? Other looks good, thanks. In the

Re: [Autotest] [KVM-AUTOTEST PATCH v2] KVM test: migration_with_file_transfer: verify transfer correctness

2010-12-28 Thread Michael Goldish
On 12/28/2010 02:38 PM, Jason Wang wrote: Michael Goldish writes: After the transfer, copy the file back from the guest to the host and make sure the returned file is identical to the one sent to the guest. Changes from v1: - hash_file() is in autotest_lib.client.bin.utils, so

[Autotest] [KVM-AUTOTEST PATCH 11/28] KVM test: make_qemu_command(): catch IndexError when accessing self.netdev_id

2010-12-28 Thread Jason Wang
Michael Goldish writes: make_qemu_command() is sometimes called to see if a VM needs to be restarted using a different qemu command line. When it's called with more NICs than the VM currently has, accessing self.netdev_id can raise an IndexError. Signed-off-by: Michael Goldish

Re: [Autotest] [KVM-AUTOTEST PATCH v2] KVM test: migration_with_file_transfer: verify transfer correctness

2010-12-28 Thread Jason Wang
Michael Goldish writes: On 12/28/2010 02:38 PM, Jason Wang wrote: Michael Goldish writes: After the transfer, copy the file back from the guest to the host and make sure the returned file is identical to the one sent to the guest. Changes from v1: - hash_file()

Re: [Autotest] [KVM-AUTOTEST PATCH v2] KVM test: migration_with_file_transfer: verify transfer correctness

2010-12-28 Thread Michael Goldish
On 12/28/2010 03:31 PM, Jason Wang wrote: Michael Goldish writes: On 12/28/2010 02:38 PM, Jason Wang wrote: Michael Goldish writes: After the transfer, copy the file back from the guest to the host and make sure the returned file is identical to the one sent to the guest.

Re: [Autotest] [KVM-AUTOTEST PATCH 12/28] KVM test: use VM.clone() in make_qemu_command()

2010-12-28 Thread Michael Goldish
On 12/28/2010 03:13 PM, Jason Wang wrote: Michael Goldish writes: When make_qemu_command() is called in order to see if a VM should be restarted using a different qemu command line, construction of the qemu command should be based only on the parameters provided to

Re: [Autotest] [KVM-AUTOTEST PATCH 11/28] KVM test: make_qemu_command(): catch IndexError when accessing self.netdev_id

2010-12-28 Thread Michael Goldish
On 12/28/2010 03:23 PM, Jason Wang wrote: Michael Goldish writes: make_qemu_command() is sometimes called to see if a VM needs to be restarted using a different qemu command line. When it's called with more NICs than the VM currently has, accessing self.netdev_id can raise an

[KVM-AUTOTEST PATCH v2] KVM test: make_qemu_command(): catch IndexError when accessing self.netdev_id

2010-12-28 Thread Michael Goldish
make_qemu_command() is sometimes called to see if a VM needs to be restarted using a different qemu command line. When it's called with more NICs than the VM currently has, accessing self.netdev_id can raise an IndexError. Changes from v1: - Fix rebase error (omitted netdev_extra_params).

[KVM-AUTOTEST PATCH 1/4] KVM test: introduce the Env class

2010-12-28 Thread Michael Goldish
It's a wrapper to the 'env' object used by KVM tests. It behaves like a dictionary, but may implement additional common operations used by KVM tests. Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm_utils.py | 85 + 1 files

[KVM-AUTOTEST PATCH 2/4] KVM test: use kvm_utils.Env wherever appropriate

2010-12-28 Thread Michael Goldish
The new Env object is backward compatible with the regular env dict, so all the kvm_utils.env_*() functions should work as usual. Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm.py | 10 +- client/tests/kvm/kvm_scheduler.py |4 ++-- 2 files

[KVM-AUTOTEST PATCH 3/4] KVM test: use the new Env methods instead of the old env_* functions

2010-12-28 Thread Michael Goldish
Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm.py |2 +- client/tests/kvm/kvm_preprocessing.py| 12 ++-- client/tests/kvm/kvm_test_utils.py |4 ++-- client/tests/kvm/tests/ksm_overcommit.py |4 ++--

Re: [Autotest] [KVM-AUTOTEST PATCH 0/4] KVM test: replace 'env' dict with an Env object

2010-12-28 Thread Lucas Meneghel Rodrigues
On Tue, 2010-12-28 at 17:43 +0200, Michael Goldish wrote: This is a respin of Eduardo's patchset with small modifications. Differences from Eduardo's patches: - These patches don't change the module structure of the KVM test (no kvm package is created). We can still do that in the future

Re: [Qemu-devel] possible regression in qemu-kvm 0.13.0 (memtest)

2010-12-28 Thread Blue Swirl
On Mon, Dec 27, 2010 at 3:47 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Sat, Dec 25, 2010 at 7:02 PM, Peter Lieven p...@dlh.net wrote: this was the outcome of my bisect session: 956a3e6bb7386de48b642d4fee11f7f86a2fcf9a is first bad commit commit 956a3e6bb7386de48b642d4fee11f7f86a2fcf9a

Re: [RFC -v2 PATCH 2/3] sched: add yield_to function

2010-12-28 Thread Rik van Riel
On 12/28/2010 12:54 AM, Mike Galbraith wrote: On Mon, 2010-12-20 at 17:04 +0100, Mike Galbraith wrote: On Mon, 2010-12-20 at 10:40 -0500, Rik van Riel wrote: On 12/17/2010 02:15 AM, Mike Galbraith wrote: BTW, with this vruntime donation thingy, what prevents a task from forking off

KVM clock synchronization

2010-12-28 Thread Zachary Amsden
A further set of improvements to KVM clock. Now it actually can stay synchronized on SMP systems with a stable TSC, does not get destabilized by host suspend, and is resistant to migration. I did look a bit into the second to last remaining migration issue; that is, we read the TSCs for all

[KVM Clock Synchronization 1/4] Make cyc_to_nsec conversions more reliable

2010-12-28 Thread Zachary Amsden
Rather than use the host CPU TSC rate, which can change, compute cycle to nanosecond conversion in the guest TSC rate, which is fixed. This allows the math for write compensation detection to be made more reliable. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 58

[KVM Clock Synchronization 2/4] Keep TSC synchronized across host suspend

2010-12-28 Thread Zachary Amsden
During a host suspend, TSC may go backwards, which KVM interprets as an unstable TSC. Technically, KVM should not be marking the TSC unstable, which causes the TSC clocksource to go bad, but should be adjusting the TSC offsets in such a case. Signed-off-by: Zachary Amsden zams...@redhat.com ---

[KVM Clock Synchronization 4/4] Add master clock for KVM clock

2010-12-28 Thread Zachary Amsden
On systems with synchronized TSCs, we still have VCPU individual KVM clocks, each with their own computed offset. As this all happens at different times, the computed KVM clock offset can vary, causing a globally visible backwards clock. Currently this is protected against by using an atomic

Re: [PATCH 2/2][RFC] KVM: Emulate MSI-X table and PBA in kernel

2010-12-28 Thread Sheng Yang
On Tuesday 28 December 2010 20:26:13 Avi Kivity wrote: On 12/22/2010 10:44 AM, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. @@ -3817,14 +3819,16 @@ static int emulator_write_emulated_onepage(unsigned long addr, mmio: