Migration with directly assigned devices is possible?

2018-04-24 Thread Jintack Lim
Hi, I wonder if we can do migration with directly assigned devices (i.e. pass-through devices)? I looked at the KVM migration page[1], but couldn't find information. Can somebody let me now if it's possible or point me the related documents? Thanks, Jintack [1] https://www.linux-kvm.org/page/Mi

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: > We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in > KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the > base address and size of a redistributor region > > Compared to KVM_VGIC_V3_ADDR_TYPE_REDIST, th

Re: [PATCH v3 06/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:52AM +0200, Eric Auger wrote: > We introduce a new helper that creates and inserts a new redistributor > region into the rdist region list. This helper both handles the case > where the redistributor region size is known at registration time > and the legacy case where

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Peter Maydell
On 24 April 2018 at 17:46, Christoffer Dall wrote: > On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: >> --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt >> +++ b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt >> @@ -27,9 +27,32 @@ Groups: >>VCPU and all of the redistr

Re: Migration with directly assigned devices is possible?

2018-04-24 Thread Paolo Bonzini
On 24/04/2018 16:56, Jintack Lim wrote: > Hi, > > I wonder if we can do migration with directly assigned devices (i.e. > pass-through devices)? I looked at the KVM migration page[1], but > couldn't find information. Can somebody let me now if it's possible or > point me the related documents? No,

Re: Migration with directly assigned devices is possible?

2018-04-24 Thread Jintack Lim
On Tue, Apr 24, 2018 at 1:13 PM, Paolo Bonzini wrote: > On 24/04/2018 16:56, Jintack Lim wrote: >> Hi, >> >> I wonder if we can do migration with directly assigned devices (i.e. >> pass-through devices)? I looked at the KVM migration page[1], but >> couldn't find information. Can somebody let me n

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Auger Eric
Hi Christoffer, Peter, On 04/24/2018 06:50 PM, Peter Maydell wrote: > On 24 April 2018 at 17:46, Christoffer Dall wrote: >> On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: >>> --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt >>> +++ b/Documentation/virtual/kvm/devices/arm-vgic-

Re: [PATCH v3 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:57AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > - early exit if vgic_v3_rdist_region_from_index() fails > -

Re: [PATCH v3 01/12] KVM: arm/arm64: Set dist->spis to NULL after kfree

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:47AM +0200, Eric Auger wrote: > in case kvm_vgic_map_resources() fails, typically if the vgic > distributor is not defined, __kvm_vgic_destroy will be called > several times. Indeed kvm_vgic_map_resources() is called on > first vcpu run. As a result dist->spis is freee

Re: [PATCH v3 05/12] KVM: arm/arm64: Revisit Redistributor TYPER last bit computation

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:51AM +0200, Eric Auger wrote: > The TYPER of an redistributor reflects whether the rdist is > the last one of the redistributor region. Let's compare the TYPER > GPA against the address of the last occupied slot within the > redistributor region. > > Signed-off-by: Er

Re: [PATCH v3 03/12] KVM: arm/arm64: Replace the single rdist region by a list

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:49AM +0200, Eric Auger wrote: > At the moment KVM supports a single rdist region. We want to > support several separate rdist regions so let's introduce a list > of them. This patch currently only cares about a single > entry in this list as the functionality to regist

Re: [PATCH v3 04/12] KVM: arm/arm64: Helper to locate free rdist index

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:50AM +0200, Eric Auger wrote: > We introduce vgic_v3_rdist_free_slot to help identifying > where we can place a new 2x64KB redistributor. > > Signed-off-by: Eric Auger > --- > virt/kvm/arm/vgic/vgic-mmio-v3.c | 3 +-- > virt/kvm/arm/vgic/vgic-v3.c | 17 +++

Re: [PATCH v3 07/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:53AM +0200, Eric Auger wrote: > We introduce a new helper to check there is no overlap between > dist region (if set) and registered rdist regions. This both > handles the case of legacy single rdist region (implicitly sized > with the number of online vcpus) and the n

Re: [PATCH v3 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:54AM +0200, Eric Auger wrote: > As we are going to register several redist regions, > vgic_register_all_redist_iodevs() may be called several times. We need > to register a redist_iodev for a given vcpu only once. Wouldn't it be more natural to change that caller to

Re: [PATCH v3 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:55AM +0200, Eric Auger wrote: > On vcpu first run, we eventually know the actual number of vcpus. > This is a synchronization point to check all redistributors regions > were assigned. Isn't it the other way around? We want to check that all redistributors (one for e

Re: [PATCH v3 10/12] KVM: arm/arm64: Add KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:56AM +0200, Eric Auger wrote: > This new attribute allows the userspace to set the base address > of a reditributor region, relaxing the constraint of having all > consecutive redistibutor frames contiguous. > > Signed-off-by: Eric Auger > --- > arch/arm/include/uap

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Tue, Apr 24, 2018 at 05:50:37PM +0100, Peter Maydell wrote: > On 24 April 2018 at 17:46, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: > >> --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt > >> +++ b/Documentation/virtual/kvm/devices/arm-vgic-v3.