)]}'
{
  "commit": "b30ea1677b463fba80daec4e2c6f936e0042cae2",
  "tree": "e2c060721359fc47e7a2213798bc9045d582a171",
  "parents": [
    "1a567c5cff36ae3a864fa534bf76711398eba4f1"
  ],
  "author": {
    "name": "Daniel Henrique Barboza",
    "email": "dbarboza@ventanamicro.com",
    "time": "Mon Dec 18 09:53:18 2023 -0300"
  },
  "committer": {
    "name": "Alistair Francis",
    "email": "alistair.francis@wdc.com",
    "time": "Wed Jan 10 18:47:47 2024 +1000"
  },
  "message": "target/riscv/tcg: add user flag for profile support\n\nThe TCG emulation implements all the extensions described in the\nRVA22U64 profile, both mandatory and optional. The mandatory extensions\nwill be enabled via the profile flag. We\u0027ll leave the optional\nextensions to be enabled by hand.\n\nGiven that this is the first profile we\u0027re implementing in TCG we\u0027ll\nneed some ground work first:\n\n- all profiles declared in riscv_profiles[] will be exposed to users.\nTCG is the main accelerator we\u0027re considering when adding profile\nsupport in QEMU, so for now it\u0027s safe to assume that all profiles in\nriscv_profiles[] will be relevant to TCG;\n\n- we\u0027ll not support user profile settings for vendor CPUs. The flags\nwill still be exposed but users won\u0027t be able to change them;\n\n- profile support, albeit available for all non-vendor CPUs, will be\nbased on top of the new \u0027rv64i\u0027 CPU. Setting a profile to \u0027true\u0027 means\nenable all mandatory extensions of this profile, setting it to \u0027false\u0027\nwill disable all mandatory profile extensions of the CPU, which will\nobliterate preset defaults. This is not a problem for a bare CPU like\nrv64i but it can allow for silly scenarios when using other CPUs. E.g.\nan user can do \"-cpu rv64,rva22u64\u003dfalse\" and have a bunch of default\nrv64 extensions disabled. The recommended way of using profiles is the\nrv64i CPU, but users are free to experiment.\n\nFor now we\u0027ll handle multi-letter extensions only. MISA extensions need\nadditional steps that we\u0027ll take care later. At this point we can boot a\nLinux buildroot using rva22u64 using the following options:\n\n-cpu rv64i,rva22u64\u003dtrue,sv39\u003dtrue,g\u003dtrue,c\u003dtrue,s\u003dtrue\n\nNote that being an usermode/application profile we still need to\nexplicitly set \u0027s\u003dtrue\u0027 to enable Supervisor mode to boot Linux.\n\nSigned-off-by: Daniel Henrique Barboza \u003cdbarboza@ventanamicro.com\u003e\nReviewed-by: Andrew Jones \u003cajones@ventanamicro.com\u003e\nReviewed-by: Alistair Francis \u003calistair.francis@wdc.com\u003e\nMessage-ID: \u003c20231218125334.37184-11-dbarboza@ventanamicro.com\u003e\nSigned-off-by: Alistair Francis \u003calistair.francis@wdc.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f12e0620e5fb565815d9ad2453e53ea18ca2b99a",
      "old_mode": 33188,
      "old_path": "target/riscv/tcg/tcg-cpu.c",
      "new_id": "9234254772ce3ddabb1002cd975ef6a8b2842b49",
      "new_mode": 33188,
      "new_path": "target/riscv/tcg/tcg-cpu.c"
    }
  ]
}
