Skip to content
This repository was archived by the owner on Oct 26, 2021. It is now read-only.

Conversation

@haraldh
Copy link
Contributor

@haraldh haraldh commented Nov 26, 2020

  • feat(shim-sev): Use multiple sallyport::Block

    Because the setup area is limited in memory size, not each thread can
    get its own sallyport::Block to communicate with the host.

    Therefore a pool of blocks is reserved, which can be dynamically used
    by the shim indicating the actual block via the value passed in the
    IOPort.

    A future extension could reserve additional blocks via a enarx specific
    syscall.

    This patch also removes the now obsolete backend::kvm::vm::Builder::Config.

    Fixes: shim-sev: use multiple blocks for host <-> shim communication #156

  • fix(shim-sev): rename ALIGN_ABOVE_2MB

    Rename ALIGN_ABOVE_2MB to MAX_SETUP_SIZE to reflect its meaning.

@enarxbot enarxbot requested a review from ueno November 26, 2020 14:34
@haraldh
Copy link
Contributor Author

haraldh commented Nov 26, 2020

Needs #188 first

@haraldh haraldh marked this pull request as draft November 26, 2020 14:34
@haraldh haraldh force-pushed the sev_concurrent_syscalls branch 4 times, most recently from 4b8fdd8 to b604515 Compare November 27, 2020 09:01
Rename `ALIGN_ABOVE_2MB` to `MAX_SETUP_SIZE` to reflect its meaning.

Signed-off-by: Harald Hoyer <[email protected]>
@haraldh haraldh force-pushed the sev_concurrent_syscalls branch from b604515 to 026c5a6 Compare November 30, 2020 15:38
@haraldh haraldh marked this pull request as ready for review November 30, 2020 15:38
@haraldh haraldh requested a review from lkatalin November 30, 2020 15:38
pub const N_SYSCALL_BLOCKS: usize =
(MAX_SETUP_SIZE - size_of::<SetupRegionPre>()) / size_of::<Block>();

pub struct Config;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think Config can be removed. Unless we want the number of syscall blocks to be configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Because the setup area is limited in memory size, not each thread can
get its own `sallyport::Block` to communicate with the host.

Therefore a pool of blocks is reserved, which can be dynamically used
by the shim indicating the actual block via the value passed in the
IOPort.

A future extension could reserve additional blocks via a enarx specific
syscall.

This patch also removes the now obsolete `backend::kvm::vm::Builder::Config`.

Fixes: enarx-archive#156

Signed-off-by: Harald Hoyer <[email protected]>
@haraldh haraldh force-pushed the sev_concurrent_syscalls branch from 026c5a6 to d768211 Compare November 30, 2020 15:51
@haraldh
Copy link
Contributor Author

haraldh commented Nov 30, 2020

also removed backend::kvm::vm::Builder::Config

@enarxbot enarxbot merged commit adce82e into enarx-archive:master Nov 30, 2020
@haraldh haraldh deleted the sev_concurrent_syscalls branch December 4, 2020 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shim-sev: use multiple blocks for host <-> shim communication

6 participants