Add uv_query_test_feature(), to test specific bits in the uv_feature_indications bitmask, similar to uv_query_test_call(). Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> --- lib/s390x/uv.h | 1 + lib/s390x/uv.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/s390x/uv.h b/lib/s390x/uv.h index 00a37041..b0fbc478 100644 --- a/lib/s390x/uv.h +++ b/lib/s390x/uv.h @@ -10,6 +10,7 @@ bool uv_os_is_guest(void); bool uv_os_is_host(void); bool uv_host_requirement_checks(void); bool uv_query_test_call(unsigned int nr); +bool uv_query_test_feature(unsigned int nr); const struct uv_cb_qui *uv_get_query_data(void); void uv_init(void); int uv_setup(void); diff --git a/lib/s390x/uv.c b/lib/s390x/uv.c index 723bb4f2..03499272 100644 --- a/lib/s390x/uv.c +++ b/lib/s390x/uv.c @@ -67,6 +67,15 @@ bool uv_query_test_call(unsigned int nr) return test_bit_inv(nr, uvcb_qui.inst_calls_list); } +bool uv_query_test_feature(unsigned int nr) +{ + /* Query needs to be called first */ + assert(uvcb_qui.header.rc); + assert(nr < BITS_PER_LONG); + + return test_bit_inv(nr, &uvcb_qui.uv_feature_indications); +} + const struct uv_cb_qui *uv_get_query_data(void) { /* Query needs to be called first */ -- 2.47.1