[PATCH] KVM: make 'lapic_timer_ops' and 'kpit_ops' static

2009-03-12 Thread Avi Kivity
From: Hannes Eder han...@hanneseder.net Fix this sparse warnings: arch/x86/kvm/lapic.c:916:22: warning: symbol 'lapic_timer_ops' was not declared. Should it be static? arch/x86/kvm/i8254.c:268:22: warning: symbol 'kpit_ops' was not declared. Should it be static? Signed-off-by: Hannes Eder

Re: Issues with virtio_net in multiple guests?

2009-03-12 Thread Jim Paris
Ken Robertson wrote: Hoping someone can help me track down an issue I'm experiencing on a KVM machine I built recently. ... SIOCSIFFLAGS: Cannot assign requested address The address isn't in use or anything, so no reason I can think of why it can't assign it. It recognizes the device,

Re: Issues with virtio_net in multiple guests?

2009-03-12 Thread Ken Robertson
Jim, That was it! I didn't realize there was some significance of certain bits within the address. Changing that first byte resolved the issue. Should I be setting the 2nd bit in the LSB to 1? I started logging into all the systems I have access to and realized all of them have 00 as the

Re: Issues with virtio_net in multiple guests?

2009-03-12 Thread Jim Paris
Ken Robertson wrote: Jim, That was it! I didn't realize there was some significance of certain bits within the address. Changing that first byte resolved the issue. Should I be setting the 2nd bit in the LSB to 1? I started logging into all the systems I have access to and realized all

Re: kvm-autotest -- introducing kvm_runtest_2

2009-03-12 Thread Ryan Harper
* Michael Goldish mgold...@redhat.com [2009-03-12 02:26]: Regarding the stepfiles you created for Linux -- I can't help much with those since I don't have the data. I do believe that if I had the data and the stepfiles I could quickly identify the problem, so if you think those

Re: Problem with KVM-84 and more than 4 processors

2009-03-12 Thread Avi Kivity
Matthias Hovestadt wrote: Hi! I am unable to reproduce - 'modprobe kvm' gets me the expected lsmod line. Can you reproduce with plain 2.6.27 instead of the gentoo build? No, with a vanilla kernel from kernel.org it seems to work fine. Please take it up with the gentoo kernel team then.

[PATCH] compile fix - avoid raw string literal

2009-03-12 Thread Jochen Roth
This patch fixes compilation problems of kvm-userspace on current gcc 4.4 compilers which implement the following standard: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm Signed-off-by: Jochen Roth jr...@linux.vnet.ibm.com diff --git a/user/test/x86/apic.c

[PATCH 02/16] kvm: deassign irq for INTx

2009-03-12 Thread Sheng Yang
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu/hw/device-assignment.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qemu/hw/device-assignment.c

[PATCH 10/16] kvm: Support MSI convert to INTx in device assignment

2009-03-12 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu/hw/device-assignment.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index bda0e95..01485d7 100644 --- a/qemu/hw/device-assignment.c +++

[PATCH 11/16] Add MSI-X related macro to pci.c

2009-03-12 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu/hw/pci.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/hw/pci.h b/qemu/hw/pci.h index 127dbed..1392626 100644 --- a/qemu/hw/pci.h +++ b/qemu/hw/pci.h @@ -206,6 +206,7 @@ typedef struct PCIIORegion { #define

[PATCH 0/16 v5] Device assignment improvement in userspace

2009-03-12 Thread Sheng Yang
Patch 1 and 2 are new ones, all the others had been sent before. This (huge) patchset, contained: Patch 1..2 are new interface after reworked device assignment kernel part. Patch 3..6 are generic capability support mechanism. These may can be adopted by QEmu upstream as well. Patch 7..10

[PATCH 07/16] kvm: user interface for MSI type irq routing

2009-03-12 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- libkvm/libkvm.c | 98 --- libkvm/libkvm.h | 22 2 files changed, 101 insertions(+), 19 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 80a0481..e9bae23

[PATCH 03/16] kvm: Replace force type convert with container_of()

2009-03-12 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu/hw/device-assignment.c | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index 19848b4..e8a69ba 100644 --- a/qemu/hw/device-assignment.c

[PATCH 12/16] kvm: add ioctl KVM_SET_MSIX_ENTRY_NR and KVM_SET_MSIX_ENTRY

2009-03-12 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- libkvm/libkvm.c | 25 + libkvm/libkvm.h |7 +++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 405b0bf..f8129a4 100644 --- a/libkvm/libkvm.c +++

[PATCH 15/16] KVM: Fill config with correct VID/DID

2009-03-12 Thread Sheng Yang
SRIOV's virtual function didn't show correct Vendor ID/Device ID in config, so we have to fill them manually according to device/vendor file in sysfs. Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu/hw/device-assignment.c | 31 ++- 1 files changed, 30

[PATCH 06/16] Support for device capability

2009-03-12 Thread Sheng Yang
This framework can be easily extended to support device capability, like MSI/MSI-x. Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu/hw/pci.c | 77 +++- qemu/hw/pci.h | 29 + 2 files changed, 104 insertions(+), 2

[PATCH 05/16] Figure out device capability

2009-03-12 Thread Sheng Yang
Try to figure out device capability in update_dev_cap(). Now we are only care about MSI capability. The function pci_find_cap_offset original function wrote by Allen for Xen. Notice the function need root privilege to work. This depends on libpci to work. Signed-off-by: Allen Kay

Re: kvm-autotest -- introducing kvm_runtest_2

2009-03-12 Thread Ryan Harper
* Michael Goldish mgold...@redhat.com [2009-03-12 09:04]: yep, used stepeditor to fix; defintely worth documenting where one should be invoking stepeditor -- from the steps dir; if you don't run it from there, it won't find the steps_data dir =( Are you absolutely sure about that?

[PATCH] KVM: Improvements for task switching

2009-03-12 Thread Bernhard Kohl
NSN's proprietary OS DMX sometimes does task switches. To get it running in KVM the following changes were necessary: Interrupt injection only with interrupt flag set. Linking the tss-prev_task_link to itself removed. Task linking is required for CALL and GATE. Do not call

missing kvm smp tlb flush in invlpg

2009-03-12 Thread Andrea Arcangeli
From: Andrea Arcangeli aarca...@redhat.com While looking at invlpg out of sync code with Izik I think I noticed a missing smp tlb flush here. Without this the other cpu can still write to a freed host physical page. tlb smp flush must happen if rmap_remove is called always before mmu_lock is

[PATCH] kvm: external module: support building against Windriver 2.0 (kernel 2.6.21)

2009-03-12 Thread Bernhard Kohl
This is needed to compile kvm in a Windriver 2.0 distribution (kernel 2.6.21). This kernel has an include file marker.h, but trace_mark is not defined there. So the compat code in kernel/include-compat/linux/marker.h is not included. Signed-off-by: Bernhard Kohl bernhard.k...@nsn.com ---

Re: [PATCH] kvm: external module: support building against Windriver 2.0 (kernel 2.6.21)

2009-03-12 Thread Jan Kiszka
Bernhard Kohl wrote: This is needed to compile kvm in a Windriver 2.0 distribution (kernel 2.6.21). This kernel has an include file marker.h, but trace_mark is not defined there. So the compat code in kernel/include-compat/linux/marker.h is not included. I bet this is because Wind River

Re: [PATCH] KVM: Improvements for task switching

2009-03-12 Thread Jan Kiszka
Bernhard Kohl wrote: NSN's proprietary OS DMX sometimes does task switches. To get it running in KVM the following changes were necessary: Interrupt injection only with interrupt flag set. Linking the tss-prev_task_link to itself removed. Task linking is required for CALL and GATE. Do not

Re: [PATCH] KVM: Improvements for task switching

2009-03-12 Thread Jan Kiszka
Jan Kiszka wrote: Bernhard Kohl wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 5cf28df..eca57a3 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3357,7 +3357,8 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu) enable_irq_window(vcpu);

Unable to re-establish VNC connection after some time

2009-03-12 Thread Andreas Olsowski
Hello fellow kvm users/admins, im currently running kvm-84 with linux-2.6.28.4 under x86_64. My 2 linux guests are basically running the same kernel (minus iscsi, multipath and kvm support. Another guest is a win2008 server. All of the machines experience the same problem: After a

RE: x86: use smp_send_reschedule in kvm_vcpu_kick

2009-03-12 Thread Zhang, Xiantao
We also hacked the source like the patch. But the issue is not caused by it. We are still trying to figure the reason out. Thanks! Xiantao -Original Message- From: Gleb Natapov [mailto:g...@redhat.com] Sent: Thursday, March 12, 2009 7:04 PM To: Zhang, Xiantao Cc: Avi Kivity; Marcelo