Code Monkey home page Code Monkey logo

Comments (11)

JG3779 avatar JG3779 commented on August 18, 2024

Would appreciate the instructions as well.

from captive.

tspink avatar tspink commented on August 18, 2024

Hello, and thanks for getting in touch!

Just to keep you updated - I'm working on a README that should help you get started.

Tom

from captive.

bharadwajy avatar bharadwajy commented on August 18, 2024

Great! Thanks for your response. I'll look forward to the document.

from captive.

tspink avatar tspink commented on August 18, 2024

I've uploaded a README that should get you started - let me know if it can be improved, or if you need any help!

Tom

from captive.

superDong1998 avatar superDong1998 commented on August 18, 2024

hi! @tspink can you please give some more detailed requirements or steps about ARM userspace?

thanks!

from captive.

tspink avatar tspink commented on August 18, 2024

Hi @superDong1998,

Probably the easiest way to get started is to use the Arch Linux AArch64 system. You need to do the following:

  1. Create a block device file
  2. Format it
  3. Mount it
  4. Downloand and extract the distribution into the filesystem
  5. Unmount it
  6. Load it!

A typical sequence of commands (you'll need to be root to do most of these) might be:

# truncate -s 8G arm64-linux.img
# losetup -f --show arm64-linux.img
/dev/loop0
# mkfs.ext4 /dev/loop0
# mount /dev/loop0 /mnt
# wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
# bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt
# umount /mnt
# losetup -d /dev/loop0

Note: I'm writing these commands off the top of my head, so YMMV and be very careful when executing commands as root. In particular, make sure the loopback device is correct when you start formatting and mount it. I take no responsibility for erased hard-drives.

What's going on here is that we're using truncate to create an 8G sparse file, then losetup is creating a loopback block device, backed by the new file. We then format it (mkfs.ext4) with an ext4 filesystem, mount the resulting filesystem, and extract the Arch Linux AArch64 userspace into it. Finally, we unmount it, and remove the loopback device.

Now, the file arm64-linux.img contains an Arch Linux AArch64 userspace, that be used to boot captive.

Hope this helps! Let me know if you need further clarification!

-- Tom

from captive.

superDong1998 avatar superDong1998 commented on August 18, 2024

from captive.

tspink avatar tspink commented on August 18, 2024

Thanks for the feedback! Could you try commenting out this line:

https://github.com/tspink/captive/blob/ef80250b1502fa6e372c1692e68c2d1cb21f6a0d/src/hypervisor/kvm/cpu.cpp#L224

And see if you get any further?

from captive.

superDong1998 avatar superDong1998 commented on August 18, 2024

Hi, tom!
Thanks for the advice, but it seems doesn't work either, it still same question as I mentioned before.

Sorry to bother you anther time.

-alex

from captive.

tspink avatar tspink commented on August 18, 2024

That's OK - it just means Captive is trying to enable a feature that is not supported on your host CPU. Try also commenting out line 238 - enabling the NX bit.

from captive.

superDong1998 avatar superDong1998 commented on August 18, 2024

hi! Tom,
I have installed captive successfully, thanks very much for your previous help.

Recently I did some experiments on captive, but I was a little confused about the result performed on my machine compared the data in your paper published in ATC19. Here are my evaluation details:

host machine:

Intel Xeon Gold 5218 with 16 cores

OS: CentOS 7.7 with kernel 3.10

captive configurations:

Linux AArch64 kernel 5.7

full-fledged user-space with ArchLinuxARM-aarch64-latest.tar.gz

benchmark configurations :

SPEC2006 INT benchmark suite which compiled by aarch64-linux-gnu, version gcc 7.5.0 with opt flag -O2 static both on gcc and g++

I have tested SPEC2006 INT benchmarks both on captive and native(native benchmarks compiled with same version of gcc and same opt flag, and runs on my host machine). It turns out captive has about 25X slowdown compared to native, while this result is 7.24X in the paper.

So I was wondering if I missed some other details during the installation of captive which caused this result, or there is something wrong with the machine or environment I used, could you please help me take a look?

Many thanks!

-alex

from captive.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.