Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102716182
D18998.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18998.diff
View Options
Index: head/usr.sbin/bhyve/bhyverun.h
===================================================================
--- head/usr.sbin/bhyve/bhyverun.h
+++ head/usr.sbin/bhyve/bhyverun.h
@@ -36,6 +36,7 @@
struct vmctx;
extern int guest_ncpus;
+extern uint16_t cores, sockets, threads;
extern char *guest_uuid_str;
extern char *vmname;
Index: head/usr.sbin/bhyve/smbiostbl.c
===================================================================
--- head/usr.sbin/bhyve/smbiostbl.c
+++ head/usr.sbin/bhyve/smbiostbl.c
@@ -636,7 +636,7 @@
{
int i;
- for (i = 0; i < guest_ncpus; i++) {
+ for (i = 0; i < sockets; i++) {
struct smbios_table_type4 *type4;
char *p;
int nstrings, len;
@@ -655,6 +655,16 @@
*(*endaddr) = '\0';
(*endaddr)++;
type4->socket = nstrings + 1;
+ /* Revise cores and threads after update to smbios 3.0 */
+ if (cores > 254)
+ type4->cores = 0;
+ else
+ type4->cores = cores;
+ /* This threads is total threads in a socket */
+ if ((cores * threads) > 254)
+ type4->threads = 0;
+ else
+ type4->threads = (cores * threads);
curaddr = *endaddr;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 6:52 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14672059
Default Alt Text
D18998.diff (1 KB)
Attached To
Mode
D18998: Make bhyve SMBIOS table topology aware
Attached
Detach File
Event Timeline
Log In to Comment