Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Avi Kivity
On 07/13/2011 09:45 AM, Pekka Enberg wrote: > > OK, what's the simplest thing we can do here to keep Avi happy and get > the functionality of Sasha's original patch that helps us avoid guest > exits for serial console? I agree with Avi that we don't want > fragmented ABI but it seems to me th

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Pekka Enberg
On Sun, Jul 10, 2011 at 8:34 AM, Sasha Levin wrote: > After working on that solution a bit I saw it's adding a lot of code and > complexity for this small issue, and I'm now thinking we may be better > off with just handling reads twice in case of a signal just between > socket_write() and socket_

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Pekka Enberg
On Wed, Jul 13, 2011 at 10:07 AM, Avi Kivity wrote: > - the writes are such high frequency that we gain something from the > queueing is happens when we thread work.  That's where the gain for serial > console can come from - though it would be better to just use virtio-serial > instead. We'd lik

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Pekka Enberg
On Wed, Jul 13, 2011 at 10:51 AM, Pekka Enberg wrote: > On Sun, Jul 10, 2011 at 8:34 AM, Sasha Levin wrote: >> After working on that solution a bit I saw it's adding a lot of code and >> complexity for this small issue, and I'm now thinking we may be better >> off with just handling reads twice i

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Sasha Levin
On Wed, 2011-07-13 at 13:04 +0300, Pekka Enberg wrote: > On Wed, Jul 13, 2011 at 10:51 AM, Pekka Enberg wrote: > > On Sun, Jul 10, 2011 at 8:34 AM, Sasha Levin > > wrote: > >> After working on that solution a bit I saw it's adding a lot of code and > >> complexity for this small issue, and I'm n

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Pekka Enberg
On Wed, Jul 13, 2011 at 1:26 PM, Sasha Levin wrote: > The problem is that if we received a signal during the read notification > the write and before receiving the read, we have to go back to > userspace. > > This means that userspace will see same read request twice (once in the > socket and once

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Pekka Enberg
On Wed, Jul 13, 2011 at 1:56 PM, Pekka Enberg wrote: > On Wed, Jul 13, 2011 at 1:26 PM, Sasha Levin wrote: >> The problem is that if we received a signal during the read notification >> the write and before receiving the read, we have to go back to >> userspace. >> >> This means that userspace wi

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Avi Kivity
On 07/13/2011 11:02 AM, Pekka Enberg wrote: On Wed, Jul 13, 2011 at 10:07 AM, Avi Kivity wrote: > - the writes are such high frequency that we gain something from the > queueing is happens when we thread work. That's where the gain for serial > console can come from - though it would be bett

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Pekka Enberg
On Wed, Jul 13, 2011 at 3:57 PM, Avi Kivity wrote: >> We'd like to keep 8250 emulation because it's the most robust method >> for getting data out of the kernel when there's problems. It's also >> compatible with earlyprintk and such. > > What do you hope to gain from the optimization? 100ms less

Re: kvm upstream build error..

2011-07-13 Thread Avi Kivity
On 07/13/2011 09:22 AM, Tian, Kevin wrote: it works in my side, due to config difference. It is caused by recent steal time feature. int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) case MSR_KVM_STEAL_TIME: if (unlikely(!sched_info_on()))

Re: [PATCH] KVM: x86: Apply required parentheses in __check_direct_spte_mmio_pf

2011-07-13 Thread Avi Kivity
On 07/12/2011 11:00 PM, Jan Kiszka wrote: From: Jan Kiszka Comparison takes precedence over bitwise&, but the latter needs to be evaluated first here. Thanks, applied. Avi, how's your 32-bit buildbot? Seems to be working perfectly. -- error compiling committee.c: too many arguments to fu

Re: [PATCH] x86: Raise the hard VCPU count limit

2011-07-13 Thread Avi Kivity
On 07/09/2011 03:25 PM, Sasha Levin wrote: The patch raises the hard limit of VCPU count to 1024. This will allow developers to easily work on scalability and will allow users to test high VCPU setups easily without patching the kernel. To prevent possible issues with current setups, KVM_CAP_NR

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-13 Thread Avi Kivity
On 07/13/2011 04:00 PM, Pekka Enberg wrote: On Wed, Jul 13, 2011 at 3:57 PM, Avi Kivity wrote: >> We'd like to keep 8250 emulation because it's the most robust method >> for getting data out of the kernel when there's problems. It's also >> compatible with earlyprintk and such. > > What do y

[PATCH 3/7] KVM: SVM: Reorder nested_svm_vmrun

2011-07-13 Thread Joerg Roedel
From: Joerg Roedel Reorder the function a little bit to move interrupt related code together and the tlb-flush from the middle of the function towards the end. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 31 --- 1 files changed, 16 insertions(+), 15 delet

[PATCH 1/7] KVM: SVM: Keep seperate pointer to host-vmcb

2011-07-13 Thread Joerg Roedel
From: Joerg Roedel This patch introduces a new pointer which always points to the VMCB used for running the L1 guest. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 4

[PATCH 4/7] KVM: SVM: Use seperate VMCB for L2 guests

2011-07-13 Thread Joerg Roedel
From: Joerg Roedel Move torwards emulation of VMCB-clean-bits by using a seperate VMCB when running L2 guests. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 43 --- 1 files changed, 40 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/svm

[PATCH 7/7] KVM: SVM: Don't change host intercepts in vmrun emulation

2011-07-13 Thread Joerg Roedel
Rather than changing the host intercepts in nested_svm_vmrun, mask the intercepts we only want to see from the guest out in recalc_intercepts. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 17 ++--- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm

[PATCH 5/7] KVM: SVM: Remove nested.hsave state

2011-07-13 Thread Joerg Roedel
From: Joerg Roedel All state is keept in svm->host_vmcb so the hsave is not necessary anymore, so remote it. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 151 ++-- 1 files changed, 41 insertions(+), 110 deletions(-) diff --git a/arch/x8

[PATCH 0/7] Implement Shadow VMCB for Nested SVM

2011-07-13 Thread Joerg Roedel
Hi Avi, Marcelo, here is a patch-set that implements a shadow-vmcb for nested SVM. The shadow-vmcb is always used when the L2-guest is invoked. This saves some memory copys in the nested vmrun and vmexit paths because the contents of the host-vmcb do not need to be saved/restored anymore. This pa

[PATCH 2/7] KVM: SVM: Use host_vmcb_pa for vmload and vmsave

2011-07-13 Thread Joerg Roedel
This saves copying over the vmload/vmsave switched part from the host to the guest vmcb later. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 3d5990f..dc703ac 100644 -

[PATCH 6/7] KVM: SVM: Rework hflags handling

2011-07-13 Thread Joerg Roedel
From: Joerg Roedel This patch moves the unsetting of the hflags used for nesting into the #vmexit path instead of doing everything in the vmrun path. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/arch

RE: [PATCH v5 6/9] add jump labels for ia64 paravirt

2011-07-13 Thread Luck, Tony
The paravirt/xen bits in ia64 are already in bit-rot. I have this build error in upstream building the arch/ia64/configs/xen_domu_defconfig (even before applying your latest patch): drivers/xen/grant-table.c: In function 'gnttab_map_refs': drivers/xen/grant-table.c:491: error: implicit declaratio

Re: [PATCH] x86: Raise the hard VCPU count limit

2011-07-13 Thread Sasha Levin
On Wed, 2011-07-13 at 16:30 +0300, Avi Kivity wrote: > On 07/09/2011 03:25 PM, Sasha Levin wrote: > > The patch raises the hard limit of VCPU count to 1024. > > > > This will allow developers to easily work on scalability > > and will allow users to test high VCPU setups easily without > > patching

[RFC] New thread for the VM migration

2011-07-13 Thread Umesh Deshpande
Following patch is implemented to deal with the VCPU and iothread starvation during the migration of a guest. Currently iothread is responsible for performing the migration. It holds the qemu_mutex during the migration and doesn't allow VCPU to enter the qemu mode and delays its return to the gu