Home
last modified time | relevance | path

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

12345678910

/openbmc/linux/arch/powerpc/kvm/
H A Dbook3s_64_mmu_radix.c1 // SPDX-License-Identifier: GPL-2.0-only
22 #include <asm/pte-walk.h>
43 /* Can't access quadrants 1 or 2 in non-HV mode, call the HV to do it */ in __kvmhv_copy_tofrom_guest_radix()
46 (to != NULL) ? __pa(to): 0, in __kvmhv_copy_tofrom_guest_radix()
47 (from != NULL) ? __pa(from): 0, n); in __kvmhv_copy_tofrom_guest_radix()
49 if (eaddr & (0xFFFUL << 52)) in __kvmhv_copy_tofrom_guest_radix()
99 int lpid = vcpu->kvm->arch.lpid; in kvmhv_copy_tofrom_guest_radix()
100 int pid = vcpu->arch.pid; in kvmhv_copy_tofrom_guest_radix()
103 if (eaddr & (0x3FFUL << 52)) in kvmhv_copy_tofrom_guest_radix()
104 return -EINVAL; in kvmhv_copy_tofrom_guest_radix()
[all …]
H A Dbook3s_hv_uvmem.c1 // SPDX-License-Identifier: GPL-2.0
10 * A pseries guest can be run as secure guest on Ultravisor-enabled
15 * The page-in or page-out requests from UV will come to HV as hcalls and
31 * kvm->arch.uvmem_lock is a per-guest lock that prevents concurrent
32 * page-in and page-out requests for the same GPA. Concurrent accesses
37 * migrate_vma routines and page-in/out routines.
39 * Per-guest mutex comes with a cost though. Mainly it serializes the
40 * fault path as page-out can occur when HV faults on accessing secure
41 * guest pages. Currently UV issues page-in requests for all the guest
43 * not a cause for concern. Also currently the number of page-outs caused
[all …]
/openbmc/linux/tools/testing/selftests/kvm/
H A Dmax_guest_memory_test.c1 // SPDX-License-Identifier: GPL-2.0
23 uint64_t gpa; in guest_code() local
25 for (gpa = start_gpa; gpa < end_gpa; gpa += stride) in guest_code()
26 *((volatile uint64_t *)gpa) = gpa; in guest_code()
44 if (orig > 0) { in rendezvous_with_boss()
46 while (atomic_read(&rendezvous) > 0) in rendezvous_with_boss()
50 while (atomic_read(&rendezvous) < 0) in rendezvous_with_boss()
64 struct kvm_vcpu *vcpu = info->vcpu; in vcpu_worker()
65 struct kvm_vm *vm = vcpu->vm; in vcpu_worker()
69 vcpu_args_set(vcpu, 3, info->start_gpa, info->end_gpa, vm->page_size); in vcpu_worker()
[all …]
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 …]
/openbmc/linux/arch/mips/kvm/
H A Dmmu.c19 * KVM_MMU_CACHE_MIN_PAGES is the number of GPA page table translation levels
30 kvm_mmu_free_memory_cache(&vcpu->arch.mmu_page_cache); in kvm_mmu_free_memory_caches()
34 * kvm_pgd_init() - Initialise KVM GPA page directory.
35 * @page: Pointer to page directory (PGD) for KVM GPA.
37 * Initialise a KVM GPA page directory with pointers to the invalid table, i.e.
58 p[0] = entry; in kvm_pgd_init()
64 p[-3] = entry; in kvm_pgd_init()
65 p[-2] = entry; in kvm_pgd_init()
66 p[-1] = entry; in kvm_pgd_init()
71 * kvm_pgd_alloc() - Allocate and initialise a KVM GPA page directory.
[all …]
/openbmc/qemu/target/i386/hvf/
H A Dx86_mmu.c35 #define PAE_CR3_MASK (~0x1fllu)
36 #define LEGACY_CR3_MASK (0xffffffff)
38 #define LEGACY_PTE_PAGE_MASK (0xffffffffllu << 12)
39 #define PAE_PTE_PAGE_MASK ((-1llu << 12) & ((1llu << 52) - 1))
40 #define PAE_PTE_LARGE_PAGE_MASK ((-1llu << (21)) & ((1llu << 52) - 1))
41 #define PAE_PTE_SUPER_PAGE_MASK ((-1llu << (30)) & ((1llu << 52) - 1))
45 uint64_t gpa; member
68 return (addr >> (level_shift * (level - 1) + 12)) & ((1 << level_shift) - 1); in gpt_entry()
81 uint64_t pte = 0; in get_pt_entry()
83 uint64_t gpa = pt->pte[level] & page_mask; in get_pt_entry() local
[all …]
/openbmc/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 …]
/openbmc/linux/tools/testing/selftests/kvm/lib/
H A Dmemstress.c1 // SPDX-License-Identifier: GPL-2.0
51 struct memstress_vcpu_args *vcpu_args = &args->vcpu_args[vcpu_idx]; in memstress_guest_code()
59 rand_state = new_guest_random_state(args->random_seed + vcpu_idx); in memstress_guest_code()
61 gva = vcpu_args->gva; in memstress_guest_code()
62 pages = vcpu_args->pages; in memstress_guest_code()
65 GUEST_ASSERT(vcpu_args->vcpu_idx == vcpu_idx); in memstress_guest_code()
68 for (i = 0; i < sizeof(memstress_args); i += args->guest_page_size) in memstress_guest_code()
71 for (i = 0; i < pages; i++) { in memstress_guest_code()
72 if (args->random_access) in memstress_guest_code()
77 addr = gva + (page * args->guest_page_size); in memstress_guest_code()
[all …]
/openbmc/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 …]
/openbmc/linux/arch/s390/kvm/
H A Dgaccess.c1 // SPDX-License-Identifier: GPL-2.0
16 #include "kvm-s390.h"
23 unsigned long origin : 52; /* Region- or Segment-Table Origin */
27 unsigned long s : 1; /* Storage-Alteration-Event Control */
28 unsigned long x : 1; /* Space-Switch-Event Control */
29 unsigned long r : 1; /* Real-Space Control */
31 unsigned long dt : 2; /* Designation-Type Control */
32 unsigned long tl : 2; /* Region- or Segment-Table Length */
37 ASCE_TYPE_SEGMENT = 0,
46 unsigned long rto: 52;/* Region-Table Origin */
[all …]
H A Dvsie.c1 // SPDX-License-Identifier: GPL-2.0
22 #include "kvm-s390.h"
26 struct kvm_s390_sie_block scb_s; /* 0x0000 */
31 struct mcck_volatile_info mcck_info; /* 0x0200 */
37 struct kvm_s390_sie_block *scb_o; /* 0x0218 */
39 struct gmap *gmap; /* 0x0220 */
41 unsigned long fault_addr; /* 0x0228 */
43 gpa_t sca_gpa; /* 0x0230 */
44 gpa_t itdba_gpa; /* 0x0238 */
45 gpa_t gvrd_gpa; /* 0x0240 */
[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 …]
/openbmc/qemu/hw/i386/kvm/
H A Dxen_overlay.c9 * See the COPYING file in the top-level directory.
13 #include "qemu/host-utils.h"
15 #include "qemu/main-loop.h"
19 #include "exec/address-spaces.h"
33 #define TYPE_XEN_OVERLAY "xen-overlay"
52 void xen_overlay_do_map_page(MemoryRegion *page, uint64_t gpa) in xen_overlay_do_map_page() argument
62 if (gpa == INVALID_GPA) { in xen_overlay_do_map_page()
66 memory_region_set_address(page, gpa); in xen_overlay_do_map_page()
68 } else if (gpa != INVALID_GPA) { in xen_overlay_do_map_page()
69 memory_region_add_subregion_overlap(get_system_memory(), gpa, page, 0); in xen_overlay_do_map_page()
[all …]
/openbmc/u-boot/doc/
H A DREADME.s5pc1xx5 This README is about U-Boot support for SAMSUNG's ARM Cortex-A8 based S5PC1xx
15 While ARM Cortex-A8 support ARM v7 instruction set (-march=armv7a) we compile
16 with -march=armv5 to allow more compilers to work. For U-Boot code this has
47 /* GPA[0] pin set to irq */
48 gpio_cfg_pin(&gpio->gpio_a, 0, GPIO_IRQ);
50 /* GPA[0] pin set to input */
51 gpio_direction_input(&gpio->gpio_a, 0);
53 /* GPA[0] pin set to output/high */
54 gpio_direction_output(&gpio->gpio_a, 0, 1);
56 /* GPA[0] value set to low */
[all …]
/openbmc/linux/drivers/gpu/drm/i915/gvt/
H A Dpage_track.c2 * Copyright(c) 2011-2017 Intel Corporation. All rights reserved.
27 * intel_vgpu_find_page_track - find page track rcord of guest page
37 return radix_tree_lookup(&vgpu->page_track_tree, gfn); in intel_vgpu_find_page_track()
41 * intel_vgpu_register_page_track - register a guest page to be tacked
58 return -EEXIST; in intel_vgpu_register_page_track()
62 return -ENOMEM; in intel_vgpu_register_page_track()
64 track->handler = handler; in intel_vgpu_register_page_track()
65 track->priv_data = priv; in intel_vgpu_register_page_track()
67 ret = radix_tree_insert(&vgpu->page_track_tree, gfn, track); in intel_vgpu_register_page_track()
73 return 0; in intel_vgpu_register_page_track()
[all …]
/openbmc/qemu/target/i386/kvm/
H A Dxen-emu.c8 * See the COPYING file in the top-level directory.
14 #include "qemu/main-loop.h"
15 #include "qemu/error-report.h"
20 #include "exec/address-spaces.h"
21 #include "xen-emu.h"
26 #include "hw/i386/apic-msidef.h"
43 #include "xen-compat.h"
55 static bool kvm_gva_to_gpa(CPUState *cs, uint64_t gva, uint64_t *gpa, in kvm_gva_to_gpa() argument
63 *len = TARGET_PAGE_SIZE - (gva & ~TARGET_PAGE_MASK); in kvm_gva_to_gpa()
70 *gpa = tr.physical_address; in kvm_gva_to_gpa()
[all …]
H A Dtrace-events4 kvm_x86_fixup_msi_error(uint32_t gsi) "VT-d failed to remap interrupt for GSI %" PRIu32
8 …nge(uint64_t gpa, uint64_t size, uint64_t attributes, uint64_t flags) "gpa 0x%" PRIx64 " size 0x%"…
10 # xen-emu.c
11 …xen_hypercall: cpu %d cpl %d input %" PRIu64 " a0 0x%" PRIx64 " a1 0x%" PRIx64 " a2 0x%" PRIx64" r…
13 kvm_xen_set_shared_info(uint64_t gfn) "shared info at gfn 0x%" PRIx64
14 kvm_xen_set_vcpu_attr(int cpu, int type, uint64_t gpa) "vcpu attr cpu %d type %d gpa 0x%" PRIx64
/openbmc/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
32 spin_lock(&kvm->gpc_lock); in gfn_to_pfn_cache_invalidate_start()
33 list_for_each_entry(gpc, &kvm->gpc_list, list) { in gfn_to_pfn_cache_invalidate_start()
34 write_lock_irq(&gpc->lock); in gfn_to_pfn_cache_invalidate_start()
37 if (gpc->valid && !is_error_noslot_pfn(gpc->pfn) && in gfn_to_pfn_cache_invalidate_start()
38 gpc->uhva >= start && gpc->uhva < end) { in gfn_to_pfn_cache_invalidate_start()
39 gpc->valid = false; in gfn_to_pfn_cache_invalidate_start()
45 if (gpc->usage & KVM_GUEST_USES_PFN) { in gfn_to_pfn_cache_invalidate_start()
[all …]
/openbmc/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 …]
/openbmc/linux/arch/riscv/kvm/
H A Dtlb.c1 // SPDX-License-Identifier: GPL-2.0
16 #include <asm/insn-def.h>
21 gpa_t gpa, gpa_t gpsz, in kvm_riscv_local_hfence_gvma_vmid_gpa() argument
33 for (pos = gpa; pos < (gpa + gpsz); pos += BIT(order)) in kvm_riscv_local_hfence_gvma_vmid_gpa()
34 asm volatile (HINVAL_GVMA(%0, %1) in kvm_riscv_local_hfence_gvma_vmid_gpa()
38 for (pos = gpa; pos < (gpa + gpsz); pos += BIT(order)) in kvm_riscv_local_hfence_gvma_vmid_gpa()
39 asm volatile (HFENCE_GVMA(%0, %1) in kvm_riscv_local_hfence_gvma_vmid_gpa()
46 asm volatile(HFENCE_GVMA(zero, %0) : : "r" (vmid) : "memory"); in kvm_riscv_local_hfence_gvma_vmid_all()
49 void kvm_riscv_local_hfence_gvma_gpa(gpa_t gpa, gpa_t gpsz, in kvm_riscv_local_hfence_gvma_gpa() argument
61 for (pos = gpa; pos < (gpa + gpsz); pos += BIT(order)) in kvm_riscv_local_hfence_gvma_gpa()
[all …]
H A Dmmu.c1 // SPDX-License-Identifier: GPL-2.0
47 if (level == (gstage_pgd_levels - 1)) in gstage_pte_index()
48 mask = (PTRS_PER_PTE * (1UL << gstage_pgd_xbits)) - 1; in gstage_pte_index()
50 mask = PTRS_PER_PTE - 1; in gstage_pte_index()
65 for (i = 0; i < gstage_pgd_levels; i++) { in gstage_page_size_to_level()
68 return 0; in gstage_page_size_to_level()
72 return -EINVAL; in gstage_page_size_to_level()
78 return -EINVAL; in gstage_level_to_page_order()
81 return 0; in gstage_level_to_page_order()
94 return 0; in gstage_level_to_page_size()
[all …]
/openbmc/linux/arch/x86/kvm/
H A Dcpuid.h1 /* SPDX-License-Identifier: GPL-2.0 */
43 return vcpu->arch.maxphyaddr; in cpuid_maxphyaddr()
46 static inline bool kvm_vcpu_is_legal_gpa(struct kvm_vcpu *vcpu, gpa_t gpa) in kvm_vcpu_is_legal_gpa()
48 return !(gpa & vcpu->arch.reserved_gpa_bits); in kvm_vcpu_is_legal_gpa()
51 static inline bool kvm_vcpu_is_illegal_gpa(struct kvm_vcpu *vcpu, gpa_t gpa) in kvm_vcpu_is_illegal_gpa()
53 return !kvm_vcpu_is_legal_gpa(vcpu, gpa); in kvm_vcpu_is_illegal_gpa()
57 gpa_t gpa, gpa_ in kvm_vcpu_is_legal_aligned_gpa()
45 kvm_vcpu_is_legal_gpa(struct kvm_vcpu * vcpu,gpa_t gpa) kvm_vcpu_is_legal_gpa() argument
50 kvm_vcpu_is_illegal_gpa(struct kvm_vcpu * vcpu,gpa_t gpa) kvm_vcpu_is_illegal_gpa() argument
56 kvm_vcpu_is_legal_aligned_gpa(struct kvm_vcpu * vcpu,gpa_t gpa,gpa_t alignment) kvm_vcpu_is_legal_aligned_gpa() argument
61 page_address_valid(struct kvm_vcpu * vcpu,gpa_t gpa) page_address_valid() argument
[all...]
/openbmc/qemu/hw/remote/
H A Dtrace-events1 # multi-process trace events
6 # vfio-user-obj.c
8 vfu_cfg_read(uint32_t offset, uint32_t val) "vfu: cfg: 0x%x -> 0x%x"
9 vfu_cfg_write(uint32_t offset, uint32_t val) "vfu: cfg: 0x%x <- 0x%x"
10 vfu_dma_register(uint64_t gpa, size_t len) "vfu: registering GPA 0x%"PRIx64", %zu bytes"
11 vfu_dma_unregister(uint64_t gpa) "vfu: unregistering GPA 0x%"PRIx64""
12 vfu_bar_register(int i, uint64_t addr, uint64_t size) "vfu: BAR %d: addr 0x%"PRIx64" size 0x%"PRIx6…
13 vfu_bar_rw_enter(const char *op, uint64_t addr) "vfu: %s request for BAR address 0x%"PRIx64""
14 vfu_bar_rw_exit(const char *op, uint64_t addr) "vfu: Finished %s of BAR address 0x%"PRIx64""
15 vfu_interrupt(int pirq) "vfu: sending interrupt to device - PIRQ %d"
/openbmc/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()
/openbmc/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 …]

12345678910