IOMMU Emulation and install with QEMU - io

For now, I need to use some packages to do a emulation for IOMMU (it is similar to MMU), and I got some source about it, but I don't know how to use them.
http://www.spinics.net/lists/kvm/msg38514.html Here is a link of source for emulating IOMMU
http://repo.or.cz/w/qemu-kvm/amd-iommu.git Here is a link for downloading file for this emulation
My problem is how to use qemu to do this and there are so many file in the download list, I don't know how to use them...
Thanks for your help, really appreciate!!! If you know something detail, please tell me

you can use download option in the right side of the page ( Generally snapshot option is available in repositories )
or this
then simply use configure script to generate makefile
i.e.
use ccache if you want to recompile it again and again
$CC="ccache gcc"./configure --prefix=$PREFIX <br>
then make to build and install, use -j<no_of_cpu+1>
$make -j5 all install
if you have dependencies issue, solve them using synaptic manager or apt-get
P.S. AFAIK You should have iommu support available in hardware, if you have 64-bit machine then you might have. You can check flags in using cat /proc/cpuinfo

Related

How to update xorriso?

I am trying to learn more about operating system and am following this tutorial: https://youtu.be/ZiHtuBnVrx4?list=PLHh55M_Kq4OApWScZyPl5HhgsTJS9MZ6M. Everything was going smoothly until the point where I had to use grub-mkresuce to create an iso image to use with a virtual box. I am getting an error saying "your xorriso doesnt support '--grub2-boot-info'. Some features are disabled. Please use xorriso 1.2.9 or later.."
I am left confused and without an iso image. I have looked online for a solution but failed to find any. Any help will be greatly appreciated.
if your operating system does not offer a package "xorriso" or "libisoburn",
or if they are older than version 1.2.9 (1.3.0 was released in 2013), then
download and compile GNU xorriso. (MS-Windows users may need Cygwin to get
the necessary compiler and linker tools.)
cd ...some.work.directory...
wget https://www.gnu.org/software/xorriso/xorriso-1.5.0.tar.gz
tar xzf xorriso-1.5.0.tar.gz
cd xorriso-1.5.0
./configure && make
Check whether the result is willing to work:
xorriso/xorriso
which should say
GNU xorriso 1.5.0 : RockRidge filesystem manipulator, libburnia project.
usage : xorriso/xorriso [commands]
More is told by command -help
You do not need to install it. Rather obtain its absolute address:
ls $(pwd)/xorriso/xorriso
and use it with the grub-mkrescue option "--xorriso=":
grub-mkrescue --xorriso=...absolute.address.of.xorriso...
Have a nice day :)

Cell/BE: make use of the SPEs under Linux

Currently I'm experimenting with the Cell/BE CPU under Linux. What I'm trying to do is running simulations in the near future, e.g. about the weather or black holes.
Problem is, Linux only discovers the main CPU of the Cell (the PPE), all other SPUs (7 should be available to Linux) are "sleeping". They just don't work out of the box.
What works is the PPE and it's recognized as a two-threaded CPU with one core by the OS. Also, the SPEs are shown at every boot (with small penguins showing a red "PPE" in them), but afterwards are shown nowhere.
Is it possible to "free" these specialised cores for use by the Linux OS? If so, how?
As noone seems to be interested or can answer this question I'll provide the details myself.
In fact there exists a workaround:
First, create an entry point for the SPUFS:
# sudo mkdir /spu
Create a mount point for the filesystem so you won’t have to manually mount after a reboot. Add this line to /etc/fstab
spufs /spu spufs defaults 0 0
Now reboot and test to make sure the SPUFS is mounted (in a terminal):
spu-top
You should see the 7 SPEs running with 0% load average.
Now Google for the following package to get the runtime library and headers you need for SPE development:
libspe2-2.3.0.135.tar.gz
You should find it on the first hit. Just unpack, build, and install it:
./configure
make
sudo make install
You can ignore the build warnings (or fix them if you have obsessive compulsive disorder).
You can use pkg-config to find the location of the runtime and headers though they are in /usr/local if I recall.
You of course need the gcc-spe compiler and the rest of the PPU and SPU toolchains but those you can install with apt-get as they are in the repos.
Source: comment by Exillis via redribbongnulinux.000webhostapp.com

how to have linux kernel export /proc/[pid]/io?

Im running linux on my board and have to read info in /proc/[pid]/io. But it is not found.
For ex:
$ dd if=/dev/zero of=/tmp/aa &
[1] 926
$ cat /proc/926/io
cat: /proc/926/io: No such file or directory
Which I need enable to have kernel export that?
Many thanks for your help!
I just discovered that another thing is necessary.
I just recompiled a 4.4 kernel (for an embedded system) and enabling the CONFIG_TASKSTATS was not enough. I have to enable
CONFIG_TASKSTATS=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
in order for the /proc/<pid>/io to appear.
According to this, you need CONFIG_TASKSTATS enabled in your kernel.
You can check your current kernel's config in various ways depending on distribution, but looking at /boot/config-$(uname -r) works in Redhat flavors.
If you don't have that option configured, you'll need to recompile your kernel, or investigate why your distro doesn't enable it.

install octave *no root*, missing BLAS and LAPACK

I am trying to install octave on my machine (Scientific Linux 6.4 based on red hat) without having root access. After running the following:
./configure CPPFLAGS="-I/some_stuff/user_name/bin/pcre-8.32/include" LDFLAGS="-L/some_stuff/user_name/bin/pcre-8.32/lib"
(I had to install pcre apriori; before I got errors re: pcre), I get a message along the lines:
configure: error: You are required to have BLAS and LAPACK libraries
Now LAPACK has just been made in $HOME/bin/lapack-3.4.2 yet the same error is still there. Also $HOME/bin is part of the path.
Any way to tell the configure tool for octave about this? (the obvious thing of adding another CPPFLAG/LDFLAG does not work). I'm assuming I'll encounter more such issues along the way, so any generic help/hint is greatly appreciated.
My level of linux is rudimentary to say the least, but I'm willing to work through it.
Thanks,
Dan
Does this site shed any light on the problem? It describes the configuration options.
http://www.gnu.org/software/octave/doc/interpreter/Installation.html
First, you should rather ./configure all your software with some common prefix, such as --prefix=$HOME/soft/
Unless you know well what you are doing, I recommend against having different prefix for each installed software. You could add $HOME/soft/bin to your $PATH
And you should configure and build all the dependencies before configuring octave (and that includes BLAS, LAPACK and their dependencies).
Then, you want to pass specific configuration options, perhaps like --with-blas=$HOME/soft
I think you should pass the prefix used when configuring BLAS; you may want to run ./configure --help first.
Read carefully each package's installation instructions. For Octave, they are here. Each package has their own.
Some software may require you to configure and build outside of their source tree!

Network time protocol (NTP)

I have found a simulator called ntpdsim for NTP: http://www.eecis.udel.edu/~mills/ntp/html/ntpdsim_new.html
I canot figure out on what OS I can use it. On the page there is no download content. So I thought it is integrated in the NTP package.
I have tried Ubuntu and Opensuse. On both I have installed NTP, but there is no program called ntpdsim.
How can I use this tool?
ntpdsim is indeed part of the ntp source tarball, however apparently not included in the distribution packages you cite.
When compiling from source, you need to run ./configure with --enable-simulator to build/install it. That's at least what ./configure --help says.
Check ./configure --help to see if there's a build option you need to enable.
I think this is what you're looking for : http://doc.ntp.org/4.2.2p1/ntpdsim.html

Resources