Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171743340
D39550.id121065.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
D39550.id121065.diff
View Options
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -29,6 +29,7 @@
crc16.c \
ctl_util.c \
ctl_scsi_all.c \
+ e820.c \
fwctl.c \
gdb.c \
hda_codec.c \
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -91,6 +91,7 @@
#include "config.h"
#include "inout.h"
#include "debug.h"
+#include "e820.h"
#include "fwctl.h"
#include "gdb.h"
#include "ioapic.h"
@@ -1242,6 +1243,7 @@
int max_vcpus, memflags;
struct vcpu *bsp;
struct vmctx *ctx;
+ struct qemu_fwcfg_item *e820_fwcfg_item;
uint64_t rip;
size_t memsize;
const char *optstr, *value, *vmname;
@@ -1486,6 +1488,11 @@
exit(4);
}
+ if (e820_init(ctx) != 0) {
+ fprintf(stderr, "Unable to setup E820");
+ exit(4);
+ }
+
/*
* Exit if a device emulation finds an error in its initilization
*/
@@ -1576,6 +1583,18 @@
assert(error == 0);
}
+ e820_fwcfg_item = e820_get_fwcfg_item();
+ if (e820_fwcfg_item == NULL) {
+ fprintf(stderr, "invalid e820 table");
+ exit(4);
+ }
+ if (qemu_fwcfg_add_file("etc/e820", e820_fwcfg_item->size,
+ e820_fwcfg_item->data) != 0) {
+ fprintf(stderr, "could not add qemu fwcfg etc/e820");
+ exit(4);
+ }
+ free(e820_fwcfg_item);
+
if (lpc_bootrom() && strcmp(lpc_fwcfg(), "bhyve") == 0) {
fwctl_init();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 5:16 AM (11 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38888152
Default Alt Text
D39550.id121065.diff (1 KB)
Attached To
Mode
D39550: bhyve: pass E820 table to guest
Attached
Detach File
Event Timeline
Log In to Comment