Signed-off-by: Avi Kivity <[email protected]>
---
kvm/user/test/lib/x86/fwcfg.c | 5 +++++
kvm/user/test/lib/x86/fwcfg.h | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kvm/user/test/lib/x86/fwcfg.c b/kvm/user/test/lib/x86/fwcfg.c
index a9a2ce2..2cf7cec 100644
--- a/kvm/user/test/lib/x86/fwcfg.c
+++ b/kvm/user/test/lib/x86/fwcfg.c
@@ -33,3 +33,8 @@ uint64_t fwcfg_get_u64(unsigned index)
{
return fwcfg_get_u(index, 8);
}
+
+unsigned fwcfg_get_nb_cpus(void)
+{
+ return fwcfg_get_u16(FW_CFG_NB_CPUS);
+}
diff --git a/kvm/user/test/lib/x86/fwcfg.h b/kvm/user/test/lib/x86/fwcfg.h
index c7245e2..e0836ca 100644
--- a/kvm/user/test/lib/x86/fwcfg.h
+++ b/kvm/user/test/lib/x86/fwcfg.h
@@ -38,5 +38,7 @@ uint16_t fwcfg_get_u16(unsigned index);
uint32_t fwcfg_get_u32(unsigned index);
uint64_t fwcfg_get_u64(unsigned index);
+unsigned fwcfg_get_nb_cpus(void);
+
#endif
--
1.6.4.1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html