From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: Xen 4.2 Release Plan / TODO Date: Wed, 11 Apr 2012 17:11:16 +0100 Message-ID: <20357.44324.27939.514126@mariner.uk.xensource.com> References: <1333362402.25602.36.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1333362402.25602.36.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Xen 4.2 Release Plan / TODO"): > Plan for a 4.2 release: > http://lists.xen.org/archives/html/xen-devel/2012-03/msg00793.html ... > tools, blockers: > * libxl stable API -- we would like 4.2 to define a stable API > which downstream's can start to rely on not changing. Aspects of > this are: I took a look at libxl.h and came up with the comments below. Firstly general things I tripped over, and then the list of things which need converting to the new event system. Ian. Other: ====== ] int libxl_wait_for_free_memory(libxl_ctx *ctx, uint32_t domid, uint32_t memory_kb, int wait_secs); ] /* wait for the memory target of a domain to be reached */ ] int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs); This whole memory interface is a bit of a dog's breakfast. ] int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass); ] int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type); ] /* libxl_primary_console_exec finds the domid and console number ] * corresponding to the primary console of the given vm, then calls ] * libxl_console_exec with the right arguments (domid might be different ] * if the guest is using stubdoms). ] * This function can be called after creating the device model, in ] * case of HVM guests, and before libxl_run_bootloader in case of PV ] * guests using pygrub. */ ] int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm); These functions should not exec things for you; they should tell you the parameters. Any execing helpers should be in libxlu. ] /* common paths */ ] const char *libxl_sbindir_path(void); ] const char *libxl_bindir_path(void); ] const char *libxl_libexec_path(void); ] const char *libxl_libdir_path(void); ] const char *libxl_sharedir_path(void); ] const char *libxl_private_bindir_path(void); ] const char *libxl_xenfirmwaredir_path(void); ] const char *libxl_xen_config_dir_path(void); ] const char *libxl_xen_script_dir_path(void); ] const char *libxl_lock_dir_path(void); ] const char *libxl_run_dir_path(void); ] const char *libxl_xenpaging_dir_path(void); Surely these should be private ? Need to be ao/eventified: ========================= ] typedef struct { ] #define XL_SUSPEND_DEBUG 1 ] #define XL_SUSPEND_LIVE 2 ] int flags; ] int (*suspend_callback)(void *, int); ] } libxl_domain_suspend_info; ... ] int libxl_domain_suspend(libxl_ctx *ctx, libxl_domain_suspend_info *info, ] uint32_t domid, int fd); ] typedef int (*libxl_console_ready)(libxl_ctx *ctx, uint32_t domid, void *priv); ] int libxl_domain_create_new(libxl_ctx *ctx, libxl_domain_config *d_config, libxl_console_ready cb, void *priv, uint32_t *domid); ] int libxl_domain_create_restore(libxl_ctx *ctx, libxl_domain_config *d_config, libxl_console_ready cb, void *priv, uint32_t *domid, int restore_fd); ] int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid); ] int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid); Are these now merely initiations ? ] int libxl_domain_core_dump(libxl_ctx *ctx, uint32_t domid, const char *filename); Might become long-running in the future. ] int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk); ] /* ] * Insert a CD-ROM device. A device corresponding to disk must already ] * be attached to the guest. ] */ ] int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk); ] /* ] * Make a disk available in this (the control) domain. Returns path to ] * a device. ] */ ] char * libxl_device_disk_local_attach(libxl_ctx *ctx, libxl_device_disk *disk); ] int libxl_device_disk_local_detach(libxl_ctx *ctx, libxl_device_disk *disk); Does this even need to be public at this stage ? ] /* Network Interfaces */ ] int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic); ] /* Keyboard */ ] int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb); ] /* Framebuffer */ ] int libxl_device_vfb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb); ] /* PCI Passthrough */ ] int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev); ] int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev); ] typedef struct libxl__xen_console_reader libxl_xen_console_reader; ] ] libxl_xen_console_reader * ] libxl_xen_console_read_start(libxl_ctx *ctx, int clear); ] int libxl_xen_console_read_line(libxl_ctx *ctx, ] libxl_xen_console_reader *cr, ] char **line_r); ] void libxl_xen_console_read_finish(libxl_ctx *ctx, ] libxl_xen_console_reader *cr); ] char *libxl_tmem_list(libxl_ctx *ctx, uint32_t domid, int use_long); ] int libxl_tmem_freeze(libxl_ctx *ctx, uint32_t domid); ] int libxl_tmem_destroy(libxl_ctx *ctx, uint32_t domid); ] int libxl_tmem_thaw(libxl_ctx *ctx, uint32_t domid); ] int libxl_tmem_set(libxl_ctx *ctx, uint32_t domid, char* name, ] uint32_t set); ] int libxl_tmem_shared_auth(libxl_ctx *ctx, uint32_t domid, char* uuid, ] int auth); ] int libxl_tmem_freeable(libxl_ctx *ctx); Not sure about the tmem calls. And from libxl_utils.h: ] pid_t libxl_fork(libxl_ctx *ctx); This function is going to have to go away. --