Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-30 Thread Chris Lalancette
Eric W. Biederman wrote: svm can writeback into memory at odd times if we don't do this, and the cost is small - clear a bit in EFER. There's no reason to be lazy. Especially if we can clear that bit unconditionally (when EFER is present) I'm all for it. That is the case. Cool. I

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-30 Thread Avi Kivity
Chris Lalancette wrote: I'm pretty sure you have to test for it first; pre-64 bit x86 hardware doesn't have the EFER register, so you'll fault on access. On the other hand pre-64 bit x86 hardware doesn't usually (ever?) have VT extensions either. All amd hardware that supports svm has an

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-30 Thread Avi Kivity
Eric W. Biederman wrote: Avi Kivity [EMAIL PROTECTED] writes: Eric W. Biederman wrote: Most of the reason I was wondering is that the cpu hardware probing largely seems to be a duplicate of what we have in the core for probing cpu capabilities already, and could likely be made smaller

[RFC][PATCH 0/10][v3] Enable MSI for KVM assigned device

2008-10-30 Thread Sheng Yang
Hi, Avi Here is v3 for MSI on assigned devices. Still not conclude userspace patch, but the patchset changes a lot since v2. After discuss with Xiantao, we decide to reuse MSI dispatch function for x86 and IA64. I am working on that now. After get it done, I will send out v4. Another

[PATCH 03/10] KVM: Replace irq_requested with more generic irq_requested_type

2008-10-30 Thread Sheng Yang
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] --- include/linux/kvm_host.h |4 +++- virt/kvm/kvm_main.c |9 + 2 files changed, 8 insertions(+), 5

[PATCH 01/10] KVM: Move ack notifier register and IRQ sourcd ID request

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 30 +++--- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 43fea09..3ecc5a8 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c

[PATCH 10/10] KVM: MSI to INTx translate

2008-10-30 Thread Sheng Yang
Now we use MSI as default one Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 50 +++--- 1 files changed, 27 insertions(+), 23 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 0f851ef..34b5d2f 100644

[PATCH 07/10] x86: Add MSI delivery mode mask

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- include/asm-x86/msidef.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h index 296f29c..579b09d 100644 --- a/include/asm-x86/msidef.h +++ b/include/asm-x86/msidef.h @@

[PATCH 02/10] KVM: Separate update irq to a single function

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 68 -- 1 files changed, 38 insertions(+), 30 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 3ecc5a8..ac1d652 100644 --- a/virt/kvm/kvm_main.c +++

[PATCH 06/10] KVM: Export ioapic_get_delivery_bitmask

2008-10-30 Thread Sheng Yang
It would be used for MSI in device assignment, for MSI dispatch. Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/ioapic.c |4 ++-- virt/kvm/ioapic.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index c8f939c..1e0ff8c

[PATCH 09/10] KVM: Enable MSI for device assignment

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 74 ++ 1 files changed, 68 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index be0f943..0f851ef 100644 --- a/virt/kvm/kvm_main.c +++

Re: [PATCH 08/10] KVM: Add assigned_device_msi_dispatch()

2008-10-30 Thread Sheng Yang
On Thursday 30 October 2008 16:20:16 Sheng Yang wrote: The function is used to dispatch MSI to lapic according to MSI message address and message data. (Any way to replace macro GET_VAL_FROM_SHIFT()?) Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 45

Re: [patch 1/3] KVM: MMU: collapse remote TLB flushes on root sync

2008-10-30 Thread Avi Kivity
Marcelo Tosatti wrote: There is significant overhead now in comparison to the early indexing scheme with a list per root. It must be optimized. What's the typical number of (1) unsynced pages and (2) unsynced pages belonging to next cr3 when switching cr3? I'm guessing (1) and (2) are

Re: RFC: VMX: initialize TSC offset relative to vm creation time

2008-10-30 Thread Marcelo Tosatti
On Tue, Oct 28, 2008 at 12:36:14PM -0600, David S. Ahern wrote: That is, the fact that KVM does not handle unsynced TSC's on the host is not an argument against this patch which clearly fixes a bug. Take commit 019960ae9933161c2809fa4ee608ba30d9639fd2 for example. Has anything

Re: [PATCH] regression: vmalloc easily fail.

2008-10-30 Thread Glauber Costa
On Thu, Oct 30, 2008 at 05:49:41AM +0100, Nick Piggin wrote: On Wed, Oct 29, 2008 at 08:07:37PM -0200, Glauber Costa wrote: On Wed, Oct 29, 2008 at 11:43:33AM +0100, Nick Piggin wrote: On Wed, Oct 29, 2008 at 12:29:40PM +0200, Avi Kivity wrote: Nick Piggin wrote: Hmm, spanning 30MB

Re: [v10] Userspace patches for PCI device assignment

2008-10-30 Thread Avi Kivity
[EMAIL PROTECTED] wrote: This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. Applied all. Thanks to everyone involved in this effort! -- I have a truly marvellous patch that fixes the bug which this signature is too

Re: [00/03][PATCH] kvm-ia64 updates for linux-2.6.28-rc2

2008-10-30 Thread Avi Kivity
Zhang, Xiantao wrote: It is a potential issue. If the vcpu goes to halt with the lock taken, other vcpus wants to take write lock, they have to wait until the all halted vcpus are waken up, so it may impact performance. :) What is the impact? Taking slots_lock for write is very

TAP MTU = 4055 problem?

2008-10-30 Thread Matthew Faulkner
Hey all, I'm using KVM to setup a virtual machine. Using this machine i'm attempting to setup a connection to host machine using the tap interface. I setup the interface using the standard tap method and then start the KVM using the following: kvm -net nic,model=e1000 -net

Re: kvm pci passthrough

2008-10-30 Thread Muli Ben-Yehuda
On Wed, Oct 29, 2008 at 05:44:54PM -0700, David Brown wrote: I was wondering what the status of kvm pci passthrough is? Especially the kind where I don't have vt-d? Where are the parts to play with? Is there any documentation you can point me to? Hi David, The kind where you *do* have VT-d

Re: [v10] Userspace patches for PCI device assignment

2008-10-30 Thread Anthony Liguori
[EMAIL PROTECTED] wrote: This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. This is still broken wrt CPU hotplug. If a new CPU comes online, it won't have it's ioperm mask set correct and it will crash QEMU. You need

Re: [PATCH 0 of 7] kvm-userspace: support multiple processors in the same architecture

2008-10-30 Thread Christian Ehrhardt
Hollis Blanchard wrote: These patches allow the kvmctl bits (including testcases and libcflat) to be built for multiple processor types within the same architecture (e.g. 440 and e500). This is important because PowerPC supervisor mode can contain significant differences between processors (it's

RE: [v10] Userspace patches for PCI device assignment

2008-10-30 Thread Han, Weidong
Anthony Liguori wrote: [EMAIL PROTECTED] wrote: This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. This is still broken wrt CPU hotplug. If a new CPU comes online, it won't have it's ioperm mask set correct and it will

[PATCH 4/6] kvm: vmx: crash_hardware_disable function

2008-10-30 Thread Eduardo Habkost
We need to first check if virtualization was enabled. We do this by checking CR4.VMXE. If it is set, run vmxoff and clear CR4.VMXE. Signed-off-by: Eduardo Habkost [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git

[PATCH 2/6] kvm_x86_ops: crash_hardware_disable() operation

2008-10-30 Thread Eduardo Habkost
The vmx hardware_disable() function does too much for the virt_disable crash handler, so we will have a new operation for the crash-time virt_disable case. Signed-off-by: Eduardo Habkost [EMAIL PROTECTED] --- arch/x86/include/asm/kvm_host.h |1 + 1 files changed, 1 insertions(+), 0

[PATCH 0/6] kdump: disable virtualization extensions on crash (v2)

2008-10-30 Thread Eduardo Habkost
Hi, After some discussion, this is my second try to fix properly the kdump hang when the kvm-intel module is loaded. I've kept the virtualization code inside the KVM, and just used a function pointer that can be registered by KVM to be called at crash time. This series is for one of the

[PATCH 6/6] kvm: x86: set kdump virt_disable function on initialization

2008-10-30 Thread Eduardo Habkost
Finally implement the virt_disable function for kdump. It will call kvm_x86_ops-crash_hardware_disable(), that will disable virtualization extensions on the CPU if it is not disabled yet. Signed-off-by: Eduardo Habkost [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 19 ++- 1 files

[PATCH 1/6] kdump: crash-time virt disable function

2008-10-30 Thread Eduardo Habkost
This patch adds an interface to set a function to be called on crash time, on each CPU. The function will be set by code that enables virtualization extensions on the CPUs (i.e. KVM). It will be called once on each CPU by machine_crash_shutdown(), and should do the very least to disable virt

[PATCH 5/6] kvmx: x86: set kvm_x86_ops earlier on kvm_arch_init()

2008-10-30 Thread Eduardo Habkost
Small change that will be needed when we use set_virt_disable_func() on kvm_arch_init(). Signed-off-by: Eduardo Habkost [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

Re: [PATCH 1/6] kdump: crash-time virt disable function

2008-10-30 Thread Avi Kivity
Eduardo Habkost wrote: This patch adds an interface to set a function to be called on crash time, on each CPU. The function will be set by code that enables virtualization extensions on the CPUs (i.e. KVM). It will be called once on each CPU by machine_crash_shutdown(), and should do the very

Re: [PATCH 0/6] kdump: disable virtualization extensions on crash (v2)

2008-10-30 Thread Avi Kivity
Eduardo Habkost wrote: After some discussion, this is my second try to fix properly the kdump hang when the kvm-intel module is loaded. I've kept the virtualization code inside the KVM, and just used a function pointer that can be registered by KVM to be called at crash time. Looks good.

Re: RFC: VMX: initialize TSC offset relative to vm creation time

2008-10-30 Thread David S. Ahern
Marcelo Tosatti wrote: On Tue, Oct 28, 2008 at 12:36:14PM -0600, David S. Ahern wrote: That is, the fact that KVM does not handle unsynced TSC's on the host is not an argument against this patch which clearly fixes a bug. Take commit 019960ae9933161c2809fa4ee608ba30d9639fd2 for example.

[patch] remove vcpu_info array v5

2008-10-30 Thread Jes Sorensen
Hi, So here we go, trying to catch up on the PCI passthrough patch revision number, here's v5 of the struct vcpu_info patch. In the end I decided to merge the contents of struct vcpu_info directly into CPU_COMMON as it was silly to create new files just to remove them in the next patch again.

Re: TAP MTU = 4055 problem?

2008-10-30 Thread Javier Guerra
On Thu, Oct 30, 2008 at 4:41 AM, Matthew Faulkner [EMAIL PROTECTED] wrote: I go no respone. So i started with a lower packet size and figured out below a size of 4054 packets were sent and recevied (without ip fragmentation), however, as soon as the packets were = 4055 it stopped working. Is

Re: TAP MTU = 4055 problem?

2008-10-30 Thread Matthew Faulkner
I'm not using a bridge. And i have set the mtu on both tapX and ethX to 9000. Having done a little packet sniffing from the hostmachine - virtual machine I can see that packets of the correct (large) size are being sent. Whilst sniffing on the virtual machine I don't see any packets. This

Re: kvm pci passthrough

2008-10-30 Thread Muli Ben-Yehuda
On Thu, Oct 30, 2008 at 08:42:50AM -0700, David Brown wrote: Thanks, glad to know progress is being made. However, around here we're mostly an AMD shop and as far as I know they don't have a working IOMMU yet. I believe it's working, just not shipping yet :-) Has there been any testing with

Re: [PATCH 1/6] kdump: crash-time virt disable function

2008-10-30 Thread Eduardo Habkost
On Thu, Oct 30, 2008 at 03:50:31PM +0200, Avi Kivity wrote: snip +static void (*virt_disable_fn)(unsigned int cpu); Since you never use the cpu argument, I suggest dropping it. It is a leftover from when I was using cpus_hardware_enabled to check if vmx was enabled, before I've noticed I

Re: [PATCH] regression: vmalloc easily fail.

2008-10-30 Thread Matt Mackall
On Thu, 2008-10-30 at 05:49 +0100, Nick Piggin wrote: I still think we should get rid of the guard pages in non-debug kernels completely, For what it's worth, I agree. -- Mathematics is the supreme nostalgia of our time. -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: TAP MTU = 4055 problem?

2008-10-30 Thread Matthew Faulkner
For additionial information, i've placed some printf's within KVMs e1000 emualted drivers. It turns out the within the e1000 receive function (e1000_receive) the correct size is received. Somewhere between there and the upper layers something goes wrong. I am continuing to investiage this

[PATCH 4/6] kvm: qemu: aggregate reads from eventfd

2008-10-30 Thread Mark McLoughlin
Keep reading from eventfd until it's empty and aggregate the results. Only really important when we're emulating eventfd using a pipe as in that case we may have multiple 1 values queued up, potentially leading to the pipe buffer filling up and the write side blocking. Signed-off-by: Mark

[PATCH 3/6] kvm: qemu: add qemu_eventfd_write() and qemu_eventfd_read()

2008-10-30 Thread Mark McLoughlin
Split out code for common eventfd operations to avoid re-implementation. Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/compatfd.c | 48 qemu/compatfd.h |2 ++ qemu/qemu-kvm.c | 42 -- 3

[PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-10-30 Thread Mark McLoughlin
Hey, The main patch in this series is 5/6 - it just kills off the virtio_net tx mitigation timer and does all the tx I/O in the I/O thread. Below are the results I got from benchmarking guest-host and host-guest on my machine. There's enough numbers there to make anyone blind, but basically

[PATCH 1/6] kvm: qemu: virtio: remove unused variable

2008-10-30 Thread Mark McLoughlin
Remove a variable from virtqueue_pop() which has been unused since the very start. Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/hw/virtio.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c index e675f43..8fac354 100644

[PATCH 6/6] kvm: qemu: virtio-net: drop mutex during tx tapfd write

2008-10-30 Thread Mark McLoughlin
This allows the guest vcpu thread to exit while the I/O thread is churning away. Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/hw/virtio-net.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 0612f5f..aa1c107

[PATCH 2/6] kvm: qemu: dup the qemu_eventfd() return

2008-10-30 Thread Mark McLoughlin
qemu_eventfd() returns two file descriptors, both of which must be closed when pipe() is used in the absence of eventfd(). Duplicate the eventfd() file descriptor so that closing both descriptors will work in that case. Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/compatfd.c |6

[PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer

2008-10-30 Thread Mark McLoughlin
By removing the tx timer altogether and doing all the copies in the I/O thread, we can keep the I/O churning away in parallel with the guest generating more I/O. In my tests, this significantly increases guest-host throughput, causes a minor increase in host-guest throughput, reduces CPU

Re: [PATCH 2/9] Add helper functions for nested SVM v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: These are helpers for the nested SVM implementation. - nsvm_printk implements a debug printk variant - nested_svm_do calls a handler that can accesses gpa-based memory v3 makes use of the new permission checker Signed-off-by: Alexander Graf [EMAIL PROTECTED] ---

Re: [Qemu-devel] [PATCH 1/2] Add HPET emulation to qemu (v3)

2008-10-30 Thread Beth Kon
On Mon, 2008-10-27 at 12:49 +0200, Dor Laor wrote: Beth Kon wrote: On Fri, 2008-10-17 at 16:49 +0100, Jamie Lokier wrote: Beth Kon wrote: Clock drift on Linux is in the range of .017% - .019%, loaded and unloaded. I haven't found a straightforward way to test on

Re: [PATCH 3/9] Implement GIF, clgi and stgi v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: 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 used to

Re: [PATCH] regression: vmalloc easily fail.

2008-10-30 Thread Glauber Costa
On Thu, Oct 30, 2008 at 11:46:02AM -0500, Matt Mackall wrote: On Thu, 2008-10-30 at 05:49 +0100, Nick Piggin wrote: I still think we should get rid of the guard pages in non-debug kernels completely, For what it's worth, I agree. Do we want any specific option, or is DEBUG_VM enough ?

Re: [PATCH 4/9] Implement hsave v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: 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 Signed-off-by: Alexander Graf [EMAIL PROTECTED] --- arch/x86/kvm/kvm_svm.h |1 +

Re: [PATCH 5/9] Add VMLOAD and VMSAVE handlers v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: 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 of the new

Re: [PATCH 3/9] Implement GIF, clgi and stgi v5

2008-10-30 Thread Avi Kivity
Anthony Liguori wrote: +static int stgi_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) +{ It feels a little strange to see this here instead of an implementation of stgi/clgi in x86_emulate. Any reason for not going that route? We already know the instruction is stgi, no

Re: [PATCH 3/9] Implement GIF, clgi and stgi v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 19:10, Avi Kivity wrote: Anthony Liguori wrote: +static int stgi_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) +{ It feels a little strange to see this here instead of an implementation of stgi/clgi in x86_emulate. Any reason for not going that route?

Re: [PATCH 2/9] Add helper functions for nested SVM v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 18:56, Anthony Liguori wrote: Alexander Graf wrote: These are helpers for the nested SVM implementation. - nsvm_printk implements a debug printk variant - nested_svm_do calls a handler that can accesses gpa-based memory v3 makes use of the new permission checker

Re: [PATCH 4/9] Implement hsave v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 19:04, Anthony Liguori wrote: Alexander Graf wrote: 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 snip

Re: [PATCH 5/9] Add VMLOAD and VMSAVE handlers v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 19:06, Anthony Liguori wrote: Alexander Graf wrote: 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

Re: [PATCH 3/9] Implement GIF, clgi and stgi v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: On 30.10.2008, at 19:10, Avi Kivity wrote: GIF somehow needs exposure to userspace too, right? Otherwise, when using -no-kernel-apic, userspace may try to inject an interrupt when the guest cannot handle it, right? Hmm, right, it needs to close the interrupt window.

Re: [PATCH 2/9] Add helper functions for nested SVM v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: On 30.10.2008, at 18:56, Anthony Liguori wrote: /* enable NPT for AMD64 and X86 with PAE */ #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) static bool npt_enabled = true; @@ -1145,6 +1155,84 @@ static int vmmcall_interception(struct vcpu_svm *svm, struct

Re: [PATCH 3/9] Implement GIF, clgi and stgi v5

2008-10-30 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: +static int stgi_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) +{ It feels a little strange to see this here instead of an implementation of stgi/clgi in x86_emulate. Any reason for not going that route? We already know the

Re: [PATCH 5/9] Add VMLOAD and VMSAVE handlers v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: On 30.10.2008, at 19:06, Anthony Liguori wrote: Alexander Graf wrote: 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

Re: [PATCH 8/9] allow read access to MSR_VM_VR

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: From: Joerg Roedel [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Signed-off-by: Alexander Graf [EMAIL

Re: [PATCH 4/9] Implement hsave v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: On 30.10.2008, at 19:04, Anthony Liguori wrote: kmem_cache_free(kvm_vcpu_cache, svm); } @@ -1376,6 +1383,9 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) case MSR_IA32_LASTINTTOIP: *data = svm-vmcb-save.last_excp_to;

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: 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 Signed-off-by: Alexander Graf

Re: [PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-10-30 Thread Anthony Liguori
Mark McLoughlin wrote: Hey, The main patch in this series is 5/6 - it just kills off the virtio_net tx mitigation timer and does all the tx I/O in the I/O thread. Below are the results I got from benchmarking guest-host and host-guest on my machine. There's enough numbers there to make anyone

Re: [PATCH 4/9] Implement hsave v5

2008-10-30 Thread Avi Kivity
Alexander Graf wrote: I don't see any benefit from actually exporting that MSR atm. KVM does never read it and it'd just add additional overhead on every userspace transition, as it'd need to be synced every time. We only sync MSRs on save/restore. -- I have a truly marvellous patch that

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-30 Thread Avi Kivity
Anthony Liguori wrote: +static int nested = 0; +module_param(nested, int, S_IRUGO); Instead of doing this as a module parameter, we could either avoid advertising SVM support in cpuid from userspace or we could disable SVM in the BIOS. I really like the later approach because it gives a

Re: [PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer

2008-10-30 Thread Anthony Liguori
Mark McLoughlin wrote: By removing the tx timer altogether and doing all the copies in the I/O thread, we can keep the I/O churning away in parallel with the guest generating more I/O. In my tests, this significantly increases guest-host throughput, causes a minor increase in host-guest

Re: TAP MTU = 4055 problem?

2008-10-30 Thread Matthew Faulkner
Hey all, I've solved the problem. Turns out the tap buffers were set at the size 4096. When pulling a packet off that is greater than 4096 the 2nd packet (for some reason) is thrown aaway or ignored. I've done a hacky solutoin by simply increasing this number of 65536. 2008/10/30 Matthew

Re: [PATCH 4/9] Implement hsave v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 20:29, Avi Kivity wrote: Alexander Graf wrote: I don't see any benefit from actually exporting that MSR atm. KVM does never read it and it'd just add additional overhead on every userspace transition, as it'd need to be synced every time. We only sync MSRs on

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 20:24, Avi Kivity wrote: Anthony Liguori wrote: +static int nested = 0; +module_param(nested, int, S_IRUGO); Instead of doing this as a module parameter, we could either avoid advertising SVM support in cpuid from userspace or we could disable SVM in the BIOS. I

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: On 30.10.2008, at 20:16, Anthony Liguori wrote: Instead of doing this as a module parameter, we could either avoid advertising SVM support in cpuid from userspace or we could disable SVM in the BIOS. I really like the later approach because it gives a better error

Re: [PATCH 5/9] Add VMLOAD and VMSAVE handlers v5

2008-10-30 Thread Alexander Graf
On 30.10.2008, at 20:14, Anthony Liguori wrote: Alexander Graf wrote: On 30.10.2008, at 19:06, Anthony Liguori wrote: Alexander Graf wrote: This implements the VMLOAD and VMSAVE instructions, that usually surround the VMRUN instructions. Both instructions load / restore the same

Re: [PATCH 5/9] Add VMLOAD and VMSAVE handlers v5

2008-10-30 Thread Anthony Liguori
Alexander Graf wrote: On 30.10.2008, at 20:14, Anthony Liguori wrote: I don't see this improving code readability, but maybe that again is just personal preference. Is this a real problem, or just again a different esthetic view? I'm not wildy opposed to your implementation so I'm

[PATCH 0/10][v4] Enable MSI for KVM assigned device kernel part

2008-10-30 Thread Sheng Yang
Hi, Avi Here is v4 for MSI on assigned devices. v3-v4 1. After discuss with Xiantao, we decide to delay MSI enabling for IA64, so I've temporary wrapped MSI critical part with #ifdef CONFIG_X86. These are expected to be removed soon before 2.6.28 release. 2. Fix two wrong usage of macro. The

[PATCH 05/10] KVM: Add fields for MSI device assignment

2008-10-30 Thread Sheng Yang
Prepared for kvm_arch_assigned_device_msi_dispatch(). Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- include/linux/kvm.h |6 +- include/linux/kvm_host.h |4 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index

[PATCH 01/10] KVM: Move ack notifier register and IRQ sourcd ID request

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 30 +++--- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4f43abe..4647a7b 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c

[PATCH 10/10] KVM: MSI to INTx translate

2008-10-30 Thread Sheng Yang
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. Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 52 -- 1 files

[PATCH 03/10] KVM: Replace irq_requested with more generic irq_requested_type

2008-10-30 Thread Sheng Yang
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] --- include/linux/kvm_host.h |4 +++- virt/kvm/kvm_main.c |9 + 2 files changed, 8 insertions(+), 5

[PATCH 04/10] KVM: Clean up assigned_device_update_irq

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [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 ed1b243..c69c108 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -178,11 +178,11 @@

[PATCH 08/10] KVM: Add assigned_device_msi_dispatch()

2008-10-30 Thread Sheng Yang
The function is used to dispatch MSI to lapic according to MSI message address and message data. (Any way to replace macro GET_VAL_FROM_SHIFT()?) Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 55 +++ 1 files changed, 55

[PATCH 06/10] KVM: Export ioapic_get_delivery_bitmask

2008-10-30 Thread Sheng Yang
It would be used for MSI in device assignment, for MSI dispatch. Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/ioapic.c |4 ++-- virt/kvm/ioapic.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index c8f939c..1e0ff8c

[PATCH 02/10] KVM: Separate update irq to a single function

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 68 -- 1 files changed, 38 insertions(+), 30 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4647a7b..7d261b1 100644 --- a/virt/kvm/kvm_main.c +++

guest hardware breakpoint

2008-10-30 Thread Michael Le
Hi, I'm trying to set a hardware breakpoint inside the guest using gdb. This doesn't seem to work. Execution just skips right over it. I've have also tried writing some code to set a breakpoint by directly accessing the db registers from the guest. This also did not cause a breakpoint to be