From: Gleb Natapov <gleb@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: mtosatti@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2 00/10] kvm: memory slot cleanups, fix, and increase
Date: Wed, 12 Dec 2012 16:13:58 +0200 [thread overview]
Message-ID: <20121212141358.GR11016@redhat.com> (raw)
In-Reply-To: <20121210171417.10461.20079.stgit@bling.home>
On Mon, Dec 10, 2012 at 10:32:39AM -0700, Alex Williamson wrote:
> v2: Update 02/10 to not check userspace_addr when slot is removed.
> Yoshikawa-san withdrew objection to increase slot_bitmap prior
> to his series to remove slot_bitmap.
>
> This series does away with any kind of complicated resizing of the
> slot array and simply does a one time increase. I do compact struct
> kvm_memory_slot a bit to take better advantage of the space we are
> using. This reduces each slot from 64 bytes (x86_64) to 56 bytes.
> By enforcing the API around valid operations for an unused slot and
> fields that can be modified runtime, I found and was able to fix a
> bug in iommu mapping for slots. The renames enabled me to find the
> previously posted bug fix for catching slot overlaps.
>
> As mentioned in the series, the primary motivation for increasing
> memory slots is assigned devices. With this, I've been able to
> assign 30 devices to a single VM and could have gone further, but
> ran out of SRIOV VFs. Typical devices use anywhere from 2-4 slots
> and max out at 8 slots. 125 user slots (3 private slots) allows
> us to support between 28 and 56 typical devices per VM.
>
> Tested on x86_64, compiled on ia64, powerpc, and s390.
>
> Thanks,
> Alex
>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
> ---
>
> Alex Williamson (10):
> kvm: Restrict non-existing slot state transitions
> kvm: Check userspace_addr when modifying a memory slot
> kvm: Fix iommu map/unmap to handle memory slot moves
> kvm: Minor memory slot optimization
> kvm: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS
> kvm: Make KVM_PRIVATE_MEM_SLOTS optional
> kvm: struct kvm_memory_slot.user_alloc -> bool
> kvm: struct kvm_memory_slot.flags -> u32
> kvm: struct kvm_memory_slot.id -> short
> kvm: Increase user memory slots on x86 to 125
>
>
> arch/ia64/include/asm/kvm_host.h | 4 --
> arch/ia64/kvm/kvm-ia64.c | 8 ++--
> arch/powerpc/include/asm/kvm_host.h | 6 +--
> arch/powerpc/kvm/book3s_hv.c | 2 -
> arch/powerpc/kvm/powerpc.c | 4 +-
> arch/s390/include/asm/kvm_host.h | 4 --
> arch/s390/kvm/kvm-s390.c | 4 +-
> arch/x86/include/asm/kvm_host.h | 8 ++--
> arch/x86/include/asm/vmx.h | 6 +--
> arch/x86/kvm/vmx.c | 6 +--
> arch/x86/kvm/x86.c | 10 ++---
> include/linux/kvm_host.h | 24 +++++++-----
> virt/kvm/kvm_main.c | 72 +++++++++++++++++++++++------------
> 13 files changed, 90 insertions(+), 68 deletions(-)
--
Gleb.
next prev parent reply other threads:[~2012-12-12 14:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 17:32 [PATCH v2 00/10] kvm: memory slot cleanups, fix, and increase Alex Williamson
2012-12-10 17:32 ` [PATCH v2 01/10] kvm: Restrict non-existing slot state transitions Alex Williamson
2012-12-12 1:29 ` Marcelo Tosatti
2012-12-12 1:39 ` Marcelo Tosatti
2012-12-12 4:30 ` Alex Williamson
2012-12-10 17:32 ` [PATCH v2 02/10] kvm: Check userspace_addr when modifying a memory slot Alex Williamson
2012-12-10 17:32 ` [PATCH v2 03/10] kvm: Fix iommu map/unmap to handle memory slot moves Alex Williamson
2012-12-10 17:33 ` [PATCH v2 04/10] kvm: Minor memory slot optimization Alex Williamson
2012-12-10 17:33 ` [PATCH v2 05/10] kvm: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS Alex Williamson
2012-12-10 17:33 ` [PATCH v2 06/10] kvm: Make KVM_PRIVATE_MEM_SLOTS optional Alex Williamson
2012-12-10 17:33 ` [PATCH v2 07/10] kvm: struct kvm_memory_slot.user_alloc -> bool Alex Williamson
2012-12-10 17:33 ` [PATCH v2 08/10] kvm: struct kvm_memory_slot.flags -> u32 Alex Williamson
2012-12-10 17:33 ` [PATCH v2 09/10] kvm: struct kvm_memory_slot.id -> short Alex Williamson
2012-12-10 17:33 ` [PATCH v2 10/10] kvm: Increase user memory slots on x86 to 125 Alex Williamson
2012-12-12 2:11 ` [PATCH v2 00/10] kvm: memory slot cleanups, fix, and increase Marcelo Tosatti
2012-12-12 14:13 ` Gleb Natapov [this message]
2012-12-15 1:03 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121212141358.GR11016@redhat.com \
--to=gleb@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).