[COMMIT master] qemu-kvm: Drop redundant kvm_reset_mpstate

2011-01-13 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com kvm_arch_reset_vcpu includes the same logic (minus the obsolete feature check), and every caller of kvm_reset_mpstate also calls that function. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] Merge branch 'upstream-merge'

2011-01-13 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (279 commits) target-ppc: Implement correct NaN propagation rules target-mips: Implement correct NaN propagation rules softfloat: use float{32,64,x80,128}_maybe_silence_nan() softfloat: add float{x80,128}_maybe_silence_nan()

[COMMIT master] remove qemu-kvm.h inclusion from monitor.c

2011-01-13 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/monitor.c b/monitor.c index cf1d3d0..40768bb 100644 --- a/monitor.c +++ b/monitor.c @@ -61,7 +61,6 @@ #include trace.h #endif #include ui/qemu-spice.h -#include qemu-kvm.h //#define

[COMMIT master] pci-assign: Fix transition MSI-INTx

2011-01-13 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Make sure to re-register the IRQ of an assigned device as INTx when the guest disables MSI[X] mode again. Acked-by: Michael S. Tsirkin m...@redhat.com Acked-by: Alex Williamson alex.william...@redhat.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com

[COMMIT master] KVM: MMU: Don't flush shadow when enabling dirty tracking

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Instead, drop large mappings, which were the reason we dropped shadow. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9cafbb4..772d212 100644 ---

[COMMIT master] KVM: PPC: Fix SPRG get/set for Book3S and BookE

2011-01-13 Thread Avi Kivity
From: Peter Tyser pty...@xes-inc.com Previously SPRGs 4-7 were improperly read and written in kvm_arch_vcpu_ioctl_get_regs() and kvm_arch_vcpu_ioctl_set_regs(); Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Peter Tyser pty...@xes-inc.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM guest: Fix section mismatch derived from kvm_guest_cpu_online()

2011-01-13 Thread Avi Kivity
From: Sedat Dilek sedat.di...@googlemail.com WARNING: arch/x86/built-in.o(.text+0x1bb74): Section mismatch in reference from the function kvm_guest_cpu_online() to the function .cpuinit.text:kvm_guest_cpu_init() The function kvm_guest_cpu_online() references the function __cpuinit

[COMMIT master] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2011-01-13 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[COMMIT master] KVM: VMX: Avoid leaking fake realmode state to userspace

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com When emulating real mode, we fake some state: - tr.base points to a fake vm86 tss - segment registers are made to conform to vm86 restrictions change vmx_get_segment() not to expose this fake state to userspace; instead, return the original state.

[COMMIT master] KVM: VMX: Save and restore tr selector across mode switches

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com When emulating real mode we play with tr hidden state, but leave tr.selector alone. That works well, except for save/restore, since loading TR writes it to the hidden state in vmx-rmode. Fix by also saving and restoring the tr selector; this makes things more

[COMMIT master] KVM: Initialize fpu state in preemptible context

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com init_fpu() (which is indirectly called by the fpu switching code) assumes it is in process context. Rather than makeing init_fpu() use an atomic allocation, which can cause a task to be killed, make sure the fpu is already initialized when we enter the run loop.

[COMMIT master] smp: speed up cpu_count()

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com cpu_count() is used in important places, like vmexit.flat's measuring loop, yet it is ridiculously slow as it talks to the firmware config interface. Speed it up by reading the value from memory. Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] vmexit: fix race in joining smp tests

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com 'nr_cpus_done' is not incremented atomically; this has been observed to cause tests to stall. Fix by using a proper atomic increment. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/vmexit.c b/x86/vmexit.c index 875caa3..ad8ab55 100644 ---

[COMMIT master] smp: fix race in async on_cpu()

2011-01-13 Thread Avi Kivity
From: Avi Kivity a...@redhat.com We fire off the IPI, but don't wait for the other cpu to pickk up the function and data before returning. Fix by making the other cpu ACK the receipt of the IPI (but still execute the result asynchrously). Signed-off-by: Avi Kivity a...@redhat.com diff --git

[PATCH uq/master 2/2] MCE, unpoison memory address across reboot

2011-01-13 Thread Huang Ying
In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding processes with SIGBUS. If the error physical memory page is used by a

[PATCH uq/master 1/2] Add qemu_ram_remap

2011-01-13 Thread Huang Ying
qemu_ram_remap() unmaps the specified RAM pages, then re-maps these pages again. This is used by KVM HWPoison support to clear HWPoisoned page tables across guest rebooting, so that a new page may be allocated later to recover the memory error. Signed-off-by: Huang Ying ying.hu...@intel.com ---

[PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally

2011-01-13 Thread Huang Ying
Make __get_user_pages return -EHWPOISON for HWPOISON page only if FOLL_HWPOISON is specified. With this patch, the interested callers can distinguish HWPOISON page from general FAULT page, while other callers will still get -EFAULT for pages, so the user space interface need not to be changed.

[PATCH 2/2] KVM, Replace is_hwpoison_address with get_user_pages_hwpoison

2011-01-13 Thread Huang Ying
is_hwpoison_address only checks whether the page table entry is hwpoisoned, regardless the memory page mapped. While get_user_pages_hwpoison will check both. QEMU will clear the poisoned page table entry (via unmap/map) to make it possible to allocate a new memory page for the virtual address

[PATCH kvm-unit-tests] kvmclock_test: fix smp initialization

2011-01-13 Thread Avi Kivity
cpu_count() is not valid before smp_init(). Signed-off-by: Avi Kivity a...@redhat.com --- x86/kvmclock_test.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/x86/kvmclock_test.c b/x86/kvmclock_test.c index 5b14ae2..52a43fb 100644 --- a/x86/kvmclock_test.c +++

Re: [PATCH uq/master 2/2] MCE, unpoison memory address across reboot

2011-01-13 Thread Jan Kiszka
Am 13.01.2011 09:34, Huang Ying wrote: In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding processes with SIGBUS. If

Re: Errors on MMIO read access on VM suspend / resume operations

2011-01-13 Thread Avi Kivity
On 01/11/2011 06:19 PM, Stefan Berger wrote: 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

Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally

2011-01-13 Thread Avi Kivity
On 01/13/2011 10:42 AM, Huang Ying wrote: Make __get_user_pages return -EHWPOISON for HWPOISON page only if FOLL_HWPOISON is specified. With this patch, the interested callers can distinguish HWPOISON page from general FAULT page, while other callers will still get -EFAULT for pages, so the

Re: [PATCH uq/master 2/2] MCE, unpoison memory address across reboot

2011-01-13 Thread Jan Kiszka
Am 13.01.2011 09:34, Huang Ying wrote: In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding processes with SIGBUS. If

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

2011-01-13 Thread Gleb Natapov
On Wed, Jan 12, 2011 at 12:53:14PM -0800, Linus Torvalds wrote: On Wed, Jan 12, 2011 at 12:33 PM, Rik van Riel r...@redhat.com wrote: Now that we have FAULT_FLAG_ALLOW_RETRY, the async pagefault patches can be a little smaller. I suspect you do still want a new page flag, to say that

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

2011-01-13 Thread Jan Kiszka
Am 11.01.2011 11:29, Avi Kivity wrote: Please try out the attached patch. From f3a6041b5bb3bf7c88f9694a66d7f34be2f78845 Mon Sep 17 00:00:00 2001 From: Avi Kivity a...@redhat.com Date: Tue, 11 Jan 2011 12:15:54 +0200 Subject: [PATCH] KVM: Initialize fpu state in preemptible context

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

2011-01-13 Thread Avi Kivity
On 01/13/2011 02:59 PM, Jan Kiszka wrote: @@ -5351,6 +5351,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) int r; sigset_t sigsaved; + if (!tsk_used_math(current) init_fpu(current)) + return -ENOMEM; + Could become a rainy day for the

Re: [RFC -v4 PATCH 0/3] directed yield for Pause Loop Exiting

2011-01-13 Thread Avi Kivity
On 01/13/2011 07:21 AM, Rik van Riel wrote: When running SMP virtual machines, it is possible for one VCPU to be spinning on a spinlock, while the VCPU that holds the spinlock is not currently running, because the host scheduler preempted it to run something else. Both Intel and AMD CPUs have a

Re: [RFC -v4 PATCH 3/3] kvm: use yield_to instead of sleep in kvm_vcpu_on_spin

2011-01-13 Thread Avi Kivity
On 01/13/2011 07:27 AM, Rik van Riel wrote: Instead of sleeping in kvm_vcpu_on_spin, which can cause gigantic slowdowns of certain workloads, we instead use yield_to to hand the rest of our timeslice to another vcpu in the same KVM guest. + for (pass = 0; pass 2 !yielded; pass++) {

Re: [PATCH 1/4] KVM: Fix x86_decode_insn() return code check

2011-01-13 Thread Avi Kivity
On 01/04/2011 03:14 PM, Avi Kivity wrote: x86_decode_insn() doesn't return X86EMUL_* values, it returns EMULATION_* codes. Adjust the check. Signed-off-by: Avi Kivitya...@redhat.com --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [RFC -v4 PATCH 3/3] kvm: use yield_to instead of sleep in kvm_vcpu_on_spin

2011-01-13 Thread Rik van Riel
On 01/13/2011 08:16 AM, Avi Kivity wrote: + for (pass = 0; pass 2 !yielded; pass++) { + kvm_for_each_vcpu(i, vcpu, kvm) { + struct task_struct *task = vcpu-task; + if (!pass i last_boosted_vcpu) { + i = last_boosted_vcpu; + continue; + } else if (pass i last_boosted_vcpu) + break; + if (vcpu ==

[PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode

2011-01-13 Thread Joerg Roedel
The vmexit path on SVM needs to restore the KERNEL_GS_BASE MSR in order to savely execute the NMI handler. Otherwise a pending NMI can occur after the STGI instruction and crash the machine. This makes it impossible to run perf and kvm in parallel on an AMD machine in a stable way. Cc:

[PATCH 0/2] perf-kvm support for SVM

2011-01-13 Thread Joerg Roedel
Hi Avi, Marcelo, these two patches finally implement perf-kvm support for AMD machines. The meat is in the second patch. The first one is an important fix which, when missing, causes system crashes when NMI happen while in guest mode. So the first patch should also make it to the various

[PATCH 2/2] KVM: SVM: Add support for perf-kvm

2011-01-13 Thread Joerg Roedel
This patch adds the necessary code to run perf-kvm on AMD machines. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 8b9bc72..2415129 100644

Re: [RFC -v4 PATCH 3/3] kvm: use yield_to instead of sleep in kvm_vcpu_on_spin

2011-01-13 Thread Avi Kivity
On 01/13/2011 05:06 PM, Rik van Riel wrote: I think the first patch needs some reference counting... I'd move it to the outermost KVM_RUN loop to reduce the performance impact. I don't see how refcounting from that other thread could possibly help, and I now see that the task_struct_cachep

Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode

2011-01-13 Thread Avi Kivity
On 01/13/2011 05:22 PM, Joerg Roedel wrote: The vmexit path on SVM needs to restore the KERNEL_GS_BASE MSR in order to savely execute the NMI handler. Otherwise a pending NMI can occur after the STGI instruction and crash the machine. This makes it impossible to run perf and kvm in parallel on

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

2011-01-13 Thread Linus Torvalds
On Thu, Jan 13, 2011 at 4:53 AM, Gleb Natapov g...@redhat.com wrote: I implemented get_user_pages_nowait() on top of your patch. In my testing it works as expected when used inside KVM. Does this looks OK to you? It looks reasonable, although I suspect the subtle behavior wrt the mmap_sem

Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode

2011-01-13 Thread Jan Kiszka
Am 13.01.2011 16:22, Joerg Roedel wrote: The vmexit path on SVM needs to restore the KERNEL_GS_BASE MSR in order to savely execute the NMI handler. Otherwise a pending NMI can occur after the STGI instruction and crash the machine. This makes it impossible to run perf and kvm in parallel on

Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode

2011-01-13 Thread Roedel, Joerg
On Thu, Jan 13, 2011 at 10:42:01AM -0500, Avi Kivity wrote: On 01/13/2011 05:22 PM, Joerg Roedel wrote: The vmexit path on SVM needs to restore the KERNEL_GS_BASE MSR in order to savely execute the NMI handler. Otherwise a pending NMI can occur after the STGI instruction and crash the

Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode

2011-01-13 Thread Roedel, Joerg
On Thu, Jan 13, 2011 at 10:48:33AM -0500, Jan Kiszka wrote: Am 13.01.2011 16:22, Joerg Roedel wrote: #ifdef CONFIG_X86_64 wrmsrl(MSR_GS_BASE, svm-host.gs_base); + wrmsrl(MSR_KERNEL_GS_BASE, current-thread.gs); #else loadsegment(fs, svm-host.fs); #endif Doesn't this

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

2011-01-13 Thread Avi Kivity
On 01/11/2011 04:43 PM, Anthony Liguori wrote: - invalidate all buffers for that block device on machine A after migration. * with NFS, just close + reopen the file (and pray that nobody else has it also opened) * with block devices: use BLKFLBLK ioctl, and pray that nobody else

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

2011-01-13 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 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-13 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 04/19] qemu-char: export socket_set_nodelay().

2011-01-13 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

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

2011-01-13 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 16/19] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-13 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 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-13 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 d4922ce..1822e97 100644 --- a/migration.c

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

2011-01-13 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 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-13 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.4

2011-01-13 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 d03d11260ee2d55579e8b76116e35ccdf5031833. The changes from v0.2.3 - v0.2.4 are: - call vm_start() before event_tap_flush_one() to avoid failure in

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

2011-01-13 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 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-13 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 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-13 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 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-13 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-13 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 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-13 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 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-13 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 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-13 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 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-13 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 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-13 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 09/19] Introduce event-tap.

2011-01-13 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:

Compiling qemu 0.13.0

2011-01-13 Thread Erik Rull
Hi all, I want to compile qemu 0.13.0 against a 2.6.29.4 kernel. I found no kvm-kmod sources for this kernel. Do I need them? I tried to compile qemu but it fails for the virtio pci because the struct kvm_irq_routing_entry was not found. But this struct is existing in the kvm sources within

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

2011-01-13 Thread Hugh Dickins
On Thu, Jan 13, 2011 at 7:43 AM, Linus Torvalds torva...@linux-foundation.org wrote: On Thu, Jan 13, 2011 at 4:53 AM, Gleb Natapov g...@redhat.com wrote: I implemented get_user_pages_nowait() on top of your patch. In my testing it works as expected when used inside KVM. Does this looks OK to

Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode

2011-01-13 Thread Avi Kivity
On 01/13/2011 05:51 PM, Roedel, Joerg wrote: On Thu, Jan 13, 2011 at 10:42:01AM -0500, Avi Kivity wrote: On 01/13/2011 05:22 PM, Joerg Roedel wrote: The vmexit path on SVM needs to restore the KERNEL_GS_BASE MSR in order to savely execute the NMI handler. Otherwise a pending NMI

Re: [Qemu-devel] [PATCH uq/master 1/2] Add qemu_ram_remap

2011-01-13 Thread Blue Swirl
On Thu, Jan 13, 2011 at 8:34 AM, Huang Ying ying.hu...@intel.com wrote: qemu_ram_remap() unmaps the specified RAM pages, then re-maps these pages again.  This is used by KVM HWPoison support to clear HWPoisoned page tables across guest rebooting, so that a new page may be allocated later to

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

2011-01-13 Thread Blue Swirl
On Thu, Jan 13, 2011 at 5:15 PM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 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 ---  

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

2011-01-13 Thread Blue Swirl
On Thu, Jan 13, 2011 at 5:15 PM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 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 ---  

[PATCH] KVM-test: Add a ENOSPC subtest

2011-01-13 Thread Lucas Meneghel Rodrigues
From: Amos Kong ak...@redhat.com KVM guest always pauses on NOSPACE error, this test just repeatedly extend guest disk space and resume guest from paused status. Changes from v1: - Use the most current KVM test API - Use the autotest API for external commands execution - Instead of chaining

[PATCH] KVM-test: Add a ENOSPC subtest

2011-01-13 Thread Lucas Meneghel Rodrigues
From: Amos Kong ak...@redhat.com KVM guest always pauses on NOSPACE error, this test just repeatedly extend guest disk space and resume guest from paused status. Changes from v2: - Oops! Forgot to update tests_base.cfg.sample Changes from v1: - Use the most current KVM test API - Use the

Re: Flow Control and Port Mirroring Revisited

2011-01-13 Thread Simon Horman
On Thu, Jan 13, 2011 at 10:45:38AM -0500, Jesse Gross wrote: On Thu, Jan 13, 2011 at 1:47 AM, Simon Horman ho...@verge.net.au wrote: On Mon, Jan 10, 2011 at 06:31:55PM +0900, Simon Horman wrote: On Fri, Jan 07, 2011 at 10:23:58AM +0900, Simon Horman wrote: On Thu, Jan 06, 2011 at

Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally

2011-01-13 Thread Huang Ying
On Thu, 2011-01-13 at 18:43 +0800, Avi Kivity wrote: On 01/13/2011 10:42 AM, Huang Ying wrote: Make __get_user_pages return -EHWPOISON for HWPOISON page only if FOLL_HWPOISON is specified. With this patch, the interested callers can distinguish HWPOISON page from general FAULT page, while

Re: [PATCH uq/master 2/2] MCE, unpoison memory address across reboot

2011-01-13 Thread Huang Ying
On Thu, 2011-01-13 at 17:01 +0800, Jan Kiszka wrote: Am 13.01.2011 09:34, Huang Ying wrote: In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual

Re: Flow Control and Port Mirroring Revisited

2011-01-13 Thread Michael S. Tsirkin
On Fri, Jan 14, 2011 at 08:41:36AM +0900, Simon Horman wrote: On Thu, Jan 13, 2011 at 10:45:38AM -0500, Jesse Gross wrote: On Thu, Jan 13, 2011 at 1:47 AM, Simon Horman ho...@verge.net.au wrote: On Mon, Jan 10, 2011 at 06:31:55PM +0900, Simon Horman wrote: On Fri, Jan 07, 2011 at

Re: [PATCH] KVM-test: Add a ENOSPC subtest

2011-01-13 Thread Amos Kong
- Original Message - From: Amos Kong ak...@redhat.com KVM guest always pauses on NOSPACE error, this test just repeatedly extend guest disk space and resume guest from paused status. Changes from v2: - Oops! Forgot to update tests_base.cfg.sample Changes from v1: - Use the

Re: Flow Control and Port Mirroring Revisited

2011-01-13 Thread Simon Horman
On Fri, Jan 14, 2011 at 06:58:18AM +0200, Michael S. Tsirkin wrote: On Fri, Jan 14, 2011 at 08:41:36AM +0900, Simon Horman wrote: On Thu, Jan 13, 2011 at 10:45:38AM -0500, Jesse Gross wrote: On Thu, Jan 13, 2011 at 1:47 AM, Simon Horman ho...@verge.net.au wrote: On Mon, Jan 10, 2011 at

Re: Flow Control and Port Mirroring Revisited

2011-01-13 Thread Michael S. Tsirkin
On Fri, Jan 14, 2011 at 03:35:28PM +0900, Simon Horman wrote: On Fri, Jan 14, 2011 at 06:58:18AM +0200, Michael S. Tsirkin wrote: On Fri, Jan 14, 2011 at 08:41:36AM +0900, Simon Horman wrote: On Thu, Jan 13, 2011 at 10:45:38AM -0500, Jesse Gross wrote: On Thu, Jan 13, 2011 at 1:47 AM,