aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include
Commit message (Collapse)AuthorAgeFilesLines
* mini-os: eliminate duplicated definition of spin_unlock_waitChen Baozi2013-07-042-2/+2
| | | | | Signed-off-by: Chen Baozi <baozich@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* tpmif: fix identifier prefixesJan Beulich2013-06-211-1/+1
| | | | | | | | | | The definitions here shouldn't use vtpm_ or VPTM_ as their prefixes, the interface should instead make use of tpmif_ and TPMIF_. This fixes a build failure after syncing the public headers to linux-2.6.18-xen.hg (where a struct vtpm_state already exists). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* mini-os/tpmback: add tpmback_get_peercontextDaniel De Graaf2013-04-122-0/+3
| | | | | | | This allows the XSM label of the TPM's client domain to be retrieved. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os/tpmback: Replace UUID field with opaque pointerDaniel De Graaf2013-04-121-2/+7
| | | | | | | | Instead of only recording the UUID field, which may not be of interest to all tpmback implementations, provide a user-settable opaque pointer associated with the tpmback instance. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* mini-os/tpmback: set up callbacks before enumerationDaniel De Graaf2013-04-121-11/+1
| | | | | | | | | | | | The open/close callbacks in tpmback cannot be properly initalized in order to catch the initial enumeration events because init_tpmback clears the callbacks and then asynchronously starts the enumeration of existing tpmback devices. Fix this by passing the callbacks to init_tpmback so they can be installed before enumeration. This also removes the unused callbacks for suspend and resume. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* mini-os/tpm{back, front}: Change shared page ABIDaniel De Graaf2013-04-122-3/+5
| | | | | | | | | | | | | | | | | | | | | This changes the vTPM shared page ABI from a copy of the Xen network interface to a single-page interface that better reflects the expected behavior of a TPM: only a single request packet can be sent at any given time, and every packet sent generates a single response packet. This protocol change should also increase efficiency as it avoids mapping and unmapping grants when possible. The vtpm xenbus device now requires a feature-protocol-v2 node in xenstore to avoid conflicts with existing (xen-patched) kernels supporting the old interface. While the contents of the shared page have been defined to allow packets larger than a single page (actually 4088 bytes) by allowing the client to add extra grant references, the mapping of these extra references has not been implemented; a feature node in xenstore may be used in the future to indicate full support for the multi-page protocol. Most uses of the TPM should not require this feature. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Cc: Jan Beulich <JBeulich@suse.com>
* mini-os: implement poll(2)Wei Liu2013-04-111-0/+1
| | | | | | | | It is just a wrapper around select(2). This implementation mimics Linux's do_poll. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-212-2/+2
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* mini-os: build fixes for lwip 1.3.2David Vrabel2013-01-302-5/+9
| | | | | | | | | | | | | Various fixes to mini-os needed to build lwip 1.3.2: - Don't build the tests. - Add BSD-style endianness macros to endian.h. - free() is called via a function pointer so it needs to be a real function. Do the same for malloc() and realloc(). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Keir Fraser <keir@xen.org>
* mini-os: Notify shutdown through weak function call instead of wake queueSamuel Thibault2013-01-091-3/+0
| | | | | | | | | To allow for more flexibility, this notifies domain shutdown through a function rather than a wake queue, to let the application use a wake queue only if it wishes. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Keir Fraser <keir@xen.org>
* [minios] Add xenbus shutdown control supportSamuel Thibault2012-11-303-0/+19
| | | | | | | | | | | | Add a thread watching the xenbus shutdown control path and notifies a wait queue. Add HYPERVISOR_shutdown convenient inline for minios shutdown. Add proper shutdown to the minios test application. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Keir Fraser <keir@xen.org>
* minios: add tpmfront, tpm_tis, and tpmback driversMatthew Fioravante2012-11-134-0/+278
| | | | | | | | | | | | | | | | | | | | This patch adds 3 new drivers to mini-os. tpmfront - paravirtualized tpm frontend driver tpmback - paravirtualized tpm backend driver tpm_tis - hardware tpm driver Unfortunately these drivers were derived from GPL licensed linux kernel drivers so they must carry the GPL license. However, since mini-os now supports conditional compilation, hopefully these drivers can be included into the xen tree and conditionally removed from non-gpl projects. By default they are disabled in the makefile. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: add xenbus_read_uuidMatthew Fioravante2012-11-131-0/+4
| | | | | | | | | Similar to xenbus_read_integer, this function reads a xenstore path and parses it as a uuid. See include/xenbus.h for details. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: add select definition to sys/time.h when HAVE_LIBC is definedMatthew Fioravante2012-10-092-1/+5
| | | | | | | | | | This patch adds the select function to sys/time.h when HAVE_LIBC is defined, which is according to standard (see the select() manpage). It also removes a redudant lwip include from posix/sys/select.h. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: add posix io for blkfrontMatthew Fioravante2012-10-092-0/+11
| | | | | | | | | This patch adds posix io support (read,write,lseek) to block devices using blkfront. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: Disable the mfn_is_ram() check, it doesn't work correctly on all systemsMatthew Fioravante2012-10-081-1/+0
| | | | | | | | | This patch disables the mfn_is_ram check in mini-os. The current check is insufficient and fails on some systems with larger than 4gb memory. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: Add endian, byteswap, and wordsize macros to mini-osMatthew Fioravante2012-10-086-25/+92
| | | | | | | | This patch addes byte swapping macros and endian support to mini-os. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: Add ioread/iowrite functions to mini-osMatthew Fioravante2012-10-081-0/+16
| | | | | | | | | | | This patch adds iowritexx() and ioreadxx() functions for interacting with hardware memory to mini-os. The functions are available in a header iorw.h Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: drop ia64 supportIan Campbell2012-09-1221-2940/+4
| | | | | | | | | | | | | | | | | Removed support from libxc and mini-os. This also took me under xen/include/public via various symlinks. Dropped tools/debugger/xenitp entirely, it was described upon commit as: "Xenitp is a low-level debugger for ia64" and doesn't appear to be linked into the build anywhere. 99 files changed, 14 insertions(+), 32361 deletions(-) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* mini-os: make frontends and xenbus optionalDaniel De Graaf2012-02-092-0/+14
| | | | | | | | | | | | | | | | | This adds compile-time logic to disable certain frontends in mini-os: - pcifront is disabled by default, enabled for ioemu - blkfront, netfront, fbfront, kbdfront, consfront are enabled by default - xenbus is required for any frontend, and is enabled by default If all frontends and xenbus are disabled, mini-os will run without needing to communicate with xenstore, making it suitable to run the xenstore daemon. The console frontend is not required for the initial console, only consoles opened via openpt or ptmx. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* mini-os: remove per-fd evtchn limitAlex Zeffertt2012-02-091-8/+10
| | | | | | | | | | | | | This changes the minios evtchn implementation to use a list instead of an array which ahis allows it to grow as necessary to support any number of ports, only limited by Xen (NR_EVS is 1024, should be enough for now). Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* mini-os: use BSD sys/queue.h instead of Linux list.hIan Campbell2012-01-315-225/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter is GPL which makes the whole of mini-os GPL rather than BSD as intended. In tree users are all GPL or GPL-compatible but we should fix this so that mini-os is BSD. Do so by using the same BSD sys/queue.h as we use in libxl. Tested with the builtin mini-os test app and qemu stubdomain, both of which appear to still function as expected. Move tools/libxl/external and the associated sed script to tools/include/xen-external to allow more sensible access from mini-os. Also add s/NULL/0/ in the sed script due to NULL not always being defined in stubdom code when mini-os/wait.h is included. As well as the obvious ABI changes there are a few API updates associated with the change: - struct rw_semaphore.wait_list is unused - remove_waiter needs to take the wait_queue_head The latter requires a qemu update, so there is also a QEMU_TAG update in this changeset. I sprinkled some extra-emacs local variables around the files I edited which didn't have them. I think this should be backported to the stable branches since external users of mini-os may have been mislead into thinking they could safely link mini-os against GPL-incompatible code. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* mini-os: convert mlock macros to C functionsOlaf Hering2012-01-311-2/+2
| | | | | | | | | mlock and munlock are implemented as macros in mini-os. Their usage requires casting in common code. Convert them to C syntax and provide an empty dummy function. Remove the now unneeded (void) cast from two munlock calls. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* mini-os: fix lib.h licenceSamuel Thibault2011-05-012-43/+96
| | | | | | | | | Update the Linux stdio functions prototypes, and move them to a separate header, licenced under GPL2+. Import FreeBSD8 string functions prototypes, update licence. Drop kvec, of unsure source and useless anyway. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: do not export {test,set,clear}_bit etc to applicationsIan Campbell2011-02-071-1/+2
| | | | | | | | | | | | | | | Fixes ioemu stubdom build: CC i386-stubdom/piix4acpi.o [...]/stubdom/ioemu/hw/piix4acpi.c:272: error: expected ')' before '?' token [...]/stubdom/ioemu/hw/piix4acpi.c:277: error: conflicting types for 'set_bit' [...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:396: error: previous definition of 'set_bit' was here [...]/stubdom/ioemu/hw/piix4acpi.c:282: error: conflicting types for 'clear_bit' [...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:414: error: previous definition of 'clear_bit' was here [...]/stubdom/ioemu/hw/piix4acpi.c: In function 'gpe_sts_write': Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl, minios: stubdom console based save/restoreStefano Stabellini2011-01-211-0/+1
| | | | | | | | | | | | | | | | Add two "special" PV consoles to stubdoms that are going to be used to send and receive the qemu-xen save files on save/restore. Use the second PV console to send the qemu-xen save file and the third PV console to receive the qemu-xen save file on restore. Fix the console shutdown function free_consfront that is called when the qemu save file is closed. Stubdom save/restore is still broken with xend. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remove fs-front/fs-backTim Deegan2011-01-112-56/+1
| | | | | | | | | | | | | | | | Its access controls are really not OK. In particular, it's not good for libxl, which stores per-VM config blobs in a directory that is exported to all VMs. This will break stub-qemu save/restore, which is the only user of fs-front that I'm aware of, but: - It's currently broken anyway (fs-back isn't run by default and crashes if it is run manually); and - Stefano has a plan to plumb qemu save records through a dedicated console channel instead. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* minios: add parentheses to mlock/mulock arguments.Ian Campbell2010-10-261-2/+2
| | | | | | | Fixes warning/build error with non-trivial arguments. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* minios: implement xc_map_foreign_bulkKeir Fraser2010-01-183-9/+9
| | | | | | | 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>
* pcifront: implement dynamic connections and disconnectionsKeir Fraser2009-11-131-0/+1
| | | | | | | | | | 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>
* stubdom: mmap on /dev/mem supportKeir Fraser2009-10-211-0/+1
| | | | | | | | | | 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: switch to C99 integer typesKeir Fraser2009-07-1510-47/+40
| | | | | | This is a necessary step to make minios build on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.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-181-1/+0
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: support secondary guest consoles.Keir Fraser2009-06-172-11/+39
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: refactor xenbus state machineKeir Fraser2009-06-031-0/+4
| | | | | | | | 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: implement ffs, ffsl and ffsll.Keir Fraser2009-05-281-0/+4
| | | | | | | | | | | 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>
* minios: Implement some extra lib functions for ocaml xenstored stubdomKeir Fraser2009-05-191-0/+6
| | | | | | | 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: Extend struct blkfront_aiocb.Keir Fraser2009-03-311-0/+2
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: allow to allocate machine contiguous pagesKeir Fraser2009-03-132-0/+4
| | | | | | | | 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: add ioremap/iounmapKeir Fraser2009-03-023-0/+39
| | | | | | | | 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>
* mini-os: Make utility function get_self_id() in fs-front.c public.Keir Fraser2008-12-161-0/+3
| | | | Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
* merge with xen-unstable.hgIsaku Yamahata2008-11-251-0/+85
|\
| * minios: add a barebone net/if.hKeir Fraser2008-11-111-0/+85
| | | | | | | | | | | | | | | | net/if.h is a standard header but unfortunately lwip doesn't provide it for any target but linux. Therefore I am adding a net/if.h, with an empty implementation of the declared functions. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | [IA64] Remove the useless big endian stuff.dietmar.hahn@fujitsu-siemens.com2008-11-184-140/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes all the useless big endian stuff from the mini-os. Before there was an effort to support big endian for PV-guest. But the big endian support was never gotten into the common parts of the mini-os so it makes no sense to have this only in the ia64 specific sources. And as there is no open source big endian os and porting our BS2000 os to ia64 was stopped, nobody wants that stuff in the common minos. So this looks ugly then and remove the big endian stuff. Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* | [IA64] minios: Clean up the hypervisor interfacedietmar.hahn@fujitsu-siemens.com2008-11-172-130/+14
|/ | | | | | move all hypervisor calls to xencomm Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* minios: Define __INSIDE_MINIOS__ rather than __MINIOS__Keir Fraser2008-10-291-1/+1
| | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* minios: do not expose #define current to applicationsKeir Fraser2008-10-272-6/+7
| | | | | | | | | | | | | | | | | Currently the minios headers do this: #define current get_current() Obviously when porting general code to this environment, this can cause problems ! The attached patch arranges for this only to be done if #define __MINIOS__ is declared, which is set up by the makefile in extras/mini-os. Suppressing the namespace pollution is necessary to get recent upstream qemu's to compile, since they (quite properly) use `current' as an ordinary identifier. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* mini-os: adding some missing posix function declarationsKeir Fraser2008-09-176-0/+99
| | | | | | | Adding some missing posix function declarations, to get rid of some qemu-remote compile time warnings. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: add v?errx? and v?warnx? functionsKeir Fraser2008-08-271-0/+15
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>