{"action":"created","comment":{"url":"https://api.github.com/repos/rust-osdev/x86_64/pulls/comments/181235684","pull_request_review_id":111812767,"id":181235684,"diff_hunk":"@@ -1,21 +1,51 @@\n use registers::control::Cr3;\n+use instructions::tlb;\n use structures::paging::page_table::{FrameError, PageTable, PageTableEntry, PageTableFlags};\n use structures::paging::{NotGiantPageSize, Page, PageSize, PhysFrame, Size1GB, Size2MB, Size4KB};\n use ux::u9;\n use VirtAddr;\n \n+use core::mem;\n+\n+/// This type must be used and will either flush the modified page or can be unsafely ignored.\n+#[must_use = \"Page Table changes must be flushed or unsafely ignored.\"]\n+pub struct MapperFlush<S: PageSize>(Page<S>);\n+\n+impl<S: PageSize> MapperFlush<S> {\n+    /// Create a new flush promise\n+    fn new(page: Page<S>) -> Self {\n+        MapperFlush(page)\n+    }\n+\n+    // Flush \n+    pub fn flush(self) {\n+        tlb::flush(self.0.start_address());\n+        mem::forget(self);","path":"src/structures/paging/recursive.rs","position":null,"original_position":23,"commit_id":"9cb3f8b981d4c708bc16ee6994394e7fdacebb7a","original_commit_id":"0cac4e0c238eef3fdbdc3fcd99f2cadf0a698fb5","user":{"login":"phil-opp","id":1131315,"avatar_url":"https://avatars2.githubusercontent.com/u/1131315?v=4","gravatar_id":"","url":"https://api.github.com/users/phil-opp","html_url":"https://github.com/phil-opp","followers_url":"https://api.github.com/users/phil-opp/followers","following_url":"https://api.github.com/users/phil-opp/following{/other_user}","gists_url":"https://api.github.com/users/phil-opp/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-opp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-opp/subscriptions","organizations_url":"https://api.github.com/users/phil-opp/orgs","repos_url":"https://api.github.com/users/phil-opp/repos","events_url":"https://api.github.com/users/phil-opp/events{/privacy}","received_events_url":"https://api.github.com/users/phil-opp/received_events","type":"User","site_admin":false},"body":"Why? `Page` is a `Copy` type without a destructor, so nothing should happen when it's dropped.","created_at":"2018-04-12T22:04:48Z","updated_at":"2018-04-12T22:04:48Z","html_url":"https://github.com/rust-osdev/x86_64/pull/15#discussion_r181235684","pull_request_url":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/rust-osdev/x86_64/pulls/comments/181235684"},"html":{"href":"https://github.com/rust-osdev/x86_64/pull/15#discussion_r181235684"},"pull_request":{"href":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15"}},"in_reply_to_id":181190194},"pull_request":{"url":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15","id":181285000,"html_url":"https://github.com/rust-osdev/x86_64/pull/15","diff_url":"https://github.com/rust-osdev/x86_64/pull/15.diff","patch_url":"https://github.com/rust-osdev/x86_64/pull/15.patch","issue_url":"https://api.github.com/repos/rust-osdev/x86_64/issues/15","number":15,"state":"open","locked":false,"title":"Added return value for RecursivePageTable operations that must be used.","user":{"login":"lachlansneff","id":31360811,"avatar_url":"https://avatars3.githubusercontent.com/u/31360811?v=4","gravatar_id":"","url":"https://api.github.com/users/lachlansneff","html_url":"https://github.com/lachlansneff","followers_url":"https://api.github.com/users/lachlansneff/followers","following_url":"https://api.github.com/users/lachlansneff/following{/other_user}","gists_url":"https://api.github.com/users/lachlansneff/gists{/gist_id}","starred_url":"https://api.github.com/users/lachlansneff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lachlansneff/subscriptions","organizations_url":"https://api.github.com/users/lachlansneff/orgs","repos_url":"https://api.github.com/users/lachlansneff/repos","events_url":"https://api.github.com/users/lachlansneff/events{/privacy}","received_events_url":"https://api.github.com/users/lachlansneff/received_events","type":"User","site_admin":false},"body":"Operations on the RecursivePageTable (`map_to`, `unmap`, etc) now return a `MapperFlush` that must either be `flush`ed to remove the now-outdated tlb entry for the modified page or unsafely `ignore`ed.","created_at":"2018-04-12T18:15:15Z","updated_at":"2018-04-12T22:04:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b8db56bdb9d089a941ab940a3e6816552b4b4a6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15/commits","review_comments_url":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15/comments","review_comment_url":"https://api.github.com/repos/rust-osdev/x86_64/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-osdev/x86_64/issues/15/comments","statuses_url":"https://api.github.com/repos/rust-osdev/x86_64/statuses/9cb3f8b981d4c708bc16ee6994394e7fdacebb7a","head":{"label":"lachlansneff:flush","ref":"flush","sha":"9cb3f8b981d4c708bc16ee6994394e7fdacebb7a","user":{"login":"lachlansneff","id":31360811,"avatar_url":"https://avatars3.githubusercontent.com/u/31360811?v=4","gravatar_id":"","url":"https://api.github.com/users/lachlansneff","html_url":"https://github.com/lachlansneff","followers_url":"https://api.github.com/users/lachlansneff/followers","following_url":"https://api.github.com/users/lachlansneff/following{/other_user}","gists_url":"https://api.github.com/users/lachlansneff/gists{/gist_id}","starred_url":"https://api.github.com/users/lachlansneff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lachlansneff/subscriptions","organizations_url":"https://api.github.com/users/lachlansneff/orgs","repos_url":"https://api.github.com/users/lachlansneff/repos","events_url":"https://api.github.com/users/lachlansneff/events{/privacy}","received_events_url":"https://api.github.com/users/lachlansneff/received_events","type":"User","site_admin":false},"repo":{"id":129150207,"name":"x86_64","full_name":"lachlansneff/x86_64","owner":{"login":"lachlansneff","id":31360811,"avatar_url":"https://avatars3.githubusercontent.com/u/31360811?v=4","gravatar_id":"","url":"https://api.github.com/users/lachlansneff","html_url":"https://github.com/lachlansneff","followers_url":"https://api.github.com/users/lachlansneff/followers","following_url":"https://api.github.com/users/lachlansneff/following{/other_user}","gists_url":"https://api.github.com/users/lachlansneff/gists{/gist_id}","starred_url":"https://api.github.com/users/lachlansneff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lachlansneff/subscriptions","organizations_url":"https://api.github.com/users/lachlansneff/orgs","repos_url":"https://api.github.com/users/lachlansneff/repos","events_url":"https://api.github.com/users/lachlansneff/events{/privacy}","received_events_url":"https://api.github.com/users/lachlansneff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lachlansneff/x86_64","description":"Library to program x86_64 hardware.","fork":true,"url":"https://api.github.com/repos/lachlansneff/x86_64","forks_url":"https://api.github.com/repos/lachlansneff/x86_64/forks","keys_url":"https://api.github.com/repos/lachlansneff/x86_64/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lachlansneff/x86_64/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lachlansneff/x86_64/teams","hooks_url":"https://api.github.com/repos/lachlansneff/x86_64/hooks","issue_events_url":"https://api.github.com/repos/lachlansneff/x86_64/issues/events{/number}","events_url":"https://api.github.com/repos/lachlansneff/x86_64/events","assignees_url":"https://api.github.com/repos/lachlansneff/x86_64/assignees{/user}","branches_url":"https://api.github.com/repos/lachlansneff/x86_64/branches{/branch}","tags_url":"https://api.github.com/repos/lachlansneff/x86_64/tags","blobs_url":"https://api.github.com/repos/lachlansneff/x86_64/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lachlansneff/x86_64/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lachlansneff/x86_64/git/refs{/sha}","trees_url":"https://api.github.com/repos/lachlansneff/x86_64/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lachlansneff/x86_64/statuses/{sha}","languages_url":"https://api.github.com/repos/lachlansneff/x86_64/languages","stargazers_url":"https://api.github.com/repos/lachlansneff/x86_64/stargazers","contributors_url":"https://api.github.com/repos/lachlansneff/x86_64/contributors","subscribers_url":"https://api.github.com/repos/lachlansneff/x86_64/subscribers","subscription_url":"https://api.github.com/repos/lachlansneff/x86_64/subscription","commits_url":"https://api.github.com/repos/lachlansneff/x86_64/commits{/sha}","git_commits_url":"https://api.github.com/repos/lachlansneff/x86_64/git/commits{/sha}","comments_url":"https://api.github.com/repos/lachlansneff/x86_64/comments{/number}","issue_comment_url":"https://api.github.com/repos/lachlansneff/x86_64/issues/comments{/number}","contents_url":"https://api.github.com/repos/lachlansneff/x86_64/contents/{+path}","compare_url":"https://api.github.com/repos/lachlansneff/x86_64/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lachlansneff/x86_64/merges","archive_url":"https://api.github.com/repos/lachlansneff/x86_64/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lachlansneff/x86_64/downloads","issues_url":"https://api.github.com/repos/lachlansneff/x86_64/issues{/number}","pulls_url":"https://api.github.com/repos/lachlansneff/x86_64/pulls{/number}","milestones_url":"https://api.github.com/repos/lachlansneff/x86_64/milestones{/number}","notifications_url":"https://api.github.com/repos/lachlansneff/x86_64/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lachlansneff/x86_64/labels{/name}","releases_url":"https://api.github.com/repos/lachlansneff/x86_64/releases{/id}","deployments_url":"https://api.github.com/repos/lachlansneff/x86_64/deployments","created_at":"2018-04-11T20:27:47Z","updated_at":"2018-04-12T16:39:23Z","pushed_at":"2018-04-12T21:45:58Z","git_url":"git://github.com/lachlansneff/x86_64.git","ssh_url":"git@github.com:lachlansneff/x86_64.git","clone_url":"https://github.com/lachlansneff/x86_64.git","svn_url":"https://github.com/lachlansneff/x86_64","homepage":"https://docs.rs/x86_64","size":4415,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-osdev:master","ref":"master","sha":"1e8f7c71193c0eeaa1394a8372dfd81cf3c59e75","user":{"login":"rust-osdev","id":35896598,"avatar_url":"https://avatars0.githubusercontent.com/u/35896598?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-osdev","html_url":"https://github.com/rust-osdev","followers_url":"https://api.github.com/users/rust-osdev/followers","following_url":"https://api.github.com/users/rust-osdev/following{/other_user}","gists_url":"https://api.github.com/users/rust-osdev/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-osdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-osdev/subscriptions","organizations_url":"https://api.github.com/users/rust-osdev/orgs","repos_url":"https://api.github.com/users/rust-osdev/repos","events_url":"https://api.github.com/users/rust-osdev/events{/privacy}","received_events_url":"https://api.github.com/users/rust-osdev/received_events","type":"Organization","site_admin":false},"repo":{"id":46576020,"name":"x86_64","full_name":"rust-osdev/x86_64","owner":{"login":"rust-osdev","id":35896598,"avatar_url":"https://avatars0.githubusercontent.com/u/35896598?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-osdev","html_url":"https://github.com/rust-osdev","followers_url":"https://api.github.com/users/rust-osdev/followers","following_url":"https://api.github.com/users/rust-osdev/following{/other_user}","gists_url":"https://api.github.com/users/rust-osdev/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-osdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-osdev/subscriptions","organizations_url":"https://api.github.com/users/rust-osdev/orgs","repos_url":"https://api.github.com/users/rust-osdev/repos","events_url":"https://api.github.com/users/rust-osdev/events{/privacy}","received_events_url":"https://api.github.com/users/rust-osdev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-osdev/x86_64","description":"Library to program x86_64 hardware.","fork":false,"url":"https://api.github.com/repos/rust-osdev/x86_64","forks_url":"https://api.github.com/repos/rust-osdev/x86_64/forks","keys_url":"https://api.github.com/repos/rust-osdev/x86_64/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-osdev/x86_64/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-osdev/x86_64/teams","hooks_url":"https://api.github.com/repos/rust-osdev/x86_64/hooks","issue_events_url":"https://api.github.com/repos/rust-osdev/x86_64/issues/events{/number}","events_url":"https://api.github.com/repos/rust-osdev/x86_64/events","assignees_url":"https://api.github.com/repos/rust-osdev/x86_64/assignees{/user}","branches_url":"https://api.github.com/repos/rust-osdev/x86_64/branches{/branch}","tags_url":"https://api.github.com/repos/rust-osdev/x86_64/tags","blobs_url":"https://api.github.com/repos/rust-osdev/x86_64/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-osdev/x86_64/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-osdev/x86_64/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-osdev/x86_64/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-osdev/x86_64/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-osdev/x86_64/languages","stargazers_url":"https://api.github.com/repos/rust-osdev/x86_64/stargazers","contributors_url":"https://api.github.com/repos/rust-osdev/x86_64/contributors","subscribers_url":"https://api.github.com/repos/rust-osdev/x86_64/subscribers","subscription_url":"https://api.github.com/repos/rust-osdev/x86_64/subscription","commits_url":"https://api.github.com/repos/rust-osdev/x86_64/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-osdev/x86_64/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-osdev/x86_64/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-osdev/x86_64/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-osdev/x86_64/contents/{+path}","compare_url":"https://api.github.com/repos/rust-osdev/x86_64/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-osdev/x86_64/merges","archive_url":"https://api.github.com/repos/rust-osdev/x86_64/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-osdev/x86_64/downloads","issues_url":"https://api.github.com/repos/rust-osdev/x86_64/issues{/number}","pulls_url":"https://api.github.com/repos/rust-osdev/x86_64/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-osdev/x86_64/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-osdev/x86_64/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-osdev/x86_64/labels{/name}","releases_url":"https://api.github.com/repos/rust-osdev/x86_64/releases{/id}","deployments_url":"https://api.github.com/repos/rust-osdev/x86_64/deployments","created_at":"2015-11-20T17:15:01Z","updated_at":"2018-04-12T18:19:10Z","pushed_at":"2018-04-12T21:45:59Z","git_url":"git://github.com/rust-osdev/x86_64.git","ssh_url":"git@github.com:rust-osdev/x86_64.git","clone_url":"https://github.com/rust-osdev/x86_64.git","svn_url":"https://github.com/rust-osdev/x86_64","homepage":"https://docs.rs/x86_64","size":4414,"stargazers_count":17,"watchers_count":17,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":10,"open_issues":5,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15"},"html":{"href":"https://github.com/rust-osdev/x86_64/pull/15"},"issue":{"href":"https://api.github.com/repos/rust-osdev/x86_64/issues/15"},"comments":{"href":"https://api.github.com/repos/rust-osdev/x86_64/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-osdev/x86_64/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-osdev/x86_64/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/rust-osdev/x86_64/statuses/9cb3f8b981d4c708bc16ee6994394e7fdacebb7a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"phil-opp"}}