Comments (11)
ARM kernel을 사용하면서 qemu를 사용할 시 CPU를 4/8개 쓰면 버그가 발생하는 이슈가 있었습니다. 겨우 찾았네요.
(Default run script가 cpu를 4개 사용합니다.)
CPU 개수를 수정하고 running하니 잘 동작합니다.
$ ./scripts/run.py -c 3 --arch=aarch64 -e 'hello'
OSv v0.56.0-156-g45ff7d3a
eth0: 192.168.122.15
Booted up in 1220.63 ms
Cmdline: hello
Hello World
다음 step은 RMM porting입니다.
from islet.
위 List는 Slack에 올린 여러가지 unikernel
중, 현재 islet
에 porting하기 위해
KVM
과 AARCH64
kernel을 지원하는 목록입니다. 몇년간 maintain되지 않은 project들은 제외하였습니다.
- 세 OS모두
AARCH64
로 kernel을 compile가능함 - Doc은
Osv
,rusty-hermit
이 잘 되어있음.Osv
의 경우 docker처럼unikernel
전용 application의 compile 환경을 제공함 (https://github.com/cloudius-systems/capstan) - 본격 porting 전
hello world
example 구동해볼 예정 / 현재 환경 셋업중인데, kernel 등 dependencies 해결 중 - 각 OS 모두 thread-safe한지 확인필요
from islet.
Progress update - Osv
- ARM용 unikernel image build
- ARM용 unikernel application build
- Application test: 다양한 test application이 있는데, 하나같이 오류가 나서 debugging중입니다
Unikernel들은 대부분 single-application / single thread를 지원합니다.
OSv는 thread-safe하지만 spin-lock
대신 lock-free
이라는 독특한 algorithm을 사용합니다.
from islet.
Osv unikernel을 가져와서 작동시켰더니 PAS 할당 시 에러가 납니다. 각 realm의 PAS 영역을 수동적으로 할당해줘서 생긴 문제 같은데, Unikernel에서는 memory mappuing구조가 어떻게 되는지 확인할 예정입니다.
from islet.
- SMP 동작을 위해 더 구현해줘야 하는 부분이 있습니다. realm으로 실행하실 때 qemu에 cpu는 1개만 지정하시겠어요?
- realm의 PAS영역을 수동으로 지정하지는 않습니다. IPA는 qemu가 결정하고, IPA에 대응되는 PA는 KVM이 결정을 하고 있어요.
IPA->PA 를 매핑해 줄 때 PA granule 그대로 GPT에 PAS 업데이트해 주고 있어요.
qemu에서 unikernel이 동작했다면 PAS 문제는 아닐 거 같습니다.
from islet.
- 제공하신 guest 에서 실행하는 qemu는 따로 cpu 개수를 수정하지 않았습니다. 일단 1개는 오류가 없는것으로 확인했습니다.
- OSv의 경우 single address space를 사용하는데, 해당 영역이 어디인지, 어떻게 할당되는지 확인해보겠습니다.
from islet.
정상적인 Kernel image에서도 같은 오류 message가 뜨는것을 확인했습니다.
Guest
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
[INFO]fvp::entry -- Initialized the console!
[INFO]fvp::entry -- pa range is 48
[INFO]fvp -- booted on core 0 with EL2!
[INFO]fvp -- booted on core 1 with EL2!
[INFO]fvp -- booted on core 2 with EL2!
[INFO]fvp -- booted on core 3 with EL2!
[INFO]fvp -- booted on core 4 with EL2!
[INFO]fvp -- booted on core 5 with EL2!
[INFO]fvp -- booted on core 6 with EL2!
[INFO]fvp -- booted on core 7 with EL2!
[INFO]armv9a::rmi::realm -- received VMCreate
[INFO]armv9a::rmi::realm -- create VM 0
[INFO]armv9a::rmi::realm -- received VMCreate
[INFO]armv9a::rmi::realm -- create VM 1
[WARN]armv9a::rmi::realm -- failed to set GPT 8857DD000
rmm
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ERROR: RMMD: PAS Transition failed. GPT ret = -22, PA: 0x8857dd000, FID = 0xc40001b0
문제는 해당 message이후로 hang이 걸립니다. Osv Image같은 경우 hello message를 출력하거나 오류메시지가 나와야 되는데 해당 메시지가 나오기 전에 Hang이 걸리는것 같네요.
- 추가로, Osv에 console driver가 있는 것을 확인했습니다.
from islet.
네 확인해 주셔서 감사합니다. 뭐가 잘못 됐는지 확인할께요.
from islet.
osv상에서 간단한 webassembly example을 한번 작동시켜 보겠습니다.
이후 JVM, multithread test까지 완료되면 다른 benchmark suit도 시도해보면 될 것 같습니다.
다음 step으로, 아직 islet에서 해결되지 않은 issue들을 한번 살펴보고, kernel과 유저가 메모리를 공유하는 환경에서
해당 Issue들과 관계는 없는지 확인해야 될 것 같습니다.
from islet.
@oxsignal 건우님,
bootloader 쪽 코드가 제가 사용하던 버전과 올라온 버전이 다릅니다. ㅠㅠ
trusted-firmware-a 프로젝트가 코드가 자주 바뀌면서 각 sw stack(bl1, bl2, bl31, normal world, secure world 등)이 사용하는 메모리 레이아웃이 좀 달라진거 같습니다. 찬찬히 들여다보고 fix를 하겠습니다. (단순히 제가 사용하는 커밋으로 checkout을 했는데도 코드가 다르네요...)
제가 코드를 fix하는 동안, https://github.com/Samsung/islet-asset/tree/debug/prebuilt/tf-a 에 올라온 bin 파일들을 commit 메시지에 나온 대로 islet/trusted-firmware-a/build/fvp/debug/ 에 overwite하신 다음 다시 실행해 보시겠어요?
다시 빌드 하셔야 합니다.
./script/fvp-cca -bo -nw linux -vm linux
./script/fvp-cca -ro -nw linux -vm linux
from islet.
islet main에 반영했습니다.(위에 남긴 커멘드는 무시하셔도 됩니다.) 기존 디렉토리 삭제하신 후 다시 빌드 하시겠어요?
rm -rf upstream-trusted-firmware
rm -rf trusted-firmware
git checkout upstream-trusted-firmware
./script/init.sh
./script/fvp-cca -bo -nw linux -vm linux
./script/fvp-cca -ro -nw linux -vm linux
from islet.
Related Issues (20)
- A secure yet efficient way to access from child (Rec) to parent (Rd) HOT 4
- rust-rsi issue & SDK problem HOT 6
- Running islet with --normal-world=linux-net breaks network configuration on the host HOT 4
- Network is not configured on the realm HOT 5
- Compilation fails due to the latest switch from rsa to openssl HOT 1
- The list of code patterns where verification does not work well HOT 1
- Transfer projects from samsung/islet* to islet-projects/islet* HOT 1
- Rule checker workflow is failing on the main branch HOT 1
- Islet-cli segfaults, when launched from /shared folder with rmm=islet HOT 11
- Insert autopadding HOT 1
- Reproduce veraison demo HOT 5
- How to get a CCA machine or simulate CCA chip on X86_64? HOT 1
- RTT_INIT_RIPAS error due to some garbage in the delegated granule for RTT. HOT 1
- Failed to reproduce confidential-ml example HOT 1
- RMM v1.0-eac5 support HOT 1
- autopadding: Cannot cover struct type with a field in the struct
- Failure of unsafe-analyzer analysis
- Mentorship Opportunity for CCC Projects
- realm measurement using veraison HOT 9
- Issues with safety traits and interrupting attestation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from islet.