[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 06/18] livepatch: Initial ARM64 support.
>>> On 11.09.16 at 22:35, <konrad.wilk@xxxxxxxxxx> wrote: > As compared to x86 the va of the hypervisor .text > is locked down - we cannot modify the running pagetables > to have the .ro flag unset. We borrow the same idea that > alternative patching has - which is to vmap the entire > .text region and use the alternative virtual address > for patching. > > Since we are doing vmap we may fail, hence the > arch_livepatch_quiesce was changed (see "x86,arm: > Change arch_livepatch_quiesce() declaration") to return > an error value which will be bubbled in payload->rc and > provided to the user (along with messages in the ring buffer). > > The livepatch virtual address space (where the new functions > are) needs to be close to the hypervisor virtual address > so that the trampoline can reach it. As such we re-use > the BOOT_RELOC_VIRT_START which is not used after bootup > (alternatively we can also use the space after the _end to > FIXMAP_ADDR(0), but that may be too small). > > The ELF relocation engine at the start was coded from > the "ELF for the ARM 64-bit Architecture (AArch64)" > (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056b/IHI0056B_aaelf64. > pdf) > but after a while of trying to write the correct bit shifting > and masking from scratch I ended up borrowing from Linux, the > 'reloc_insn_imm' (Linux v4.7 arch/arm64/kernel/module.c function. > See 257cb251925f854da435cbf79b140984413871ac "arm64: Loadable modules") > > And while at it - we also utilize code from Linux to construct > the right branch instruction (see "arm64/insn: introduce > aarch64_insn_gen_{nop|branch_imm}() helper functions"). > > In the livepatch payload loading code we tweak the #ifdef to > only exclude ARM_32. The exceptions are not part of ARM 32/64 hence > they are still behind the #ifdef. > > We also expand the MAINTAINERS file to include the arm64 and arm32 > platform specific livepatch file. > > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > > --- > Cc: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> > Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxx> > Cc Jan Beulich <jbeulich@xxxxxxxx> Oops. Non-ARM parts: Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |