From: Jason Xing
When I compiled the tools/testing/selftests/bpf, the following error
pops out:
uprobe_multi.c: In function ‘trigger_uprobe’:
uprobe_multi.c:109:26: error: ‘MADV_PAGEOUT’ undeclared (first use in this
function); did you mean ‘MADV_RANDOM’?
madvise(addr, page_sz, MADV_PAGEOUT);
This series was prompted by feedback given in [1].
Patch 1 : Adds safe_hlt() and cli() helpers.
Patch 2, 3: Adds an interface to read vcpu stat in selftest. Adds
a macro to generate compiler error to detect typos at
compile time while parsing vcpu and vm stats.
Patch 4
Add safe_halt() and cli() helpers to processor.h to make them broadly
available in KVM selftests.
Suggested-by: Sean Christopherson
Signed-off-by: Manali Shukla
---
.../selftests/kvm/include/x86_64/processor.h| 17 +
1 file changed, 17 insertions(+)
diff --git a/tools/testi
Previous patch converts vm_get_stat() to macro and adds a concatenation
trickery to generate compilation error if the stat doesn't exist.
Improve nx_huge_pages_test.c and dirty_log_page_splitting_test.c based
on the macro.
Compile tested both the selftests.
Signed-off-by: Manali Shukla
---
...
Convert vm_get_stat() to macro to detect typos at compile time.
Add a concatenation trickery to trigger compiler error if vm stat
doesn't exist, so that it is not possible to pass a vcpu stat into
vm_get_stat().
Suggested-by: Sean Christopherson
Signed-off-by: Manali Shukla
---
.../testing/sel
From: Manali Shukla
The interface is used to read the data values of a specified vcpu stat
from the currenly available binary stats interface.
Add a concatenation trickery to trigger compiler error if the stat
doesn't exist, so that it is not possible to pass a per-VM stat into
vcpu_get_stat().