instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'tools/testing/selftests/kvm/lib/x86/vmx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2018, Google LLC.
*/
#include <asm/msr-index.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#define KVM_EPT_PAGE_TABLE_MIN_PADDR 0x1c0000
#define EPTP_MT_SHIFT 0 /* EPTP memtype bits 2:0 */
#define EPTP_PWL_... | |
Linux kernel'inin 'tools/testing/selftests/kvm/lib/x86/memstress' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* x86-specific extensions to memstress.c.
*
* Copyright (C) 2022, Google, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
#include "test_util.h"
#include "kvm_util.h"
#include "memstress.h"
#include "processor.h"
#includ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/lib/riscv/processor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* RISC-V code
*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
*/
#include <linux/compiler.h>
#include <assert.h>
#include "guest_modes.h"
#include "kvm_util.h"
#include "processor.h"
#include "ucall_common.h"
#define DEFAULT_RISCV_GUEST_STACK_VADD... | |
Linux kernel'inin 'tools/testing/selftests/kvm/lib/riscv/ucall' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* ucall support. A ucall is a "hypercall to userspace".
*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
*/
#include <linux/kvm.h>
#include "kvm_util.h"
#include "processor.h"
#include "sbi.h"
void *ucall_arch_get_ucall(struct kvm_vcpu *vcpu)
{
st... | |
Linux kernel'inde 'tools/testing/selftests/kvm/lib/riscv/handlers' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2023 Intel Corporation
*/
#ifndef __ASSEMBLY__
#define __ASSEMBLY__
#endif
#include <asm/csr.h>
.macro save_context
addi sp, sp, (-8*36)
sd x1, 8(sp)
sd x2, 16(sp)
sd x3, 24(sp)
sd x4, 32(sp)
sd x5, 40(sp)
sd x6, 48(sp)... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/cmma_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test for s390x CMMA migration
*
* Copyright IBM Corp. 2023
*
* Authors:
* Nico Boehr <nrb@linux.ibm.com>
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/cpumodel_subfuncs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright IBM Corp. 2024
*
* Authors:
* Hariharan Mari <hari55@linux.ibm.com>
*
* The tests compare the result of the KVM ioctl for obtaining CPU subfunction data with those
* from an ASM block performing the same CPU subfunction. Currently KVM doesn't mask ins... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/tprot' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test TEST PROTECTION emulation.
*
* Copyright IBM Corp. 2021
*/
#include <sys/mman.h>
#include "test_util.h"
#include "kvm_util.h"
#include "kselftest.h"
#include "ucall_common.h"
#include "processor.h"
#define CR0_FETCH_PROTECTION_OVERRIDE (1UL << (63 - 38))
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/shared_zeropage_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test shared zeropage handling (with/without storage keys)
*
* Copyright (C) 2024, Red Hat, Inc.
*/
#include <sys/mman.h>
#include <linux/fs.h>
#include "test_util.h"
#include "kvm_util.h"
#include "kselftest.h"
#include "ucall_common.h"
static void set_stora... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/ucontrol_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test code for the s390x kvm ucontrol interface
*
* Copyright IBM Corp. 2024
*
* Authors:
* Christoph Schlameuss <schlameuss@linux.ibm.com>
*/
#include "debug_print.h"
#include "kselftest_harness.h"
#include "kvm_util.h"
#include "processor.h"
#include "sie.h"
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/keyop' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test for s390x KVM_S390_KEYOP
*
* Copyright IBM Corp. 2026
*
* Authors:
* Claudio Imbrenda <imbrenda@linux.ibm.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/bits.h>
#include "test_util.h"
#include "k... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/user_operexec' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/* Test operation exception forwarding.
*
* Copyright IBM Corp. 2025
*
* Authors:
* Janosch Frank <frankja@linux.ibm.com>
*/
#include "kselftest.h"
#include "kvm_util.h"
#include "test_util.h"
#include "sie.h"
#include <linux/kvm.h>
static void guest_code_instr0(vo... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/memop' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test for s390x KVM_S390_MEM_OP
*
* Copyright (C) 2019, Red Hat, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <pthread.h>
#include <linux/bits.h>
#include "test_util.h"
#include "kvm_util.h"
#include "kself... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/debug_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/* Test KVM debugging features. */
#include "kvm_util.h"
#include "test_util.h"
#include "sie.h"
#include <linux/kvm.h>
#define __LC_SVC_NEW_PSW 0x1c0
#define __LC_PGM_NEW_PSW 0x1d0
#define IPA0_DIAG 0x8300
#define PGM_SPECIFICATION 0x06
/* Common code for testing single... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/resets' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test for s390x CPU resets
*
* Copyright (C) 2020, IBM
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "kselftest.h"
#define LOCAL_IRQS 32
#define ARBITRARY_NON_ZERO_V... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/irq_routing' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* IRQ routing offset tests.
*
* Copyright IBM Corp. 2026
*
* Authors:
* Janosch Frank <frankja@linux.ibm.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "kselftest.h"... | |
Linux kernel'inin 'tools/testing/selftests/kvm/s390/sync_regs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test for s390x KVM_CAP_SYNC_REGS
*
* Based on the same test for x86:
* Copyright (C) 2018, Google LLC.
*
* Adaptions for s390x:
* Copyright (C) 2019, Red Hat, Inc.
*
* Test expected behavior of the KVM_CAP_SYNC_REGS functionality.
*/
#include <fcntl.h>
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/kvm/loongarch/pmu_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* LoongArch KVM PMU event counting test
*
* Test hardware event counting: CPU_CYCLES, INSTR_RETIRED,
* BRANCH_INSTRUCTIONS and BRANCH_MISSES.
*/
#include <linux/bitops.h>
#include "kvm_util.h"
#include "pmu.h"
#include "loongarch/processor.h"
static int pmu_irq_count;
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/loongarch/arch_timer' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* The test validates periodic/one-shot constant timer IRQ using
* CSR.TCFG and CSR.TVAL registers.
*/
#include "arch_timer.h"
#include "kvm_util.h"
#include "processor.h"
#include "timer_test.h"
#include "ucall_common.h"
static void do_idle(void)
{
unsigned int inti... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/page_fault_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* page_fault_test.c - Test stage 2 faults.
*
* This test tries different combinations of guest accesses (e.g., write,
* S1PTW), backing source type (e.g., anon) and types of faults (e.g., read on
* hugetlbfs with a hole). It checks that the expected handling method is
*... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/sea_to_user' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test KVM returns to userspace with KVM_EXIT_ARM_SEA if host APEI fails
* to handle SEA and userspace has opt-ed in KVM_CAP_ARM_SEA_TO_USER.
*
* After reaching userspace with expected arm_sea info, also test userspace
* injecting a synchronous external data abort i... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/aarch32_id_regs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* aarch32_id_regs - Test for ID register behavior on AArch64-only systems
*
* Copyright (c) 2022 Google LLC.
*
* Test that KVM handles the AArch64 views of the AArch32 ID registers as RAZ
* and WI from userspace.
*/
#include <stdint.h>
#include "kvm_util.h"
#inc... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/vgic_init' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* vgic init sequence tests
*
* Copyright (C) 2020, Red Hat, Inc.
*/
#include <linux/kernel.h>
#include <sys/syscall.h>
#include <asm/kvm.h>
#include <asm/kvm_para.h>
#include <arm64/gic_v3.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/vgic_v5' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <sys/syscall.h>
#include <asm/kvm.h>
#include <asm/kvm_para.h>
#include <arm64/gic_v5.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vgic.h"
#define NR_VCPUS 1
struct vm_gic {
struct kvm_vm *vm;
int gic... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/vgic_lpi_stress' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* vgic_lpi_stress - Stress test for KVM's ITS emulation
*
* Copyright (c) 2024 Google LLC
*/
#include <linux/sizes.h>
#include <pthread.h>
#include <stdatomic.h>
#include <sys/sysinfo.h>
#include "kvm_util.h"
#include "gic.h"
#include "gic_v3.h"
#include "gic_v3_its.h"
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/get-reg-list' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Check for KVM_GET_REG_LIST regressions.
*
* Copyright (C) 2020, Red Hat, Inc.
*
* While the blessed list should be created from the oldest possible
* kernel, we can't go older than v5.2, though, because that's the first
* release which includes df205b5c6328 ("KVM: ar... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/vcpu_width_config' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vcpu_width_config - Test KVM_ARM_VCPU_INIT() with KVM_ARM_VCPU_EL1_32BIT.
*
* Copyright (c) 2022 Google LLC.
*
* This is a test that ensures that non-mixed-width vCPUs (all 64bit vCPUs
* or all 32bit vcPUs) can be configured and mixed-width vCPUs cannot be
* con... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/vgic_irq' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* vgic_irq.c - Test userspace injection of IRQs
*
* This test validates the injection of IRQs from userspace using various
* methods (e.g., KVM_IRQ_LINE) and modes (e.g., EOI). The guest "asks" the
* host to inject a specific intid via a GUEST_SYNC call, and then checks ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/debug-exceptions' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <test_util.h>
#include <kvm_util.h>
#include <processor.h>
#include <linux/bitfield.h>
#define MDSCR_KDE (1 << 13)
#define MDSCR_MDE (1 << 15)
#define MDSCR_SS (1 << 0)
#define DBGBCR_LEN8 (0xff << 5)
#define DBGBCR_EXEC (0x0 << 3)
#define DBGBCR_EL1 (0x1 << 1)
#defin... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/at' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* at - Test for KVM's AT emulation in the EL2&0 and EL1&0 translation regimes.
*/
#include "kvm_util.h"
#include "processor.h"
#include "test_util.h"
#include "ucall.h"
#include <asm/sysreg.h>
#define TEST_ADDR 0x80000000
enum {
CLEAR_ACCESS_FLAG,
};
static u64 *p... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/vpmu_counter_access' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vpmu_counter_access - Test vPMU event counter access
*
* Copyright (c) 2023 Google LLC.
*
* This test checks if the guest can see the same number of the PMU event
* counters (PMCR_EL0.N) that userspace sets, if the guest can access
* those counters, and if the g... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/hypercalls' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/* hypercalls: Check the ARM64's psuedo-firmware bitmap register interface.
*
* The test validates the basic hypercall functionalities that are exposed
* via the psuedo-firmware bitmap register. This includes the registers'
* read/write behavior before and after the VM... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/arch_timer_edge_cases' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* arch_timer_edge_cases.c - Tests the aarch64 timer IRQ functionality.
*
* The test validates some edge cases related to the arch-timer:
* - timers above the max TVAL value.
* - timers in the past
* - moving counters ahead and behind pending timers.
* - reprogrami... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/external_aborts' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* external_abort - Tests for userspace external abort injection
*
* Copyright (c) 2024 Google LLC
*/
#include "processor.h"
#include "test_util.h"
#define MMIO_ADDR 0x8000000ULL
#define EXPECTED_SERROR_ISS (ESR_ELx_ISV | 0x1d1ed)
static u64 expected_abort_pc;
sta... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/set_id_regs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* set_id_regs - Test for setting ID register from usersapce.
*
* Copyright (c) 2023 Google LLC.
*
*
* Test that KVM supports setting ID registers from userspace and handles the
* feature set correctly.
*/
#include <stdint.h>
#include "kvm_util.h"
#include "proce... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/hello_el2' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* hello_el2 - Basic KVM selftest for VM running at EL2 with E2H=RES1
*
* Copyright 2025 Google LLC
*/
#include "kvm_util.h"
#include "processor.h"
#include "test_util.h"
#include "ucall.h"
#include <asm/sysreg.h>
static void guest_code(void)
{
u64 mmfr0 = read_sys... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/no-vgic' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Check that, on a GICv3-capable system (GICv3 native, or GICv5 with
// FEAT_GCIE_LEGACY), not configuring GICv3 correctly results in all
// of the sysregs generating an UNDEF exception. Do the same for GICv5
// on a GICv5 host.
#include <test_util.h>
#include <kvm_util.h>
#i... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/psci_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* psci_test - Tests relating to KVM's PSCI implementation.
*
* Copyright (c) 2021 Google LLC.
*
* This test includes:
* - A regression test for a race between KVM servicing the PSCI CPU_ON call
* and userspace reading the targeted vCPU's registers.
* - A tes... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/host_sve' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Host SVE: Check FPSIMD/SVE/SME save/restore over KVM_RUN ioctls.
*
* Copyright 2025 Arm, Ltd
*/
#include <errno.h>
#include <signal.h>
#include <sys/auxv.h>
#include <asm/kvm.h>
#include <kvm_util.h>
#include "ucall_common.h"
static void guest_code(void)
{
for... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/idreg-idst' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Access all FEAT_IDST-handled registers that depend on more than
* just FEAT_AA64, and fail if we don't get an a trap with an 0x18 EC.
*/
#include <test_util.h>
#include <kvm_util.h>
#include <processor.h>
static volatile bool sys64, undef;
#define __check_sr_read(r) ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/smccc_filter' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* smccc_filter - Tests for the SMCCC filter UAPI.
*
* Copyright (c) 2023 Google LLC
*
* This test includes:
* - Tests that the UAPI constraints are upheld by KVM. For example, userspace
* is prevented from filtering the architecture range of SMCCC calls.
* -... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/kvm-uuid' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Check that nobody has tampered with KVM's UID
#include <errno.h>
#include <linux/arm-smccc.h>
#include <asm/kvm.h>
#include <kvm_util.h>
#include "processor.h"
/*
* Do NOT redefine these constants, or try to replace them with some
* "common" version. They are hardcoded ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/arm64/arch_timer' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* The test validates both the virtual and physical timer IRQs using
* CVAL and TVAL registers.
*
* Copyright (c) 2021, Google LLC.
*/
#include "arch_timer.h"
#include "delay.h"
#include "gic.h"
#include "processor.h"
#include "timer_test.h"
#include "ucall_common.h"... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/sev_smoke_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <math.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
#include "linux/psp-sev.h"
#include "sev.h"
static void guest_s... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/monitor_mwait_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "kvm_util.h"
#include "processor.h"
#include "kselftest.h"
#define CPUID_MWAIT (1u << 3)
enum monitor_mwait_testcases {
MWAIT_QUIRK_DISABLED = BIT(0),
MISC_ENABLES_... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_apicv_updates_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#define GOOD_IPI_VECTOR 0xe0
#define BAD_IPI_VECTOR 0xf0
static volatile int good_ipis_received;
static void good_ipi_handler(struct ex_regs *regs)
{
good_ipis_received++;
}
static voi... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/apic_bus_clock_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2024 Intel Corporation
*
* Verify KVM correctly emulates the APIC bus frequency when the VMM configures
* the frequency via KVM_CAP_X86_APIC_BUS_CYCLES_NS. Start the APIC timer by
* programming TMICT (timer initial count) to the largest value possib... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/fix_hypercall_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2020, Google LLC.
*
* Tests for KVM paravirtual feature disablement
*/
#include <asm/kvm_para.h>
#include <linux/kvm_para.h>
#include <linux/stringify.h>
#include <stdint.h>
#include "kvm_test_harness.h"
#include "apic.h"
#include "test_util.h"
#incl... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/cr4_cpuid_sync_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* CR4 and CPUID sync test
*
* Copyright 2018, Red Hat, Inc. and/or its affiliates.
*
* Author:
* Wei Huang <wei@redhat.com>
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_invalid_nested_guest_state' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#include <string.h>
#include <sys/ioctl.h>
#include "kselftest.h"
#define ARBITRARY_IO_PORT 0x2000
static struct kvm_vm *vm;
static void l2_guest_code(void)
{
/*
* Generate an exit ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/feature_msrs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2020, Red Hat, Inc.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
static bool is_kvm_controlled_msr(u32 msr)
{
return msr == MSR_... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/debug_regs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KVM guest debug register tests
*
* Copyright (C) 2020, Red Hat, Inc.
*/
#include <stdio.h>
#include <string.h>
#include "kvm_util.h"
#include "processor.h"
#include "apic.h"
#define DR6_BD (1 << 13)
#define DR7_GD (1 << 13)
#define IRQ_VECTOR 0xAA
/* For testing da... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/platform_info_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test for x86 KVM_CAP_MSR_PLATFORM_INFO
*
* Copyright (C) 2018, Google LLC.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
* Verifies expected behavior of controlling guest access to
* MSR_PLATFORM_INFO.
*/
#include <fcntl.h>
#include <stdio.... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/amx_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* amx tests
*
* Copyright (C) 2021, Intel, Inc.
*
* Tests for amx #NM exception and save/restore.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include "test_util.h"
#include "kvm... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_emulation_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#include "svm_util.h"
enum {
SVM_F,
VMX_F,
NR_VIRTUALIZATION_FLAVORS,
};
struct emulated_instruction {
const char name[32];
u8 opcode[15];
u32 exit_reason[NR_VIRTUALIZATION_FLAVORS]... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_tsc_adjust_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2018, Google LLC.
*
* IA32_TSC_ADJUST test
*
* According to the SDM, "if an execution of WRMSR to the
* IA32_TIME_STAMP_COUNTER MSR adds (or subtracts) value X from the TSC,
* the logical processor also adds (or subtracts) value X from the
* IA32_... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_close_kvm_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2019, Red Hat, Inc.
*
* Verify that nothing bad happens if a KVM user exits with open
* file descriptors while executing a nested guest.
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#include "svm_util.h"
#... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/private_mem_conversions_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022, Google LLC.
*/
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2020, Google LLC.
*
* Test that KVM emulates instructions in response to EPT violations when
* allow_smaller_maxphyaddr is enabled and guest.MAXPHYADDR < host.MAXPHYADDR.
*/
#include "flds_emulation.h"
#include "test_util.h"
#include "kvm_util.h"
#includ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_svm_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2022, Red Hat, Inc.
*
* Tests for Hyper-V extensions to SVM.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/bitmap.h>
#include "test_util.h"
#include "kvm_util.h"
#include "pro... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_set_state_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2019, Google LLC.
*
* This test verifies the integrity of calling the ioctl KVM_SET_NESTED_STATE.
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#include "svm_util.h"
#include <errno.h>
#include <linux/kvm.h>... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xen_shinfo_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright © 2021 Amazon.com, Inc. or its affiliates.
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include <stdint.h>
#include <time.h>
#include <sched.h>
#include <signal.h>
#include <pthread.h>
#include <sys/eventfd.h>
#define SHINFO_R... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/triple_fault_event_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#include "svm_util.h"
#include <string.h>
#include <sys/ioctl.h>
#include "kselftest.h"
#define ARBITRARY_IO_PORT 0x2000
/* The virtual machine object. */
static struct kvm_vm *vm;
sta... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2026, Google LLC.
*/
#include "kvm_util.h"
#include "vmx.h"
#include "svm_util.h"
#include "kselftest.h"
/*
* Allocate two VMCB pages for testing. Both pages have different GVAs (shared
* by both L1 and L2) and L1 GPAs. A single L2 GPA is used such t... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_apic_access_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vmx_apic_access_test
*
* Copyright (C) 2020, Google LLC.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
* The first subtest simply checks to see that an L2 guest can be
* launched with a valid APIC-access address that is backed by a
* p... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_int_ctl_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* svm_int_ctl_test
*
* Copyright (C) 2021, Red Hat, Inc.
*
* Nested SVM testing: test simultaneous use of V_IRQ from L1 and L0.
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
#include "apic.h"
bool vintr_irq_called;
b... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xcr0_cpuid_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* XCR0 cpuid test
*
* Copyright (C) 2022, Google LLC.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
/*
* Assert that architectural dependency ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/userspace_io_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
static void guest_ins_port80(u8 *buffer, unsigned int count)
{
unsigned long end;
if (count == 2)
end ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_ipi' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Hyper-V HvCallSendSyntheticClusterIpi{,Ex} tests
*
* Copyright (C) 2022, Red Hat, Inc.
*
*/
#include <pthread.h>
#include <inttypes.h>
#include "kvm_util.h"
#include "hyperv.h"
#include "test_util.h"
#include "vmx.h"
#define RECEIVER_VCPU_ID_1 2
#define RECEIVER_VCPU... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2023, Google LLC.
*/
#include <linux/kvm.h>
#include <pthread.h>
#include <stdint.h>
#include "kvm_util.h"
#include "processor.h"
#include "test_util.h"
/* Arbitrarily selected to avoid overlaps with anything else */
#define EXITS_TEST_GVA 0xc0000000
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/exit_on_emulation_failure_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022, Google LLC.
*
* Test for KVM_CAP_EXIT_ON_EMULATION_FAILURE.
*/
#include "flds_emulation.h"
#include "test_util.h"
#include "ucall_common.h"
#define MMIO_GPA 0x700000000
#define MMIO_GVA MMIO_GPA
static void guest_code(void)
{
/* Execute flds with ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/set_boot_cpu_id' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test that KVM_SET_BOOT_CPU_ID works as intended
*
* Copyright (C) 2020, Red Hat, Inc.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "a... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_dirty_log_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KVM dirty page logging test
*
* Copyright (C) 2018, Red Hat, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
#include "vmx.h"
/... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_lbr_nested_state' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2026, Google, Inc.
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
#define L2_GUEST_STACK_SIZE 64
#define DO_BRANCH() do { asm volatile("jmp 1f\n 1: nop"); } while (0)
struct lbr_branch {
u64 from, to;
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_nested_vmcb12_gpa' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2026, Google LLC.
*/
#include "kvm_util.h"
#include "vmx.h"
#include "svm_util.h"
#include "kselftest.h"
#include "kvm_test_harness.h"
#include "test_util.h"
#define L2_GUEST_STACK_SIZE 64
#define SYNC_GP 101
#define SYNC_L2_STARTED 102
static unsig... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_pmu_caps_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test for VMX-pmu perf capability msr
*
* Copyright (C) 2021 Intel Corporation
*
* Test to check the effect of various CPUID settings on
* MSR_IA32_PERF_CAPABILITIES MSR, and check that what
* we write with KVM_SET_MSR is _not_ modified by the guest
* and check it ca... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/max_vcpuid_cap_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* maximum APIC ID capability tests
*
* Copyright (C) 2022, Intel, Inc.
*
* Tests for getting/setting maximum APIC ID capability
*/
#include "kvm_util.h"
#define MAX_VCPU_ID 2
int main(int argc, char *argv[])
{
struct kvm_vm *vm;
int ret;
vm = vm_create_bareb... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_nested_la57_state_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025, Google LLC.
*
* Test KVM's ability to save and restore nested state when the L1 guest
* is using 5-level paging and the L2 guest is using 4-level paging.
*
* This test would have failed prior to commit 9245fd6b8531 ("KVM: x86:
* model canonic... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xapic_state_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "apic.h"
#include "kvm_util.h"
#include "processor.h"
#include "test_util.h"
struct xapic_vcpu {
struct kvm_vcpu *vcpu;
bool is_x2apic;
bool has_xavic_errata;
... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_vmcall_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* svm_vmcall_test
*
* Copyright (C) 2020, Red Hat, Inc.
*
* Nested SVM testing: VMCALL
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
static void l2_guest_code(struct svm_test_data *svm)
{
__asm__ __volatile__("vmcal... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/set_sregs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* KVM_SET_SREGS tests
*
* Copyright (C) 2018, Google LLC.
*
* This is a regression test for the bug fixed by the following commit:
* d3802286fa0f ("kvm: x86: Disallow illegal IA32_APIC_BASE MSR values")
*
* That bug allowed a user-mode program that called the KVM... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/dirty_log_page_splitting_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KVM dirty logging page splitting test
*
* Based on dirty_log_perf.c
*
* Copyright (C) 2018, Red Hat, Inc.
* Copyright (C) 2023, Google, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <linux/bitmap.h>
#include "kvm_util.h"
#include "tes... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_evmcs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2018, Red Hat, Inc.
*
* Tests for Enlightened VMCS, including nested guest state.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/bitmap.h>
#include "test_util.h"
#include "kvm_util.... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xapic_tpr_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <fcntl.h>
#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include "apic.h"
#include "kvm_util.h"
#include "processor.h"
#include "test_util.h"
static bool is_x2apic;
#define IRQ_VECTOR... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/smm_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2018, Red Hat, Inc.
*
* Tests for SMM.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "smm.h"
#include "vmx.h"
#include "s... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_guest_state' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include <signal.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include "kselftest.h"
static void guest_ud_handler(struct ex_regs *regs)
{
/* Loop on the ud2 until guest state is m... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_nested_soft_inject_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2022 Oracle and/or its affiliates.
*
* Based on:
* svm_int_ctl_test
*
* Copyright (C) 2021, Red Hat, Inc.
*
*/
#include <stdatomic.h>
#include <stdio.h>
#include <unistd.h>
#include "apic.h"
#include "kvm_util.h"
#include "processor.h"
#includ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/recalc_apic_map_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test edge cases and race conditions in kvm_recalculate_apic_map().
*/
#include <sys/ioctl.h>
#include <pthread.h>
#include <time.h>
#include "processor.h"
#include "test_util.h"
#include "kvm_util.h"
#include "apic.h"
#define TIMEOUT 5 /* seconds */
#define LAPI... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_tlb_flush' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Hyper-V HvFlushVirtualAddress{List,Space}{,Ex} tests
*
* Copyright (C) 2022, Red Hat, Inc.
*
*/
#include <asm/barrier.h>
#include <pthread.h>
#include <inttypes.h>
#include "kvm_util.h"
#include "processor.h"
#include "hyperv.h"
#include "test_util.h"
#include "vmx.h"... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_nested_shutdown_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* svm_nested_shutdown_test
*
* Copyright (C) 2022, Red Hat, Inc.
*
* Nested SVM testing: test that unintercepted shutdown in L2 doesn't crash the host
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
static void l2_gues... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/kvm_buslock_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2024 Advanced Micro Devices, Inc.
*/
#include <linux/atomic.h>
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
#include "vmx.h"
#include "test_util.h"
#define NR_BUS_LOCKS_PER_LEVEL 100
#define CACHE_LINE_SIZE 64
/*
* To generate... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_extended_hypercalls' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test Hyper-V extended hypercall, HV_EXT_CALL_QUERY_CAPABILITIES (0x8001),
* exit to userspace and receive result in guest.
*
* Negative tests are present in hyperv_features.c
*
* Copyright 2022 Google LLC
* Author: Vipin Sharma <vipinsh@google.com>
*/
#include ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_clock' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2021, Red Hat, Inc.
*
* Tests for Hyper-V clocksources
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "hyperv.h"
struct ms_hyperv_tsc_page {
volatile u32 tsc_sequence;
u32 reserved1;
volatile u64 tsc_scale;
volati... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/evmcs_smm_controls_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2026, Red Hat, Inc.
*
* Test that vmx_leave_smm() validates vmcs12 controls before re-entering
* nested guest mode on RSM.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#inc... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/msrs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <asm/msr-index.h>
#include <stdint.h>
#include "kvm_util.h"
#include "processor.h"
/* Use HYPERVISOR for MSRs that are emulated unconditionally (as is HYPERVISOR). */
#define X86_FEATURE_NONE X86_FEATURE_HYPERVISOR
struct kvm_msr {
const struct kvm_x86_cpu_fea... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/state_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* KVM_GET/SET_* tests
*
* Copyright (C) 2018, Red Hat, Inc.
*
* Tests for vCPU state save/restore, including nested guest state.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util.h"
#includ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/pmu_event_filter_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test for x86 KVM_SET_PMU_EVENT_FILTER.
*
* Copyright (C) 2022, Google LLC.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
* Verifies the expected behavior of allow lists and deny lists for
* virtual PMU events.
*/
#include "kvm_util.h"
#incl... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_preemption_timer_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* VMX-preemption timer test
*
* Copyright (C) 2020, Google, LLC.
*
* Test to ensure the VM-Enter after migration doesn't
* incorrectly restarts the timer with the full timer
* value instead of partially decayed timer value
*
*/
#include <fcntl.h>
#include <stdio... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/ucna_injection_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* ucna_injection_test
*
* Copyright (C) 2022, Google LLC.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
* Test that user space can inject UnCorrectable No Action required (UCNA)
* memory errors to the guest.
*
* The test starts one vCPU with... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/tsc_scaling_sync' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright © 2021 Amazon.com, Inc. or its affiliates.
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include <stdint.h>
#include <time.h>
#include <sched.h>
#include <signal.h>
#include <pthread.h>
#define NR_TEST_VCPUS 20
static struct kv... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.