[COMMIT] [vioserial] associate virtio port with the driver.

2011-05-16 Thread Vadim Rozenfeld
From 212d89e1b381b69296d2fe9441161532417060ea Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 2 May 2011 22:08:44 +0300 Subject: [COMMIT] [vioserial] associate virtio port with the driver. --- vioserial/sys/vioser.inx | 10 +- 1 files changed, 9

[COMMIT] [vioserial] add resource file.

2011-05-16 Thread Vadim Rozenfeld
From 7feb63ba36e487c1ae89ab258f406f94e9861255 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 2 May 2011 22:13:51 +0300 Subject: [COMMIT] [vioserial] add resource file. --- vioserial/sys/sources |3 ++- vioserial/sys/vioser.rc | 43

[COMMIT] [vioserial] fix device id guid

2011-05-16 Thread Vadim Rozenfeld
From 0d7e40ad7e046e230aed8897d797291a4ad459c4 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 2 May 2011 22:18:56 +0300 Subject: [COMMIT] [vioserial] fix device id guid --- vioserial/sys/vioser.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[COMMIT] [vioserial] Add device Id to the port name.

2011-05-16 Thread Vadim Rozenfeld
From d6c22f4cc4fe3ae9e12858aa75f3c943adebe7e2 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 13:57:51 +0300 Subject: [COMMIT] [vioserial] Add device Id to the port name --- vioserial/sys/Device.c |8 +- vioserial/sys/Port.c | 60

[COMMIT] [vioserial] Fix ports numbering problem.

2011-05-16 Thread Vadim Rozenfeld
From 1906d77900afdfdd1720a6d743ce69487904a6a0 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 14:05:58 +0300 Subject: [COMMIT] [vioserial] Fix ports numbering problem. --- vioserial/sys/Device.c |7 +-- 1 files changed, 5 insertions(+), 2

[COMMIT] [vioserial] use buffered mode for data transfer

2011-05-16 Thread Vadim Rozenfeld
From 6ae78d9f9c49fc22120d1a96f9012f2aa69ed485 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 14:32:37 +0300 Subject: [COMMIT] [vioserial] use buffered mode for data transfer --- vioserial/sys/Control.c |1 + vioserial/sys/Device.c | 19 ---

[COMMIT] [vioserial] fix send buffer and remove port logic

2011-05-16 Thread Vadim Rozenfeld
From 55dc00d6c15d4bc34bca41f785c0509fc91275df Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 14:41:20 +0300 Subject: [COMMIT] [vioserial] fix send buffer and remove port logic --- vioserial/sys/Buffer.c | 68

[COMMIT] [vioserial] make interface GUIDs public

2011-05-16 Thread Vadim Rozenfeld
From 42814cdfcb8d394d13a439e317a74863ddb61b81 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 14:59:01 +0300 Subject: [COMMIT] [vioserial] make interface GUIDs public --- vioserial/sys/Device.c |2 +- vioserial/sys/public.h | 12

[COMMIT] [vioserial] clean up interrupt enable/disable logic

2011-05-16 Thread Vadim Rozenfeld
From fd7cab2b8d58acf191a740856a11eb5952705fe6 Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 15:30:14 +0300 Subject: [COMMIT] [vioserial] clean up interrupt enable/disable logic --- vioserial/sys/IsrDpc.c |8 vioserial/sys/Port.c |3

[COMMIT] [vioserial] Fix rc file compilation problem

2011-05-16 Thread Vadim Rozenfeld
[vrozenfe@localhost vioserial]$ cat 0010-vioserial-Fix-rc-file-compilation-problem.patch From 03cf597917f908f8d421ea180873885742d96dfa Mon Sep 17 00:00:00 2001 From: Vadim Rozenfeld vroze...@redhat.com Date: Mon, 16 May 2011 15:46:34 +0300 Subject: [COMMIT] [vioserial] Fix rc file compilation

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-16 Thread Gleb Natapov
On Mon, May 16, 2011 at 02:11:40AM +0300, Nadav Har'El wrote: On Thu, May 12, 2011, Avi Kivity wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: Ah, yes. For live migration to work, all vmcb state must be accessible via vendor-independent accessors once an exit is completely handled.

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-16 Thread Nadav Har'El
On Mon, May 16, 2011, Gleb Natapov wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: Hi, I can quite easily save this state in a different place which is saved - The easiest will just be to use vmcs12, which has place for exactly the fields we want to save (and they are rewritten anyway

Re: [Qemu-devel] [RFC] live snapshot, live merge, live block migration

2011-05-16 Thread Dor Laor
On 05/16/2011 12:38 AM, Jagane Sundar wrote: Hello Dor, One important advantage of live snapshot over live backup is support of multiple (consecutive) live snapshots while there can be only a single live backup at one time. This is why I tend to think that although live backup carry some

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-16 Thread Gleb Natapov
On Mon, May 16, 2011 at 10:44:28AM +0300, Nadav Har'El wrote: On Mon, May 16, 2011, Gleb Natapov wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: Hi, I can quite easily save this state in a different place which is saved - The easiest will just be to use vmcs12, which has place for

Re: [Qemu-devel] [RFC] live snapshot, live merge, live block migration

2011-05-16 Thread Jagane Sundar
Hello Dor, Let me see if I understand live snapshot correctly: If I want to configure a VM for daily backup, then I would do the following: - Create a snapshot s1. s0 is marked read-only. - Do a full backup of s0 on day 0. - On day 1, I would create a new snapshot s2, then copy over the

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-16 Thread Avi Kivity
On 05/16/2011 02:11 AM, Nadav Har'El wrote: On Thu, May 12, 2011, Avi Kivity wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: Ah, yes. For live migration to work, all vmcb state must be accessible via vendor-independent accessors once an exit is completely handled. For example, GPRs

KVM call agenda for May 17th

2011-05-16 Thread Juan Quintela
Please send in any agenda items you are interested in covering. From two weeks ago, we have already: - import kvm headers into qemu, drop #ifdef maze (Jan) Thanks, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-16 Thread Avi Kivity
On 05/16/2011 12:50 PM, Avi Kivity wrote: Or do you consider this not enough, and rather that it is necessary that nested VMX should use exactly the same logic as nested SVM does - namely, use tricks like SVM's exit_required instead of our different tricks? I think svm is rather simple here

Re: [PATCH 03/16] Revert qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing

2011-05-16 Thread Avi Kivity
On 05/13/2011 03:13 PM, Jan Kiszka wrote: This reverts commit fd6bfef3d49a62b36092f131690de3e34f84662d. It is a nop, and it always was a nop: irq0override = !kvm_irqchip || kvm_has_gsi_routing But this code is only executed when gsi routing is available. That means that if

Re: [PATCH 04/16] qemu-kvm: Drop IRQ0 override test from ioapic_set_irq

2011-05-16 Thread Avi Kivity
On 05/13/2011 03:13 PM, Jan Kiszka wrote: The IRQ0 override is not configurable while using the user space IOAPIC. When the in-kernel irqchip is active, ioapic_set_irq is never called. So drop this useless test. @@ -146,7 +145,7 @@ static void ioapic_set_irq(void *opaque, int vector, int

Re: [PATCH 03/16] Revert qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing

2011-05-16 Thread Avi Kivity
On 05/16/2011 01:24 PM, Avi Kivity wrote: On 05/13/2011 03:13 PM, Jan Kiszka wrote: This reverts commit fd6bfef3d49a62b36092f131690de3e34f84662d. It is a nop, and it always was a nop: irq0override = !kvm_irqchip || kvm_has_gsi_routing But this code is only executed when gsi routing is

Re: [PATCH 00/16] qemu-kvm: Cleanup and switch to upstream - Part II

2011-05-16 Thread Avi Kivity
On 05/13/2011 03:13 PM, Jan Kiszka wrote: The second round of merging qemu-kvm with upstream. This part stops after switching to upstreams kvm_init implementation. To achieve this, various small cleanups and refactorings are applied, the irq0 override management is simplified and the

Re: [PATCH v2 1/7] KVM: MMU: optimize pte write path if don't have protected sp

2011-05-16 Thread Avi Kivity
On 05/15/2011 06:20 PM, Xiao Guangrong wrote: Simply return from kvm_mmu_pte_write path if no shadow page is write-protected, then we can avoid to walk all shadow pages and hold mmu-lock Patchset looks like a very good cleanup (plus the nice optimization in patch 1). -- error compiling

Re: KVM call agenda for May 17th

2011-05-16 Thread Paolo Bonzini
On 05/16/2011 12:07 PM, Juan Quintela wrote: From two weeks ago, we have already: - import kvm headers into qemu, drop #ifdef maze (Jan) SCSI patches merge plan Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: KVM Forum 2011: Call For Participation

2011-05-16 Thread Dor Laor
The abstract submission deadline was originally set for today. The forum committee agreed to extend the deadline period until next Sunday, May 22. The notification date remains the same (May 31). Thanks, your KVM Forum 2011 Program Committee On 04/21/2011 08:21 PM,

Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-16 Thread Marcelo Tosatti
On Sun, May 08, 2011 at 11:18:47AM +0300, Nadav Har'El wrote: We saw in a previous patch that L1 controls its L2 guest with a vcms12. L0 needs to create a real VMCS for running L2. We call that vmcs02. A later patch will contain the code, prepare_vmcs02(), for filling the vmcs02 fields. This

Re: [PATCH 12/30] nVMX: Implement VMPTRLD

2011-05-16 Thread Marcelo Tosatti
On Sun, May 08, 2011 at 11:21:22AM +0300, Nadav Har'El wrote: This patch implements the VMPTRLD instruction. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) ---

Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-16 Thread Nadav Har'El
On Mon, May 16, 2011, Marcelo Tosatti wrote about Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2: +static void __nested_free_saved_vmcs(void *arg) +{ + struct saved_vmcs *saved_vmcs = arg; + + vmcs_clear(saved_vmcs-vmcs); + if (per_cpu(current_vmcs,

[PATCH v3] Add an isa device for SGA

2011-05-16 Thread Glauber Costa
This patch adds a dummy legacy ISA device whose responsibility is to deploy sgabios, an option rom for a serial graphics adapter. The proposal is that this device is always-on when -nographics, but can otherwise be enable in any setup when -device sga is used. [v2: suggestions on qdev by Markus ]

Re: [PATCH 12/30] nVMX: Implement VMPTRLD

2011-05-16 Thread Nadav Har'El
Hi, On Mon, May 16, 2011, Marcelo Tosatti wrote about Re: [PATCH 12/30] nVMX: Implement VMPTRLD: + if (vmx-nested.current_vmptr != vmcs12_addr) { + struct vmcs12 *new_vmcs12; + struct page *page; + page = nested_get_page(vcpu, vmcs12_addr); +

Re: [PATCH 12/30] nVMX: Implement VMPTRLD

2011-05-16 Thread Nadav Har'El
On Mon, May 16, 2011, Nadav Har'El wrote about Re: [PATCH 12/30] nVMX: Implement VMPTRLD: But now that I think about it, there does appear to be a problem in nested_vmx_run(): This is where we should have verified that there is a current VMCS - i.e., that VMPTRLD was previously used! And it

Re: [Qemu-devel] KVM call agenda for May 17th

2011-05-16 Thread Anthony Liguori
On 05/16/2011 07:17 AM, Paolo Bonzini wrote: On 05/16/2011 12:07 PM, Juan Quintela wrote: From two weeks ago, we have already: - import kvm headers into qemu, drop #ifdef maze (Jan) SCSI patches merge plan - libtool usage Regards, Anthony Liguori Paolo -- To unsubscribe from this

[PATCH V5 0/6 net-next] macvtap/vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced 30-50% CPU usage for vhost thread for single stream test). The patchset is based on previous submission and

[PATCH V5 1/6 net-next] sock.h: Add a new sock zero-copy flag

2011-05-16 Thread Shirley Ma
Signed-off-by: Shirley Ma x...@us.ibm.com --- include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index f2046e4..2229bd1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -563,6 +563,7 @@ enum sock_flags {

[PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Shirley Ma
Signed-off-by: Shirley Ma x...@us.ibm.com --- include/linux/netdevice.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a134d80..2646251 100644 --- a/include/linux/netdevice.h +++

[PATCH V5 3/6 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-05-16 Thread Shirley Ma
This patch adds userspace buffers support in skb shared info. A new struct skb_ubuf_info is needed to maintain the userspace buffers argument and index, a callback is used to notify userspace to release the buffers once lower device has done DMA (Last reference to that skb has gone).

[PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
This patch maintains the outstanding userspace buffers in the sequence it is delivered to vhost. The outstanding userspace buffers will be marked as done once the lower device buffers DMA has finished. This is monitored through last reference of kfree_skb callback. Two buffer index are used for

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Ben Hutchings
On Mon, 2011-05-16 at 12:28 -0700, Shirley Ma wrote: Signed-off-by: Shirley Ma x...@us.ibm.com --- include/linux/netdevice.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a134d80..2646251

[PATCH V5 5/6 net-next] macvtap: macvtap TX zero-copy support

2011-05-16 Thread Shirley Ma
Only when buffer size is greater than GOODCOPY_LEN (256), macvtap enables zero-copy. Signed-off-by: Shirley Ma x...@us.ibm.com --- drivers/net/macvtap.c | 129 1 files changed, 118 insertions(+), 11 deletions(-) diff --git

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Shirley Ma
On Mon, 2011-05-16 at 20:35 +0100, Ben Hutchings wrote: Sorry, bit 31 is taken. You get the job of turning features into a wider bitmap. :) will do it. Thanks Shirley -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

[PATCH V5 6/6 net-next] example: enable zero-copy support in ixgbe

2011-05-16 Thread Shirley Ma
Device can enable zero-copy flag when HIGHDMA is supported. Signed-off-by: Shirley Ma x...@us.ibm.com --- drivers/net/ixgbe/ixgbe_main.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index

[PATCH 0/31] nVMX: Nested VMX, v10

2011-05-16 Thread Nadav Har'El
Hi, This is the tenth iteration of the nested VMX patch set. Improvements in this version over the previous one include: * Fix the code which did not fully maintain a list of all VMCSs loaded on each CPU. (Avi, this was the big thing that bothered you in the previous version). * Add

[PATCH 01/31] nVMX: Add nested module option to kvm_intel

2011-05-16 Thread Nadav Har'El
This patch adds to kvm_intel a module option nested. This option controls whether the guest can use VMX instructions, i.e., whether we allow nested virtualization. A similar, but separate, option already exists for the SVM module. This option currently defaults to 0, meaning that nested VMX must

[PATCH 02/31] nVMX: Implement VMXON and VMXOFF

2011-05-16 Thread Nadav Har'El
This patch allows a guest to use the VMXON and VMXOFF instructions, and emulates them accordingly. Basically this amounts to checking some prerequisites, and then remembering whether the guest has enabled or disabled VMX operation. Signed-off-by: Nadav Har'El n...@il.ibm.com ---

[PATCH 03/31] nVMX: Allow setting the VMXE bit in CR4

2011-05-16 Thread Nadav Har'El
This patch allows the guest to enable the VMXE bit in CR4, which is a prerequisite to running VMXON. Whether to allow setting the VMXE bit now depends on the architecture (svm or vmx), so its checking has moved to kvm_x86_ops-set_cr4(). This function now returns an int: If kvm_x86_ops-set_cr4()

[PATCH 04/31] nVMX: Introduce vmcs12: a VMCS structure for L1

2011-05-16 Thread Nadav Har'El
An implementation of VMX needs to define a VMCS structure. This structure is kept in guest memory, but is opaque to the guest (who can only read or write it with VMX instructions). This patch starts to define the VMCS structure which our nested VMX implementation will present to L1. We call it

[PATCH 05/31] nVMX: Implement reading and writing of VMX MSRs

2011-05-16 Thread Nadav Har'El
When the guest can use VMX instructions (when the nested module option is on), it should also be able to read and write VMX MSRs, e.g., to query about VMX capabilities. This patch adds this support. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/include/asm/msr-index.h | 12 +

[PATCH 06/31] nVMX: Decoding memory operands of VMX instructions

2011-05-16 Thread Nadav Har'El
This patch includes a utility function for decoding pointer operands of VMX instructions issued by L1 (a guest hypervisor) Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 53 +++ arch/x86/kvm/x86.c |3 +- arch/x86/kvm/x86.h |

[PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-16 Thread Nadav Har'El
We saw in a previous patch that L1 controls its L2 guest with a vcms12. L0 needs to create a real VMCS for running L2. We call that vmcs02. A later patch will contain the code, prepare_vmcs02(), for filling the vmcs02 fields. This patch only contains code for allocating vmcs02. In this version,

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Ben Hutchings
On Mon, 2011-05-16 at 12:38 -0700, Shirley Ma wrote: On Mon, 2011-05-16 at 20:35 +0100, Ben Hutchings wrote: Sorry, bit 31 is taken. You get the job of turning features into a wider bitmap. :) will do it. Bear in mind that feature masks are manipulated in many different places. This is

[PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-16 Thread Nadav Har'El
In VMX, before we bring down a CPU we must VMCLEAR all VMCSs loaded on it because (at least in theory) the processor might not have written all of its content back to memory. Since a patch from June 26, 2008, this is done using a per-cpu vcpus_on_cpu linked list of vcpus loaded on each CPU. The

[PATCH 09/31] nVMX: Add VMCS fields to the vmcs12

2011-05-16 Thread Nadav Har'El
In this patch we add to vmcs12 (the VMCS that L1 keeps for L2) all the standard VMCS fields. Later patches will enable L1 to read and write these fields using VMREAD/ VMWRITE, and they will be used during a VMLAUNCH/VMRESUME in preparing vmcs02, a hardware VMCS for running L2. Signed-off-by:

[PATCH 10/31] nVMX: Success/failure of VMX instructions.

2011-05-16 Thread Nadav Har'El
VMX instructions specify success or failure by setting certain RFLAGS bits. This patch contains common functions to do this, and they will be used in the following patches which emulate the various VMX instructions. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/include/asm/vmx.h |

[PATCH 11/31] nVMX: Implement VMCLEAR

2011-05-16 Thread Nadav Har'El
This patch implements the VMCLEAR instruction. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 65 ++- arch/x86/kvm/x86.c |1 2 files changed, 65 insertions(+), 1 deletion(-) --- .before/arch/x86/kvm/x86.c 2011-05-16

[PATCH 12/31] nVMX: Implement VMPTRLD

2011-05-16 Thread Nadav Har'El
This patch implements the VMPTRLD instruction. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) --- .before/arch/x86/kvm/vmx.c 2011-05-16 22:36:48.0 +0300 +++

[PATCH 13/31] nVMX: Implement VMPTRST

2011-05-16 Thread Nadav Har'El
This patch implements the VMPTRST instruction. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 28 +++- arch/x86/kvm/x86.c |3 ++- arch/x86/kvm/x86.h |4 3 files changed, 33 insertions(+), 2 deletions(-) --- .before/arch/x86/kvm/x86.c

[PATCH 14/31] nVMX: Implement VMREAD and VMWRITE

2011-05-16 Thread Nadav Har'El
Implement the VMREAD and VMWRITE instructions. With these instructions, L1 can read and write to the VMCS it is holding. The values are read or written to the fields of the vmcs12 structure introduced in a previous patch. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 176

[PATCH 15/31] nVMX: Move host-state field setup to a function

2011-05-16 Thread Nadav Har'El
Move the setting of constant host-state fields (fields that do not change throughout the life of the guest) from vmx_vcpu_setup to a new common function vmx_set_constant_host_state(). This function will also be used to set the host state when running L2 guests. Signed-off-by: Nadav Har'El

[PATCH 16/31] nVMX: Move control field setup to functions

2011-05-16 Thread Nadav Har'El
Move some of the control field setup to common functions. These functions will also be needed for running L2 guests - L0's desires (expressed in these functions) will be appropriately merged with L1's desires. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 80

[PATCH 17/31] nVMX: Prepare vmcs02 from vmcs01 and vmcs12

2011-05-16 Thread Nadav Har'El
This patch contains code to prepare the VMCS which can be used to actually run the L2 guest, vmcs02. prepare_vmcs02 appropriately merges the information in vmcs12 (the vmcs that L1 built for L2) and in vmcs01 (our desires for our own guests). Signed-off-by: Nadav Har'El n...@il.ibm.com ---

[PATCH 18/31] nVMX: Implement VMLAUNCH and VMRESUME

2011-05-16 Thread Nadav Har'El
Implement the VMLAUNCH and VMRESUME instructions, allowing a guest hypervisor to run its own guests. This patch does not include some of the necessary validity checks on vmcs12 fields before the entry. These will appear in a separate patch below. Signed-off-by: Nadav Har'El n...@il.ibm.com ---

[PATCH 19/31] nVMX: No need for handle_vmx_insn function any more

2011-05-16 Thread Nadav Har'El
Before nested VMX support, the exit handler for a guest executing a VMX instruction (vmclear, vmlaunch, vmptrld, vmptrst, vmread, vmread, vmresume, vmwrite, vmon, vmoff), was handle_vmx_insn(). This handler simply threw a #UD exception. Now that all these exit reasons are properly handled (and

[PATCH 20/31] nVMX: Exiting from L2 to L1

2011-05-16 Thread Nadav Har'El
This patch implements nested_vmx_vmexit(), called when the nested L2 guest exits and we want to run its L1 parent and let it handle this exit. Note that this will not necessarily be called on every L2 exit. L0 may decide to handle a particular exit on its own, without L1's involvement; In that

[PATCH 21/31] nVMX: vmcs12 checks on nested entry

2011-05-16 Thread Nadav Har'El
This patch adds a bunch of tests of the validity of the vmcs12 fields, according to what the VMX spec and our implementation allows. If fields we cannot (or don't want to) honor are discovered, an entry failure is emulated. According to the spec, there are two types of entry failures: If the

[PATCH 22/31] nVMX: Deciding if L0 or L1 should handle an L2 exit

2011-05-16 Thread Nadav Har'El
This patch contains the logic of whether an L2 exit should be handled by L0 and then L2 should be resumed, or whether L1 should be run to handle this exit (using the nested_vmx_vmexit() function of the previous patch). The basic idea is to let L1 handle the exit only if it actually asked to trap

[PATCH 23/31] nVMX: Correct handling of interrupt injection

2011-05-16 Thread Nadav Har'El
The code in this patch correctly emulates external-interrupt injection while a nested guest L2 is running. Because of this code's relative un-obviousness, I include here a longer-than- usual justification for what it does - much longer than the code itself ;-) To understand how to correctly

[PATCH 24/31] nVMX: Correct handling of exception injection

2011-05-16 Thread Nadav Har'El
Similar to the previous patch, but concerning injection of exceptions rather than external interrupts. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c | 26 ++ 1 file changed, 26 insertions(+) --- .before/arch/x86/kvm/vmx.c 2011-05-16

[PATCH 25/31] nVMX: Correct handling of idt vectoring info

2011-05-16 Thread Nadav Har'El
This patch adds correct handling of IDT_VECTORING_INFO_FIELD for the nested case. When a guest exits while delivering an interrupt or exception, we get this information in IDT_VECTORING_INFO_FIELD in the VMCS. When L2 exits to L1, there's nothing we need to do, because L1 will see this field in

[PATCH 26/31] nVMX: Handling of CR0 and CR4 modifying instructions

2011-05-16 Thread Nadav Har'El
When L2 tries to modify CR0 or CR4 (with mov or clts), and modifies a bit which L1 asked to shadow (via CR[04]_GUEST_HOST_MASK), we already do the right thing: we let L1 handle the trap (see nested_vmx_exit_handled_cr() in a previous patch). When L2 modifies bits that L1 doesn't care about, we let

[PATCH 27/31] nVMX: Further fixes for lazy FPU loading

2011-05-16 Thread Nadav Har'El
KVM's Lazy FPU loading means that sometimes L0 needs to set CR0.TS, even if a guest didn't set it. Moreover, L0 must also trap CR0.TS changes and NM exceptions, even if we have a guest hypervisor (L1) who didn't want these traps. And of course, conversely: If L1 wanted to trap these events, we

[PATCH 28/31] nVMX: Additional TSC-offset handling

2011-05-16 Thread Nadav Har'El
In the unlikely case that L1 does not capture MSR_IA32_TSC, L0 needs to emulate this MSR write by L2 by modifying vmcs02.tsc_offset. We also need to set vmcs12.tsc_offset, for this change to survive the next nested entry (see prepare_vmcs02()). Additionally, we also need to modify

[PATCH 29/31] nVMX: Add VMX to list of supported cpuid features

2011-05-16 Thread Nadav Har'El
If the nested module option is enabled, add the VMX CPU feature to the list of CPU features KVM advertises with the KVM_GET_SUPPORTED_CPUID ioctl. Qemu uses this ioctl, and intersects KVM's list with its own list of desired cpu features (depending on the -cpu option given to qemu) to determine

[PATCH 30/31] nVMX: Miscellenous small corrections

2011-05-16 Thread Nadav Har'El
Small corrections of KVM (spelling, etc.) not directly related to nested VMX. Signed-off-by: Nadav Har'El n...@il.ibm.com --- arch/x86/kvm/vmx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- .before/arch/x86/kvm/vmx.c 2011-05-16 22:36:50.0 +0300 +++

[PATCH 31/31] nVMX: Documentation

2011-05-16 Thread Nadav Har'El
This patch includes a brief introduction to the nested vmx feature in the Documentation/kvm directory. The document also includes a copy of the vmcs12 structure, as requested by Avi Kivity. Signed-off-by: Nadav Har'El n...@il.ibm.com --- Documentation/kvm/nested-vmx.txt | 243

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Michael S. Tsirkin
+/* Since we need to keep the order of used_idx as avail_idx, it's possible that + * DMA done not in order in lower device driver for some reason. To prevent + * used_idx out of order, upend_idx is used to track avail_idx order, done_idx + * is used to track used_idx order. Once lower

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: +/* Since we need to keep the order of used_idx as avail_idx, it's possible that + * DMA done not in order in lower device driver for some reason. To prevent + * used_idx out of order, upend_idx is used to track avail_idx order,

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 08:47:33PM +0100, Ben Hutchings wrote: On Mon, 2011-05-16 at 12:38 -0700, Shirley Ma wrote: On Mon, 2011-05-16 at 20:35 +0100, Ben Hutchings wrote: Sorry, bit 31 is taken. You get the job of turning features into a wider bitmap. :) will do it. Bear in mind

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 01:56:54PM -0700, Shirley Ma wrote: On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: +/* Since we need to keep the order of used_idx as avail_idx, it's possible that + * DMA done not in order in lower device driver for some reason. To prevent + *

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 01:56:54PM -0700, Shirley Ma wrote: On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: +/* Since we need to keep the order of used_idx as avail_idx, it's possible that + * DMA done not in order in lower device driver for some reason. To prevent + *

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
On Tue, 2011-05-17 at 00:24 +0300, Michael S. Tsirkin wrote: Very strange, it sounds like a bug, but I can't tell where: in host or in guest. If it's in the guest, we must fix it. If in host, we should only fix it if it makes life simpler for us. Could you try to nail it down pls? Another

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Shirley Ma
Hello Michael, Looks like to use a new flag requires more time/work. I am thinking whether we can just use HIGHDMA flag to enable zero-copy in macvtap to avoid the new flag for now since mavctap uses real NICs as lower device? Thanks Shirley -- To unsubscribe from this list: send the line

Re: [PATCH 06/18] virtio_ring: avail event index interface

2011-05-16 Thread Rusty Russell
On Sun, 15 May 2011 15:47:27 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 01:43:15PM +0930, Rusty Russell wrote: On Wed, 4 May 2011 23:51:19 +0300, Michael S. Tsirkin m...@redhat.com wrote: #define VIRTIO_RING_F_USED_EVENT_IDX 29 +/* The Host publishes

Re: [PATCH 14/18] virtio: add api for delayed callbacks

2011-05-16 Thread Rusty Russell
On Sun, 15 May 2011 15:48:18 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 03:27:33PM +0930, Rusty Russell wrote: On Wed, 4 May 2011 23:52:33 +0300, Michael S. Tsirkin m...@redhat.com wrote: Add an API that tells the other side that callbacks should be

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-16 Thread Rusty Russell
On Sun, 15 May 2011 16:55:41 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 02:03:26PM +0930, Rusty Russell wrote: On Wed, 4 May 2011 23:51:47 +0300, Michael S. Tsirkin m...@redhat.com wrote: Use the new avail_event feature to reduce the number of exits from

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
On Tue, 2011-05-17 at 00:24 +0300, Michael S. Tsirkin wrote: On Mon, May 16, 2011 at 01:56:54PM -0700, Shirley Ma wrote: On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: +/* Since we need to keep the order of used_idx as avail_idx, it's possible that + * DMA done not in

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 09:31:23PM -0700, Shirley Ma wrote: On Tue, 2011-05-17 at 00:24 +0300, Michael S. Tsirkin wrote: On Mon, May 16, 2011 at 01:56:54PM -0700, Shirley Ma wrote: On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: +/* Since we need to keep the order of