aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml
Commit message (Collapse)AuthorAgeFilesLines
* tools/ocaml: fix erroneous free of cpumap in stub_xc_vcpu_getaffinityMatthew Daley2013-10-101-2/+0
| | | | | | | | | | | Not sure how it got there... Coverity-ID: 1056196 This is CVE-2013-4370 / XSA-69 Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: ocaml: fix code intended to output comments before definitionsRob Hoes2013-09-101-2/+4
| | | | | | | | | I'm not sure how useful these comments actually are but erred on the side of fixing rather than removing. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Rob Hoes <rob.hoes@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* oxenstored: Protect oxenstored from malicious domains.=John Liu2013-07-225-6/+31
| | | | | | | | | | | | | | | add check logic when read from IO ring, and if error happens, then mark the reading connection as "bad", Unless vm reboot, oxenstored will not handle message from this connection any more. xs_ring_stubs.c: add a more strict check on ring reading connection.ml, domain.ml: add getter and setter for bad flag process.ml: if exception raised when reading from domain's ring, mark this domain as "bad" xenstored.ml: if a domain is marked as "bad", do not handle it. Signed-off-by: John Liu <john.liuqiming@huawei.com> Acked-by: David Scott <dave.scott@eu.citrix.com>
* tools/ocaml: clean META filesVincent Bernardoff2013-04-171-1/+1
| | | | | | | | As META files are generated from META.in files, they should be cleaned by clean rules. Signed-off-by: Vincent Bernardoff <vincent.bernardoff@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* ocaml: eventchn: remove the unused exception 'Eventchn.Error'David Scott2013-04-112-6/+0
| | | | | Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* ocaml: eventchn: add ocamldoc strings to the interfaceDavid Scott2013-04-111-0/+29
| | | | | | | | Also add a reference to tools/libxc/xenctrl.h, which is where the underlying C functions are defined. Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* ocaml: eventchn: in the interface, we don't have to give implementation detailsDavid Scott2013-04-111-10/+9
| | | | | | | | Remove the mention of the C function names from the .mli -- this is only needed in the implementation .ml Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* ocaml: eventchn: add a 'type t' to represent an event channelDavid Scott2013-04-115-18/+41
| | | | | | | | | | | | | | It's a common OCaml convention to add a 'type t' in a module to represent the main "thing" that the module is about. We add an opaque type t and to_int/of_int functions for those who really need it, in particular: 1. to_int is needed for debug logging; and 2. both to_int and of_int are needed for anyone who communicates a port number through xenstore. Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Merge branch 'xenstore-syslog' of git://github.com/djs55/xen into stagingIan Campbell2013-04-116-52/+257
|\
| * oxenstored: Allow oxenstored to use syslog at levels other than DebugDavid Scott2013-03-191-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now log different kinds of events at different levels. The convention is now: new/end_connection: Debug coalesce: Debug conflict: Debug commit: Debug regular ops: Info start/end_transaction: Debug error (ENOENT): Debug error (any other): Warn watch: Info Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
| * oxenstored: enable logging via syslog, if specified in the config file.David Scott2013-03-192-34/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To log to files the config file should contain: xenstored-log-file = /var/log/xenstored.log access-log-file = /var/log/xenstored-access.log (These two files are still the built-in defaults. The log format is unchanged.) To log to syslog the config file should contain: xenstored-log-file = syslog:<facility> access-log-file = syslog:<facility> where <facility> is the syslog facility to use (e.g. 'daemon' 'local2') Signed-off-by: David Scott <dave.scott@eu.citrix.com>
| * oxenstored: Re-add ocaml syslog bindingDavid Scott2013-03-194-2/+147
| | | | | | | | | | | | | | | | | | This was lost in the OCaml xenstored log merge of 10/Oct/2011. The binding isn't exported as a shared "log" library, instead it is kept local to xenstored. Signed-off-by: David Scott <dave.scott@eu.citrix.com>
* | tools/ocaml: Correct META for libxl bindingsAndrew Cooper2013-04-081-2/+2
|/ | | | | | | | | This was missed by c/s 23936:cdb34816a40a which renamed xl -> xenlight [ 23936:cdb34816a40a is 7ceaa0c7449e841d7ca7db889c3041dc3fedbb3b in git -iwj ] Reported-by: alien@rmail.be Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
* tools/ocaml: oxenstored: correctly handle a full ring.Ian Campbell2013-02-151-2/+2
| | | | | | | | | | | Change 26521:2c0fd406f02c (part of XSA-38 / CVE-2013-0215) incorrectly caused us to ignore rather than process a completely full ring. Check if producer and consumer are equal before masking to avoid this, since prod == cons + PAGE_SIZE after masking becomes prod == cons. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* oxenstored: Enforce a maximum message size of 4096 bytesIan Jackson2013-02-071-0/+8
| | | | | | | | | | | | | | | | The maximum size of a message is part of the protocol spec in xen/include/public/io/xs_wire.h Before this patch a client which sends an overly large message can cause a buffer read overrun. Note if a badly-behaved client sends a very large message then it will be difficult for them to make their connection work again-- they will probably need to reboot. Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/ocaml: oxenstored: Be more paranoid about ring readingIan Jackson2013-02-071-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oxenstored makes use of the OCaml Xenbus bindings, in which the function xs_ring_read in tools/ocaml/libs/xb/xs_ring_stubs.c is used to read from the shared memory Xenstore ring. This function does not correctly handle all possible (prod, cons) states when MASK_XENSTORE_IDX(prod) > MASK_XENSTORE_IDX(cons). The root cause is the use of the unmasked values of prod and cons to calculate to_read. If prod is set to an out-of-range value, the ring peer can cause to_read to be too large or even negative. This allows the ring peer to force oxenstored to read and write out of range for the buffers leading to a crash or possibly to privilege escalation. Correct this by masking the values of cons and prod at the start, so we only deal with masked values. This makes the logic simpler, as semantically inappropriate values of the upper bits of the ring pointers are simply ignored. The same vulnerability does not exist in the ring writer because the only use made of the unmasked value is the check which prevents the prod pointer overtaking the cons pointer. A ring peer which defeats this check will suffer only lost data. However, additionally, precautions need to be taken to ensure that req_cons and req_prod are only read once in each function. Without the use of volatile or some asm construct, the compiler can "prove" that req_cons and req_prod do not change unexpectedly and is permitted to "amplify" the read of (say) req_cons into two reads at different times, giving two different values for use as cons, and then use the two sources of cons interchangeably. (The use of xen_mb() does not forbid this.) Therefore do the reads of req_cons and req_prod through a volatile pointer in both xs_ring_read and xs_ring_write. This is currently believed to be a theoretical vulnerability as we are not aware of any compilers which amplify reads in this way. This is a security issue, part of XSA-38 / CVE-2013-0215. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Matthew Daley <mattjd@gmail.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: update ocamlfind handlingOlaf Hering2013-02-057-19/+20
| | | | | | | | | | | | | | | configure checks just for ocamlc, but the tools in tools/ocaml depend also on ocamlfind. On my workstation I have just ocamlc installed, but no ocamlfind. As a result make will fail. Update configure.ac to check also for OCAMLFIND, update various Makefiles and replace hardcoded ocamlfind string with $(OCAMLFIND) Please rerun autogen.sh after applying this patch. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: libxc bindings: Correct PCI terminologyAndrew Cooper2013-01-111-17/+17
| | | | | | | | | | Some renaming to correct the PCI and SBDF terminology. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: libxc bindings: Fix SBDF encodingAndrew Cooper2013-01-111-5/+4
| | | | | | | | | | | | | Changeset 23861:ec7c81fbe0de alters the SBDF encoding expected by the DOMCTL_{de,}assign_device hypercalls. While it updates libxl, libxc and the python bindings, the ocaml bindings got missed. As a result, any attempt to use PCI Passthrough with Xen-4.2 and later will fail. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: move definition of libxl_domain_config into the IDLIan Campbell2012-12-191-0/+1
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: make devid a type so it is initialized properlyMatthew Fioravante2012-10-053-2/+5
| | | | | | | | | | | | | | | | Previously device ids in libxl were treated as integers meaning they were being initialized to 0, which is a valid device id. This patch makes devid its own type in libxl and initializes it to -1, an invalid value. This fixes a bug where if you try to do a xl DEV-attach multiple time it will continuously try to reattach device 0 instead of generating a new device id. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: make libxl_device_pci_{add,remove,destroy} interfaces asynchronousIan Campbell2012-08-031-2/+2
| | | | | | | | | | | | | | This does not make the implementation fully asynchronous but just updates the API to support asynchrony in the future. Currently although these functions do not call hotplug scripts etc and therefore are not "slow" (per the comment about ao machinery in libxl_internal.h) they do interact with the device model and so are not quite "fast" either. We can live with this for now. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: ignore and clean .spot and .spit filesAndrew Cooper2012-08-011-1/+1
| | | | | | | | | | | Newer ocaml toolchains generate .spot and .spit files which are ocaml metadata about their respective source files. Add them to the clean rules as well as the .{hg,git}ignore files. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: convert libxl_device_vfb_add to an async operationRoger Pau Monne2012-07-261-1/+1
| | | | | | | | | | Split libxl_device_vfb_add into libxl__device_vfb_add (to be used inside already running ao's), and make libxl_device_vfb_add a stub to call libxl__device_vfb_add. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: convert libxl_device_vkb_add to an async operationRoger Pau Monne2012-07-261-1/+1
| | | | | | | | | | Split libxl_device_vkb_add into libxl__device_vkb_add (to be used inside already running ao's), and make libxl_device_vkb_add a stub to call libxl__device_vkb_add. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: convert libxl_device_nic_add to an async operationRoger Pau Monne2012-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | This patch converts libxl_device_nic_add to an ao operation that waits for device backend to reach state XenbusStateInitWait and then marks the operation as completed. This is not really useful now, but will be used by latter patches that will launch hotplug scripts after we reached the desired xenbus state. Calls to libxl_device_nic_add have also been moved to occur after the device model has been launched, so when hotplug scripts are called from this functions the interfaces already exists. As usual, libxl_device_nic_add callers have been modified, and the internal function libxl__device_disk_add has been used if the call was inside an already running ao. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: convert libxl_device_disk_add to an async opRoger Pau Monne2012-07-261-1/+1
| | | | | | | | | | | | | | | | | | This patch converts libxl_device_disk_add to an ao operation that waits for device backend to reach state XenbusStateInitWait and then marks the operation as completed. This is not really useful now, but will be used by later patches that will launch hotplug scripts after we reached the desired xenbus state. As usual, libxl_device_disk_add callers have been modified, and the internal function libxl__device_disk_add has been used if the call was inside an already running ao. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [ ijc -- drop hunk modifying libxl_cdrom_insert which is not needed after 25670:3666e9712eaf "libxl: make libxl_cdrom_insert async" ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: change ao_device_remove to ao_deviceRoger Pau Monne2012-07-231-2/+2
| | | | | | | | | | | | Introduce a new structure to track state of device backends, that will be used in following patches on this series. This structure if used for both device creation and device destruction and removes libxl__ao_device_remove. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add a new Array type to the IDLIan Campbell2012-07-061-1/+14
| | | | | | | | | | | | And make all the required infrastructure updates to enable this. Since there are currently no uses of this type there is no change to the generated code. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* ocaml: fix build after 25446:648508ee27a2, 25449:68d46c5ea0a3 et al.Ian Campbell2012-06-022-12/+13
| | | | | | | | | | | These renamed a type and the associated functions and the ocaml bindings were not updated to suit. This also highlighted that libxl_domain_sched_params should not be DIR_IN since it is also use as an output struct. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add new "defbool" built in type.Ian Campbell2012-03-012-0/+28
| | | | | | | | This type is a but like a "boolean" but with a third state "default" (so really I suppose it's a tristate). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Rename libxl_sched_* to include _domainGeorge Dunlap2012-02-231-4/+4
| | | | | | | | | | | | | In preparation for introducing a schedule parameter-based structure, rename libxl_sched_{credit,credit2,sedf} to libxl_sched_{}_domain. No functional changes. v2: Wrap long lines while I'm at it Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* oxenstored: Fix spelling of "persistent" config variableIan Jackson2012-02-202-2/+2
| | | | | | | | | Change "persistant" to "persistent", in the code and the example/default config. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: expose cpu topology as a single list of cpu->{node,core,socket} maps.Ian Campbell2012-01-314-52/+21
| | | | | | | | | Rather than the previous tripple list which is more complicated to work with and harder for language bindings. 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>
* ocaml: Topology.get returns an array not a single element.Ian Campbell2012-01-312-2/+2
| | | | | | | | The stub implementation appears to already be correct. 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>
* ocaml: add helpers for Some/None option types.Ian Campbell2012-01-311-3/+15
| | | | | | 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: remove libxl_button_press in favour of libxl_send_trigger.Ian Campbell2012-01-313-23/+4
| | | | | | | | | | | | | send_trigger already included all the operations covered by button_press. Rework send_trigger to take an enum instead of a string. I stopped short at removing the xl "button-press" command but instead have marked it as deprecated. 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: Rename libxl IDL infrastructure.Ian Campbell2012-01-312-19/+18
| | | | | | | | | | | | | | | | Originally libxltypes.py provided the infrastructure and libxl.idl provided the specific types. In 23887:a543e10211f7 libxl.idl became libxl_types.idl (to allow for libxl_types_internal.idl) which means we now have libxl_types.FOO and libxltypes.FOO providing different things and annoying people in tab completion. Rename the infrastructure as idl. 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: remove libxl_device_model_info.Ian Campbell2012-01-311-1/+0
| | | | | | | | | All that is left here is the target domain's domid which we can pass around as a parameter. 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>
* ocaml: use libxl IDL type helpers for C argument passingIan Campbell2012-01-311-17/+11
| | | | | | | | | | | | Makes handling of nested structs more correct. Only change to the generated code right now is that the FOO_Val (C->ocamlC) function for Enumeration types now takes the C argument by value instead of reference. 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: Convert to asynchronous: device removalIan Jackson2012-01-271-4/+4
| | | | | | | | | | | | | Convert libxl_FOO_device_remove, and the function which does the bulk of the work, libxl__device_remove, to the new async ops scheme. Adjust all callers. Also remove libxl__wait_for_device_state which is now obsolete. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: New event generation APIIan Jackson2012-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Replace the existing API for retrieving high-level events (events about domains, etc.) from libxl with a new one. This changes the definition and semantics of the `libxl_event' structure, and replaces the calls for obtaining information about domain death and disk eject events. This is an incompatible change, sorry. The alternative was to try to provide both the previous horrid API and the new one, and would also involve never using the name `libxl_event' for the new interface. The new "libxl_event" structure is blacklisted in the ocaml bindings for two reasons: - It has a field name "type" (which is a keyword in ocaml); the ocaml idl generator should massage this field name on output, to "type_" perhaps. - The ocaml idl generator does not support KeyedUnion. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* ocaml, libxl: support "private" fieldsIan Jackson2012-01-271-0/+8
| | | | | | | | | | | | | The changeset 24378:b4365e2c2595 libxl: idl: support new "private" type attribute is not complete. Actually using this feature does not work because the ocaml idl generator does not know about it. So add that support. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* ocaml: Correct ocaml type name for Aggregate types.Ian Campbell2012-01-101-0/+2
| | | | | | | | No change to the generated code because this path isn't used yet. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* oxenstored: Always log something at start of day (if logging enabled at all)Ian Campbell2011-12-152-3/+3
| | | | | | | | | | | Otherwise at the default level we rarely log anything at all. A completely empty log file is a good sign, but only if you know you are looking in the right place... 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>
* oxenstored: install configuration fileIan Campbell2011-12-154-4/+6
| | | | | | | | | | | | First though: - Move it to /etc/xen/oxenstored.conf. - Use /var/run/xenstored.pid as default pid file - Disable test-eagain "Randomly failed a transaction with EAGAIN. Used for testing Xs user". Doesn't sound fun by default... 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>
* oxenstored: handle unknown operations by returning an error to the clientIan Campbell2011-12-155-7/+8
| | | | | | | | | | | | | | | | | | | Previous an unknown operation would be decoded as a Not_found exception which would bubble all the way up to the try ... with surrounding the call to main_loop where it would be logged and ignored. This would leave the guest hanging waiting for a response to the invalid request. Instead introduce a specific "Invalid" operation. Higher level functionality, such as Process.process_packet, already handles operations which are not understood with an error reply due to the final wildcard entry in Process.function_of_type but explicitly handle Invalid this way to make it clear what is going on. 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>
* oxenstored: log Errors and Warnings by default.Ian Campbell2011-12-091-1/+1
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* oxenstored: Remove support for PQ defined operations.Ian Campbell2011-12-092-16/+0
| | | | | | | | It is unused. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools/ocaml: Release the global lock during some hypercallsJonathan Davies2011-12-011-47/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Since libxc is re-entrant, there is no need for the OCaml bindings to prevent more than one thread from entering libxc concurrently. Previously, the OCaml bindings had prevented re-entrancy by not using caml_{enter,leave}_blocking_section in the C stubs. The absence of these calls meant that the global lock remained held during hypercalls. This caused multi-threaded applications to completely lock up during long-running hypercalls. Calls to these functions were present but commented out in the OCaml bindings some years ago when libxc was not fully re-entrant. Instead, we now do call caml_{enter,leave}_blocking_section in all the places it used to be commented out, meaning that the global lock is released during those hypercalls. We also no longer assert the XC_OPENFLAG_NON_REENTRANT flag when calling xc_interface_open because the caller no longer does re-entrancy prevention at those places. This patch has now gone through a XenRT nightly test; no problems were observed. Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>