2 * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
32 * Mach Operating System
33 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
34 * All Rights Reserved.
36 * Permission to use, copy, modify and distribute this software and its
37 * documentation is hereby granted, provided that both the copyright
38 * notice and this permission notice appear in all copies of the
39 * software, derivative works or modified versions, and any portions
40 * thereof, and that both notices appear in supporting documentation.
42 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
43 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
44 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
46 * Carnegie Mellon requests users of this software to return to
48 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
49 * School of Computer Science
50 * Carnegie Mellon University
51 * Pittsburgh PA 15213-3890
53 * any improvements or extensions that they make and grant Carnegie Mellon
54 * the rights to redistribute these changes.
62 * Non-ipc host functions.
65 #include <mach/mach_types.h>
66 #include <mach/boolean.h>
67 #include <mach/host_info.h>
68 #include <mach/host_special_ports.h>
69 #include <mach/kern_return.h>
70 #include <mach/machine.h>
71 #include <mach/port.h>
72 #include <mach/processor_info.h>
73 #include <mach/vm_param.h>
74 #include <mach/processor.h>
75 #include <mach/mach_host_server.h>
76 #include <mach/host_priv_server.h>
77 #include <mach/vm_map.h>
79 #include <kern/kern_types.h>
80 #include <kern/assert.h>
81 #include <kern/kalloc.h>
82 #include <kern/host.h>
83 #include <kern/host_statistics.h>
84 #include <kern/ipc_host.h>
85 #include <kern/misc_protos.h>
86 #include <kern/sched.h>
87 #include <kern/processor.h>
89 #include <vm/vm_map.h>
95 host_priv_t host_priv
,
96 processor_array_t
*out_array
,
97 mach_msg_type_number_t
*countp
)
99 register processor_t processor
, *tp
;
101 unsigned int count
, i
;
103 if (host_priv
== HOST_PRIV_NULL
)
104 return (KERN_INVALID_ARGUMENT
);
106 assert(host_priv
== &realhost
);
108 count
= processor_count
;
111 addr
= kalloc((vm_size_t
) (count
* sizeof(mach_port_t
)));
113 return (KERN_RESOURCE_SHORTAGE
);
115 tp
= (processor_t
*) addr
;
116 *tp
++ = processor
= processor_list
;
119 simple_lock(&processor_list_lock
);
121 for (i
= 1; i
< count
; i
++)
122 *tp
++ = processor
= processor
->processor_list
;
124 simple_unlock(&processor_list_lock
);
128 *out_array
= (processor_array_t
)addr
;
130 /* do the conversion that Mig should handle */
132 tp
= (processor_t
*) addr
;
133 for (i
= 0; i
< count
; i
++)
134 ((mach_port_t
*) tp
)[i
] =
135 (mach_port_t
)convert_processor_to_port(tp
[i
]);
137 return (KERN_SUCCESS
);
143 host_flavor_t flavor
,
145 mach_msg_type_number_t
*count
)
148 if (host
== HOST_NULL
)
149 return (KERN_INVALID_ARGUMENT
);
153 case HOST_BASIC_INFO
:
155 register host_basic_info_t basic_info
;
156 register int master_id
;
159 * Basic information about this host.
161 if (*count
< HOST_BASIC_INFO_OLD_COUNT
)
162 return (KERN_FAILURE
);
164 basic_info
= (host_basic_info_t
) info
;
166 basic_info
->memory_size
= machine_info
.memory_size
;
167 basic_info
->max_cpus
= machine_info
.max_cpus
;
168 basic_info
->avail_cpus
= processor_avail_count
;
169 master_id
= master_processor
->cpu_id
;
170 basic_info
->cpu_type
= slot_type(master_id
);
171 basic_info
->cpu_subtype
= slot_subtype(master_id
);
173 if (*count
>= HOST_BASIC_INFO_COUNT
) {
174 basic_info
->cpu_threadtype
= slot_threadtype(master_id
);
175 basic_info
->physical_cpu
= machine_info
.physical_cpu
;
176 basic_info
->physical_cpu_max
= machine_info
.physical_cpu_max
;
177 basic_info
->logical_cpu
= machine_info
.logical_cpu
;
178 basic_info
->logical_cpu_max
= machine_info
.logical_cpu_max
;
179 basic_info
->max_mem
= machine_info
.max_mem
;
181 *count
= HOST_BASIC_INFO_COUNT
;
183 *count
= HOST_BASIC_INFO_OLD_COUNT
;
186 return (KERN_SUCCESS
);
189 case HOST_SCHED_INFO
:
191 register host_sched_info_t sched_info
;
194 * Return scheduler information.
196 if (*count
< HOST_SCHED_INFO_COUNT
)
197 return (KERN_FAILURE
);
199 sched_info
= (host_sched_info_t
) info
;
201 sched_info
->min_timeout
=
202 sched_info
->min_quantum
= std_quantum_us
/ 1000;
204 *count
= HOST_SCHED_INFO_COUNT
;
206 return (KERN_SUCCESS
);
209 case HOST_RESOURCE_SIZES
:
212 * Return sizes of kernel data structures
214 if (*count
< HOST_RESOURCE_SIZES_COUNT
)
215 return (KERN_FAILURE
);
217 /* XXX Fail until ledgers are implemented */
218 return (KERN_INVALID_ARGUMENT
);
221 case HOST_PRIORITY_INFO
:
223 register host_priority_info_t priority_info
;
225 if (*count
< HOST_PRIORITY_INFO_COUNT
)
226 return (KERN_FAILURE
);
228 priority_info
= (host_priority_info_t
) info
;
230 priority_info
->kernel_priority
= MINPRI_KERNEL
;
231 priority_info
->system_priority
= MINPRI_KERNEL
;
232 priority_info
->server_priority
= MINPRI_RESERVED
;
233 priority_info
->user_priority
= BASEPRI_DEFAULT
;
234 priority_info
->depress_priority
= DEPRESSPRI
;
235 priority_info
->idle_priority
= IDLEPRI
;
236 priority_info
->minimum_priority
= MINPRI_USER
;
237 priority_info
->maximum_priority
= MAXPRI_RESERVED
;
239 *count
= HOST_PRIORITY_INFO_COUNT
;
241 return (KERN_SUCCESS
);
245 * Gestalt for various trap facilities.
247 case HOST_MACH_MSG_TRAP
:
248 case HOST_SEMAPHORE_TRAPS
:
251 return (KERN_SUCCESS
);
255 return (KERN_INVALID_ARGUMENT
);
262 host_flavor_t flavor
,
264 mach_msg_type_number_t
*count
)
268 if (host
== HOST_NULL
)
269 return (KERN_INVALID_HOST
);
275 host_load_info_t load_info
;
277 if (*count
< HOST_LOAD_INFO_COUNT
)
278 return (KERN_FAILURE
);
280 load_info
= (host_load_info_t
) info
;
282 bcopy((char *) avenrun
,
283 (char *) load_info
->avenrun
, sizeof avenrun
);
284 bcopy((char *) mach_factor
,
285 (char *) load_info
->mach_factor
, sizeof mach_factor
);
287 *count
= HOST_LOAD_INFO_COUNT
;
288 return (KERN_SUCCESS
);
293 register processor_t processor
;
294 register vm_statistics64_t stat
;
295 vm_statistics64_data_t host_vm_stat
;
296 vm_statistics_t stat32
;
297 mach_msg_type_number_t original_count
;
299 if (*count
< HOST_VM_INFO_REV0_COUNT
)
300 return (KERN_FAILURE
);
302 processor
= processor_list
;
303 stat
= &PROCESSOR_DATA(processor
, vm_stat
);
304 host_vm_stat
= *stat
;
306 if (processor_count
> 1) {
307 simple_lock(&processor_list_lock
);
309 while ((processor
= processor
->processor_list
) != NULL
) {
310 stat
= &PROCESSOR_DATA(processor
, vm_stat
);
312 host_vm_stat
.zero_fill_count
+= stat
->zero_fill_count
;
313 host_vm_stat
.reactivations
+= stat
->reactivations
;
314 host_vm_stat
.pageins
+= stat
->pageins
;
315 host_vm_stat
.pageouts
+= stat
->pageouts
;
316 host_vm_stat
.faults
+= stat
->faults
;
317 host_vm_stat
.cow_faults
+= stat
->cow_faults
;
318 host_vm_stat
.lookups
+= stat
->lookups
;
319 host_vm_stat
.hits
+= stat
->hits
;
322 simple_unlock(&processor_list_lock
);
325 stat32
= (vm_statistics_t
) info
;
327 stat32
->free_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_free_count
+ vm_page_speculative_count
);
328 stat32
->active_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_active_count
);
330 if (vm_page_local_q
) {
331 for (i
= 0; i
< vm_page_local_q_count
; i
++) {
334 lq
= &vm_page_local_q
[i
].vpl_un
.vpl
;
336 stat32
->active_count
+= VM_STATISTICS_TRUNCATE_TO_32_BIT(lq
->vpl_count
);
339 stat32
->inactive_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_inactive_count
);
341 stat32
->wire_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_wire_count
);
343 stat32
->wire_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_wire_count
+ vm_page_throttled_count
+ vm_lopage_free_count
);
345 stat32
->zero_fill_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.zero_fill_count
);
346 stat32
->reactivations
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.reactivations
);
347 stat32
->pageins
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.pageins
);
348 stat32
->pageouts
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.pageouts
);
349 stat32
->faults
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.faults
);
350 stat32
->cow_faults
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.cow_faults
);
351 stat32
->lookups
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.lookups
);
352 stat32
->hits
= VM_STATISTICS_TRUNCATE_TO_32_BIT(host_vm_stat
.hits
);
355 * Fill in extra info added in later revisions of the
356 * vm_statistics data structure. Fill in only what can fit
357 * in the data structure the caller gave us !
359 original_count
= *count
;
360 *count
= HOST_VM_INFO_REV0_COUNT
; /* rev0 already filled in */
361 if (original_count
>= HOST_VM_INFO_REV1_COUNT
) {
362 /* rev1 added "purgeable" info */
363 stat32
->purgeable_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_purgeable_count
);
364 stat32
->purges
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_purged_count
);
365 *count
= HOST_VM_INFO_REV1_COUNT
;
368 if (original_count
>= HOST_VM_INFO_REV2_COUNT
) {
369 /* rev2 added "speculative" info */
370 stat32
->speculative_count
= VM_STATISTICS_TRUNCATE_TO_32_BIT(vm_page_speculative_count
);
371 *count
= HOST_VM_INFO_REV2_COUNT
;
374 /* rev3 changed some of the fields to be 64-bit*/
376 return (KERN_SUCCESS
);
379 case HOST_CPU_LOAD_INFO
:
381 register processor_t processor
;
382 host_cpu_load_info_t cpu_load_info
;
384 if (*count
< HOST_CPU_LOAD_INFO_COUNT
)
385 return (KERN_FAILURE
);
387 #define GET_TICKS_VALUE(processor, state, timer) \
389 cpu_load_info->cpu_ticks[(state)] += \
390 (uint32_t)(timer_grab(&PROCESSOR_DATA(processor, timer)) \
391 / hz_tick_interval); \
394 cpu_load_info
= (host_cpu_load_info_t
)info
;
395 cpu_load_info
->cpu_ticks
[CPU_STATE_USER
] = 0;
396 cpu_load_info
->cpu_ticks
[CPU_STATE_SYSTEM
] = 0;
397 cpu_load_info
->cpu_ticks
[CPU_STATE_IDLE
] = 0;
398 cpu_load_info
->cpu_ticks
[CPU_STATE_NICE
] = 0;
400 processor
= processor_list
;
401 GET_TICKS_VALUE(processor
, CPU_STATE_USER
, user_state
);
402 GET_TICKS_VALUE(processor
, CPU_STATE_SYSTEM
, system_state
);
403 GET_TICKS_VALUE(processor
, CPU_STATE_IDLE
, idle_state
);
405 if (processor_count
> 1) {
406 simple_lock(&processor_list_lock
);
408 while ((processor
= processor
->processor_list
) != NULL
) {
409 GET_TICKS_VALUE(processor
, CPU_STATE_USER
, user_state
);
410 GET_TICKS_VALUE(processor
, CPU_STATE_SYSTEM
, system_state
);
411 GET_TICKS_VALUE(processor
, CPU_STATE_IDLE
, idle_state
);
414 simple_unlock(&processor_list_lock
);
417 *count
= HOST_CPU_LOAD_INFO_COUNT
;
419 return (KERN_SUCCESS
);
423 return (KERN_INVALID_ARGUMENT
);
431 host_flavor_t flavor
,
433 mach_msg_type_number_t
*count
)
437 if (host
== HOST_NULL
)
438 return (KERN_INVALID_HOST
);
442 case HOST_VM_INFO64
: /* We were asked to get vm_statistics64 */
444 register processor_t processor
;
445 register vm_statistics64_t stat
;
446 vm_statistics64_data_t host_vm_stat
;
448 if (*count
< HOST_VM_INFO64_COUNT
)
449 return (KERN_FAILURE
);
451 processor
= processor_list
;
452 stat
= &PROCESSOR_DATA(processor
, vm_stat
);
453 host_vm_stat
= *stat
;
455 if (processor_count
> 1) {
456 simple_lock(&processor_list_lock
);
458 while ((processor
= processor
->processor_list
) != NULL
) {
459 stat
= &PROCESSOR_DATA(processor
, vm_stat
);
461 host_vm_stat
.zero_fill_count
+= stat
->zero_fill_count
;
462 host_vm_stat
.reactivations
+= stat
->reactivations
;
463 host_vm_stat
.pageins
+= stat
->pageins
;
464 host_vm_stat
.pageouts
+= stat
->pageouts
;
465 host_vm_stat
.faults
+= stat
->faults
;
466 host_vm_stat
.cow_faults
+= stat
->cow_faults
;
467 host_vm_stat
.lookups
+= stat
->lookups
;
468 host_vm_stat
.hits
+= stat
->hits
;
471 simple_unlock(&processor_list_lock
);
474 stat
= (vm_statistics64_t
) info
;
476 stat
->free_count
= vm_page_free_count
+ vm_page_speculative_count
;
477 stat
->active_count
= vm_page_active_count
;
479 if (vm_page_local_q
) {
480 for (i
= 0; i
< vm_page_local_q_count
; i
++) {
483 lq
= &vm_page_local_q
[i
].vpl_un
.vpl
;
485 stat
->active_count
+= lq
->vpl_count
;
488 stat
->inactive_count
= vm_page_inactive_count
;
490 stat
->wire_count
= vm_page_wire_count
;
492 stat
->wire_count
= vm_page_wire_count
+ vm_page_throttled_count
+ vm_lopage_free_count
;
494 stat
->zero_fill_count
= host_vm_stat
.zero_fill_count
;
495 stat
->reactivations
= host_vm_stat
.reactivations
;
496 stat
->pageins
= host_vm_stat
.pageins
;
497 stat
->pageouts
= host_vm_stat
.pageouts
;
498 stat
->faults
= host_vm_stat
.faults
;
499 stat
->cow_faults
= host_vm_stat
.cow_faults
;
500 stat
->lookups
= host_vm_stat
.lookups
;
501 stat
->hits
= host_vm_stat
.hits
;
503 /* rev1 added "purgable" info */
504 stat
->purgeable_count
= vm_page_purgeable_count
;
505 stat
->purges
= vm_page_purged_count
;
507 /* rev2 added "speculative" info */
508 stat
->speculative_count
= vm_page_speculative_count
;
510 *count
= HOST_VM_INFO64_COUNT
;
512 return(KERN_SUCCESS
);
515 default: /* If we didn't recognize the flavor, send to host_statistics */
516 return(host_statistics(host
, flavor
, (host_info_t
) info
, count
));
522 * Get host statistics that require privilege.
523 * None for now, just call the un-privileged version.
526 host_priv_statistics(
527 host_priv_t host_priv
,
528 host_flavor_t flavor
,
530 mach_msg_type_number_t
*count
)
532 return(host_statistics((host_t
)host_priv
, flavor
, info
, count
));
538 vm_size_t
*out_page_size
)
540 if (host
== HOST_NULL
)
541 return(KERN_INVALID_ARGUMENT
);
543 *out_page_size
= PAGE_SIZE
;
545 return(KERN_SUCCESS
);
549 * Return kernel version string (more than you ever
550 * wanted to know about what version of the kernel this is).
552 extern char version
[];
557 kernel_version_t out_version
)
560 if (host
== HOST_NULL
)
561 return(KERN_INVALID_ARGUMENT
);
563 (void) strncpy(out_version
, version
, sizeof(kernel_version_t
));
565 return(KERN_SUCCESS
);
569 * host_processor_sets:
571 * List all processor sets on the host.
575 host_priv_t host_priv
,
576 processor_set_name_array_t
*pset_list
,
577 mach_msg_type_number_t
*count
)
581 if (host_priv
== HOST_PRIV_NULL
)
582 return (KERN_INVALID_ARGUMENT
);
585 * Allocate memory. Can be pageable because it won't be
586 * touched while holding a lock.
589 addr
= kalloc((vm_size_t
) sizeof(mach_port_t
));
591 return (KERN_RESOURCE_SHORTAGE
);
593 /* do the conversion that Mig should handle */
594 *((ipc_port_t
*) addr
) = convert_pset_name_to_port(&pset0
);
596 *pset_list
= (processor_set_array_t
)addr
;
599 return (KERN_SUCCESS
);
603 * host_processor_set_priv:
605 * Return control port for given processor set.
608 host_processor_set_priv(
609 host_priv_t host_priv
,
610 processor_set_t pset_name
,
611 processor_set_t
*pset
)
613 if (host_priv
== HOST_PRIV_NULL
|| pset_name
== PROCESSOR_SET_NULL
) {
614 *pset
= PROCESSOR_SET_NULL
;
616 return (KERN_INVALID_ARGUMENT
);
621 return (KERN_SUCCESS
);
625 * host_processor_info
627 * Return info about the processors on this host. It will return
628 * the number of processors, and the specific type of info requested
634 processor_flavor_t flavor
,
635 natural_t
*out_pcount
,
636 processor_info_array_t
*out_array
,
637 mach_msg_type_number_t
*out_array_count
)
639 kern_return_t result
;
640 processor_t processor
;
642 processor_info_t info
;
643 unsigned int icount
, tcount
;
644 unsigned int pcount
, i
;
646 vm_size_t size
, needed
;
649 if (host
== HOST_NULL
)
650 return (KERN_INVALID_ARGUMENT
);
652 result
= processor_info_count(flavor
, &icount
);
653 if (result
!= KERN_SUCCESS
)
656 pcount
= processor_count
;
659 needed
= pcount
* icount
* sizeof(natural_t
);
660 size
= round_page(needed
);
661 result
= kmem_alloc(ipc_kernel_map
, &addr
, size
);
662 if (result
!= KERN_SUCCESS
)
663 return (KERN_RESOURCE_SHORTAGE
);
665 info
= (processor_info_t
) addr
;
666 processor
= processor_list
;
669 result
= processor_info(processor
, flavor
, &thost
, info
, &tcount
);
670 if (result
!= KERN_SUCCESS
) {
671 kmem_free(ipc_kernel_map
, addr
, size
);
676 for (i
= 1; i
< pcount
; i
++) {
677 simple_lock(&processor_list_lock
);
678 processor
= processor
->processor_list
;
679 simple_unlock(&processor_list_lock
);
683 result
= processor_info(processor
, flavor
, &thost
, info
, &tcount
);
684 if (result
!= KERN_SUCCESS
) {
685 kmem_free(ipc_kernel_map
, addr
, size
);
692 bzero((char *) addr
+ needed
, size
- needed
);
694 result
= vm_map_unwire(ipc_kernel_map
, vm_map_trunc_page(addr
),
695 vm_map_round_page(addr
+ size
), FALSE
);
696 assert(result
== KERN_SUCCESS
);
697 result
= vm_map_copyin(ipc_kernel_map
, (vm_map_address_t
)addr
,
698 (vm_map_size_t
)size
, TRUE
, ©
);
699 assert(result
== KERN_SUCCESS
);
701 *out_pcount
= pcount
;
702 *out_array
= (processor_info_array_t
) copy
;
703 *out_array_count
= pcount
* icount
;
705 return (KERN_SUCCESS
);
709 * Kernel interface for setting a special port.
712 kernel_set_special_port(
713 host_priv_t host_priv
,
719 host_lock(host_priv
);
720 old_port
= host_priv
->special
[id
];
721 host_priv
->special
[id
] = port
;
722 host_unlock(host_priv
);
723 if (IP_VALID(old_port
))
724 ipc_port_release_send(old_port
);
729 * User interface for setting a special port.
731 * Only permits the user to set a user-owned special port
732 * ID, rejecting a kernel-owned special port ID.
734 * A special kernel port cannot be set up using this
735 * routine; use kernel_set_special_port() instead.
738 host_set_special_port(
739 host_priv_t host_priv
,
743 if (host_priv
== HOST_PRIV_NULL
||
744 id
<= HOST_MAX_SPECIAL_KERNEL_PORT
|| id
> HOST_MAX_SPECIAL_PORT
) {
746 ipc_port_release_send(port
);
747 return KERN_INVALID_ARGUMENT
;
750 return kernel_set_special_port(host_priv
, id
, port
);
755 * User interface for retrieving a special port.
757 * Note that there is nothing to prevent a user special
758 * port from disappearing after it has been discovered by
759 * the caller; thus, using a special port can always result
760 * in a "port not valid" error.
764 host_get_special_port(
765 host_priv_t host_priv
,
772 if (host_priv
== HOST_PRIV_NULL
||
773 id
== HOST_SECURITY_PORT
|| id
> HOST_MAX_SPECIAL_PORT
|| id
< 0)
774 return KERN_INVALID_ARGUMENT
;
776 host_lock(host_priv
);
777 port
= realhost
.special
[id
];
778 *portp
= ipc_port_copy_send(port
);
779 host_unlock(host_priv
);
788 * Return the IO master access port for this host.
793 io_master_t
*io_masterp
)
795 if (host
== HOST_NULL
)
796 return KERN_INVALID_ARGUMENT
;
798 return (host_get_io_master_port(host_priv_self(), io_masterp
));
814 host_security_self(void)