lkml.org 
[lkml]   [2017]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste
    On Thu, Jun 08, 2017 at 01:24:01PM +0200, Martin Schwidefsky wrote:
    > On Thu, 8 Jun 2017 08:25:31 +0200
    > Heiko Carstens <heiko.carstens@de.ibm.com> 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 sort of odd, isn't it? And that later on it won't be able to
    > > create a virtual machine because our current implementation doesn't allow
    > > that for compat tasks is sort of unrelated.
    > > But anyway, I'll leave that up to you, it doesn't really matter.
    >
    > Actually the code will be less complex if we add PT_S390_REQUEST_PGSTE for
    > 32-bit ELF files as well. It does not make sense to define the segment for
    > a compat process as KVM won't work but you get what you ask for..
    >
    > This looks like this:
    >
    > #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \
    > ({ \
    > int _rc = 0; \
    > if (phdr->p_type == PT_S390_REQUEST_PGSTE && \
    > !page_table_allocate_pgste && \
    > !test_thread_flag(TIF_REQUEST_PGSTE)) { \
    > set_thread_flag(TIF_REQUEST_PGSTE); \
    > set_pt_regs_flag(task_pt_regs(current), \
    > PIF_SYSCALL_RESTART); \
    > _rc = -EAGAIN; \
    > } \
    > _rc; \
    > })
    >
    > phdr is a (struct elf_phd *) which is either define to a a (struct elf64_phdr *)
    > or a (struct elf32_phdr *). The check works in both cases.

    Yes, that makes sense.

    \
     
     \ /
      Last update: 2017-06-12 01:27    [W:2.038 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site