[COMMIT master] Fix condition for native_read_msr_safe wrapping on i386

2009-06-25 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com For i386, native_read_msr_safe was already introduced in 2.6.22. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index 881602e..8436e43

[COMMIT master] Backwards compatibility for alloc_pages_exact_node()

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index 8270418..026fee1 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -898,3 +898,9 @@ struct trace_print_flags

[COMMIT master] KVM: Allow emulation of syscalls instructions on #UD

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com Add the opcodes for syscall, sysenter and sysexit to the list of instructions handled by the undefined opcode handler. Signed-off-by: Christoph Egger christoph.eg...@amd.com Signed-off-by: Amit Shah amit.s...@redhat.com Signed-off-by: Andre Przywara

[COMMIT master] KVM: x86 emulator: Add missing EFLAGS bit definitions

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com Signed-off-by: Christoph Egger christoph.eg...@amd.com Signed-off-by: Amit Shah amit.s...@redhat.com Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86_emulate.c

[COMMIT master] KVM: x86 emulator: Prepare for emulation of syscall instructions

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com Add the flags needed for syscall, sysenter and sysexit to the opcode table. Catch (but for now ignore) the opcodes in the emulation switch/case. Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by: Amit Shah amit.s...@redhat.com

[COMMIT master] KVM: ignore AMDs HWCR register access to set the FFDIS bit

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com Linux tries to disable the flush filter on all AMD K8 CPUs. Since KVM does not handle the needed MSR, the injected #GP will panic the Linux kernel. Ignore setting of the HWCR.FFDIS bit in this MSR to let Linux boot with an AMD K8 family guest CPU.

[COMMIT master] KVM: x86 emulator: Add sysexit emulation

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com Handle #UD intercept of the sysexit instruction in 64bit mode returning to 32bit compat mode on an AMD host. Setup the segment descriptors for CS and SS and the EIP/ESP registers according to the manual. Signed-off-by: Christoph Egger

[COMMIT master] KVM: s390: Fix memslot initialization for userspace_addr != 0

2009-06-25 Thread Avi Kivity
From: Christian Borntraeger borntrae...@de.ibm.com Since commit 854b5338196b1175706e99d63be43a4f8d8ab607 Author: Christian Ehrhardt ehrha...@linux.vnet.ibm.com KVM: s390: streamline memslot handling s390 uses the values of the memslot instead of doing everything in the arch ioctl handler of

[COMMIT master] KVM: Protect irq tracing with KVM_HAVE_IOAPIC and KVM_HAVE_PIT

2009-06-25 Thread Avi Kivity
From: =?utf-8?q?Christian=20Borntr=C3=A4ger?= christ...@borntraeger.net commit acb57be20f6b600848a99796d8f115ec079b8b08 Author: Marcelo Tosatti mtosa...@redhat.com Date: Wed Jun 17 09:22:14 2009 -0300 KVM: convert custom marker based tracing to event traces causes the following compile

[COMMIT master] hugetlbfs: export vma_kernel_pagsize to modules

2009-06-25 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This function is required by KVM. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e83ad2c..e2016ef 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -234,6 +234,7 @@

[COMMIT master] KVM: x86: missing locking in PIT/IRQCHIP/SET_BSP_CPU ioctl paths

2009-06-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Correct missing locking in a few places in x86's vm_ioctl handling path. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 331705f..6e0a203 100644

[COMMIT master] KVM: s390: Allow stfle instruction in the guest

2009-06-25 Thread Avi Kivity
From: Christian Borntraeger borntrae...@de.ibm.com 2.6.31-rc introduced an architecture level set checker based on facility bits. e.g. if the kernel is compiled to run only on z9, several facility bits are checked very early and the kernel refuses to boot if a z9 specific facility is missing.

[COMMIT master] KVM: s390: Remove some unused variables

2009-06-25 Thread Avi Kivity
From: Christian Borntraeger borntrae...@de.ibm.com This patch fixes the following warnings that were introduced by commit 2921292f45733bccdb53e426bcf65ceb13f53d94 Author: Gleb Natapov g...@redhat.com KVM: Use macro to iterate over vcpus. arch/s390/kvm/kvm-s390.c: In function

[COMMIT master] KVM: ignore reads from AMDs C1E enabled MSR

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com If the Linux kernel detects an C1E capable AMD processor (K8 RevF and higher), it will access a certain MSR on every attempt to go to halt. Explicitly handle this read and return 0 to let KVM run a Linux guest with the native AMD host CPU propagated to

[COMMIT master] KVM: Avoid large page unusued variable warning if no large page support

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 7f59367..09057b7 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1174,6 +1174,9 @@ int __kvm_set_memory_region(struct kvm *kvm, for (i =

[COMMIT master] KVM: Define vendor-specific tracepoints in common code

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Now that the vendor-specific tracepoints have been commonalized, we can define them in common code and export them to vendor modules. This fixes CONFIG_KVM_INTEL=y CONFIG_KVM_AMD=y builds. Signed-off-by: Avi Kivity a...@redhat.com diff --git

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

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@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: Fold trace-arch.h into trace.h

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com trace-arch.h is only included in one point, and isn't any different from trace.h. Fold the one into the other. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/trace-arch.h b/arch/x86/kvm/trace-arch.h deleted file mode 100644 index

[COMMIT master] KVM: ftrace: remove vendor exit reasons string macro

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com The vendor exit reason strings macro is the only thing that differs beween vmx ftrace and svm ftrace, and since it is a macro, multiple definitions cannot coexist, breaking KVM_INTEL=Y KVM_AMD=Y builds. Replace the macro by a pointer in kvm_x86_ops.

[COMMIT master] KVM: introduce module parameter for ignoring unknown MSRs accesses

2009-06-25 Thread Avi Kivity
From: Andre Przywara andre.przyw...@amd.com KVM will inject a #GP into the guest if that tries to access unhandled MSRs. This will crash many guests. Although it would be the correct way to actually handle these MSRs, we introduce a runtime switchable module param called ignore_msrs (defaults to

[COMMIT master] Merge branch 'upstream-merge'

2009-06-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * upstream-merge: (53 commits) add sparc64-softmmu to default configure targets list sparc64 follow pci_nic_init change microblaze: Support the latest mmu-kernel stat64 ABI. target-ppc: permit linux-user to read PVR cris: Remove unused internal flag.

Re: [KVM PATCH v8 1/3] KVM: make io_bus interface more robust

2009-06-25 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 10:22:29AM -0400, Gregory Haskins wrote: Gregory Haskins wrote: Today kvm_io_bus_regsiter_dev() returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the series, so we need to enhance the

Re: [KVM PATCH v8 1/3] KVM: make io_bus interface more robust

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 10:22:29AM -0400, Gregory Haskins wrote: Gregory Haskins wrote: Today kvm_io_bus_regsiter_dev() returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the

about savevm and mem-path

2009-06-25 Thread nicolas prochazka
Hello, When i 'm trying to do a savevm from qemu monitor, all is ok with standard qemu command. If i'm using -mem-path /hugepages, savevm leave vm in a block state, as i do a stop command I'm trying with last qem-kvm git tree. So is -mem-path also works with vm migration and savevm state ?

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Wed, Jun 24, 2009 at 11:49:01AM +0300, Michael S. Tsirkin wrote: On Tue, Jun 23, 2009 at 09:43:31PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: Remove in_range from kvm_io_device and ask read/write callbacks, if supplied, to perform

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-25 Thread Davide Libenzi
On Thu, 25 Jun 2009, Rusty Russell wrote: On Thu, 25 Jun 2009 08:15:11 am Davide Libenzi wrote: Some components would like to know if userspace dropped the fd, and take proper action accordingly (release resources, drop module instances, etc...). Like to know? Possibly. Need to

Re: [KVM PATCH v5 0/4] irqfd fixes and enhancements

2009-06-25 Thread Davide Libenzi
On Thu, 25 Jun 2009, Gregory Haskins wrote: So I know we talked yesterday in the review session about whether it was actually worth all this complexity to deal with the POLLHUP or if we should just revert to the prior two syscall model and be done with it. Rusty reflected these same

Device assignment hotplug broken

2009-06-25 Thread Avi Kivity
The impact of the hotplug changes on device assignment were too difficult for me to fix up during the merge, so I disabled it temporarily. Please take a look at qemu-kvm.git commit a3b371477e3. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to

Re: [PATCH] support colon in filenames

2009-06-25 Thread Ram Pai
On Thu, 2009-06-25 at 11:14 +0200, Kevin Wolf wrote: Ram Pai schrieb: Copying the qemu-devel mailing list too. On Wed, 2009-06-24 at 09:58 -0700, Ram Pai wrote: Problem: It is impossible to feed filenames with the character colon because qemu interprets such names as a protocol.

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-25 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 01:32:22PM -0400, Gregory Haskins wrote: Please take a close look at it and consider for merging, if you would. With all the incremental patching, I kind of lost track of what the complete file would look like. Is there a git tree I could pull? -- MST -- To unsubscribe

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 01:32:22PM -0400, Gregory Haskins wrote: Please take a close look at it and consider for merging, if you would. With all the incremental patching, I kind of lost track of what the complete file would look like. Is there a git tree I

Re: [PATCH] kvm: pass value to in_range callback

2009-06-25 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 10:49:51AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: For write transactions, pass the value written to in_range checks so that we can make each iosignalfd a separate device on kvm bus. Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

Re: [PATCH] kvm: pass value to in_range callback

2009-06-25 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 03:25:12PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 10:49:51AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: For write transactions, pass the value written to in_range checks so that we can make each

Re: [PATCH] kvm: pass value to in_range callback

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 03:25:12PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 10:49:51AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: For write transactions, pass the value written

Re: [Qemu-devel] KVMs default CPU type (was: allow sysenter on 32bit guests running on vmx host)

2009-06-25 Thread Andrea Arcangeli
Hi everyone, On Thu, Jun 25, 2009 at 10:11:58AM +0200, Andre Przywara wrote: common denominator. This should be a family 15 CPU (AMD K8 or Intel P4) with a constant vendor ID (in my experiments Intel showed less problems with guests). Since 64bit Windows has a whitelist of known vendor IDs

Re: [Qemu-devel] KVMs default CPU type (was: allow sysenter on 32bit guests running on vmx host)

2009-06-25 Thread Andrea Arcangeli
On Fri, Jun 26, 2009 at 02:42:17AM +0200, Andrea Arcangeli wrote: that purely asks for troubles I think. At the same time I doubt we want to deviate much from qemu code here, this seems messy enough already without big changes to maintain in this area, and I guess this explains why kvm is only

RE: ia64: why is mmio bus access lockless?

2009-06-25 Thread Zhang, Xiantao
Hi, Michael Since only virtual ioapic uses the lock-less logic, so it shouldn't introduce the issues. Anyway, it should be safer to add the lock considering its semantic and future usage models. Would you like to prepare a patch to enhance it ? Thanks! Xiantao Michael S. Tsirkin wrote:

[Qemu-devel] KVMs default CPU type (was: allow sysenter on 32bit guests running on vmx host)

2009-06-25 Thread Andre Przywara
[CCing k...@vger] Jamie Lokier wrote: Andrea Arcangeli wrote: Hi Jamie, ... It looks like it could be a KVM mis-feature. Is the changing vendor id actually useful for anything, without updating the family/model/stepping at the same time? E.g. does it make some guest things work, even

Re: [Qemu-devel] KVMs default CPU type

2009-06-25 Thread Avi Kivity
On 06/25/2009 11:11 AM, Andre Przywara wrote: I think we should go away from using qemu64 as a default for KVM. In my opinion we should target -cpu host as KVM's default, while in parallel create a -cpu migrate type (still fiddling with the CPUID details of that), which takes over the qemu64

Re: [PATCH] support colon in filenames

2009-06-25 Thread Kevin Wolf
Ram Pai schrieb: Copying the qemu-devel mailing list too. On Wed, 2009-06-24 at 09:58 -0700, Ram Pai wrote: Problem: It is impossible to feed filenames with the character colon because qemu interprets such names as a protocol. For example a filename scsi:0, is interpreted as a protocol by

Re: [ANNOUNCE] kvm-87 release

2009-06-25 Thread Avi Kivity
On 06/25/2009 12:21 PM, Avi Kivity wrote: Many fixes, performance improvements, a preview of irqfd, but all of these pale in comparison to That was kvm-87 released, not a kvm-86 rerun. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the

[PATCH] introduce module parameter for ignoring unknown MSRs accesses

2009-06-25 Thread Andre Przywara
KVM will inject a #GP into the guest if that tries to access unhandled MSRs. This will crash many guests. Although it would be the correct way to actually handle these MSRs, we introduce a runtime switchable module param called ignore_msrs (defaults to 0). If this is Y, unknown MSR reads will

Re: [PATCH] kvm-kmod: Fix condition for native_read_msr_safe wrapping

2009-06-25 Thread Avi Kivity
On 06/25/2009 11:24 AM, Jan Kiszka wrote: For i386, native_read_msr_safe was already introduced in 2.6.22. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Michael S. Tsirkin
On Wed, Jun 24, 2009 at 11:49:01AM +0300, Michael S. Tsirkin wrote: On Tue, Jun 23, 2009 at 09:43:31PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: Remove in_range from kvm_io_device and ask read/write callbacks, if supplied, to perform range checks internally. This allows

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Wed, Jun 24, 2009 at 11:49:01AM +0300, Michael S. Tsirkin wrote: On Tue, Jun 23, 2009 at 09:43:31PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: Remove in_range from kvm_io_device and ask read/write callbacks, if supplied, to perform

Re: virtio-serial: A guest - host interface for simple communication

2009-06-25 Thread Rusty Russell
On Wed, 24 Jun 2009 10:09:37 pm Amit Shah wrote: On (Wed) Jun 24 2009 [13:45:01], Rusty Russell wrote: On Tue, 23 Jun 2009 10:12:31 pm Amit Shah wrote: Hello, Here are two patches. One implements a virtio-serial device in qemu and the other is the driver for a guest kernel.

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-25 Thread Rusty Russell
On Thu, 25 Jun 2009 08:15:11 am Davide Libenzi wrote: On Wed, 24 Jun 2009, Rusty Russell wrote: On Tue, 23 Jun 2009 03:33:22 am Davide Libenzi wrote: What you're doing there, is setting up a kernel-to-kernel (since userspace only role is to create the eventfd) communication, using a

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 07:27:36AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Wed, Jun 24, 2009 at 11:49:01AM +0300, Michael S. Tsirkin wrote: On Tue, Jun 23, 2009 at 09:43:31PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: Remove in_range

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 07:27:36AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Wed, Jun 24, 2009 at 11:49:01AM +0300, Michael S. Tsirkin wrote: On Tue, Jun 23, 2009 at 09:43:31PM -0400, Gregory Haskins wrote:

[PATCH] Add kvm_set_boot_cpu_id() API.

2009-06-25 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/pc.c|3 ++- qemu-kvm.c | 17 + qemu-kvm.h |1 + 3 files changed, 20 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index cb5b4d0..9ef245d 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -901,7 +901,8 @@ static

[PATCH] Move x86 specific code from qemu-kvm.c to qemu-kvm-x86.c

2009-06-25 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- qemu-kvm-ia64.c |4 qemu-kvm-x86.c | 43 +++ qemu-kvm.c | 44 +--- qemu-kvm.h |1 + 4 files changed, 49 insertions(+), 43 deletions(-) diff

[PATCH] kvm-kmod: Fix tracepoint warnings against OpenSUSE's 2.6.27

2009-06-25 Thread Jan Kiszka
OpenSUSE's 2.6.27 already includes tracepoints and generates a lot of warnings regarding redefinition of tracepoint_synchronize_unregister. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- external-module-compat-comm.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[PATCH] kvm: pass value to in_range callback

2009-06-25 Thread Michael S. Tsirkin
For write transactions, pass the value written to in_range checks so that we can make each iosignalfd a separate device on kvm bus. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Reposting with a subject now. Sorry. Avi, can you please merge this patch in kvm.git so that Gregory can use

Re: Latest kvm autotest patch queue

2009-06-25 Thread jason wang
sudhir kumar 写道: On Mon, Jun 22, 2009 at 6:54 PM, Lucas Meneghel Rodriguesl...@redhat.com wrote: KVM Autotest patch queue Michael Goldish (mgold...@redhat.com) 1) KVM test: optionally convert PPM files to PNG

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Thu, Jun 25, 2009 at 08:08:04AM -0400, Gregory Haskins wrote: The patch has been in circulation for weeks, is well tested/reviewed (and I hope its considered well written), and I want to get on with my life ;). Hey, I feel your pain, I've been reviewing

[PATCH] qemu-kvm: fix KVMs GET_SUPPORTED_CPUID feature usage

2009-06-25 Thread Andre Przywara
If we want to trim the user provided CPUID bits for KVM to be not greater than that of the host, we should a) not remove the bits _after_ we sent them to the kernel and b) not do the bitmangling on the original values while sending a copy This fixes the masking of features that are not present on

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-25 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 09:02:28AM -0400, Gregory Haskins wrote: Here's what I have in mind: kvm does lock dev = find unlock -- at this point group device is removed write access to device that has been removed Hmm...you are right. This

guest gettimeofday behavior

2009-06-25 Thread Eran Rom
Hi All, Am a newbie (to kvm, linux kernel, git, etc.) so apologize in advance for missing/inaccurate info. I am experiencing inconsistent behavior of guest gettimeofday, described below. I have seen prior reference to the problem, however, it was not clear whether the issue was solved or not and

[KVM PATCH v5 0/4] irqfd fixes and enhancements

2009-06-25 Thread Gregory Haskins
(Applies to kvm.git/master:4631e094) The following is the latest attempt to fix the races in irqfd/eventfd, as well as restore DEASSIGN support. For more details, please read the patch headers. This series has been tested against the kvm-eventfd unit test, and appears to be functioning

[KVM PATCH v5 1/4] kvm: prepare irqfd for having interrupts disabled during eventfd-release

2009-06-25 Thread Gregory Haskins
We need to plug some race conditions on eventfd shutdown. In order to do this, we need to change the context in which the release notification is delivered so that the wqh lock is now held. However, there is currently code in the release callback that assumes it can sleep. We have a slight

[KVM PATCH v5 2/4] eventfd - revised interface and cleanups (4th rev)

2009-06-25 Thread Gregory Haskins
From: Davide Libenzi davi...@xmailserver.org The following patch changes the eventfd interface to de-couple the eventfd memory context, from the file pointer instance. Without such change, there is no clean way to racely free handle the POLLHUP event sent when the last instance of the file* goes

[KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-25 Thread Gregory Haskins
eventfd currently emits a POLLHUP wakeup on f_ops-release() to generate a release callback. This lets eventfd clients know if the eventfd is about to go away and is very useful particularly for in-kernel clients. However, until recently it is not possible to use this feature of eventfd in a

[KVM PATCH v5 4/4] KVM: add irqfd DEASSIGN feature

2009-06-25 Thread Gregory Haskins
DEASSIGN allows us to optionally disassociate an IRQFD from its underlying eventfd without destroying the eventfd in the process. This is useful for conditions like live-migration which may have an eventfd associated with a device and an IRQFD. We need to be able to decouple the guest from the

Re: [KVM PATCH v5 0/4] irqfd fixes and enhancements

2009-06-25 Thread Gregory Haskins
Gregory Haskins wrote: (Applies to kvm.git/master:4631e094) The following is the latest attempt to fix the races in irqfd/eventfd, as well as restore DEASSIGN support. For more details, please read the patch headers. This series has been tested against the kvm-eventfd unit test, and