Skip to content

Preliminary macOS support for nocc mode#1101

Merged
stefano-garzarella merged 2 commits into
coconut-svsm:mainfrom
luigix25:macos_support
Jun 4, 2026
Merged

Preliminary macOS support for nocc mode#1101
stefano-garzarella merged 2 commits into
coconut-svsm:mainfrom
luigix25:macos_support

Conversation

@luigix25

@luigix25 luigix25 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

This PR allows to boot SVSM on macOS (and probably *BSD)

The changes are minimal:

  • Switch to a different memory-backend in QEMU for nocc mode.
  • Switch to BSD-compatible commands (eg: grep -P is GNU-only)

Note: virtio-vsock and virtio-blk will NOT work as is, as they require vhost-device, that is linux-specific. We could fall back to vhost-user, but is not really needed for now.

Note 2: cross compiling on ARM is still not possible yet. There is some ongoing work but is not ready yet (#971 #981)

Note 3: IGVM also relies on some GNU-only commands, I opened a PR to fix it (microsoft/igvm#123)

Comment thread scripts/launch_guest.sh Outdated
Comment thread scripts/launch_guest.sh Outdated
@luigix25

luigix25 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

[@stefano-garzarella]

Addressed review comments:

  • Ram size is now a standalone variable
  • memory-backend-memfd is now defined in the sev branch

@stefano-garzarella stefano-garzarella added the in-review PR is under active review and not yet approved label Jun 3, 2026
Comment thread scripts/launch_guest.sh
luigix25 added 2 commits June 3, 2026 14:03
`memory-backend-memfd` is required for `guest_memfd`. Since `nocc`
mode does not boot a confidential guest, `guest_memfd` is not
needed, and a portable memory backend can be used instead.

Being a linux-specific backend, this prevents booting SVSM on a
different operating system.

Also, remove `reserve` from the backend parameters, that is
linux-specific and not needed in nocc mode.

This is preliminary work to allow SVSM to boot on macOS using tcg.

Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
`grep -P` is a GNU grep extension not available on macOS and *BSD,
where the system grep is BSD grep.

Replace it with an equivalent `sed` expression to extract the
QEMU version string.

Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
@luigix25

luigix25 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

improved commit message @stefano-garzarella

@stefano-garzarella stefano-garzarella merged commit 4d79b48 into coconut-svsm:main Jun 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-review PR is under active review and not yet approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants