Home
last modified time | relevance | path

Searched +full:gpa +full:- +full:0 (Results 1 – 25 of 141) 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
28 for (i = 0; i < 2; i++) { in guest_code()
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()
[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)
62 * memory slot 0, on various architectures and configurations. The
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
[all …]
/linux/virt/kvm/
H A Dpfncache.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Kernel-based Virtual Machine driver for Linux
5 * This module enables kernel and guest-mode vCPU access to guest physical
30 spin_lock(&kvm->gpc_lock); in gfn_to_pfn_cache_invalidate_start()
31 list_for_each_entry(gpc, &kvm->gpc_list, list) { in gfn_to_pfn_cache_invalidate_start()
32 read_lock_irq(&gpc->lock); in gfn_to_pfn_cache_invalidate_start()
35 if (gpc->vali in gfn_to_pfn_cache_invalidate_start()
60 kvm_gpc_is_valid_len(gpa_t gpa,unsigned long uhva,unsigned long len) kvm_gpc_is_valid_len() argument
248 __kvm_gpc_refresh(struct gfn_to_pfn_cache * gpc,gpa_t gpa,unsigned long uhva) __kvm_gpc_refresh() argument
389 __kvm_gpc_activate(struct gfn_to_pfn_cache * gpc,gpa_t gpa,unsigned long uhva,unsigned long len) __kvm_gpc_activate() argument
419 kvm_gpc_activate(struct gfn_to_pfn_cache * gpc,gpa_t gpa,unsigned long len) kvm_gpc_activate() argument
[all...]
/linux/drivers/virt/acrn/
H A Dhypercall.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #define HC_ID 0x80UL
16 #define HC_ID_GEN_BASE 0x0UL
17 #define HC_SOS_REMOVE_CPU _HC_ID(HC_ID, HC_ID_GEN_BASE + 0x01)
19 #define HC_ID_VM_BASE 0x10UL
20 #define HC_CREATE_VM _HC_ID(HC_ID, HC_ID_VM_BASE + 0x00)
21 #define HC_DESTROY_VM _HC_ID(HC_ID, HC_ID_VM_BASE + 0x01)
22 #define HC_START_VM _HC_ID(HC_ID, HC_ID_VM_BASE + 0x02)
23 #define HC_PAUSE_VM _HC_ID(HC_ID, HC_ID_VM_BASE + 0x03)
24 #define HC_RESET_VM _HC_ID(HC_ID, HC_ID_VM_BASE + 0x05)
[all …]
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()
33 if (ret < 0) 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.
[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()
70 for (i = 0; i < pages; i++) { 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()
[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 */
80 unsigned long i : 1; /* ALEN-Invalid Bit */
82 unsigned long fo : 1; /* Fetch-Only Bit */
84 unsigned long alesn : 8; /* Access-List-Entry Sequence Number */
[all …]
H A Dvsie.c1 // SPDX-License-Identifier: GPL-2.0
24 #include "kvm-s390.h"
29 VSIE_PAGE_IN_USE = 0,
33 struct kvm_s390_sie_block scb_s; /* 0x0000 */
38 struct mcck_volatile_info mcck_info; /* 0x0200 */
44 struct kvm_s390_sie_block *scb_o; /* 0x0218 */
46 struct gmap *gmap; /* 0x0220 */
48 unsigned long fault_addr; /* 0x0228 */
50 gpa_t sca_gpa; /* 0x0230 */
51 gpa_t itdba_gpa; /* 0x0238 */
[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>
50 INVTLB_ALL = 0x0,
52 INVTLB_CURRENT_ALL = 0x1,
54 INVTLB_CURRENT_GTRUE = 0x2,
55 /* Invalid all global=0 lines in current tlb */
56 INVTLB_CURRENT_GFALSE = 0x3,
57 /* Invalid global=0 and matched asid lines in current tlb */
58 INVTLB_GFALSE_AND_ASID = 0x4,
[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.
20 invtlb_all(INVTLB_ALLGID, 0, 0); in kvm_flush_tlb_all()
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()
/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
43 * equal to 0. Most addressing macros that target UV hub chips
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
57 * partition does not have a physical address 0. In addition, on
[all …]
/linux/arch/x86/kvm/mmu/
H A Dpage_track.h1 /* SPDX-License-Identifier: GPL-2.0 */
30 void __kvm_page_track_write(struct kvm *kvm, gpa_t gpa, const u8 *new, int bytes);
35 return !hlist_empty(&kvm->arch.track_notifier_head.track_notifier_list); in kvm_page_track_has_external_user()
38 static inline int kvm_page_track_init(struct kvm *kvm) { return 0; } in kvm_page_track_init()
41 static inline void __kvm_page_track_write(struct kvm *kvm, gpa_t gpa, in __kvm_page_track_write() argument
50 static inline void kvm_page_track_write(struct kvm_vcpu *vcpu, gpa_t gpa, in kvm_page_track_write() argument
53 __kvm_page_track_write(vcpu->kvm, gpa, new, bytes); in kvm_page_track_write()
55 kvm_mmu_track_write(vcpu, gpa, new, bytes); in kvm_page_track_write()
/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()
118 best = kvm_find_cpuid_entry(vcpu, 0x1); in guest_cpuid_family()
[all …]
/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->vcpu
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/arch/mips/kvm/
H A Dtlb.c42 struct mm_struct *gpa_mm = &vcpu->kvm->arch.gpa_mm; in kvm_mips_get_root_asid()
45 return 0; in kvm_mips_get_root_asid()
63 if (idx >= 0) { in _kvm_mips_host_tlb_inv()
65 write_c0_entrylo0(0); in _kvm_mips_host_tlb_inv()
66 write_c0_entrylo1(0); in _kvm_mips_host_tlb_inv()
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.
143 if (idx > 0) in kvm_vz_host_tlb_inv()
148 return 0; in kvm_vz_host_tlb_inv()
[all …]
/linux/tools/testing/selftests/kvm/lib/s390x/
H A Dprocessor.c
/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; \
44 __ret = -EINVAL; \
53 int __sz = vgic_its_get_abi(i)->t##_esz; \
54 struct kvm *__k = (i)->dev->kvm; \
62 __ret = -EINVAL; \
79 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_add_lpi()
[all …]
/linux/include/linux/
H A Dkvm_host.h1 /* SPDX-License-Identifier: GPL-2.0-only */
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
92 #define KVM_PFN_ERR_MASK (0x7ffULL << 52)
93 #define KVM_PFN_ERR_NOSLOT_MASK (0xfffULL << 52)
94 #define KVM_PFN_NOSLOT (0x1ULL << 63)
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()
157 #define KVM_REQUEST_MASK GENMASK(7,0)
[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
39 #define DEVICE_TYPE_CRT 0x01
40 #define DEVICE_TYPE_EFP1 0x04
41 #define DEVICE_TYPE_EFP2 0x40
42 #define DEVICE_TYPE_EFP3 0x20
43 #define DEVICE_TYPE_EFP4 0x10
88 u8 i2c_pin; /* for add-in card */
89 u8 target_addr; /* for add-in card */
117 /* header->bdb_offset point to bdb_header offset */
[all …]
/linux/drivers/misc/sgi-gru/
H A Dgrukservices.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
22 * - single receiver
23 * - multiple senders
24 * - cross partition message
27 * - user options for dealing with timeouts, queue full, etc.
28 * - gru_create_message_queue() needs interrupt vector info
58 * 0 OK
59 * >0 error
73 * mesg pointer to message. Must be 64-bit aligned
77 * 0 message sent
[all …]

123456