Re: Add 'info pg' command to monitor

2024-04-19 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Tue, 16 Apr 2024 at 19:11, Don Porter wrote: > > > > On 4/16/24 13:03, Peter Maydell wrote: > > > On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: > > >> There is still a lot I am learning about the code base, but it seems > > >> that qemu_get

Re: Add 'info pg' command to monitor

2024-04-19 Thread Peter Maydell
On Tue, 16 Apr 2024 at 19:11, Don Porter wrote: > > On 4/16/24 13:03, Peter Maydell wrote: > > On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: > >> There is still a lot I am learning about the code base, but it seems > >> that qemu_get_guest_memory_mapping() does most of what one would need. > >>

Re: Add 'info pg' command to monitor

2024-04-17 Thread Richard Henderson
On 4/17/24 14:03, Dr. David Alan Gilbert wrote: In looking at x86 code, I see the following places where there is page table walking code to potentially merge: * target/i386/monitor.c - existing info commands * target/i386/helper.c - get_phys_page_attrs_debug * target/i386/arch_memory_mapping.

Re: Add 'info pg' command to monitor

2024-04-17 Thread Dr. David Alan Gilbert
* Don Porter (por...@cs.unc.edu) wrote: > On 4/16/24 13:03, Peter Maydell wrote: > > On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: > > > There is still a lot I am learning about the code base, but it seems > > > that qemu_get_guest_memory_mapping() does most of what one would need. > > > It curr

Re: Add 'info pg' command to monitor

2024-04-17 Thread Nadav Amit
> On 17 Apr 2024, at 11:30, Nadav Amit wrote: > > > >> On 16 Apr 2024, at 21:11, Don Porter wrote: >> >> On 4/16/24 13:03, Peter Maydell wrote: >>> On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: There is still a lot I am learning about the code base, but it seems that qemu_get_

Re: Add 'info pg' command to monitor

2024-04-17 Thread Nadav Amit
> On 16 Apr 2024, at 21:11, Don Porter wrote: > > On 4/16/24 13:03, Peter Maydell wrote: >> On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: >>> There is still a lot I am learning about the code base, but it seems >>> that qemu_get_guest_memory_mapping() does most of what one would need. >>> I

Re: Add 'info pg' command to monitor

2024-04-16 Thread Don Porter
On 4/16/24 13:03, Peter Maydell wrote: On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: There is still a lot I am learning about the code base, but it seems that qemu_get_guest_memory_mapping() does most of what one would need. It currently only returns the "leaves" of the page table tree in a l

Re: Add 'info pg' command to monitor

2024-04-16 Thread Peter Maydell
On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: > There is still a lot I am learning about the code base, but it seems > that qemu_get_guest_memory_mapping() does most of what one would need. > It currently only returns the "leaves" of the page table tree in a list. > > What if I extend this funct

Re: Add 'info pg' command to monitor

2024-04-16 Thread Don Porter
On 4/15/24 12:37, Peter Maydell wrote: On Mon, 15 Apr 2024 at 17:09, Don Porter wrote: This patch set adds an 'info pg' command to the monitor, which prints a nicer view of the page tables. A project in my graduate OS course involves implementing x86 page table support, and my students have fo

Re: Add 'info pg' command to monitor

2024-04-15 Thread Peter Maydell
On Mon, 15 Apr 2024 at 17:09, Don Porter wrote: > I am a CS professor (and, newly, a second-time contributor). I have > been using qemu in my courses for over a decade, especially a course > that asks students to write major pieces of an OS kernel from starter > code. > > I have some patches, orig

Add 'info pg' command to monitor

2024-04-15 Thread Don Porter
Hi all, I am a CS professor (and, newly, a second-time contributor). I have been using qemu in my courses for over a decade, especially a course that asks students to write major pieces of an OS kernel from starter code. I have some patches, originally from Austin Clements at MIT, that I have fou