[PATCH 1/8][TRIVIAL] Fix typos in arch/x86/kvm/vmx.c

2012-06-28 Thread Guo Chao
Signed-off-by: Guo Chao --- arch/x86/kvm/vmx.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 32eb588..7c40477 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1325,7 +1325,7 @@ static bool update_transition_

[PATCH 2/8][TRIVIAL] Fix typos in arch/x86/kvm/svm.c

2012-06-28 Thread Guo Chao
Signed-off-by: Guo Chao --- arch/x86/kvm/svm.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index f75af40..0d20bdd 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2063,7 +2063,7 @@ static inline bool nested_svm_in

[patch 1/3 v2] vfio: signedness bug in vfio_config_do_rw()

2012-06-28 Thread Dan Carpenter
The "count" variable needs to be signed here because we use it to store negative error codes. Signed-off-by: Dan Carpenter --- v2: Just declare count as signed. diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c index a4f7321..2e00aa8 100644 --- a/drivers/vfio/

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-06-28 Thread Jan Kiszka
On 2012-06-28 03:15, Wen Congyang wrote: > At 06/27/2012 10:39 PM, Jan Kiszka Wrote: >> On 2012-06-27 09:02, Wen Congyang wrote: >>> When the guest is panicked, it will write 0x1 to the port KVM_PV_PORT. >>> So if qemu reads 0x1 from this port, we can do the folloing three >>> things according to t

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Michael S. Tsirkin
On Wed, Jun 27, 2012 at 09:52:52PM -0600, Alex Williamson wrote: > On Thu, 2012-06-28 at 01:28 +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 27, 2012 at 03:28:19PM -0600, Alex Williamson wrote: > > > On Thu, 2012-06-28 at 00:14 +0300, Michael S. Tsirkin wrote: > > > > On Wed, Jun 27, 2012 at 02:

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 09:34:31AM +0300, Gleb Natapov wrote: > On Thu, Jun 28, 2012 at 01:31:29AM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 27, 2012 at 04:04:18PM -0600, Alex Williamson wrote: > > > On Wed, 2012-06-27 at 18:26 +0300, Michael S. Tsirkin wrote: > > > > On Tue, Jun 26, 2012 at

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Gleb Natapov
On Thu, Jun 28, 2012 at 11:34:35AM +0300, Michael S. Tsirkin wrote: > On Thu, Jun 28, 2012 at 09:34:31AM +0300, Gleb Natapov wrote: > > On Thu, Jun 28, 2012 at 01:31:29AM +0300, Michael S. Tsirkin wrote: > > > On Wed, Jun 27, 2012 at 04:04:18PM -0600, Alex Williamson wrote: > > > > On Wed, 2012-06-

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Michael S. Tsirkin
On Wed, Jun 27, 2012 at 04:24:30PM +0200, Cornelia Huck wrote: > On Tue, 26 Jun 2012 23:09:04 -0600 > Alex Williamson wrote: > > > Prune this down to just the struct kvm_irqfd so we can avoid > > changing function definition for every flag or field we use. > > > > Signed-off-by: Alex Williamson

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 11:35:41AM +0300, Gleb Natapov wrote: > On Thu, Jun 28, 2012 at 11:34:35AM +0300, Michael S. Tsirkin wrote: > > On Thu, Jun 28, 2012 at 09:34:31AM +0300, Gleb Natapov wrote: > > > On Thu, Jun 28, 2012 at 01:31:29AM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Jun 27, 201

Re: [PATCH v2 0/6] kvm: level triggered irqfd support

2012-06-28 Thread Michael S. Tsirkin
On Wed, Jun 27, 2012 at 08:33:40AM -0600, Alex Williamson wrote: > On Wed, 2012-06-27 at 12:58 +0300, Michael S. Tsirkin wrote: > > On Tue, Jun 26, 2012 at 11:08:52PM -0600, Alex Williamson wrote: > > > Ok, let's see how this flies. I actually quite like this, so be > > > gentle tearing it apart ;

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-28 Thread Stefan Hajnoczi
On Wed, Jun 27, 2012 at 12:19 PM, Marcelo Tosatti wrote: > On Wed, Jun 27, 2012 at 08:41:49AM +0100, Stefan Hajnoczi wrote: >> On Wed, Jun 27, 2012 at 8:39 AM, Stefan Hajnoczi wrote: >> > On Tue, Jun 26, 2012 at 8:34 PM, Marcelo Tosatti >> > wrote: >> >> On Sat, Jun 23, 2012 at 12:55:49AM +0200

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Gleb Natapov
On Thu, Jun 28, 2012 at 11:41:05AM +0300, Michael S. Tsirkin wrote: > On Thu, Jun 28, 2012 at 11:35:41AM +0300, Gleb Natapov wrote: > > On Thu, Jun 28, 2012 at 11:34:35AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jun 28, 2012 at 09:34:31AM +0300, Gleb Natapov wrote: > > > > On Thu, Jun 28, 201

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 11:46:11AM +0300, Gleb Natapov wrote: > On Thu, Jun 28, 2012 at 11:41:05AM +0300, Michael S. Tsirkin wrote: > > On Thu, Jun 28, 2012 at 11:35:41AM +0300, Gleb Natapov wrote: > > > On Thu, Jun 28, 2012 at 11:34:35AM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Jun 28, 201

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Gleb Natapov
On Thu, Jun 28, 2012 at 11:48:40AM +0300, Michael S. Tsirkin wrote: > On Thu, Jun 28, 2012 at 11:46:11AM +0300, Gleb Natapov wrote: > > On Thu, Jun 28, 2012 at 11:41:05AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jun 28, 2012 at 11:35:41AM +0300, Gleb Natapov wrote: > > > > On Thu, Jun 28, 201

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Cornelia Huck
On Thu, 28 Jun 2012 11:38:57 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jun 27, 2012 at 04:24:30PM +0200, Cornelia Huck wrote: > > On Tue, 26 Jun 2012 23:09:04 -0600 > > Alex Williamson wrote: > > > > > Prune this down to just the struct kvm_irqfd so we can avoid > > > changing function defini

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Peter Lieven
On 27.06.2012 18:54, Jan Kiszka wrote: On 2012-06-27 17:39, Peter Lieven wrote: Hi all, i debugged this further and found out that kvm-kmod-3.0 is working with qemu-kvm-1.0.1 while kvm-kmod-3.3 and kvm-kmod-3.4 are not. What is working as well is kvm-kmod-3.4 with an old userspace (qemu-kvm-0.1

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Jan Kiszka
On 2012-06-28 11:11, Peter Lieven wrote: > On 27.06.2012 18:54, Jan Kiszka wrote: >> On 2012-06-27 17:39, Peter Lieven wrote: >>> Hi all, >>> >>> i debugged this further and found out that kvm-kmod-3.0 is working with >>> qemu-kvm-1.0.1 while kvm-kmod-3.3 and kvm-kmod-3.4 are not. What is >>> worki

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Peter Lieven
On 28.06.2012 11:21, Jan Kiszka wrote: On 2012-06-28 11:11, Peter Lieven wrote: On 27.06.2012 18:54, Jan Kiszka wrote: On 2012-06-27 17:39, Peter Lieven wrote: Hi all, i debugged this further and found out that kvm-kmod-3.0 is working with qemu-kvm-1.0.1 while kvm-kmod-3.3 and kvm-kmod-3.4 ar

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 11:03:16AM +0200, Cornelia Huck wrote: > On Thu, 28 Jun 2012 11:38:57 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Jun 27, 2012 at 04:24:30PM +0200, Cornelia Huck wrote: > > > On Tue, 26 Jun 2012 23:09:04 -0600 > > > Alex Williamson wrote: > > > > > > > Prune this d

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Peter Lieven
does anyone know whats that here in handle_mmio? /* hack: Red Hat 7.1 generates these weird accesses. */ if ((addr > 0xa-4 && addr <= 0xa) && kvm_run->mmio.len == 3) return 0; thanks, peter On 28.06.2012 11:31, Peter Lieven wrote: On 28.06.2012 11:21, Jan Kiszka wrote:

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Jan Kiszka
On 2012-06-28 11:31, Peter Lieven wrote: > On 28.06.2012 11:21, Jan Kiszka wrote: >> On 2012-06-28 11:11, Peter Lieven wrote: >>> On 27.06.2012 18:54, Jan Kiszka wrote: On 2012-06-27 17:39, Peter Lieven wrote: > Hi all, > > i debugged this further and found out that kvm-kmod-3.0 is

Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs

2012-06-28 Thread Yanfei Zhang
于 2012年06月28日 03:22, Greg KH 写道: > On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote: >> This patch export offsets of fields via /sys/devices/cpu/vmcs/. >> Individual offsets are contained in subfiles named by the filed's >> encoding, e.g.: /sys/devices/cpu/vmcs/0800 >> >> Signed-off-by:

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Peter Lieven
On 28.06.2012 11:39, Jan Kiszka wrote: On 2012-06-28 11:31, Peter Lieven wrote: On 28.06.2012 11:21, Jan Kiszka wrote: On 2012-06-28 11:11, Peter Lieven wrote: On 27.06.2012 18:54, Jan Kiszka wrote: On 2012-06-27 17:39, Peter Lieven wrote: Hi all, i debugged this further and found out that

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-06-28 Thread Peter Lieven
On 28.06.2012 11:39, Jan Kiszka wrote: On 2012-06-28 11:31, Peter Lieven wrote: On 28.06.2012 11:21, Jan Kiszka wrote: On 2012-06-28 11:11, Peter Lieven wrote: On 27.06.2012 18:54, Jan Kiszka wrote: On 2012-06-27 17:39, Peter Lieven wrote: Hi all, i debugged this further and found out that

Re: [Openstack-operators] [Openstack] Nova Controller HA issues

2012-06-28 Thread Igor Laskovy
Hi guys, have any updates here? On Sun, Jun 17, 2012 at 12:59 PM, Igor Laskovy wrote: > John, Jason, can you please concretely clarify what this bad things? For > example the worst-case. > > Yoshi, Kei, can you please clarify current status of Kemari. How far it is > from production usage? > > On

Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs

2012-06-28 Thread Greg KH
On Thu, Jun 28, 2012 at 05:54:30PM +0800, Yanfei Zhang wrote: > 于 2012年06月28日 03:22, Greg KH 写道: > > On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote: > >> This patch export offsets of fields via /sys/devices/cpu/vmcs/. > >> Individual offsets are contained in subfiles named by the file

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Cornelia Huck
On Thu, 28 Jun 2012 12:34:43 +0300 "Michael S. Tsirkin" wrote: > On Thu, Jun 28, 2012 at 11:03:16AM +0200, Cornelia Huck wrote: > > How about something like this as parameter for the new ioctl? > > > > struct kvm_irqfd2 { > > __u32 fd; > > __u32 flags; /* for things like deassign */ >

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 02:00:41PM +0200, Cornelia Huck wrote: > On Thu, 28 Jun 2012 12:34:43 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, Jun 28, 2012 at 11:03:16AM +0200, Cornelia Huck wrote: > > > > How about something like this as parameter for the new ioctl? > > > > > > struct kvm_irq

Re: [PATCH v2 3/6] kvm: Sanitize KVM_IRQFD flags

2012-06-28 Thread Avi Kivity
On 06/27/2012 12:21 PM, Michael S. Tsirkin wrote: > On Tue, Jun 26, 2012 at 11:09:32PM -0600, Alex Williamson wrote: >> We only know of one so far. >> >> Signed-off-by: Alex Williamson > > Ugh. So we have a bug: we should have sanitized the fields. > If there's buggy userspace that only set the

Re: [PATCH v2 4/6] kvm: Extend irqfd to support level interrupts

2012-06-28 Thread Avi Kivity
On 06/28/2012 12:19 AM, Alex Williamson wrote: >> > @@ -302,6 +385,7 @@ kvm_irqfd_deassign(struct kvm *kvm, struct kvm_irqfd >> > *args) >> > { >> >struct _irqfd *irqfd, *tmp; >> >struct eventfd_ctx *eventfd; >> > + bool is_level = (args->flags & KVM_IRQFD_FLAG_LEVEL) != 0; >> >> != 0 i

Re: [PATCH v2 6/6] kvm: Level IRQ de-assert for KVM_IRQFD

2012-06-28 Thread Avi Kivity
On 06/27/2012 08:10 AM, Alex Williamson wrote: > This is an alternate level irqfd de-assert mode that's potentially > useful for emulated drivers. It's included here to show how easy it > is to implement with the new level irqfd and eoifd support. It's > possible this mode might also prove intere

qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-06-28 Thread Peter Lieven
Hi, i debugged my initial problem further and found out that the problem happens to be that the main thread is stuck in pause_all_vcpus() on reset or quit commands in the monitor if one cpu is stuck in the do-while loop kvm_cpu_exec. If I modify the condition from while (ret == 0) to while ((

Re: [PATCH v2 5/6] kvm: KVM_EOIFD, an eventfd for EOIs

2012-06-28 Thread Michael S. Tsirkin
On Wed, Jun 27, 2012 at 09:55:44PM -0600, Alex Williamson wrote: > On Wed, 2012-06-27 at 17:51 +0300, Gleb Natapov wrote: > > On Wed, Jun 27, 2012 at 08:29:04AM -0600, Alex Williamson wrote: > > > On Wed, 2012-06-27 at 16:58 +0300, Gleb Natapov wrote: > > > > On Tue, Jun 26, 2012 at 11:10:08PM -060

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-06-28 Thread Jan Kiszka
On 2012-06-28 15:05, Peter Lieven wrote: > Hi, > > i debugged my initial problem further and found out that the problem > happens to be that > the main thread is stuck in pause_all_vcpus() on reset or quit commands > in the monitor > if one cpu is stuck in the do-while loop kvm_cpu_exec. If I modi

Re: [PATCH v2 5/6] kvm: KVM_EOIFD, an eventfd for EOIs

2012-06-28 Thread Gleb Natapov
On Thu, Jun 28, 2012 at 04:11:40PM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 27, 2012 at 09:55:44PM -0600, Alex Williamson wrote: > > On Wed, 2012-06-27 at 17:51 +0300, Gleb Natapov wrote: > > > On Wed, Jun 27, 2012 at 08:29:04AM -0600, Alex Williamson wrote: > > > > On Wed, 2012-06-27 at 16:5

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-28 Thread Anthony Liguori
On 06/26/2012 02:34 PM, Marcelo Tosatti wrote: On Sat, Jun 23, 2012 at 12:55:49AM +0200, Jan Kiszka wrote: Should have declared this [RFC] in the subject and CC'ed kvm... On 2012-06-23 00:45, Jan Kiszka wrote: This sketches a possible path to get rid of the iothread lock on vmexits in KVM mode

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-06-28 Thread Peter Lieven
On 28.06.2012 15:25, Jan Kiszka wrote: On 2012-06-28 15:05, Peter Lieven wrote: Hi, i debugged my initial problem further and found out that the problem happens to be that the main thread is stuck in pause_all_vcpus() on reset or quit commands in the monitor if one cpu is stuck in the do-while

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-28 Thread Avi Kivity
On 06/28/2012 05:10 PM, Anthony Liguori wrote: >> >> 1. read_lock(memmap_lock) >> 2. MemoryRegionSection mrs = lookup(addr) >> 3. qom_ref(mrs.mr->dev) >> 4. read_unlock(memmap_lock) >> >> 5. mutex_lock(dev->lock) >> 6. dispatch(&mrs, addr, data, size) >> 7. mutex_unlock(dev->lock) > > Just

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-06-28 Thread Jan Kiszka
On 2012-06-28 17:02, Peter Lieven wrote: > On 28.06.2012 15:25, Jan Kiszka wrote: >> On 2012-06-28 15:05, Peter Lieven wrote: >>> Hi, >>> >>> i debugged my initial problem further and found out that the problem >>> happens to be that >>> the main thread is stuck in pause_all_vcpus() on reset or qui

Re: Is there a mail-list for answering questions against kvm??

2012-06-28 Thread Ademar de Souza Reis Jr.
On Tue, Jun 26, 2012 at 10:50:36AM +0800, Zhengwang Ruan wrote: > Hello, > > I am freshman to this community, I want to know if there is a > mail-list in which I can ask questions against kvm and people are > willing to answer too? Thanks! :-) > Hi Zhengwang, welcome to KVM. You can try IRC: #

Re: [PATCH v4] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-06-28 Thread Avi Kivity
On 06/14/2012 05:04 AM, Mao, Junjie wrote: > This patch handles PCID/INVPCID for guests. > > Process-context identifiers (PCIDs) are a facility by which a logical > processor > may cache information for multiple linear-address spaces so that the processor > may retain cached information when soft

Re: [PATCH v4] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-06-28 Thread Avi Kivity
On 06/28/2012 06:49 PM, Avi Kivity wrote: > On 06/14/2012 05:04 AM, Mao, Junjie wrote: >> This patch handles PCID/INVPCID for guests. >> >> Process-context identifiers (PCIDs) are a facility by which a logical >> processor >> may cache information for multiple linear-address spaces so that the >

Re: [PATCH] kvm: handle last_boosted_vcpu = 0 case

2012-06-28 Thread Andrew Jones
- Original Message - > In summary, current PV has huge benefit on non-PLE machine. > > On PLE machine, the results become very sensitive to load, type of > workload and SPIN_THRESHOLD. Also PLE interference has significant > effect on them. But still it has slight edge over non PV. > H

Re: [PATCH v2 2/7] memory: Flush coalesced MMIO on selected region access

2012-06-28 Thread Avi Kivity
On 06/27/2012 07:27 PM, Jan Kiszka wrote: > Instead of flushing pending coalesced MMIO requests on every vmexit, > this provides a mechanism to selectively flush when memory regions > related to the coalesced one are accessed. This first of all includes > the coalesced region itself but can also ap

Re: [PATCH v2 0/7] kvm: Get coalesced MMIO flushing out of the hot-path

2012-06-28 Thread Avi Kivity
On 06/27/2012 07:27 PM, Jan Kiszka wrote: > Changes in v2: > - added memory_region_clear_flush_coalesced > - call memory_region_clear_flush_coalesced from >memory_region_clear_coalescing > - wrap all region manipulations via memory_region_transaction_begin/ >commit internally > - flush

Re: [PATCH] kvm: handle last_boosted_vcpu = 0 case

2012-06-28 Thread Raghavendra K T
On 06/28/2012 09:30 PM, Andrew Jones wrote: - Original Message - In summary, current PV has huge benefit on non-PLE machine. On PLE machine, the results become very sensitive to load, type of workload and SPIN_THRESHOLD. Also PLE interference has significant effect on them. But still

Re: [PATCH 4/4][RFC] kvm: eoi_eventfd

2012-06-28 Thread Avi Kivity
On 06/24/2012 06:02 PM, Alex Williamson wrote: > On Sun, 2012-06-24 at 15:56 +0300, Avi Kivity wrote: >> On 06/23/2012 01:16 AM, Alex Williamson wrote: >> > I think we're probably also going to need something like this. >> > When running in non-accelerated qemu, we're going to have to >> > create s

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-06-28 Thread Peter Lieven
On 28.06.2012 17:22, Jan Kiszka wrote: On 2012-06-28 17:02, Peter Lieven wrote: On 28.06.2012 15:25, Jan Kiszka wrote: On 2012-06-28 15:05, Peter Lieven wrote: Hi, i debugged my initial problem further and found out that the problem happens to be that the main thread is stuck in pause_all_vcp

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-06-28 Thread Avi Kivity
On 06/28/2012 07:29 PM, Peter Lieven wrote: >> Yes. A signal is sent, and KVM returns from the guest to userspace on >> pending signals. > is there a description available how this process exactly works? The kernel part is in vcpu_enter_guest(), see the check for signal_pending(). But this hasn'

Re: [RFC PATCH 18/18] x86: request TLB flush to slave CPU using NMI

2012-06-28 Thread Avi Kivity
On 06/28/2012 09:08 AM, Tomoki Sekiyama wrote: > For slave CPUs, it is inapropriate to request TLB flush using IPI. > because the IPI may be sent to a KVM guest when the slave CPU is running > the guest with direct interrupt routing. > > Instead, it registers a TLB flush request in per-cpu bitmask

Re: [RFC PATCH 16/18] KVM: add kvm_arch_vcpu_prevent_run to prevent VM ENTER when NMI is received

2012-06-28 Thread Avi Kivity
On 06/28/2012 09:08 AM, Tomoki Sekiyama wrote: > Since NMI can not be disabled around VM enter, there is a race between > receiving NMI to kick a guest and entering the guests on slave CPUs.If the > NMI is received just before entering VM, after the NMI handler is invoked, > it continues entering t

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Cornelia Huck
On Thu, 28 Jun 2012 15:09:49 +0300 "Michael S. Tsirkin" wrote: > On Thu, Jun 28, 2012 at 02:00:41PM +0200, Cornelia Huck wrote: > > On Thu, 28 Jun 2012 12:34:43 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Jun 28, 2012 at 11:03:16AM +0200, Cornelia Huck wrote: > > > > > > How about

Re: [PATCH v2 5/6] kvm: KVM_EOIFD, an eventfd for EOIs

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 05:08:04PM +0300, Gleb Natapov wrote: > On Thu, Jun 28, 2012 at 04:11:40PM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 27, 2012 at 09:55:44PM -0600, Alex Williamson wrote: > > > On Wed, 2012-06-27 at 17:51 +0300, Gleb Natapov wrote: > > > > On Wed, Jun 27, 2012 at 08:29

Re: [PATCH v2 1/6] kvm: Pass kvm_irqfd to functions

2012-06-28 Thread Michael S. Tsirkin
On Thu, Jun 28, 2012 at 06:51:09PM +0200, Cornelia Huck wrote: > On Thu, 28 Jun 2012 15:09:49 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, Jun 28, 2012 at 02:00:41PM +0200, Cornelia Huck wrote: > > > On Thu, 28 Jun 2012 12:34:43 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Thu,

Re: [RFC PATCH 00/18] KVM: x86: CPU isolation and direct interrupts handling by guests

2012-06-28 Thread Avi Kivity
On 06/28/2012 09:07 AM, Tomoki Sekiyama wrote: > Hello, > > This RFC patch series provides facility to dedicate CPUs to KVM guests > and enable the guests to handle interrupts from passed-through PCI devices > directly (without VM exit and relay by the host). > > With this feature, we can improve

Re: [RFC PATCH 06/18] KVM: Add facility to run guests on slave CPUs

2012-06-28 Thread Avi Kivity
On 06/28/2012 09:07 AM, Tomoki Sekiyama wrote: > Add path to migrate execution of vcpu_enter_guest to a slave CPU when > vcpu->arch.slave_cpu is set. > > After moving to the slave CPU, it goes back to the online CPU when the > guest is exited by reasons that cannot be handled by the slave CPU only

Re: [PATCH 4/4][RFC] kvm: eoi_eventfd

2012-06-28 Thread Alex Williamson
On Thu, 2012-06-28 at 19:27 +0300, Avi Kivity wrote: > On 06/24/2012 06:02 PM, Alex Williamson wrote: > > On Sun, 2012-06-24 at 15:56 +0300, Avi Kivity wrote: > >> On 06/23/2012 01:16 AM, Alex Williamson wrote: > >> > I think we're probably also going to need something like this. > >> > When runnin

Re: [RFC PATCH 00/18] KVM: x86: CPU isolation and direct interrupts handling by guests

2012-06-28 Thread Jan Kiszka
On 2012-06-28 18:58, Avi Kivity wrote: > On 06/28/2012 09:07 AM, Tomoki Sekiyama wrote: >> Hello, >> >> This RFC patch series provides facility to dedicate CPUs to KVM guests >> and enable the guests to handle interrupts from passed-through PCI devices >> directly (without VM exit and relay by the

Re: [RFC PATCH 00/18] KVM: x86: CPU isolation and direct interrupts handling by guests

2012-06-28 Thread Avi Kivity
On 06/28/2012 08:26 PM, Jan Kiszka wrote: >> >> This is both impressive and scary. What is the target scenario here? >> Partitioning? I don't see this working for generic consolidation. >> > > From my POV, partitioning - including hard realtime partitions - would > provide some use cases. But,

Re: [PATCH 5/6] KVM: Separate rmap_pde from kvm_lpage_info->write_count

2012-06-28 Thread Avi Kivity
On 06/28/2012 06:45 AM, Takuya Yoshikawa wrote: > On Thu, 28 Jun 2012 11:12:51 +0800 > Xiao Guangrong wrote: > >> > struct kvm_arch_memory_slot { >> > + unsigned long *rmap_pde[KVM_NR_PAGE_SIZES - 1]; >> >struct kvm_lpage_info *lpage_info[KVM_NR_PAGE_SIZES - 1]; >> > }; >> > >> >> It loo

Re: [PATCH 6/6] KVM: MMU: Avoid handling same rmap_pde in kvm_handle_hva_range()

2012-06-28 Thread Avi Kivity
On 06/28/2012 05:02 AM, Takuya Yoshikawa wrote: > When we invalidate a THP page, we call the handler with the same > rmap_pde argument 512 times in the following loop: > > for each guest page in the range > for each level > unmap using rmap > > This patch avoids these extra handler ca

Re: [PATCH RFC V6 1/5] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2012-06-28 Thread Raghavendra K T
On 04/27/2012 09:23 PM, Gleb Natapov wrote: On Fri, Apr 27, 2012 at 04:15:35PM +0530, Raghavendra K T wrote: On 04/24/2012 03:29 PM, Gleb Natapov wrote: On Mon, Apr 23, 2012 at 03:29:47PM +0530, Raghavendra K T wrote: From: Srivatsa Vaddagiri KVM_HC_KICK_CPU allows the calling vcpu to kick an

Re: [PATCH v2 5/6] kvm: KVM_EOIFD, an eventfd for EOIs

2012-06-28 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 11:10:08PM -0600, Alex Williamson wrote: > diff --git a/Documentation/virtual/kvm/api.txt > b/Documentation/virtual/kvm/api.txt > index b216709..87a2558 100644 > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -1987,6 +1987,30 @@ inter

Re: [KVM][Kemari]: Build error fix

2012-06-28 Thread OHMURA Kei
On 2012/06/28 5:34, Sterling Windmill wrote: Is Kemari still in active development? No, it's not. Currently we have no intention to add new features into Kemari. Thanks, Kei Best regards, Sterling Windmill On Sun, Dec 4, 2011 at 9:45 PM, OHMURA Kei mailto:ohmura@lab.ntt.co.jp>> wrote:

Re: [patch 1/3 v2] vfio: signedness bug in vfio_config_do_rw()

2012-06-28 Thread Alex Williamson
On Thu, 2012-06-28 at 11:07 +0300, Dan Carpenter wrote: > The "count" variable needs to be signed here because we use it to store > negative error codes. > > Signed-off-by: Dan Carpenter > --- > v2: Just declare count as signed. > > diff --git a/drivers/vfio/pci/vfio_pci_config.c > b/drivers/vf

Re: [patch 2/3] vfio: make count unsigned to prevent integer underflow

2012-06-28 Thread Alex Williamson
On Thu, 2012-06-28 at 09:44 +0300, Dan Carpenter wrote: > In vfio_pci_ioctl() there is a potential integer underflow where we > might allocate less data than intended. We check that hdr.count is not > too large, but we don't check whether it is negative: > > drivers/vfio/pci/vfio_pci.c >312

Re: [patch 3/3] vfio: return -EFAULT on failure

2012-06-28 Thread Alex Williamson
On Thu, 2012-06-28 at 09:45 +0300, Dan Carpenter wrote: > This ioctl function is supposed to return a negative error code or zero > on success. copy_to_user() returns zero or the number of bytes > remaining to be copied. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/vfio/vfio.c b/dr

Re: [PATCH v8 04/15] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

2012-06-28 Thread Marcelo Tosatti
On Fri, Jun 15, 2012 at 03:07:24PM -0400, Christoffer Dall wrote: > From: Marc Zyngier > > In order to avoid compilation failure when KVM is not compiled in, > guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER > and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the res

Re: [PATCH v8 00/15] KVM/ARM Implementation

2012-06-28 Thread Marcelo Tosatti
On Fri, Jun 15, 2012 at 03:06:39PM -0400, Christoffer Dall wrote: > The following series implements KVM support for ARM processors, > specifically on the Cortex A-15 platform. Work is done in > collaboration between Columbia University, Virtual Open Systems and > ARM/Linaro. > > The patch series

Re: [PATCH v8 09/15] ARM: KVM: Memory virtualization setup

2012-06-28 Thread Marcelo Tosatti
On Fri, Jun 15, 2012 at 03:08:22PM -0400, Christoffer Dall wrote: > From: Christoffer Dall > > This commit introduces the framework for guest memory management > through the use of 2nd stage translation. Each VM has a pointer > to a level-1 table (the pgd field in struct kvm_arch) which is > used

Re: [PATCH v8 07/15] ARM: KVM: Hypervisor inititalization

2012-06-28 Thread Marcelo Tosatti
On Fri, Jun 15, 2012 at 03:07:59PM -0400, Christoffer Dall wrote: > Sets up the required registers to run code in HYP-mode from the kernel. > > By setting the HVBAR the kernel can execute code in Hyp-mode with > the MMU disabled. The HVBAR initially points to initialization code, > which initializ

Re: [PATCH v8 00/15] KVM/ARM Implementation

2012-06-28 Thread Christoffer Dall
> > Is there public documentation for "hyp-mode" available? > yes, you have to register on the ARM website (http://infocenter.arm.com) but there you can download the ARM v7 architecture reference manual. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to m

Re: [PATCH v8 09/15] ARM: KVM: Memory virtualization setup

2012-06-28 Thread Christoffer Dall
On Thu, Jun 28, 2012 at 6:34 PM, Marcelo Tosatti wrote: > On Fri, Jun 15, 2012 at 03:08:22PM -0400, Christoffer Dall wrote: >> From: Christoffer Dall >> >> This commit introduces the framework for guest memory management >> through the use of 2nd stage translation. Each VM has a pointer >> to a l

Re: [PATCH v8 07/15] ARM: KVM: Hypervisor inititalization

2012-06-28 Thread Christoffer Dall
On Thu, Jun 28, 2012 at 6:35 PM, Marcelo Tosatti wrote: > On Fri, Jun 15, 2012 at 03:07:59PM -0400, Christoffer Dall wrote: >> Sets up the required registers to run code in HYP-mode from the kernel. >> >> By setting the HVBAR the kernel can execute code in Hyp-mode with >> the MMU disabled. The HV

RE: [PATCH] kvm: handle last_boosted_vcpu = 0 case

2012-06-28 Thread Vinod, Chegu
Hello, I am just catching up on this email thread... Perhaps one of you may be able to help answer this query.. preferably along with some data. [BTW, I do understand the basic intent behind PLE in a typical [sweet spot] use case where there is over subscription etc. and the need to optimize

Re: [PATCH 5/6] KVM: Separate rmap_pde from kvm_lpage_info->write_count

2012-06-28 Thread Takuya Yoshikawa
On Thu, 28 Jun 2012 20:39:55 +0300 Avi Kivity wrote: > > Note: write_count: 4 bytes, rmap_pde: 8 bytes. So we are wasting > > extra paddings by packing them into lpage_info. > > The wastage is quite low since it's just 4 bytes per 2MB. Yes. > >> Why not just introduce a function to get the ne

Re: [PATCHv2 1/5] Provide userspace IO exit completion callback.

2012-06-28 Thread Marcelo Tosatti
On Tue, Jun 12, 2012 at 03:01:23PM +0300, Gleb Natapov wrote: > Current code assumes that IO exit was due to instruction emulation > and handles execution back to emulator directly. This patch adds new > userspace IO exit completion callback that can be set by any other code > that caused IO exit t

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-28 Thread Marcelo Tosatti
On Thu, Jun 28, 2012 at 09:10:39AM -0500, Anthony Liguori wrote: > On 06/26/2012 02:34 PM, Marcelo Tosatti wrote: > >On Sat, Jun 23, 2012 at 12:55:49AM +0200, Jan Kiszka wrote: > >>Should have declared this [RFC] in the subject and CC'ed kvm... > >> > >>On 2012-06-23 00:45, Jan Kiszka wrote: > >>>T

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-28 Thread Marcelo Tosatti
On Thu, Jun 28, 2012 at 09:10:39AM -0500, Anthony Liguori wrote: > > > >1. read_lock(memmap_lock) > >2. MemoryRegionSection mrs = lookup(addr) > >3. qom_ref(mrs.mr->dev) > >4. read_unlock(memmap_lock) > > > >5. mutex_lock(dev->lock) > >6. dispatch(&mrs, addr, data, size) > >7. mutex_unlock(d

Re: [PATCH v8 07/15] ARM: KVM: Hypervisor inititalization

2012-06-28 Thread Marcelo Tosatti
On Thu, Jun 28, 2012 at 06:53:43PM -0400, Christoffer Dall wrote: > > should assign per_cpu(kvm_arm_hyp_stack_page, cpu) to NULL. > > > > why? this is run as part of the init code and thus the only way it > could ever run again would be to have the module unloaded in which > case the variable woul

Re: [PATCH 6/6] KVM: MMU: Avoid handling same rmap_pde in kvm_handle_hva_range()

2012-06-28 Thread Takuya Yoshikawa
On Thu, 28 Jun 2012 20:53:47 +0300 Avi Kivity wrote: > > Note: in the new code we could not use trace_kvm_age_page(), so we just > > dropped the point from kvm_handle_hva_range(). > > > > Can't it be pushed to handler()? Yes, but it will be changed to print rmap, not hva and gfn. I will do in

Re: [PATCH v3 1/5] x86: Add helper variables and functions to hold VMCSINFO

2012-06-28 Thread HATAYAMA Daisuke
From: Yanfei Zhang Subject: [PATCH v3 1/5] x86: Add helper variables and functions to hold VMCSINFO Date: Wed, 27 Jun 2012 16:51:58 +0800 > This patch provides a set of variables to hold the VMCSINFO and also > some helper functions to help fill the VMCSINFO. > > Signed-off-by: zhangyanfei > --

Re: [RFC 07/10] KVM: add KVM TMEM host side interface

2012-06-28 Thread Konrad Rzeszutek Wilk
On Wed, Jun 06, 2012 at 01:00:15PM +0200, Sasha Levin wrote: > This is the host side interface that the guests which support KVM TMEM > talk to. > > Signed-off-by: Sasha Levin > --- > arch/x86/kvm/tmem/Kconfig|6 +++ > arch/x86/kvm/tmem/Makefile |2 + > arch/x86/kvm

RE: [PATCH v4] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-06-28 Thread Mao, Junjie
> -Original Message- > From: Avi Kivity [mailto:a...@redhat.com] > Sent: Thursday, June 28, 2012 11:49 PM > To: Mao, Junjie > Cc: 'kvm@vger.kernel.org' > Subject: Re: [PATCH v4] KVM: x86: Implement PCID/INVPCID for guests with > EPT > > On 06/14/2012 05:04 AM, Mao, Junjie wrote: > > This p

Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs

2012-06-28 Thread Greg KH
On Thu, Jun 28, 2012 at 04:37:38AM -0700, Greg KH wrote: > On Thu, Jun 28, 2012 at 05:54:30PM +0800, Yanfei Zhang wrote: > > 于 2012年06月28日 03:22, Greg KH 写道: > > > On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote: > > >> This patch export offsets of fields via /sys/devices/cpu/vmcs/. >