instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'tools/objtool/arch/powerpc/special' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string.h>
#include <stdlib.h>
#include <objtool/special.h>
#include <objtool/builtin.h>
bool arch_support_alt_relocation(struct special_alt *special_alt,
struct instruction *insn,
struct reloc *reloc)
{
exit(-1);
}
struct reloc *arch_find_switch_... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/powerpc/include/arch/elf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ARCH_ELF
#define _OBJTOOL_ARCH_ELF
#define R_NONE R_PPC_NONE
#define R_ABS64 R_PPC64_ADDR64
#define R_ABS32 R_PPC_ADDR32
#define R_DATA32 R_PPC_REL32
#define R_DATA64 R_PPC64_REL64
#define R_TEXT32 R_PPC_REL32
#define R_TEXT64 R_PPC64_REL32
#end... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/powerpc/include/arch/cfi_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_CFI_REGS_H
#define _OBJTOOL_CFI_REGS_H
#define CFI_BP 1
#define CFI_SP CFI_BP
#define CFI_RA 32
#define CFI_NUM_REGS 33
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/powerpc/include/arch/special' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _PPC_ARCH_SPECIAL_H
#define _PPC_ARCH_SPECIAL_H
#define EX_ENTRY_SIZE 8
#define EX_ORIG_OFFSET 0
#define EX_NEW_OFFSET 4
#define JUMP_ENTRY_SIZE 16
#define JUMP_ORIG_OFFSET 0
#define JUMP_NEW_OFFSET 4
#define JUMP_KEY_OFFSET 8
#define ALT_ENTRY_SIZE 12
#de... | |
Linux kernel'inin 'tools/objtool/arch/loongarch/orc' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/objtool_types.h>
#include <asm/orc_types.h>
#include <objtool/check.h>
#include <objtool/orc.h>
#include <objtool/warn.h>
int init_orc_entry(struct orc_entry *orc, struct cfi_state *cfi, struct instruction *insn)
{
struct cfi_reg *fp = &cfi->regs[CFI_... | |
Linux kernel'inin 'tools/objtool/arch/loongarch/decode' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string.h>
#include <objtool/check.h>
#include <objtool/disas.h>
#include <objtool/warn.h>
#include <asm/inst.h>
#include <asm/orc_types.h>
#include <linux/objtool_types.h>
#include <arch/elf.h>
const char *arch_reg_name[CFI_NUM_REGS] = {
"zero", "ra", "tp", ... | |
Linux kernel'inin 'tools/objtool/arch/loongarch/special' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string.h>
#include <objtool/special.h>
#include <objtool/warn.h>
bool arch_support_alt_relocation(struct special_alt *special_alt,
struct instruction *insn,
struct reloc *reloc)
{
return false;
}
struct table_info {
struct list_head jump_info;
u... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/loongarch/include/arch/elf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ARCH_ELF_H
#define _OBJTOOL_ARCH_ELF_H
/*
* See the following link for more info about ELF Relocation types:
* https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_relocations
*/
#ifndef R_LARCH_NONE
#define R_LARCH_NONE ... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/loongarch/include/arch/cfi_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ARCH_CFI_REGS_H
#define _OBJTOOL_ARCH_CFI_REGS_H
#define CFI_RA 1
#define CFI_SP 3
#define CFI_A0 4
#define CFI_FP 22
#define CFI_S0 23
#define CFI_S1 24
#define CFI_S2 25
#define CFI_S3 26
#define CFI_S4 27
#define CFI_S5 28
#define CFI_S... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/loongarch/include/arch/special' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ARCH_SPECIAL_H
#define _OBJTOOL_ARCH_SPECIAL_H
/*
* See more info about struct exception_table_entry
* in arch/loongarch/include/asm/extable.h
*/
#define EX_ENTRY_SIZE 12
#define EX_ORIG_OFFSET 0
#define EX_NEW_OFFSET 4
/*
* See more info ab... | |
Linux kernel'inin 'tools/objtool/arch/x86/orc' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/objtool_types.h>
#include <asm/orc_types.h>
#include <objtool/check.h>
#include <objtool/orc.h>
#include <objtool/warn.h>
int init_orc_entry(struct orc_entry *orc, struct cfi_state *cfi, struct instruction *insn)
{
struct cfi_reg *bp = &cfi->regs[CFI_... | |
Linux kernel'inin 'tools/objtool/arch/x86/decode' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
*/
#include <stdio.h>
#include <stdlib.h>
#define unlikely(cond) (cond)
#include <asm/insn.h>
#include "../../../arch/x86/lib/inat.c"
#include "../../../arch/x86/lib/insn.c"
#define CONFIG_64BIT 1
#includ... | |
Linux kernel'inin 'tools/objtool/arch/x86/special' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string.h>
#include <objtool/special.h>
#include <objtool/builtin.h>
#include <objtool/warn.h>
#include <asm/cpufeatures.h>
/* cpu feature name array generated from cpufeatures.h */
#include "cpu-feature-names.c"
void arch_handle_alternative(struct special_a... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/x86/include/arch/elf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_ARCH_ELF
#define _OBJTOOL_ARCH_ELF
#define R_NONE R_X86_64_NONE
#define R_ABS32 R_X86_64_32
#define R_ABS64 R_X86_64_64
#define R_DATA32 R_X86_64_PC32
#define R_DATA64 R_X86_64_PC32
#define R_TEXT32 R_X86_64_PC32
#define R_TEXT64 R_X86_64_PC32
#... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/x86/include/arch/cfi_regs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _OBJTOOL_CFI_REGS_H
#define _OBJTOOL_CFI_REGS_H
#define CFI_AX 0
#define CFI_CX 1
#define CFI_DX 2
#define CFI_BX 3
#define CFI_SP 4
#define CFI_BP 5
#define CFI_SI 6
#define CFI_DI 7
#define CFI_R8 8
#define CFI_R9 9
#define CFI_R10 1... | |
Linux işletim sistemi çekirdeği için 'tools/objtool/arch/x86/include/arch/special' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _X86_ARCH_SPECIAL_H
#define _X86_ARCH_SPECIAL_H
#define EX_ENTRY_SIZE 12
#define EX_ORIG_OFFSET 0
#define EX_NEW_OFFSET 4
#define JUMP_ENTRY_SIZE 16
#define JUMP_ORIG_OFFSET 0
#define JUMP_NEW_OFFSET 4
#define JUMP_KEY_OFFSET 8
#define ALT_ENTRY_SIZE... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/oot-stubs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#include <linux/bug.h>
#include <linux/string.h>
#include <linux/virtio_features.h>
#ifndef VIRTIO_FEATURES_BITS
#define VIRTIO_FEATURES_BITS 128
#endif
#ifndef VIRTIO_U64
#define VIRTIO_U64(b) ((b) >> 6)
#endif
``` | |
Linux kernel'inin 'tools/virtio/vringh_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Simple test of virtio code, entirely in userpsace. */
#define _GNU_SOURCE
#include <sched.h>
#include <err.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/virtio.h>
#include <linux/vringh.h>
#include <linux/virtio_ring.h>
#include <linux/virtio_config.h>
#... | |
Linux kernel'inin 'tools/virtio/virtio_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <getopt.h>
#include <limits.h>
#include <string.h>
#include <poll.h>
#include <sys/eventfd.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include ... | |
Linux kernel'inin 'tools/virtio/vhost_net_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <getopt.h>
#include <limits.h>
#include <string.h>
#include <poll.h>
#include <sys/eventfd.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include ... | |
Linux kernel'inin 'tools/virtio/virtio-trace/trace-agent-rw' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Read/write thread of a guest agent for virtio-trace
*
* Copyright (C) 2012 Hitachi, Ltd.
* Created by Yoshihiro Yunomae <yoshihiro.yunomae.ez@hitachi.com>
* Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
*/
#define _GNU_SOURCE
#include <fcntl.h>
#... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/virtio-trace/trace-agent' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __TRACE_AGENT_H__
#define __TRACE_AGENT_H__
#include <pthread.h>
#include <stdbool.h>
#define MAX_CPUS 256
#define PIPE_INIT (1024*1024)
/*
* agent_info - structure managing total information of guest agent
* @pipe_size: size of pipe (default 1MB)
* @use_st... | |
Linux kernel'inin 'tools/virtio/virtio-trace/trace-agent' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Guest agent for virtio-trace
*
* Copyright (C) 2012 Hitachi, Ltd.
* Created by Yoshihiro Yunomae <yoshihiro.yunomae.ez@hitachi.com>
* Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
*/
#define _GNU_SOURCE
#include <limits.h>
#include <stdio.h>
#inc... | |
Linux kernel'inin 'tools/virtio/virtio-trace/trace-agent-ctl' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Controller of read/write threads for virtio-trace
*
* Copyright (C) 2012 Hitachi, Ltd.
* Created by Yoshihiro Yunomae <yoshihiro.yunomae.ez@hitachi.com>
* Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
*/
#define _GNU_SOURCE
#include <fcntl.h>
#in... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/uapi/linux/virtio_ring' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef VIRTIO_RING_H
#define VIRTIO_RING_H
#include "../../../../include/uapi/linux/virtio_ring.h"
#endif /* VIRTIO_RING_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/xen/xen' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef XEN_XEN_STUB_H
#define XEN_XEN_STUB_H
#define xen_domain() 0
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/topology' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_TOPOLOGY_H
#define _LINUX_TOPOLOGY_H
#include <linux/cpumask.h>
#endif /* _LINUX_TOPOLOGY_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/gfp' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_GFP_H
#define __LINUX_GFP_H
#include <linux/topology.h>
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/virtio_byteorder' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_VIRTIO_BYTEORDER_STUB_H
#define _LINUX_VIRTIO_BYTEORDER_STUB_H
#include <asm/byteorder.h>
#include "../../include/linux/byteorder/generic.h"
#include "../../include/linux/virtio_byteorder.h"
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/cpumask' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_CPUMASK_H
#define _LINUX_CPUMASK_H
#include <linux/kernel.h>
struct cpumask {
unsigned long bits[1];
};
#endif /* _LINUX_CPUMASK_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/device' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef LINUX_DEVICE_H
struct device {
void *parent;
};
struct device_driver {
const char *name;
};
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/kernel' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef KERNEL_H
#define KERNEL_H
#include <stdbool.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdarg.h>
#include <linux/compiler.h>
#include "../../../include/linux/container_of.h"
#include <linux/log2.h>
... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/scatterlist' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef SCATTERLIST_H
#define SCATTERLIST_H
#include <linux/kernel.h>
#include <linux/bug.h>
struct scatterlist {
unsigned long page_link;
unsigned int offset;
unsigned int length;
dma_addr_t dma_address;
};
/* Scatterlist helpers, stolen from linux/scatterlist.h */
#de... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/dma-mapping' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_DMA_MAPPING_H
#define _LINUX_DMA_MAPPING_H
#ifdef CONFIG_HAS_DMA
# error Virtio userspace code does not support CONFIG_HAS_DMA
#endif
enum dma_data_direction {
DMA_BIDIRECTIONAL = 0,
DMA_TO_DEVICE = 1,
DMA_FROM_DEVICE = 2,
DMA_NONE = 3,
};
#define dma_al... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/module' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/export.h>
struct module;
#define MODULE_LICENSE(__MODULE_LICENSE_value) \
static __attribute__((unused)) const char *__MODULE_LICENSE_name = \
__MODULE_LICENSE_value
#ifndef MODULE_AUTHOR
#define MODULE_AUTHOR(x)
#endif
#ifndef MODULE_DESCRIPTION
#defin... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/uaccess' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef UACCESS_H
#define UACCESS_H
#include <linux/compiler.h>
extern void *__user_addr_min, *__user_addr_max;
#define put_user(x, ptr) \
({ \
typeof(ptr) __pu_ptr = (ptr); \
__chk_user_ptr(__pu_ptr); \
WRITE_ONCE(*(__pu_ptr), x); \
0; \
})
... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/ucopysize' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_UCOPYSIZE_H__
#define __LINUX_UCOPYSIZE_H__
#include <linux/bug.h>
static inline void check_object_size(const void *ptr, unsigned long n,
bool to_user)
{ }
static inline void copy_overflow(int size, unsigned long count)
{
}
static __always_inline ... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/spinlock' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef SPINLOCK_H_STUB
#define SPINLOCK_H_STUB
#include <pthread.h>
typedef pthread_spinlock_t spinlock_t;
static inline void spin_lock_init(spinlock_t *lock)
{
int r = pthread_spin_init(lock, 0);
assert(!r);
}
static inline void spin_lock(spinlock_t *lock)
{
int ret = pthread_spin_lock(lock);
assert(!re... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/compiler' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_COMPILER_H
#define LINUX_COMPILER_H
/* Avoid redefinition warnings */
#undef __user
#include "../../../include/linux/compiler_types.h"
#undef __user
#define __user
#define WRITE_ONCE(var, val) \
(*((volatile typeof(val) *)(&(var))) = (val))
#define READ_ONCE... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/kmsan' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_KMSAN_H
#define _LINUX_KMSAN_H
#include <linux/gfp.h>
inline void kmsan_handle_dma(phys_addr_t phys, size_t size,
enum dma_data_direction dir)
{
}
#endif /* _LINUX_KMSAN_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/slab' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_SLAB_H
#define GFP_KERNEL 0
#define GFP_ATOMIC 0
#define __GFP_NOWARN 0
#define __GFP_ZERO 0
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/build_bug' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_BUILD_BUG_H
#define _LINUX_BUILD_BUG_H
#define BUILD_BUG_ON(x)
#endif /* _LINUX_BUILD_BUG_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/err' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ERR_H
#define ERR_H
#define MAX_ERRNO 4095
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
static inline void * __must_check ERR_PTR(long error)
{
return (void *) error;
}
static inline long __must_check PTR_ERR(const void *ptr)
{
return (long)... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/linux/bug' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_BUG_H
#define _LINUX_BUG_H
#include <asm/bug.h>
#define BUG_ON(__BUG_ON_cond) assert(!(__BUG_ON_cond))
#define BUG() abort()
#endif /* _LINUX_BUG_H */
``` | |
Linux işletim sistemi çekirdeği için 'tools/virtio/asm/barrier' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <stdlib.h>
#if defined(__i386__) || defined(__x86_64__)
#define barrier() asm volatile("" ::: "memory")
#define virt_mb() __sync_synchronize()
#define virt_rmb() barrier()
#define virt_wmb() barrier()
/* Atomic store should be enough, but gcc generates worse code in ... | |
Linux kernel'inin 'tools/virtio/ringtest/main' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Red Hat, Inc.
* Author: Michael S. Tsirkin <mst@redhat.com>
*
* Command line processing and common functions for ring benchmarking.
*/
#define _GNU_SOURCE
#include <getopt.h>
#include <pthread.h>
#include <assert.h>
#include <sched.h>
#include "... | |
Linux kernel'inin 'tools/virtio/ringtest/ptr_ring' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include "main.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <malloc.h>
#include <assert.h>
#include <errno.h>
#include <limits.h>
#define SMP_CACHE_BYTES 64
#define cache_line_size() SMP_CACHE_BYTES
#define ____... | |
Linux kernel'inin 'tools/virtio/ringtest/ring' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Red Hat, Inc.
* Author: Michael S. Tsirkin <mst@redhat.com>
*
* Simple descriptor-based ring. virtio 0.9 compatible event index is used for
* signalling, unconditionally.
*/
#define _GNU_SOURCE
#include "main.h"
#include <stdlib.h>
#include <st... | |
Linux işletim sistemi çekirdeği için 'tools/virtio/ringtest/main' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2016 Red Hat, Inc.
* Author: Michael S. Tsirkin <mst@redhat.com>
*
* Common macros and functions for ring benchmarking.
*/
#ifndef MAIN_H
#define MAIN_H
#include <assert.h>
#include <stdbool.h>
extern int param;
extern bool do_exit;
#if define... | |
Linux kernel'inin 'tools/virtio/ringtest/virtio_ring_0_9' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Red Hat, Inc.
* Author: Michael S. Tsirkin <mst@redhat.com>
*
* Partial implementation of virtio 0.9. event index is used for signalling,
* unconditionally. Design roughly follows linux kernel implementation in order
* to be able to judge its p... | |
Linux kernel'inin 'tools/virtio/ringtest/noring' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include "main.h"
#include <assert.h>
/* stub implementation: useful for measuring overhead */
void alloc_ring(void)
{
}
/* guest side */
int add_inbuf(unsigned len, void *buf, void *datap)
{
return 0;
}
/*
* skb_array API provides no way for producer to... | |
Linux kernel'inin 'tools/laptop/freefall/freefall' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/* Disk protection for HP/DELL machines.
*
* Copyright 2008 Eric Piel
* Copyright 2009 Pavel Machek <pavel@ucw.cz>
* Copyright 2012 Sonal Santan
* Copyright 2014 Pali Rohár <pali@kernel.org>
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcnt... | |
Linux kernel'inin 'tools/laptop/dslm/dslm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/*
* dslm.c
* Simple Disk Sleep Monitor
* by Bartek Kania
* Licensed under the GPL
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <linux/hdreg.h>
#ifdef DEBUG
#defin... | |
Linux kernel'inin 'tools/testing/scatterlist/main' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include <stdio.h>
#include <assert.h>
#include <linux/scatterlist.h>
#define MAX_PAGES (64)
struct test {
int alloc_ret;
unsigned num_pages;
unsigned *pfn;
unsigned *pfn_app;
unsigned size;
unsigned int max_seg;
unsigned int expected_segments;
};
static void set_pages(struct page **pages, const unsigne... | |
Linux işletim sistemi çekirdeği için 'tools/testing/scatterlist/linux/mm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef _LINUX_MM_H
#define _LINUX_MM_H
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
typedef unsigned long dma_addr_t;
#define unlikely
#define BUG_ON(x) assert(!(x))
#define WARN_ON(condition) ({ ... | |
Linux kernel'inin 'tools/testing/vma/main' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include "shared.h"
/*
* Directly import the VMA implementation here. Our vma_internal.h wrapper
* provides userland-equivalent functionality for everything vma.c uses.
*/
#include "../../../mm/vma_init.c"
#include "../../../mm/vma_exec.c"
#include "../../../mm/vma.... | |
Linux işletim sistemi çekirdeği için 'tools/testing/vma/shared' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "generated/bit-length.h"
#include "maple-shared.h"
#include "vma_internal.h"
#include "../../../mm/vma.h"
/* Simple test runner. Assumes local num_[fail, tests] counters. */
#define TE... | |
Linux kernel'inin 'tools/testing/vma/shared' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include "shared.h"
bool fail_prealloc;
unsigned long mmap_min_addr = CONFIG_DEFAULT_MMAP_MIN_ADDR;
unsigned long dac_mmap_min_addr = CONFIG_DEFAULT_MMAP_MIN_ADDR;
unsigned long stack_guard_gap = 256UL<<PAGE_SHIFT;
const struct vm_operations_struct vma_dummy_vm_ops;... | |
Linux işletim sistemi çekirdeği için 'tools/testing/vma/vma_internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* vma_internal.h
*
* Header providing userland wrappers and shims for the functionality provided
* by mm/vma_internal.h.
*
* We make the header guard the same as mm/vma_internal.h, so if this shim
* header is included, it precludes the inclusion of the kernel one.
... | |
Linux işletim sistemi çekirdeği için 'tools/testing/vma/include/custom' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ */
#pragma once
/*
* Contains declarations that exist in the kernel which have been CUSTOMISED for
* testing purposes to faciliate userland VMA testing.
*/
#ifdef CONFIG_MMU
extern unsigned long mmap_min_addr;
extern unsigned long dac_mmap_min_addr;
#else
#define mmap_min... | |
Linux işletim sistemi çekirdeği için 'tools/testing/vma/include/dup' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ */
#pragma once
/* Forward declarations to avoid header cycle. */
struct vm_area_struct;
static inline void vma_start_write(struct vm_area_struct *vma);
extern const struct vm_operations_struct vma_dummy_vm_ops;
extern unsigned long stack_guard_gap;
extern const struct vm_op... | |
Linux işletim sistemi çekirdeği için 'tools/testing/vma/include/stubs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ */
#pragma once
/*
* Contains declarations that are STUBBED, that is that are rendered no-ops, in
* order to faciliate userland VMA testing.
*/
/* Forward declarations. */
struct mm_struct;
struct vm_area_struct;
struct vm_area_desc;
struct pagetable_move_control;
struct ... | |
Linux kernel'inin 'tools/testing/vma/tests/merge' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/* Helper function which provides a wrapper around a merge new VMA operation. */
static struct vm_area_struct *merge_new(struct vma_merge_struct *vmg)
{
struct vm_area_struct *vma;
/*
* For convenience, get prev and next VMAs. Which the new VMA operation
* requir... | |
Linux kernel'inin 'tools/testing/vma/tests/vma' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
static bool compare_legacy_flags(vm_flags_t legacy_flags, vma_flags_t flags)
{
const unsigned long legacy_val = legacy_flags;
/* The lower word should contain the precise same value. */
const unsigned long flags_lower = flags.__vma_flags[0];
vma_flags_t converted_f... | |
Linux kernel'inin 'tools/testing/vma/tests/mmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
static bool test_mmap_region_basic(void)
{
const vma_flags_t vma_flags = mk_vma_flags(VMA_READ_BIT, VMA_WRITE_BIT,
VMA_MAYREAD_BIT, VMA_MAYWRITE_BIT);
struct mm_struct mm = {};
unsigned long addr;
struct vm_area_struct *vma;
VMA_ITERATOR(vmi, &mm, 0);
current... | |
Linux işletim sistemi çekirdeği için 'tools/testing/vma/linux/mmzone' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _LINUX_MMZONE_H
#define _LINUX_MMZONE_H
#include <linux/atomic.h>
struct pglist_data *first_online_pgdat(void);
struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
#define for_each_online_pgdat(pgdat) \
for (pgdat = first_online_pgdat(); ... | |
Linux kernel'inin 'tools/testing/rbtree/interval_tree_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* interval_tree.c: Userspace Interval Tree test-suite
* Copyright (c) 2025 Wei Yang <richard.weiyang@gmail.com>
*/
#include <linux/math64.h>
#include <linux/kern_levels.h>
#include "shared.h"
#include "maple-shared.h"
#include "../../../lib/interval_tree_test.c"
int usag... | |
Linux kernel'inin 'tools/testing/rbtree/rbtree_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* rbtree_test.c: Userspace Red Black Tree test-suite
* Copyright (c) 2025 Wei Yang <richard.weiyang@gmail.com>
*/
#include <linux/init.h>
#include <linux/math64.h>
#include <linux/kern_levels.h>
#include "shared.h"
#include "../../../lib/rbtree_test.c"
int usage(void)
{
... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/kselftest' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* kselftest.h: low-level kselftest framework to include from
* selftest programs. When possible, please use
* kselftest_harness.h instead.
*
* Copyright (c) 2014 Shuah Khan <shuahkh@osg.samsung.com>
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
*
* Using thi... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/kselftest_harness' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
*
* kselftest_harness.h: simple C unit test helper.
*
* See documentation in Documentation/dev-tools/kselftest.rst
*
* API inspired by code.google.com/p/googletest
*/
/**
* DOC: example
*
*... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/kselftest_module' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ */
#ifndef __KSELFTEST_MODULE_H
#define __KSELFTEST_MODULE_H
#include <linux/module.h>
#include <linux/panic.h>
/*
* Test framework for writing test modules to be loaded by kselftest.
* See Documentation/dev-tools/kselftest.rst for an example test module.
*/
#define KSTM_... | |
Linux kernel'inin 'tools/testing/selftests/mount_setattr/mount_setattr_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <errno.h>
#include <pthread.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <sys/vfs.h>
#include <sys/statvfs.h>
#include <sys/sysinfo.h>
... | |
Linux kernel'inin 'tools/testing/selftests/nci/nci_dev' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2021 Samsung Electronics
* Bongsu Jeon <bongsu.jeon@samsung.com>
*
* Test code for nci
*/
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <pthread.h>
#include <linux/genetlink.h>
#include... | |
Linux kernel'inin 'tools/testing/selftests/tty/tty_tstamp_update' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/limits.h>
#include "kselftest.h"
#define MIN_TTY_PATH_LEN 8
static bool tty_valid(char *tty)
{
if (strlen(tty) < MIN_... | |
Linux kernel'inin 'tools/testing/selftests/tty/tty_tiocsti_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* TTY Tests - TIOCSTI
*
* Copyright © 2025 Abhinav Saxena <xandfury@gmail.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <sys/socket.h>
#inc... | |
Linux kernel'inin 'tools/testing/selftests/sgx/test_encl' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2016-20 Intel Corporation. */
#include <stddef.h>
#include "defines.h"
/*
* Data buffer spanning two pages that will be placed first in the .data
* segment via the linker script. Even if not used internally the second page
* is needed by external test manip... | |
Linux kernel'inde 'tools/testing/selftests/sgx/call' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/**
* Copyright(c) 2016-20 Intel Corporation.
*/
.text
.global sgx_enter_enclave
sgx_enter_enclave:
.cfi_startproc
push %r15
.cfi_adjust_cfa_offset 8
.cfi_rel_offset %r15, 0
push %r14
.cfi_adjust_cfa_offset 8
.cfi_rel_offset %r14, 0
push %r13
.cfi_adjust... | |
Linux kernel'inin 'tools/testing/selftests/sgx/main' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2016-20 Intel Corporation. */
#include <cpuid.h>
#include <elf.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/... | |
Linux kernel'inde 'tools/testing/selftests/sgx/sign_key' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/**
* Copyright(c) 2016-20 Intel Corporation.
*/
.section ".rodata", "a"
sign_key:
.globl sign_key
.incbin "sign_key.pem"
sign_key_end:
.globl sign_key_end
``` | |
Linux kernel'inin 'tools/testing/selftests/sgx/sigstruct' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2016-20 Intel Corporation. */
#define _GNU_SOURCE
#include <assert.h>
#include <getopt.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/sgx/load' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2016-20 Intel Corporation. */
#include <assert.h>
#include <elf.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/sgx/main' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright(c) 2016-20 Intel Corporation.
*/
#ifndef MAIN_H
#define MAIN_H
#define ENCL_HEAP_SIZE_DEFAULT 4096
struct encl_segment {
void *src;
off_t offset;
size_t size;
unsigned int prot;
unsigned int flags;
bool measure;
};
struct encl {
int fd;
void *bin;... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/sgx/defines' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright(c) 2016-20 Intel Corporation.
*/
#ifndef DEFINES_H
#define DEFINES_H
#include <stdint.h>
#define PAGE_SIZE 4096
#define PAGE_MASK (~(PAGE_SIZE - 1))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __packed __attribute__((packed))
#define __us... | |
Linux kernel'inde 'tools/testing/selftests/sgx/test_encl_bootstrap' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright(c) 2016-20 Intel Corporation.
*/
.macro ENCLU
.byte 0x0f, 0x01, 0xd7
.endm
.section ".tcs", "aw"
.balign 4096
.fill 1, 8, 0 # STATE (set by CPU)
.fill 1, 8, 0 # FLAGS
.quad encl_ssa_tcs1 # OSSA
.fill 1, 4, 0 # CSSA (set by CPU)
.fil... | |
Linux kernel'inin 'tools/testing/selftests/ftrace/poll' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Simple poll on a file.
*
* Copyright (c) 2024 Google LLC.
*/
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define BUFSIZE 4096
/*
* Usage:
* poll [-I|-P] [-t timeout] FILE
*... | |
Linux kernel'inin 'tools/testing/selftests/tc-testing/action' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0
* Copyright (c) 2018 Davide Caratti, Red Hat inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*/
#include <linux/bpf.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/safesetid/safesetid-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <pwd.h>
#include <grp.h>
#include <string.h>
#include <syscall.h>
#include <sys/capability.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <stdlib.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/access_tracking_perf_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* access_tracking_perf_test
*
* Copyright (C) 2021, Google, Inc.
*
* This test measures the performance effects of KVM's access tracking.
* Access tracking is driven by the MMU notifiers test_young, clear_young, and
* clear_flush_young. These notifiers do not have a di... | |
Linux kernel'inin 'tools/testing/selftests/kvm/kvm_page_table_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KVM page table test
*
* Copyright (C) 2021, Huawei, Inc.
*
* Make sure that THP has been enabled or enough HUGETLB pages with specific
* page size have been pre-allocated on your system, if you are planning to
* use hugepages to back the guest memory for testing.
*/... | |
Linux kernel'inin 'tools/testing/selftests/kvm/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 <pthread.h>
#include <semaphore.h>
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
#inc... | |
Linux kernel'inin 'tools/testing/selftests/kvm/irqfd_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <stdint.h>
#include <sys/sysinfo.h>
#include "kvm_util.h"
static struct kvm_vm *vm1;
static struct kvm_vm *vm2;
static int __eventfd;
static boo... | |
Linux kernel'inin 'tools/testing/selftests/kvm/pre_fault_memory_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2024, Intel, Inc
*
* Author:
* Isaku Yamahata <isaku.yamahata at gmail.com>
*/
#include <linux/sizes.h>
#include <test_util.h>
#include <kvm_util.h>
#include <processor.h>
#include <pthread.h>
/* Arbitrarily chosen values */
#define TEST_SIZE (SZ_2M + ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/memslot_perf_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* A memslot-related performance benchmark.
*
* Copyright (C) 2021 Oracle and/or its affiliates.
*
* Basic guest setup / host vCPU thread code lifted from set_memory_region_test.
*/
#include <pthread.h>
#include <sched.h>
#include <semaphore.h>
#include <stdatomic.h>
#in... | |
Linux kernel'inin 'tools/testing/selftests/kvm/rseq_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Include rseq.c without _GNU_SOURCE defined, before including any headers, so
* that rseq.c is compiled with its configuration, not KVM selftests' config.
*/
#undef _GNU_SOURCE
#include "../rseq/rseq.c"
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#inc... | |
Linux kernel'inin 'tools/testing/selftests/kvm/hardware_disable_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* This test is intended to reproduce a crash that happens when
* kvm_arch_hardware_disable is called and it attempts to unregister the user
* return notifiers.
*/
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdint.h>
#include <stdlib.h>
#... | |
Linux kernel'inin 'tools/testing/selftests/kvm/mmu_stress_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <semaphore.h>
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
#include <linux/atomic.h>
#include <linux/sizes.h>
#include "kvm_util.h"
#include... | |
Linux kernel'inin 'tools/testing/selftests/kvm/dirty_log_perf_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KVM dirty page logging performance test
*
* Based on dirty_log_test.c
*
* Copyright (C) 2018, Red Hat, Inc.
* Copyright (C) 2020, Google, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <pthread.h>
#include <linux/bitmap.h>
#include "kvm_u... | |
Linux kernel'inin 'tools/testing/selftests/kvm/kvm_binary_stats_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* kvm_binary_stats_test
*
* Copyright (C) 2021, Google LLC.
*
* Test the fd-based interface for KVM statistics.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "test_util.h"
#include "kvm_util.h"
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/kvm/set_memory_region_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <fcntl.h>
#include <pthread.h>
#include <sched.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/compiler.h>
#include <test_util.h>
#include <kvm_util.h... | |
Linux kernel'inin 'tools/testing/selftests/kvm/guest_print_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* A test for GUEST_PRINTF
*
* Copyright 2022, Google, Inc. and/or its affiliates.
*/
#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 "ucall_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.