On Tue, May 21, 2013 at 03:26:18PM -0700, Nakajima, Jun wrote:
On Tue, May 21, 2013 at 4:05 AM, Xiao Guangrong
xiaoguangr...@linux.vnet.ibm.com wrote:
On 05/21/2013 05:01 PM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 04:30:13PM +0800, Xiao Guangrong wrote:
@@ -772,6 +810,7 @@ static
On Tue, May 21, 2013 at 10:33:30PM -0300, Marcelo Tosatti wrote:
On Tue, May 21, 2013 at 11:39:03AM +0300, Gleb Natapov wrote:
Any pages with stale information will be zapped by kvm_mmu_zap_all().
When that happens, page faults will take place which will automatically
use the new
- Original Message -
From: Marcelo Tosatti mtosa...@redhat.com
To: Vadim Rozenfeld vroze...@redhat.com
Cc: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net
Sent: Wednesday, May 22, 2013 10:50:46 AM
Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC
On Sun, May 19,
- Original Message -
From: Marcelo Tosatti mtosa...@redhat.com
To: Vadim Rozenfeld vroze...@redhat.com
Cc: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net
Sent: Wednesday, May 22, 2013 10:46:14 AM
Subject: Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter
On Sun,
On Tue, May 21, 2013 at 05:09:47PM +0100, Paolo Bonzini wrote:
- Messaggio originale -
Da: Catalin Marinas catalin.mari...@arm.com
A: Marc Zyngier marc.zyng...@arm.com
Cc: linux-arm-ker...@lists.infradead.org, kvm...@lists.cs.columbia.edu,
kvm@vger.kernel.org, Will Deacon
Il 22/05/2013 10:42, Catalin Marinas ha scritto:
On Tue, May 21, 2013 at 05:09:47PM +0100, Paolo Bonzini wrote:
- Messaggio originale -
Da: Catalin Marinas catalin.mari...@arm.com
A: Marc Zyngier marc.zyng...@arm.com
Cc: linux-arm-ker...@lists.infradead.org,
On 05/22/2013 02:34 PM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 10:33:30PM -0300, Marcelo Tosatti wrote:
On Tue, May 21, 2013 at 11:39:03AM +0300, Gleb Natapov wrote:
Any pages with stale information will be zapped by kvm_mmu_zap_all().
When that happens, page faults will take place which
On Wed, May 22, 2013 at 04:46:04PM +0800, Xiao Guangrong wrote:
On 05/22/2013 02:34 PM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 10:33:30PM -0300, Marcelo Tosatti wrote:
On Tue, May 21, 2013 at 11:39:03AM +0300, Gleb Natapov wrote:
Any pages with stale information will be zapped by
On Thursday 16 May 2013, Michael S. Tsirkin wrote:
This improves the might_fault annotations used
by uaccess routines:
1. The only reason uaccess routines might sleep
is if they fault. Make this explicit for
all architectures.
2. Accesses (e.g through socket ops) to kernel memory
On Wed, May 22, 2013 at 12:57:35PM +0800, Amos Kong wrote:
I try to hotplug 28 * 8 multiple-function devices to guest with
old host kernel, ioeventfds in host kernel will be exhausted, then
qemu fails to allocate ioeventfds for blk/nic devices.
It's better to add detail error here.
On 05/22/2013 04:54 PM, Gleb Natapov wrote:
On Wed, May 22, 2013 at 04:46:04PM +0800, Xiao Guangrong wrote:
On 05/22/2013 02:34 PM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 10:33:30PM -0300, Marcelo Tosatti wrote:
On Tue, May 21, 2013 at 11:39:03AM +0300, Gleb Natapov wrote:
Any pages with
On Tue, May 21, 2013 at 01:57:34PM +0200, Peter Zijlstra wrote:
On Sun, May 19, 2013 at 12:35:26PM +0300, Michael S. Tsirkin wrote:
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -198,7 +198,6 @@ void might_fault(void);
#else
static inline void
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
On Thursday 16 May 2013, Michael S. Tsirkin wrote:
This improves the might_fault annotations used
by uaccess routines:
1. The only reason uaccess routines might sleep
is if they fault. Make this explicit for
all
On 2013/5/20 15:43, Michael S. Tsirkin wrote:
On Mon, May 20, 2013 at 02:11:19AM +, Qinchuanyu wrote:
Vhost thread provide both tx and rx ability for virtio-net.
In the forwarding scenarios, tx and rx share the vhost thread, and throughput
is limited by single thread.
So I did a patch for
On 05/22/2013 05:59 PM, Zang Hongyong wrote:
On 2013/5/20 15:43, Michael S. Tsirkin wrote:
On Mon, May 20, 2013 at 02:11:19AM +, Qinchuanyu wrote:
Vhost thread provide both tx and rx ability for virtio-net.
In the forwarding scenarios, tx and rx share the vhost thread, and
throughput is
On Wed, May 22, 2013 at 05:59:03PM +0800, Zang Hongyong wrote:
On 2013/5/20 15:43, Michael S. Tsirkin wrote:
On Mon, May 20, 2013 at 02:11:19AM +, Qinchuanyu wrote:
Vhost thread provide both tx and rx ability for virtio-net.
In the forwarding scenarios, tx and rx share the vhost thread,
Heya,
So, Gleb suggested (thank you) to try kvm unit tests in L1, here's some
(incomprehensive) detail. I also ran a defconfig in a 20 loop iteration
(in L2) where subsequent runs after the first one are from page cache.
1. A couple of unit tests w/ 64 bit compiled:
On Wed, May 22, 2013 at 12:47:09PM +0300, Michael S. Tsirkin wrote:
+static inline bool __can_fault(void)
+{
+ /*
+* Some code (nfs/sunrpc) uses socket ops on kernel memory while
+* holding the mmap_sem, this is safe because kernel memory doesn't
+* get paged out,
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
Calling might_fault() for every __get_user/__put_user is rather expensive
because it turns what should be a single instruction (plus fixup) into an
external function call.
We could hide it all behind CONFIG_DEBUG_ATOMIC_SLEEP just
On Wed, May 22, 2013 at 12:19:16PM +0200, Peter Zijlstra wrote:
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
Calling might_fault() for every __get_user/__put_user is rather expensive
because it turns what should be a single instruction (plus fixup) into an
external
On Wed, May 22, 2013 at 02:07:29PM +0300, Michael S. Tsirkin wrote:
On Wed, May 22, 2013 at 12:19:16PM +0200, Peter Zijlstra wrote:
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
Calling might_fault() for every __get_user/__put_user is rather expensive
because it turns
According to include/uapi/linux/kvm_para.h architectures should define
kvm_para_available, so add an implementation to asm-generic/kvm_para.h
which just returns false.
Signed-off-by: James Hogan james.ho...@imgtec.com
Cc: Marcelo Tosatti mtosa...@redhat.com
Cc: Gleb Natapov g...@redhat.com
Cc:
On Tue, May 21, 2013 at 01:54:49PM -0700, David Daney wrote:
From: David Daney david.da...@cavium.com
The initial patch set implementing MIPS KVM does not handle 64-bit
guests or use of the FPU. This patch set corrects these ABI issues,
and does some very minor clean up.
Sanjay, is this
On Wed, May 22, 2013 at 05:41:10PM +0800, Xiao Guangrong wrote:
On 05/22/2013 04:54 PM, Gleb Natapov wrote:
On Wed, May 22, 2013 at 04:46:04PM +0800, Xiao Guangrong wrote:
On 05/22/2013 02:34 PM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 10:33:30PM -0300, Marcelo Tosatti wrote:
On Tue,
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
Given the most commonly used functions and a couple of architectures
I'm familiar with, these are the ones that currently call might_fault()
x86-32 x86-64 arm arm64 powerpc s390generic
On Wed, May 22, 2013 at 11:32:27AM +0200, Stefan Hajnoczi wrote:
On Wed, May 22, 2013 at 12:57:35PM +0800, Amos Kong wrote:
I try to hotplug 28 * 8 multiple-function devices to guest with
old host kernel, ioeventfds in host kernel will be exhausted, then
qemu fails to allocate ioeventfds
On Thursday 16 May 2013, Michael S. Tsirkin wrote:
@@ -178,7 +178,7 @@ do {
\
long __pu_err; \
__typeof__(*(ptr)) __user *__pu_addr = (ptr); \
if
On Wednesday 22 May 2013, Russell King - ARM Linux wrote:
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
Given the most commonly used functions and a couple of architectures
I'm familiar with, these are the ones that currently call might_fault()
On Wed, May 22, 2013 at 03:59:01PM +0200, Arnd Bergmann wrote:
On Thursday 16 May 2013, Michael S. Tsirkin wrote:
@@ -178,7 +178,7 @@ do {
\
long __pu_err; \
On Wed, May 22, 2013 at 04:04:48PM +0200, Arnd Bergmann wrote:
On Wednesday 22 May 2013, Russell King - ARM Linux wrote:
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote:
Given the most commonly used functions and a couple of architectures
I'm familiar with, these are the
On Wed, May 22, 2013 at 06:38:47AM +0300, Gleb Natapov wrote:
On Wed, May 22, 2013 at 12:32:57AM -0300, Marcelo Tosatti wrote:
On Wed, May 22, 2013 at 06:28:47AM +0300, Gleb Natapov wrote
+ case HV_X64_MSR_TIME_REF_COUNT:
r = true;
break;
On Wed, May 22, 2013 at 09:34:13AM +0300, Gleb Natapov wrote:
On Tue, May 21, 2013 at 10:33:30PM -0300, Marcelo Tosatti wrote:
On Tue, May 21, 2013 at 11:39:03AM +0300, Gleb Natapov wrote:
Any pages with stale information will be zapped by kvm_mmu_zap_all().
When that happens, page
On 05/22/2013 09:17 PM, Gleb Natapov wrote:
On Wed, May 22, 2013 at 05:41:10PM +0800, Xiao Guangrong wrote:
On 05/22/2013 04:54 PM, Gleb Natapov wrote:
On Wed, May 22, 2013 at 04:46:04PM +0800, Xiao Guangrong wrote:
On 05/22/2013 02:34 PM, Gleb Natapov wrote:
On Tue, May 21, 2013 at
On Wed, May 22, 2013 at 11:25:13PM +0800, Xiao Guangrong wrote:
On 05/22/2013 09:17 PM, Gleb Natapov wrote:
On Wed, May 22, 2013 at 05:41:10PM +0800, Xiao Guangrong wrote:
On 05/22/2013 04:54 PM, Gleb Natapov wrote:
On Wed, May 22, 2013 at 04:46:04PM +0800, Xiao Guangrong wrote:
On
On May 22, 2013, at 5:54 AM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 01:54:49PM -0700, David Daney wrote:
From: David Daney david.da...@cavium.com
The initial patch set implementing MIPS KVM does not handle 64-bit
guests or use of the FPU. This patch set corrects these ABI issues,
On May 21, 2013, at 1:54 PM, David Daney wrote:
From: David Daney david.da...@cavium.com
Because not all 256 CP0 registers are ever implemented, we need a
different method of manipulating them. Use the
KVM_SET_ONE_REG/KVM_GET_ONE_REG mechanism.
Code related to implementing
On 05/22/2013 10:44 AM, Sanjay Lal wrote:
On May 21, 2013, at 1:54 PM, David Daney wrote:
From: David Daney david.da...@cavium.com
Because not all 256 CP0 registers are ever implemented, we need a
different method of manipulating them. Use the
KVM_SET_ONE_REG/KVM_GET_ONE_REG mechanism.
On Sun, Apr 28, 2013 at 11:24:35AM +0100, James Hogan wrote:
On 27 April 2013 19:20, Geert Uytterhoeven ge...@linux-m68k.org wrote:
As of commit 787dcbe6984b3638e94f60d807dcb51bb8a07211 (MIPS: Export
symbols used by KVM/MIPS module), min_low_pfn is already exported by
the generic
From: David Daney david.da...@cavium.com
The initial patch set implementing MIPS KVM does not handle 64-bit
guests or use of the FPU. This patch set corrects these ABI issues,
and does some very minor clean up.
Changes from v4: No code change, just keep more of the code in
From: David Daney david.da...@cavium.com
All registers are 64-bits wide, 32-bit guests use the least
significant portion of the register storage fields.
Signed-off-by: David Daney david.da...@cavium.com
---
arch/mips/include/asm/kvm.h | 16 +++-
1 file changed, 11 insertions(+), 5
From: David Daney david.da...@cavium.com
Define a non-empty struct kvm_fpu.
Signed-off-by: David Daney david.da...@cavium.com
---
arch/mips/include/asm/kvm.h | 29 +
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/arch/mips/include/asm/kvm.h
From: David Daney david.da...@cavium.com
The Linux Way is to return -ENOIOCTLCMD to the vfs when an
unimplemented ioctl is requested. Do this in kvm_mips instead of a
random mixture of -ENOTSUPP and -EINVAL.
Signed-off-by: David Daney david.da...@cavium.com
---
arch/mips/kvm/kvm_mips.c | 18
From: David Daney david.da...@cavium.com
Also we cannot set special zero register, so force it to zero.
Signed-off-by: David Daney david.da...@cavium.com
---
arch/mips/kvm/kvm_mips.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/kvm/kvm_mips.c
From: David Daney david.da...@cavium.com
Because not all 256 CP0 registers are ever implemented, we need a
different method of manipulating them. Use the
KVM_SET_ONE_REG/KVM_GET_ONE_REG mechanism.
Now unused code and definitions are removed.
Signed-off-by: David Daney david.da...@cavium.com
From: David Daney david.da...@cavium.com
Signed-off-by: David Daney david.da...@cavium.com
---
arch/mips/include/asm/kvm.h | 3 ++-
arch/mips/kvm/kvm_mips.c| 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h
index
On May 22, 2013, at 11:43 AM, David Daney wrote:
From: David Daney david.da...@cavium.com
The initial patch set implementing MIPS KVM does not handle 64-bit
guests or use of the FPU. This patch set corrects these ABI issues,
and does some very minor clean up.
Changes from v4: No code
Zap at lease 10 pages before releasing mmu-lock to reduce the overload
caused by requiring lock
After the patch, kvm_zap_obsolete_pages can forward progress anyway,
so update the comments
[ It improves kernel building 0.6% ~ 1% ]
Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com
Replace kvm_mmu_zap_all by kvm_mmu_invalidate_zap_all_pages
Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com
---
arch/x86/kvm/mmu.c | 15 ---
arch/x86/kvm/x86.c |4 ++--
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/arch/x86/kvm/mmu.c
It is good for debug and development
Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com
---
arch/x86/kvm/mmu.c |1 +
arch/x86/kvm/mmutrace.h | 20
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
From: Gleb Natapov g...@redhat.com
Quote Gleb's mail:
| why don't we check for sp-role.invalid in
| kvm_mmu_prepare_zap_page before calling kvm_reload_remote_mmus()?
and
| Actually we can add check for is_obsolete_sp() there too since
| kvm_mmu_invalidate_all_pages() already calls
kvm_zap_obsolete_pages uses lock-break technique to zap pages,
it will flush tlb every time when it does lock-break
We can reload mmu on all vcpus after updating the generation
number so that the obsolete pages are not used on any vcpus,
after that we do not need to flush tlb when obsolete pages
The obsolete page will be zapped soon, do not resue it to
reduce future page fault
Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com
---
arch/x86/kvm/mmu.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index
Changlog:
V7:
1): separate some optimization into two patches which do not reuse
the obsolete pages and collapse tlb flushes, suggested by Marcelo.
2): make the patch based on Gleb's diff change which reduce
KVM_REQ_MMU_RELOAD when root page is being zapped.
3): remove calling
Quote Gleb's mail:
| Back then kvm-lock protected memslot access so code like:
|
| mutex_lock(vcpu-kvm-lock);
| kvm_mmu_zap_all(vcpu-kvm);
| mutex_unlock(vcpu-kvm-lock);
|
| which is what 7aa81cc0 does was enough to guaranty that no vcpu will
| run while code is patched. This is no longer the
It is only used to zap the obsolete page. Since the obsolete page
will not be used, we need not spend time to find its unsync children
out. Also, we delete the page from shadow page cache so that the page
is completely isolated after call this function.
The later patch will use it to collapse tlb
Show sp-mmu_valid_gen
Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com
---
arch/x86/kvm/mmutrace.h | 22 --
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h
index b8f6172..697f466 100644
---
The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to
walk and zap all shadow pages one by one, also it need to zap all guest
page's rmap and all shadow page's parent spte list. Particularly, things
become worse if guest uses more memory or vcpus. It is not good for
scalability
It is the responsibility of kvm_mmu_zap_all that keeps the
consistent of mmu and tlbs. And it is also unnecessary after
zap all mmio sptes since no mmio spte exists on root shadow
page and it can not be cached into tlb
Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com
---
On Thu, May 16, 2013 at 08:40:41PM +0200, Peter Zijlstra wrote:
On Thu, May 16, 2013 at 02:16:10PM +0300, Michael S. Tsirkin wrote:
There are several ways to make sure might_fault
calling function does not sleep.
One is to use it on kernel or otherwise locked memory - apparently
On Tue, May 21, 2013 at 01:57:34PM +0200, Peter Zijlstra wrote:
On Sun, May 19, 2013 at 12:35:26PM +0300, Michael S. Tsirkin wrote:
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -198,7 +198,6 @@ void might_fault(void);
#else
static inline void
The idea is that the kernel can be much more careful fixing up
uaccess exceptions -- page faults on user addresses are the only
legitimate reason for a uaccess instruction to fault.
Signed-off-by: Andy Lutomirski l...@amacapital.net
---
I'm not 100% sure what's happening in the KVM code. Can
On 05/20/2013 10:06:46 PM, Alexey Kardashevskiy wrote:
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 8465c2a..da6bf61 100644
--- a/arch/powerpc/kvm/powerpc.c
@@ -396,6 +396,7 @@ int kvm_dev_ioctl_check_extension(long ext)
+++ b/arch/powerpc/kvm/powerpc.c
On Wed, May 22, 2013 at 03:22:55AM -0400, Vadim Rozenfeld wrote:
- Original Message -
From: Marcelo Tosatti mtosa...@redhat.com
To: Vadim Rozenfeld vroze...@redhat.com
Cc: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net
Sent: Wednesday, May 22, 2013 10:50:46 AM
Subject: Re:
Il 22/05/2013 09:32, Vadim Rozenfeld ha scritto:
@@ -1827,6 +1829,29 @@ static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu,
u32 msr, u64 data)
if (__copy_to_user((void __user *)addr, instructions, 4))
return 1;
kvm-arch.hv_hypercall = data;
+
mmap is used in qemu_vmalloc function instead of qemu_memalign(commit
7dda5dc8), so it should change qemu_vfree to munmap to fix a unmatched
issue.
This issue appears when a PCI device is being assigned to KVM guest,
failure to read PCI rom file will bring RAM free, then the incorrect
qemu_vfree
Jason Wang jasow...@redhat.com writes:
On 05/22/2013 05:59 PM, Zang Hongyong wrote:
On 2013/5/20 15:43, Michael S. Tsirkin wrote:
On Mon, May 20, 2013 at 02:11:19AM +, Qinchuanyu wrote:
Yes, I don't think we want to create threads even more aggressively
in all cases. I'm worried about
On Thu, May 23, 2013 at 03:55:58AM +0800, Xiao Guangrong wrote:
It is only used to zap the obsolete page. Since the obsolete page
will not be used, we need not spend time to find its unsync children
out. Also, we delete the page from shadow page cache so that the page
is completely isolated
On 05/20/2013 10:06:46 PM, Alexey Kardashevskiy wrote:
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 8465c2a..da6bf61 100644
--- a/arch/powerpc/kvm/powerpc.c
@@ -396,6 +396,7 @@ int kvm_dev_ioctl_check_extension(long ext)
+++ b/arch/powerpc/kvm/powerpc.c
68 matches
Mail list logo