All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: linucherian@gmail.com, christoffer.dall@linaro.org,
	marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, pbonzini@redhat.com,
	rkrcmar@redhat.com
Cc: sunil.goutham@cavium.com, Linu Cherian <linu.cherian@cavium.com>
Subject: Re: [PATCH] KVM: arm64: Increase number of memslots to 512
Date: Tue, 7 Feb 2017 11:16:02 +0100	[thread overview]
Message-ID: <fd707698-ba58-f3cb-f0c5-6a4507585bd7@redhat.com> (raw)
In-Reply-To: <1484153537-20984-1-git-send-email-linucherian@gmail.com>

Hi Linu,

On 11/01/2017 17:52, linucherian@gmail.com wrote:
> 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.
> 
> So increase KVM_MEM_SLOTS_NUM to 512 as done in other archs like x86 and
> powerpc. For this, KVM_USER_MEM_SLOTS has been changed to 508.
> 
> Signed-off-by: Linu Cherian <linu.cherian@cavium.com>

> ---
>  arch/arm/kvm/arm.c                | 3 +++
>  arch/arm64/include/asm/kvm_host.h | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index 8f92efa..a19389b 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;
This change is not documented in the commit message and I think it
should since we now allow KVM/ARM to report the number of available user
mem slots. I would personally suggest to put it in a sepate patch as it
was done on s390 for instance
(http://marc.info/?l=linux-s390&m=136422861316920&w=2)

Thanks

Eric

>  	case KVM_CAP_MSI_DEVID:
>  		if (!kvm)
>  			r = -EINVAL;
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index e505038..88f017d 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 508
>  #define KVM_PRIVATE_MEM_SLOTS 4
>  #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
>  #define KVM_HALT_POLL_NS_DEFAULT 500000
> 

WARNING: multiple messages have this Message-ID (diff)
From: eric.auger@redhat.com (Auger Eric)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] KVM: arm64: Increase number of memslots to 512
Date: Tue, 7 Feb 2017 11:16:02 +0100	[thread overview]
Message-ID: <fd707698-ba58-f3cb-f0c5-6a4507585bd7@redhat.com> (raw)
In-Reply-To: <1484153537-20984-1-git-send-email-linucherian@gmail.com>

Hi Linu,

On 11/01/2017 17:52, linucherian at gmail.com wrote:
> 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.
> 
> So increase KVM_MEM_SLOTS_NUM to 512 as done in other archs like x86 and
> powerpc. For this, KVM_USER_MEM_SLOTS has been changed to 508.
> 
> Signed-off-by: Linu Cherian <linu.cherian@cavium.com>

> ---
>  arch/arm/kvm/arm.c                | 3 +++
>  arch/arm64/include/asm/kvm_host.h | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index 8f92efa..a19389b 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;
This change is not documented in the commit message and I think it
should since we now allow KVM/ARM to report the number of available user
mem slots. I would personally suggest to put it in a sepate patch as it
was done on s390 for instance
(http://marc.info/?l=linux-s390&m=136422861316920&w=2)

Thanks

Eric

>  	case KVM_CAP_MSI_DEVID:
>  		if (!kvm)
>  			r = -EINVAL;
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index e505038..88f017d 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 508
>  #define KVM_PRIVATE_MEM_SLOTS 4
>  #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
>  #define KVM_HALT_POLL_NS_DEFAULT 500000
> 

  parent reply	other threads:[~2017-02-07 10:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 16:52 [PATCH] KVM: arm64: Increase number of memslots to 512 linucherian
2017-01-11 16:52 ` linucherian at gmail.com
2017-01-13 12:03 ` Marc Zyngier
2017-01-13 12:03   ` Marc Zyngier
2017-01-13 17:25   ` Linu Cherian
2017-01-13 17:25     ` Linu Cherian
2017-01-13 18:16     ` Marc Zyngier
2017-01-13 18:16       ` Marc Zyngier
2017-01-14  9:53       ` Linu Cherian
2017-01-14  9:53         ` Linu Cherian
2017-01-14 10:46         ` Marc Zyngier
2017-01-14 10:46           ` Marc Zyngier
2017-01-14 16:23           ` Geetha Akula
2017-01-24  5:06             ` Linu Cherian
2017-01-24  5:06               ` Linu Cherian
2017-01-24  9:04               ` Marc Zyngier
2017-01-24  9:04                 ` Marc Zyngier
2017-02-07  9:00                 ` Linu Cherian
2017-02-07  9:00                   ` Linu Cherian
2017-02-07  9:07                   ` Marc Zyngier
2017-02-07  9:07                     ` Marc Zyngier
2017-01-27 13:38       ` Prakash B
2017-01-27 13:38         ` Prakash B
2017-02-07 10:16 ` Auger Eric [this message]
2017-02-07 10:16   ` Auger Eric
2017-02-08  1:57   ` Linu Cherian
2017-02-08  1:57     ` Linu Cherian

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=fd707698-ba58-f3cb-f0c5-6a4507585bd7@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linu.cherian@cavium.com \
    --cc=linucherian@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sunil.goutham@cavium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.