VT-d support for device assignment

2008-08-22 Thread Amit Shah
The following two patches contain VT-d support for device assignment for KVM guests. The first patch contains the changes that are required to the generic VT-d code. The second patch contains the changes to KVM. I've updated the 2nd patch to use VT-d only when requested by a parameter on the co

[PATCH] KVM: Device Assignment with VT-d

2008-08-22 Thread Amit Shah
Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> This patch enables PCI device assignment based on VT-d support. When a device is assigned to the guest, the guest memory is pinned and the mapping is updated in the VT-d IOMMU. Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Wei

[PATCH] VT-d: changes to support KVM

2008-08-22 Thread Amit Shah
From: Kay, Allen M <[EMAIL PROTECTED]> This patch extends the VT-d driver to support KVM [Ben: fixed memory pinning] Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Weidong Han <[EMAIL PROTECTED]> Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]> Signed-off-by: Amit Shah <[EMAIL

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-22 Thread Amit Shah
* On Thursday 21 Aug 2008 16:35:57 Ben-Ami Yassour wrote: > On Thu, 2008-08-21 at 12:13 +0530, Amit Shah wrote: > > * On Thursday 07 Aug 2008 19:44:47 Ben-Ami Yassour wrote: > > > Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > > > > > > This patch enables pci device assignment based on VT-

kvm-72: problems with 8139 under heavy load, lost interrupts?

2008-08-22 Thread Nikola Ciprich
Hello everybody, we're running cluster of two hosts with tens (~45 running) of kvms, and now I noticed that some nodes are loosing link under heavy load. following appears in dmesg: [ 422.077128] NETDEV WATCHDOG: eth0: transmit timed out [ 422.077215] eth0: Transmit timeout, status d 2b5

Re: [Qemu-devel] [PATCH] uhci: improved TD matching, working ISOC transfers

2008-08-22 Thread Aurelien Jarno
On Fri, Aug 22, 2008 at 05:54:53AM +, Max Krasnyansky wrote: > While trying to make VX-3000 camera work on XP under KVM I realized that > we do not necessarily have to find original TD address. All we care about > is the token which identifies the transfer rather well (direction, endpoint, > si

[PATCH] KVM: Qemu: Enable kvm/ia64's network.

2008-08-22 Thread Zhang, Xiantao
Hi, Avi Please help to apply this patch. It will fix kvm/ia64's networking issue. Thanks Xiantao >From fe6e28ce9295acba107438979fe6ead0d24f7e20 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <[EMAIL PROTECTED]> Date: Fri, 22 Aug 2008 17:14:15 +0800 Subject: [PATCH] KVM: Qemu: Enable kvm/ia64's ne

Re: [Qemu-devel] [PATCH] uhci: Fixed length handling for SETUP and OUT tokens

2008-08-22 Thread Aurelien Jarno
On Fri, Aug 22, 2008 at 05:54:31AM +, Max Krasnyansky wrote: > Fixes regression reported agains Linux 2.6.18. > Looks like XP and newer Linux kernels are less sensitive > to length returned for control transfers. > > Signed-off-by: Max Krasnyansky <[EMAIL PROTECTED]> Applied, thanks. > --- >

[ kvm-Bugs-2067179 ] Possible Bug in ATA Emulation Code

2008-08-22 Thread SourceForge.net
Bugs item #2067179, was opened at 2008-08-22 12:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2067179&group_id=180599 Please note that this message will contain a full copy

Re: [ANNOUNCE] kvm-73 release

2008-08-22 Thread Farkas Levente
Avi Kivity wrote: > The big change is of course full swapping support, finally delivering > the full range of Linux memory management operations to kvm. You will > need a 2.6.27 host to use this functionality, however. > > Other noteworthy changes: speedups of both virtio-net and qcow2 with > cac

Re: VT-d support for device assignment

2008-08-22 Thread Byron Stanoszek
On Fri, 22 Aug 2008, Amit Shah wrote: The following two patches contain VT-d support for device assignment for KVM guests. The first patch contains the changes that are required to the generic VT-d code. The second patch contains the changes to KVM. I've updated the 2nd patch to use VT-d only

Re: VT-d support for device assignment

2008-08-22 Thread Amit Shah
* On Friday 22 Aug 2008 19:24:13 Byron Stanoszek wrote: > On Fri, 22 Aug 2008, Amit Shah wrote: > > The following two patches contain VT-d support for device assignment > > for KVM guests. > > > > The first patch contains the changes that are required to the generic > > VT-d code. > > > > The secon

Re: VT-d support for device assignment

2008-08-22 Thread Muli Ben-Yehuda
On Fri, Aug 22, 2008 at 09:54:13AM -0400, Byron Stanoszek wrote: > Is it possible to log any physical PCI accesses from the guest? > This could be handy for reverse-engineering device drivers, among > other things. With PCI passthrough It is possible in theory to log mmio's and pio's executed by

[PATCH 0/5][RFC] Generic shadow walker

2008-08-22 Thread Avi Kivity
This patchset introduces a generic shadow walker. We currently walk shadow pagetables in two places: direct maps and paging mode maps. Since we're about to introduce a third walk (invlpg), we ought to have a generic facility for walking shadows. The first two patches are fixes/cleanups and are i

[PATCH 1/5] KVM: MMU: Unify direct map 4K and large page paths

2008-08-22 Thread Avi Kivity
The two paths are equivalent except for one argument, which is already available. Merge the two codepaths. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu

[PATCH 2/5] KVM: MMU: Fix torn shadow pte

2008-08-22 Thread Avi Kivity
The shadow code assigns a pte directly in one place, which is nonatomic on i386 can can cause random memory references. Fix by using an atomic setter. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/paging_tmpl.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --

[PATCH 3/5] KVM: MMU: Add generic shadow walker

2008-08-22 Thread Avi Kivity
We currently walk the shadow page tables in two places: direct map (for real mode and two dimensional paging) and paging mode shadow. Since we anticipate requiring a third walk (for invlpg), it makes sense to have a generic facility for shadow walk. This patch adds such a shadow walker, walks the

[PATCH 4/5] KVM: MMU: Convert direct maps to use the generic shadow walker

2008-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 94 +++- 1 files changed, 56 insertions(+), 38 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 17da753..682dbf8 100644 --- a/arch/x86/kvm/mmu.c +++ b/ar

[PATCH 5/5] KVM: MMU: Convert the paging mode shadow walk to use the generic walker

2008-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/paging_tmpl.h | 158 1 files changed, 86 insertions(+), 72 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index ebb26a0..b7064e1 100644 --- a/arch/x86/kv

[PATCH 0/2] Fix monitor console in curses mode

2008-08-22 Thread Ryan Harper
The current curses code doesn't set the initial monitor text console to the size of the terminal and fails to adjust properly after a resize. The attach patches create the initial console based on the size of the terminal instead of defaulting to 80x25, and also hook ensure that text_console_resi

[PATCH 1/2] Fix text console size/resize when using curses

2008-08-22 Thread Ryan Harper
The current console output is broken in curses mode size the default starting size might not match the launching terminal size. Change initial size to be based on the terminal. Also, resize events fail to ensure that both the text console and curses display areas are the same size; this causes br

[PATCH 2/2] Fix typo in console.c comment

2008-08-22 Thread Ryan Harper
Signed-off-by: Ryan Harper <[EMAIL PROTECTED]> diff --git a/console.c b/console.c index 89bdc52..c7a5a80 100644 --- a/console.c +++ b/console.c @@ -172,7 +172,7 @@ void vga_hw_screen_dump(const char *filename) previous_active_console = active_console; active_console = consoles[0]; /

Re: VT-d support for device assignment

2008-08-22 Thread Avi Kivity
Muli Ben-Yehuda wrote: > With PCI passthrough It is possible in theory to log mmio's and pio's > executed by the guest, as well as interrupts delivered to the guest, > although it will have a performance impact. It is not possible to log > DMAs in a simple manner, but you could hook up a PCI analyz

Re: [ANNOUNCE] kvm-73 release

2008-08-22 Thread Avi Kivity
Farkas Levente wrote: > what is the current recommended way to build kernel module for kvm? > until now it was a simple > make KDIR=... > in the linux dir, but it's no longer working. first of all now is > required to run configure for kernel module too, second the above make > now get into an infi

Re: kvm-72: problems with 8139 under heavy load, lost interrupts?

2008-08-22 Thread Avi Kivity
Nikola Ciprich wrote: > Hello everybody, > we're running cluster of two hosts with tens (~45 running) of kvms, > and now I noticed that some nodes are loosing link under heavy load. > > following appears in dmesg: > [ 422.077128] NETDEV WATCHDOG: eth0: transmit timed out > [ 422.077215] eth0: Tr

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-22 Thread Avi Kivity
Amit Shah wrote: > diff --git a/include/linux/kvm.h b/include/linux/kvm.h > index d9ef7d3..2956e35 100644 > --- a/include/linux/kvm.h > +++ b/include/linux/kvm.h > @@ -495,4 +495,6 @@ struct kvm_assigned_irq { > __u32 flags; > }; > > +#define KVM_DEV_ASSIGN_USE_VTD (1 << 1) > + > #endif >

Re: VT-d support for device assignment

2008-08-22 Thread Avi Kivity
Amit Shah wrote: > The following two patches contain VT-d support for device assignment > for KVM guests. > > The first patch contains the changes that are required to the generic > VT-d code. > > The second patch contains the changes to KVM. > > I've updated the 2nd patch to use VT-d only when req

Re: VT-d support for device assignment

2008-08-22 Thread Muli Ben-Yehuda
On Fri, Aug 22, 2008 at 09:12:32PM +0300, Avi Kivity wrote: > Muli Ben-Yehuda wrote: > > With PCI passthrough It is possible in theory to log mmio's and pio's > > executed by the guest, as well as interrupts delivered to the guest, > > although it will have a performance impact. It is not possible

Re: VT-d support for device assignment

2008-08-22 Thread Muli Ben-Yehuda
On Fri, Aug 22, 2008 at 09:21:15PM +0300, Avi Kivity wrote: > You mean, iommu=on. Agreed. This should also be the default if not dma=xxx is specfied and a capable IOMMU is found. > Or rather > > dma=iommu > dma=none (1:1 mapping, or dma-less devices, or I'm Feeling Lucky) > dma=cooperativ

Re: VT-d support for device assignment

2008-08-22 Thread Muli Ben-Yehuda
On Fri, Aug 22, 2008 at 09:02:33PM +0530, Amit Shah wrote: > All the PCI accesses happen from the userspace components in qemu; > it's certainly possible to log activity. Actually, with direct-mmio we bypass QEMU and get a nice boost in performance, and it should be possible to bypass QEMU for (m

Re: VT-d support for device assignment

2008-08-22 Thread Avi Kivity
Muli Ben-Yehuda wrote: > On Fri, Aug 22, 2008 at 09:02:33PM +0530, Amit Shah wrote: > > >> All the PCI accesses happen from the userspace components in qemu; >> it's certainly possible to log activity. >> > > Actually, with direct-mmio we bypass QEMU and get a nice boost in > performance, a

Re: VT-d support for device assignment

2008-08-22 Thread Muli Ben-Yehuda
On Fri, Aug 22, 2008 at 09:37:16PM +0300, Avi Kivity wrote: > > Actually, with direct-mmio we bypass QEMU and get a nice boost in > > performance, and it should be possible to bypass QEMU for (most) > > PIO's too. > > Since there is no pio remapping, there's no way to ensure there's a > free pio

Reserving CPU resources for a KVM guest

2008-08-22 Thread Yuksel Gunal
Hi, I have been playing with KVM and was wondering about the following question: is there a resource configuration setting that would enforce a fraction of CPU to be guaranteed for a KVM guest? What I have on mind is something similar to the "reservation" setting on VMware (used to be called

Re: kvm-72: problems with 8139 under heavy load, lost interrupts?

2008-08-22 Thread Farkas Levente
Avi Kivity wrote: > Nikola Ciprich wrote: >> Hello everybody, >> we're running cluster of two hosts with tens (~45 running) of kvms, >> and now I noticed that some nodes are loosing link under heavy load. >> >> following appears in dmesg: >> [ 422.077128] NETDEV WATCHDOG: eth0: transmit timed out

Re: [Qemu-devel] [PATCH 1/2] Fix text console size/resize when using curses

2008-08-22 Thread andrzej zaborowski
2008/8/22 Ryan Harper <[EMAIL PROTECTED]>: > The current console output is broken in curses mode size the default starting > size might not match the launching terminal size. Change initial size to be > based on the terminal. Also, resize events fail to ensure that both the text > console and cur

Re: [Qemu-devel] [PATCH 1/2] Fix text console size/resize when using curses

2008-08-22 Thread Ryan Harper
* andrzej zaborowski <[EMAIL PROTECTED]> [2008-08-22 17:40]: > 2008/8/22 Ryan Harper <[EMAIL PROTECTED]>: > > The current console output is broken in curses mode size the default > > starting > > size might not match the launching terminal size. Change initial size to be > > based on the terminal

[patch 0/2] madvise(MADV_DONTFORK) guest mem if !mmu_notifiers

2008-08-22 Thread Marcelo Tosatti
fork'ing inside qemu can create stale shadow entries without mmu notifiers. -- -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch 2/2] qemu: kvm: mark guest mapping as MADV_DONTFORK

2008-08-22 Thread Marcelo Tosatti
When qemu fork's (ssh migration, qemu-nbd, slirp), the guest memory mapping becomes shared and write-protected by parent and child, until execve switches to a new mm. Since kernel commit 7885a4fbebcbae1f8594445a46aefb9d97353594, get_user_pages with force=1 parameter will break COW during this wind

[patch 1/2] libkvm: add kvm_has_sync_mmu

2008-08-22 Thread Marcelo Tosatti
From: Anthony Liguori <[EMAIL PROTECTED]> This patch adds a kvm_has_sync_mmu routine to libkvm. This allows userspace to query the existence of mmu notifiers which is important for ballooning since madvise() is not safe from userspace without it. Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]

[PATCH]KVM: kvm/ia64: select ANON_INODES PREEMPT_NOTIFIERS, once

2008-08-22 Thread Zhang, Xiantao
>From 2c14c54eed790553fddbcb3970f0967a4aa79dca Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <[EMAIL PROTECTED]> Date: Sat, 23 Aug 2008 10:21:06 +0800 Subject: [PATCH] KVM: kvm/ia64: select ANON_INODES PREEMPT_NOTIFIERS, once virtualization configured. Once virtulization configured, make PREEMPT_NO