tools/testing/selftests/kvm/include/s390/facility.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/include/s390/facility.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/kvm/include/s390/facility.h- Extension
.h- Size
- 1046 bytes
- Lines
- 51
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
linux/bitops.h
Detected Declarations
function test_bit_invfunction stflefunction setup_facilitiesfunction test_facility
Annotated Snippet
#ifndef SELFTEST_KVM_FACILITY_H
#define SELFTEST_KVM_FACILITY_H
#include <linux/bitops.h>
/* alt_stfle_fac_list[16] + stfle_fac_list[16] */
#define NB_STFL_DOUBLEWORDS 32
extern u64 stfl_doublewords[NB_STFL_DOUBLEWORDS];
extern bool stfle_flag;
static inline bool test_bit_inv(unsigned long nr, const unsigned long *ptr)
{
return test_bit(nr ^ (BITS_PER_LONG - 1), ptr);
}
static inline void stfle(u64 *fac, unsigned int nb_doublewords)
{
register unsigned long r0 asm("0") = nb_doublewords - 1;
asm volatile(" .insn s,0xb2b00000,0(%1)\n"
: "+d" (r0)
: "a" (fac)
: "memory", "cc");
}
static inline void setup_facilities(void)
{
stfle(stfl_doublewords, NB_STFL_DOUBLEWORDS);
stfle_flag = true;
}
static inline bool test_facility(int nr)
{
if (!stfle_flag)
setup_facilities();
return test_bit_inv(nr, stfl_doublewords);
}
#endif
Annotation
- Immediate include surface: `linux/bitops.h`.
- Detected declarations: `function test_bit_inv`, `function stfle`, `function setup_facilities`, `function test_facility`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.