diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/Makefile --- a/tools/Makefile +++ b/tools/Makefile @@ -25,6 +25,8 @@ SUBDIRS-$(CONFIG_Linux) += memshr SUBDIRS-$(CONFIG_Linux) += blktap SUBDIRS-$(CONFIG_Linux) += blktap2 SUBDIRS-$(CONFIG_NetBSD) += libaio +SUBDIRS-$(CONFIG_NetBSD) += memshr +SUBDIRS-$(CONFIG_NetBSD) += blktap SUBDIRS-$(CONFIG_NetBSD) += blktap2 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd SUBDIRS-y += libfsimage diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/blktap/drivers/Makefile --- a/tools/blktap/drivers/Makefile +++ b/tools/blktap/drivers/Makefile @@ -41,9 +41,11 @@ BLK-OBJS-y += block-qcow2.o BLK-OBJS-y += aes.o BLK-OBJS-y += tapaio.o BLK-OBJS-$(CONFIG_Linux) += blk_linux.o +BLK-OBJS-$(CONFIG_NetBSD) += blk_netbsd.o BLKTAB-OBJS-y := blktapctrl.o BLKTAB-OBJS-$(CONFIG_Linux) += blktapctrl_linux.o +BLKTAB-OBJS-$(CONFIG_NetBSD) += blktapctrl_netbsd.o all: $(IBIN) qcow-util diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/blktap/drivers/blk_netbsd.c --- /dev/null +++ b/tools/blktap/drivers/blk_netbsd.c @@ -0,0 +1,39 @@ +#include +#include +#include +#include "tapdisk.h" +#include "blk.h" + +int blk_getimagesize(int fd, uint64_t *size) +{ + int rc; + struct disklabel dl; + + *size = 0; + rc = ioctl(fd, DIOCGDINFO, &dl); + if (rc) { + DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image"); + return -EINVAL; + } + + *size = dl.d_secsize * dl.d_secpercyl; + + return 0; +} + +int blk_getsectorsize(int fd, uint64_t *sector_size) +{ + int rc; + struct disklabel dl; + + *sector_size = DEV_BSIZE; + rc = ioctl(fd, DIOCGDINFO, &dl); + if (rc) { + DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image"); + return 0; /* fallback to DEV_BSIZE */ + } + + *sector_size = dl.d_secsize; + return 0; +} + diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/blktap/drivers/blktapctrl_netbsd.c --- /dev/null +++ b/tools/blktap/drivers/blktapctrl_netbsd.c @@ -0,0 +1,16 @@ + +#include "blktaplib.h" +#include "blktapctrl.h" + + +int blktap_interface_open(void) +{ + /* not yet implemented */ + return -1; +} + +int blktap_interface_create(int ctlfd, int *major, int *minor, blkif_t *blkif) +{ + /* not yet implemented */ + return -1; +} diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/examples/xend-config.sxp --- a/tools/examples/xend-config.sxp +++ b/tools/examples/xend-config.sxp @@ -190,7 +190,7 @@ # Whether to enable auto-ballooning of dom0 to allow domUs to be created. # If enable-dom0-ballooning = no, dom0 will never balloon out. -(enable-dom0-ballooning yes) +(enable-dom0-ballooning no) # 32-bit paravirtual domains can only consume physical # memory below 168GB. On systems with memory beyond that address, diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/libxc/xc_netbsd.c --- a/tools/libxc/xc_netbsd.c +++ b/tools/libxc/xc_netbsd.c @@ -263,6 +263,18 @@ void discard_file_cache(int fd, int flus } } +int xc_gnttab_open(void) +{ + /* implement me */ + return -1; +} + +int xc_gnttab_close(int xcg_handle) +{ + /* implement me */ + return -1; +} + grant_entry_v1_t *xc_gnttab_map_table_v1( int xc_handle, int domid, int *gnt_num) { @@ -275,6 +287,41 @@ grant_entry_v2_t *xc_gnttab_map_table_v2 return NULL; } +void *xc_gnttab_map_grant_ref(int xcg_handle, uint32_t domid, + uint32_t ref, int prot) +{ + /* implement me */ + return NULL; +} + +void *xc_gnttab_map_grant_refs(int xcg_handle, uint32_t count, + uint32_t *domids, uint32_t *refs, int prot) +{ + /* implement me */ + return NULL; +} + +void *xc_gnttab_map_domain_grant_refs(int xcg_handle, + uint32_t count, uint32_t domid, + uint32_t *refs, int prot) +{ + /* implement me */ + return NULL; +} + +int xc_gnttab_munmap(int xcg_handle, void *start_address, uint32_t count) +{ + /* implement me */ + errno = EINVAL; + return -1; +} + +int xc_gnttab_set_max_grants(int xcg_handle, uint32_t count) +{ + /* implement me */ + return -1; +} + /* * Local variables: * mode: C diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/python/xen/xend/XendNode.py --- a/tools/python/xen/xend/XendNode.py +++ b/tools/python/xen/xend/XendNode.py @@ -276,28 +276,29 @@ class XendNode: except KeyError: pass - for pci_dev in PciUtil.get_all_pci_devices(): - ppci_record = { - 'domain': pci_dev.domain, - 'bus': pci_dev.bus, - 'slot': pci_dev.slot, - 'func': pci_dev.func, - 'vendor_id': pci_dev.vendor, - 'vendor_name': pci_dev.vendorname, - 'device_id': pci_dev.device, - 'device_name': pci_dev.devicename, - 'revision_id': pci_dev.revision, - 'class_code': pci_dev.classcode, - 'class_name': pci_dev.classname, - 'subsystem_vendor_id': pci_dev.subvendor, - 'subsystem_vendor_name': pci_dev.subvendorname, - 'subsystem_id': pci_dev.subdevice, - 'subsystem_name': pci_dev.subdevicename, - 'driver': pci_dev.driver - } - # If saved uuid exists, use it. Otherwise create one. - ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString()) - XendPPCI(ppci_uuid, ppci_record) + pass + #for pci_dev in PciUtil.get_all_pci_devices(): + # ppci_record = { + # 'domain': pci_dev.domain, + # 'bus': pci_dev.bus, + # 'slot': pci_dev.slot, + # 'func': pci_dev.func, + # 'vendor_id': pci_dev.vendor, + # 'vendor_name': pci_dev.vendorname, + # 'device_id': pci_dev.device, + # 'device_name': pci_dev.devicename, + # 'revision_id': pci_dev.revision, + # 'class_code': pci_dev.classcode, + # 'class_name': pci_dev.classname, + # 'subsystem_vendor_id': pci_dev.subvendor, + # 'subsystem_vendor_name': pci_dev.subvendorname, + # 'subsystem_id': pci_dev.subdevice, + # 'subsystem_name': pci_dev.subdevicename, + # 'driver': pci_dev.driver + # } + # # If saved uuid exists, use it. Otherwise create one. + # ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString()) + # XendPPCI(ppci_uuid, ppci_record) def _init_PSCSIs(self): # Initialise PSCSIs and PSCSI_HBAs diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/xentrace/Makefile --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -43,6 +43,7 @@ install: build [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR) $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR) $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR) + $(INSTALL_DATA) formats $(DESTDIR)$(XEN_CONFIG_DIR) .PHONY: clean clean: diff -r d58bb8a8d0bd -r 3a0b122a3aeb tools/misc/xend --- a/tools/misc/xend +++ b/tools/misc/xend @@ -105,7 +105,8 @@ def start_consoled(): start_daemon("xenconsoled", args) def start_blktapctrl(): - start_daemon("blktapctrl", "") + if os.uname()[0] == 'Linux': + start_daemon("blktapctrl", "") def start_xenbackendd(): XENBACKENDD_DEBUG = os.getenv("XENBACKENDD_DEBUG")