{"action":"created","issue":{"url":"https://api.github.com/repos/CTSRD-CHERI/qemu/issues/23","repository_url":"https://api.github.com/repos/CTSRD-CHERI/qemu","labels_url":"https://api.github.com/repos/CTSRD-CHERI/qemu/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/CTSRD-CHERI/qemu/issues/23/comments","events_url":"https://api.github.com/repos/CTSRD-CHERI/qemu/issues/23/events","html_url":"https://github.com/CTSRD-CHERI/qemu/issues/23","id":194398476,"number":23,"title":"Unused 256 capability field shows up in CGetType","user":{"login":"bacam","id":1666370,"avatar_url":"https://avatars.githubusercontent.com/u/1666370?v=3","gravatar_id":"","url":"https://api.github.com/users/bacam","html_url":"https://github.com/bacam","followers_url":"https://api.github.com/users/bacam/followers","following_url":"https://api.github.com/users/bacam/following{/other_user}","gists_url":"https://api.github.com/users/bacam/gists{/gist_id}","starred_url":"https://api.github.com/users/bacam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacam/subscriptions","organizations_url":"https://api.github.com/users/bacam/orgs","repos_url":"https://api.github.com/users/bacam/repos","events_url":"https://api.github.com/users/bacam/events{/privacy}","received_events_url":"https://api.github.com/users/bacam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-08T17:38:15Z","updated_at":"2016-12-14T18:48:13Z","closed_at":null,"body":"This is the issue we were discussing in email; I'll include the relevant bits here.  One thing I forgot to mention before is that it also shows up when you dump the capability register file.\r\n\r\nWhen using untagged memory with the capability instructions both the L3 model and qemu keep all of the bits, but in qemu some of unassigned bits get stashed in the type field, and it isn't clear whether instructions like CGetType can be expected to work sensibly on an untagged capability register.\r\n\r\nI've only been using the 256 bit capabilities, where there are eight unused bits next to the next.  Some example code is\r\n\r\n    3C02FFFF lui         $2, 0xffff\r\n    AC220000 sw          $2, 0($1)\r\n    D8200800 clc         c1, c0, $1, 0\r\n    48030801 cgettype    $3, c1\r\n\r\nwhich writes to the top sixteen bits, then reads in the untagged memory and puts its \"type\" into `$3`.  On L3 this only picks up the actual type field:\r\n\r\n    DEBUG MIPS REG  3       0x0000000000ff0000\r\n\r\nbut on qemu it also produces the extra byte:\r\n\r\n    DEBUG MIPS REG  3       0x00000000ffff0000\r\n\r\nI think it might be better to hold the unused bits separately."},"comment":{"url":"https://api.github.com/repos/CTSRD-CHERI/qemu/issues/comments/267120270","html_url":"https://github.com/CTSRD-CHERI/qemu/issues/23#issuecomment-267120270","issue_url":"https://api.github.com/repos/CTSRD-CHERI/qemu/issues/23","id":267120270,"user":{"login":"michael-roe","id":2479665,"avatar_url":"https://avatars.githubusercontent.com/u/2479665?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-roe","html_url":"https://github.com/michael-roe","followers_url":"https://api.github.com/users/michael-roe/followers","following_url":"https://api.github.com/users/michael-roe/following{/other_user}","gists_url":"https://api.github.com/users/michael-roe/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-roe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-roe/subscriptions","organizations_url":"https://api.github.com/users/michael-roe/orgs","repos_url":"https://api.github.com/users/michael-roe/repos","events_url":"https://api.github.com/users/michael-roe/events{/privacy}","received_events_url":"https://api.github.com/users/michael-roe/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T18:48:13Z","updated_at":"2016-12-14T18:48:13Z","body":"I have added a regression test to the test suite for this issue (test_cp2_clcr_otype)."}}
{"actor":{"display_login":"michael-roe"}}