Message ID | 1253093169-1423-21-git-send-email-avi@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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
Signed-off-by: Avi Kivity <avi@redhat.com> --- kvm/user/test/lib/x86/fwcfg.c | 5 +++++ kvm/user/test/lib/x86/fwcfg.h | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-)