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

2021-03-22 Thread Andreas Sandberg via gem5-users
Hi Charlie, If memory serves me right, you shouldn't need to do anything in the VirtIO devices themselves when running on KVM unless there is a bug somewhere (which I think there is, see the last paragraph). The following discussion assumes that all devices live in a single event queue and

[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: 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-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-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 Liyichao via gem5-users
Thanks for your explaination.In O3 type with multi-core 9P is ok. 李翼超 charlie Mobile:+86-15858232899 Email:liyic...@huawei.com 发件人: Gabe Blackmailto:gabe.bl...@gmail.com>> 收件人: gem5 users mailing

[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