[PATCH] kvm: qemu: handle IRQ status injection in userspace

2009-02-26 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com This allows timers to keep track of injected and colaesced interrupts. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h index d4fffbe..de1ada2 100644 ---

[PATCH] KVM: Enable MSI-X for KVM assigned device

2009-02-26 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com This patch finally enable MSI-X. What we need for MSI-X: 1. Intercept one page in MMIO region of device. So that we can get guest desired MSI-X table and set up the real one. Now this have been done by guest, and transfer to kernel using ioctl

[PATCH] KVM: x86: release time_page on vcpu destruction

2009-02-26 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com Not releasing the time_page causes a leak of that page or the compound page it is situated in. Cc: sta...@kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c

[PATCH] KVM: Ioctls for init MSI-X entry

2009-02-26 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Introduce KVM_SET_MSIX_NR and KVM_SET_MSIX_ENTRY two ioctls. This two ioctls are used by userspace to specific guest device MSI-X entry number and correlate MSI-X entry with GSI during the initialization stage. MSI-X should be well initialzed before

[PATCH] KVM: Add MSI-X interrupt injection logic

2009-02-26 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com We have to handle more than one interrupt with one handler for MSI-X. Avi suggested to use a flag to indicate the pending. So here is it. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[PATCH] KVM: x86: paravirt skip pit-through-ioapic boot check

2009-02-26 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Skip the test which checks if the PIT is properly routed when using the IOAPIC, aimed at buggy hardware. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kernel/kvm.c

Re: KVM and VMware

2009-02-26 Thread Alexander Graf
On 25.02.2009, at 17:03, Avi Kivity wrote: Manfred_Knick wrote: B) Any chance to solve this problem? 'rmmod kvm-intel; rmmod kvm' should work. Avi, thanks a lot for your _very_ speedy response!! So I take it that -- You can't have them both at once, at the same time which turns out to

Re: which -cpu to use

2009-02-26 Thread Alexander Graf
On 26.02.2009, at 01:48, Piavlo wrote: Hi, I'm new to KVM and have some questions regarding kvm cpu emulation, hope you can answer them. I have a kvm node with Dual-Core AMD Opteron(tm) Processor 2218 processors. 1)I was wondering choosing what cpu emulation for VM would give best

[PATCH] VT-d: fix PCI device detach from virtual machine

2009-02-26 Thread Han, Weidong
When assign a device behind conventional PCI bridge or PCIe to PCI/PCI-x bridge to a domain, it must assign its bridge and may also need to assign secondary interface to the same domain. Dependent assignment is already there, but dependent deassignment is missed when detach device from virtual

Re: [PATCH] kvm x86: release time_page on vcpu destruction

2009-02-26 Thread Avi Kivity
Joerg Roedel wrote: Not releasing the time_page causes a leak of that page or the compound page it is situated in. 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: KVM: x86: silence preempt warning on kvm_write_guest_time

2009-02-26 Thread Avi Kivity
Marcelo Tosatti wrote: Glauber, Gerd, See comments on http://sourceforge.net/tracker2/?func=detailaid=2627272group_id=180599atid=893831 regarding the version variable. Looks fishy. From: Matt T. Yourst you...@users.sourceforge.net This issue just appeared in kvm-84 when running on 2.6.28.7

Re: KVM: x86: paravirt skip pit-through-ioapic boot check

2009-02-26 Thread Avi Kivity
Marcelo Tosatti wrote: Skip the test which checks if the PIT is properly routed when using the IOAPIC, aimed at buggy hardware. 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

vncviewer and broken mouse behaviour - is there a fix?

2009-02-26 Thread Tomasz Chmielewski
Currently, using mouse with vncviewer is a bit broken: VNC mouse pointer moves much faster than the real mouse pointer. As a result, it's not always easy to pointclick in the right area. Is there a workaround for that? -- Tomasz Chmielewski http://wpkg.org -- To unsubscribe from this list:

Re: which -cpu to use

2009-02-26 Thread Piavlo
Alexander Graf wrote: 2) I want to optimize/recompile a gentoo VM system packages for the chosen cpu - if that matters. Does rebuilding the VM packages to fine tuned for the emulated cpu give any advantages? I don't think features like SSE3 matter that much in a normal environment. I just

Re: KVM and VMware

2009-02-26 Thread Manfred_Knick
Alexander Graf schrieb: I have a patch lying around that activates hardware virtualization features on first VM creation and deactivates them on last destruction, so you can insmod kvm without blocking other VMMs from working. Of course you still can't run kvm and vmware virtual machines in

Re: which -cpu to use

2009-02-26 Thread Alexander Graf
On 26.02.2009, at 12:07, Piavlo wrote: Alexander Graf wrote: 2) I want to optimize/recompile a gentoo VM system packages for the chosen cpu - if that matters. Does rebuilding the VM packages to fine tuned for the emulated cpu give any advantages? I don't think features like SSE3 matter that

Re: vncviewer and broken mouse behaviour - is there a fix?

2009-02-26 Thread Avi Kivity
Tomasz Chmielewski wrote: Currently, using mouse with vncviewer is a bit broken: VNC mouse pointer moves much faster than the real mouse pointer. As a result, it's not always easy to pointclick in the right area. Is there a workaround for that? -usbdevice tablet -- error compiling

Re: KVM and VMware

2009-02-26 Thread Ricardo Botelho de Sousa
On Thursday 26 February 2009 11:34:43 Manfred_Knick wrote: Thus, if one would like to protect any ignorant user from harming himself, the check for exclusiveness would have to be applied dynamically at each try to start-up a VM instead, not at installation time. Not necessarly the ignorant. If

Re: which -cpu to use

2009-02-26 Thread Javier Guerra Giraldez
Piavlo wrote: Alexander Graf wrote: virtio drivers have nothing to do with CPU. Yes I mistakenly used the term viritio drivers instead of paravirtual guest support. So what I wanted to ask is if I build a guest kernel with paravitual support will it make the native hardware cpu features

Re: vncviewer and broken mouse behaviour - is there a fix?

2009-02-26 Thread Tomasz Chmielewski
Avi Kivity schrieb: Tomasz Chmielewski wrote: Currently, using mouse with vncviewer is a bit broken: VNC mouse pointer moves much faster than the real mouse pointer. As a result, it's not always easy to pointclick in the right area. Is there a workaround for that? -usbdevice tablet I

[PATCH] kvm: declare kvm_ioapic in kvm_host.h

2009-02-26 Thread Christian Borntraeger
With todays git I get the following warnings on s390: CC [M] arch/s390/kvm/kvm-s390.o In file included from arch/s390/kvm/kvm-s390.c:22: include/linux/kvm_host.h:357: warning: 'struct kvm_ioapic' declared inside parameter list include/linux/kvm_host.h:357: warning: its scope is only this

Re: [PATCH] kvm: declare kvm_ioapic in kvm_host.h

2009-02-26 Thread Avi Kivity
Christian Borntraeger wrote: With todays git I get the following warnings on s390: CC [M] arch/s390/kvm/kvm-s390.o In file included from arch/s390/kvm/kvm-s390.c:22: include/linux/kvm_host.h:357: warning: 'struct kvm_ioapic' declared inside parameter list include/linux/kvm_host.h:357:

Re: vncviewer and broken mouse behaviour - is there a fix?

2009-02-26 Thread Tomasz Chmielewski
Dietmar Maurer schrieb: use the vmmouse driver (instead of mouse) for X Assuming it'll work, what about console? Well, I guess I could live with it. But what about Windows guests? I've heard unconfirmed rumours that Windows doesn't run X (and have no console mode, either). Do I have to

RE: vncviewer and broken mouse behaviour - is there a fix?

2009-02-26 Thread Dietmar Maurer
Dietmar Maurer schrieb: use the vmmouse driver (instead of mouse) for X Assuming it'll work, what about console? Well, I guess I could live with it. But what about Windows guests? I've heard unconfirmed rumours that Windows doesn't run X (and have no console mode, either). Windows

Re: [PATCH] kvm: declare kvm_ioapic in kvm_host.h

2009-02-26 Thread Christian Borntraeger
Am Thursday 26 February 2009 13:43:54 schrieb Avi Kivity: Declaring struct kvm_ioapic should help. Better to limit the declaration to archs that have ioapics... do we have a KVM_HAVE_IOAPIC define? Something like (works on s390, not tested on x86)? [PATCH] kvm: use ioapic functions only on

[PATCH] use bitmap ops on a bitmap instead of bit ops

2009-02-26 Thread Gleb Natapov
And don't zero bitmap twice. Assume that caller zeros it. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 7c2cb2b..21627b9 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -170,12 +170,11 @@ void kvm_ioapic_get_delivery_bitmask(struct

Re: vncviewer and broken mouse behaviour - is there a fix?

2009-02-26 Thread Daniel P. Berrange
On Thu, Feb 26, 2009 at 01:34:03PM +0100, Tomasz Chmielewski wrote: Avi Kivity schrieb: Tomasz Chmielewski wrote: Currently, using mouse with vncviewer is a bit broken: VNC mouse pointer moves much faster than the real mouse pointer. As a result, it's not always easy to pointclick in the

Re: KVM and VMware

2009-02-26 Thread Manfred_Knick
Ricardo Botelho de Sousa schrieb: On Thursday 26 February 2009 11:34:43 Manfred_Knick wrote: Thus, if one would like to protect any ignorant user from harming himself, the check for exclusiveness would have to be applied dynamically at each try to start-up a VM instead, not at installation

Re: [patch 0/3] unify hrtimer handler

2009-02-26 Thread Avi Kivity
Marcelo Tosatti wrote: Applied all, 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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 00/40] KVM Updates for the 2.6.30 merge window (1/3)

2009-02-26 Thread Avi Kivity
This is the first batch of three containing the current 2.6.30 patch queue for review. Changes include nested virtualization on AMD hosts, ppc e500 support, improved guest debugging support, better performance and improved emulation accuracy. Alexander Graf (10): KVM: SVM: Clean up VINTR

[PATCH 02/40] KVM: SVM: Move EFER and MSR constants to generic x86 code

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de MSR_EFER_SVME_MASK, MSR_VM_CR and MSR_VM_HSAVE_PA are set in KVM specific headers. Linux does have nice header files to collect EFER bits and MSR IDs, so IMHO we should put them there. While at it, I also changed the naming scheme to match that of the other

[PATCH 21/40] KVM: MMU: Segregate mmu pages created with different cr4.pge settings

2009-02-26 Thread Avi Kivity
Don't allow a vcpu with cr4.pge cleared to use a shadow page created with cr4.pge set; this might cause a cr3 switch not to sync ptes that have the global bit set (the global bit has no effect if !cr4.pge). This can only occur on smp with different cr4.pge settings for different vcpus (since a

[PATCH 01/40] KVM: SVM: Clean up VINTR setting

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de The current VINTR intercept setters don't look clean to me. To make the code easier to read and enable the possibilty to trap on a VINTR set, this uses a helper function to set the VINTR intercept. v2 uses two distinct functions for setting and clearing the bit

[PATCH 04/40] KVM: SVM: Implement GIF, clgi and stgi

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de This patch implements the GIF flag and the clgi and stgi instructions that set this flag. Only if the flag is set (default), interrupts can be received by the CPU. To keep the information about that somewhere, this patch adds a new hidden flags vector. that is

[PATCH 26/40] KVM: MMU: Use for_each_shadow_entry() in __direct_map()

2009-02-26 Thread Avi Kivity
Eliminating a callback and a useless structure. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c | 83 ++- 1 files changed, 29 insertions(+), 54 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[PATCH 22/40] KVM: MMU: Initialize a shadow page's global attribute from cr4.pge

2009-02-26 Thread Avi Kivity
If cr4.pge is cleared, we ought to treat any ptes in the page as non-global. This allows us to remove the check from set_spte(). Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH 09/40] KVM: SVM: Allow read access to MSR_VM_VR

2009-02-26 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com KVM tries to read the VM_CR MSR to find out if SVM was disabled by the BIOS. So implement read support for this MSR to make nested SVM running. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Avi

[PATCH 25/40] KVM: MMU: Add for_each_shadow_entry(), a simpler alternative to walk_shadow()

2009-02-26 Thread Avi Kivity
Using a for_each loop style removes the need to write callback and nasty casts. Implement the walk_shadow() using the for_each_shadow_entry(). Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c | 69 +--- 1 files changed, 49

[PATCH 07/40] KVM: SVM: Add VMRUN handler

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de This patch implements VMRUN. VMRUN enters a virtual CPU and runs that in the same context as the normal guest CPU would run. So basically it is implemented the same way, a normal CPU would do it. We also prepare all intercepts that get OR'ed with the original

[PATCH 29/40] KVM: MMU: Drop walk_shadow()

2009-02-26 Thread Avi Kivity
No longer used. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c | 20 1 files changed, 0 insertions(+), 20 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a25e1ad..1585080 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@

[PATCH 14/40] KVM: VMX: Allow single-stepping when uninterruptible

2009-02-26 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com When single-stepping over STI and MOV SS, we must clear the corresponding interruptibility bits in the guest state. Otherwise vmentry fails as it then expects bit 14 (BS) in pending debug exceptions being set, but that's not correct for the guest debugging

[PATCH 11/40] KVM: SVM: Only allow setting of EFER_SVME when CPUID SVM is set

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Userspace has to tell the kernel module somehow that nested SVM should be used. The easiest way that doesn't break anything I could think of is to implement if (cpuid svm) allow write to efer else deny write to efer Old userspaces mask the SVM

[PATCH 05/40] KVM: SVM: Implement hsave

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Implement the hsave MSR, that gives the VCPU a GPA to save the old guest state in. v2 allows userspace to save/restore hsave v4 dummys out the hsave MSR, so we use a host page v6 remembers the guest's hsave and exports the MSR Acked-by: Joerg Roedel

[PATCH 27/40] KVM: MMU: Replace walk_shadow() by for_each_shadow_entry() in fetch()

2009-02-26 Thread Avi Kivity
Effectively reverting to the pre walk_shadow() version -- but now with the reusable for_each(). Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/paging_tmpl.h | 128 1 files changed, 58 insertions(+), 70 deletions(-) diff --git

[PATCH 23/40] KVM: Fix vmload and friends misinterpreted as lidt

2009-02-26 Thread Avi Kivity
The AMD SVM instruction family all overload the 0f 01 /3 opcode, further multiplexing on the three r/m bits. But the code decided that anything that isn't a vmmcall must be an lidt (which shares the 0f 01 /3 opcode, for the case that mod = 3). Fix by aborting emulation if this isn't a vmmcall.

[PATCH 18/40] KVM: Remove old kvm_guest_debug structs

2009-02-26 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Remove the remaining arch fragments of the old guest debug interface that now break non-x86 builds. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/include/asm/kvm_host.h|2 --

[PATCH 13/40] KVM: New guest debug interface

2009-02-26 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic part, controlling the main switch and the single-step feature. The arch specific part adds an x86 interface for

[PATCH 35/40] KVM: Move struct kvm_pio_request into x86 kvm_host.h

2009-02-26 Thread Avi Kivity
This is an x86 specific stucture and has no business living in common code. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/include/asm/kvm_host.h | 12 include/linux/kvm_types.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH 17/40] KVM: ia64: stack get/restore patch

2009-02-26 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Implement KVM_IA64_VCPU_[GS]ET_STACK ioctl calls. This is required for live migrations. Patch is based on previous implementation that was part of old GET/SET_REGS ioctl calls. Signed-off-by: Jes Sorensen j...@sgi.com Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 37/40] KVM: ppc: cosmetic changes to mmu hook names

2009-02-26 Thread Avi Kivity
From: Hollis Blanchard holl...@us.ibm.com Signed-off-by: Hollis Blanchard holl...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/powerpc/include/asm/kvm_ppc.h |5 +++-- arch/powerpc/kvm/44x_tlb.c |2 +- arch/powerpc/kvm/powerpc.c |2 +- 3 files changed,

[PATCH 36/40] KVM: ppc: move struct kvmppc_44x_tlbe into 44x-specific header

2009-02-26 Thread Avi Kivity
From: Hollis Blanchard holl...@us.ibm.com Signed-off-by: Hollis Blanchard holl...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/powerpc/include/asm/kvm_44x.h |7 +++ arch/powerpc/include/asm/kvm_host.h |7 --- 2 files changed, 7 insertions(+), 7 deletions(-)

[PATCH 24/40] KVM: Advertise guest debug capability per-arch

2009-02-26 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Limit KVM_CAP_SET_GUEST_DEBUG only to those archs (currently x86) that support it. This simplifies user space stub implementations. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com --- include/linux/kvm.h |2

[PATCH 19/40] KVM: ia64: Code cleanup

2009-02-26 Thread Avi Kivity
From: Xiantao Zhang xiantao.zh...@intel.com Remove some unnecessary blank lines to accord with Kernel's coding style. Also remove vcpu_get_itir_on_fault due to no reference to it. Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 15/40] KVM: x86: Virtualize debug registers

2009-02-26 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com So far KVM only had basic x86 debug register support, once introduced to realize guest debugging that way. The guest itself was not able to use those registers. This patch now adds (almost) full support for guest self-debugging via hardware registers. It

[PATCH 32/40] KVM: remove the vmap usage

2009-02-26 Thread Avi Kivity
From: Izik Eidus iei...@redhat.com vmap() on guest pages hides those pages from the Linux mm for an extended (userspace determined) amount of time. Get rid of it. Signed-off-by: Izik Eidus iei...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c| 62

[PATCH 28/40] KVM: MMU: Replace walk_shadow() by for_each_shadow_entry() in invlpg()

2009-02-26 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/paging_tmpl.h | 81 +-- 1 files changed, 32 insertions(+), 49 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 69c7e33..46b68f9 100644 ---

[PATCH 30/40] KVM: VMX: initialize TSC offset relative to vm creation time

2009-02-26 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com VMX initializes the TSC offset for each vcpu at different times, and also reinitializes it for vcpus other than 0 on APIC SIPI message. This bug causes the TSC's to appear unsynchronized in the guest, even if the host is good. Older Linux kernels don't

[PATCH 20/40] KVM: MMU: Inherit a shadow page's guest level count from vcpu setup

2009-02-26 Thread Avi Kivity
Instead of calculating it on every shadow page allocation, set it once when switching modes, and copy it when allocating pages. This doesn't buy us much, but sets up the stage for inheriting more information related to the mmu setup. Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 06/40] KVM: SVM: Add VMLOAD and VMSAVE handlers

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de This implements the VMLOAD and VMSAVE instructions, that usually surround the VMRUN instructions. Both instructions load / restore the same elements, so we only need to implement them once. v2 fixes CPL checking and replaces memcpy by assignments v3 makes use

[PATCH 10/40] KVM: SVM: Allow setting the SVME bit

2009-02-26 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Normally setting the SVME bit in EFER is not allowed, as we did not support SVM. Not since we do, we should also allow enabling SVM mode. v2 comes as last patch, so we don't enable half-ready code v4 introduces a module option to enable SVM v6 warns that

[PATCH 12/40] KVM: VMX: Support for injecting software exceptions

2009-02-26 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com VMX differentiates between processor and software generated exceptions when injecting them into the guest. Extend vmx_queue_exception accordingly (and refactor related constants) so that we can use this service reliably for the new guest debugging

[PATCH] kvm-userspace: drop unused variable

2009-02-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index b7cbcec..7c73210 100644 --- a/qemu/hw/device-assignment.c +++ b/qemu/hw/device-assignment.c @@ -611,7 +611,6 @@ struct PCIDevice *init_assigned_device(AssignedDevInfo

Re: which -cpu to use

2009-02-26 Thread Javier Guerra
On Thu, Feb 26, 2009 at 7:57 AM, Piavlo pia...@cs.bgu.ac.il wrote:  What is still unclear to me is that's the actual difference between PV drivers implementation in paravirtual linux guest and PV dirvers in HVM linux guest? AFAIK in xen guest the PV front-end drivers are quite simple, and in

[PATCH] remove static declaration from wall clock version

2009-02-26 Thread Glauber Costa
Matt T. Yourst noted that we're currently having a dumb race for no reason in paravirtual wall clock. This is due to the use of a static variable to hold the counting. This can race with multiple guests reading wallclock at the same time, since the static variable value would then be accessible

Re: [PATCH] remove static declaration from wall clock version

2009-02-26 Thread Arnd Bergmann
On Thursday 26 February 2009, Glauber Costa wrote: @@ -548,15 +548,13 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)    static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)  { -   static int version; +   int version = 1; struct

KVM: protect assigned dev workqueue, int handler and irq acker

2009-02-26 Thread Marcelo Tosatti
Can someone with HW test this please? - kvm_assigned_dev_ack_irq is vulnerable to a race condition with the interrupt handler function. It does: if (dev-host_irq_disabled) { enable_irq(dev-host_irq); dev-host_irq_disabled = false; } If an

assigned dev msi int handling

2009-02-26 Thread Marcelo Tosatti
Hi Sheng, So for guest INTX interrupts the host interrupt is reenabled on ack from the guest, which is nice. Now for guest MSI interrupts it keeps reenabling the interrupt as fast as the work handler can run. Can you explain why it works this way? Why not disable interrupts on the host in all

Re: [PATCH 2/2 v2] PCI: add remove_id sysfs entry

2009-02-26 Thread Chris Wright
* Han, Weidong (weidong@intel.com) wrote: Chris Wright wrote: This adds a remove_id sysfs entry to allow users of new_id to later remove the added dynid. One use case is management tools that want to dynamically bind/unbind devices to pci-stub driver while devices are assigned to KVM

Problems KVM-84

2009-02-26 Thread Jay Mann
Hi, I just downloaded built and installed kvm-84 on ubuntu Hardy x64 2.6.24-23- server and I’m getting the following 2 problems that did not exists in kvm-83. 1. The qemu emulater (bios screen) takes a long time to start (~10 seconds), and subsequently Libvirt times out when I try to

Re: [PATCH] remove static declaration from wall clock version

2009-02-26 Thread Glauber Costa
On Thu, Feb 26, 2009 at 08:50:26PM +0100, Arnd Bergmann wrote: On Thursday 26 February 2009, Glauber Costa wrote: @@ -548,15 +548,13 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)    static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)  { -  

Re: [PATCH] remove static declaration from wall clock version

2009-02-26 Thread Arnd Bergmann
On Friday 27 February 2009, Glauber Costa wrote: Doesn't this mean that kvm_write_guest now writes an uninitialized value to the guest? No. If you look closely, it's now initialized to 1. Right, I didn't see that change at first. Arnd -- To unsubscribe from this list: send the

RE: PCI Passthrough - create_userspace_phys_mem: Invalid argument

2009-02-26 Thread Han, Weidong
freisei wrote: Hi List! i want to passthrough my isdn-card in a kvm-vm. qemu-system-x86_64 -vnc :3 -m 2048 -name $vmname -hda /dev/vg0/xp8asterisk -boot n -net nic,macaddr=52:54:00:58:08:03 -net tap,script=/etc/qemu-ifup -usbdevice tablet -k de -smp 2 -monitor stdio -pcidevice

Re: KVM: protect assigned dev workqueue, int handler and irq acker

2009-02-26 Thread Yang, Sheng
On Friday 27 February 2009 07:50:54 Marcelo Tosatti wrote: Can someone with HW test this please? Good catch! The patch works fine on my side. Can it be a per-device lock? One big lock for all assigned device seems restrict scalability. - kvm_assigned_dev_ack_irq is vulnerable to a

Re: assigned dev msi int handling

2009-02-26 Thread Yang, Sheng
On Friday 27 February 2009 07:59:27 Marcelo Tosatti wrote: Hi Sheng, So for guest INTX interrupts the host interrupt is reenabled on ack from the guest, which is nice. Now for guest MSI interrupts it keeps reenabling the interrupt as fast as the work handler can run. Can you explain why it

[PATCH 1/1] KVM: Correct deliver_bitmask in kvm_get_intr_delivery_bitmask

2009-02-26 Thread Sheng Yang
1. deliver_bitmask is a bitmap rather than a unsigned long intereger. 2. Lowest priority target bitmap wrong calculated by mistake. 3. Prevent potential NULL reference. Signed-off-by: Sheng Yang sh...@linux.intel.com --- virt/kvm/irq_comm.c |6 +- 1 files changed, 5 insertions(+), 1

Re: Problems KVM-84

2009-02-26 Thread Thomas Mueller
I just downloaded built and installed kvm-84 on ubuntu Hardy x64 2.6.24-23- server and I’m getting the following 2 problems that did not exists in kvm-83. 1.The qemu emulater (bios screen) takes a long time to start (~10 seconds), and subsequently Libvirt times out when I try to

Re: [PATCH v3 0/6] ATS capability support for Intel IOMMU

2009-02-26 Thread Grant Grundler
On Thu, Feb 26, 2009 at 10:50:35AM +0800, Yu Zhao wrote: ... Yu, Can you please add something to Documentation/PCI/pci.txt? New API I'm seeing are: +extern int pci_enable_ats(struct pci_dev *dev, int ps); +extern void pci_disable_ats(struct pci_dev *dev); +extern int

[PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform.

2009-02-26 Thread Liu Yu
MPIC and OpenPIC have very similar design. So a lot of code can be reused. Modification mainly include: 1. keep struct openpic_t to the maximum size of both MPIC and OpenPIC. 2. endianess swap. MPIC has the same endianess as target, so no need to swap for MPIC. 3. using different init

[PATCH 3/5] kvm/powerpc: Add irq support for E500 core

2009-02-26 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- hw/ppc.c| 60 +++ hw/ppc.h|1 + target-ppc/cpu.h| 10 +++ target-ppc/translate_init.c |5 ++- 4 files changed, 74 insertions(+), 2

[PATCH 4/5] kvm/powerpc: Add MPC8544DS board support

2009-02-26 Thread Liu Yu
This patch add an emulation of MPC8544DS board. It can work on All E500 platforms. Signed-off-by: Liu Yu yu@freescale.com --- v4: 1. remove checking return value from qemu_malloc. 2. use qemu_free instead of free. 3. use snprintf instead of sprintf. Makefile.target|2 +-

[PATCH 2/5] kvm/powerpc: Add freescale pci controller's support

2009-02-26 Thread Liu Yu
This patch add the emulation of freescale's pci controller for MPC85xx platform. Signed-off-by: Liu Yu yu@freescale.com --- v4: 1. use use pci_config_set_vendor_id and pci_config_set_device_id functions, and add the ID #defines to hw/pci.h. Makefile.target |2 + hw/pci.h |

Re: [PATCH 5/5] kvm/powerpc: flat device tree files for MPC8544DS

2009-02-26 Thread Hollis Blanchard
On Thu, 2009-02-26 at 18:35 +0800, Liu Yu wrote: mpc8544ds.dts is copied from kerenl. Non-supported devices has been removed. Signed-off-by: Liu Yu yu@freescale.com --- pc-bios/mpc8544ds.dtb | Bin 0 - 12288 bytes pc-bios/mpc8544ds.dts | 122