Update ps architecture headers - #17
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a missing PS_LOCK_INITIALIZER macro alongside struct ps_lock in the per-architecture headers so callers (e.g., capmgr) can statically initialize ps_lock instances consistently across supported architectures.
Changes:
- Define
PS_LOCK_INITIALIZERfor x86struct ps_lock. - Define
PS_LOCK_INITIALIZERfor armv7astruct ps_lock.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plat/arch/x86/ps_arch_x86_common.h | Adds PS_LOCK_INITIALIZER for static initialization of struct ps_lock. |
| plat/arch/armv7a/ps_arch_armv7a_common.h | Adds PS_LOCK_INITIALIZER for static initialization of struct ps_lock. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
esmakokten
added a commit
to esmakokten/composite
that referenced
this pull request
Aug 29, 2026
simple_vmm.c INCBINs guest/vmlinux.img, but nothing built it. The image was
produced out of tree and copied in by hand -- vmm_simple_test.toml documents the
copy in a comment -- so guest/ accumulated unlabelled vmlinux*.img variants with
no record of what kernel, config or initramfs produced any of them.
Adds cos-vmimg as a submodule at simple_vmm/vmimg and builds the image from it.
It builds an unmodified upstream kernel with a BusyBox initramfs, byte
reproducibly, and writes a manifest next to the image recording the kernel
version, config and initramfs hashes and the program list. VM_IMAGE selects a
recipe:
./cos build # shell: BusyBox prompt
VM_IMAGE=vmexit-bench ./cos build
The submodule is pinned to the kernel-5.15.107 tag rather than tracking a
branch. cos-vmimg's main follows the current kernel and older lines are frozen
as tags, so moving the guest forward is a deliberate bump rather than something
that happens underneath this tree.
Also makes guest/vmlinux.img and guest/guest.img explicit prerequisites of
simple_vmm.o. Makefile.subsubdir has 'all: ... $(COMPOBJ) private' and make
builds prerequisites left to right, so simple_vmm.c was compiled before the
private target populated guest/. That worked only because a previous build left
an image behind; a fresh checkout had nothing to embed.
Note: building this branch requires gwsystems/ps#17, which adds the
PS_LOCK_INITIALIZER macro that capmgr.c already uses. Without it the tree does
not compile, independently of this change.
esmakokten
added a commit
to esmakokten/composite
that referenced
this pull request
Aug 29, 2026
simple_vmm.c INCBINs guest/vmlinux.img, but nothing built it. The image was
produced out of tree and copied in by hand -- vmm_simple_test.toml documents the
copy in a comment -- so guest/ accumulated unlabelled vmlinux*.img variants with
no record of what kernel, config or initramfs produced any of them.
Adds cos-vmimg as a submodule at simple_vmm/vmimg and builds the image from it.
It builds an unmodified upstream kernel with a BusyBox initramfs, byte
reproducibly, and writes a manifest next to the image recording the kernel
version, config and initramfs hashes and the program list. VM_IMAGE selects a
recipe:
./cos build # shell: BusyBox prompt
VM_IMAGE=vmexit-bench ./cos build
The submodule is pinned to the kernel-5.15.107 tag rather than tracking a
branch. cos-vmimg's main follows the current kernel and older lines are frozen
as tags, so moving the guest forward is a deliberate bump rather than something
that happens underneath this tree.
Also makes guest/vmlinux.img and guest/guest.img explicit prerequisites of
simple_vmm.o. Makefile.subsubdir has 'all: ... $(COMPOBJ) private' and make
builds prerequisites left to right, so simple_vmm.c was compiled before the
private target populated guest/. That worked only because a previous build left
an image behind; a fresh checkout had nothing to embed.
Note: building this branch requires gwsystems/ps#17, which adds the
PS_LOCK_INITIALIZER macro that capmgr.c already uses. Without it the tree does
not compile, independently of this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a PS_LOCK_INITIALIZER macro to struct ps_lock for both supported architectures.
Capmgr uses static-storage initialization of a ps_lock. Before this change the macro didn't exist in master, so that line wouldn't compile. The fix adds matching definitions.