Home
last modified time | relevance | path

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

123456

/linux/tools/testing/selftests/kvm/x86_64/
H A Dprivate_mem_conversions_test.c
H A Dsmaller_maxphyaddr_emulation_test.c
/linux/tools/testing/selftests/kvm/
H A Dmmu_stress_test.c1 // SPDX-License-Identifier: GPL-2.0
25 uint64_t gpa; in guest_code() local
29 for (gpa = start_gpa; gpa < end_gpa; gpa += stride) in guest_code()
30 vcpu_arch_put_guest(*((volatile uint64_t *)gpa), gpa); in guest_code()
34 for (gpa = start_gpa; gpa < end_gpa; gpa += stride) in guest_code()
35 *((volatile uint64_t *)gpa); in guest_code()
40 * looping until the memory is guaranteed to be read-only and a fault in guest_code()
47 * fixed-length architectures should work, but the cost of paranoia in guest_code()
48 * is low in this case). For x86, hand-code the exact opcode so that in guest_code()
52 for (gpa = start_gpa; gpa < end_gpa; gpa += stride) in guest_code()
[all …]
H A Dmax_guest_memory_test.c
H A Dmemslot_perf_test.c1 // SPDX-License-Identifier: GPL-2.0
3 * A memslot-related performance benchmark.
36 #define MEM_TEST_SIZE (MEM_SIZE - MEM_EXTRA_SIZE)
45 #define MEM_TEST_MAP_SIZE (MEM_SIZE_MAP - MEM_EXTRA_SIZE)
68 * architecture slots memory-per-slot memory-on-last-slot
69 * --------------------------------------------------------------
70 * x86-4KB 32763 16KB 160KB
71 * arm64-4KB 32766 16KB 112KB
72 * arm64-16KB 32766 16KB 112KB
73 * arm64-64KB 8192 64KB 128KB
[all …]
H A Dmemslot_modification_stress_test.c1 // SPDX-License-Identifier: GPL-2.0
31 static int nr_vcpus = 1;
36 struct kvm_vcpu *vcpu = vcpu_args->vcpu; in vcpu_worker()
40 run = vcpu->run; in vcpu_worker()
52 exit_reason_str(run->exit_reason)); in vcpu_worker()
59 uint64_t pages = max_t(int, vm->page_size, getpagesize()) / vm->page_size; in add_remove_memslot()
60 uint64_t gpa; in add_remove_memslot() local
67 gpa = memstress_args.gpa - pages * vm->page_size; in add_remove_memslot()
71 vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, gpa, in add_remove_memslot()
90 vm = memstress_create_vm(mode, nr_vcpus, guest_percpu_mem_size, 1, in run_test()
[all …]
/linux/tools/testing/selftests/kvm/lib/
H A Dmemstress.c1 // SPDX-License-Identifier: GPL-2.0
50 struct memstress_vcpu_args *vcpu_args = &args->vcpu_args[vcpu_idx]; in memstress_guest_code()
60 gva = vcpu_args->gva; in memstress_guest_code()
61 pages = vcpu_args->pages; in memstress_guest_code()
64 GUEST_ASSERT(vcpu_args->vcpu_idx == vcpu_idx); in memstress_guest_code()
67 for (i = 0; i < sizeof(memstress_args); i += args->guest_page_size) in memstress_guest_code()
71 if (args->random_access) in memstress_guest_code()
76 addr = gva + (page * args->guest_page_size); in memstress_guest_code()
78 if (__guest_random_bool(&rand_state, args->write_percent)) in memstress_guest_code()
84 GUEST_SYNC(1); in memstress_guest_code()
[all …]
/linux/arch/s390/kvm/
H A Dgaccess.c1 // SPDX-License-Identifier: GPL-2.0
14 #include <asm/access-regs.h>
17 #include <asm/dat-bits.h>
18 #include "kvm-s390.h"
55 unsigned long rfaa : 33; /* Region-Frame Absolute Address */
56 unsigned long sfaa : 44; /* Segment-Frame Absolute Address */
57 unsigned long pfra : 52; /* Page-Frame Real Address */
64 u32 p : 1;
73 u32 : 1;
80 unsigned long i : 1; /* ALEN-Invalid Bit */
[all …]
H A Dvsie.c1 // SPDX-License-Identifier: GPL-2.0
24 #include "kvm-s390.h"
66 __u8 reserved[0x0700 - 0x0268]; /* 0x0268 */
75 scb->ipa = 0x1000; in set_validity_icpt()
76 scb->ipb = ((__u32) reason_code) << 16; in set_validity_icpt()
77 scb->icptcode = ICPT_VALIDITY; in set_validity_icpt()
78 return 1; in set_validity_icpt()
84 atomic_or(PROG_REQUEST, &vsie_page->scb_s.prog20); in prefix_unmapped()
91 if (vsie_page->scb_s.prog0c & PROG_IN_SIE) in prefix_unmapped_sync()
92 atomic_or(CPUSTAT_STOP_INT, &vsie_page->scb_s.cpuflags); in prefix_unmapped_sync()
[all …]
H A Dgaccess.h1 /* SPDX-License-Identifier: GPL-2.0 */
17 #include "kvm-s390.h"
20 * kvm_s390_real_to_abs - convert guest real address to guest absolute address
21 * @prefix - guest prefix
22 * @gra - guest real address
32 gra -= prefix; in _kvm_s390_real_to_abs()
37 * kvm_s390_real_to_abs - convert guest real address to guest absolute address
38 * @vcpu - guest virtual cpu
39 * @gra - guest real address
51 * _kvm_s390_logical_to_effective - convert guest logical to effective address
[all …]
/linux/arch/loongarch/include/asm/
H A Dtlb.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
9 #include <asm/cpu-features.h>
53 /* Invalid all global=1 lines in current tlb */
61 /* Invalid addr with global=1 or matched asid in current tlb */
65 /* Invalid global=1, matched gid in guest tlb */
73 /* Invalid global=1 , matched gid, asid and addr in guest tlb */
75 /* Invalid all gid gva-->gpa guest tlb */
77 /* Invalid all gid gpa-->hpa tlb */
79 /* Invalid all gid tlb, including gva-->gpa and gpa-->hpa */
[all …]
/linux/arch/x86/include/asm/uv/
H A Duv_hub.h9 * Copyright (C) 2007-2014 Silicon Graphics, Inc. All rights reserved.
33 * M - The low M bits of a physical address represent the offset
38 * N - Number of bits in the node portion of a socket physical
41 * NASID - network ID of a router, Mbrick or Cbrick. Nasid values of
42 * routers always have low bit of 1, C/MBricks have low bit
44 * right shift the NASID by 1 to exclude the always-zero bit.
47 * GNODE - NASID right shifted by 1 bit. Most mmrs contain gnodes instead
50 * PNODE - the low N bits of the GNODE. The PNODE is the most useful variant
53 * GPA - (global physical address) a socket physical address converted
55 * physical addresses 1) need additional NASID (node) bits added
[all …]
/linux/arch/loongarch/kvm/
H A Dtlb.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020-2023 Loongson Technology Corporation Limited
11 * kvm_flush_tlb_all() - Flush all root TLB entries for guests.
13 * Invalidate all entries including GVA-->GPA and GPA-->HPA mappings.
24 void kvm_flush_tlb_gpa(struct kvm_vcpu *vcpu, unsigned long gpa) in kvm_flush_tlb_gpa() argument
27 gpa &= (PAGE_MASK << 1); in kvm_flush_tlb_gpa()
28 invtlb(INVTLB_GID_ADDR, read_csr_gstat() & CSR_GSTAT_GID, gpa); in kvm_flush_tlb_gpa()
H A Dvcpu.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020-2023 Loongson Technology Corporation Limited
7 #include <linux/entry-kvm.h>
39 context = this_cpu_ptr(vcpu->kvm->arch.vmcs); in kvm_save_host_pmu()
40 context->perf_cntr[0] = read_csr_perfcntr0(); in kvm_save_host_pmu()
41 context->perf_cntr[1] = read_csr_perfcntr1(); in kvm_save_host_pmu()
42 context->perf_cntr[2] = read_csr_perfcntr2(); in kvm_save_host_pmu()
43 context->perf_cntr[3] = read_csr_perfcntr3(); in kvm_save_host_pmu()
44 context->perf_ctrl[0] = write_csr_perfctrl0(0); in kvm_save_host_pmu()
45 context->perf_ctrl[1] = write_csr_perfctrl1(0); in kvm_save_host_pmu()
[all …]
/linux/Documentation/virt/kvm/x86/
H A Dmmu.rst1 .. SPDX-License-Identifier: GPL-2.0
13 - correctness:
18 - security:
21 - performance:
23 - scaling:
25 - hardware:
27 - integration:
31 - dirty tracking:
33 and framebuffer-based displays
34 - footprint:
[all …]
/linux/arch/x86/kvm/
H A Dcpuid.h1 /* SPDX-License-Identifier: GPL-2.0 */
42 return vcpu->arch.maxphyaddr; in cpuid_maxphyaddr()
45 static inline bool kvm_vcpu_is_legal_gpa(struct kvm_vcpu *vcpu, gpa_t gpa) in kvm_vcpu_is_legal_gpa() argument
47 return !(gpa & vcpu->arch.reserved_gpa_bits); in kvm_vcpu_is_legal_gpa()
51 gpa_t gpa, gpa_t alignment) in kvm_vcpu_is_legal_aligned_gpa() argument
53 return IS_ALIGNED(gpa, alignment) && kvm_vcpu_is_legal_gpa(vcpu, gpa); in kvm_vcpu_is_legal_aligned_gpa()
56 static inline bool page_address_valid(struct kvm_vcpu *vcpu, gpa_t gpa) in page_address_valid() argument
58 return kvm_vcpu_is_legal_aligned_gpa(vcpu, gpa, PAGE_SIZE); in page_address_valid()
106 return vcpu->arch.is_amd_compatible; in guest_cpuid_is_amd_compatible()
120 return -1; in guest_cpuid_family()
[all …]
/linux/arch/mips/kvm/
H A Dtlb.c42 struct mm_struct *gpa_mm = &vcpu->kvm->arch.gpa_mm; in kvm_mips_get_root_asid()
79 * clear_root_gid() - Set GuestCtl1.RID for normal root operation.
90 * set_root_gid_to_guest_gid() - Set GuestCtl1.RID to match GuestCtl1.ID.
93 * on the GPA->RPA mappings in the root TLB.
153 * kvm_vz_guest_tlb_lookup() - Lookup a guest VZ TLB mapping.
155 * @gpa: Guest virtual address in a TLB mapped guest segment.
156 * @gpa: Pointer to output guest physical address it maps to.
161 * Returns: 0 if guest TLB mapping exists for @gva. *@gpa will have been
163 * -EFAULT if no guest TLB mapping exists for @gva. *@gpa may not
167 unsigned long *gpa) in kvm_vz_guest_tlb_lookup() argument
[all …]
/linux/arch/arm64/kvm/vgic/
H A Dvgic-its.c1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/irqchip/arm-gic-v3.h>
24 #include "vgic-mmio.h"
36 int __sz = vgic_its_get_abi(i)->t##_esz; \
37 struct kvm *__k = (i)->dev->kvm; \
40 BUILD_BUG_ON(NR_ITS_ABIS == 1 && \
42 if (NR_ITS_ABIS > 1 && \
44 __ret = -EINVAL; \
53 int __sz = vgic_its_get_abi(i)->t##_esz; \
54 struct kvm *__k = (i)->dev->kvm; \
[all …]
/linux/tools/testing/selftests/kvm/lib/s390x/
H A Dprocessor.c
/linux/tools/testing/selftests/kvm/include/
H A Dkvm_util.h1 /* SPDX-License-Identifier: GPL-2.0-only */
135 for ((s) = &(c)->sublists[0]; (s)->regs; ++(s))
138 for ((i) = 0; (i) <= (vm)->last_vcpu_id; (i)++) \
139 if (!((vcpu) = vm->vcpus[i])) \
150 return memslot2region(vm, vm->memslots[type]); in vm_get_mem_region()
224 #error "RISC-
377 vm_set_memory_attributes(struct kvm_vm * vm,uint64_t gpa,uint64_t size,uint64_t attributes) vm_set_memory_attributes() argument
398 vm_mem_set_private(struct kvm_vm * vm,uint64_t gpa,uint64_t size) vm_mem_set_private() argument
404 vm_mem_set_shared(struct kvm_vm * vm,uint64_t gpa,uint64_t size) vm_mem_set_shared() argument
413 vm_guest_mem_punch_hole(struct kvm_vm * vm,uint64_t gpa,uint64_t size) vm_guest_mem_punch_hole() argument
419 vm_guest_mem_allocate(struct kvm_vm * vm,uint64_t gpa,uint64_t size) vm_guest_mem_allocate() argument
621 vm_untag_gpa(struct kvm_vm * vm,vm_paddr_t gpa) vm_untag_gpa() argument
[all...]
/linux/include/linux/
H A Dkvm_host.h1 /* SPDX-License-Identifier: GPL-2.0-only */
57 #define KVM_MEMSLOT_INVALID (1UL << 16)
60 * Bit 63 of the memslot generation number is an "update in-progress flag",
74 * memslot update is in-progress, and to prevent cache hits *after* updating
84 #define KVM_MAX_NR_ADDRESS_SPACES 1
97 #define KVM_PFN_ERR_HWPOISON (KVM_PFN_ERR_MASK + 1)
122 * translated to pfn - it is not in slot or failed to
152 static inline bool kvm_is_error_gpa(gpa_t gpa) in kvm_is_error_gpa() argument
154 return gpa == INVALID_GPA; in kvm_is_error_gpa()
162 * Architecture-independent vcpu->requests bit members
[all …]
/linux/drivers/virt/acrn/
H A Dmm.c1 // SPDX-License-Identifier: GPL-2.0
26 return -ENOMEM; in modify_region()
28 regions->vmid = vm->vmid; in modify_region()
29 regions->regions_num = 1; in modify_region()
30 regions->regions_gpa = virt_to_phys(region); in modify_region()
35 "Failed to set memory region for VM[%u]!\n", vm->vmid); in modify_region()
42 * acrn_mm_region_add() - Set up the EPT mapping of a memory region.
44 * @user_gpa: A GPA of User VM.
45 * @service_gpa: A GPA of Service VM.
60 return -ENOMEM; in acrn_mm_region_add()
[all …]
/linux/drivers/gpu/drm/i915/gvt/
H A Dopregion.c2 * Copyright(c) 2011-2016 Intel Corporation. All rights reserved.
29 * Note: Only for GVT-g virtual VBT generation, other usage must
36 #define MBOX_VBT (1<<3)
78 u8 edidless_efp:1; /* 161 */
79 u8 compression_enable:1; /* 198 */
80 u8 compression_method:1; /* 198 */
81 u8 ganged_edp:1; /* 202 */
88 u8 i2c_pin; /* for add-in card */
89 u8 target_addr; /* for add-in card */
93 u8 efp_docked_port:1; /* 158 */
[all …]
/linux/drivers/misc/sgi-gru/
H A Dgrufault.c1 // SPDX-License-Identifier: GPL-2.0-or-later
33 #define VTOP_INVALID -1
34 #define VTOP_RETRY -2
52 vma = vma_lookup(current->mm, vaddr); in gru_find_vma()
53 if (vma && vma->vm_ops == &gru_vm_ops) in gru_find_vma()
62 * - *gts with the mmap_lock locked for read and the GTS locked.
63 * - NULL if vaddr invalid OR is not a valid GSEG vaddr.
68 struct mm_struct *mm = current->mm; in gru_find_lock_gts()
77 mutex_lock(&gts->ts_ctxlock); in gru_find_lock_gts()
85 struct mm_struct *mm = current->mm; in gru_alloc_locked_gts()
[all …]
/linux/arch/arm/boot/dts/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 …]

123456