Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-08 Thread Heiko Carstens
On Thu, Jun 08, 2017 at 01:24:01PM +0200, Martin Schwidefsky wrote: > On Thu, 8 Jun 2017 08:25:31 +0200 > Heiko Carstens wrote: > > It would be more consistent, since right now a 32-bit ELF file with > > PT_S390_REQUEST_PGSTE will be exectuted, but the page tables won't have any > > pgstes. That's

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-08 Thread Martin Schwidefsky
On Thu, 8 Jun 2017 08:25:31 +0200 Heiko Carstens wrote: > On Thu, Jun 08, 2017 at 07:35:28AM +0200, Martin Schwidefsky wrote: > > On Wed, 7 Jun 2017 22:47:56 +0200 > > Heiko Carstens wrote: > > > On Wed, Jun 07, 2017 at 02:34:40PM +0200, Martin Schwidefsky wrote: > > > > +#define arch_elf_pt

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-07 Thread Heiko Carstens
On Thu, Jun 08, 2017 at 07:35:28AM +0200, Martin Schwidefsky wrote: > On Wed, 7 Jun 2017 22:47:56 +0200 > Heiko Carstens wrote: > > On Wed, Jun 07, 2017 at 02:34:40PM +0200, Martin Schwidefsky wrote: > > > +#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ > > > +({

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-07 Thread Martin Schwidefsky
On Wed, 7 Jun 2017 22:47:56 +0200 Heiko Carstens wrote: > On Wed, Jun 07, 2017 at 02:34:40PM +0200, Martin Schwidefsky wrote: > > +#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ > > +({ \ > > + struct elf64_hdr *_ehdr = (void

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-07 Thread Heiko Carstens
On Wed, Jun 07, 2017 at 02:34:40PM +0200, Martin Schwidefsky wrote: > +#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ > +({ \ > + struct elf64_hdr *_ehdr = (void *) ehdr;\ > + struct elf64_phdr *_phdr

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-07 Thread Martin Schwidefsky
On Fri, 2 Jun 2017 15:20:33 +0200 Christian Borntraeger wrote: > On 06/02/2017 12:53 PM, Martin Schwidefsky wrote: > > On Fri, 2 Jun 2017 12:19:19 +0200 > > Christian Borntraeger wrote: > > > >> On 06/02/2017 11:46 AM, Martin Schwidefsky wrote: > >>> On Fri, 2 Jun 2017 09:02:10 +0200 > >>>

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Christian Borntraeger
On 06/02/2017 12:53 PM, Martin Schwidefsky wrote: > On Fri, 2 Jun 2017 12:19:19 +0200 > Christian Borntraeger wrote: > >> On 06/02/2017 11:46 AM, Martin Schwidefsky wrote: >>> On Fri, 2 Jun 2017 09:02:10 +0200 >>> Heiko Carstens wrote: >>> On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread David Hildenbrand
On 02.06.2017 09:02, Heiko Carstens wrote: > On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: >>> Unfortunately, converting all page tables to 4k pgste page tables is >>> not possible without provoking various race conditions. >> >> That is one approach we tried and was found to

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Martin Schwidefsky
On Fri, 2 Jun 2017 12:19:19 +0200 Christian Borntraeger wrote: > On 06/02/2017 11:46 AM, Martin Schwidefsky wrote: > > On Fri, 2 Jun 2017 09:02:10 +0200 > > Heiko Carstens wrote: > > > >> On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: > Unfortunately, converting al

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Martin Schwidefsky
On Fri, 2 Jun 2017 12:28:48 +0200 Heiko Carstens wrote: > On Fri, Jun 02, 2017 at 11:46:47AM +0200, Martin Schwidefsky wrote: > > On Fri, 2 Jun 2017 09:02:10 +0200 > > Heiko Carstens wrote: > > > Maybe this is a bit over-simplified, but might work. > > This is not over-simplified at all, tha

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Heiko Carstens
On Fri, Jun 02, 2017 at 11:46:47AM +0200, Martin Schwidefsky wrote: > On Fri, 2 Jun 2017 09:02:10 +0200 > Heiko Carstens wrote: > > Maybe this is a bit over-simplified, but might work. > This is not over-simplified at all, that does work: Good! > +struct arch_elf_state { > +}; > + > +#define INI

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Christian Borntraeger
On 06/02/2017 11:46 AM, Martin Schwidefsky wrote: > On Fri, 2 Jun 2017 09:02:10 +0200 > Heiko Carstens wrote: > >> On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: Unfortunately, converting all page tables to 4k pgste page tables is not possible without provoking vari

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Martin Schwidefsky
On Fri, 2 Jun 2017 09:02:10 +0200 Heiko Carstens wrote: > On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: > > > Unfortunately, converting all page tables to 4k pgste page tables is > > > not possible without provoking various race conditions. > > > > That is one approach we

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Martin Schwidefsky
On Fri, 2 Jun 2017 09:25:54 +0200 Christian Borntraeger wrote: > On 06/02/2017 09:18 AM, Christian Borntraeger wrote: > > On 06/02/2017 09:16 AM, Martin Schwidefsky wrote: > >> On Fri, 2 Jun 2017 09:13:03 +0200 > >> Christian Borntraeger wrote: > >> > >>> On 06/02/2017 09:02 AM, Heiko Carste

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Christian Borntraeger
On 06/02/2017 09:18 AM, Christian Borntraeger wrote: > On 06/02/2017 09:16 AM, Martin Schwidefsky wrote: >> On Fri, 2 Jun 2017 09:13:03 +0200 >> Christian Borntraeger wrote: >> >>> On 06/02/2017 09:02 AM, Heiko Carstens wrote: On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Christian Borntraeger
On 06/02/2017 09:16 AM, Martin Schwidefsky wrote: > On Fri, 2 Jun 2017 09:13:03 +0200 > Christian Borntraeger wrote: > >> On 06/02/2017 09:02 AM, Heiko Carstens wrote: >>> On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: > Unfortunately, converting all page tables to 4k p

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Martin Schwidefsky
On Fri, 2 Jun 2017 09:13:03 +0200 Christian Borntraeger wrote: > On 06/02/2017 09:02 AM, Heiko Carstens wrote: > > On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: > >>> Unfortunately, converting all page tables to 4k pgste page tables is > >>> not possible without provoking

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Christian Borntraeger
On 06/02/2017 09:02 AM, Heiko Carstens wrote: > On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: >>> Unfortunately, converting all page tables to 4k pgste page tables is >>> not possible without provoking various race conditions. >> >> That is one approach we tried and was found

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Heiko Carstens
On Thu, Jun 01, 2017 at 01:27:28PM +0200, David Hildenbrand wrote: > An alternative: Have some process that enables PGSTE for all of its > future children. Fork+execv qemu. However, such a process in between > will most likely confuse tooling like libvirt when it comes to process ids. That would b

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-02 Thread Heiko Carstens
On Thu, Jun 01, 2017 at 12:46:51PM +0200, Martin Schwidefsky wrote: > > Unfortunately, converting all page tables to 4k pgste page tables is > > not possible without provoking various race conditions. > > That is one approach we tried and was found to be buggy. The point is that > you are not allo

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-01 Thread David Hildenbrand
Hi Martin, thanks for having a look at this! >> However, we >> might be able to let 2k and 4k page tables co-exist. We only need >> 4k page tables whenever we want to expose such memory to a guest. So >> turning on 4k page table allocation at one point and only allowing such >> memory to go into

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-01 Thread Christian Borntraeger
On 06/01/2017 12:46 PM, Martin Schwidefsky wrote: > Hi David, > > it is nice to see that you are still working on s390 related topics. > > On Mon, 29 May 2017 18:32:00 +0200 > David Hildenbrand wrote: > >> Having to enable vm.alloc_pgste globally might not be the best solution. >> 4k page table

Re: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-06-01 Thread Martin Schwidefsky
Hi David, it is nice to see that you are still working on s390 related topics. On Mon, 29 May 2017 18:32:00 +0200 David Hildenbrand wrote: > Having to enable vm.alloc_pgste globally might not be the best solution. > 4k page tables are created for all processes and running QEMU KVM guests > is m

[PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste

2017-05-29 Thread David Hildenbrand
Having to enable vm.alloc_pgste globally might not be the best solution. 4k page tables are created for all processes and running QEMU KVM guests is more complicated than it should be. Unfortunately, converting all page tables to 4k pgste page tables is not possible without provoking various race