[osv-dev] [PATCH v2 2/2] Add script to download aarch64 cross compiler toolchain

2021-02-08 Thread 'Stewart Hildebrand' via OSv Development
This is a source-able script that downloads the aarch64 toolchain from developer.arm.com, extracts it, and, when being sourced, adds the path to PATH. If ccache is installed, it will also add the ccache directory to the front of PATH. Add a check in the OSv build script to source the toolchain if

[osv-dev] [PATCH v2 0/2] Add script to download aarch64 cross compiler toolchain

2021-02-08 Thread 'Stewart Hildebrand' via OSv Development
Stewart Hildebrand (2): build: set arch in arg-parsing loop Add script to download aarch64 cross compiler toolchain scripts/build | 14 +-- scripts/download_aarch64_packages.py | 2 + scripts/download_aarch64_toolchain.sh | 55 +++ 3

[osv-dev] [PATCH v2 1/2] build: set arch in arg-parsing loop

2021-02-08 Thread 'Stewart Hildebrand' via OSv Development
Add a case in the initial argument parsing loop to both set the variable and append it to the args array. In the follow up patch, there will be a need to know if we are doing a cross build. In this case, passing arch=aarch64 is required, thus the arch= variable will be set in the initial arg

[osv-dev] Re: [PATCH] scripts: download and build arbitrary version of boost

2021-02-08 Thread 'Stewart Hildebrand' via OSv Development
On Friday, February 5, 2021 at 4:22:33 PM UTC-5 jwkoz...@gmail.com wrote: > On some distributions, like CentOS, the default version of boost > is really old. So the best option is to build a newer one from source. > Also even on Fedora or Ubuntu it might be useful to point to > different

[osv-dev] [COMMIT osv master] aarch64: make dl_tests makefile build for aarch64

2021-02-08 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Waldemar Kozaczuk Branch: master aarch64: make dl_tests makefile build for aarch64 This patch changes dl_tests makefile to delegate to modules/common.gmk to support building dl_tests module for both x64 and aarch64. This patch also effectively makes

[osv-dev] [PATCH] setup: support CentOS 7

2021-02-08 Thread Waldemar Kozaczuk
This patch modifies setup.py to support installing necessary packages to build and test OSv on CentOS 7. Please note that unlike for other distributions, we do not use default packages for gcc or qemu as these are pretty old. Instead we enable SCL repo and install Developet Toolset 9 which comes

Re: [osv-dev] [PATCH] sched: enforce tls register refresh after thread switch

2021-02-08 Thread Waldek Kozaczuk
On Monday, February 8, 2021 at 9:24:25 AM UTC-5 Nadav Har'El wrote: > On Mon, Feb 8, 2021 at 7:55 AM Waldemar Kozaczuk > wrote: > >> On RISC architecture like aarch64 the thread register tpidr_el0 that >> holds an address of thread local storage memory for current thread, >> is never accessed

[osv-dev] Re: Nginx failing after many requests

2021-02-08 Thread Waldek Kozaczuk
Hi, On Wednesday, February 3, 2021 at 11:47:13 AM UTC-5 Matthew Kenigsberg wrote: > > Hi, > > I'm trying to benchmark nginx with weighttp, but it appears to crash after > too many requests are sent. As soon as requests start failing, it seems all > following requests will fail. Any ideas why?

Re: [osv-dev] [PATCH] sched: enforce tls register refresh after thread switch

2021-02-08 Thread Nadav Har'El
On Mon, Feb 8, 2021 at 7:55 AM Waldemar Kozaczuk wrote: > On RISC architecture like aarch64 the thread register tpidr_el0 that > holds an address of thread local storage memory for current thread, > is never accessed directly in one instruction like on x86_64. Instead > compiler generates

Re: [osv-dev] GDB stub

2021-02-08 Thread Glauber Costa
On Mon., Feb. 8, 2021, 3:00 a.m. Nadav Har'El, wrote: > On Wed, Feb 3, 2021 at 1:18 AM Waldek Kozaczuk > wrote: > >> Currently, it is only possible to connect from gdb to a running instance >> of OSv on QEMU. But ideally, it would be nice to have a gdb stub in OSv >> that would let one connect

[osv-dev] Re: [PATCH 1/2] build: set arch earlier

2021-02-08 Thread 'Stewart Hildebrand' via OSv Development
On Friday, February 5, 2021 at 3:23:19 PM UTC-5 jwkoz...@gmail.com wrote: > On Thursday, February 4, 2021 at 12:48:56 PM UTC-5 > stewart.h...@dornerworks.com wrote: > >> Add a case in the initial argument parsing loop to both set the variable >> and >> append it to the args array. >> >>

Re: [osv-dev] [PATCH] scripts: allow building QEMU from sources

2021-02-08 Thread Nadav Har'El
On Mon, Feb 8, 2021 at 5:12 AM Waldemar Kozaczuk wrote: > Add new script download_and_build_qemu.sh that allows building QEMU from > sources. It installs all necessary packages to build QEMU from sources, > downloads QEMU sources and builds both x86_64 and aarch64 versions of > it. > >

[osv-dev] [COMMIT osv master] tests: handle more generic CROSS_PREFIX for aarch64 builds

2021-02-08 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master tests: handle more generic CROSS_PREFIX for aarch64 builds Instead of the gcc specific 'aarch64-linux-gnu-' CROSS_PREFIX, we look for more generic one that starts with aarch64. This makes the tests makefile function properly with

[osv-dev] [COMMIT osv master] scripts/run.py: use QEMU_PATH to use arbitrary qemu executable

2021-02-08 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master scripts/run.py: use QEMU_PATH to use arbitrary qemu executable Sometimes it is desirable to use arbitrary version of QEMU executable when running OSv on it. The scripts/run.py takes the '--qemu-path' already but there are other

[osv-dev] [COMMIT osv master] aarch64: handle R_AARCH64_COPY relocations

2021-02-08 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master aarch64: handle R_AARCH64_COPY relocations This patch enhances dynamic linker to handle COPY relocations for aarch64 which we do exactly same way for x86_64. This is enough to support running Python 3 on OSv ARM. Signed-off-by:

[osv-dev] [COMMIT osv master] aarch64: fix loader.py to use correct IP register

2021-02-08 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master aarch64: fix loader.py to use correct IP register The scripts/loader.py used by gdb to provide extra OSv specific capabilities uses wrong register x30 to reference IP - Instruction Pointer. The x30 is actually used as a LR - Link

Re: [osv-dev] [PATCH] scripts: download and build arbitrary version of boost

2021-02-08 Thread Nadav Har'El
On Fri, Feb 5, 2021 at 11:22 PM Waldemar Kozaczuk wrote: > On some distributions, like CentOS, the default version of boost > is really old. So the best option is to build a newer one from source. > Also even on Fedora or Ubuntu it might be useful to point to > different version of boost other

[osv-dev] [COMMIT osv master] tests/tst-threadcomplete.cc: disable part testing pinning when cpu == 1

2021-02-08 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master tests/tst-threadcomplete.cc: disable part testing pinning when cpu == 1 On aarch64 when running tst-threadcomplete.cc on single cpu, OSv crashes with the page fault when accessing 2nd cpu to pin some threads to. Therefore this

Re: [osv-dev] GDB stub

2021-02-08 Thread Nadav Har'El
On Wed, Feb 3, 2021 at 1:18 AM Waldek Kozaczuk wrote: > Currently, it is only possible to connect from gdb to a running instance > of OSv on QEMU. But ideally, it would be nice to have a gdb stub in OSv > that would let one connect from gdb to OSv running on any hypervisor. > > Per this fragment