Skip to content

Commit

Permalink
Merge pull request #90 from chp-io/demo-vms-linux
Browse files Browse the repository at this point in the history
[demo] vms: Add Linux kernel with debug facilities
  • Loading branch information
chp-io authored Nov 2, 2021
2 parents 9de8f29 + 3a176a9 commit 4e9aebb
Show file tree
Hide file tree
Showing 4 changed files with 1,366 additions and 4 deletions.
4 changes: 2 additions & 2 deletions shim/linux/src/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ platform_mlock(void *const pmut_ptr, uint64_t const num, uintptr_t *pmut_os_info
{
struct page **pages = NULL;
int rc = 0;
uint64_t page_count = (num >> HYPERVISOR_PAGE_SHIFT) + 1;
uint64_t page_count = (num >> HYPERVISOR_PAGE_SHIFT);

platform_expects(((void *)0) != pmut_ptr);
platform_expects(((uint64_t)0) != num);
Expand Down Expand Up @@ -341,7 +341,7 @@ NODISCARD int64_t
platform_munlock(void *const pmut_ptr, uint64_t const num, uintptr_t const os_info) NOEXCEPT
{
struct page **pages = (struct page **)os_info;
uint64_t page_count = (num >> HYPERVISOR_PAGE_SHIFT) + 1;
uint64_t page_count = (num >> HYPERVISOR_PAGE_SHIFT);

platform_expects(((void *)0) != pmut_ptr);
platform_expects(((uint64_t)0) != num);
Expand Down
2 changes: 1 addition & 1 deletion utils/linux/qemu_strace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ -z ${BUILD_DIR+x} ]; then
fi

if [ -z ${KERNEL_PATH+x} ]; then
KERNEL_PATH="$(pwd)/vm_cross_compile/bin/bzImage-release"
KERNEL_PATH="$(pwd)/vm_cross_compile/bin/bzImage-debug"
fi

if [ -z ${INITRD_PATH+x} ]; then
Expand Down
2 changes: 1 addition & 1 deletion vms/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ macro(add_vmlinux NAME)
COMMAND sync
VERBATIM
)
# install(TARGETS ${NAME} DESTINATION bin)
endmacro(add_vmlinux)

macro(add_userspace NAME)
Expand All @@ -45,6 +44,7 @@ macro(add_userspace NAME)
endmacro(add_userspace)

add_vmlinux(release)
add_vmlinux(debug)

add_userspace(init init.cpp)

Expand Down
Loading

0 comments on commit 4e9aebb

Please sign in to comment.