)]}' { "commit": "02dafc5498750d9734ba8f2a1608a846f90b71d1", "tree": "e955d25ed5c54939233110ec0c75a0d2e21f46e7", "parents": [ "8efcc0faac252d716704b5f8f9f3e1c165910ebe" ], "author": { "name": "Tuan Ta", "email": "qtt2@cornell.edu", "time": "Mon Apr 02 15:19:40 2018 -0400" }, "committer": { "name": "Tuan Ta", "email": "qtt2@cornell.edu", "time": "Wed Feb 06 18:41:49 2019 +0000" }, "message": "cpu: fix how a thread starts up in MinorCPU\n\nWhen a thread is activated by another thread calling a clone system\ncall, the child thread\u0027s context is initialized in the middle of the\nclone system call and before the context is fully initialized.\nTherefore, the child thread starts fetching an unitialized PC, which\ncould lead to a page fault.\n\nThis patch adds a pipeline wakeup event that is scheduled later in the\ncycle when the thread is activated. This event ensures that the first\nfetch only happens after the thread context is fully initialized\n(e.g., in case of clone syscall, it is when the parent thread copies\nits context over to the child thread).\n\nWhen a thread first starts or wakes up, input queue to the Fetch2 stage\nneeds to be drained since the execution flow is likely to change and\npreviously fetched instructions in the queue may no longer be in the\ncorrect flow. This patch dumps/drains all inputs in the input queue\nof a thread context in the Fetch2 stage when the associated thread wakes\nup.\n\nChange-Id: Iad970638e435858b7289cd471158cc0afdbbb0e5\nReviewed-on: https://gem5-review.googlesource.com/c/8182\nReviewed-by: Brandon Potter \u003cBrandon.Potter@amd.com\u003e\nReviewed-by: Jason Lowe-Power \u003cjason@lowepower.com\u003e\nMaintainer: Brandon Potter \u003cBrandon.Potter@amd.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "63efde2dce3cffd828ff1a185fd9dcaa48829af8", "old_mode": 33188, "old_path": "src/cpu/minor/cpu.cc", "new_id": "484457bd415405f2119047c3eae25c5ca6632cdf", "new_mode": 33188, "new_path": "src/cpu/minor/cpu.cc" }, { "type": "modify", "old_id": "4e4762390034fde5cbc11b274d3386437b295030", "old_mode": 33188, "old_path": "src/cpu/minor/cpu.hh", "new_id": "606a401b67dcb1bf2c7cc9a87d1a2c12831394fd", "new_mode": 33188, "new_path": "src/cpu/minor/cpu.hh" }, { "type": "modify", "old_id": "7b76ca2e1b504be1a932ccb6bfb6892336ef46de", "old_mode": 33188, "old_path": "src/cpu/minor/execute.cc", "new_id": "93c0895ac94dedd5181dca103a54e2fd40f4615e", "new_mode": 33188, "new_path": "src/cpu/minor/execute.cc" }, { "type": "modify", "old_id": "ba898d987f3c98c72405156cde33159bba66ac97", "old_mode": 33188, "old_path": "src/cpu/minor/fetch2.cc", "new_id": "09a06fc240ac44c08f1423dc02b2566d9f15ee5a", "new_mode": 33188, "new_path": "src/cpu/minor/fetch2.cc" }, { "type": "modify", "old_id": "c66fbd8dc434c87f7d6928064b6c63dce966f396", "old_mode": 33188, "old_path": "src/cpu/minor/fetch2.hh", "new_id": "2230560f164335bfe1218ff635403e92a645bb64", "new_mode": 33188, "new_path": "src/cpu/minor/fetch2.hh" }, { "type": "modify", "old_id": "b5659ac0da356d6849b3151e5502285c9477f7a8", "old_mode": 33188, "old_path": "src/cpu/minor/pipeline.cc", "new_id": "3248d54657e376688ff165ec07162cb5380e01d0", "new_mode": 33188, "new_path": "src/cpu/minor/pipeline.cc" } ] }