qdev-properties: Add a new macro with bitmask check for uint64_t property
authorYang Weijiang <weijiang.yang@intel.com>
Tue, 15 Feb 2022 19:52:51 +0000 (14:52 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 14 May 2022 10:32:41 +0000 (12:32 +0200)
commit18c22d7112a76fabeee5022a3bdd9e8c3a37c8d2
treebab79d5b463a6a8664d4d08629318306d9a34110
parent6df39f5e583ca0f67bd934d1327f9ead2e3bd49c
qdev-properties: Add a new macro with bitmask check for uint64_t property

The DEFINE_PROP_UINT64_CHECKMASK maro applies certain mask check agaist
user-supplied property value, reject the value if it violates the bitmask.

Co-developed-by: Like Xu <like.xu@linux.intel.com>
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
Message-Id: <20220215195258.29149-2-weijiang.yang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/qdev-properties.c
include/hw/qdev-properties.h