Skip to content

Update ps architecture headers - #17

Merged
gparmer merged 1 commit into
gwsystems:masterfrom
esmakokten:ps_arch_fix
Aug 30, 2026
Merged

Update ps architecture headers#17
gparmer merged 1 commit into
gwsystems:masterfrom
esmakokten:ps_arch_fix

Conversation

@esmakokten

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings May 9, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_INITIALIZER for x86 struct ps_lock.
  • Define PS_LOCK_INITIALIZER for armv7a struct 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.
@gparmer
gparmer merged commit ca50b3f into gwsystems:master Aug 30, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants