[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-26 Thread Gabe Black via gem5-users
Whoops, now I did it :-). I meant build/ARM/gem5.opt. Gabe On Sun, Apr 26, 2020 at 4:20 AM Gabe Black wrote: > Hi, I noticed that you're trying to run an ARM kernel on gem5 compiled to > run x86 code. That won't work. You need to either use an x86 kernel, or the > ARM version of gem5, aka

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-26 Thread Gabe Black via gem5-users
Hi, I noticed that you're trying to run an ARM kernel on gem5 compiled to run x86 code. That won't work. You need to either use an x86 kernel, or the ARM version of gem5, aka build/X86/gem5.opt. Gabe On Sat, Apr 25, 2020 at 10:50 PM Taiyu Zhou via gem5-users < gem5-users@gem5.org> wrote: > Hi

[gem5-users] Re: A problem about using pseudo instruction in my own program

2020-04-29 Thread Gabe Black via gem5-users
Hi, I see two problems with your implementation. First, where you call PIM in pseudo_inst.cc, you don't actually do anything with the result so it's just dropped. Second, in two_byte_opcodes.isa, you don't do anything with the result of PseudoInst::PIM. You need to put the result in RAX for it to

[gem5-users] Re: How to use custom gpu models with gem5 ?

2020-10-06 Thread Gabe Black via gem5-users
To see how to integrate with gem5's systemc kernel, look at the examples in util/systemc/systemc_within_gem5/ (not a great place for examples, I know). To use TLM, you can take a look at the TLM/gem5 bridge in src/systemc/tlm_bridge/. That's not intended as an example, but it's relatively simple

[gem5-users] Re: Gem5 ARM simulator building errors

2020-10-15 Thread Gabe Black via gem5-users
Those are not errors, or at least not errors that will prevent the build from being successful. The linker errors (DWARF error: ...) are unfortunate but don't prevent the build from finishing. I don't know what, if anything, might be affected by them. The other message is just a warning. Gabe On

[gem5-users] Re: gem5 full system emulation is slow - want suggestions to fasten bootup

2020-10-15 Thread Gabe Black via gem5-users
I think you mean the TimingSimpleCPU, not the AtomicTimingCPU. Gabe On Thu, Oct 15, 2020 at 1:41 PM Bobby Bruce via gem5-users < gem5-users@gem5.org> wrote: > Hey Krishnan, > > Linux does take about 45 minutes or so to run using AtomicSimpleCPU. > You're not doing anything wrong in this regard.

[gem5-users] Re: How I can notify the NVMAIN model when I use “m5 resetstats” so that the NVMAIN model can also reset the stats in its model

2020-10-12 Thread Gabe Black via gem5-users
Hi Liyichao, you can register a callback with the Stats::registerResetCallback function in base/statistics.hh. Gabe On Mon, Oct 12, 2020 at 7:15 PM Liyichao via gem5-users wrote: > Hi All: > > > > > >When I use gem5 + O3 based on armv8 with NVMAIN ddr4 model, I want > to know *how I

[gem5-users] Re: Help needed to build gem5

2020-10-15 Thread Gabe Black via gem5-users
It looks like your libpython3.8.a was not built with the same compiler as the one you're trying to build gem5 with. Extra information it sets aside for LTO (link time optimization) is apparently not compatible between the two versions. Gabe On Thu, Oct 15, 2020 at 5:14 PM Shivakumar,Raghul via

[gem5-users] Re: X86KvmCPU fails -- reason code 0x80000021

2020-10-15 Thread Gabe Black via gem5-users
As far as I know those patches should no longer be necessary, although I haven't tried to run KVM on x86 recently. Other problems could be that KVM isn't enabled in your BIOS or your operating system, or that the permissions on the device file gem5 needs to start a VM isn't set properly.

[gem5-users] Re: KVM test regressions?

2020-08-24 Thread Gabe Black via gem5-users
I don't think so, although I don't know that for certain. Bobby? Andreas? Gabe On Mon, Aug 24, 2020 at 8:47 PM mike upton via gem5-users < gem5-users@gem5.org> wrote: > > Is there a defined regression for KVM cpu tests? > For both X86 and ARM. > > >

[gem5-users] Re: [Error] Building gem5 in Ubuntu 18.04

2020-08-28 Thread Gabe Black via gem5-users
Do you have enough in the partition/disk/etc you're building gem5 in? If you have lots of disk space but it's assigned some other purpose, you can still run out. This pretty clearly looks like you're running out of disk space to me. Gabe On Fri, Aug 28, 2020 at 12:43 PM Dwaipayan Ray via

[gem5-users] Re: Ethernet support for ARM FS simulation

2020-08-28 Thread Gabe Black via gem5-users
You shouldn't modify your config by changing anything in src/, you should do that in the config scripts. If you want to add additional devices, they don't have to be part of the platform object, they just need to be connected to the right busses, etc. Gabe On Fri, Aug 28, 2020 at 12:06 PM HENG

[gem5-users] Re: [gem5-dev] Namespace creation on develop branch

2020-08-29 Thread Gabe Black via gem5-users
PTAL https://gem5-review.googlesource.com/c/public/gem5/+/33695 https://gem5.atlassian.net/browse/GEM5-753 Gabe On Thu, Aug 27, 2020 at 4:24 AM Daniel Carvalho via gem5-dev < gem5-...@gem5.org> wrote: > Hello, > > > This message only concerns those who use the *develop* branch. > > > We have

[gem5-users] Re: Privileged Instruction in Full System Mode

2020-08-27 Thread Gabe Black via gem5-users
Generally speaking, gem5 tends to be pretty loose as far as checking whether instructions are privileged or not. Real programs tend to behave themselves because on a real system they would crash if they didn't. That means it's usually not very important to implement those checks to get correct (or

[gem5-users] Re: Segmentation fault in gem5,

2020-10-01 Thread Gabe Black via gem5-users
Please speak to other members of our community with respect. Nobody owes you help, and nobody is likely to volunteer it to someone with a bad attitude. Don't send emails to both gem5-users and gem5-dev, gem5-users is enough. Gabe On Thu, Oct 1, 2020 at 6:42 PM 1154063264--- via gem5-users <

[gem5-users] Re: gem5 FS mode

2020-05-25 Thread Gabe Black via gem5-users
The files in that tar are all for Alpha, and you're trying to use them on an X86 version of gem5 (which simulates x86). Since Alpha support has been removed, we should also delete that tar ball and any reference to it from the website. Where did you see instructions to download it? Gabe On Mon,

[gem5-users] Re: How to use the memory address version of m5ops such as m5_exit_addr in an external C progam?

2020-10-27 Thread Gabe Black via gem5-users
Hi Ciro. You are correct that there isn't a header for those symbols, although the signature for m5_exit and m5_exit_addr should be identical. The mechanism supporting those symbols should all be in place and there are unit tests for them, although those tests are at least partially still under

[gem5-users] Re: Single Step Support in x86

2020-10-27 Thread Gabe Black via gem5-users
The IRET instruction is implemented in arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py. It's fairly involved since IRET is an inherently complicated instruction, but it's commented and follows the pseudo code which was in the AMD manuals at the time it was written.

[gem5-users] Re: How page table walk works in TimingSimpleCPU

2020-10-26 Thread Gabe Black via gem5-users
I think the confusion comes from the fact that accesses in atomic mode return right away, where in timing mode they are split into a call which starts the transaction, and a callback with the results. In atomic mode, the same function can loop through all the lookups that might be necessary since

[gem5-users] Re: How to add a new pcie device on GEM5

2020-10-26 Thread Gabe Black via gem5-users
The VirtIO device would be a pretty good example, although it does some unusual things as far as determining how big it's BARs are supposed to be. The IDE controller is a pretty simple device that's a little more representative in that way. A lot of the complexity is in the actual disks

[gem5-users] Re: How to use the new libm5.a

2020-10-26 Thread Gabe Black via gem5-users
Hi Wenqi. The updated libm5.a should be used in basically the same way as the old version. Just link against the library, include the header file, and call into the op you want using the normal function call syntax. Hoa, the documentation you've linked to is a little out of date. How can it be

[gem5-users] Re: Can we use our own debug flags in fs mode?

2020-07-13 Thread Gabe Black via gem5-users
You can use your own debug flags in FS mode. The stats should mostly be deterministic, particularly in FS mode, but if the simulation interacts with something else that's not deterministic, like if you type on its console or it runs system calls on the host in SE mode, then things can change from

[gem5-users] Re: Fatal Error : No kernel to load

2020-06-24 Thread Gabe Black via gem5-users
You haven't specified a kernel. gem5 doesn't (typically) look on the disk image for the kernel, you need to pass that in separately. Gabe On Tue, Jun 23, 2020 at 7:32 AM Saeed Seyedfaraji via gem5-users < gem5-users@gem5.org> wrote: > Dear Users I have a problem with X86 full system simulation.

[gem5-users] Re: How event affect curTick?

2020-06-15 Thread Gabe Black via gem5-users
Conceptually yes. There is usually an event or something an event causes which tells gem5 to exit, like the last thread of a process exiting, or the m5 utility running inside a full system simulation telling the simulator it wants to exit. That will make gem5 return to the config script where it

[gem5-users] Re: How event affect curTick?

2020-06-15 Thread Gabe Black via gem5-users
Events are scheduled for a specific time, and it's the event queues job to go through them in chronological order and call them to do whatever they're supposed to do. Events happen instantly, in the sense that time does not pass or change while they're running. They also can't normally affect what

[gem5-users] Re: Error in building a memobject: "No module named 'MemObject'"

2020-06-15 Thread Gabe Black via gem5-users
SimObject is a special case and is imported from "SimObject". MemObject (and all other SimObject subclasses) are imported from m5.objects.*. You're import should be from m5.objects.MemObject import MemObject. Gabe On Mon, Jun 15, 2020 at 5:34 AM Shaikhul Hadi via gem5-users <

[gem5-users] Re: Debugging Gem5 Segmentation Fault in x86 Decoder

2020-06-09 Thread Gabe Black via gem5-users
SSE2 should work with no problems. It's very unlikely this has anything to do with the compiler you're using for your benchmark, other than that it might coincidentally set up a scenario which exposes a bug. If your program has a bad instruction in it somehow, the decoder should handle that just

[gem5-users] Re: Debugging Gem5 Segmentation Fault in x86 Decoder

2020-06-10 Thread Gabe Black via gem5-users
Actually, could you file a bug for this over on Jira? https://gem5.atlassian.net/secure/BrowseProjects.jspa I'm not sure what limits it has on file size, etc., but that might be a good place to upload the binary you're trying to run. Gabe On Wed, Jun 10, 2020 at 8:41 PM Gabe Black wrote: >

[gem5-users] Re: Debugging Gem5 Segmentation Fault in x86 Decoder

2020-06-10 Thread Gabe Black via gem5-users
cc-ing a couple AMD folks in case they have some input or want to know that there's a potential bug here. Ignoring the last error which I addressed in a different email, this looks like some sort of (gem5) stack corruption. Note that this doesn't directly have anything to do with the stack in the

[gem5-users] Re: Debugging Gem5 Segmentation Fault in x86 Decoder

2020-06-10 Thread Gabe Black via gem5-users
I filed a bug for this on Jira: https://gem5.atlassian.net/browse/GEM5-629 On Wed, Jun 10, 2020 at 5:44 PM Gabe Black wrote: > ==5823== 1268 errors in context 4 of 62: >> ==5823== Conditional jump or move depends on uninitialised value(s) >> ==5823==at 0x886949:

[gem5-users] Re: Debugging Gem5 Segmentation Fault in x86 Decoder

2020-06-10 Thread Gabe Black via gem5-users
> > ==5823== 1268 errors in context 4 of 62: > ==5823== Conditional jump or move depends on uninitialised value(s) > ==5823==at 0x886949: MemState::fixupFault(unsigned long) > (mem_state.cc:426) > ==5823==by 0xB7DB3C: > X86ISA::TLB::translateFunctional(std::shared_ptr const&, >

[gem5-users] Re: X86KvmCPU segfaults in constructor

2020-07-27 Thread Gabe Black via gem5-users
You have to set the kvm_vm parameter of the System object. Gabe On Sun, Jul 26, 2020 at 10:57 PM Soramichi Akiyama via gem5-users < gem5-users@gem5.org> wrote: > Hi, > > I am trying to fast-forward a large workload with X86KvmCPU, but the > constructor falls into a segmentation fault. > I use

[gem5-users] Re: 'DPRINTF' was not declared in this scope

2020-11-21 Thread Gabe Black via gem5-users
You need to include base/trace.hh which defines DPRINTF itself. Gabe On Sat, Nov 21, 2020 at 8:33 PM yujiecui--- via gem5-users < gem5-users@gem5.org> wrote: > I want to know the cache information when the replacement algorithm is > executed. So I made the following changes in the latest

[gem5-users] Re: 答复: Re: Looking for Linux disk image for 64-bit ARM with Ubuntu 18.04 or GLIBC 2.27

2020-12-01 Thread Gabe Black via gem5-users
That's probably a disk image and not a file system image. You need to tell losetup to scan for the partition table with I think the -p option. Gabe On Tue, Dec 1, 2020 at 10:02 AM Choe, Jiwon via gem5-users < gem5-users@gem5.org> wrote: > I'm running into the same issue as well. > > -Jiwon > >

[gem5-users] Re: Extra timing for specific instruction not registered for RISC-V

2020-12-02 Thread Gabe Black via gem5-users
I just did a quick check, and it looks like the RISCV ISA definition includes support for the instruction based pseudo ops. If you add support to the m5 utility, then it might just work. Gabe On Wed, Dec 2, 2020 at 9:04 PM Volkan Mutlu via gem5-users < gem5-users@gem5.org> wrote: > Hello

[gem5-users] Re: 答复: 答复: Re: Looking for Linux disk image for 64-bit ARM with Ubuntu 18.04 or GLIBC 2.27

2020-12-02 Thread Gabe Black via gem5-users
Don't use -o,loop with mount. That creates another loopback device and then tries to use that, and apparently reuses /dev/loop4. If you look in /dev, there will also be a /dev/loop4p1 (for instance) for each partition. Mount that device instead. Gabe On Wed, Dec 2, 2020 at 12:07 AM Boya Chen via

[gem5-users] Re: Magic instructions with GCN3 Model/hipcc return 0

2020-11-09 Thread Gabe Black via gem5-users
BTW, I do think I need to explicitly set the c++ version in the scons file, like in Matt's original email above. I'd probably set it to c++14 though, to be consistent with gem5 proper. I think that will likely fix a build issue Bobby had with an older (7.x I think) version of gcc, where the

[gem5-users] Re: How to create a multicore system with different frequency for each core?

2020-11-09 Thread Gabe Black via gem5-users
If you want the frequency of the CPUs to change independently from each other, I think you need to set up a ClockDomain object for each, instead of letting them implicitly inherit the one from the System object. On Mon, Nov 9, 2020 at 2:26 AM Đức Anh via gem5-users wrote: > Hello all, > > I am

[gem5-users] Re: Magic instructions with GCN3 Model/hipcc return 0

2020-11-09 Thread Gabe Black via gem5-users
Hi folks. If you're using the magic address based version of the gem5 ops, then you should call, for instance, m5_exit_addr and not just m5_exit. The "normal" functions are now always the magic instructions which essentially only gem5 CPU models know how to execute. All call mechanisms are built

[gem5-users] Re: --Script parameter cannot be used

2020-11-09 Thread Gabe Black via gem5-users
The --script option works by setting up a file for the m5 utility to read in from the actual on disk init script found in the disk image. If the m5 utility isn't called, or is called incorrectly, or the script it extracts isn't then run, the --script option won't work. It's been a while, but I

[gem5-users] Re: Magic instructions with GCN3 Model/hipcc return 0

2020-11-09 Thread Gabe Black via gem5-users
the >> error message I got when debugging this. If c++14 works though, great. >> >> Thanks for the updated info -- I built the tutorial out of the old one, >> so next time I'll make sure to update it accordingly. >> >> Thanks, >> Matt >> >> On Mon, Nov

[gem5-users] Re: Magic instructions with GCN3 Model/hipcc return 0

2020-11-09 Thread Gabe Black via gem5-users
Sinclair via gem5-users < >>> gem5-users@gem5.org> wrote: >>> >>>> Hi Gabe, >>>> >>>> I don't have the broken build in front of me, and it's possible it is >>>> because I'm running on an Ubuntu 16 machine, but I had to add

[gem5-users] Re: Compiling m5 utils

2020-11-14 Thread Gabe Black via gem5-users
I am currently using? Will that won't create compatibility issues? >>> >>> On Sat, Nov 14, 2020 at 1:38 PM Gabe Black via gem5-users < >>> gem5-users@gem5.org> wrote: >>> >>>> Probably not. There were some other fixes which made things partiall

[gem5-users] Re: Compiling m5 utils

2020-11-14 Thread Gabe Black via gem5-users
Probably not. There were some other fixes which made things partially work with PIE code, but the version of the utility you're using may be too old to include those, or you might be trying to use it in a way that the partial support didn't cover (different ISA for instance). You'll probably save

[gem5-users] Re: Compiling m5 utils

2020-11-13 Thread Gabe Black via gem5-users
That version of gem5 is a few years old and doesn't have the updates to the m5 utility that made it use scons. In that version, you need to use make. Gabe On Fri, Nov 13, 2020 at 7:43 PM krishnan gosakan via gem5-users < gem5-users@gem5.org> wrote: > Hi all, > I am trying to compile m5 utils. I

[gem5-users] Re: Compiling m5 utils

2020-11-14 Thread Gabe Black via gem5-users
wrote: > Can I use m5 util from the current stable branch with the old gem5 repo I > am currently using? Will that won't create compatibility issues? > > On Sat, Nov 14, 2020 at 1:38 PM Gabe Black via gem5-users < > gem5-users@gem5.org> wrote: > >> Probably not. Th

[gem5-users] Re: m5ops for riscv

2020-11-19 Thread Gabe Black via gem5-users
In what way was it not possible? Did you get an error message? Gabe On Wed, Nov 18, 2020 at 1:51 PM Cristobal Ramirez Lazo via gem5-users < gem5-users@gem5.org> wrote: > Dear all, > I would like to use the m5ops functions such as "m5_reset_stats" in my own > c++ program. > I have done it for

[gem5-users] Re: Need Help For Applying a Patch

2020-11-19 Thread Gabe Black via gem5-users
gem5 does not use mercurial any more and hasn't for a while, and so using hg commands probably won't work. You should be able to apply the patches using the normal "patch" command, or even with git using the "git am" command, but if your patches are really old (likely if they're geared towards

[gem5-users] Re: Ethernet support for ARM FS simulation

2020-11-07 Thread Gabe Black via gem5-users
The way create methods and constructors were set up was standardized and largely automated recently. If you're backporting a change across when that happened, you're going to have to adjust those so they work with the old, less consistent versions, but it should be very straightforward (turning

[gem5-users] Re: How to use the new libm5.a

2020-10-28 Thread Gabe Black via gem5-users
haven’t looked into the error > carefully yet, it may just because for some reason the lib is still trying > to use the magic instruction interface. But before I proceed any further, > just want to make sure I was using the correct approach to do this. > > Best, > Wenqi > >

[gem5-users] Re: Using m5Ops with X86KvmCPU

2020-11-04 Thread Gabe Black via gem5-users
Yes, but you need to use the magic address call mechanism, not the default special instruction mechanism which KVM doesn't recognize since it's executing on real hardware. If you're calling from userspace, then you can use the map_m5_mem() function to mmap /dev/mem so you can access the right

[gem5-users] Re: Ethernet support for ARM FS simulation

2020-11-05 Thread Gabe Black via gem5-users
That sounds like the problem I fixed with this CL: https://gem5-review.googlesource.com/c/public/gem5/+/35516 Gabe On Thu, Nov 5, 2020 at 4:42 AM Liyichao via gem5-users wrote: > Hi Gabe: > > I have looked at the email below, I also has the same question. > As you mentioned, I just

[gem5-users] Re: Implementation of write() Syscall in SE Mode

2021-01-14 Thread Gabe Black via gem5-users
SE mode does not work at the standard library level, it works at the system call level. As long as your custom standard library uses the normal linux system calls and the normal linux system call ABI, you shouldn't have to do anything special. There could be a very minor technical exception on x86

[gem5-users] Re: VExpress_GEM5_V1, Ethernet, and BARs

2021-01-22 Thread Gabe Black via gem5-users
across a similar discussion in the archives [2], which did seem > similar, > > but didn’t address the problem described below. Is the bug you’re > referring to > > the one addressed by CL `35516` [3]? > > > > > > > > Thanks for taking a look at this! >

[gem5-users] Re: VExpress_GEM5_V1, Ethernet, and BARs

2021-01-21 Thread Gabe Black via gem5-users
Are you using up to date develop? There was a bug like this a while ago, but it's been fixed on develop for a while as well. Gabe On Thu, Jan 21, 2021 at 6:35 PM Bohren, Jonathan via gem5-users < gem5-users@gem5.org> wrote: > We've been using the `VExpress_GEM5_V1` platform but it was failing

[gem5-users] Re: Installation issue in MAC OS

2021-01-19 Thread Gabe Black via gem5-users
This is from newer versions of scons changing how initialization works, and where and when gem5's scons files update the python search path. It's fixed on the develop branch, if you want to try that. Gabe On Tue, Jan 19, 2021 at 2:39 AM 刘宗惠 via gem5-users wrote: > Hello, > > I am new to gem5

[gem5-users] Re: Problem in using m5_checkpoint within C++ Application

2021-02-04 Thread Gabe Black via gem5-users
Hi Veronia. scons build/x86/out/m5 asks scons to build the m5 utility, not the m5 library which is called build/x86/out/libm5.a. You may have some other library on your system called m5 which -lm5 is picking up which doesn't have that symbol. Gabe On Thu, Feb 4, 2021 at 3:52 AM Veronia Bahaa via

[gem5-users] Re: Building Gem5 on Ubuntu 20.04

2021-05-24 Thread Gabe Black via gem5-users
I don't think LTO strips debug symbols... But yes, LTO does significantly increase link time if your machine doesn't have lots of cores to parallelize the link. It slows it down in general, but with gcc you can parallelize the link with LTO where you can't without LTO for some reason, and that

[gem5-users] Re: Guidance on adding an x86 instruction

2021-05-24 Thread Gabe Black via gem5-users
Hi Eliot. The decoder, particularly the x86 decoder, is one of the most complex areas of gem5, and unfortunately there isn't any comprehensive documentation explaining how it works. I did put together this document a while ago (

[gem5-users] Re: Building Gem5 on Ubuntu 20.04

2021-05-24 Thread Gabe Black via gem5-users
Yeah, I wouldn't have expected that either, but if that's what you're seeing it's hard to argue otherwise. I don't think that's an inherent behavior of LTO, but it might be an unintended side effect somehow, maybe pulled in indirectly? It's probably worth a Jira ticket. Gabe On Mon, May 24, 2021

[gem5-users] Re: Building Gem5 on Ubuntu 20.04 - Failure details

2021-05-24 Thread Gabe Black via gem5-users
Well, whatever the reason, there are no error messages in your original email :-) Gabe On Mon, May 24, 2021 at 7:01 PM Eliot Moss wrote: > On 5/24/2021 9:47 PM, Gabe Black wrote: > > Hi Eliot, unfortunately this output doesn't seem to include stderr, and > so doesn't have any of the > >

[gem5-users] Re: Building Gem5 on Ubuntu 20.04 - Failure details

2021-05-24 Thread Gabe Black via gem5-users
The last lines in your original email are: [SOPARMHH] VirtIO9PBase -> X86/params/VirtIO9PBase.hh [SOPARMHH] VirtIO9PDiod -> X86/params/VirtIO9PDiod.hh [SOPARMHH] VirtIO9PProxy -> X86/params/VirtIO9PProxy.hh [SOPARMHH] VirtIO9PSocket -> X86/params/VirtIO9PSocket.hh [ CXX]

[gem5-users] Re: Building Gem5 on Ubuntu 20.04 - Failure details

2021-05-24 Thread Gabe Black via gem5-users
Yeah, this looks like your system ran out of memory: g++: fatal error: Killed signal terminated program lto1 That's probably the kernel going around killing processes using lots of memory since it's running out. Gabe On Mon, May 24, 2021 at 7:27 PM Eliot Moss wrote: > On 5/24/2021 10:12 PM,

[gem5-users] Re: Alternative of void * in syscall_emul.cc file

2021-05-03 Thread Gabe Black via gem5-users
Hi. VPtr<> is supposed to be equivalent to void *. Even with a c void * though, you can't (in standard c) use it as an array of bytes. If you need it to be an array of bytes, you need to use VPtr. There are some facilities to cast VPtrs of different types, but I don't remember how extensive that

[gem5-users] Re: Gem5 hang with multi core

2021-03-28 Thread Gabe Black via gem5-users
Hi Xijing. I don't think anyone has gotten x86 and caches and locking/atomic instructions to fully work, so it's just a known bug in gem5 at the moment. If you want to simulate that sort of system, I would suggest using ARM if possible. We'd love to fix this at some point, but there are a lot of

[gem5-users] Re: m5 utility for ARM64

2021-03-31 Thread Gabe Black via gem5-users
Hi Jeageun, you should take a look at util/m5/README.md for an explanation of how the m5 utility works and how it should be used in different environments. It looks like it's trying to use the instruction based mechanism to call into gem5, and that won't work in KVM. In KVM, you have to use the

[gem5-users] Re: IGbE_e1000 card not connected

2021-03-31 Thread Gabe Black via gem5-users
Hi Nikos, how old is your gem5 checkout? The change below fixed some aspects of how PCI devices are managed, including one which could cause failures like you're seeing. commit 9be18aa66ddb8db4da043279819d45bc72b7b086 Author: Gabe Black Date: Fri Oct 2 03:00:04 2020 -0700 On Wed, Mar 31, 2021

[gem5-users] Re: request to allocate mask for invalid number: Invalid argument

2021-03-15 Thread Gabe Black via gem5-users
This code seems to be calling system calls like mprotect which are not implemented, and which are probably doing something important as far as how the program works. Implementing these accurately would be complicated, and so you best bet is probably to use full system mode. Gabe On Fri, Mar 12,

[gem5-users] Re: gem5 crash when mount by vio-9p protocol in KVM mode with more than 1 core

2021-03-15 Thread Gabe Black via gem5-users
I think what you want to do is in the kick() functions in MmioVirtIO and PciVirtIO, you want to declare a ScopedMigration at the start of the function, and pass its constructor the result of the eventQueue() method. The SimObject class inherits from EventManager and knows what event queue it's

[gem5-users] Re: gem5 crash when mount by vio-9p protocol in KVM mode with more than 1 core

2021-03-15 Thread Gabe Black via gem5-users
I haven't looked at the code yet, but this is probably because the v9 implementation is getting asynchronous input which might be received by one thread, which then tries to schedule an event on an event queue associated with another queue. Most of the time this is not an issue since gem5 is

[gem5-users] Re: gem5 crash when mount by vio-9p protocol in KVM mode with more than 1 core

2021-03-15 Thread Gabe Black via gem5-users
Yes exactly, did that help? Gabe On Mon, Mar 15, 2021 at 10:29 PM Liyichao wrote: > Hi Gabe: > > You mean that the code to be modified just like this? > > > > void > > PciVirtIO::kick() > > { > > DPRINTF(VIOIface, "kick(): Sending interrupt...\n"); > >

[gem5-users] Re: gem5 crash when mount by vio-9p protocol in KVM mode with more than 1 core

2021-03-16 Thread Gabe Black via gem5-users
Basically you want to make sure you've moved to the right event queue by the time any code you call tries to schedule an event. The VirtIO devices themselves don't seem to, but the code they're calling (interacting with other devices, sending transactions to the memory system) could be. If it

[gem5-users] Re: gem5 crash when mount by vio-9p protocol in KVM mode with more than 1 core

2021-03-16 Thread Gabe Black via gem5-users
Please take the version that works for you and create a review: http://www.gem5.org/contributing It's much easier to look at changes in the code review interface, and we can add reviewers who are most familiar with this code. Gabe On Tue, Mar 16, 2021 at 2:59 AM Liyichao wrote: > Adding

[gem5-users] Re: Shutdown x86 Full System simulation

2021-03-10 Thread Gabe Black via gem5-users
Hi Deepak. On a real system, you would probably use ACPI to tell the chipset to power down the machine, but on gem5 you can probably just run the "exit" pseudo instruction which will tell gem5 to exit back to the python config file. Gabe On Wed, Mar 10, 2021 at 2:07 AM Deepak Mohan via

[gem5-users] Re: Custom M5Ops

2021-03-16 Thread Gabe Black via gem5-users
Hi Sam, there are a few ways you can do that. 1. You could set up a PC based event if you know what PC your behavior will always be triggered from (see examples like skipping udelay for some versions of the linux kernel). 2. You could create a new gem5 op by picking an unused number and a wrapper

[gem5-users] Re: scons error:invalid use of incomplete type 'class System'

2021-02-25 Thread Gabe Black via gem5-users
You have a circular dependency in your include files system.hh gets past the compiler guard, then includes base.hh which includes cache.hh which tries to include system.hh. Since system.hh has already started to be included it gets skipped, but since it was only started none of the things it

[gem5-users] Re: Long linkage

2021-04-11 Thread Gabe Black via gem5-users
The opt build now uses link time optimization (LTO) and does not use partial linking. On slower machines and/or machines with fewer cores (and maybe less memory?) this seems to really slow things down, where on machines with more cores, LTO linking happens to be parallel where normal linking

[gem5-users] Re: Can't define my own create() function

2021-04-09 Thread Gabe Black via gem5-users
Hi. The automatically generated create() method will only exist if your SimObject can be constructed with a constant reference to the parameter type. Or in other words, if it has a constructor of the form TraceManager(const TraceManagerParams ). You can disable that by just adding a dummy

[gem5-users] Re: Maybe pipeview script has some version compatibility issues?

2021-04-12 Thread Gabe Black via gem5-users
Maybe a python 2 vs 3 issue? I haven't used this script myself. Gabe On Mon, Apr 12, 2021 at 2:02 AM weiwei Zhao via gem5-users < gem5-users@gem5.org> wrote: > cmd:./util/o3-pipeview.py -c 1000 -o DP1d_corr/pipeview.out --color > DP1d_corr/trace.out > > Processing trace... Traceback (most

[gem5-users] Re: ARM and opening a file

2021-04-20 Thread Gabe Black via gem5-users
If this works on x86, the chances are good that the system call implementations are fine since they're likely the same between the two, but there could be some glue (flag translation, which system calls that are hooked up) which is different. You should try enabling the system call DPRINTF flags

[gem5-users] Re: How to debug a program in GEM5 FS mode.

2021-04-21 Thread Gabe Black via gem5-users
Hello, Liyichao. While gdb debugging in gem5 is a great tool, it's a bit limited as far as the sort of debugging you're talking about. It can see the CPU state when you're in user space programs, but it doesn't understand that different user space programs are different things, or know how to look

[gem5-users] Re: How to debug a program in GEM5 FS mode.

2021-04-21 Thread Gabe Black via gem5-users
Yeah, I don't think gdb in SE mode handles page faults well, but there was actually a change proposed very recently which should help improve that. You can probably cherry-pick that change locally if you want to try it out. https://gem5-review.googlesource.com/c/public/gem5/+/44685 Gabe On Tue,

[gem5-users] Re: Kernel panic when using ubuntu-18.04-arm64-docker.img

2021-04-11 Thread Gabe Black via gem5-users
Hi, it looks like your script (/tmp/my_script) is exiting. I think the init process isn't supposed to exit. Gabe On Sun, Apr 11, 2021 at 4:13 AM kong han via gem5-users wrote: > Hi all, > > Now I using the Latest linux kernel and disk images to run fs mode with > KVM CPU ( >

[gem5-users] Re: Simulating modern Smartphone System on Chip with Android 11 image

2021-04-17 Thread Gabe Black via gem5-users
1. Yes. You can also use the ethernet bridge to bridge the network within gem5 out to the host network so you can access the "real" network/internet. 2. Yes, caches are separate components, so you can add in caches as you want, and configure their properties. Gabe On Fri, Apr 16, 2021 at 10:05

[gem5-users] Re: Simulating modern Smartphone System on Chip with Android 11 image

2021-04-15 Thread Gabe Black via gem5-users
Hi Pavel. 1. Yes, this is possible, I've done that as part of my work. The (a?) hard part is getting the software set up correctly, but gem5 as it is should be able to run it. Be warned that android is a big, complex system and can take a long time to boot and run on gem5, which can be

[gem5-users] Re: Speeding up the Edit, Compile, Debug cycle

2021-04-15 Thread Gabe Black via gem5-users
Hi Gabriel. One big reason not to use shared libraries is performance, although that doesn't mean the idea is without merit. In the long term, I would like to give gem5 a kconfig like configuration mechanism, where you could specify things to be built into gem5 itself, things to be excluded, and

[gem5-users] Re: Running parallel version of a CPU benchmark on multiple cores

2021-04-15 Thread Gabe Black via gem5-users
That's essentially right, although gem5 does have some plumbing to run multiple event queues within the same simulation which can coordinate with each other within a small window (quantum) of time. gem5 has support for fibers/threads/coroutines, but these are not typically used to model events.

[gem5-users] Re: X86KvmCPU fails -- reason code 0x80000021

2021-02-17 Thread Gabe Black via gem5-users
Hi Kevin. It looks like that change has already been checked in on the develop branch in October. Judging by the dates on the releases, I'd guess that would be included on version 20.1 (September), although I haven't verified that specifically. It should definitely be in the develop branch, and

[gem5-users] Re: Adding an ethernet device to x86 simulation

2021-02-17 Thread Gabe Black via gem5-users
Hi Lukas. Would you mind filing a bug in Jira describing what's wrong with the --dual option? The provided configs have gotten really big and complex over the years, and it can be hard to work with them to, for instance, add a new device like you're trying to. You might consider making your own

[gem5-users] Re: Error coming while running gem5 in se mode

2021-02-22 Thread Gabe Black via gem5-users
The ARM in --cmd should be lower case. On Mon, Feb 22, 2021 at 1:17 AM VAIDYA ROHINI VILAS via gem5-users < gem5-users@gem5.org> wrote: > I am trying to run gem5 in se mode by command *" build/ARM/gem5.opt > configs/example/se.py --cmd=tests/test-progs/hello/bin/ARM/linux/hello"* > error coming

[gem5-users] Re: Adding an ethernet device to x86 simulation

2021-02-18 Thread Gabe Black via gem5-users
Hi Lukas. It's not really clear from your description what the problem is, but I would expect the "size()" method to be very simple, and so the "root" pointer is probably null or corrupt. You should probably look into where that value is coming from and what might have happened to it. Gabe On

[gem5-users] Re: Error while building gem5

2021-04-21 Thread Gabe Black via gem5-users
It looks like you might be running out of memory, which building too many things at once could contribute to. The final link is going to use a lot of memory no matter what, most likely. Gabe On Wed, Apr 21, 2021 at 3:34 AM Hoa Nguyen wrote: > Hi, > > Can you be more specific about the command

[gem5-users] Re: Error while building gem5

2021-04-21 Thread Gabe Black via gem5-users
This question has been asked (and answered) on this list already. Please don't ask the same question multiple times. Gabe On Wed, Apr 21, 2021 at 9:14 PM VAIDYA ROHINI VILAS via gem5-users < gem5-users@gem5.org> wrote: > Hello, > I am trying to build gem5 for X86 architecture but it does not >

[gem5-users] Re: util/tlm issue, need help

2021-08-20 Thread Gabe Black via gem5-users
Hi, sorry for taking a while to get back to you. The cxx-config code is not quite correct, although it basically works in most cases. It fails to build with the systemc integration, but you don't want to use gem5's built in systemc kernel anyway, if you're going to run it inside another external

[gem5-users] Re: Query: Valgrind speed in FS

2021-09-07 Thread Gabe Black via gem5-users
It's normal for valgrind to slow things down a lot. One thing you can do to at least improve the quality of the errors you get is to use the suppressions file in util/valgrind-suppressions. The python interpreter does a lot of things which upset valgrind, and this tells valgrind mostly to ignore

[gem5-users] Re: syscall newfstatat (#262) unimplemented

2021-09-02 Thread Gabe Black via gem5-users
The standard library you're linking against is newer, and is using a system call that gem5 doesn't implement. You'll either need to use an older standard library, or implement that system call. If you're trying to run gem5's tests, then I know at least one of the x86 ones uses dynamic linking and

[gem5-users] Re: static_inst.cc panic or assertion error when debugging execution of an x86 O3CPU

2021-08-11 Thread Gabe Black via gem5-users
Please give this a try: https://gem5-review.googlesource.com/c/public/gem5/+/49183 On Tue, Aug 10, 2021 at 9:37 PM Deric Cheung via gem5-users < gem5-users@gem5.org> wrote: > Host OS: Ubuntu 12.04 LTS > Host CPU: Intel i7-2600 3.40 GHz > > I'm trying to debug an x86 application on an O3CPU

[gem5-users] Re: static_inst.cc panic or assertion error when debugging execution of an x86 O3CPU

2021-08-12 Thread Gabe Black via gem5-users
-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f3f7d2bfef6] >> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x8006b)[0x7f3f7d2c306b] >> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f3f7d2b7d6d] >> >> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_Eva

[gem5-users] Re: static_inst.cc panic or assertion error when debugging execution of an x86 O3CPU

2021-08-12 Thread Gabe Black via gem5-users
ibpython3.8.so.1.0(+0x74d6d)[0x7f3f7d2b7d6d] > > /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x12fd)[0x7f3f7d2b946d] > > /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f3f7d40de3b] > > /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_Py

[gem5-users] Re: How to turn off Gem5 git commit script?

2021-09-24 Thread Gabe Black via gem5-users
It sounds to me like you've somehow installed the gem5 git hooks for everything on your machine through either the user global or a machine global git config. What you want to do is install the hooks (scripts or links in .git/hooks) in the gem5 repository itself. SCons will prompt you to do this

  1   2   >