Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support
On 03.07.20 00:59, Boris Ostrovsky wrote: On 7/1/20 7:06 AM, Juergen Gross wrote: Xen is requiring 64-bit machines today and since Xen 4.14 it can be built without 32-bit PV guest support. There is no need to carry the burden of 32-bit PV guest support in the kernel any longer, as new guests can be either HVM or PVH, or they can use a 64 bit kernel. Remove the 32-bit Xen PV support from the kernel. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S | 109 +-- arch/x86/include/asm/proto.h | 2 +- arch/x86/include/asm/segment.h | 2 +- arch/x86/kernel/head_32.S | 31 --- arch/x86/xen/Kconfig | 3 +- arch/x86/xen/Makefile | 3 +- arch/x86/xen/apic.c| 17 -- arch/x86/xen/enlighten_pv.c| 48 + Should we drop PageHighMem() test in set_aliased_prot()? (And there are few other places where is is used, in mmu_pv.c) Yes, will drop those. @@ -555,13 +547,8 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu) * exception between the new %fs descriptor being loaded and * %fs being effectively cleared at __switch_to(). */ - if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) { -#ifdef CONFIG_X86_32 - lazy_load_gs(0); -#else I think this also needs an adjustment to the preceding comment. Yes. -#ifdef CONFIG_X86_PAE -static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) -{ - trace_xen_mmu_set_pte_atomic(ptep, pte); - __xen_set_pte(ptep, pte); Probably not for this series but I wonder whether __xen_set_pte() should continue to use hypercall now that we are 64-bit only. As Andrew wrote already the hypercall will be cheaper. I'll adjust the comment, though. @@ -654,14 +621,12 @@ static int __xen_pgd_walk(struct mm_struct *mm, pgd_t *pgd, Comment above should be updated. Yes. Juergen
Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support
On 7/2/20 7:24 PM, Andrew Cooper wrote: > On 02/07/2020 23:59, Boris Ostrovsky wrote: >> On 7/1/20 7:06 AM, Juergen Gross wrote: >>> >>> -#ifdef CONFIG_X86_PAE >>> -static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) >>> -{ >>> - trace_xen_mmu_set_pte_atomic(ptep, pte); >>> - __xen_set_pte(ptep, pte); >> Probably not for this series but I wonder whether __xen_set_pte() should >> continue to use hypercall now that we are 64-bit only. > The hypercall path is a SYSCALL (and SYSRET out). > > The "writeable" PTE path is a #PF, followed by an x86 instruction > emulation, which then reaches the same logic as the hypercall path (and > an IRET out). Then we should at least update the comment. -boris
Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support
On 02/07/2020 23:59, Boris Ostrovsky wrote: > On 7/1/20 7:06 AM, Juergen Gross wrote: >> >> -#ifdef CONFIG_X86_PAE >> -static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) >> -{ >> -trace_xen_mmu_set_pte_atomic(ptep, pte); >> -__xen_set_pte(ptep, pte); > > Probably not for this series but I wonder whether __xen_set_pte() should > continue to use hypercall now that we are 64-bit only. The hypercall path is a SYSCALL (and SYSRET out). The "writeable" PTE path is a #PF, followed by an x86 instruction emulation, which then reaches the same logic as the hypercall path (and an IRET out). ~Andrew
Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support
On 7/1/20 7:06 AM, Juergen Gross wrote: > Xen is requiring 64-bit machines today and since Xen 4.14 it can be > built without 32-bit PV guest support. There is no need to carry the > burden of 32-bit PV guest support in the kernel any longer, as new > guests can be either HVM or PVH, or they can use a 64 bit kernel. > > Remove the 32-bit Xen PV support from the kernel. > > Signed-off-by: Juergen Gross > --- > arch/x86/entry/entry_32.S | 109 +-- > arch/x86/include/asm/proto.h | 2 +- > arch/x86/include/asm/segment.h | 2 +- > arch/x86/kernel/head_32.S | 31 --- > arch/x86/xen/Kconfig | 3 +- > arch/x86/xen/Makefile | 3 +- > arch/x86/xen/apic.c| 17 -- > arch/x86/xen/enlighten_pv.c| 48 + Should we drop PageHighMem() test in set_aliased_prot()? (And there are few other places where is is used, in mmu_pv.c) > @@ -555,13 +547,8 @@ static void xen_load_tls(struct thread_struct *t, > unsigned int cpu) >* exception between the new %fs descriptor being loaded and >* %fs being effectively cleared at __switch_to(). >*/ > - if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) { > -#ifdef CONFIG_X86_32 > - lazy_load_gs(0); > -#else I think this also needs an adjustment to the preceding comment. > > -#ifdef CONFIG_X86_PAE > -static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) > -{ > - trace_xen_mmu_set_pte_atomic(ptep, pte); > - __xen_set_pte(ptep, pte); Probably not for this series but I wonder whether __xen_set_pte() should continue to use hypercall now that we are 64-bit only. > @@ -654,14 +621,12 @@ static int __xen_pgd_walk(struct mm_struct *mm, pgd_t > *pgd, Comment above should be updated. -boris
Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support
On Wed, Jul 1, 2020 at 7:08 AM Juergen Gross wrote: > > Xen is requiring 64-bit machines today and since Xen 4.14 it can be > built without 32-bit PV guest support. There is no need to carry the > burden of 32-bit PV guest support in the kernel any longer, as new > guests can be either HVM or PVH, or they can use a 64 bit kernel. > > Remove the 32-bit Xen PV support from the kernel. If you send a v3, it would be better to split the move of the 64-bit code into xen-asm.S into a separate patch. -- Brian Gerst