{"action":"created","issue":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/172","repository_url":"https://api.github.com/repos/stsp/dosemu2","labels_url":"https://api.github.com/repos/stsp/dosemu2/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/stsp/dosemu2/issues/172/comments","events_url":"https://api.github.com/repos/stsp/dosemu2/issues/172/events","html_url":"https://github.com/stsp/dosemu2/pull/172","id":153461270,"number":172,"title":"KVM: Retry KVM_RUN if it exits with EFAULT. Fixes #168.","user":{"login":"bartoldeman","id":10634630,"avatar_url":"https://avatars.githubusercontent.com/u/10634630?v=3","gravatar_id":"","url":"https://api.github.com/users/bartoldeman","html_url":"https://github.com/bartoldeman","followers_url":"https://api.github.com/users/bartoldeman/followers","following_url":"https://api.github.com/users/bartoldeman/following{/other_user}","gists_url":"https://api.github.com/users/bartoldeman/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoldeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoldeman/subscriptions","organizations_url":"https://api.github.com/users/bartoldeman/orgs","repos_url":"https://api.github.com/users/bartoldeman/repos","events_url":"https://api.github.com/users/bartoldeman/events{/privacy}","received_events_url":"https://api.github.com/users/bartoldeman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-05-06T14:21:54Z","updated_at":"2016-05-13T16:00:48Z","closed_at":"2016-05-13T15:33:03Z","pull_request":{"url":"https://api.github.com/repos/stsp/dosemu2/pulls/172","html_url":"https://github.com/stsp/dosemu2/pull/172","diff_url":"https://github.com/stsp/dosemu2/pull/172.diff","patch_url":"https://github.com/stsp/dosemu2/pull/172.patch"},"body":"In the end commit 1c619289837 was not sufficient. With 256-color modes\r\nboth banked buffers and linear frame buffers alias the same VGA memory\r\nand this confuses the page table machinery somewhere."},"comment":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/comments/219086006","html_url":"https://github.com/stsp/dosemu2/pull/172#issuecomment-219086006","issue_url":"https://api.github.com/repos/stsp/dosemu2/issues/172","id":219086006,"user":{"login":"stsp","id":3295627,"avatar_url":"https://avatars.githubusercontent.com/u/3295627?v=3","gravatar_id":"","url":"https://api.github.com/users/stsp","html_url":"https://github.com/stsp","followers_url":"https://api.github.com/users/stsp/followers","following_url":"https://api.github.com/users/stsp/following{/other_user}","gists_url":"https://api.github.com/users/stsp/gists{/gist_id}","starred_url":"https://api.github.com/users/stsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stsp/subscriptions","organizations_url":"https://api.github.com/users/stsp/orgs","repos_url":"https://api.github.com/users/stsp/repos","events_url":"https://api.github.com/users/stsp/events{/privacy}","received_events_url":"https://api.github.com/users/stsp/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T16:00:48Z","updated_at":"2016-05-13T16:00:48Z","body":"I was worried by this part:\r\n\r\n> That way there is no more race with mprotect as the only protection comes from\r\n> monitor->pte (mapping 1) and underlying memory is always r/w.\r\n\r\nBut, as I read your new comment, it seems not\r\na problem because for that you are going to use\r\nthe new alias window, rather than changing the\r\nexisting mem_base one, correct?\r\nThen indeed sounds great. :)\r\n\r\nI wonder if mapping code can be extended with\r\nsome make_alias(addr, len) function that will just\r\ntraverse the involved VMAs and dup them with\r\nmremap(MREMAP_MAYMOVE). AFAIK you can't\r\nmremap() multiple VMAs by one mremap() call,\r\nbut traversing VMAs looks simpler than tweaking\r\nthe mapping funcs for managing the second alias."}}