Home
last modified time | relevance | path

Searched +full:gpa +full:- +full:1 (Results 1 – 25 of 86) sorted by relevance

1234

/freebsd/sys/dev/vmm/
H A Dvmm_mem.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
31 sx_init(&mem->mem_segs_lock, "vm_mem_segs"); in vm_mem_init()
37 if (mem->mem_maps[idx].len != 0 && in sysmem_mapping()
38 mem->mem_segs[mem->mem_maps[idx].segid].sysmem) in sysmem_mapping()
55 return (mem->mem_segs[ident].sysmem); in vm_memseg_sysmem()
95 sx_xunlock(&mem->mem_segs_lock); in vm_mem_destroy()
96 sx_destroy(&mem->mem_segs_lock); in vm_mem_destroy()
102 sx_slock(&vm_mem(vm)->mem_segs_lock); in vm_slock_memsegs()
108 sx_xlock(&vm_mem(vm)->mem_segs_lock); in vm_xlock_memsegs()
[all …]
H A Dvmm_dev.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
81 !(ucred->cr_prison->pr_allow & pr_allow_flag)) in vmm_priv_check()
115 vm_slock_vcpus(sc->vm); in vcpu_lock_all()
116 maxcpus = vm_get_maxcpus(sc->vm); in vcpu_lock_all()
118 vcpu = vm_vcpu(sc->vm, i); in vcpu_lock_all()
128 vcpu = vm_vcpu(sc->vm, j); in vcpu_lock_all()
133 vm_unlock_vcpus(sc->vm); in vcpu_lock_all()
145 maxcpus = vm_get_maxcpus(sc->vm); in vcpu_unlock_all()
147 vcpu = vm_vcpu(sc->vm, i); in vcpu_unlock_all()
[all …]
/freebsd/usr.sbin/bhyve/
H A Dbootrom.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
60 * It is allocated in page-multiple blocks on a first-come first-serve basis,
63 static char *romptr; /* Pointer to userspace-mapped bootrom region. */
64 static vm_paddr_t gpa_base; /* GPA of low end of region. */
65 static vm_paddr_t gpa_allocbot; /* Low GPA of free region. */
66 static vm_paddr_t gpa_alloctop; /* High GPA, minus 1, of free region. */
75 uint64_t gpa; member
90 offset = addr - var.gpa; in bootrom_var_mem_handler()
[all …]
H A Dbasl.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
72 case 1: in basl_le_dec()
99 const ACPI_TABLE_HEADER *const header = table->data; in basl_dump_table()
103 data = table->data; in basl_dump_table()
105 data = vm_map_gpa(table->ctx, BHYVE_ACPI_BASE + table->off, in basl_dump_table()
106 table->len); in basl_dump_table()
112 printf("%.4s @ %8x (%s)\n", header->Signature, in basl_dump_table()
113 BHYVE_ACPI_BASE + table->off, mem ? "Memory" : "FwCfg"); in basl_dump_table()
114 hexdump(data, table->len, NULL, 0); in basl_dump_table()
[all …]
H A Dgdb.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2017-2018 John H. Baldwin <jhb@FreeBSD.org>
9 * 1. Redistributions of source code must retain the above copyright
84 #define GDB_BP_SIZE 1
109 static int xml_dfd = -1;
126 uint64_t gpa; member
159 static int cur_fd = -1;
257 static void __printflike(1, 2)
268 if (caph_limit_stream(fileno(logfile), CAPH_WRITE) == -1) { in debug()
[all …]
H A Dmem.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
63 * Per-vCPU cache. Since most accesses from a vCPU will be to
75 if (a->mr_end < b->mr_base) in mmio_rb_range_compare()
76 return (-1); in mmio_rb_range_compare()
77 else if (a->mr_base > b->mr_end) in mmio_rb_range_compare()
78 return (1); in mmio_rb_range_compare()
111 new->mr_base, new->mr_end, in mmio_rb_add()
112 overlap->mr_base, overlap->mr_end, in mmio_rb_add()
[all …]
/freebsd/lib/libvmmapi/
H A Dvmmapi.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
109 return (-1); in vm_ctl_create()
121 return (-1); in vm_create()
128 return (-1); in vm_create()
149 vm = malloc(sizeof(struct vmctx) + strlen(name) + 1); in vm_openf()
152 vm->fd = vm->ctlfd = -1; in vm_openf()
153 vm->memflags = 0; in vm_openf()
154 vm->name = (char *)(vm + 1); in vm_openf()
[all …]
H A Dvmmapi.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
40 * API version for out-of-tree consumers like grub-bhyve for making compile
58 VM_MMAP_SPARSE, /* mappings created on-demand */
69 * - vm_setup_memory() uses VM_SYSMEM for the system memory segment.
70 * - the remaining identifiers can be used to create devmem segments.
84 * Returns 0 on success and non-zero otherwise.
91 * that starts at an address >= *gpa.
93 * Returns 0 if the next address range was found and non-zero otherwise.
[all …]
/freebsd/sys/amd64/vmm/intel/
H A Dvtd.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
73 #define VTD_GCR_WBF (1 << 27)
74 #define VTD_GCR_SRTP (1 << 30)
75 #define VTD_GCR_TE (1U << 31)
77 #define VTD_GSR_WBFS (1 << 27)
78 #define VTD_GSR_RTPS (1 << 30)
79 #define VTD_GSR_TES (1U << 31)
81 #define VTD_CCR_ICC (1UL << 63) /* invalidate context cache */
[all …]
/freebsd/sys/amd64/vmm/
H A Dvmm_instruction_emul.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
11 * 1. Redistributions of source code must retain the above copyright
93 #define VIE_OP_F_IMM (1 << 0) /* 16/32-bit immediate operand */
94 #define VIE_OP_F_IMM8 (1 << 1) /* 8-bit immediate operand */
95 #define VIE_OP_F_MOFFSET (1 << 2) /* 16/32/64-bit immediate moffset */
96 #define VIE_OP_F_NO_MODRM (1 << 3)
97 #define VIE_OP_F_NO_GLA_VERIFICATION (1 << 4)
202 /* XXX Group 11 extended opcode - not just MOV */
217 /* Group 1 extended opcode */
[all …]
H A Dvmm.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
109 void *cookie; /* (i) cpu-specific data */
128 #define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN)
129 #define vcpu_lock_destroy(v) mtx_destroy(&((v)->mtx))
130 #define vcpu_lock(v) mtx_lock_spin(&((v)->mtx))
131 #define vcpu_unlock(v) mtx_unlock_spin(&((v)->mtx))
132 #define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED)
146 void *cookie; /* (i) cpu-specific data */
[all …]
H A Dvmm_dev_machdep.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
216 error = copyout(vme, vmrun->vm_exit, sizeof(*vme)); in vmmdev_machdep_ioctl()
219 if (vme->exitcode == VM_EXITCODE_IPI) { in vmmdev_machdep_ioctl()
221 vmrun->cpuset, in vmmdev_machdep_ioctl()
222 min(vmrun->cpusetsize, sizeof(cpuset_t))); in vmmdev_machdep_ioctl()
225 if (sizeof(cpuset_t) < vmrun->cpusetsize) { in vmmdev_machdep_ioctl()
228 p = (uint8_t *)vmrun->cpuset + in vmmdev_machdep_ioctl()
230 while (p < (uint8_t *)vmrun->cpuset + in vmmdev_machdep_ioctl()
[all …]
H A Dvmm_mem_machdep.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
49 vmm_mmio_alloc(struct vmspace *vmspace, vm_paddr_t gpa, size_t len, in vmm_mmio_alloc() argument
56 sg = sglist_alloc(1, M_WAITOK); in vmm_mmio_alloc()
63 * VT-x ignores the MTRR settings when figuring out the in vmm_mmio_alloc()
76 error = vm_map_find(&vmspace->vm_map, obj, 0, &gpa, len, 0, in vmm_mmio_alloc()
101 vmm_mmio_free(struct vmspace *vmspace, vm_paddr_t gpa, size_t len) in vmm_mmio_free() argument
104 vm_map_remove(&vmspace->vm_map, gpa, gpa + len); in vmm_mmio_free()
H A Dvmm_lapic.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
103 return (-1); in lapic_intr_msi()
107 * Extract the x86-specific fields from the MSI addr/msg in lapic_intr_msi()
111 * MSI/MSI-X so ignore trigger level in 'msg'. in lapic_intr_msi()
114 * the Redirection Hint and Destination Mode are '1' and in lapic_intr_msi()
140 return ((msr - 0x800) << 4); in x2apic_msr_to_regoff()
190 lapic_mmio_write(struct vcpu *vcpu, uint64_t gpa, uint64_t wval, int size, in lapic_mmio_write() argument
197 off = gpa - DEFAULT_APIC_BASE; in lapic_mmio_write()
[all …]
/freebsd/sys/amd64/vmm/io/
H A Diommu.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
53 static int iommu_enable = 1;
65 return ((*ops->init)()); in IOMMU_INIT()
74 (*ops->cleanup)(); in IOMMU_CLEANUP()
82 return ((*ops->create_domain)(maxaddr)); in IOMMU_CREATE_DOMAIN()
92 (*ops->destroy_domain)(dom); in IOMMU_DESTROY_DOMAIN()
96 IOMMU_CREATE_MAPPING(void *domain, vm_paddr_t gpa, vm_paddr_t hpa, uint64_t len) in IOMMU_CREATE_MAPPING() argument
100 return ((*ops->create_mapping)(domain, gpa, hpa, len)); in IOMMU_CREATE_MAPPING()
[all …]
H A Dppt.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
59 * If the MSI-X table is located in the middle of a BAR then that MMIO
60 * region gets split into two segments - one segment above the MSI-X table
61 * and the other segment below the MSI-X table - with a hole in place of
62 * the MSI-X table so accesses to it can be trapped and emulated.
64 * So, allocate a MMIO segment for each BAR register + 1 additional segment.
66 #define MAX_MMIOSEGS ((PCIR_MAX_BAR_0 + 1) + 1)
68 MALLOC_DEFINE(M_PPTMSIX, "pptmsix", "Passthru MSI-X resources");
[all …]
H A Diommu.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
38 typedef uint64_t (*iommu_create_mapping_t)(void *domain, vm_paddr_t gpa,
40 typedef uint64_t (*iommu_remove_mapping_t)(void *domain, vm_paddr_t gpa,
52 iommu_create_domain_t create_domain; /* domain-specific */
68 void iommu_create_mapping(void *dom, vm_paddr_t gpa, vm_paddr_t hpa,
70 void iommu_remove_mapping(void *dom, vm_paddr_t gpa, size_t len);
H A Dppt.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
34 vm_paddr_t gpa, size_t len, vm_paddr_t hpa);
36 vm_paddr_t gpa, size_t len);
43 bool ppt_is_mmio(struct vm *vm, vm_paddr_t gpa);
/freebsd/sys/amd64/include/
H A Dvmm_instruction_emul.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
37 typedef int (*mem_region_read_t)(struct vcpu *vcpu, uint64_t gpa,
40 typedef int (*mem_region_write_t)(struct vcpu *vcpu, uint64_t gpa,
47 * containing 'gpa'. 'mrarg' is an opaque argument that is passed into the
54 int vmm_emulate_instruction(struct vcpu *vcpu, uint64_t gpa, struct vie *vie,
62 * Returns 1 if an alignment check exception should be injected and 0 otherwise.
67 /* Returns 1 if the 'gla' is not canonical and 0 otherwise. */
91 * 0 0 'gpa' contains result of the translation
[all …]
H A Dvmm_dev.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
36 vm_paddr_t gpa; member
47 vm_paddr_t gpa; member
51 #define VM_MEMSEG_NAME(m) ((m)->name[0] != '\0' ? (m)->name : NULL)
55 char name[VM_MAX_SUFFIXLEN + 1];
133 vm_paddr_t gpa; member
183 uint64_t gpa; /* in */ member
202 uint64_t gpa; member
[all …]
/freebsd/usr.sbin/bhyve/amd64/
H A Dpci_gvt-d.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
21 #include "pci_gvt-d-opregion.h"
38 0x00100000 /* Graphics Stolen Memory is 1 MB aligned */
41 #define GVT_D_MAP_OPREGION 1
50 sc = pi->pi_arg; in gvt_d_probe()
91 * Intel itself maps it into the guest by EPT [1]. At the moment, we're not
96 * the graphics stolen memory [2]. As the GVT-d code doesn't support Tiger Lake
100 * [1]
101 …/github.com/projectacrn/acrn-hypervisor/blob/e28d6fbfdfd556ff1bc3ff330e41d4ddbaa0f897/devicemodel/…
[all …]
/freebsd/sys/riscv/include/
H A Dvmm_instruction_emul.h2 * SPDX-License-Identifier: BSD-2-Clause
10 * 1. Redistributions of source code must retain the above copyright
35 typedef int (*mem_region_read_t)(struct vcpu *vcpu, uint64_t gpa,
37 typedef int (*mem_region_write_t)(struct vcpu *vcpu, uint64_t gpa,
50 * containing 'gpa'. 'mrarg' is an opaque argument that is passed into the
57 int vmm_emulate_instruction(struct vcpu *vcpu, uint64_t gpa, struct vie *vie,
/freebsd/sys/contrib/device-tree/src/arm/samsung/
H A Ds3c64xx-pinctrl.dtsi1 // SPDX-License-Identifier: GPL-2.0
4 * - pin control-related definitions
8 * Samsung's S3C64xx SoCs pin banks, pin-mux and pin-config options are
12 #include "s3c64xx-pinctrl.h"
19 gpa: gpa-gpio-bank { label
20 gpio-controller;
21 #gpio-cells = <2>;
22 interrupt-controller;
23 #interrupt-cells = <2>;
26 gpb: gpb-gpio-bank {
[all …]
/freebsd/sys/riscv/vmm/
H A Dvmm_instruction_emul.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
15 * 1. Redistributions of source code must retain the above copyright
60 vmm_emulate_instruction(struct vcpu *vcpu, uint64_t gpa, struct vie *vie, in vmm_emulate_instruction() argument
67 if (vie->dir == VM_DIR_READ) { in vmm_emulate_instruction()
68 error = memread(vcpu, gpa, &val, vie->access_size, memarg); in vmm_emulate_instruction()
71 if ((vie->sign_extend == 0) && (vie->access_size < 8)) in vmm_emulate_instruction()
72 val &= (1ul << (vie->access_size * 8)) - 1; in vmm_emulate_instruction()
73 error = vm_set_register(vcpu, vie->reg, val); in vmm_emulate_instruction()
75 error = vm_get_register(vcpu, vie->reg, &val); in vmm_emulate_instruction()
[all …]
/freebsd/sys/dev/hyperv/netvsc/
H A Dhn_nvs.h1 /*-
2 * Copyright (c) 2009-2012,2016-2017 Microsoft Corp.
3 * Copyright (c) 2010-2012 Citrix Inc.
10 * 1. Redistributions of source code must retain the above copyright
55 sndc->hn_cb = cb; in hn_nvs_sendctx_init()
56 sndc->hn_cbarg = cbarg; in hn_nvs_sendctx_init()
79 struct hn_nvs_sendctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt) in hn_nvs_send_rndis_sglist() argument
88 return (hn_nvs_send_sglist(chan, gpa, gpa_cnt, in hn_nvs_send_rndis_sglist()
99 struct hn_nvs_sendctx *sndc, struct vmbus_gpa *gpa,

1234