How to use PCI-passthrough with kvm

2008-12-09 Thread w1ndoz
Hi I'm interested in PCI passthrough support. I downloaded Linux Kernel 2.6.28-rc7 and build and ran KVM (which is KVM-79) on this kernel. I started KVM with the following command-lines: $ qemu-system-x86_64 -boot c -m 512 -hda test.qcow -localtime -k en-us -pcidevice host=00:19.0 (00:19.0 is Int

How to use PCI-passthrough with kvm

2008-12-09 Thread w1ndoz
Hi I'm interested in PCI passthrough support. I downloaded Linux Kernel 2.6.28-rc7 and build and ran KVM (which is KVM-79) on this kernel. I started KVM with the following command-lines: $ qemu-system-x86_64 -boot c -m 512 -hda test.qcow -localtime -k en-us -pcidevice host=00:19.0 (00:19.0 is Int

Re: [PATCH] virtio_net: add link status handling

2008-12-09 Thread Anthony Liguori
Rusty Russell wrote: On Wednesday 10 December 2008 08:02:14 Anthony Liguori wrote: Mark McLoughlin wrote: Allow the host to inform us that the link is down by adding a VIRTIO_NET_F_STATUS which indicates that device status is available in virtio_net config. This is currently useful for

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

2008-12-09 Thread SourceForge.net
Bugs item #1971512, was opened at 2008-05-24 14:45 Message generated for change (Settings changed) 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

FreeBSD guest on Linux host: console screen corruption?

2008-12-09 Thread walt
Hi, I'm tracking kvm.git on a linux host, current as of today. I've been playing with FreeBSD as guest and I'm seeing very annoying problems with console screen corruption which makes it almost impossible to use. The corruption consists of patches of screen output where every other character is

Re: [PATCH 0/2] module_refcounting and anonymous inodes

2008-12-09 Thread Sheng Yang
On Tuesday 09 December 2008 21:22:42 Avi Kivity wrote: > Avi Kivity wrote: > > Christian Borntraeger wrote: > >> The problem is, how do you detect if the base kernel has patch1 applied? > > > > In the external module compatibility kit, implement two versions of > > anon_inode_getfd(), and select th

Re: [PATCH] virtio_net: add link status handling

2008-12-09 Thread Rusty Russell
On Tuesday 09 December 2008 20:49:33 Mark McLoughlin wrote: > Allow the host to inform us that the link is down by adding > a VIRTIO_NET_F_STATUS which indicates that device status is > available in virtio_net config. This has been a TODO for a while, thanks! > + if (vi->status == v) > +

Re: [PATCH] virtio_net: add link status handling

2008-12-09 Thread Rusty Russell
On Wednesday 10 December 2008 08:02:14 Anthony Liguori wrote: > Mark McLoughlin wrote: > > Allow the host to inform us that the link is down by adding > > a VIRTIO_NET_F_STATUS which indicates that device status is > > available in virtio_net config. > > > > This is currently useful for simulating

Re: [Bochs-developers] [PATCH][BIOS] Fill IPL tableaccordingdiscovered ATA drives

2008-12-09 Thread Sebastian Herbszt
Laurent Vivier wrote: Le dimanche 07 décembre 2008 à 19:11 +0100, Sebastian Herbszt a écrit : Laurent Vivier wrote: > This patch shows in boot menu only available devices. > > This patch has been tested with Bochs BIOS version from the KVM source tree. > > Signed-off-by: Laurent Vivier <[EMAIL P

Re: [patch 0/3] synchronized TSC between vcpu's on SMP guests

2008-12-09 Thread Michael Tokarev
Marcelo Tosatti wrote: > On Tue, Dec 09, 2008 at 02:38:08PM +0300, Michael Tokarev wrote: >> Marcelo Tosatti wrote: >>> Most Intel hosts are supposed to have their TSC's synchronized. This >>> patchset attempts to fix the sites which overwrite the TSC making them >>> appear unsynchronized to the gu

[PATCH 31/31] virt: Make static

2008-12-09 Thread Roel Kluin
Sparse asked whether these could be static. Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a87f45e..6bf6d90 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-09 Thread Jesse Barnes
On Thursday, December 04, 2008 4:13 pm Rusty Russell wrote: > On Thursday 04 December 2008 23:14:31 Mark McLoughlin wrote: > > Nothing takes a ref on virtio_pci, so even if you have > > devices in use, rmmod will attempt to unload the module. > > > > Fix by simply making each device take a ref on t

Re: [PATCH] virtio_net: add link status handling

2008-12-09 Thread Anthony Liguori
Mark McLoughlin wrote: Allow the host to inform us that the link is down by adding a VIRTIO_NET_F_STATUS which indicates that device status is available in virtio_net config. This is currently useful for simulating link down conditions (e.g. using proposed qemu 'set_link' monitor command) but wo

[PATCH 13/44] KVM: ppc: use MMUCR accessor to obtain TID

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> We have an accessor; might as well use it. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/powerpc/kvm/44x_tlb.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/po

[PATCH 09/44] KVM: ensure that memslot userspace addresses are page-aligned

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Bad page translation and silent guest failure ensue if the userspace address is not page-aligned. I hit this problem using large (host) pages with qemu, because qemu currently has a hardcoded 4096-byte alignment for guest memory allocations. Signed-off-

[PATCH 17/44] KVM: VMX: move vmx.h to include/asm

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> vmx.h will be used by core code that is independent of KVM, so I am moving it outside the arch/x86/kvm directory. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/{kvm => include/asm}/vmx.h |

[PATCH 27/44] kdump: forcibly disable VMX and SVM on machine_crash_shutdown()

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> We need to disable virtualization extensions on all CPUs before booting the kdump kernel, otherwise the kdump kernel booting will fail, and rebooting after the kdump kernel did its task may also fail. We do it using cpu_emergency_vmxoff() and cpu_emergenc

[PATCH 25/44] KVM: SVM: move svm_hardware_disable() code to asm/virtext.h

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> Create cpu_svm_disable() function. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/include/asm/virtext.h | 14 ++ arch/x86/kvm/svm.c |6 +- 2 files changed, 1

[PATCH 26/44] x86: cpu_emergency_svm_disable() function

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> This function can be used by the reboot or kdump code to forcibly disable SVM on the CPU. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/include/asm/virtext.h |8 1 files changed

[PATCH 07/44] KVM: Fix cpuid leaf 0xb loop termination

2008-12-09 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> For cpuid leaf 0xb the bits 8-15 in ECX register define the end of counting leaf. The previous code was using bits 0-7 for this purpose, which is a bug. Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --

[PATCH 23/44] x86: cpu_emergency_vmxoff() function

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> Add cpu_emergency_vmxoff() and its friends: cpu_vmx_enabled() and __cpu_emergency_vmxoff(). Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/include/asm/virtext.h | 23 +++

[PATCH 30/44] KVM: ia64: Add some debug points to provide crash infomation

2008-12-09 Thread Avi Kivity
From: Xiantao Zhang <[EMAIL PROTECTED]> Use printk infrastructure to print out some debug info once VM crashes. Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/ia64/kvm/mmio.c| 38 ++--- arch/ia64/kvm/process.c |

[PATCH 20/44] KVM: VMX: move cpu_has_kvm_support() to an inline on asm/virtext.h

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> It will be used by core code on kdump and reboot, to disable vmx if needed. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/include/asm/virtext.h | 31 +++ arch/x

[PATCH 36/44] KVM: Separate update irq to a single function

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Separate INTx enabling part to a independence function, so that we can add MSI enabling part easily. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 68 ---

[PATCH 31/44] KVM: ia64: Add handler for crashed vmm

2008-12-09 Thread Avi Kivity
From: Xiantao Zhang <[EMAIL PROTECTED]> Since vmm runs in an isolated address space and it is just a copy of host's kvm-intel module, so once vmm crashes, we just crash all guests running on it instead of crashing whole kernel. Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> Signed-off-by: Avi K

[PATCH 34/44] x86: KVM guest: sign kvmclock as paravirt

2008-12-09 Thread Avi Kivity
From: Glauber Costa <[EMAIL PROTECTED]> 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 <[

[PATCH 40/44] KVM: Export ioapic_get_delivery_bitmask

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> It would be used for MSI in device assignment, for MSI dispatch. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/ioapic.c |7 --- virt/kvm/ioapic.h |2 ++ 2 files changed, 6 insertions(+), 3

[PATCH 33/44] KVM: VMX: Conditionally request interrupt window after injecting irq

2008-12-09 Thread Avi Kivity
If we're injecting an interrupt, and another one is pending, request an interrupt window notification so we don't have excess latency on the second interrupt. This shouldn't happen in practice since an EOI will be issued, giving a second chance to request an interrupt window, but... Signed-off-by

[PATCH 37/44] KVM: Replace irq_requested with more generic irq_requested_type

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Separate guest irq type and host irq type, for we can support guest using INTx with host using MSI (but not opposite combination). Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/kvm_host.h |4

[PATCH 39/44] KVM: Add fields for MSI device assignment

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Prepared for kvm_arch_assigned_device_msi_dispatch(). Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/kvm.h |7 +++ include/linux/kvm_host.h |4 2 files changed, 11 insertions

[PATCH 35/44] KVM: Move ack notifier register and IRQ sourcd ID request

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Distinguish common part for device assignment and INTx part, perparing for refactor later. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 30 +++--- 1 files chang

[PATCH 01/44] KVM: ppc: adjust vcpu types to support 64-bit cores

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> However, some of these fields could be split into separate per-core structures in the future. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/kvm_host.h | 50 ++

[PATCH 18/44] KVM: SVM: move svm.h to include/asm

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> svm.h will be used by core code that is independent of KVM, so I am moving it outside the arch/x86/kvm directory. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/{kvm => include/asm}/svm.h |

[PATCH 44/44] KVM: MMU: optimize set_spte for page sync

2008-12-09 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> The write protect verification in set_spte is unnecessary for page sync. Its guaranteed that, if the unsync spte was writable, the target page does not have a write protected shadow (if it had, the spte would have been write protected under mmu_lock by rm

[PATCH 38/44] KVM: Clean up assigned_device_update_irq

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 638de47..2089f

[PATCH 22/44] KVM: VMX: extract kvm_cpu_vmxoff() from hardware_disable()

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> Along with some comments on why it is different from the core cpu_vmxoff() function. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 13 +++-- 1 files changed, 11 inserti

[PATCH 41/44] KVM: Add assigned_device_msi_dispatch()

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> The function is used to dispatch MSI to lapic according to MSI message address and message data. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 55 +++

[PATCH 43/44] KVM: MSI to INTx translate

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Now we use MSI as default one, and translate MSI to INTx when guest need INTx rather than MSI. For legacy device, we provide support for non-sharing host IRQ. Provide a parameter msi2intx for this method. The value is true by default in x86 architecture. We c

[PATCH 05/44] KVM: ppc: optimize irq delivery path

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> In kvmppc_deliver_interrupt is just one case left in the switch and it is a rare one (less than 8%) when looking at the exit numbers. Therefore we can at least drop the switch/case and if an if. I inserted an unlikely too, but that's open for discussion.

[PATCH 42/44] KVM: Enable MSI for device assignment

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> We enable guest MSI and host MSI support in this patch. The userspace want to enable MSI should set KVM_DEV_IRQ_ASSIGN_ENABLE_MSI in the assigned_irq's flag. Function would return -ENOTTY if can't enable MSI, userspace shouldn't set MSI Enable bit when KVM_ASSI

[PATCH 29/44] KVM: ia64: Define printk function for kvm-intel module

2008-12-09 Thread Avi Kivity
From: Xiantao Zhang <[EMAIL PROTECTED]> kvm-intel module is relocated to an isolated address space with kernel, so it can't call host kernel's printk for debug purpose. In the module, we implement the printk to output debug info of vmm. Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> Signed-off-

[PATCH 15/44] KVM: ppc: fix userspace mapping invalidation on context switch

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> We used to defer invalidating userspace TLB entries until jumping out of the kernel. This was causing MMU weirdness most easily triggered by using a pipe in the guest, e.g. "dmesg | tail". I believe the problem was that after the guest kernel changed the

[PATCH 32/44] KVM: ia64: Clean up vmm_ivt.S using tab to indent every line

2008-12-09 Thread Avi Kivity
From: Xiantao Zhang <[EMAIL PROTECTED]> Using tab for indentation for vmm_ivt.S. Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/ia64/kvm/vmm_ivt.S | 1470 +++ 1 files changed, 729 insertions(+),

[PATCH 00/44] KVM Updates for 2.6.29 (part 2 of 3)

2008-12-09 Thread Avi Kivity
This is the second batch of the 2.6.29 merge window queue. Avi Kivity (2): Merge branch 'x86/crashdump' of git://git.kernel.org/.../tip/linux-2.6-tip KVM: VMX: Conditionally request interrupt window after injecting irq Eduardo Habkost (12): KVM: VMX: move vmx.h to include/asm KVM: SVM

[PATCH 28/44] x86: disable VMX on all CPUs on reboot

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> On emergency_restart, we may need to use an NMI to disable virtualization on all CPUs. We do that using nmi_shootdown_cpus() if VMX is enabled. Note: With this patch, we will run the NMI stuff only when the CPU where emergency_restart() was called has VMX

[PATCH 14/44] KVM: ppc: use prefetchable mappings for guest memory

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Bare metal Linux on 440 can "overmap" RAM in the kernel linear map, so that it can use large (256MB) mappings even if memory isn't a multiple of 256MB. To prevent the hardware prefetcher from loading from an invalid physical address through that mapping,

[PATCH 24/44] KVM: SVM: move has_svm() code to asm/virtext.h

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> Use a trick to keep the printk()s on has_svm() working as before. gcc will take care of not generating code for the 'msg' stuff when the function is called with a NULL msg argument. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kiv

[PATCH 21/44] x86: asm/virtext.h: add cpu_vmxoff() inline function

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> Unfortunately we can't use exactly the same code from vmx hardware_disable(), because the KVM function uses the __kvm_handle_fault_on_reboot() tricks. Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- ar

[PATCH 19/44] KVM: VMX: move ASM_VMX_* definitions from asm/kvm_host.h to asm/vmx.h

2008-12-09 Thread Avi Kivity
From: Eduardo Habkost <[EMAIL PROTECTED]> Those definitions will be used by code outside KVM, so move it outside of a KVM-specific source file. Those definitions are used only on kvm/vmx.c, that already includes asm/vmx.h, so they can be moved safely. Signed-off-by: Eduardo Habkost <[EMAIL PROTE

[PATCH 16/44] Merge branch 'x86/crashdump' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

2008-12-09 Thread Avi Kivity
--- arch/x86/include/asm/kexec.h | 31 +- arch/x86/include/asm/reboot.h|5 ++ arch/x86/kernel/crash.c | 70 +++-- arch/x86/kernel/machine_kexec_32.c | 104 --- arch/x86/kernel/reboot.c | 95 ++

[PATCH 12/44] KVM: Fix kernel allocated memory slot

2008-12-09 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Commit 7fd49de9773fdcb7b75e823b21c1c5dc1e218c14 "KVM: ensure that memslot userspace addresses are page-aligned" broke kernel space allocated memory slot, for the userspace_addr is invalid. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity

[PATCH 11/44] KVM: ia64: Remove some macro definitions in asm-offsets.c.

2008-12-09 Thread Avi Kivity
From: Xiantao Zhang <[EMAIL PROTECTED]> Use kernel's corresponding macro instead. Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/ia64/kvm/asm-offsets.c | 11 +-- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/arc

[PATCH 10/44] KVM: ppc: fix Kconfig constraints

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Make sure that CONFIG_KVM cannot be selected without processor support (currently, 440 is the only processor implementation available). Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/powerpc/kv

[PATCH 08/44] KVM: Fix cpuid iteration on multiple leaves per eac

2008-12-09 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> The code to traverse the cpuid data array list for counting type of leaves is currently broken. This patches fixes the 2 things in it. 1. Set the 1st counting entry's flag KVM_CPUID_FLAG_STATE_READ_NEXT. Without it the code will never find a valid en

[PATCH 03/44] KVM: ppc: optimize kvm stat handling

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Currently we use an unnecessary if&switch to detect some cases. To be honest we don't need the ligh_exits counter anyway, because we can calculate it out of others. Sum_exits can also be calculated, so we can remove that too. MMIO, DCR and INTR can be co

[PATCH 06/44] KVM: ppc: improve trap emulation

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> set ESR[PTR] when emulating a guest trap. This allows Linux guests to properly handle WARN_ON() (i.e. detect that it's a non-fatal trap). Also remove debugging printk in trap emulation. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by:

[PATCH 04/44] KVM: ppc: optimize find first bit

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Since we use a unsigned long here anyway we can use the optimized __ffs. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/powerpc/kvm/booke.c

[PATCH 02/44] KVM: ppc: fix set regs to take care of msr change

2008-12-09 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> When changing some msr bits e.g. problem state we need to take special care of that. We call the function in our mtmsr emulation (not needed for wrtee[i]), but we don't call kvmppc_set_msr if we change msr via set_regs ioctl. It's a corner case we never h

Re: Windows 2003, virtio Ethernet and USB - Strange Interaction

2008-12-09 Thread Sven Rudolph
Sven Rudolph <[EMAIL PROTECTED]> writes: > Dor Laor <[EMAIL PROTECTED]> writes: > >> Sven Rudolph wrote: > > ... > >> > Trying a summary: When using virtio Ethernet and "-usb"; Windows >> > leaves something (virtio Ethernet or USB ?) in a state that isn't >> > reset by my reboot sequence (etherboo

Re: KVM: MMU: optimize set_spte for page sync

2008-12-09 Thread Marcelo Tosatti
On Wed, Nov 26, 2008 at 01:12:20PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: >> >> Here it goes. >> >> KVM: MMU: optimize set_spte for page sync >> >> The write protect verification in set_spte is unnecessary for page sync. >> >> Its guaranteed that, if the unsync spte was writable, the tar

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-09 Thread Kay Sievers
On Tue, Dec 9, 2008 at 17:41, Mark McLoughlin <[EMAIL PROTECTED]> wrote: > On Mon, 2008-12-08 at 08:46 -0600, Anthony Liguori wrote: >> Mark McLoughlin wrote: >> > On Sun, 2008-12-07 at 18:52 +1030, Rusty Russell wrote: >> >> On Saturday 06 December 2008 01:37:06 Mark McLoughlin wrote: >> >> >> >>>

KVM: MMU: check for present pdptr shadow page in walk_shadow

2008-12-09 Thread Marcelo Tosatti
walk_shadow assumes the caller verified validity of the pdptr pointer in question, which is not the case for the invlpg handler. Fixes oops during Solaris 10 install. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 863baf7..641c078 1

Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool

2008-12-09 Thread Avi Kivity
Gerd Hoffmann wrote: Well, I see a massive slowdown when switching from sync to aio in the xen backend code. I think the reason is that due to the lack of a vectored interface (and thus /me submitting separate aio requests for each iovec element) stuff gets parallelized *way* too much and disk s

[ kvm-Bugs-2405061 ] kvm-80: virtio networking broken

2008-12-09 Thread SourceForge.net
Bugs item #2405061, was opened at 2008-12-07 20:07 Message generated for change (Comment added) made by mishehu You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2405061&group_id=180599 Please note that this message will contain a full copy of the comment t

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-09 Thread Anthony Liguori
Mark McLoughlin wrote: On Mon, 2008-12-08 at 08:46 -0600, Anthony Liguori wrote: It feels a bit like busy work to generalise this since only virtio_pci can be built as a module, but here's a patch. The mkinitrd hack turns into: # Handle finding virtio bus implementations if

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-09 Thread Mark McLoughlin
On Mon, 2008-12-08 at 08:46 -0600, Anthony Liguori wrote: > Mark McLoughlin wrote: > > On Sun, 2008-12-07 at 18:52 +1030, Rusty Russell wrote: > > > >> On Saturday 06 December 2008 01:37:06 Mark McLoughlin wrote: > >> > >>> Another example of a lack of an explicit dependency causing problem

Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool

2008-12-09 Thread Anthony Liguori
Gerd Hoffmann wrote: Hi, 2) it's impossible to add new interfaces and we need a vectored read/write operation to properly support a zero-copy API. I'm eager to try vectored block ops for the xenbus block backend. It performs at least as well as the current posix-aio code (in so

Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool

2008-12-09 Thread Gerd Hoffmann
Hi, > 2) it's impossible to add new interfaces and we need a vectored read/write > operation to properly support a zero-copy API. I'm eager to try vectored block ops for the xenbus block backend. > It performs at least as well as the current posix-aio code (in some > circumstances, even better

[ kvm-Bugs-2405061 ] kvm-80: virtio networking broken

2008-12-09 Thread SourceForge.net
Bugs item #2405061, was opened at 2008-12-07 20:07 Message generated for change (Comment added) made by mishehu You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2405061&group_id=180599 Please note that this message will contain a full copy of the comment t

[ kvm-Bugs-2411975 ] Vista can not boot up on PAE host

2008-12-09 Thread SourceForge.net
Bugs item #2411975, was opened at 2008-12-09 07:24 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=2411975&group_id=180599 Please note that this message will contain a full copy

Re: [PATCH] kvm-userspace: fix module build with --kerneldir

2008-12-09 Thread Joerg Roedel
Hey Avi, do you plan to apply this patch? Or, if not, can you give a comment why not? Thanks, Joerg On Mon, Dec 01, 2008 at 03:28:31PM +0100, Maik Hentsche wrote: > Please find my reworked patch attached. Support for pre-f1d28fb04 > kernels was tested with 2.6.16.1. I CC-ed everyone who contrib

Re: [PATCH 2/3] kvm: qemu: handle link status in qemu_sendv_packet()

2008-12-09 Thread Anthony Liguori
Mark McLoughlin wrote: Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/net.c | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/qemu/net.c b/qemu/net.c index 16a0990..f23a17f 100644 --- a/qemu/net.c +++ b/qemu/net.c @@ -400,6 +400,17 @@ static

Re: [PATCH 0/3] v2: KVM-userspace: add NUMA support for guests

2008-12-09 Thread Anthony Liguori
Avi Kivity wrote: André Przywara wrote: But I wouldn't load the admin with the burden of pinning, but let this be done by QEMU/KVM. Maybe one could introduce a way to tell QEMU/KVM to not pin the threads. This is where things start to get ugly... Why? qemu-system-x86_64 -numa 2,pin:none and th

Re: [PATCH 0/3] v2: KVM-userspace: add NUMA support for guests

2008-12-09 Thread Avi Kivity
André Przywara wrote: But I wouldn't load the admin with the burden of pinning, but let this be done by QEMU/KVM. Maybe one could introduce a way to tell QEMU/KVM to not pin the threads. This is where things start to get ugly... Why? qemu-system-x86_64 -numa 2,pin:none and then use whatever met

[PATCH 02/21] AMD IOMMU: fix iommu_map_page function

2008-12-09 Thread Joerg Roedel
Impact: bugfix in iommu_map_page function Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 4db4542..153db6e 100644 --- a/arch/x8

[PATCH 19/21] AMD IOMMU: add domain unmap function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function to unmap pages into protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/

[PATCH 10/11] VT-d: register functions for the IOMMU API

2008-12-09 Thread Joerg Roedel
Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- drivers/pci/intel-iommu.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 7128105..81e04ec 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pc

Re: [PATCH] kvm-userspace: Add '\0' at the end of the signature of CPUID

2008-12-09 Thread Avi Kivity
Guillaume Thouvenin wrote: Add '\0' at the end of the signature of CPUID in order to fill the signature with known values. 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 mess

[PATCH 08/21] AMD IOMMU: add iommu_flush_domain function

2008-12-09 Thread Joerg Roedel
Impact: add a function to flush a domain id on every IOMMU Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index

[PATCH 05/11] KVM: change KVM to use IOMMU API

2008-12-09 Thread Joerg Roedel
Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/ia64/include/asm/kvm_host.h |2 +- arch/ia64/kvm/Makefile |2 +- arch/ia64/kvm/kvm-ia64.c |3 +- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/Makefile|2 +- arch/x86/kvm/x86.c

[PATCH 14/21] AMD IOMMU: add domain init function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function for allocation protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_i

[PATCH 18/21] AMD IOMMU: add domain map function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function to map pages into protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/am

[PATCH 16/21] AMD IOMMU: add device detach function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function to detach devices from protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kerne

[PATCH 01/21] AMD IOMMU: rename iommu_map to iommu_map_page

2008-12-09 Thread Joerg Roedel
Impact: function rename The iommu_map function maps only one page. Make this clear in the function name. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b

[PATCH 21/21] AMD IOMMU: register functions for the IOMMU API

2008-12-09 Thread Joerg Roedel
Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index b42578b..6670aae 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arc

[PATCH 17/21] AMD IOMMU: add device attach function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function to attach devices to protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86

[PATCH 07/21] AMD IOMMU: move invalidation command building to a separate function

2008-12-09 Thread Joerg Roedel
Impact: refactoring of iommu_queue_inv_iommu_pages Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 26 -- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index db

[PATCH 09/21] AMD IOMMU: add protection domain flags

2008-12-09 Thread Joerg Roedel
Imapct: add a new struct member to 'struct protection_domain' When using protection domains for dma_ops and KVM its better to know for which subsystem it was allocated. Add a flags member to struct protection domain for that purpose. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/i

[PATCH 11/21] AMD IOMMU: add device reference counting for protection domains

2008-12-09 Thread Joerg Roedel
Impact: know how many devices are assigned to a domain Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/include/asm/amd_iommu_types.h |1 + arch/x86/kernel/amd_iommu.c|3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/amd_io

[PATCH 05/21] AMD IOMMU: add domain id free function

2008-12-09 Thread Joerg Roedel
Impact: add code to release a domain id Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 85a62e9..11de0f1 100644 --- a/

[PATCH 04/21] AMD IOMMU: make dma_ops_free_pagetable generic

2008-12-09 Thread Joerg Roedel
Impact: change code to free pagetables from protection domains The dma_ops_free_pagetable function can only free pagetables from dma_ops domains. Change that to free pagetables of pure protection domains. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c |8

[PATCH 20/21] AMD IOMMU: add domain address lookup function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function to lockup addresses in protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/k

[PATCH 01/11] KVM: rename vtd.c to iommu.c

2008-12-09 Thread Joerg Roedel
Impact: file renamed The code in the vtd.c file can be reused for other IOMMUs as well. So rename it to make it clear that it handle more than VT-d. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/ia64/kvm/Makefile |2 +- arch/x86/kvm/Makefile |2 +- virt/kvm/{vtd.c =

[PATCH 03/11] add frontend implementation for the IOMMU API

2008-12-09 Thread Joerg Roedel
This API can be used by KVM for accessing different types of IOMMUs to do device passthrough to guests. Beside that this API can also be used by device drivers to map non-linear host memory into dma-linear addresses to prevent sgather-gather DMA. UIO may be another user for this API. Signed-off-by

[PATCH 10/21] AMD IOMMU: add checks for dma_ops domain to dma_ops functions

2008-12-09 Thread Joerg Roedel
Impact: detect when a driver uses a device assigned otherwise Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c ind

[PATCH 13/21] AMD IOMMU: add domain cleanup helper function

2008-12-09 Thread Joerg Roedel
Impact: add a function to remove all devices from a domain Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 47158e3

[PATCH 06/21] AMD IOMMU: refactor completion wait handling into separate functions

2008-12-09 Thread Joerg Roedel
Impact: split one function into three The separate functions are required synchronize commands across all hardware IOMMUs in the system. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 65 +-- 1 files changed, 44 inserti

[PATCH 15/21] AMD IOMMU: add domain destroy function for IOMMU API

2008-12-09 Thread Joerg Roedel
Impact: add a generic function for releasing protection domains Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c i

[PATCH 03/21] AMD IOMMU: fix loop counter in free_pagetable function

2008-12-09 Thread Joerg Roedel
Impact: bugfix Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 153db6e..e96a2f3 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/

[PATCH 12/21] AMD IOMMU: add device detach helper functions

2008-12-09 Thread Joerg Roedel
Impact: add helper functions to detach a device from a domain Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- arch/x86/kernel/amd_iommu.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/ke

  1   2   >