* [PATCH v4 0/4] KVM: arm64: Increase number of user memslots
@ 2017-03-08 6:08 linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS linucherian at gmail.com
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: linucherian at gmail.com @ 2017-03-08 6:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Linu Cherian <linu.cherian@cavium.com>
v3 -> v4:
- Add missing commit messages in patches 1 and 3
v2 -> v3:
- Added documentation for KVM_CAP_NR_MEMSLOTS
- Removed KVM_PRIVATE_MEM_SLOTS which is unused
- KVM_USER_MEM_SLOTS changed to 512 from 508
v1 -> v2:
- Enabling KVM_CAP_NR_MEMSLOTS for arm/arm64 moved to separate patch.
- Updated commit message so that what is reported to userspace is explicit.
Linu Cherian (4):
KVM: Add documentation for KVM_CAP_NR_MEMSLOTS
KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64
KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are
unused
KVM: arm64: Increase number of user memslots to 512
Documentation/virtual/kvm/api.txt | 4 ++++
arch/arm/include/asm/kvm_host.h | 1 -
arch/arm/kvm/arm.c | 3 +++
arch/arm64/include/asm/kvm_host.h | 3 +--
4 files changed, 8 insertions(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS
2017-03-08 6:08 [PATCH v4 0/4] KVM: arm64: Increase number of user memslots linucherian at gmail.com
@ 2017-03-08 6:08 ` linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 2/4] KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64 linucherian at gmail.com
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: linucherian at gmail.com @ 2017-03-08 6:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Linu Cherian <linu.cherian@cavium.com>
Add documentation for KVM_CAP_NR_MEMSLOTS capability.
Signed-off-by: Linu Cherian <linu.cherian@cavium.com>
---
Documentation/virtual/kvm/api.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 03145b7..7b82f1c 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -951,6 +951,10 @@ This ioctl allows the user to create or modify a guest physical memory
slot. When changing an existing slot, it may be moved in the guest
physical memory space, or its flags may be modified. It may not be
resized. Slots may not overlap in guest physical address space.
+Bits 0-15 of "slot" specifies the slot id and this value should be
+less than the maximum number of user memory slots supported per VM.
+The maximum allowed slots can be queried using KVM_CAP_NR_MEMSLOTS,
+if this capability is supported by the architecture.
If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot"
specifies the address space which is being modified. They must be
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v4 2/4] KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64
2017-03-08 6:08 [PATCH v4 0/4] KVM: arm64: Increase number of user memslots linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS linucherian at gmail.com
@ 2017-03-08 6:08 ` linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 3/4] KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused linucherian at gmail.com
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: linucherian at gmail.com @ 2017-03-08 6:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Linu Cherian <linu.cherian@cavium.com>
Return KVM_USER_MEM_SLOTS for userspace capability query on
NR_MEMSLOTS.
Signed-off-by: Linu Cherian <linu.cherian@cavium.com>
---
arch/arm/kvm/arm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 9d74464..b64b47f 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -221,6 +221,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
case KVM_CAP_MAX_VCPUS:
r = KVM_MAX_VCPUS;
break;
+ case KVM_CAP_NR_MEMSLOTS:
+ r = KVM_USER_MEM_SLOTS;
+ break;
case KVM_CAP_MSI_DEVID:
if (!kvm)
r = -EINVAL;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v4 3/4] KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused
2017-03-08 6:08 [PATCH v4 0/4] KVM: arm64: Increase number of user memslots linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 2/4] KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64 linucherian at gmail.com
@ 2017-03-08 6:08 ` linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 4/4] KVM: arm64: Increase number of user memslots to 512 linucherian at gmail.com
2017-03-09 8:01 ` [PATCH v4 0/4] KVM: arm64: Increase number of user memslots Marc Zyngier
4 siblings, 0 replies; 7+ messages in thread
From: linucherian at gmail.com @ 2017-03-08 6:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Linu Cherian <linu.cherian@cavium.com>
arm/arm64 architecture doesnt use private memslots, hence removing
KVM_PRIVATE_MEM_SLOTS macro definition.
Signed-off-by: Linu Cherian <linu.cherian@cavium.com>
---
arch/arm/include/asm/kvm_host.h | 1 -
arch/arm64/include/asm/kvm_host.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index d5423ab..b9b39f0 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -30,7 +30,6 @@
#define __KVM_HAVE_ARCH_INTC_INITIALIZED
#define KVM_USER_MEM_SLOTS 32
-#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
#define KVM_HAVE_ONE_REG
#define KVM_HALT_POLL_NS_DEFAULT 500000
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index e505038..a0409b0 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -31,7 +31,6 @@
#define __KVM_HAVE_ARCH_INTC_INITIALIZED
#define KVM_USER_MEM_SLOTS 32
-#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
#define KVM_HALT_POLL_NS_DEFAULT 500000
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v4 4/4] KVM: arm64: Increase number of user memslots to 512
2017-03-08 6:08 [PATCH v4 0/4] KVM: arm64: Increase number of user memslots linucherian at gmail.com
` (2 preceding siblings ...)
2017-03-08 6:08 ` [PATCH v4 3/4] KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused linucherian at gmail.com
@ 2017-03-08 6:08 ` linucherian at gmail.com
2017-03-09 8:01 ` [PATCH v4 0/4] KVM: arm64: Increase number of user memslots Marc Zyngier
4 siblings, 0 replies; 7+ messages in thread
From: linucherian at gmail.com @ 2017-03-08 6:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Linu Cherian <linu.cherian@cavium.com>
Having only 32 memslots is a real constraint for the maximum
number of PCI devices that can be assigned to a single guest.
Assuming each PCI device/virtual function having two memory BAR
regions, we could assign only 15 devices/virtual functions to a
guest.
Hence increase KVM_USER_MEM_SLOTS to 512 as done in other archs like
powerpc.
Signed-off-by: Linu Cherian <linu.cherian@cavium.com>
---
arch/arm64/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index a0409b0..4027002 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -30,7 +30,7 @@
#define __KVM_HAVE_ARCH_INTC_INITIALIZED
-#define KVM_USER_MEM_SLOTS 32
+#define KVM_USER_MEM_SLOTS 512
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
#define KVM_HALT_POLL_NS_DEFAULT 500000
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v4 0/4] KVM: arm64: Increase number of user memslots
2017-03-08 6:08 [PATCH v4 0/4] KVM: arm64: Increase number of user memslots linucherian at gmail.com
` (3 preceding siblings ...)
2017-03-08 6:08 ` [PATCH v4 4/4] KVM: arm64: Increase number of user memslots to 512 linucherian at gmail.com
@ 2017-03-09 8:01 ` Marc Zyngier
2017-03-09 8:53 ` Christoffer Dall
4 siblings, 1 reply; 7+ messages in thread
From: Marc Zyngier @ 2017-03-09 8:01 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 08 2017 at 6:08:31 am GMT, linucherian at gmail.com wrote:
> From: Linu Cherian <linu.cherian@cavium.com>
>
> v3 -> v4:
> - Add missing commit messages in patches 1 and 3
>
> v2 -> v3:
> - Added documentation for KVM_CAP_NR_MEMSLOTS
> - Removed KVM_PRIVATE_MEM_SLOTS which is unused
> - KVM_USER_MEM_SLOTS changed to 512 from 508
>
> v1 -> v2:
> - Enabling KVM_CAP_NR_MEMSLOTS for arm/arm64 moved to separate patch.
> - Updated commit message so that what is reported to userspace is explicit.
>
>
> Linu Cherian (4):
> KVM: Add documentation for KVM_CAP_NR_MEMSLOTS
> KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64
> KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are
> unused
> KVM: arm64: Increase number of user memslots to 512
>
> Documentation/virtual/kvm/api.txt | 4 ++++
> arch/arm/include/asm/kvm_host.h | 1 -
> arch/arm/kvm/arm.c | 3 +++
> arch/arm64/include/asm/kvm_host.h | 3 +--
> 4 files changed, 8 insertions(+), 3 deletions(-)
For the whole series:
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Christoffer: if you're happy with this series, I'll take it as part of
the next batch of fixes.
Thanks,
M.
--
Jazz is not dead, it just smell funny.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 0/4] KVM: arm64: Increase number of user memslots
2017-03-09 8:01 ` [PATCH v4 0/4] KVM: arm64: Increase number of user memslots Marc Zyngier
@ 2017-03-09 8:53 ` Christoffer Dall
0 siblings, 0 replies; 7+ messages in thread
From: Christoffer Dall @ 2017-03-09 8:53 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 09, 2017 at 08:01:56AM +0000, Marc Zyngier wrote:
> On Wed, Mar 08 2017 at 6:08:31 am GMT, linucherian at gmail.com wrote:
> > From: Linu Cherian <linu.cherian@cavium.com>
> >
> > v3 -> v4:
> > - Add missing commit messages in patches 1 and 3
> >
> > v2 -> v3:
> > - Added documentation for KVM_CAP_NR_MEMSLOTS
> > - Removed KVM_PRIVATE_MEM_SLOTS which is unused
> > - KVM_USER_MEM_SLOTS changed to 512 from 508
> >
> > v1 -> v2:
> > - Enabling KVM_CAP_NR_MEMSLOTS for arm/arm64 moved to separate patch.
> > - Updated commit message so that what is reported to userspace is explicit.
> >
> >
> > Linu Cherian (4):
> > KVM: Add documentation for KVM_CAP_NR_MEMSLOTS
> > KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64
> > KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are
> > unused
> > KVM: arm64: Increase number of user memslots to 512
> >
> > Documentation/virtual/kvm/api.txt | 4 ++++
> > arch/arm/include/asm/kvm_host.h | 1 -
> > arch/arm/kvm/arm.c | 3 +++
> > arch/arm64/include/asm/kvm_host.h | 3 +--
> > 4 files changed, 8 insertions(+), 3 deletions(-)
>
> For the whole series:
>
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
>
> Christoffer: if you're happy with this series, I'll take it as part of
> the next batch of fixes.
>
Yes:
Reviewed-by: Christoffer Dall <cdall@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-09 8:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08 6:08 [PATCH v4 0/4] KVM: arm64: Increase number of user memslots linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 2/4] KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64 linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 3/4] KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused linucherian at gmail.com
2017-03-08 6:08 ` [PATCH v4 4/4] KVM: arm64: Increase number of user memslots to 512 linucherian at gmail.com
2017-03-09 8:01 ` [PATCH v4 0/4] KVM: arm64: Increase number of user memslots Marc Zyngier
2017-03-09 8:53 ` Christoffer Dall
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).