X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=af932dfdff93eeb0b74c2e4d0ebf5c245eafe172;hb=09ff0bf8fd1eba63b83e1232828f9e99b89eeecc;hp=549ccb15f5f8fcc17136eea16a643439c0ae5457;hpb=da0f0deecf22754656bad2a95640461ec3ac4f1d;p=palacios-OLD.git diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 549ccb1..af932df 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -23,6 +23,8 @@ #include #include +#include +#include #ifdef __V3VEE__ @@ -195,7 +197,26 @@ } while(0) \ - +#define V3_REGISTER_PKT_DELIVERY(x) \ + ({\ + int ret = 0;\ + extern struct v3_os_hooks * os_hooks; \ + if ((os_hooks) && (os_hooks)->register_pkt_delivery) { \ + ret = (os_hooks)->register_pkt_delivery(x); \ + }\ + ret; \ + } ) + +#define V3_SEND_PKT(x, y) \ + ({\ + int ret=0; \ + extern struct v3_os_hooks * os_hooks; \ + if ((os_hooks) && (os_hooks)->ne2k_send_packet) { \ + ret = (os_hooks)->ne2k_send_packet(x, y); \ + }\ + ret; \ + }) + #define VMM_INVALID_CPU 0 #define VMM_VMX_CPU 1 @@ -244,6 +265,10 @@ struct v3_os_hooks { void (*yield_cpu)(void); + //function by network card driver + int (*register_pkt_delivery)(int (*rcvd_fn)(uchar_t *packet, uint_t size)); + int (*ne2k_send_packet)(uchar_t *packet, uint_t size); + }; @@ -258,6 +283,9 @@ struct v3_vm_config { // so we can specify maximum physical address size // (We're screwed if we want to do 32 bit host/64 bit guest) + + int enable_profiling; + int use_ramdisk; void * ramdisk; int ramdisk_size;