aboutsummaryrefslogtreecommitdiffstats
path: root/extras
Commit message (Collapse)AuthorAgeFilesLines
* mini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation"Keir Fraser2010-05-044-37/+12
| | | | | | Jeremy Fitzhardinge (jeremy@goop.org) reports that this fixes HVM+stubdom. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* mini-os: Fix xenbus_switch_state's transaction retryKeir Fraser2010-04-071-1/+3
| | | | | | | When xenbus_switch_state has to retry the transaction which it just created, it needs to recreate another one. Clearing xbt triggers it. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os: Fix crash on frontend shutdown failuresKeir Fraser2010-04-074-5/+10
| | | | | | | Do not free frontend resources if some error happened, since the backend may not have finished properly restarting in such case. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os: Fix frontend shutdown wait loopKeir Fraser2010-04-074-8/+13
| | | | | | | minios frontends must wait for backends to be shut down and reinitialized before freeing resources. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os: Fix xenbus initialisationKeir Fraser2010-04-064-12/+37
| | | | | | | | | This fixes xenbus initialization of blkfront, netfront and pcifront by uniformizing with fbfront: after writing parameters, set state to initialised, then wait for backend to switch to connect state, and then only read its parameter and switch to the connect state. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os: Do not use the same wait element twiceKeir Fraser2010-04-061-1/+2
| | | | | | | To enqueue the kbdfront thread on two separate wait queues, we need two different wait elements. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: Trivial spelling typo fixed.4.0.0-branchedKeir Fraser2010-03-301-1/+1
| | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: implement xc_map_foreign_bulkKeir Fraser2010-01-187-26/+27
| | | | | | | In order to do so it modifies map_frames_ex and do_map_frames to take an int *err as parameter and return any error that way. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* mini-os: Fix build error when !HAVE_LIBCKeir Fraser2009-12-181-1/+1
| | | | Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* mini-os: Fix a compilation error in xencons_ring when !HAVE_LIBCKeir Fraser2009-12-141-1/+1
| | | | Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* mini-os: Fix memory leaks in blkfront, netfront, pcifront, etc.Keir Fraser2009-12-147-25/+80
| | | | | | | | | The return value of Xenbus routines xenbus_transaction_start(), xenbus_printf(), xenbus_transaction_end(), etc. is a pointer of error message. This pointer should be passed to free() to release the allocated memory when it is no longer needed. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* mini-os: Fix memory leaks in xs_read() and xs_write()Keir Fraser2009-12-111-0/+2
| | | | | | | | xenbus_read() and xenbus_write() will allocate memory for error message if any error occurs, this memory should be freed. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Fix fb/kbd initializationKeir Fraser2009-11-231-0/+2
| | | | | | | When allocating kbdfront and fbfront structures, we should zero them since we do not initialize all fields. Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: Fix xenbus_unwatch_path callsKeir Fraser2009-11-236-15/+15
| | | | | | | | | | In a lot of places in MiniOS frontends, xenbus_watch_path_token is used instead of xenbus_watch_path to get more precise wake ups. To free those, xenbus_unwatch_path_token has to be used instead of xenbus_unwatch_path, else the unwatch operation will fail. This fixes spurious watch events left by pv-grub. Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
* pcifront: fix multiple initialization bugKeir Fraser2009-11-231-5/+14
| | | | | | | | | Now that we have pcifront_watches to dynamically initialize pcifront we don't need a call to init_pcifront in pcilib and pcifront_scan anymore; we should just wait for the frontend to connect to the backend instead. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* pcifront: implement dynamic connections and disconnectionsKeir Fraser2009-11-134-8/+134
| | | | | | | | | | this patch implements dynamic connections and disconnections in pcifront. This feature is required to properly support pci hotplug, because when no pci devices are assigned to a guest, xend will remove the pci backend altogether. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: xmalloc and realloc fixesKeir Fraser2009-10-291-3/+9
| | | | | | | | | - xmalloc currently faults if xmalloc_new_page fails due to OOM - realloc treats xmalloc_hdr.size as the size of just the data region rather than the total size of data region + headers + padding. From: James Pendergrass <James.Pendergrass@jhuapl.edu> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: Optimize mmap(open("/dev/mem"))Keir Fraser2009-10-231-5/+2
| | | | | | | Set map_frames_ex's stride parameter to 0 and increment to 1 to avoid building an explicit list of mfns. Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
* stubdom: mmap on /dev/mem supportKeir Fraser2009-10-212-1/+12
| | | | | | | | | | This patch adds support for mmap on /dev/mem in a stubdom; it is secure because it only works for memory areas that have been explicitly allowed by the toolstack (xc_domain_iomem_permission). Incidentally this is all that is needed to make MSI-X passthrough work with stubdoms. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: fix console end of line: \n\r -> \r\nKeir Fraser2009-10-141-5/+9
| | | | | | Change the end of line produced by minios' console from \n\r to \r\n. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: fix minios consoleKeir Fraser2009-10-141-7/+11
| | | | | | | | MiniOS' console_print tries to expand '\n' into "\n\r" in place, causing page faults if the string resides in text. Use a duplicate of the string instead. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios pcifront: translate physical into virtual addressesKeir Fraser2009-10-141-2/+63
| | | | | | | | Qemu understands physical pci addresses while pciback expects virtual pci addresses: this patch adds a translation function in pcifront to make the conversion. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom/minios: re-structure headersKeir Fraser2009-10-0140-234/+240
| | | | | | | | | As part of making stubdom usable on NetBSD, it is necessary to restructure the minios headers to avoid conflicts with NetBSD's crossbuild toolchain. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* fs-front: cope with a missing fs-backendKeir Fraser2009-07-232-10/+44
| | | | | | | | Obviously save\restore is not going to work if fs-backend is missing, but at least the stubdom will be able to work correctly in all the other cases. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: switch to C99 integer typesKeir Fraser2009-07-1522-96/+89
| | | | | | This is a necessary step to make minios build on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* minios: fix free_fbfrontKeir Fraser2009-06-271-2/+0
| | | | | | | When a stubdom is destroyed, fbfront tries to unbind the evtchn twice. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: add few missing constants in limits.hKeir Fraser2009-06-251-0/+2
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Use posix_openpt() rather than non-standard openpty().Keir Fraser2009-06-182-3/+9
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: support secondary guest consoles.Keir Fraser2009-06-176-50/+283
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Introduce mechanism to check standard conformance of headersKeir Fraser2009-06-171-16/+16
| | | | | | | | | | | While pretty simplistic, it appears to serve the purpose at the moment (i.e. it spotted two places where a GNU extension was used withou proper preprocessor conditionals). The "simplistic" here includes that the checking gets only done for native builds, and ia64 gets excluded due to its arch-specific header intentionally (for whatever reason) checking that anonymous struct/unions can be used. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* minios: Introduce BSD license COPYING fileKeir Fraser2009-06-041-0/+23
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Clean up and remove Linux remnants from x86_64.SKeir Fraser2009-06-031-111/+20
| | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: refactor xenbus state machineKeir Fraser2009-06-036-67/+321
| | | | | | | | Implement xenbus_wait_for_state_change and xenbus_switch_state and change the various frontends to use the two functions and do proper error checking. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Remove Linux attribution for mktime() as it's not true since c/s 19638.Keir Fraser2009-06-011-1/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: implement ffs, ffsl and ffsll.Keir Fraser2009-05-282-0/+54
| | | | | | | | | | | The first function is compiled only in case minios is compiled without newlib, since newlib already provides an implementation for ffs. On the other hand ffsl and ffsll are always compiled because newlib misses those functions. This patch also provides an implementation for __ffsti2 and __ffsdi2 because they are needed by gcc in order to successfully link ffsll. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* pvgrub: few lines in shutdown_blkfront were removed by mistake.Keir Fraser2009-05-261-0/+4
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: replace mktime implementationKeir Fraser2009-05-261-42/+54
| | | | | | | | | | In the efforts to clarify MiniOS license it came to my attention that few portions of MiniOS were taken from other GPL projects, one of them is the mktime implementation. This patch replaces the current GPL licensed mktime implementation with a different and BSD licensed version. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Fix blkfront driver when sector_size != 512Keir Fraser2009-05-261-4/+4
| | | | | | | | The first and last sector as well as the sector number of the request is expressed in 512 bytes units, independently from the real sector size. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Implement some extra lib functions for ocaml xenstored stubdomKeir Fraser2009-05-192-0/+38
| | | | | | | We could stub them out as unsupported, but we may as well implement them as they are very simple. Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
* minios: Define extra stub functions to allow build of ocaml xenstored stubdomKeir Fraser2009-05-191-1/+58
| | | | | | | These are referenced by the libs that ocamlopt links xenstored to, but ought not actually get called. Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
* stubdom: drop lwip supportKeir Fraser2009-04-233-11/+18
| | | | | | | | | | | | | | | | | | | | Network support is still provided the same way: using the tap interface, created in qemu using netfront. The lwip stack is still available to avoid additional compilation issues. However the stubdom is not going to have its own vif anymore, this means that the only vnc server supported is the one in dom0. You can still enable the vnc server in a stubdom at compile time, if you want so. Probably the most important change caused by this patch to xen users is that you don't have to specify two vif in the stubdom config file anymore, but just one: -vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34'] +vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34'] Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdoms: generate stubdom config fileKeir Fraser2009-04-231-4/+0
| | | | | | | | | | | | | | | | | | This patch removes the need for a second configuration file for stubdoms: it is going to be automatically generated by the script stubdom-dm using command line options and xenstore to find any needed information. The configuration script will be placed under /etc/xen/stubdoms and automatically removed when the domain is destroyed. The only change needed in xend is not to write on xenstore sdl, opengl and serial command line options for qemu, because stubdoms do not support them. It is safe to remove those two options from xenstore because qemu does not use xenstore to read commans line options. Finally this patch fixes blkfront disconnections from backends and display and xauthority variables for pv guests. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: fix a memory corruption in blkfrontKeir Fraser2009-04-141-5/+7
| | | | | | | | | The corruption happens every time we pass a sector aligned buffer (instead of a page aligned buffer) to blkfront_aio. To trigger the COW we have to write at least a byte to each page of the buffer, but we must be careful not to overwrite useful content. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: Extend struct blkfront_aiocb.Keir Fraser2009-03-311-0/+2
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: _chk_fail and _chk canaries for minios and newlibKeir Fraser2009-03-311-0/+8
| | | | | | | | Add __stack_chk_fail to mini-os and __sprintf_chk __fprintf_chk to newlib, to cope with ocaml runtimes compiled with -fstack-protector. From: "George S. Coker, II" <gscoker@alpha.ncsc.mil> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: allow to allocate machine contiguous pagesKeir Fraser2009-03-134-0/+152
| | | | | | | | This is a port of XenLinux xen_alloc_contig_memory() to mini-os. A sufficiently privileged mini-os guest can exchange a small number of its pages with machine contiguous pages. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
* minios: Fix 18874 memory clippingKeir Fraser2009-03-091-5/+8
| | | | | | | Fix 18874's memory clipping: there are three page-sized holes between direct mapping, demand mapping, heap pages and the end of memory. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: general cleanup of mm.cKeir Fraser2009-03-023-213/+302
| | | | | | | | Major clean up of mm.c. Added comments, fixed coding style, more sensible variable names, mark some local functions static etc. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: cleanup events.cKeir Fraser2009-03-021-27/+57
| | | | | | | | Don't throw away hypercall error codes. They might be useful. Also some minor coding style cleanups. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: add ioremap/iounmapKeir Fraser2009-03-027-48/+248
| | | | | | | | Add ioremap and iounmap functions to minios. Also move some unmapping code from and clean up mem_test. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>