Merged with gem5-stable reversion 10005.