Re: [Patch 4/5] x86_emulator: add the assembler code for three operands

2008-11-24 Thread Guillaume Thouvenin
On Tue, 04 Nov 2008 12:21:30 +0200 Avi Kivity <[EMAIL PROTECTED]> wrote: > Guillaume Thouvenin wrote: > > Add the assembler code for three operands > > > > > > +/* Instruction has three operands */ > > +/* In the switch we only implement case 4 because we know that for shld > > instruction > >

[PATCH 3/5] Figure out device capability

2008-11-24 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. (Update: Make update_dev_cap() more gener

[ kvm-Bugs-1971512 ] failure to migrate guests with more than 4GB of RAM

2008-11-24 Thread SourceForge.net
Bugs item #1971512, was opened at 2008-05-24 14:45 Message generated for change (Comment added) made by jiajun You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1971512&group_id=180599 Please note that this message will contain a full copy of the comment th

RE: Weekly KVM Test report, kernel 30d95f ... userspace fc94d1 ...

2008-11-24 Thread Xu, Jiajun
On Monday, November 24, 2008 12:57 AM Avi Kivity wrote: > Xu, Jiajun wrote: >> 2. failure to migrate guests with more than 4GB of RAM >> > https://sourceforge.net/tracker/index.php?func=detail&aid=19715 > 12&group_id=180599&atid=893831 >> >> > > Can you retest this? I successfully migrated a

Re: gettimeofday "slow" in RHEL4 guests

2008-11-24 Thread David S. Ahern
Some more data on this overhead. RHEL3 (which is based on the 2.4.21 kernel) gets microsecond resolutions by reading the TSC. Reading the TSC from within a guest is very fast on kvm. RHEL4 (which is basd on the 2.6.9 kernel) allows multiple time sources: pmtmr (ACPI power management timer which i

RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-24 Thread Liu Yu
Good catch. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard > Sent: Tuesday, November 25, 2008 1:38 AM > To: Avi Kivity > Cc: kvm-ppc; kvm > Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit > > When the VM exits, we

[PATCH] kvm: external module: fix kernel header rsync

2008-11-24 Thread Hollis Blanchard
When the shell encounters a glob it can't expand (like arch/powerpc/include/asm/vmx*.h), it leaves the raw pattern behind. rsync then looks for a file named "arch/powerpc/include/asm/vmx*.h" (without trying to do its own globbing) and fails. Fix by using make's $(wildcard) function for the expansi

[PATCH 2/2] Enable Pass Through Feature in Intel IOMMU

2008-11-24 Thread Fenghua Yu
The patch set adds kernel parameter intel_iommu=pt to set up pass through mode in context mapping entry. This disables DMAR in linux kernel; but KVM still runs on VT-d. In this mode, kernel uses swiotlb for DMA API functions but other VT-d functionalities are enabled for KVM. By default, pass thou

[PATCH 1/2] Enable Pass Through Feature in Intel IOMMU

2008-11-24 Thread Fenghua Yu
The patch set adds kernel parameter intel_iommu=pt to set up pass through mode in context mapping entry. This disables DMAR in linux kernel; but KVM still runs on VT-d. In this mode, kernel uses swiotlb for DMA API functions but other VT-d functionalities are enabled for KVM. KVM always uses mul

Re: Is this a bug in qemu-img?

2008-11-24 Thread Charles Duffy
walt wrote: Any chance that 'commit' could be added to raw as well as qcow2? Raw images by their nature can't contain metadata -- they have only the exact contents of the virtual drive, which is what makes them "raw" -- so they by definition can't support copy-on-write (and thus commit) or o

gettimeofday "slow" in RHEL4 guests

2008-11-24 Thread David S. Ahern
I noticed that gettimeofday in RHEL4.6 guests is taking much longer than with RHEL3.8 guests. I wrote a simple program (see below) to call gettimeofday in a loop 1,000,000 times and then used time to measure how long it took. For the RHEL3.8 guest: time -p ./timeofday_bench real 0.99 user 0.12 s

Re: Direct kernel boot without harddrive image

2008-11-24 Thread Daire Byrne
- "Daire Byrne" <[EMAIL PROTECTED]> wrote: > I tried with -no-kvm and I get the same crash when I reboot the VM. I > suppose it's a qemu bug then. I tried with the latest kvm-qemu (78) > but perhaps I should try the latest Qemu and if it still breaks report > the bug on the Qemu mailing list?

[PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-24 Thread Hollis Blanchard
When the VM exits, we must call put_page() for every page referenced in the shadow TLB. Without this patch, we usually leak 30-50 host pages (120 - 200 KiB with 4 KiB pages). The maximum number of pages leaked is the size of our shadow TLB, 64 pages. Signed-off-by: Hollis Blanchard <[EMAIL PROTEC

hrtimer_forward() semantics when using non-high-res timers

2008-11-24 Thread Eduardo Habkost
Hi, Thomas, I've been looking at a timer problem on KVM recently[1] and I've got a question about the expected semantics of hrtimer_forward(). The problem I am looking at is related to having proper accouting of missed ticks on the KVM timer code when it the host has lost timer ticks because of h

Re: KVM: MMU: optimize set_spte for page sync

2008-11-24 Thread Marcelo Tosatti
On Mon, Nov 24, 2008 at 01:04:23PM +0100, Marcelo Tosatti wrote: > On Sun, Nov 23, 2008 at 12:36:29PM +0200, Avi Kivity wrote: > > Marcelo Tosatti wrote: > > > >> The cost of hash table and memslot lookups are quite significant if the > >> workload is pagetable write intensive resulting in increase

[PATCH] sign kvmclock as paravirt

2008-11-24 Thread Glauber Costa
Currently, we only set the KVM paravirt signature in case of CONFIG_KVM_GUEST. However, it is possible to have it turned off, while CONFIG_KVM_CLOCK is turned on. This is also a paravirt case, and should be shown accordingly. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/kv

[PATCH] really remove a slow when a user ask us so

2008-11-24 Thread Glauber Costa
Right now, KVM does not remove a slot when we do a register ioctl for size 0 (would be the expected behaviour). Instead, we only mark it as empty, but keep all bitmaps and allocated data structures present. It completely nullifies our chances of reusing that same slot again for mapping a different

[ kvm-Bugs-2327497 ] NFS copy makes guest network unstable

2008-11-24 Thread SourceForge.net
Bugs item #2327497, was opened at 2008-11-22 16:53 Message generated for change (Comment added) made by cova You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2327497&group_id=180599 Please note that this message will contain a full copy of the comment thre

[ kvm-Bugs-2327497 ] NFS copy makes guest network unstable

2008-11-24 Thread SourceForge.net
Bugs item #2327497, was opened at 2008-11-22 17:53 Message generated for change (Settings changed) made by avik You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2327497&group_id=180599 Please note that this message will contain a full copy of the comment t

[ kvm-Bugs-2327497 ] NFS copy makes guest network unstable

2008-11-24 Thread SourceForge.net
Bugs item #2327497, was opened at 2008-11-22 17:53 Message generated for change (Comment added) made by avik You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2327497&group_id=180599 Please note that this message will contain a full copy of the comment thre

[PATCH] kvm-userspace: Cleanup user space NMI injection

2008-11-24 Thread Jan Kiszka
Cleanup redundant check for an open NMI window before injecting. This will no longer be supported by the kernel, and it was broken by design anyway. This change still allows to run the user space against older kernel modules. Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> --- libkvm/libkvm.c

[RFT] Rebased gdb/debug register patches

2008-11-24 Thread Jan Kiszka
Hi, this is not yet the official submission, but a request for testing: I'm happy to announce the availability of a rebased patch series to enhance KVM's guest debugging support as well as to add debug register emulation. It was rebased because QEMU mainline recently accepted the core of my corre

Re: KVM: MMU: optimize set_spte for page sync

2008-11-24 Thread Marcelo Tosatti
On Sun, Nov 23, 2008 at 12:36:29PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: > >> The cost of hash table and memslot lookups are quite significant if the >> workload is pagetable write intensive resulting in increased mmu_lock >> contention. >> >> @@ -1593,7 +1593,16 @@ static int set_spte(

Re: [PATCH 00/12] x86: disable virt on kdump and emergency_restart (v4)

2008-11-24 Thread Eduardo Habkost
On Fri, Nov 21, 2008 at 06:07:36PM +0200, Avi Kivity wrote: > > Eduardo, please check the merge (there was a small conflict in reboot.c > which I fixed) once I push it. Also, when generating patches that move > files, use the -M switch: this makes it easier to review, and also > handles fil

Re: 2.6.27.5 guest boot failure using in-kernel PIT

2008-11-24 Thread Glauber Costa
On Fri, Nov 21, 2008 at 3:10 PM, Marcelo Tosatti <[EMAIL PROTECTED]> wrote: > Hi Jan, > > On Fri, Nov 21, 2008 at 08:54:56AM +0100, Jan Kiszka wrote: >> Eduardo Habkost wrote: >> > On Thu, Nov 20, 2008 at 12:22:53PM -0200, Eduardo Habkost wrote: >> >> Hi, >> >> >> >> When using a kvm.git kernel as

Re: Is this a bug in qemu-img?

2008-11-24 Thread walt
walt wrote: ... BTW, I've been through the same steps twice and get the same results, so I don't think it's flakey hardware. OTOH today is a new day, so I'll try it again to triple check. Tried again all the way from the beginning and got the same result. The commit step is where things go wr

[PATCH] Prevent trace call into unloaded module text

2008-11-24 Thread Wu Fengguang
Add marker_synchronize_unregister() before module unloading. This prevents possible trace calls into unloaded module text. Signed-off-by: Wu Fengguang <[EMAIL PROTECTED]> --- diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a87f45e..64f38b3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/k

[PATCH] kvm: header-sync: fix to work with 2.6.28 kernel

2008-11-24 Thread Mark McLoughlin
If you run header-sync against a kernel which has asm/kvm.h but not e.g. asm/vmx.h then $(wildcard $(headers-new)) returns a string with expanded kvm.h path and the vmx.h glob removed. We then pass the original globs to rsync causing that to fail when vmx.h can't be found: rsync: link_stat ".../

Re: [PATCH] always assign userspace_addr

2008-11-24 Thread Glauber Costa
> > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index b1953ee..f605bba 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -735,11 +735,17 @@ int __kvm_set_memory_region(struct kvm *kvm, >base_gfn = mem->guest_phys_addr >> PAGE_SHIFT; >npages = mem->memo

[PATCH 3/5] Figure out device capability

2008-11-24 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 <[EMAIL PROTECTE

[PATCH 5/5] kvm: expose MSI capability to guest

2008-11-24 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- qemu/hw/device-assignment.c | 90 +++--- qemu/hw/device-assignment.h |2 + 2 files changed, 85 insertions(+), 7 deletions(-) diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index d3

[PATCH 2/5] Make device assignment depend on libpci

2008-11-24 Thread Sheng Yang
Which is used later for capability detection. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- qemu/Makefile.target |1 + qemu/configure | 20 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu/Makefile.target b/qemu/Makefile.target index 05ace8

[PATCH 0/5][v2] Userspace for MSI support of KVM

2008-11-24 Thread Sheng Yang
Hi Avi & Anthony Here is the userspace for MSI support of KVM. Main change from v1: Make device assignment depends on libpci. Move capability framework to pci.c (this patch may can be accepted by QEmu). Thanks! -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe k

[PATCH 4/5] Support for device capability

2008-11-24 Thread Sheng Yang
This framework can be easily extended to support device capability, like MSI/MSI-x. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- qemu/hw/pci.c | 85 + qemu/hw/pci.h | 30 2 files changed, 115 insertions(+), 0 de

[PATCH 1/5] kvm: Replace force type convert with container_of()

2008-11-24 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- 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 9a790c6..786b2f0 100644 --- a/qemu/hw/device-assignment.c +++

[PATCH] KVM: VMX: Fix pending NMI-vs.-IRQ race for user space irqchip

2008-11-24 Thread Jan Kiszka
Push b55a50582030cf294a675492d7ab2e235b965cc8 and d3a2c20c9b850d92dae383fd6a64840de2687cd6 also to the user space irqchip path. Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/ar

[PATCH] KVM: x86: Cleanup user space NMI injection

2008-11-24 Thread Jan Kiszka
There is no point in doing the ready_for_nmi_injection/ request_nmi_window dance with user space. First, we don't do this for in-kernel irqchip anyway, while the code path is the same as for user space irqchip mode. And second, there is nothing to loose if a pending NMI is overwritten by another on

[PATCH] kvm-testsuite: Fix halt callback

2008-11-24 Thread Jan Kiszka
Change halt callback in testsuite to conform with latest refactorings. Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> --- user/main.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/user/main.c b/user/main.c index a00b073..55639b5 100644 --- a/user/main.c +++ b/user/m

Re: [PATCH] KVM: VMX: Fix race between pending IRQ and NMI

2008-11-24 Thread Jan Kiszka
Avi Kivity wrote: > Jan Kiszka wrote: >>> But I think I see a bigger issue - if we inject an regular interrupt >>> while another is pending, then we will encounter this problem. Looks >>> like we have to enable the interrupt window after injecting an interrupt >>> if there are still pending interr

Re: [PATCH/RFC] kvm: fix refcounting race release vs. module unload

2008-11-24 Thread Christian Borntraeger
> > --- kvm.orig/virt/kvm/kvm_main.c > > +++ kvm/virt/kvm/kvm_main.c > > @@ -1303,7 +1303,7 @@ static int kvm_vcpu_release(struct inode > > return 0; > > } > > > > -static const struct file_operations kvm_vcpu_fops = { > > +static struct file_operations kvm_vcpu_fops = { > > .release