[COMMIT master] KVM: fix build error: add missing semi-colon in longmode cpuid

2009-05-12 Thread Avi Kivity
From: Randy Dunlap randy.dun...@oracle.com Add missing ; to fix build error: arch/x86/kvm/x86.c:1259: error: expected',' or ';' before 'const' Signed-off-by: Randy Dunlap randy.dun...@oracle.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c

[COMMIT master] Move source sync code into new file sync.mak

2009-05-12 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This makes it possible to call it without running ./configure. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/Makefile b/Makefile index 0413212..ff6945e 100644 --- a/Makefile +++ b/Makefile @@ -19,21 +19,6 @@ rpmrelease = devel LINUX = ./linux-2.6

[COMMIT master] Make vmx-debug.c to compile again

2009-05-12 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Add TPR value checking. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/vmx-debug.c b/x86/vmx-debug.c index 29316a0..d466f03 100644 --- a/x86/vmx-debug.c +++ b/x86/vmx-debug.c @@ -17,17 +17,14 @@ #include

[COMMIT stable-0.10] Merge branch 'stable-0.10' of git://git.sv.gnu.org/qemu into stable-0.10

2009-05-12 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * 'stable-0.10' of git://git.sv.gnu.org/qemu: Improve block range checks e1000: Do not reinit pci config space to 0 AIO deletion race fix reset state for load_linux register reset handler for option_roms Fix cluster freeing in qcow2 Enable power

[COMMIT master] Compile and cache regular expressions

2009-05-12 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Speeds up hacking the source. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/sync b/sync index cb4a9db..4a89296 100755 --- a/sync +++ b/sync @@ -14,6 +14,14 @@ if len(sys.argv) = 2: linux = 'linux-2.6' +_re_cache = {} + +def re_cache(regexp): +

Re: KVM on Via Nano (Isaiah) CPUs? Virus checked

2009-05-12 Thread Avi Kivity
Andreas Tanz wrote: Craig Metz wrote: In message 49d396ab.6090...@redhat.com, you write: Via engineers have contacted me and confirmed that this is a problem in the processor. Is there a known-fixed CPU revision? Is there a way to identify working vs.

Re: [KVM PATCH v4 2/2] kvm: add support for irqfd via eventfd-notification interface

2009-05-12 Thread Davide Libenzi
On Mon, 11 May 2009, Gregory Haskins wrote: Davide Libenzi wrote: On Wed, 6 May 2009, Gregory Haskins wrote: If there isn't any more feedback on the series from Al, Avi, etc...please formally submit your eventfd patch so this series is available for Avi to pull in for inclusion

Re: Implement generic double fault generation mechanism

2009-05-12 Thread Gleb Natapov
On Tue, May 12, 2009 at 01:35:31PM +0800, Dong, Eddie wrote: Gleb Natapov wrote: On Mon, May 11, 2009 at 09:04:52AM +0800, Dong, Eddie wrote: There is not point referring to current code. Current code does not handle serial exceptions properly. So fix it in your patch otherwise I

Re: KVM on Via Nano (Isaiah) CPUs? Virus checked

2009-05-12 Thread Andreas Tanz
Craig Metz wrote: In message 49d396ab.6090...@redhat.com, you write: Via engineers have contacted me and confirmed that this is a problem in the processor. Is there a known-fixed CPU revision? Is there a way to identify working vs. non-working chips, either from IC

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-12 Thread Christoph Hellwig
On Mon, May 11, 2009 at 07:49:37PM +0300, Avi Kivity wrote: Maybe we should add a fourth cache= mode then. But cache=writeback+fsync doesn't correspond to any real world drive; in the real world you're limited to power failures and a few megabytes of cache (typically less),

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-12 Thread Christoph Hellwig
On Mon, May 11, 2009 at 12:47:58PM -0500, Anthony Liguori wrote: But how do we define the data integrity guarantees to the user of cache=writeback+fsync? It seems to require a rather detailed knowledge of Linux's use of T_FLUSH operations. It does work the same as for disks with writeback

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-12 Thread Christoph Hellwig
On Mon, May 11, 2009 at 11:38:09AM -0500, Anthony Liguori wrote: Right now it doesn't, but it probably should. So then with cache=writeback, fsync behaves itself but O_DIRECT writes do not. Right now O_DIRECT does not do an explicit cache flush, but due to the way barriers are

[PATCH v2] kvm: x86: Allow PIT emulation without speaker port

2009-05-12 Thread Jan Kiszka
The in-kernel speaker emulation is only a dummy and also unneeded from the performance point of view. Rather, it takes user space support to generate sound output on the host, e.g. console beeps. To allow this, introduce KVM_CREATE_PIT2 which controls in-kernel speaker port emulation via a flag

[PATCH v2] qemu-kvm: Make PC speaker emulation aware of in-kernel PIT

2009-05-12 Thread Jan Kiszka
When using the in-kernel PIT the speaker emulation has to synchronize the PIT state with KVM. Enhance the existing speaker sound device and allow it to take over port 0x61 by using KVM_CREATE_PIT2 where available. This unbreaks -soundhw pcspk in KVM mode. Changes in v2: - rebased over qemu-kvm

Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-12 Thread Jan Kiszka
Sebastian Herbszt wrote: Jan Kiszka wrote: Sebastian Herbszt wrote: Anyway, using timer ticks since midnight should be possible (INT 08h handler is set up before vga bios is called). I have implemented the beep for vgabios-6b and it works on bochs but fails on qemu. With -soundhw pcspk i

event injection MACROs

2009-05-12 Thread Dong, Eddie
I noticed the MACRO for SVM vmcb-control.event_inj and VMX VM_EXIT_INTR_INFO are almost same, I have a need to query the event injection situation in common code so plan to expose this register read/write to x86.c. Should we define a new format for evtinj/VM_EXIT_INTR_INFO as common KVM

Re: [PATCH -next] kvm: fix build error: add missing semi-colon

2009-05-12 Thread Avi Kivity
Randy Dunlap wrote: From: Randy Dunlap randy.dun...@oracle.com Add missing ; to fix build error: arch/x86/kvm/x86.c:1259: error: expected',' or ';' before 'const' Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-12 Thread Avi Kivity
Christoph Hellwig wrote: On Mon, May 11, 2009 at 07:49:37PM +0300, Avi Kivity wrote: Maybe we should add a fourth cache= mode then. But cache=writeback+fsync doesn't correspond to any real world drive; in the real world you're limited to power failures and a few megabytes of cache

Re: event injection MACROs

2009-05-12 Thread Gleb Natapov
On Tue, May 12, 2009 at 03:38:59PM +0800, Dong, Eddie wrote: I noticed the MACRO for SVM vmcb-control.event_inj and VMX VM_EXIT_INTR_INFO are almost same, I have a need to query the event injection situation in common code so plan to expose this register read/write to x86.c. Should we

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Christian Borntraeger
Am Tuesday 12 May 2009 00:19:32 schrieb Michael S. Tsirkin: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. [...] diff --git

Re: [PATCH 4/4] Userspace changes for KVM HPET (v3)

2009-05-12 Thread Avi Kivity
Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/hw/hpet.c b/hw/hpet.c index c7945ec..100abf5 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -30,6 +30,7 @@ #include console.h #include qemu-timer.h #include hpet_emul.h +#include qemu-kvm.h //#define HPET_DEBUG #ifdef

Re: device-assignment deadlock

2009-05-12 Thread Yang, Sheng
[I was kicked off from the mailing list by periodic unknown reason last Friday... Sorry] Hi Sheng, I think I'm running into the following deadlock in the kvm kernel module when trying to use device assignment: CPU A CPU B kvm_vm_ioctl_deassign_dev_irq()

Re: [PATCH 1/6] kvm-s390: Fix memory slot versus run

2009-05-12 Thread Christian Ehrhardt
Avi Kivity wrote: Christian Ehrhardt wrote: The bad thing on vcpu-request in that case is that I don't want the async behaviour of vcpu-requests in that case, I want the memory slot updated in all vcpu's when the ioctl is returning. You mean, the hardware can access the vcpu control block

Re: [PATCH 2/4] Userspace changes for configuring irq0-inti2 override (v3)

2009-05-12 Thread Gleb Natapov
On Mon, May 11, 2009 at 01:29:44PM -0400, Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index e1b19d7..bb74f38 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -279,6 +279,7 @@ void *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,

Re: [PATCH 1/4] BIOS changes for configuring irq0-inti2 override (v3)

2009-05-12 Thread Gleb Natapov
On Mon, May 11, 2009 at 01:29:43PM -0400, Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c index cbd5f15..53359b8 100755 --- a/kvm/bios/rombios32.c +++ b/kvm/bios/rombios32.c @@ -444,6 +444,9 @@ uint32_t cpuid_features;

Re: boot=on option fails on win 2k/xp double boot

2009-05-12 Thread Federico Fissore
Gleb Natapov, il 11/05/2009 11:26, ha scritto: May be you can test it not in production? On another machine. Or alternatively you can compile only userspace of kvm-84 and run it with kernel kvm modules available in lenny. Another option would be to run kvm-84 with -no-kvm flag. i've tried

Re: [PATCH 2/4] Userspace changes for configuring irq0-inti2 override (v3)

2009-05-12 Thread Avi Kivity
Gleb Natapov wrote: for (i = 0; i 24; ++i) { -r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); +if (i == 0) { +r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2); +} else if (i != 2) { +r =

Re: [PATCH 2/4] Userspace changes for configuring irq0-inti2 override (v3)

2009-05-12 Thread Gleb Natapov
On Tue, May 12, 2009 at 01:22:06PM +0300, Avi Kivity wrote: Gleb Natapov wrote: for (i = 0; i 24; ++i) { -r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); +if (i == 0) { +r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC,

Re: [PATCH 1/6] kvm-s390: Fix memory slot versus run

2009-05-12 Thread Avi Kivity
Christian Ehrhardt wrote: Avi Kivity wrote: Christian Ehrhardt wrote: The bad thing on vcpu-request in that case is that I don't want the async behaviour of vcpu-requests in that case, I want the memory slot updated in all vcpu's when the ioctl is returning. You mean, the hardware can

[PATCH] Work around supported cpuid ioctl() brokenness

2009-05-12 Thread Mark McLoughlin
KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG when it runs out of entries. Detect this by always trying again with a bigger table if the ioctl() fills the table. Signed-off-by: Mark McLoughlin mar...@redhat.com --- kvm/libkvm/libkvm-x86.c |2 ++ 1 files changed, 2

Re: [Qemu-devel] [PATCH 4/4] kvm: Trim cpu features not supported by kvm

2009-05-12 Thread Mark McLoughlin
On Sun, 2009-05-03 at 17:04 +0300, Avi Kivity wrote: Remove cpu features that are not supported by kvm from the cpuid features reported to the guest. Signed-off-by: Avi Kivity a...@redhat.com @@ -1699,5 +1714,20 @@ CPUX86State *cpu_x86_init(const char *cpu_model)

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Marcelo Tosatti
On Tue, May 12, 2009 at 05:32:09PM +0800, Sheng Yang wrote: kvm_vm_ioctl_deassign_dev_irq() would potentially recursively get kvm-lock, because it called kvm_deassigned_irq() which implicit hold kvm-lock by calling deassign_host_irq(). Fix it by move kvm_deassign_irq() out of critial

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Rusty Russell
On Sun, 10 May 2009 04:55:38 pm Michael S. Tsirkin wrote: On Sun, May 10, 2009 at 01:37:06PM +0930, Rusty Russell wrote: Yes, and in fact a rough look at your patch reveals that we don't actually need del_vq: now we track them, we can just do that as part of vdev destruction, right? Let's

Re: [PATCH 2/4] Userspace changes for configuring irq0-inti2override (v3)

2009-05-12 Thread Beth Kon
Gleb Natapov wrote: On Tue, May 12, 2009 at 01:22:06PM +0300, Avi Kivity wrote: Gleb Natapov wrote: for (i = 0; i 24; ++i) { -r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); +if (i == 0) { +r =

Re: [PATCH 2/4] Userspace changes for configuring irq0-inti2override (v3)

2009-05-12 Thread Beth Kon
Gleb Natapov wrote: On Mon, May 11, 2009 at 01:29:44PM -0400, Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index e1b19d7..bb74f38 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -279,6 +279,7 @@ void *fw_cfg_init(uint32_t ctl_port, uint32_t

Re: [PATCH 1/6] kvm-s390: Fix memory slot versus run

2009-05-12 Thread Christian Ehrhardt
Avi Kivity wrote: Christian Ehrhardt wrote: Avi Kivity wrote: Christian Ehrhardt wrote: The bad thing on vcpu-request in that case is that I don't want the async behaviour of vcpu-requests in that case, I want the memory slot updated in all vcpu's when the ioctl is returning. You mean,

Re: [PATCH 2/4] Userspace changes for configuring irq0-inti2override (v3)

2009-05-12 Thread Gleb Natapov
On Tue, May 12, 2009 at 09:20:36AM -0400, Beth Kon wrote: Gleb Natapov wrote: On Tue, May 12, 2009 at 01:22:06PM +0300, Avi Kivity wrote: Gleb Natapov wrote: for (i = 0; i 24; ++i) { -r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); +

Re: [PATCH RFC 0/2] qemu-kvm: MSI-X support

2009-05-12 Thread Michael S. Tsirkin
On Mon, May 11, 2009 at 05:24:25PM -0500, Anthony Liguori wrote: Michael S. Tsirkin wrote: Here's a draft MSI-X support patch. Among missing features: save/load support, and command-line flag to control the feature. This is on top of qemu-kvm: msi-x is disabled without kvm interrupt injection

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-12 Thread Rusty Russell
On Mon, 11 May 2009 06:09:08 pm Christoph Hellwig wrote: Do we need a new feature flag for this command or can we expect that all previous barrier support was buggy enough anyway? You mean reuse the VIRTIO_BLK_F_BARRIER for this as well? Seems fine. AFAIK only lguest offered that, and lguest

Re: [PATCH 1/4] BIOS changes for configuring irq0-inti2 override(v3)

2009-05-12 Thread Beth Kon
Gleb Natapov wrote: On Mon, May 11, 2009 at 01:29:43PM -0400, Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c index cbd5f15..53359b8 100755 --- a/kvm/bios/rombios32.c +++ b/kvm/bios/rombios32.c @@ -444,6 +444,9 @@ uint32_t

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Yang, Sheng
On Tuesday 12 May 2009 19:55:24 Marcelo Tosatti wrote: On Tue, May 12, 2009 at 05:32:09PM +0800, Sheng Yang wrote: kvm_vm_ioctl_deassign_dev_irq() would potentially recursively get kvm-lock, because it called kvm_deassigned_irq() which implicit hold kvm-lock by calling deassign_host_irq().

Re: [PATCH 4/4] Userspace changes for KVM HPET (v3)

2009-05-12 Thread Beth Kon
Avi Kivity wrote: Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/hw/hpet.c b/hw/hpet.c index c7945ec..100abf5 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -30,6 +30,7 @@ #include console.h #include qemu-timer.h #include hpet_emul.h +#include qemu-kvm.h //#define

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Rusty Russell
On Tue, 12 May 2009 07:49:32 am Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Sorry, is this not on top of my virtio_device

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Marcelo Tosatti
On Tue, May 12, 2009 at 10:13:36PM +0800, Yang, Sheng wrote: + mutex_unlock(kvm-lock); assigned_dev list is protected by kvm-lock. So you could have another ioctl adding to it at the same time you're searching. Oh, yes... My fault... Could either have a separate

Re: PowerPC page faults

2009-05-12 Thread Hollis Blanchard
On Monday 11 May 2009 17:17:53 Anthony Liguori wrote: Hollis Blanchard wrote: On Mon, 2009-05-11 at 12:54 -0500, Anthony Liguori wrote: For future ppcemb's, do you know if there is an equivalent of a PF exit type? Does the hardware squirrel away the faulting address somewhere and

Enable IRQ windows after exception injection if there are pending virq

2009-05-12 Thread Dong, Eddie
I didn't take many test since our PTS system stop working now due to KVM userspace build changes. But since the logic is pretty simple, so I want to post here to see comments. Thx, eddie If there is pending irq after an virtual exception is injected, KVM needs to enable IRQ window to trap

[PATCH 0/2] Deal with shadow interrupts after emulated instructions

2009-05-12 Thread Glauber Costa
Same as before, addressing avi's comments -- 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

[PATCH 2/2] deal with interrupt shadow state for emulated instruction

2009-05-12 Thread Glauber Costa
we currently unblock shadow interrupt state when we skip an instruction, but failing to do so when we actually emulate one. This blocks interrupts in key instruction blocks, in particular sti; hlt; sequences If the instruction emulated is an sti, we have to block shadow interrupts. The same goes

[PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow

2009-05-12 Thread Glauber Costa
This patch replaces drop_interrupt_shadow with the more general set_interrupt_shadow, that can either drop or raise it, depending on its parameter. Signed-off-by: Glauber Costa glom...@redhat.com CC: H. Peter Anvin h...@zytor.com CC: Avi Kivity a...@redhat.com CC: Gleb Natapov g...@redhat.com ---

Problem doing pci passthrough of the network card without VT-d

2009-05-12 Thread Passera, Pablo R
Hi List, I am having problems to do pci passthrough to a network card without using VT-d. The card is present in the guest but with a different model (Intel Corporation 82801I Gigabit Ethernet Controller (rev 2)) and it does not work. The qemu line that I used is:

[PATCH 4/6]: kvm-s390: Unlink vcpu on destroy - v2

2009-05-12 Thread ehrhardt
From: Carsten Otte co...@de.ibm.com This patch makes sure we do unlink a vcpu's sie control block from the system control area in kvm_arch_vcpu_destroy. This prevents illegal accesses to the sie control block from other virtual cpus after free. Reported-by: Mijo Safradin m...@linux.vnet.ibm.com

[PATCH 1/6] kvm-s390: Fix memory slot versus run - v3

2009-05-12 Thread ehrhardt
From: Carsten Otte co...@de.ibm.com This patch fixes an incorrectness in the kvm backend for s390. In case virtual cpus are being created before the corresponding memory slot is being registered, we need to update the sie control blocks for the virtual cpus. *updates in v3* In consideration of

[PATCH 0/6] kvm-s390: collection of kvm-s390 fixes - v3

2009-05-12 Thread ehrhardt
From: Christian Ehrhardt ehrha...@de.ibm.com *updates in v3* - fix memory slot vs. run uses trylock to avoid a potential livelock - fix memory slot vs. run checks if it is the first and only memslot registered *updates in v2* - hrtimer wakeup use a more accurate calculation - unlink vcpu uses

[PATCH 5/6] kvm-s390: Sanity check on validity intercept

2009-05-12 Thread ehrhardt
From: Carsten Otte co...@de.ibm.com This patch adds a sanity check for the content of the guest prefix register content before faulting in the cpu lowcore that it refers to. The guest might end up in an endless loop where SIE complains about missing lowcore with incorrect content of the prefix

[PATCH 6/6] kvm-s390: Verify memory in kvm run

2009-05-12 Thread ehrhardt
From: Carsten Otte co...@de.ibm.com This check verifies that the guest we're trying to run in KVM_RUN has some memory assigned to it. It enters an endless exception loop if this is not the case. Reported-by: Mijo Safradin m...@linux.vnet.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com

Re: Enable IRQ windows after exception injection if there are pending virq

2009-05-12 Thread Gleb Natapov
On Tue, May 12, 2009 at 11:06:39PM +0800, Dong, Eddie wrote: I didn't take many test since our PTS system stop working now due to KVM userspace build changes. But since the logic is pretty simple, so I want to post here to see comments. Thx, eddie If there is pending irq after an

[PATCH][KVM-AUTOTEST] Add custom install option for kvm_install

2009-05-12 Thread Mike Burns
From: Michael Burns mbu...@redhat.com Signed-off-by: Michael Burns mbu...@redhat.com --- client/tests/kvm_runtest_2/control| 18 +- client/tests/kvm_runtest_2/kvm_install.py | 15 +++ 2 files changed, 32 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote: On Tue, 12 May 2009 07:49:32 am Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number

Re: [PATCH 4/4] Userspace changes for KVM HPET (v3)

2009-05-12 Thread Beth Kon
Beth Kon wrote: Avi Kivity wrote: Beth Kon wrote: Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/hw/hpet.c b/hw/hpet.c index c7945ec..100abf5 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -30,6 +30,7 @@ #include console.h #include qemu-timer.h #include hpet_emul.h +#include qemu-kvm.h

Re: [KVM PATCH v6] kvm: add support for irqfd

2009-05-12 Thread Avi Kivity
Gregory Haskins wrote: (Applies to kvm.git:833367b57) KVM provides a complete virtual system environment for guests, including support for injecting interrupts modeled after the real exception/interrupt facilities present on the native platform (such as the IDT on x86). Virtual interrupts can

Re: [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow

2009-05-12 Thread Avi Kivity
Glauber Costa wrote: This patch replaces drop_interrupt_shadow with the more general set_interrupt_shadow, that can either drop or raise it, depending on its parameter. } +static u32 svm_get_interrupt_shadow(struct kvm_vcpu *vcpu, int mask) +{ + struct vcpu_svm *svm = to_svm(vcpu); +

Re: [PATCH 2/2] deal with interrupt shadow state for emulated instruction

2009-05-12 Thread Avi Kivity
Glauber Costa wrote: we currently unblock shadow interrupt state when we skip an instruction, but failing to do so when we actually emulate one. This blocks interrupts in key instruction blocks, in particular sti; hlt; sequences If the instruction emulated is an sti, we have to block shadow

RE: Problem doing pci passthrough of the network card without VT-d

2009-05-12 Thread Passera, Pablo R
One update on this. I disabled VT-d from the BIOS and now I am not getting the DMAR error messages in dmesg, but the board still does not work on the guest. Any help is welcomed. e1000e :00:19.0: PCI INT A disabled pci-stub :00:19.0: PCI INT A - GSI 20 (level, low) - IRQ 20 pci-stub

[KVM PATCH v7 0/3] kvm: eventfd interfaces (formerly irqfd)

2009-05-12 Thread Gregory Haskins
(Applies to kvm.git:b5e725fa) This is v7 of the series. We have generalized the name of the series (as well as some of the hunks in the series) to reflect the fact that we have multiple eventfd based components. This series has been tested and appears to be working as intended. You can

[KVM PATCH v7 1/3] eventfd: export eventfd interfaces for module use

2009-05-12 Thread Gregory Haskins
We want to use eventfd from KVM which can be compiled as a module, so export the interfaces. Signed-off-by: Gregory Haskins ghask...@novell.com --- fs/eventfd.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 2a701d5..3f0e197 100644

[KVM PATCH v7 2/3] kvm: add support for irqfd via eventfd-notification interface

2009-05-12 Thread Gregory Haskins
KVM provides a complete virtual system environment for guests, including support for injecting interrupts modeled after the real exception/interrupt facilities present on the native platform (such as the IDT on x86). Virtual interrupts can come from a variety of sources (emulated devices,

[KVM PATCH v7 3/3] kvm: add iofd support

2009-05-12 Thread Gregory Haskins
iofd is a mechanism to register PIO/MMIO regions to trigger an eventfd signal when written to. Userspace can register any arbitrary address with a corresponding eventfd. Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/kvm.h | 12 + include/linux/kvm_host.h |

[PATCH v7 0/2] eventfd support for KVM userspace

2009-05-12 Thread Gregory Haskins
This is the userspace support for the irqfd/iofd interfaces published here: http://lkml.org/lkml/2009/5/12/372 --- Gregory Haskins (2): qemu-kvm: add iofd support qemu-kvm: add irqfd support kvm/libkvm/libkvm.c | 118 +++

[PATCH v7 1/2] qemu-kvm: add irqfd support

2009-05-12 Thread Gregory Haskins
irqfd lets you create an eventfd based file-desriptor to inject interrupts to a kvm guest. We associate one gsi per fd for fine-grained routing. Signed-off-by: Gregory Haskins ghask...@novell.com --- kvm/libkvm/libkvm.c | 66 +++

[PATCH v7 2/2] qemu-kvm: add iofd support

2009-05-12 Thread Gregory Haskins
An iofd allows an eventfd to attach to a specific PIO/MMIO region in the guest. Any guest-writes to that region will trigger an eventfd signal. Signed-off-by: Gregory Haskins ghask...@novell.com --- kvm/libkvm/libkvm.c | 52 +++

Re: [PATCH] kvm: Use a bitmap for tracking used GSIs

2009-05-12 Thread Alex Williamson
On Mon, 2009-05-11 at 12:00 +, Yang, Sheng wrote: On Friday 08 May 2009 06:22:20 Alex Williamson wrote: + /* Round the number of GSIs supported to a 4 byte +* value so we can search it using ints and ffs */ + i = kvm_get_gsi_count(kvm) ~0x1f; +

Re: [KVM PATCH v6] kvm: add support for irqfd

2009-05-12 Thread Gregory Haskins
Avi Kivity wrote: Gregory Haskins wrote: (Applies to kvm.git:833367b57) KVM provides a complete virtual system environment for guests, including support for injecting interrupts modeled after the real exception/interrupt facilities present on the native platform (such as the IDT on x86).

Re: [KVM PATCH v7 3/3] kvm: add iofd support

2009-05-12 Thread Gregory Haskins
Gregory Haskins wrote: iofd is a mechanism to register PIO/MMIO regions to trigger an eventfd signal when written to. Userspace can register any arbitrary address with a corresponding eventfd. Ugg..this patch header sucks, especially given all the talk around how we need to do them better

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Marcelo Tosatti
On Tue, May 12, 2009 at 11:30:21AM -0300, Marcelo Tosatti wrote: On Tue, May 12, 2009 at 10:13:36PM +0800, Yang, Sheng wrote: + mutex_unlock(kvm-lock); assigned_dev list is protected by kvm-lock. So you could have another ioctl adding to it at the same time you're searching.

Re: [kvm] Re: [PATCH] kvm: Use a bitmap for tracking used GSIs

2009-05-12 Thread Alex Williamson
On Tue, 2009-05-12 at 12:45 -0600, Alex Williamson wrote: On Mon, 2009-05-11 at 12:00 +, Yang, Sheng wrote: On Friday 08 May 2009 06:22:20 Alex Williamson wrote: + /* Round the number of GSIs supported to a 4 byte + * value so we can search it using ints and ffs */

Re: [kvm] Re: [PATCH] kvm: Use a bitmap for tracking used GSIs

2009-05-12 Thread Michael S. Tsirkin
On Tue, May 12, 2009 at 01:06:54PM -0600, Alex Williamson wrote: On Tue, 2009-05-12 at 12:45 -0600, Alex Williamson wrote: On Mon, 2009-05-11 at 12:00 +, Yang, Sheng wrote: On Friday 08 May 2009 06:22:20 Alex Williamson wrote: + /* Round the number of GSIs supported to

[KVM PATCH v7.1] kvm: add iofd support

2009-05-12 Thread Gregory Haskins
[ here is the updated header ] iofd is a mechanism to register PIO/MMIO regions to trigger an eventfd signal when written to. Userspace can register any arbitrary address with a corresponding eventfd. Normal IO requires a synchronous/blocking round-trip since the operation may cause

Re: [PATCH v2] kvm: Use a bitmap for tracking used GSIs

2009-05-12 Thread Michael S. Tsirkin
On Fri, May 08, 2009 at 04:31:21PM -0600, Alex Williamson wrote: +#ifdef KVM_CAP_IRQ_ROUTING We don't need these anymore. +static inline void set_bit(unsigned int *buf, int bit) +{ + buf[bit 5] |= (1U (bit 0x1f)); +} external () not needed here. bit 5 might be clearer as bit / 32

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Marcelo Tosatti
On Tue, May 12, 2009 at 11:30:21AM -0300, Marcelo Tosatti wrote: On Tue, May 12, 2009 at 10:13:36PM +0800, Yang, Sheng wrote: + mutex_unlock(kvm-lock); assigned_dev list is protected by kvm-lock. So you could have another ioctl adding to it at the same time you're searching.

[PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow

2009-05-12 Thread Glauber Costa
This patch replaces drop_interrupt_shadow with the more general set_interrupt_shadow, that can either drop or raise it, depending on its parameter. Signed-off-by: Glauber Costa glom...@redhat.com CC: H. Peter Anvin h...@zytor.com CC: Avi Kivity a...@redhat.com CC: Gleb Natapov g...@redhat.com ---

[PATCH 2/2] deal with interrupt shadow state for emulated instruction

2009-05-12 Thread Glauber Costa
we currently unblock shadow interrupt state when we skip an instruction, but failing to do so when we actually emulate one. This blocks interrupts in key instruction blocks, in particular sti; hlt; sequences If the instruction emulated is an sti, we have to block shadow interrupts. The same goes

Re: [PATCH] msi-x: let drivers retry when not enough vectors

2009-05-12 Thread Michael S. Tsirkin
On Fri, May 08, 2009 at 09:25:00AM +0930, Rusty Russell wrote: On Thu, 7 May 2009 07:49:53 pm Sheng Yang wrote: On Thursday 07 May 2009 17:53:02 Matthew Wilcox wrote: Here's a good example. Let's suppose you have a driver which supports two different models of cards, one has 16 MSI-X

[patch 3/3] KVM: x86: check for cr3 validity in mmu_alloc_roots

2009-05-12 Thread mtosatti
Verify the cr3 address stored in vcpu-arch.cr3 points to an existant memslot. If not, inject a triple fault. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c +++

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Marcelo Tosatti
On Tue, May 12, 2009 at 03:36:27PM -0600, Alex Williamson wrote: On Tue, 2009-05-12 at 16:44 -0300, Marcelo Tosatti wrote: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4d00942..ba067db 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -250,7 +250,15 @@ static

[KVM PATCH v7.2] kvm: add iofd support

2009-05-12 Thread Gregory Haskins
[ updated with figures, graphs, performance-test-harness info ] iofd is a mechanism to register PIO/MMIO regions to trigger an eventfd signal when written to by a guest. Userspace can register any arbitrary address with a corresponding eventfd and then pass the eventfd to a specific end-point of

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Alex Williamson
On Tue, 2009-05-12 at 19:09 -0300, Marcelo Tosatti wrote: KVM: workaround workqueue / deassign_host_irq deadlock I think I'm running into the following deadlock in the kvm kernel module when trying to use device assignment: CPU A CPU B

Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-12 Thread malc
On Wed, 13 May 2009, Sebastian Herbszt wrote: Jan Kiszka wrote: Sebastian Herbszt wrote: With the modified vgabios (see below) it does beep on bochs on vista, but not on qemu. Works fine for me! Did you check twice that your modified vgabios is actually loaded by qemu (e.g.

Re: [Qemu-devel] [PATCH] bios: Use the correct mask to size the PCI option ROM BAR

2009-05-12 Thread Alex Williamson
On Tue, 2009-05-12 at 23:41 +0100, Paul Brook wrote: On Tuesday 12 May 2009, Alex Williamson wrote: Bit 0 is the enable bit, which we not only don't want to set, but it will stick and make us think it's an I/O port resource. Why is the ROM slot special? Doesn't the same apply to all BARs?

XP smp using a lot of CPU

2009-05-12 Thread Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything. Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)? If it's real, is there

Best choice for copy/clone/snapshot

2009-05-12 Thread Ross Boylan
First, I have a feeling this might be a question I could ask on a qemu list. Is there a way for me to tell which questions should go where? Is it OK to ask here? As I install software onto a system I want to preserve its state--just the disk state---at various points so I can go back. What is

Re: XP smp using a lot of CPU

2009-05-12 Thread Elias Probst
Hi, I'm facing the same problem here. A Windows XP (SP3 + all current Updates) which uses constantly ~95% CPU on each core. I've already tried: - Using only 1 core - Replacing the HAL in Windows - Using another KVM version - Using different timer options for KVM I'm currently on KVM-85 where

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Rusty Russell
On Wed, 13 May 2009 01:03:30 am Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote and perhaps consider varargs for the callbacks (or would that be too horrible at the implementation end?) Thanks, Rusty. Ugh ... I think it will be. And AFAIK gcc

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-12 Thread Rusty Russell
On Tue, 12 May 2009 11:48:36 pm Christian Borntraeger wrote: Am Tuesday 12 May 2009 15:54:14 schrieb Rusty Russell: On Mon, 11 May 2009 06:09:08 pm Christoph Hellwig wrote: Do we need a new feature flag for this command or can we expect that all previous barrier support was buggy enough

[ kvm-Bugs-2791009 ] -vga vmware + X-windows: display errors, jumpy mouse, hangs

2009-05-12 Thread SourceForge.net
Bugs item #2791009, was opened at 2009-05-12 20:58 Message generated for change (Tracker Item Submitted) made by jiggly You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2791009group_id=180599 Please note that this message will contain a full copy of the

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-12 Thread Alex Williamson
On Tue, 2009-05-12 at 21:42 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 11:30 +0800, Yang, Sheng wrote: + kvm-used_gsi_bitmap = malloc(gsi_bytes); + if (!kvm-used_gsi_bitmap) { + pthread_mutex_unlock(kvm-gsi_mutex); + goto out_close; + } +

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-12 Thread Yang, Sheng
On Wednesday 13 May 2009 12:10:34 Alex Williamson wrote: On Tue, 2009-05-12 at 21:42 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 11:30 +0800, Yang, Sheng wrote: + kvm-used_gsi_bitmap = malloc(gsi_bytes); + if (!kvm-used_gsi_bitmap) { +