Tom Dohrmann

Results 150 comments of Tom Dohrmann

> For `VirtAddr`, we could add a new generic parameter that allows specifying 4-level or 5-level paging. If we default to 4-level paging, we might be even able to avoid...

I think CR8 is always supported in long mode. It's not optional. Feel free to open a PR.

> I'm trying to implement multitasking in user mode with the following setup: > - Each task has a user-mode and kernel-mode stack > - The kernel-mode stack pointer is...

Do we want to deprecate the old conversion methods/constructors?

We should unify the `cfg` gates for pointer conversions and similar operations, we use four different variations: - `cfg(target_pointer_width = "64")` - `VirtAddr::as_ptr`, `VirtAddr::as_mut_ptr` - `::add`, `::add_assign`, `::sub`, `::sub_assign`, `::add`,...

> For conversions **from** pointers (and references), I think `cfg(any(target_arch = "x86", target_arch = "x86_64"))` makes the most sense to me because > > * there's a legitimate use case...

The frame function can't implement the behavior you want. The problem is that it doesn't know the level and so it can't know if a frame is huge or not....

> Can it at least be renamed to `get_4kib_frame` or something to reduce bugs when calling it? I think that might still be confusing to users because they might still...

Note that this isn't unique to `USER_ACCESSIBLE`, the same should be true for other bits e.g. `WRITE` and `NO_EXECUTE`. I think we should be careful changing about `update_flags`'s behaviors around...