Print this page
NEX-18463 Parallel dump produces corrupted dump file
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>


  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * University Copyright- Copyright (c) 1982, 1986, 1988
  31  * The Regents of the University of California
  32  * All Rights Reserved
  33  *
  34  * University Acknowledgment- Portions of this document are derived from
  35  * software developed by the University of California, Berkeley, and its
  36  * contributors.
  37  */
  38 




  39 #ifndef _VM_HAT_H
  40 #define _VM_HAT_H
  41 
  42 #include <sys/types.h>
  43 #include <sys/t_lock.h>
  44 #include <vm/faultcode.h>
  45 #include <sys/kstat.h>
  46 #include <sys/siginfo.h>
  47 
  48 #ifdef  __cplusplus
  49 extern "C" {
  50 #endif
  51 
  52 /*
  53  * VM - Hardware Address Translation management.
  54  *
  55  * This file describes the machine independent interfaces to
  56  * the hardware address translation management routines.  Other
  57  * machine specific interfaces and structures are defined
  58  * in <vm/hat_xxx.h>.  The hat layer manages the address


 180  *
 181  * pfn_t hat_getpfnum(hat, addr)
 182  *      returns pfn for <hat, addr> or PFN_INVALID if mapping is invalid.
 183  *
 184  * int hat_probe(hat, addr)
 185  *      return 0 if no valid mapping is present.  Faster version
 186  *      of hat_getattr in certain architectures.
 187  *
 188  * int hat_share(dhat, daddr, shat, saddr, len, szc)
 189  *
 190  * void hat_unshare(hat, addr, len, szc)
 191  *
 192  * void hat_chgprot(hat, addr, len, vprot)
 193  *      This is a deprecated call.  New segment drivers should store
 194  *      all attributes and use hat_*attr calls.
 195  *      Change the protections in the virtual address range
 196  *      given to the specified virtual protection.  If vprot is ~PROT_WRITE,
 197  *      then remove write permission, leaving the other permissions
 198  *      unchanged.  If vprot is ~PROT_USER, remove user permissions.
 199  *
 200  * void hat_flush_range(hat, addr, size)
 201  *      Invalidate a virtual address translation for the local CPU.
 202  */
 203 
 204 void    hat_memload(struct hat *, caddr_t, struct page *, uint_t, uint_t);
 205 void    hat_memload_array(struct hat *, caddr_t, size_t, struct page **,
 206                 uint_t, uint_t);
 207 void    hat_memload_region(struct hat *, caddr_t, struct page *, uint_t,
 208                 uint_t, hat_region_cookie_t);
 209 void    hat_memload_array_region(struct hat *, caddr_t, size_t, struct page **,
 210                 uint_t, uint_t, hat_region_cookie_t);
 211 
 212 void    hat_devload(struct hat *, caddr_t, size_t, pfn_t, uint_t, int);
 213 
 214 void    hat_unlock(struct hat *, caddr_t, size_t);
 215 void    hat_unlock_region(struct hat *, caddr_t, size_t, hat_region_cookie_t);
 216 
 217 void    hat_unload(struct hat *, caddr_t, size_t, uint_t);
 218 void    hat_unload_callback(struct hat *, caddr_t, size_t, uint_t,
 219                 hat_callback_t *);
 220 void    hat_flush_range(struct hat *, caddr_t, size_t);
 221 void    hat_sync(struct hat *, caddr_t, size_t, uint_t);
 222 void    hat_map(struct hat *, caddr_t, size_t, uint_t);
 223 void    hat_setattr(struct hat *, caddr_t, size_t, uint_t);
 224 void    hat_clrattr(struct hat *, caddr_t, size_t, uint_t);
 225 void    hat_chgattr(struct hat *, caddr_t, size_t, uint_t);
 226 uint_t  hat_getattr(struct hat *, caddr_t, uint_t *);
 227 ssize_t hat_getpagesize(struct hat *, caddr_t);
 228 pfn_t   hat_getpfnum(struct hat *, caddr_t);
 229 int     hat_probe(struct hat *, caddr_t);
 230 int     hat_share(struct hat *, caddr_t, struct hat *, caddr_t, size_t, uint_t);
 231 void    hat_unshare(struct hat *, caddr_t, size_t, uint_t);
 232 void    hat_chgprot(struct hat *, caddr_t, size_t, uint_t);
 233 void    hat_reserve(struct as *, caddr_t, size_t);
 234 pfn_t   va_to_pfn(void *);
 235 uint64_t va_to_pa(void *);
 236 
 237 /*
 238  * Kernel Physical Mapping (segkpm) hat interface routines.
 239  */
 240 caddr_t hat_kpm_mapin(struct page *, struct kpme *);




  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * University Copyright- Copyright (c) 1982, 1986, 1988
  31  * The Regents of the University of California
  32  * All Rights Reserved
  33  *
  34  * University Acknowledgment- Portions of this document are derived from
  35  * software developed by the University of California, Berkeley, and its
  36  * contributors.
  37  */
  38 
  39 /*
  40  * Copyright 2018 Nexenta Systems, Inc.
  41  */
  42 
  43 #ifndef _VM_HAT_H
  44 #define _VM_HAT_H
  45 
  46 #include <sys/types.h>
  47 #include <sys/t_lock.h>
  48 #include <vm/faultcode.h>
  49 #include <sys/kstat.h>
  50 #include <sys/siginfo.h>
  51 
  52 #ifdef  __cplusplus
  53 extern "C" {
  54 #endif
  55 
  56 /*
  57  * VM - Hardware Address Translation management.
  58  *
  59  * This file describes the machine independent interfaces to
  60  * the hardware address translation management routines.  Other
  61  * machine specific interfaces and structures are defined
  62  * in <vm/hat_xxx.h>.  The hat layer manages the address


 184  *
 185  * pfn_t hat_getpfnum(hat, addr)
 186  *      returns pfn for <hat, addr> or PFN_INVALID if mapping is invalid.
 187  *
 188  * int hat_probe(hat, addr)
 189  *      return 0 if no valid mapping is present.  Faster version
 190  *      of hat_getattr in certain architectures.
 191  *
 192  * int hat_share(dhat, daddr, shat, saddr, len, szc)
 193  *
 194  * void hat_unshare(hat, addr, len, szc)
 195  *
 196  * void hat_chgprot(hat, addr, len, vprot)
 197  *      This is a deprecated call.  New segment drivers should store
 198  *      all attributes and use hat_*attr calls.
 199  *      Change the protections in the virtual address range
 200  *      given to the specified virtual protection.  If vprot is ~PROT_WRITE,
 201  *      then remove write permission, leaving the other permissions
 202  *      unchanged.  If vprot is ~PROT_USER, remove user permissions.
 203  *
 204  * void hat_flush(void)
 205  *      Flush the TLB for the local CPU.
 206  */
 207 
 208 void    hat_memload(struct hat *, caddr_t, struct page *, uint_t, uint_t);
 209 void    hat_memload_array(struct hat *, caddr_t, size_t, struct page **,
 210                 uint_t, uint_t);
 211 void    hat_memload_region(struct hat *, caddr_t, struct page *, uint_t,
 212                 uint_t, hat_region_cookie_t);
 213 void    hat_memload_array_region(struct hat *, caddr_t, size_t, struct page **,
 214                 uint_t, uint_t, hat_region_cookie_t);
 215 
 216 void    hat_devload(struct hat *, caddr_t, size_t, pfn_t, uint_t, int);
 217 
 218 void    hat_unlock(struct hat *, caddr_t, size_t);
 219 void    hat_unlock_region(struct hat *, caddr_t, size_t, hat_region_cookie_t);
 220 
 221 void    hat_unload(struct hat *, caddr_t, size_t, uint_t);
 222 void    hat_unload_callback(struct hat *, caddr_t, size_t, uint_t,
 223                 hat_callback_t *);
 224 void    hat_flush(void);
 225 void    hat_sync(struct hat *, caddr_t, size_t, uint_t);
 226 void    hat_map(struct hat *, caddr_t, size_t, uint_t);
 227 void    hat_setattr(struct hat *, caddr_t, size_t, uint_t);
 228 void    hat_clrattr(struct hat *, caddr_t, size_t, uint_t);
 229 void    hat_chgattr(struct hat *, caddr_t, size_t, uint_t);
 230 uint_t  hat_getattr(struct hat *, caddr_t, uint_t *);
 231 ssize_t hat_getpagesize(struct hat *, caddr_t);
 232 pfn_t   hat_getpfnum(struct hat *, caddr_t);
 233 int     hat_probe(struct hat *, caddr_t);
 234 int     hat_share(struct hat *, caddr_t, struct hat *, caddr_t, size_t, uint_t);
 235 void    hat_unshare(struct hat *, caddr_t, size_t, uint_t);
 236 void    hat_chgprot(struct hat *, caddr_t, size_t, uint_t);
 237 void    hat_reserve(struct as *, caddr_t, size_t);
 238 pfn_t   va_to_pfn(void *);
 239 uint64_t va_to_pa(void *);
 240 
 241 /*
 242  * Kernel Physical Mapping (segkpm) hat interface routines.
 243  */
 244 caddr_t hat_kpm_mapin(struct page *, struct kpme *);