Re: Standalone binary loader for BHyVe

2013-08-05 Thread Peter Grehan

Hi Takuya,


I implemented standalone binary loader for BHyVe.
This allows to load custom program on guest memory area, and run it from
specified entry point address.
I wrote this for test code of BHyVe suspend/resume project(Yoneji Iori's
work), but it might be useful for some other purposes.


 Nice work. This could be useful to build a test suite on top of e.g. 
to exercise the instruction emulation.


later,

Peter.

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Standalone binary loader for BHyVe

2013-08-04 Thread Takuya ASADA
Hi,

I implemented standalone binary loader for BHyVe.
This allows to load custom program on guest memory area, and run it from
specified entry point address.
I wrote this for test code of BHyVe suspend/resume project(Yoneji Iori's
work), but it might be useful for some other purposes.

This is a patch:
http://people.freebsd.org/~syuu/bhyve_standalone_guest.diff

Most of the code is borrowed from userboot, but userboot looks like only
for FreeBSD kernel, so I copied those code to bhyveload instead of
modifying userboot APIs.

Here's a example of usage:
 echo main:  test.S
 echo inb \$0x50, %al  test.S
 as -o test.o test.S
 objcopy -I elf64-x86-64-freebsd -O binary test.o test.bin
 sudo bhyveload -m 256 -S test.bin:0x7c00 test
 sudo bhyve -m 256 -e test
 # bhyve says Unhandled inb 0x0050, because there's no inb 0x50 handler.

Another example of usage:
 svn co svn://svn.freebsd.org/base/user/syuu/bhyve_standalone_guest_test1
 cd bhyve_standalone_guest_test1
 make
 make run
 # because test1 is COM1 test program, bhyve continues to show asterisk on
the console.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org