diff mbox

[10/10] kvm: Increase user memory slots on x86 to 125

Message ID 20121206222126.24968.17280.stgit@bling.home (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Williamson Dec. 6, 2012, 10:21 p.m. UTC
With the 3 private slots, this gives us a nice round 128 slots total.
The primary motivation for this is to support more assigned devices.
Each assigned device can theoretically use up to 8 slots (6 MMIO BARs,
1 ROM BAR, 1 spare for a split MSI-X table mapping) though it's far
more typical for a device to use 3-4 slots.  If we assume a typical VM
uses a dozen slots for non-assigned devices purposes, we should always
be able to support 14 worst case assigned devices or 28 to 37 typical
devices.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 arch/x86/include/asm/kvm_host.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Takuya Yoshikawa Dec. 7, 2012, 2:02 p.m. UTC | #1
On Thu, 06 Dec 2012 15:21:26 -0700
Alex Williamson <alex.williamson@redhat.com> wrote:

> With the 3 private slots, this gives us a nice round 128 slots total.

So I think this patch needs to be applied after resolving the
slot_bitmap issue.  We may not need to protect slots with large
slot id values, but still it's possible to do so.

Taking into account that the merge window is so close that this
patch set should be targeted for 3.9, it may be possible to do
the work timely: I will post my patch series next week if possible.

Thanks,
	Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alex Williamson Dec. 7, 2012, 4:09 p.m. UTC | #2
On Fri, 2012-12-07 at 23:02 +0900, Takuya Yoshikawa wrote:
> On Thu, 06 Dec 2012 15:21:26 -0700
> Alex Williamson <alex.williamson@redhat.com> wrote:
> 
> > With the 3 private slots, this gives us a nice round 128 slots total.
> 
> So I think this patch needs to be applied after resolving the
> slot_bitmap issue.  We may not need to protect slots with large
> slot id values, but still it's possible to do so.
> 
> Taking into account that the merge window is so close that this
> patch set should be targeted for 3.9, it may be possible to do
> the work timely: I will post my patch series next week if possible.

This obviously increases the slot_bitmap, actually only doubles it since
it's an unsigned long and we're only using 36 bits, but why should
removing the slot_bitmap gate this series?  Thanks,

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Takuya Yoshikawa Dec. 10, 2012, 1:48 p.m. UTC | #3
On Fri, 07 Dec 2012 09:09:39 -0700
Alex Williamson <alex.williamson@redhat.com> wrote:

> On Fri, 2012-12-07 at 23:02 +0900, Takuya Yoshikawa wrote:
> > On Thu, 06 Dec 2012 15:21:26 -0700
> > Alex Williamson <alex.williamson@redhat.com> wrote:
> > 
> > > With the 3 private slots, this gives us a nice round 128 slots total.
> > 
> > So I think this patch needs to be applied after resolving the
> > slot_bitmap issue.  We may not need to protect slots with large
> > slot id values, but still it's possible to do so.
> > 
> > Taking into account that the merge window is so close that this
> > patch set should be targeted for 3.9, it may be possible to do
> > the work timely: I will post my patch series next week if possible.
> 
> This obviously increases the slot_bitmap, actually only doubles it since
> it's an unsigned long and we're only using 36 bits, but why should
> removing the slot_bitmap gate this series?  Thanks,


I was wrong, sorry.

I thought slot_bitmap was defined as u64 or something, the fact was that
my memory was corrupt.

Thanks,
	Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index ce8b037..9558a1e 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -31,7 +31,7 @@ 
 
 #define KVM_MAX_VCPUS 254
 #define KVM_SOFT_MAX_VCPUS 160
-#define KVM_USER_MEM_SLOTS 32
+#define KVM_USER_MEM_SLOTS 125
 /* memory slots that are not exposed to userspace */
 #define KVM_PRIVATE_MEM_SLOTS 3
 #define KVM_MEM_SLOTS_NUM (KVM_USER_MEM_SLOTS + KVM_PRIVATE_MEM_SLOTS)