gem5-users@gem5.org

The gem5 Users mailing list

View all threads

IGbE / Intel 8254x - NIC support on Gem5?

R
rshankar2@austin.rr.com
Tue, May 10, 2022 10:44 PM

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py running
in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface card
implemented, tested and verified is the Intel 8254x based gigabit Ethernet
adapter. It is provided as a PCI GEM5 network device using the e1000 Linux
driver.

However, the latest version of GEM5 supports this real-network device only
on ARM-based architectures. In the scope of COSSIM, GEM5 has been recently
modified so as to support the Intel 8254x network card for the x86 ISA

Hello, I'd like to add a NIC to simple Gem5 model derived from two_level.py running in SE mode, x86 CPU. Is this supported in Gem5? Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay on Gem5 - so any guidance here is appreciated. GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release <https://github.com/H2020-COSSIM/cgem5> In GEM5's publicly available repositories, the only network interface card implemented, tested and verified is the Intel 8254x based gigabit Ethernet adapter. It is provided as a PCI GEM5 network device using the e1000 Linux driver. However, the latest version of GEM5 supports this real-network device only on ARM-based architectures. In the scope of COSSIM, GEM5 has been recently modified so as to support the Intel 8254x network card for the x86 ISA
Νικόλαος Ταμπουρατζής
Wed, May 11, 2022 5:10 PM

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode
in order to load the correct drivers etc. You can add the following in
order to add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt
cd /mnt
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on
/home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456)
The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You
can use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM
paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com:

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py running
in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface card
implemented, tested and verified is the Intel 8254x based gigabit Ethernet
adapter. It is provided as a PCI GEM5 network device using the e1000 Linux
driver.

However, the latest version of GEM5 supports this real-network device only
on ARM-based architectures. In the scope of COSSIM, GEM5 has been recently
modified so as to support the Intel 8254x network card for the x86 ISA

Dear rshankar, As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode: https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py (see the lines with #COSSIM) https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py (lines 636, 674-676) Build the gem5. You need download the vmlinux-5.4.49 kernel from here: https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel You need download the x86-ubuntu.img image from here: http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . cd root nano gem5_init.sh #Add the following script: #!/bin/bash # Copyright (c) 2021 The University of Texas at Austin. # SPDX-License-Identifier: BSD 3-Clause echo "Starting gem5 init... reading run script file." if ! m5 readfile > /tmp/script; then echo "Failed to run m5 readfile, exiting!!" rm -f /tmp/script if ! m5 exit; then # Useful for booting the disk image in (e.g.,) qemu for debugging echo "m5 exit failed, dropping to shell." /bin/sh fi else echo "Running m5 script from /tmp/script !!" chmod 755 /tmp/script /tmp/script echo "Done running script, exiting." rm -f /tmp/script /bin/sh #m5 exit fi exit # now we are back to the host system cd sudo umount /mnt/proc sudo umount /mnt/dev sudo umount /mnt Now, you may use this cmd to start the FS execution: /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457) After boot, you need add the localhost and IP in both terminals (eg. ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality. If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934 If someone has configured the NIC with SE mode, please give us details! :) Best regards, Nikolaos Tampouratzis Quoting rshankar2@austin.rr.com: > Hello, > > > > I'd like to add a NIC to simple Gem5 model derived from two_level.py running > in SE mode, x86 CPU. > > Is this supported in Gem5? > > > > Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay on > Gem5 - so any guidance here is appreciated. > > > > GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release > <https://github.com/H2020-COSSIM/cgem5> > > > > In GEM5's publicly available repositories, the only network interface card > implemented, tested and verified is the Intel 8254x based gigabit Ethernet > adapter. It is provided as a PCI GEM5 network device using the e1000 Linux > driver. > > However, the latest version of GEM5 supports this real-network device only > on ARM-based architectures. In the scope of COSSIM, GEM5 has been recently > modified so as to support the Intel 8254x network card for the x86 ISA
R
rshankar2@austin.rr.com
Wed, May 11, 2022 5:57 PM

Thanks very much Nikolaos for the detailed step-by-step response. This is
highly appreciated.  I'll try and get back

Raghu

-----Original Message-----
From: Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr
Sent: Wednesday, May 11, 2022 12:10 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode in
order to load the correct drivers etc. You can add the following in order to
add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount
--bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on
/home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is
in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can
use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM
paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com:

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py
running in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay
on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface
card implemented, tested and verified is the Intel 8254x based gigabit
Ethernet adapter. It is provided as a PCI GEM5 network device using
the e1000 Linux driver.

However, the latest version of GEM5 supports this real-network device
only on ARM-based architectures. In the scope of COSSIM, GEM5 has been
recently modified so as to support the Intel 8254x network card for
the x86 ISA


gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email
to gem5-users-leave@gem5.org

Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated. I'll try and get back Raghu -----Original Message----- From: Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr> Sent: Wednesday, May 11, 2022 12:10 PM To: The gem5 Users mailing list <gem5-users@gem5.org> Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? Dear rshankar, As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode: https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py (see the lines with #COSSIM) https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py (lines 636, 674-676) Build the gem5. You need download the vmlinux-5.4.49 kernel from here: https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel You need download the x86-ubuntu.img image from here: http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . cd root nano gem5_init.sh #Add the following script: #!/bin/bash # Copyright (c) 2021 The University of Texas at Austin. # SPDX-License-Identifier: BSD 3-Clause echo "Starting gem5 init... reading run script file." if ! m5 readfile > /tmp/script; then echo "Failed to run m5 readfile, exiting!!" rm -f /tmp/script if ! m5 exit; then # Useful for booting the disk image in (e.g.,) qemu for debugging echo "m5 exit failed, dropping to shell." /bin/sh fi else echo "Running m5 script from /tmp/script !!" chmod 755 /tmp/script /tmp/script echo "Done running script, exiting." rm -f /tmp/script /bin/sh #m5 exit fi exit # now we are back to the host system cd sudo umount /mnt/proc sudo umount /mnt/dev sudo umount /mnt Now, you may use this cmd to start the FS execution: /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457) After boot, you need add the localhost and IP in both terminals (eg. ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality. If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934 If someone has configured the NIC with SE mode, please give us details! :) Best regards, Nikolaos Tampouratzis Quoting rshankar2@austin.rr.com: > Hello, > > > > I'd like to add a NIC to simple Gem5 model derived from two_level.py > running in SE mode, x86 CPU. > > Is this supported in Gem5? > > > > Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay > on > Gem5 - so any guidance here is appreciated. > > > > GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release > <https://github.com/H2020-COSSIM/cgem5> > > > > In GEM5's publicly available repositories, the only network interface > card implemented, tested and verified is the Intel 8254x based gigabit > Ethernet adapter. It is provided as a PCI GEM5 network device using > the e1000 Linux driver. > > However, the latest version of GEM5 supports this real-network device > only on ARM-based architectures. In the scope of COSSIM, GEM5 has been > recently modified so as to support the Intel 8254x network card for > the x86 ISA _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org
R
rshankar2@austin.rr.com
Wed, May 11, 2022 7:59 PM

Nikolaos.
A related question - Are the 2 code streams of cgem5 & gem5 - kept consistent to each other?  So users can benefit from updates on either stream (I'm not sure how that works today). If one switches to cgem5 stream do we lose improvements happening on gem5 stream?

Also, thanks for your research work, community share of COSSIM gem5, and paper below (which I had a copy from before 😊)

Raghu

-----Original Message-----
From: rshankar2@austin.rr.com rshankar2@austin.rr.com
Sent: Wednesday, May 11, 2022 12:58 PM
To: 'The gem5 Users mailing list' gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated.  I'll try and get back

Raghu

-----Original Message-----
From: Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr
Sent: Wednesday, May 11, 2022 12:10 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com:

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py
running in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay
on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface
card implemented, tested and verified is the Intel 8254x based gigabit
Ethernet adapter. It is provided as a PCI GEM5 network device using
the e1000 Linux driver.

However, the latest version of GEM5 supports this real-network device
only on ARM-based architectures. In the scope of COSSIM, GEM5 has been
recently modified so as to support the Intel 8254x network card for
the x86 ISA


gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org _______________________________________________
gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org

Nikolaos. A related question - Are the 2 code streams of cgem5 & gem5 - kept consistent to each other? So users can benefit from updates on either stream (I'm not sure how that works today). If one switches to cgem5 stream do we lose improvements happening on gem5 stream? Also, thanks for your research work, community share of COSSIM gem5, and paper below (which I had a copy from before 😊) Raghu -----Original Message----- From: rshankar2@austin.rr.com <rshankar2@austin.rr.com> Sent: Wednesday, May 11, 2022 12:58 PM To: 'The gem5 Users mailing list' <gem5-users@gem5.org> Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated. I'll try and get back Raghu -----Original Message----- From: Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr> Sent: Wednesday, May 11, 2022 12:10 PM To: The gem5 Users mailing list <gem5-users@gem5.org> Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? Dear rshankar, As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode: https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py (see the lines with #COSSIM) https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py (lines 636, 674-676) Build the gem5. You need download the vmlinux-5.4.49 kernel from here: https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel You need download the x86-ubuntu.img image from here: http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . cd root nano gem5_init.sh #Add the following script: #!/bin/bash # Copyright (c) 2021 The University of Texas at Austin. # SPDX-License-Identifier: BSD 3-Clause echo "Starting gem5 init... reading run script file." if ! m5 readfile > /tmp/script; then echo "Failed to run m5 readfile, exiting!!" rm -f /tmp/script if ! m5 exit; then # Useful for booting the disk image in (e.g.,) qemu for debugging echo "m5 exit failed, dropping to shell." /bin/sh fi else echo "Running m5 script from /tmp/script !!" chmod 755 /tmp/script /tmp/script echo "Done running script, exiting." rm -f /tmp/script /bin/sh #m5 exit fi exit # now we are back to the host system cd sudo umount /mnt/proc sudo umount /mnt/dev sudo umount /mnt Now, you may use this cmd to start the FS execution: /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457) After boot, you need add the localhost and IP in both terminals (eg. ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality. If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934 If someone has configured the NIC with SE mode, please give us details! :) Best regards, Nikolaos Tampouratzis Quoting rshankar2@austin.rr.com: > Hello, > > > > I'd like to add a NIC to simple Gem5 model derived from two_level.py > running in SE mode, x86 CPU. > > Is this supported in Gem5? > > > > Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay > on > Gem5 - so any guidance here is appreciated. > > > > GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release > <https://github.com/H2020-COSSIM/cgem5> > > > > In GEM5's publicly available repositories, the only network interface > card implemented, tested and verified is the Intel 8254x based gigabit > Ethernet adapter. It is provided as a PCI GEM5 network device using > the e1000 Linux driver. > > However, the latest version of GEM5 supports this real-network device > only on ARM-based architectures. In the scope of COSSIM, GEM5 has been > recently modified so as to support the Intel 8254x network card for > the x86 ISA _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org
Νικόλαος Ταμπουρατζή ς
Wed, May 11, 2022 8:13 PM

Dear Raghu,

The steps which I sent you is for dual gem5 (not for cgem5). In this scenario, two gem5s is connected through Etherlink (virtual dummy link) without switches etc. Also in this scenario both two gem5s is working in one thread (for this reason does not need synchronization). So you do not need the COSSIM and cgem5. You only need download the latest official gem5 and patch it using my previous steps to add the NIC.

COSSIM uses OMNET++ and it is much more complex as you can see in the paper.

Best regards,
Nikolaos Tampouratzis

11 Μαΐ 2022, 11:02 μμ, ο χρήστης «rshankar2@austin.rr.com» έγραψε:

Nikolaos.
A related question - Are the 2 code streams of cgem5 & gem5 - kept consistent to each other?  So users can benefit from updates on either stream (I'm not sure how that works today). If one switches to cgem5 stream do we lose improvements happening on gem5 stream?

Also, thanks for your research work, community share of COSSIM gem5, and paper below (which I had a copy from before 😊)

Raghu

-----Original Message-----
From: rshankar2@austin.rr.com rshankar2@austin.rr.com
Sent: Wednesday, May 11, 2022 12:58 PM
To: 'The gem5 Users mailing list' gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated.  I'll try and get back

Raghu

-----Original Message-----
From: Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr
Sent: Wednesday, May 11, 2022 12:10 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com:

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py
running in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay
on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface
card implemented, tested and verified is the Intel 8254x based gigabit
Ethernet adapter. It is provided as a PCI GEM5 network device using
the e1000 Linux driver.

However, the latest version of GEM5 supports this real-network device
only on ARM-based architectures. In the scope of COSSIM, GEM5 has been
recently modified so as to support the Intel 8254x network card for
the x86 ISA


gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org _______________________________________________
gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Dear Raghu, The steps which I sent you is for dual gem5 (not for cgem5). In this scenario, two gem5s is connected through Etherlink (virtual dummy link) without switches etc. Also in this scenario both two gem5s is working in one thread (for this reason does not need synchronization). So you do not need the COSSIM and cgem5. You only need download the latest official gem5 and patch it using my previous steps to add the NIC. COSSIM uses OMNET++ and it is much more complex as you can see in the paper. Best regards, Nikolaos Tampouratzis > 11 Μαΐ 2022, 11:02 μμ, ο χρήστης «rshankar2@austin.rr.com» έγραψε: > > Nikolaos. > A related question - Are the 2 code streams of cgem5 & gem5 - kept consistent to each other? So users can benefit from updates on either stream (I'm not sure how that works today). If one switches to cgem5 stream do we lose improvements happening on gem5 stream? > > Also, thanks for your research work, community share of COSSIM gem5, and paper below (which I had a copy from before 😊) > > Raghu > > -----Original Message----- > From: rshankar2@austin.rr.com <rshankar2@austin.rr.com> > Sent: Wednesday, May 11, 2022 12:58 PM > To: 'The gem5 Users mailing list' <gem5-users@gem5.org> > Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? > > Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated. I'll try and get back > > Raghu > > -----Original Message----- > From: Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr> > Sent: Wednesday, May 11, 2022 12:10 PM > To: The gem5 Users mailing list <gem5-users@gem5.org> > Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? > > Dear rshankar, > > As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode: > > https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py > (see the lines with #COSSIM) > https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py > (lines 636, 674-676) > > Build the gem5. > > You need download the vmlinux-5.4.49 kernel from here: > https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel > > You need download the x86-ubuntu.img image from here: > http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz > > Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: > > sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . > cd root > nano gem5_init.sh #Add the following script: > > #!/bin/bash > > # Copyright (c) 2021 The University of Texas at Austin. > # SPDX-License-Identifier: BSD 3-Clause > > echo "Starting gem5 init... reading run script file." > if ! m5 readfile > /tmp/script; then > echo "Failed to run m5 readfile, exiting!!" > rm -f /tmp/script > if ! m5 exit; then > # Useful for booting the disk image in (e.g.,) qemu for debugging > echo "m5 exit failed, dropping to shell." > /bin/sh > fi > else > echo "Running m5 script from /tmp/script !!" > chmod 755 /tmp/script > /tmp/script > echo "Done running script, exiting." > rm -f /tmp/script > /bin/sh > #m5 exit > fi > > > > exit > # now we are back to the host system > cd > sudo umount /mnt/proc > sudo umount /mnt/dev > sudo umount /mnt > > > Now, you may use this cmd to start the FS execution: > > /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py > --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual > > The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457) > > After boot, you need add the localhost and IP in both terminals (eg. > ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality. > > If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934 > > If someone has configured the NIC with SE mode, please give us details! :) > > Best regards, > Nikolaos Tampouratzis > > > > Quoting rshankar2@austin.rr.com: > >> Hello, >> >> >> >> I'd like to add a NIC to simple Gem5 model derived from two_level.py >> running in SE mode, x86 CPU. >> >> Is this supported in Gem5? >> >> >> >> Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay >> on >> Gem5 - so any guidance here is appreciated. >> >> >> >> GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release >> <https://github.com/H2020-COSSIM/cgem5> >> >> >> >> In GEM5's publicly available repositories, the only network interface >> card implemented, tested and verified is the Intel 8254x based gigabit >> Ethernet adapter. It is provided as a PCI GEM5 network device using >> the e1000 Linux driver. >> >> However, the latest version of GEM5 supports this real-network device >> only on ARM-based architectures. In the scope of COSSIM, GEM5 has been >> recently modified so as to support the Intel 8254x network card for >> the x86 ISA > > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >
Νικόλαος Ταμπουρατζή ς
Wed, May 11, 2022 8:19 PM

We have not synchronize the COSSIM code in official gem5 release because it requires HLA libriries.

11 Μαΐ 2022, 11:13 μμ, ο χρήστης «Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr» έγραψε:

Dear Raghu,

The steps which I sent you is for dual gem5 (not for cgem5). In this scenario, two gem5s is connected through Etherlink (virtual dummy link) without switches etc. Also in this scenario both two gem5s is working in one thread (for this reason does not need synchronization). So you do not need the COSSIM and cgem5. You only need download the latest official gem5 and patch it using my previous steps to add the NIC.

COSSIM uses OMNET++ and it is much more complex as you can see in the paper.

Best regards,
Nikolaos Tampouratzis

11 Μαΐ 2022, 11:02 μμ, ο χρήστης «rshankar2@austin.rr.com» έγραψε:

Nikolaos.
A related question - Are the 2 code streams of cgem5 & gem5 - kept consistent to each other?  So users can benefit from updates on either stream (I'm not sure how that works today). If one switches to cgem5 stream do we lose improvements happening on gem5 stream?

Also, thanks for your research work, community share of COSSIM gem5, and paper below (which I had a copy from before 😊)

Raghu

-----Original Message-----
From: rshankar2@austin.rr.com rshankar2@austin.rr.com
Sent: Wednesday, May 11, 2022 12:58 PM
To: 'The gem5 Users mailing list' gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated.  I'll try and get back

Raghu

-----Original Message-----
From: Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr
Sent: Wednesday, May 11, 2022 12:10 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com:

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py
running in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay
on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface
card implemented, tested and verified is the Intel 8254x based gigabit
Ethernet adapter. It is provided as a PCI GEM5 network device using
the e1000 Linux driver.

However, the latest version of GEM5 supports this real-network device
only on ARM-based architectures. In the scope of COSSIM, GEM5 has been
recently modified so as to support the Intel 8254x network card for
the x86 ISA


gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org _______________________________________________
gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

We have not synchronize the COSSIM code in official gem5 release because it requires HLA libriries. > 11 Μαΐ 2022, 11:13 μμ, ο χρήστης «Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr>» έγραψε: > > Dear Raghu, > > The steps which I sent you is for dual gem5 (not for cgem5). In this scenario, two gem5s is connected through Etherlink (virtual dummy link) without switches etc. Also in this scenario both two gem5s is working in one thread (for this reason does not need synchronization). So you do not need the COSSIM and cgem5. You only need download the latest official gem5 and patch it using my previous steps to add the NIC. > > COSSIM uses OMNET++ and it is much more complex as you can see in the paper. > > Best regards, > Nikolaos Tampouratzis > > >> 11 Μαΐ 2022, 11:02 μμ, ο χρήστης «rshankar2@austin.rr.com» έγραψε: >> >> Nikolaos. >> A related question - Are the 2 code streams of cgem5 & gem5 - kept consistent to each other? So users can benefit from updates on either stream (I'm not sure how that works today). If one switches to cgem5 stream do we lose improvements happening on gem5 stream? >> >> Also, thanks for your research work, community share of COSSIM gem5, and paper below (which I had a copy from before 😊) >> >> Raghu >> >> -----Original Message----- >> From: rshankar2@austin.rr.com <rshankar2@austin.rr.com> >> Sent: Wednesday, May 11, 2022 12:58 PM >> To: 'The gem5 Users mailing list' <gem5-users@gem5.org> >> Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? >> >> Thanks very much Nikolaos for the detailed step-by-step response. This is highly appreciated. I'll try and get back >> >> Raghu >> >> -----Original Message----- >> From: Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr> >> Sent: Wednesday, May 11, 2022 12:10 PM >> To: The gem5 Users mailing list <gem5-users@gem5.org> >> Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? >> >> Dear rshankar, >> >> As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode: >> >> https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py >> (see the lines with #COSSIM) >> https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py >> (lines 636, 674-676) >> >> Build the gem5. >> >> You need download the vmlinux-5.4.49 kernel from here: >> https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel >> >> You need download the x86-ubuntu.img image from here: >> http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz >> >> Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: >> >> sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . >> cd root >> nano gem5_init.sh #Add the following script: >> >> #!/bin/bash >> >> # Copyright (c) 2021 The University of Texas at Austin. >> # SPDX-License-Identifier: BSD 3-Clause >> >> echo "Starting gem5 init... reading run script file." >> if ! m5 readfile > /tmp/script; then >> echo "Failed to run m5 readfile, exiting!!" >> rm -f /tmp/script >> if ! m5 exit; then >> # Useful for booting the disk image in (e.g.,) qemu for debugging >> echo "m5 exit failed, dropping to shell." >> /bin/sh >> fi >> else >> echo "Running m5 script from /tmp/script !!" >> chmod 755 /tmp/script >> /tmp/script >> echo "Done running script, exiting." >> rm -f /tmp/script >> /bin/sh >> #m5 exit >> fi >> >> >> >> exit >> # now we are back to the host system >> cd >> sudo umount /mnt/proc >> sudo umount /mnt/dev >> sudo umount /mnt >> >> >> Now, you may use this cmd to start the FS execution: >> >> /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py >> --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual >> >> The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457) >> >> After boot, you need add the localhost and IP in both terminals (eg. >> ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality. >> >> If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934 >> >> If someone has configured the NIC with SE mode, please give us details! :) >> >> Best regards, >> Nikolaos Tampouratzis >> >> >> >> Quoting rshankar2@austin.rr.com: >> >>> Hello, >>> >>> >>> >>> I'd like to add a NIC to simple Gem5 model derived from two_level.py >>> running in SE mode, x86 CPU. >>> >>> Is this supported in Gem5? >>> >>> >>> >>> Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay >>> on >>> Gem5 - so any guidance here is appreciated. >>> >>> >>> >>> GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release >>> <https://github.com/H2020-COSSIM/cgem5> >>> >>> >>> >>> In GEM5's publicly available repositories, the only network interface >>> card implemented, tested and verified is the Intel 8254x based gigabit >>> Ethernet adapter. It is provided as a PCI GEM5 network device using >>> the e1000 Linux driver. >>> >>> However, the latest version of GEM5 supports this real-network device >>> only on ARM-based architectures. In the scope of COSSIM, GEM5 has been >>> recently modified so as to support the Intel 8254x network card for >>> the x86 ISA >> >> >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-leave@gem5.org >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-leave@gem5.org >>
R
rshankar2@austin.rr.com
Thu, Jun 16, 2022 3:54 PM

Nikolaos & Gem5 community,

Thanks for the detailed instructions to run Full system with NICs with
#COSSIM edits. My project partner and I tried all the way to the end.
Both are experiencing /dev/mem problem as below. We've tried different ways
to change to root owner and chmod, but with no luck

Any help on how to proceed?

Thanks in advance

$ sudo chroot .
Starting gem5 init... reading run script file.
Can't open /dev/mem: Operation not permitted
Failed to run m5 readfile, exiting!
Can't open /dev/mem: Operation not permitted
m5 exit failed, dropping to shell.

m5 readfile

Can't open /dev/mem: Operation not permitted

whoami

root

ls -l /dev/mem

crw-r----- 1 root kmem 1, 1 Jun  8 10:38 /dev/mem

chown root:kmem /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

chmod 660 /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

chown root:kmem /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

chmod 666 /dev/mem

ls -l /dev/mem

crw-rw-rw- 1 root kmem 1, 1 Jun  8 10:38 /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

-----Original Message-----
From: Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr
Sent: Wednesday, May 11, 2022 12:10 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode in
order to load the correct drivers etc. You can add the following in order to
add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount
--bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on
/home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is
in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can
use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM
paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com mailto:rshankar2@austin.rr.com :

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py
running in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay
on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface
card implemented, tested and verified is the Intel 8254x based gigabit
Ethernet adapter. It is provided as a PCI GEM5 network device using
the e1000 Linux driver.

However, the latest version of GEM5 supports this real-network device
only on ARM-based architectures. In the scope of COSSIM, GEM5 has been
recently modified so as to support the Intel 8254x network card for
the x86 ISA

Nikolaos & Gem5 community, Thanks for the detailed instructions to run Full system with NICs with #COSSIM edits. My project partner and I tried all the way to the end. Both are experiencing /dev/mem problem as below. We've tried different ways to change to root owner and chmod, but with no luck Any help on how to proceed? Thanks in advance $ sudo chroot . Starting gem5 init... reading run script file. Can't open /dev/mem: Operation not permitted Failed to run m5 readfile, exiting! Can't open /dev/mem: Operation not permitted m5 exit failed, dropping to shell. # m5 readfile Can't open /dev/mem: Operation not permitted # whoami root # ls -l /dev/mem crw-r----- 1 root kmem 1, 1 Jun 8 10:38 /dev/mem # chown root:kmem /dev/mem # m5 readfile Can't open /dev/mem: Operation not permitted # chmod 660 /dev/mem # m5 readfile Can't open /dev/mem: Operation not permitted # chown root:kmem /dev/mem # # m5 readfile Can't open /dev/mem: Operation not permitted # chmod 666 /dev/mem # ls -l /dev/mem crw-rw-rw- 1 root kmem 1, 1 Jun 8 10:38 /dev/mem # # m5 readfile Can't open /dev/mem: Operation not permitted -----Original Message----- From: Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr> Sent: Wednesday, May 11, 2022 12:10 PM To: The gem5 Users mailing list <gem5-users@gem5.org> Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? Dear rshankar, As I know, the NIC in gem5 is worked only with Full System (FS) mode in order to load the correct drivers etc. You can add the following in order to add the NIC in FS mode: https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py (see the lines with #COSSIM) https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py (lines 636, 674-676) Build the gem5. You need download the vmlinux-5.4.49 kernel from here: https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel You need download the x86-ubuntu.img image from here: http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . cd root nano gem5_init.sh #Add the following script: #!/bin/bash # Copyright (c) 2021 The University of Texas at Austin. # SPDX-License-Identifier: BSD 3-Clause echo "Starting gem5 init... reading run script file." if ! m5 readfile > /tmp/script; then echo "Failed to run m5 readfile, exiting!!" rm -f /tmp/script if ! m5 exit; then # Useful for booting the disk image in (e.g.,) qemu for debugging echo "m5 exit failed, dropping to shell." /bin/sh fi else echo "Running m5 script from /tmp/script !!" chmod 755 /tmp/script /tmp/script echo "Done running script, exiting." rm -f /tmp/script /bin/sh #m5 exit fi exit # now we are back to the host system cd sudo umount /mnt/proc sudo umount /mnt/dev sudo umount /mnt Now, you may use this cmd to start the FS execution: /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on /home/cossim/COSSIM/cgem5/configs/example/fs.py --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is in 3457 port (telnet 127.0.0.1 3457) After boot, you need add the localhost and IP in both terminals (eg. ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can use "ping -c 1 10.0.1.x" to check the functionality. If you use the above steps in your work, refer to the following COSSIM paper, please: https://dl.acm.org/doi/10.1145/3378934 If someone has configured the NIC with SE mode, please give us details! :) Best regards, Nikolaos Tampouratzis Quoting rshankar2@austin.rr.com <mailto:rshankar2@austin.rr.com> : > Hello, > > > > I'd like to add a NIC to simple Gem5 model derived from two_level.py > running in SE mode, x86 CPU. > > Is this supported in Gem5? > > > > Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay > on > Gem5 - so any guidance here is appreciated. > > > > GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release > <https://github.com/H2020-COSSIM/cgem5> > > > > In GEM5's publicly available repositories, the only network interface > card implemented, tested and verified is the Intel 8254x based gigabit > Ethernet adapter. It is provided as a PCI GEM5 network device using > the e1000 Linux driver. > > However, the latest version of GEM5 supports this real-network device > only on ARM-based architectures. In the scope of COSSIM, GEM5 has been > recently modified so as to support the Intel 8254x network card for > the x86 ISA _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org <mailto:gem5-users@gem5.org> To unsubscribe send an email to gem5-users-leave@gem5.org <mailto:gem5-users-leave@gem5.org>
Νικόλαος Ταμπουρατζής
Mon, Jun 20, 2022 3:55 PM

Dear rshankar,

Do you try to chroot using qemu or gem5? In addition, the m5
pseudo-instructions (e.g. m5 readfile) work only inside the gem5
simulation.

I write you how to mount the x86 image through qemu in order to
emulate it first, make any changes (using chroot .), and then simulate
it through gem5 (using m5 pseudo-instructions).

Best regards,
Nikos

Quoting rshankar2@austin.rr.com:

Nikolaos & Gem5 community,

Thanks for the detailed instructions to run Full system with NICs with
#COSSIM edits. My project partner and I tried all the way to the end.
Both are experiencing /dev/mem problem as below. We've tried different ways
to change to root owner and chmod, but with no luck

Any help on how to proceed?

Thanks in advance

$ sudo chroot .
Starting gem5 init... reading run script file.
Can't open /dev/mem: Operation not permitted
Failed to run m5 readfile, exiting!
Can't open /dev/mem: Operation not permitted
m5 exit failed, dropping to shell.

m5 readfile

Can't open /dev/mem: Operation not permitted

whoami

root

ls -l /dev/mem

crw-r----- 1 root kmem 1, 1 Jun  8 10:38 /dev/mem

chown root:kmem /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

chmod 660 /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

chown root:kmem /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

chmod 666 /dev/mem

ls -l /dev/mem

crw-rw-rw- 1 root kmem 1, 1 Jun  8 10:38 /dev/mem

m5 readfile

Can't open /dev/mem: Operation not permitted

-----Original Message-----
From: Νικόλαος Ταμπουρατζής ntampouratzis@ece.auth.gr
Sent: Wednesday, May 11, 2022 12:10 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5?

Dear rshankar,

As I know, the NIC in gem5 is worked only with Full System (FS) mode in
order to load the correct drivers etc. You can add the following in order to
add the NIC in FS mode:

https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py
(see the lines with #COSSIM)
https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py
(lines 636, 674-676)

Build the gem5.

You need download the vmlinux-5.4.49 kernel from here:
https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel

You need download the x86-ubuntu.img image from here:
http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz

Mount the x86-ubuntu.img and add the gem5_init.sh in /root using:

sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount
--bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot .
cd root
nano gem5_init.sh #Add the following script:

#!/bin/bash

Copyright (c) 2021 The University of Texas at Austin.

SPDX-License-Identifier: BSD 3-Clause

echo "Starting gem5 init... reading run script file."
if ! m5 readfile > /tmp/script; then
echo "Failed to run m5 readfile, exiting!!"
rm -f /tmp/script
if ! m5 exit; then
# Useful for booting the disk image in (e.g.,) qemu for debugging
echo "m5 exit failed, dropping to shell."
/bin/sh
fi
else
echo "Running m5 script from /tmp/script !!"
chmod 755 /tmp/script
/tmp/script
echo "Done running script, exiting."
rm -f /tmp/script
/bin/sh
#m5 exit
fi

exit

now we are back to the host system

cd
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

Now, you may use this cmd to start the FS execution:

/home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on
/home/cossim/COSSIM/cgem5/configs/example/fs.py
--kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual

The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is
in 3457 port (telnet 127.0.0.1 3457)

After boot, you need add the localhost and IP in both terminals (eg.
ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can
use "ping -c 1 10.0.1.x" to check the functionality.

If you use the above steps in your work, refer to the following COSSIM
paper, please: https://dl.acm.org/doi/10.1145/3378934

If someone has configured the NIC with SE mode, please give us details! :)

Best regards,
Nikolaos Tampouratzis

Quoting rshankar2@austin.rr.com mailto:rshankar2@austin.rr.com :

Hello,

I'd like to add a NIC to simple Gem5 model derived from two_level.py
running in SE mode, x86 CPU.

Is this supported in Gem5?

Per COSSIM version of gem5 (aka cgem5) states below.  I'd like to stay
on
Gem5 - so any guidance here is appreciated.

GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release
https://github.com/H2020-COSSIM/cgem5

In GEM5's publicly available repositories, the only network interface
card implemented, tested and verified is the Intel 8254x based gigabit
Ethernet adapter. It is provided as a PCI GEM5 network device using
the e1000 Linux driver.

However, the latest version of GEM5 supports this real-network device
only on ARM-based architectures. In the scope of COSSIM, GEM5 has been
recently modified so as to support the Intel 8254x network card for
the x86 ISA

Dear rshankar, Do you try to chroot using qemu or gem5? In addition, the m5 pseudo-instructions (e.g. m5 readfile) work only inside the gem5 simulation. I write you how to mount the x86 image through qemu in order to emulate it first, make any changes (using chroot .), and then simulate it through gem5 (using m5 pseudo-instructions). Best regards, Nikos Quoting rshankar2@austin.rr.com: > Nikolaos & Gem5 community, > > Thanks for the detailed instructions to run Full system with NICs with > #COSSIM edits. My project partner and I tried all the way to the end. > Both are experiencing /dev/mem problem as below. We've tried different ways > to change to root owner and chmod, but with no luck > > Any help on how to proceed? > > Thanks in advance > > > $ sudo chroot . > Starting gem5 init... reading run script file. > Can't open /dev/mem: Operation not permitted > Failed to run m5 readfile, exiting! > Can't open /dev/mem: Operation not permitted > m5 exit failed, dropping to shell. > > # m5 readfile > Can't open /dev/mem: Operation not permitted > # whoami > root > # ls -l /dev/mem > crw-r----- 1 root kmem 1, 1 Jun 8 10:38 /dev/mem > > # chown root:kmem /dev/mem > # m5 readfile > Can't open /dev/mem: Operation not permitted > > # chmod 660 /dev/mem > # m5 readfile > Can't open /dev/mem: Operation not permitted > > # chown root:kmem /dev/mem > # > # m5 readfile > Can't open /dev/mem: Operation not permitted > > # chmod 666 /dev/mem > # ls -l /dev/mem > crw-rw-rw- 1 root kmem 1, 1 Jun 8 10:38 /dev/mem > # > # m5 readfile > Can't open /dev/mem: Operation not permitted > > > > -----Original Message----- > From: Νικόλαος Ταμπουρατζής <ntampouratzis@ece.auth.gr> > Sent: Wednesday, May 11, 2022 12:10 PM > To: The gem5 Users mailing list <gem5-users@gem5.org> > Subject: [gem5-users] Re: IGbE / Intel 8254x - NIC support on Gem5? > > Dear rshankar, > > As I know, the NIC in gem5 is worked only with Full System (FS) mode in > order to load the correct drivers etc. You can add the following in order to > add the NIC in FS mode: > > https://github.com/H2020-COSSIM/cgem5/blob/main/src/dev/x86/SouthBridge.py > (see the lines with #COSSIM) > https://github.com/H2020-COSSIM/cgem5/blob/main/configs/common/FSConfig.py > (lines 636, 674-676) > > Build the gem5. > > You need download the vmlinux-5.4.49 kernel from here: > https://github.com/gem5/gem5-resources/tree/stable/src/linux-kernel > > You need download the x86-ubuntu.img image from here: > http://dist.gem5.org/dist/v21-2/images/x86/ubuntu-18-04/x86-ubuntu.img.gz > > Mount the x86-ubuntu.img and add the gem5_init.sh in /root using: > > sudo mount -o loop,offset=1048576 x86-ubuntu.img /mnt cd /mnt sudo mount > --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo chroot . > cd root > nano gem5_init.sh #Add the following script: > > #!/bin/bash > > # Copyright (c) 2021 The University of Texas at Austin. > # SPDX-License-Identifier: BSD 3-Clause > > echo "Starting gem5 init... reading run script file." > if ! m5 readfile > /tmp/script; then > echo "Failed to run m5 readfile, exiting!!" > rm -f /tmp/script > if ! m5 exit; then > # Useful for booting the disk image in (e.g.,) qemu for debugging > echo "m5 exit failed, dropping to shell." > /bin/sh > fi > else > echo "Running m5 script from /tmp/script !!" > chmod 755 /tmp/script > /tmp/script > echo "Done running script, exiting." > rm -f /tmp/script > /bin/sh > #m5 exit > fi > > > > exit > # now we are back to the host system > cd > sudo umount /mnt/proc > sudo umount /mnt/dev > sudo umount /mnt > > > Now, you may use this cmd to start the FS execution: > > /home/cossim/COSSIM/cgem5/build/X86/gem5.fast --listener-mode=on > /home/cossim/COSSIM/cgem5/configs/example/fs.py > --kernel=vmlinux-5.4.49 --disk-image=x86-ubuntu.img --dual > > The 1st terminal is in 3456 port (telnet 127.0.0.1 3456) The 2nd terminal is > in 3457 port (telnet 127.0.0.1 3457) > > After boot, you need add the localhost and IP in both terminals (eg. > ifconfig lo 127.0.0.1 & ifconfig eth0 10.0.1.x), where x 2 and 3). You can > use "ping -c 1 10.0.1.x" to check the functionality. > > If you use the above steps in your work, refer to the following COSSIM > paper, please: https://dl.acm.org/doi/10.1145/3378934 > > If someone has configured the NIC with SE mode, please give us details! :) > > Best regards, > Nikolaos Tampouratzis > > > > Quoting rshankar2@austin.rr.com <mailto:rshankar2@austin.rr.com> : > >> Hello, >> >> >> >> I'd like to add a NIC to simple Gem5 model derived from two_level.py >> running in SE mode, x86 CPU. >> >> Is this supported in Gem5? >> >> >> >> Per COSSIM version of gem5 (aka cgem5) states below. I'd like to stay >> on >> Gem5 - so any guidance here is appreciated. >> >> >> >> GitHub - H2020-COSSIM/cgem5: Modified GEM5 March 2022 release >> <https://github.com/H2020-COSSIM/cgem5> >> >> >> >> In GEM5's publicly available repositories, the only network interface >> card implemented, tested and verified is the Intel 8254x based gigabit >> Ethernet adapter. It is provided as a PCI GEM5 network device using >> the e1000 Linux driver. >> >> However, the latest version of GEM5 supports this real-network device >> only on ARM-based architectures. In the scope of COSSIM, GEM5 has been >> recently modified so as to support the Intel 8254x network card for >> the x86 ISA > > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org <mailto:gem5-users@gem5.org> > To unsubscribe send an email to gem5-users-leave@gem5.org > <mailto:gem5-users-leave@gem5.org>