All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-11 16:52 ` linucherian at gmail.com
  0 siblings, 0 replies; 27+ messages in thread
From: linucherian @ 2017-01-11 16:52 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, linux-arm-kernel, kvmarm,
	pbonzini, rkrcmar
  Cc: sunil.goutham, Linu Cherian

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;
 	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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-11 16:52 ` linucherian at gmail.com
  0 siblings, 0 replies; 27+ messages in thread
From: linucherian at gmail.com @ 2017-01-11 16:52 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.

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;
 	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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-11 16:52 ` linucherian at gmail.com
@ 2017-01-13 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-13 12:03 UTC (permalink / raw)
  To: linucherian, christoffer.dall, linux-arm-kernel, kvmarm,
	pbonzini, rkrcmar
  Cc: sunil.goutham, Linu Cherian

Hi Linu,

On 11/01/17 16: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;
>  	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
> 

I'm not opposed to that patch, but if I may ask: how has that been tested?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-13 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-13 12:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Linu,

On 11/01/17 16: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;
>  	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
> 

I'm not opposed to that patch, but if I may ask: how has that been tested?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-13 12:03   ` Marc Zyngier
@ 2017-01-13 17:25     ` Linu Cherian
  -1 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-01-13 17:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: sunil.goutham, Linu Cherian, pbonzini, kvmarm, linux-arm-kernel

On Fri, Jan 13, 2017 at 5:33 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> Hi Linu,
>
> On 11/01/17 16: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;
>>       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
>>
>
> I'm not opposed to that patch, but if I may ask: how has that been tested?
>

I have tested this on Cavium ARM64 SOC, by assigning multiple
VFs(virtual functions) of a SRIOV device to a single VM. Each VF has
two memory regions(two BARs) implemented.

Without, this change, when the number of virtual functions assigned to
the guest crosses 15, qemu aborts with
"kvm_alloc_slot: no free slot available", during guest kernel booting.

Now, with this change guest kernel boots fine with more than 15 VFs
assigned(tested upto 29) and also all the PCI VFs assigned to the guest
get listed under lspci with memory resources configured.

Please let me know if you are looking for more specifics like bootlogs etc.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-13 17:25     ` Linu Cherian
  0 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-01-13 17:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 13, 2017 at 5:33 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> Hi Linu,
>
> On 11/01/17 16: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;
>>       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
>>
>
> I'm not opposed to that patch, but if I may ask: how has that been tested?
>

I have tested this on Cavium ARM64 SOC, by assigning multiple
VFs(virtual functions) of a SRIOV device to a single VM. Each VF has
two memory regions(two BARs) implemented.

Without, this change, when the number of virtual functions assigned to
the guest crosses 15, qemu aborts with
"kvm_alloc_slot: no free slot available", during guest kernel booting.

Now, with this change guest kernel boots fine with more than 15 VFs
assigned(tested upto 29) and also all the PCI VFs assigned to the guest
get listed under lspci with memory resources configured.

Please let me know if you are looking for more specifics like bootlogs etc.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-13 17:25     ` Linu Cherian
@ 2017-01-13 18:16       ` Marc Zyngier
  -1 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-13 18:16 UTC (permalink / raw)
  To: Linu Cherian
  Cc: sunil.goutham, Linu Cherian, pbonzini, kvmarm, linux-arm-kernel

On 13/01/17 17:25, Linu Cherian wrote:
> On Fri, Jan 13, 2017 at 5:33 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> Hi Linu,
>>
>> On 11/01/17 16: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;
>>>       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
>>>
>>
>> I'm not opposed to that patch, but if I may ask: how has that been tested?
>>
> 
> I have tested this on Cavium ARM64 SOC, by assigning multiple
> VFs(virtual functions) of a SRIOV device to a single VM. Each VF has
> two memory regions(two BARs) implemented.
> 
> Without, this change, when the number of virtual functions assigned to
> the guest crosses 15, qemu aborts with
> "kvm_alloc_slot: no free slot available", during guest kernel booting.
> 
> Now, with this change guest kernel boots fine with more than 15 VFs
> assigned(tested upto 29) and also all the PCI VFs assigned to the guest
> get listed under lspci with memory resources configured.
> 
> Please let me know if you are looking for more specifics like bootlogs etc.

Let me be more precise. At the moment, KVM on arm64 doesn't support the
delivery of MSIs generated by physical devices into a guest (patches are
in progress, but not merged yet). So unless you used devices that have
no need for interrupts, I don't see how this works.

Can you shed some light on your test process?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-13 18:16       ` Marc Zyngier
  0 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-13 18:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 13/01/17 17:25, Linu Cherian wrote:
> On Fri, Jan 13, 2017 at 5:33 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> Hi Linu,
>>
>> On 11/01/17 16: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;
>>>       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
>>>
>>
>> I'm not opposed to that patch, but if I may ask: how has that been tested?
>>
> 
> I have tested this on Cavium ARM64 SOC, by assigning multiple
> VFs(virtual functions) of a SRIOV device to a single VM. Each VF has
> two memory regions(two BARs) implemented.
> 
> Without, this change, when the number of virtual functions assigned to
> the guest crosses 15, qemu aborts with
> "kvm_alloc_slot: no free slot available", during guest kernel booting.
> 
> Now, with this change guest kernel boots fine with more than 15 VFs
> assigned(tested upto 29) and also all the PCI VFs assigned to the guest
> get listed under lspci with memory resources configured.
> 
> Please let me know if you are looking for more specifics like bootlogs etc.

Let me be more precise. At the moment, KVM on arm64 doesn't support the
delivery of MSIs generated by physical devices into a guest (patches are
in progress, but not merged yet). So unless you used devices that have
no need for interrupts, I don't see how this works.

Can you shed some light on your test process?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-13 18:16       ` Marc Zyngier
@ 2017-01-14  9:53         ` Linu Cherian
  -1 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-01-14  9:53 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: sunil.goutham, Linu Cherian, pbonzini, kvmarm, linux-arm-kernel

> Let me be more precise. At the moment, KVM on arm64 doesn't support the
> delivery of MSIs generated by physical devices into a guest (patches are
> in progress, but not merged yet). So unless you used devices that have
> no need for interrupts, I don't see how this works.
>
> Can you shed some light on your test process?
>

We did the testing on top of latest VFIO msi support patches submitted
by Eric Auger.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-14  9:53         ` Linu Cherian
  0 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-01-14  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

> Let me be more precise. At the moment, KVM on arm64 doesn't support the
> delivery of MSIs generated by physical devices into a guest (patches are
> in progress, but not merged yet). So unless you used devices that have
> no need for interrupts, I don't see how this works.
>
> Can you shed some light on your test process?
>

We did the testing on top of latest VFIO msi support patches submitted
by Eric Auger.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-14  9:53         ` Linu Cherian
@ 2017-01-14 10:46           ` Marc Zyngier
  -1 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-14 10:46 UTC (permalink / raw)
  To: Linu Cherian
  Cc: sunil.goutham, Linu Cherian, pbonzini, kvmarm, linux-arm-kernel

On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com> wrote:
>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>> delivery of MSIs generated by physical devices into a guest (patches are
>> in progress, but not merged yet). So unless you used devices that have
>> no need for interrupts, I don't see how this works.
>>
>> Can you shed some light on your test process?
>>
>
> We did the testing on top of latest VFIO msi support patches submitted
> by Eric Auger.

Did you? That's reassuring. It would have been good if any of the Cavium
folks did chime in on the list and help reviewing though - so far, all
I've heard is a deafening silence. I guess there was no hurry for Cavium
to see these patches being merged.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-14 10:46           ` Marc Zyngier
  0 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-14 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com> wrote:
>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>> delivery of MSIs generated by physical devices into a guest (patches are
>> in progress, but not merged yet). So unless you used devices that have
>> no need for interrupts, I don't see how this works.
>>
>> Can you shed some light on your test process?
>>
>
> We did the testing on top of latest VFIO msi support patches submitted
> by Eric Auger.

Did you? That's reassuring. It would have been good if any of the Cavium
folks did chime in on the list and help reviewing though - so far, all
I've heard is a deafening silence. I guess there was no hurry for Cavium
to see these patches being merged.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-14 10:46           ` Marc Zyngier
  (?)
@ 2017-01-14 16:23           ` Geetha Akula
  2017-01-24  5:06               ` Linu Cherian
  -1 siblings, 1 reply; 27+ messages in thread
From: Geetha Akula @ 2017-01-14 16:23 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: sunil.goutham, Linu Cherian, linux-arm-kernel, Linu Cherian,
	pbonzini, kvmarm


[-- Attachment #1.1: Type: text/plain, Size: 1474 bytes --]

Hi Marc,

We have been testing vfio patches regularly. We are in contact with Eric
offline. In fact we are the first one to test V5 patches on Eric request as
he had some issue with his test setup.  After our feedback it was posted in
upstream.
We also reported issues found with vfio patches. We been contact with Eric
regularly.

Thanks,
Geetha.

On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:

> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
> wrote:
> >> Let me be more precise. At the moment, KVM on arm64 doesn't support the
> >> delivery of MSIs generated by physical devices into a guest (patches are
> >> in progress, but not merged yet). So unless you used devices that have
> >> no need for interrupts, I don't see how this works.
> >>
> >> Can you shed some light on your test process?
> >>
> >
> > We did the testing on top of latest VFIO msi support patches submitted
> > by Eric Auger.
>
> Did you? That's reassuring. It would have been good if any of the Cavium
> folks did chime in on the list and help reviewing though - so far, all
> I've heard is a deafening silence. I guess there was no hurry for Cavium
> to see these patches being merged.
>
> Thanks,
>
>         M.
> --
> Jazz is not dead. It just smells funny.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

[-- Attachment #1.2: Type: text/html, Size: 2517 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-14 16:23           ` Geetha Akula
@ 2017-01-24  5:06               ` Linu Cherian
  0 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-01-24  5:06 UTC (permalink / raw)
  To: Geetha Akula
  Cc: sunil.goutham, Marc Zyngier, linux-arm-kernel, Linu Cherian,
	pbonzini, kvmarm

On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
<geethasowjanya.akula@gmail.com> wrote:
> Hi Marc,
>
> We have been testing vfio patches regularly. We are in contact with Eric
> offline. In fact we are the first one to test V5 patches on Eric request as
> he had some issue with his test setup.  After our feedback it was posted in
> upstream.
> We also reported issues found with vfio patches. We been contact with Eric
> regularly.
>
> Thanks,
> Geetha.
>
> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>
>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>> wrote:
>> >> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>> >> delivery of MSIs generated by physical devices into a guest (patches
>> >> are
>> >> in progress, but not merged yet). So unless you used devices that have
>> >> no need for interrupts, I don't see how this works.
>> >>
>> >> Can you shed some light on your test process?
>> >>
>> >
>> > We did the testing on top of latest VFIO msi support patches submitted
>> > by Eric Auger.
>>
>> Did you? That's reassuring. It would have been good if any of the Cavium
>> folks did chime in on the list and help reviewing though - so far, all
>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>> to see these patches being merged.
>>

May i know if this patch is queued for merge.

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-24  5:06               ` Linu Cherian
  0 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-01-24  5:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
<geethasowjanya.akula@gmail.com> wrote:
> Hi Marc,
>
> We have been testing vfio patches regularly. We are in contact with Eric
> offline. In fact we are the first one to test V5 patches on Eric request as
> he had some issue with his test setup.  After our feedback it was posted in
> upstream.
> We also reported issues found with vfio patches. We been contact with Eric
> regularly.
>
> Thanks,
> Geetha.
>
> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>
>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>> wrote:
>> >> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>> >> delivery of MSIs generated by physical devices into a guest (patches
>> >> are
>> >> in progress, but not merged yet). So unless you used devices that have
>> >> no need for interrupts, I don't see how this works.
>> >>
>> >> Can you shed some light on your test process?
>> >>
>> >
>> > We did the testing on top of latest VFIO msi support patches submitted
>> > by Eric Auger.
>>
>> Did you? That's reassuring. It would have been good if any of the Cavium
>> folks did chime in on the list and help reviewing though - so far, all
>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>> to see these patches being merged.
>>

May i know if this patch is queued for merge.

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-24  5:06               ` Linu Cherian
@ 2017-01-24  9:04                 ` Marc Zyngier
  -1 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-24  9:04 UTC (permalink / raw)
  To: Linu Cherian, Geetha Akula
  Cc: sunil.goutham, linux-arm-kernel, Linu Cherian, pbonzini, kvmarm

On 24/01/17 05:06, Linu Cherian wrote:
> On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
> <geethasowjanya.akula@gmail.com> wrote:
>> Hi Marc,
>>
>> We have been testing vfio patches regularly. We are in contact with Eric
>> offline. In fact we are the first one to test V5 patches on Eric request as
>> he had some issue with his test setup.  After our feedback it was posted in
>> upstream.
>> We also reported issues found with vfio patches. We been contact with Eric
>> regularly.
>>
>> Thanks,
>> Geetha.
>>
>> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>>
>>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>>> wrote:
>>>>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>>>>> delivery of MSIs generated by physical devices into a guest (patches
>>>>> are
>>>>> in progress, but not merged yet). So unless you used devices that have
>>>>> no need for interrupts, I don't see how this works.
>>>>>
>>>>> Can you shed some light on your test process?
>>>>>
>>>>
>>>> We did the testing on top of latest VFIO msi support patches submitted
>>>> by Eric Auger.
>>>
>>> Did you? That's reassuring. It would have been good if any of the Cavium
>>> folks did chime in on the list and help reviewing though - so far, all
>>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>>> to see these patches being merged.
>>>
> 
> May i know if this patch is queued for merge.

Not at the moment, since none of the patches it implicitly depends on
are merged yet either. Once Eric's patches are in (or at least in
-next), this can be queued - assuming it gets some reviewing too.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-24  9:04                 ` Marc Zyngier
  0 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-01-24  9:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 24/01/17 05:06, Linu Cherian wrote:
> On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
> <geethasowjanya.akula@gmail.com> wrote:
>> Hi Marc,
>>
>> We have been testing vfio patches regularly. We are in contact with Eric
>> offline. In fact we are the first one to test V5 patches on Eric request as
>> he had some issue with his test setup.  After our feedback it was posted in
>> upstream.
>> We also reported issues found with vfio patches. We been contact with Eric
>> regularly.
>>
>> Thanks,
>> Geetha.
>>
>> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>>
>>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>>> wrote:
>>>>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>>>>> delivery of MSIs generated by physical devices into a guest (patches
>>>>> are
>>>>> in progress, but not merged yet). So unless you used devices that have
>>>>> no need for interrupts, I don't see how this works.
>>>>>
>>>>> Can you shed some light on your test process?
>>>>>
>>>>
>>>> We did the testing on top of latest VFIO msi support patches submitted
>>>> by Eric Auger.
>>>
>>> Did you? That's reassuring. It would have been good if any of the Cavium
>>> folks did chime in on the list and help reviewing though - so far, all
>>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>>> to see these patches being merged.
>>>
> 
> May i know if this patch is queued for merge.

Not at the moment, since none of the patches it implicitly depends on
are merged yet either. Once Eric's patches are in (or at least in
-next), this can be queued - assuming it gets some reviewing too.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-13 18:16       ` Marc Zyngier
@ 2017-01-27 13:38         ` Prakash B
  -1 siblings, 0 replies; 27+ messages in thread
From: Prakash B @ 2017-01-27 13:38 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: sunil.goutham, rkrcmar, bprakash, Linu Cherian, linux-arm-kernel,
	Linu Cherian, pbonzini, kvmarm, Christoffer Dall

> Can you shed some light on your test process?
Hi Linu / Marc Zyngier,

I tested this patch on top of latest VFIO MSI supported version 9
patches on ThunderX with internal 10G VNIC and Intel IXGBE NIC.
Please feel free to add my:
Tested-by: Prakash, Brahmajyosyula <Brahmajyosyula.Prakash@cavium.com>

Thanks,
 prakash B

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-01-27 13:38         ` Prakash B
  0 siblings, 0 replies; 27+ messages in thread
From: Prakash B @ 2017-01-27 13:38 UTC (permalink / raw)
  To: linux-arm-kernel

> Can you shed some light on your test process?
Hi Linu / Marc Zyngier,

I tested this patch on top of latest VFIO MSI supported version 9
patches on ThunderX with internal 10G VNIC and Intel IXGBE NIC.
Please feel free to add my:
Tested-by: Prakash, Brahmajyosyula <Brahmajyosyula.Prakash@cavium.com>

Thanks,
 prakash B

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-24  9:04                 ` Marc Zyngier
@ 2017-02-07  9:00                   ` Linu Cherian
  -1 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-02-07  9:00 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: sunil.goutham, Geetha Akula, linux-arm-kernel, Linu Cherian,
	pbonzini, kvmarm

On Tue, Jan 24, 2017 at 2:34 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On 24/01/17 05:06, Linu Cherian wrote:
>> On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
>> <geethasowjanya.akula@gmail.com> wrote:
>>> Hi Marc,
>>>
>>> We have been testing vfio patches regularly. We are in contact with Eric
>>> offline. In fact we are the first one to test V5 patches on Eric request as
>>> he had some issue with his test setup.  After our feedback it was posted in
>>> upstream.
>>> We also reported issues found with vfio patches. We been contact with Eric
>>> regularly.
>>>
>>> Thanks,
>>> Geetha.
>>>
>>> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>>>
>>>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>>>> wrote:
>>>>>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>>>>>> delivery of MSIs generated by physical devices into a guest (patches
>>>>>> are
>>>>>> in progress, but not merged yet). So unless you used devices that have
>>>>>> no need for interrupts, I don't see how this works.
>>>>>>
>>>>>> Can you shed some light on your test process?
>>>>>>
>>>>>
>>>>> We did the testing on top of latest VFIO msi support patches submitted
>>>>> by Eric Auger.
>>>>
>>>> Did you? That's reassuring. It would have been good if any of the Cavium
>>>> folks did chime in on the list and help reviewing though - so far, all
>>>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>>>> to see these patches being merged.
>>>>
>>
>> May i know if this patch is queued for merge.
>
> Not at the moment, since none of the patches it implicitly depends on
> are merged yet either. Once Eric's patches are in (or at least in
> -next), this can be queued - assuming it gets some reviewing too.
>

Marc,
Hope this patch will be queued for merge, since Eric's patches has been pulled.

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-02-07  9:00                   ` Linu Cherian
  0 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-02-07  9:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 24, 2017 at 2:34 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On 24/01/17 05:06, Linu Cherian wrote:
>> On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
>> <geethasowjanya.akula@gmail.com> wrote:
>>> Hi Marc,
>>>
>>> We have been testing vfio patches regularly. We are in contact with Eric
>>> offline. In fact we are the first one to test V5 patches on Eric request as
>>> he had some issue with his test setup.  After our feedback it was posted in
>>> upstream.
>>> We also reported issues found with vfio patches. We been contact with Eric
>>> regularly.
>>>
>>> Thanks,
>>> Geetha.
>>>
>>> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>>>
>>>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>>>> wrote:
>>>>>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>>>>>> delivery of MSIs generated by physical devices into a guest (patches
>>>>>> are
>>>>>> in progress, but not merged yet). So unless you used devices that have
>>>>>> no need for interrupts, I don't see how this works.
>>>>>>
>>>>>> Can you shed some light on your test process?
>>>>>>
>>>>>
>>>>> We did the testing on top of latest VFIO msi support patches submitted
>>>>> by Eric Auger.
>>>>
>>>> Did you? That's reassuring. It would have been good if any of the Cavium
>>>> folks did chime in on the list and help reviewing though - so far, all
>>>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>>>> to see these patches being merged.
>>>>
>>
>> May i know if this patch is queued for merge.
>
> Not at the moment, since none of the patches it implicitly depends on
> are merged yet either. Once Eric's patches are in (or at least in
> -next), this can be queued - assuming it gets some reviewing too.
>

Marc,
Hope this patch will be queued for merge, since Eric's patches has been pulled.

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-02-07  9:00                   ` Linu Cherian
@ 2017-02-07  9:07                     ` Marc Zyngier
  -1 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-02-07  9:07 UTC (permalink / raw)
  To: Linu Cherian
  Cc: sunil.goutham, Geetha Akula, linux-arm-kernel, Linu Cherian,
	pbonzini, kvmarm

On 07/02/17 09:00, Linu Cherian wrote:
> On Tue, Jan 24, 2017 at 2:34 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 24/01/17 05:06, Linu Cherian wrote:
>>> On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
>>> <geethasowjanya.akula@gmail.com> wrote:
>>>> Hi Marc,
>>>>
>>>> We have been testing vfio patches regularly. We are in contact with Eric
>>>> offline. In fact we are the first one to test V5 patches on Eric request as
>>>> he had some issue with his test setup.  After our feedback it was posted in
>>>> upstream.
>>>> We also reported issues found with vfio patches. We been contact with Eric
>>>> regularly.
>>>>
>>>> Thanks,
>>>> Geetha.
>>>>
>>>> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>>>>
>>>>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>>>>> wrote:
>>>>>>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>>>>>>> delivery of MSIs generated by physical devices into a guest (patches
>>>>>>> are
>>>>>>> in progress, but not merged yet). So unless you used devices that have
>>>>>>> no need for interrupts, I don't see how this works.
>>>>>>>
>>>>>>> Can you shed some light on your test process?
>>>>>>>
>>>>>>
>>>>>> We did the testing on top of latest VFIO msi support patches submitted
>>>>>> by Eric Auger.
>>>>>
>>>>> Did you? That's reassuring. It would have been good if any of the Cavium
>>>>> folks did chime in on the list and help reviewing though - so far, all
>>>>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>>>>> to see these patches being merged.
>>>>>
>>>
>>> May i know if this patch is queued for merge.
>>
>> Not at the moment, since none of the patches it implicitly depends on
>> are merged yet either. Once Eric's patches are in (or at least in
>> -next), this can be queued - assuming it gets some reviewing too.
>>
> 
> Marc,
> Hope this patch will be queued for merge, since Eric's patches has been pulled.

Pulled, but not merged yet (as in, not in Linus' tree).

Look, I perfectly understand that you want this in, but there is no need
to send me an email every other week asking me whether I've queued it or
not. Once Eric's stuff is in, and provided that this very patch gets
reviewed (hint: nobody has), it will be queued as a fix post -rc1.

In the mean time, please relax.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-02-07  9:07                     ` Marc Zyngier
  0 siblings, 0 replies; 27+ messages in thread
From: Marc Zyngier @ 2017-02-07  9:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/02/17 09:00, Linu Cherian wrote:
> On Tue, Jan 24, 2017 at 2:34 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 24/01/17 05:06, Linu Cherian wrote:
>>> On Sat, Jan 14, 2017 at 9:53 PM, Geetha Akula
>>> <geethasowjanya.akula@gmail.com> wrote:
>>>> Hi Marc,
>>>>
>>>> We have been testing vfio patches regularly. We are in contact with Eric
>>>> offline. In fact we are the first one to test V5 patches on Eric request as
>>>> he had some issue with his test setup.  After our feedback it was posted in
>>>> upstream.
>>>> We also reported issues found with vfio patches. We been contact with Eric
>>>> regularly.
>>>>
>>>> Thanks,
>>>> Geetha.
>>>>
>>>> On 14-Jan-2017 4:17 PM, "Marc Zyngier" <marc.zyngier@arm.com> wrote:
>>>>>
>>>>> On Sat, Jan 14 2017 at 09:53:52 AM, Linu Cherian <linucherian@gmail.com>
>>>>> wrote:
>>>>>>> Let me be more precise. At the moment, KVM on arm64 doesn't support the
>>>>>>> delivery of MSIs generated by physical devices into a guest (patches
>>>>>>> are
>>>>>>> in progress, but not merged yet). So unless you used devices that have
>>>>>>> no need for interrupts, I don't see how this works.
>>>>>>>
>>>>>>> Can you shed some light on your test process?
>>>>>>>
>>>>>>
>>>>>> We did the testing on top of latest VFIO msi support patches submitted
>>>>>> by Eric Auger.
>>>>>
>>>>> Did you? That's reassuring. It would have been good if any of the Cavium
>>>>> folks did chime in on the list and help reviewing though - so far, all
>>>>> I've heard is a deafening silence. I guess there was no hurry for Cavium
>>>>> to see these patches being merged.
>>>>>
>>>
>>> May i know if this patch is queued for merge.
>>
>> Not at the moment, since none of the patches it implicitly depends on
>> are merged yet either. Once Eric's patches are in (or at least in
>> -next), this can be queued - assuming it gets some reviewing too.
>>
> 
> Marc,
> Hope this patch will be queued for merge, since Eric's patches has been pulled.

Pulled, but not merged yet (as in, not in Linus' tree).

Look, I perfectly understand that you want this in, but there is no need
to send me an email every other week asking me whether I've queued it or
not. Once Eric's stuff is in, and provided that this very patch gets
reviewed (hint: nobody has), it will be queued as a fix post -rc1.

In the mean time, please relax.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-01-11 16:52 ` linucherian at gmail.com
@ 2017-02-07 10:16   ` Auger Eric
  -1 siblings, 0 replies; 27+ messages in thread
From: Auger Eric @ 2017-02-07 10:16 UTC (permalink / raw)
  To: linucherian, christoffer.dall, marc.zyngier, linux-arm-kernel,
	kvmarm, pbonzini, rkrcmar
  Cc: sunil.goutham, Linu Cherian

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
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-02-07 10:16   ` Auger Eric
  0 siblings, 0 replies; 27+ messages in thread
From: Auger Eric @ 2017-02-07 10:16 UTC (permalink / raw)
  To: linux-arm-kernel

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
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] KVM: arm64: Increase number of memslots to 512
  2017-02-07 10:16   ` Auger Eric
@ 2017-02-08  1:57     ` Linu Cherian
  -1 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-02-08  1:57 UTC (permalink / raw)
  To: Auger Eric
  Cc: sunil.goutham, Marc Zyngier, Linu Cherian, pbonzini, kvmarm,
	linux-arm-kernel

On Tue, Feb 7, 2017 at 3:46 PM, Auger Eric <eric.auger@redhat.com> wrote:
> 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 for reviewing. Will send out another version with this fixed.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] KVM: arm64: Increase number of memslots to 512
@ 2017-02-08  1:57     ` Linu Cherian
  0 siblings, 0 replies; 27+ messages in thread
From: Linu Cherian @ 2017-02-08  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 7, 2017 at 3:46 PM, Auger Eric <eric.auger@redhat.com> wrote:
> 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 for reviewing. Will send out another version with this fixed.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-02-08  1:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-02-07 10:16   ` Auger Eric
2017-02-08  1:57   ` Linu Cherian
2017-02-08  1:57     ` Linu Cherian

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.