Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2019 16:05:45 -0500
From:      Ed Maste <emaste@freebsd.org>
To:        Will Andrews <will@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r325728 - head/lib/libkvm
Message-ID:  <CAPyFy2BwNGHkMjj2rG5N5S=7E8N=9jfAUBki1L8eCY3kMeM8fw@mail.gmail.com>
In-Reply-To: <201711112330.vABNUwXC077395@repo.freebsd.org>
References:  <201711112330.vABNUwXC077395@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 11 Nov 2017 at 18:31, Will Andrews <will@freebsd.org> wrote:
>
> Author: will
> Date: Sat Nov 11 23:30:58 2017
> New Revision: 325728
> URL: https://svnweb.freebsd.org/changeset/base/325728
>
> Log:
>   libkvm: add kvm_walk_pages API.
>
> Modified: head/lib/libkvm/kvm.h
> ==============================================================================
> --- head/lib/libkvm/kvm.h       Sat Nov 11 22:50:14 2017        (r325727)
> +++ head/lib/libkvm/kvm.h       Sat Nov 11 23:30:58 2017        (r325728)
> @@ -36,6 +36,7 @@
>  #include <sys/cdefs.h>
>  #include <sys/types.h>
>  #include <nlist.h>
> +#include <vm/vm.h>
>
>  /* Default version symbol. */
>  #define        VRS_SYM         "_version"
> @@ -73,7 +74,19 @@ struct kvm_swap {
>         u_int   ksw_reserved2;
>  };
>
> +struct kvm_page {
> +       unsigned int version;
> +       u_long paddr;

This should probably be uin64_t to support cross-debugging cores from
64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
suggested we introduce a kpaddr_t typedef akin to kvaddr_t.

> +       u_long kmap_vaddr;
> +       u_long dmap_vaddr;

These two should be kvaddr_t.

> +       vm_prot_t prot;
> +       u_long offset;

off_t?

> +       size_t len;
> +       /* end of version 1 */
> +};
> +
>  #define SWIF_DEV_PREFIX        0x0002
> +#define        LIBKVM_WALK_PAGES_VERSION       1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2BwNGHkMjj2rG5N5S=7E8N=9jfAUBki1L8eCY3kMeM8fw>