Re: [PATCH v1 0/1] Fix rpath handling in OCaml's Makefile.rules

2024-12-09 Thread Christian Lindig
orrect that and get rid of the issue. > > Andrii Sultanov (1): > tools/ocaml: Specify rpath correctly for ocamlmklib > > tools/ocaml/Makefile.rules | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > -- > 2.39.5 > Acked-by: Christian Lindig

Re: [RFC PATCH 0/6] xen/abi: On wide bitfields inside primitive types

2024-10-30 Thread Christian Lindig
same primitive type. This > ensures any field containing an integer of any kind can be referred by pointer > and treated the same way as any other with regards to sizeof() and the like. Acked-by: Christian Lindig Fine with me but the OCaml part is not very exposed to this. — C

Re: [XEN PATCH v1 2/3] ocaml/libs: Fill build failure due to unused variable in ocaml macro

2024-10-18 Thread Christian Lindig
t; + CAMLnoreturn; > } > #define xsd_glue_failwith(xch) xsd_glue_failwith(xch, __func__, __LINE__) > > and F40 seem happy with the result. Acked-by: Christian Lindig I like the effort to remove warnings. — C

Re: [PATCH v1 1/1] ocaml/libs: Remove xsd_glue_dev package, also install plugin_interface_v1.a

2024-10-09 Thread Christian Lindig
> work. > > Specify OCAMLCFLAGS along with OCAMLOPTFLAGS. > > Signed-off-by: Andrii Sultanov > --- > tools/ocaml/libs/xsd_glue/Makefile | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > Acked-by: Christian Lindig

Re: [PATCH] tools/ocaml: Rationalise .gitignore

2024-09-09 Thread Christian Lindig
cal > .gitignore's with up-to-date patterns. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Török > CC: Rob Hoes > CC: Andrii Sultanov Acked-by: Christian Lindig

Re: [PATCH v2 0/3] tools/ocaml: Stabilize domain_getinfo for Oxenstored

2024-09-06 Thread Christian Lindig
There was some confusion about my ack for this series - my apologies. I intended to ack’ it entirely. Acked-by: Christian Lindig > On 3 Sep 2024, at 12:44, Andrii Sultanov wrote: > > This is a V2 of the "Stabilize Oxenstored's interface with" patch > series, se

Re: [PATCH v2 1/3] tools/ocaml: Build infrastructure for OCaml dynamic libraries

2024-09-04 Thread Christian Lindig
template to Makefile.rules. >> >> Signed-off-by: Andrii Sultanov > > Acked-by: Andrew Cooper Acked-by: Christian Lindig

Re: [PATCH] tools/ocaml/xc: Drop the GC lock for all hypercalls

2024-09-03 Thread Christian Lindig
> On 2 Sep 2024, at 17:13, Andrew Cooper wrote: > > On 02/09/2024 9:12 am, Christian Lindig wrote: >>> On 30 Aug 2024, at 18:53, Andrew Cooper wrote: >>> >>> We should be doing this unilaterally. >> Acked-by: Christian Lindig &g

Re: [PATCH] tools/ocaml/xc: Drop the GC lock for all hypercalls

2024-09-02 Thread Christian Lindig
> On 30 Aug 2024, at 18:53, Andrew Cooper wrote: > > We should be doing this unilaterally. Acked-by: Christian Lindig I would prefer to use caml_release_runtime_system(), caml_acquire_runtime_system() which I think is a better name for these functions. This could be likewis

Re: [PATCH] tools/ocaml: Factor out compatiblity handling

2024-08-30 Thread Christian Lindig
> On 28 Aug 2024, at 14:30, Andrew Cooper wrote: > > ... rather than having each library implement its own subset. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Török > CC: Rob Hoes > CC: Andrii Sultanov &

Re: [PATCH 0/3] tools/ocaml: Incremental build fixes

2024-08-23 Thread Christian Lindig
t; tools/ocaml: Fix the version embedded in META files > > tools/ocaml/Makefile.rules | 5 +++-- > tools/ocaml/common.make| 7 ++- > 2 files changed, 5 insertions(+), 7 deletions(-) > > > base-commit: 5231765a4e6528a3208e49885b9eeff42519a6c1 > -- > 2.39.2 > Acked-by: Christian Lindig

Re: [PATCH v1 1/4] tools/ocaml/common.make: Remove '-cc $(CC)' flag from OCAMLOPTFLAGS

2024-08-22 Thread Christian Lindig
> On 22 Aug 2024, at 13:25, Andrew Cooper wrote: > > Are there any ABI/API implication from changing the META file? The META file is for package/library management in an OCaml environment. I don’t see much relevance for it in the code that is part of the Xen tree - so see no problem changin

Re: [PATCH v1 0/4] Stabilize Oxenstored's interface with

2024-08-22 Thread Christian Lindig
ode 100644 > tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_v1.ml > create mode 100644 > tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_v1.mli > create mode 100644 tools/ocaml/libs/xenstoredglue/plugin_interface_v1.ml > create mode 10

Re: [PATCH for-4.19? v6 3/9] xen: Refactor altp2m options into a structured format

2024-06-17 Thread Christian Lindig
> On 11 Jun 2024, at 10:14, Jan Beulich wrote: > > On 11.06.2024 10:00, Petr Beneš wrote: >> On Tue, Jun 11, 2024 at 8:41 AM Jan Beulich wrote: >>> >>> On 10.06.2024 19:10, Petr Beneš wrote: From: Petr Beneš Encapsulate the altp2m options within a struct. This change is prep

Re: [PATCH for-4.19? v5 00/10] x86: Make MAX_ALTP2M configurable

2024-06-04 Thread Christian Lindig
> On 2 Jun 2024, at 21:04, Petr Beneš wrote: > > tools/ocaml/libs/xc/xenctrl.ml | 2 + > tools/ocaml/libs/xc/xenctrl.mli | 2 + > tools/ocaml/libs/xc/xenctrl_stubs.c | 40 +++--- Acked-by: Christian Lindig

Re: [PATCH for-4.19 v3 2/3] xen: enable altp2m at create domain domctl

2024-05-17 Thread Christian Lindig
defined(__i386__) || defined(__x86_64__) > > /* Quick & dirty check for ABI changes. */ > - BUILD_BUG_ON(sizeof(cfg) != 64); > + BUILD_BUG_ON(sizeof(cfg) != 68); > Acked-by: Christian Lindig

Re: [PATCH v2 1/4] LICENSES: Add MIT-0 (MIT No Attribution)

2024-05-17 Thread Christian Lindig
> CC: George Dunlap > CC: Jan Beulich > CC: Stefano Stabellini > CC: Julien Grall > CC: Christian Lindig > CC: Edwin Török Acked-by: Christian Lindig

Re: [PATCH v2 for-4.19 0/4] Drop libsystemd

2024-05-17 Thread Christian Lindig
| 5 - > tools/xenstored/posix.c | 4 +- > 13 files changed, 136 insertions(+), 277 deletions(-) > create mode 100644 LICENSES/MIT-0 > create mode 100644 tools/include/xen-sd-notify.h > > > base-commit: 977d98e67c2e929c62aa1f495fc4c6341c45abb5 > -- > 2.30.2 > Acked-by: Christian Lindig

Re: [PATCH 0/2] Drop libsystemd

2024-04-26 Thread Christian Lindig
> On 25 Apr 2024, at 18:32, Andrew Cooper wrote: > > On advise from the systemd leadership. See patch 1 for details. > > Andrew Cooper (2): > tools/{c,o}xenstored: Don't link against libsystemd > tools: Drop libsystemd as a dependency Acked-by: Christian Lindig

Re: [PATCH v1] tools/ocaml: fix warnings

2024-04-25 Thread Christian Lindig
-> append (k, "expect int arg") > - | Failure "bool_of_string" -> append (k, "expect bool arg") > - | Failure "float_of_string" -> append (k, "expect float arg") > | exn -> append (k, Printexc.to_string exn) > ) cf; > if !err != [] then raise (Error !err) > -- > 2.44.0 > Acked-by: Christian Lindig

Re: [PATCH 4/7] tools/ocaml: Add max_altp2m parameter

2024-04-25 Thread Christian Lindig
_FLAGS Field(arch_domconfig, 0) > @@ -291,6 +293,7 @@ CAMLprim value stub_xc_domain_create(value xch_val, value > wanted_domid, value co > #undef VAL_MAX_GRANT_VERSION > #undef VAL_MAX_MAPTRACK_FRAMES > #undef VAL_MAX_GRANT_FRAMES > +#undef VAL_MAX_ALTP2M > #undef VAL_MAX_EVTCHN_PORT > #undef VAL_MAX_VCPUS > #undef VAL_IOMMU_OPTS > -- > 2.34.1 > This looks correct from an OCaml perspective. Acked-by: Christian Lindig

Re: preparations for 4.17.4

2024-03-27 Thread Christian Lindig
> On 27 Mar 2024, at 14:42, Andrew Cooper wrote: > > On 27/03/2024 2:06 pm, Jan Beulich wrote: >> On 27.03.2024 15:01, Andrew Cooper wrote: >>> It occurs to me that these want considering: >>> >>> b6cf604207fd - tools/oxenstored: Use Map instead of Hashtbl for quotas >>> 098d868e52ac - tools/

Re: [PATCH] tools/ocaml: Add missing vmtrace_buf_kb field

2024-02-14 Thread Christian Lindig
> On 14 Feb 2024, at 11:45, Andrew Cooper wrote: > > Xapi is the only consumer of this interface. I've fixed up the build > against staging, but we're not going to be running KFX under Xapi any > time soon. > > Ultimately it's Christian's call. After a discussion with Andrew, we will not b

Re: [PATCH] tools/ocaml: Add missing vmtrace_buf_kb field

2024-02-08 Thread Christian Lindig
> On 7 Feb 2024, at 22:04, Petr Beneš wrote: > > > Add the missing `vmtrace_buf_kb` field to the OCaml bindings to match the > vm.cfg configuration, correcting an oversight from its initial introduction. > > Signed-off-by: Petr Beneš Acked-by: Christian Lindig This

Re: [PATCH v1 2/2] oxenstored: make Quota.t pure

2024-01-31 Thread Christian Lindig
> On 31 Jan 2024, at 10:52, Edwin Török wrote: > > Now that we no longer have a hashtable inside we can make Quota.t pure, > and push the mutable update to its callers. > Store.t already had a mutable Quota.t field. > > No functional change. Acked-by: Christian Lind

Re: [PATCH v1 0/2] tools/ocaml: support OCaml 5.x, drop support for <=4.05

2024-01-31 Thread Christian Lindig
/configure.ac| 2 +- > tools/ocaml/xenstored/disk.ml | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > -- > 2.43.0 > Acked-by: Christian Lindig

Re: [PATCH v2] stubdom: remove caml-stubdom

2023-11-22 Thread Christian Lindig
been removed. It didn't build since 2014, so nobody >>> seems >>> + to care. >> May I suggest some different phrasing. >> "caml-stubdom. It hasn't built since 2014, was pinned to Ocaml 4.02, >> and has been superseded by the MirageOS/SOLO5 projects." > > Fine with me. > > > Juergen > Acked-by: Christian Lindig I am fine with removing it as well. — C

Re: [PATCH v4 0/5] Kconfig for PCI passthrough on ARM

2023-11-01 Thread Christian Lindig
rch/x86/setup.c | 5 +++-- > xen/common/domain.c| 10 +- > xen/drivers/passthrough/pci.c | 10 ++ > xen/include/public/arch-x86/xen.h | 5 + > xen/include/public/domctl.h| 7 +-- > xen/include/xen/domain.h | 2 ++ > 20 files changed, 97 insertions(+), 31 deletions(-) > > > base-commit: 9659b2a6d73b14620e187f9c626a09323853c459 > -- > 2.42.0 > Acked-by: Christian Lindig The changes for the OCaml part are incremental; is someone using the OCaml bindings on ARM seriously? — C

Re: [PATCH] tools/ocaml/Makefile.rules: use correct C flags when compiling OCaml C stubs

2023-10-25 Thread Christian Lindig
t; and append the Xen specific CFLAGS to that instead. > > Drop the explicit -fPIC and -I$(ocamlc -where): these will now be provided by > the compiler as needed. > > Use -verbose so we see the actuall full C compiler command line invocation > done by the OCaml compiler. > > S

Re: [PATCH] tools/oxenstored: Additional debugging commands

2023-08-24 Thread Christian Lindig
Acked-by: Christian Lindig > On 24 Aug 2023, at 13:39, Andrew Cooper wrote: > > From: Edwin Török > > These were added to aid security development, and are useful generally for > debugging. > > Signed-off-by: Edwin Török > Signed-off-by: Andrew Cooper > --

Re: [PATCH] xenctrl_stubs.c: fix NULL dereference

2023-07-13 Thread Christian Lindig
g = 1; /* tag x86 */ > > - arch_obj = Tag_cons; > + arch_obj = Val_emptylist; > > #endif > > -- > 2.41.0 > Acked-by: Christian Lindig

Re: [PATCH] tools/ocaml/xc: Fix xc_physinfo() bindings

2023-06-09 Thread Christian Lindig
> On 9 Jun 2023, at 10:37, Andrew Cooper wrote: > > On 09/06/2023 9:17 am, Christian Lindig wrote: >>> On 8 Jun 2023, at 20:33, Andrew Cooper wrote: >>> >>> +type arm_physinfo_caps = >>> + { >>> +sve_vl: int; >>> + } >&

Re: [PATCH] tools/ocaml/xc: Fix xc_physinfo() bindings

2023-06-09 Thread Christian Lindig
> On 8 Jun 2023, at 20:33, Andrew Cooper wrote: > > +type arm_physinfo_caps = > + { > +sve_vl: int; > + } > + Does the OCaml side need to know about the structure of this value or is it enough to pass it around as an abstract value because all logic is on the C side? I assume the OCa

Re: [PATCH v3 1/3] tools: Modify single-domid callers of xc_domain_getinfolist()

2023-05-02 Thread Christian Lindig
better off calling > xc_domain_getinfo_single() instead, that will use the getdomaininfo domctl > instead and ensure the returned domid matches the requested one. The domtctl > will find the domid faster too, because that uses hashed lists. > > Signed-off-by: Alejandro Vallejo Acked-by: Christian

Re: [PATCH] tools/ocaml/mmap: Drop the len parameter from Xenmmap.write

2023-03-29 Thread Christian Lindig
t; Ocaml -safe-string constness bug in the same way as we've done elsewhere in > Xen. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Török > CC: Rob Hoes > --- > tools/ocaml/libs/mmap/xenmmap.ml | 4 ++-- >

Re: [PATCH v3 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-22 Thread Christian Lindig
h I read as #ifdef in my head. Acked-by: Christian Lindig — C

Re: [PATCH v3 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-20 Thread Christian Lindig
> On 17 Mar 2023, at 13:19, Luca Fancellu wrote: > > > arch_cap_flags = caml_alloc_small(1, arch_cap_flags_tag); > Store_field(arch_cap_flags, 0, arch_cap_list); > Store_field(physinfo, 10, arch_cap_flags); > +#elif defined(__aarch64__) > + Store_field(physinfo, 10, Val_

Re: [PATCH v2 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-15 Thread Christian Lindig
Acked-by: Christian Lindig > On 15 Mar 2023, at 09:05, Luca Fancellu wrote: > > type arch_physinfo_cap_flags = > - | ARM of arm_physinfo_cap_flag list > + | ARM of int > | X86 of x86_physinfo_cap_flag list > I notice that other capabilities are split into a list

Re: [PATCH 3/3] x86/sysctl: Retrofit XEN_SYSCTL_cpu_featureset_{pv,hvm}_max

2023-03-13 Thread Christian Lindig
oo in secret leading up to an embargo, so extend the featureset > sysctl to allow xen-cpuid to render them all nicely. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > CC: Christian Lindig > CC: David Scott > CC: Ed

Re: [PATCH v3 0/4] tools: use xen-tools/libs.h for common definitions

2023-03-06 Thread Christian Lindig
t; > Juergen Gross (4): > tools: rename xen-tools/libs.h file to common-macros.h > tools: add container_of() macro to xen-tools/common-macros.h > tools: get rid of additional min() and max() definitions > tools: add offsetof() to xen-tools/common-macros.h Acked-by: Christian Lindig

Re: [PATCH v2 0/4] tools: use xen-tools/libs.h for common definitions

2023-02-28 Thread Christian Lindig
| 2 +- > 46 files changed, 68 insertions(+), 105 deletions(-) > rename tools/include/xen-tools/{libs.h => common-macros.h} (74%) > > -- > 2.35.3 > Acked-by: Christian Lindig

Re: [PATCH] tools/ocaml: Drop libxl bindings

2023-02-09 Thread Christian Lindig
/github.com/xapi-project/xen-api/commit/203292ebe0c487d7ae4adb961a6d080f4fbe933d >> >> owing to there having been no development of these bindings since 2014. >> >> In the unlikely event that we'd want to reinstate them, they'd need reworking >> basically from scratch anyway. >>

Re: [PATCH] tools/ocaml: Drop libxl bindings

2023-02-09 Thread Christian Lindig
ing to there having been no development of these bindings since 2014. > > In the unlikely event that we'd want to reinstate them, they'd need reworking > basically from scratch anyway. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott

Re: [PATCH 0/4] Stop using insecure transports

2023-02-08 Thread Christian Lindig
Build system: Replace git:// and http:// with https:// > Automation and CI: Replace git:// and http:// with https:// > Miscellaneous and documentation: Only use TLS-protected transports > GPL License Boilerplate: Switch from HTTP to HTTPS Acked-by: Christian Lindig

Re: [PATCH] tools/ocaml/libs: Fix memory/resource leaks with caml_alloc_custom()

2023-02-01 Thread Christian Lindig
45 ("tools/ocaml/xenctrl: OCaml 5 support, fix > use-after-free") > Fixes: 22d5affdf0ce ("tools/ocaml/evtchn: OCaml 5 support, fix potential > resource leak") > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott >

Re: [PATCH 0/7] tools/ocaml: Memory corruption fixes in bindings

2023-02-01 Thread Christian Lindig
map_stubs.c | 6 +- > tools/ocaml/libs/xb/xenbus_stubs.c| 5 +- > tools/ocaml/libs/xc/xenctrl_stubs.c | 494 ++ > 5 files changed, 323 insertions(+), 273 deletions(-) > > -- > 2.11.0 > Really pleased with the attention to this. Acked-by: Christian Lindig

Re: [PATCH 2/6] tools: Introduce a non-truncating xc_xenver_extraversion()

2023-01-18 Thread Christian Lindig
ON > > Signed-off-by: Andrew Cooper > --- > CC: Wei Liu > CC: Anthony PERARD > CC: Juergen Gross > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes Acked-by: Christian Lindig > > Note: There is a marginal risk for a memory leak in

Re: [PATCH 4/6] tools: Introduce a non-truncating xc_xenver_changeset()

2023-01-18 Thread Christian Lindig
> On 17 Jan 2023, at 13:53, Andrew Cooper wrote: > > Update libxl and the ocaml stubs to match. No API/ABI change in either. > > Signed-off-by: Andrew Cooper Acked-by: Christian Lindig > --- > CC: Wei Liu > CC: Anthony PERARD > CC: Juergen Gross > CC:

Re: [PATCH 3/6] tools: Introduce a non-truncating xc_xenver_capabilities()

2023-01-18 Thread Christian Lindig
> On 17 Jan 2023, at 13:53, Andrew Cooper wrote: > > Update libxl and the ocaml stubs to match. No API/ABI change in either. > > Signed-off-by: Andrew Cooper > --- > CC: Wei Liu > CC: Anthony PERARD > CC: Juergen Gross > CC: Christian Lindig > CC: Dav

Re: [PATCH 0/6] tools: Switch to non-truncating XENVER_* ops

2023-01-18 Thread Christian Lindig
ibs/light/libxl.c| 61 +-- > tools/ocaml/libs/xc/xenctrl_stubs.c | 45 +--- > 7 files changed, 250 insertions(+), 146 deletions(-) > create mode 100644 tools/libs/ctrl/xc_version.c > > -- > 2.11.0 > Acked-by: Christian Lindig

Re: [PATCH v4 00/11] OCaml fixes

2022-12-19 Thread Christian Lindig
/ocaml/libs/xb: drop Xs_ring.write I’m going to Ack this whole sale and provide individual comments. Acked-by: Christian Lindig

Re: [PATCH v4 05/11] CODING-STYLE(tools/ocaml): add .editorconfig to clarify indentation uses spaces

2022-12-19 Thread Christian Lindig
added lines would follow the convention. > > No functional change. > > Signed-off-by: Edwin Török > Cc: Christian Lindig Acked-by: Christian Lindig I am agnostic about this change. Automatic code formatting should take care of this but I see no harm including this file. The nu

Re: [PATCH v4 03/11] CODING_STYLE(tools/ocaml): add 'make format' and remove tabs

2022-12-19 Thread Christian Lindig
s more > difficult (OCaml indentation tools usually only support spaces, not tabs). > > No functional change. > > Signed-off-by: Edwin Török Acked-by: Christian Lindig I am in favour of automating the code formatting, and moving to OCamlformat in particular. The main drawback i

Re: [PATCH v4 10/11] tools/ocaml/xenstored: validate config file before live update

2022-12-19 Thread Christian Lindig
> On 16 Dec 2022, at 18:25, Edwin Török wrote: > > The configuration file can contain typos or various errors that could prevent > live update from succeeding (e.g. a flag only valid on a different version). > Unknown entries in the config file would be ignored on startup normally, > add a stri

Re: [PATCH v2 2/4] tools/ocaml/libs/xc: add binding to xc_evtchn_status

2022-12-02 Thread Christian Lindig
provided here is similar to 'lsevtchn', but rather than > parsing its output it queries the underlying API directly. > > Signed-off-by: Edwin Török Acked-by: Christian Lindig > --- > Changes since v1: > * drop paragraph about where this is used > * add comment about

Re: [PATCH v2 3/4] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-02 Thread Christian Lindig
ions, however in the cases where the > MSB is set it is very likely that the value is an address and no > arithmetic should be performed on the OCaml side on it. > (this is not a new problem with this binding, but worth mentioning given > the difference in types) > > Signed-off-by: Edwin Török Acked-by: Christian Lindig

Re: [PATCH] tools/oxenstored: Render backtraces more nicely in Syslog

2022-12-02 Thread Christian Lindig
Fixes: ee7815f49faf ("tools/oxenstored: Set uncaught exception handler") > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes Acked-by: Christian Lindig > --- > tools/ocaml/xen

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-01 Thread Christian Lindig
> On 1 Dec 2022, at 14:16, Edwin Torok wrote: > > The disadvantage is that we can't pattern match on it anymore. > > Although we could have some OCaml code that does the pattern matching on > another type and maps it to these private integer types. > However at that point we've manually reinv

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-01 Thread Christian Lindig
> On 1 Dec 2022, at 13:50, Edwin Torok wrote: > > Should we instead switch to using ctypes to generate these constants? I would not advocate this. Ctypes is the kind of meta programming that is great when it works but hell if it does not and it adds more dependencies. I just had a discussio

Re: [PATCH v2 4/6] tools/oxenstored: Implement Domain.rebind_evtchn

2022-12-01 Thread Christian Lindig
> On 1 Dec 2022, at 12:10, Andrew Cooper wrote: > > I can keep the being/end if you'd prefer. > > Looking at the end result, it would actually shrink the patch, so is > probably worth doing anyway for clarity. The net result is: I think keeping the begin/end is a good idea - as it keeps the

Re: [PATCH v2 5/6] tools/oxenstored: Rework Domain evtchn handling to use port_pair

2022-12-01 Thread Christian Lindig
e. Once the evtchn has > been unbound, the same local port number can be reused for a different > purpose, so explicitly invalidate the ports to prevent their accidental misuse > in the future. > > This also cleans up some of the debugging, to always print a port pair. > > Si

Re: [PATCH v2 2/6] tools/oxenstored: Bind the DOM_EXC VIRQ in in Event.init()

2022-12-01 Thread Christian Lindig
gt; It will also simplify a future change to restore both parts from the live > update record, rather than re-initialising them from scratch. > > Rename the field from virq_port (which could be any VIRQ) to it's proper name. > > Signed-off-by: Andrew Cooper > --- > CC: C

Re: [PATCH v2 3/6] tools/oxenstored: Rename some 'port' variables to 'remote_port'

2022-12-01 Thread Christian Lindig
> Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes Acked-by: Christian Lindig > > v2: > * New. > --- > tools/ocaml/xenstored/domains.ml | 26 -- > tools/ocaml/xens

Re: [PATCH v2 4/6] tools/oxenstored: Implement Domain.rebind_evtchn

2022-12-01 Thread Christian Lindig
> around at the domain object's internal state. > > We need to refactor the evtchn handling to support live update, so start by > moving the relevant manipulation into Domain. > > No practical change. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindi

Re: [PATCH v2 1/6] tools/oxenstored: Style fixes to Domain

2022-12-01 Thread Christian Lindig
> On 30 Nov 2022, at 16:54, Andrew Cooper wrote: > > This file has some style problems so severe that they interfere with the > readability of the subsequent bugfix patches. > > Fix these issues ahead of time, to make the subsequent changes more readable. Acked-by: Christian Lindig

Re: [PATCH v1 5/5] CODING_STYLE: add .clang-format

2022-12-01 Thread Christian Lindig
.clang-format | 9 + > 1 file changed, 9 insertions(+) > create mode 100644 tools/ocaml/.clang-format Acked-by: Christian Lindig I support this kind of automation. I also agree with the previous comment that the title should indicate that this is only going into a subtree. — C

Re: [PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-24 Thread Christian Lindig
rl with bindings that are not (yet) present in Xen. >> What do you think? > > Many of these problems will disappear with a stable tools interface. > But yes, in the short term, xcext opening its own handle would > definitely improve things by keeping the two sets of bindings s

Re: [PATCH 5/8] tools/oxenstored: Keep /dev/xen/evtchn open across live update

2022-11-23 Thread Christian Lindig
> and use the provided local ports rather than trying to rebind them. > > When this new information isn't present (i.e. live updating from an oxenstored > prior to this change), the best-effort status quo will have to do. > > Signed-off-by: Edwin Török > Signed-off-by: An

Re: [PATCH 1/3] CHANGELOG: Update link for RELEASE-4.16.0

2022-11-11 Thread Christian Lindig
> On 11 Nov 2022, at 11:22, Henry Wang wrote: > > Signed-off-by: Henry Wang > --- > CHANGELOG.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Christian Lindig Hi Henry, The changes don’t seem to be specific to the OCaml tools/ part that I care about

Re: [[PATCH for-4.17 v1]] tools/ocaml/xenstored/xenstored.ml: fix incorrect scope

2022-11-11 Thread Christian Lindig
Edwin Török > --- > Reason for inclusion in 4.17: > - bugfix for commit already in master Acked-by: Christian Lindig

Re: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add 'make format' and remove tabs

2022-11-10 Thread Christian Lindig
> On 10 Nov 2022, at 09:25, Henry Wang wrote: > > Hi Christian, > >> -Original Message- >> From: Christian Lindig >> Subject: Re: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add >> 'make format' and remove tabs >>>> W

Re: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add 'make format' and remove tabs

2022-11-10 Thread Christian Lindig
> On 9 Nov 2022, at 02:40, Henry Wang wrote: > >> >> -Original Message- >> From: Julien Grall >> Subject: Re: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add >> 'make format' and remove tabs >> While I understand the goal and support, this seems to be a bit too late >> to do

Re: [PATCH for-4.17 v3 14/15] tools/ocaml/xenstored/syslog_stubs.c: avoid potential NULL dereference

2022-11-09 Thread Christian Lindig
2 deletions(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 v3 13/15] tools/ocaml/xenstored: set uncaught exception handler

2022-11-09 Thread Christian Lindig
eved due to an OOM exception). > > Signed-off-by: Edwin Török > --- > Reason for inclusion in 4.17: > - avoids losing crucial information during a fatal error (e.g. during > live update) Acked-by: Christian Lindig > +let print_flush msg = > + prerr_endline msg; &

Re: [PATCH for-4.17 v3 12/15] tools/ocaml/xenstored: log live update issues at warning level

2022-11-09 Thread Christian Lindig
to:edvin.to...@citrix.com>> --- Reason for inclusion in 4.17: - makes live update issues debuggable (live update can be used to apply security updates to 4.17) Changes since v2: - new in v3 --- tools/ocaml/xenstored/xenstored.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Ac

Re: [PATCH for-4.17 v3 10/15] tools/ocaml/xenstored: keep eventchn FD open across live update

2022-11-09 Thread Christian Lindig
.ml | 1 + > tools/ocaml/xenstored/event.ml | 7 ++- > tools/ocaml/xenstored/xenstored.ml | 71 +++++----- > 3 files changed, 56 insertions(+), 23 deletions(-) Acked-by: Christian Lindig > +let require_doms () = > + match !doms with > +

Re: [PATCH for-4.17 v3 09/15] tools/ocaml/xenstored/store.ml: fix build error

2022-11-09 Thread Christian Lindig
lusion in 4.17: - fixes a build error in a previous commit that is already in master Changes since v2: - new in v3 --- tools/ocaml/xenstored/store.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 v3 08/15] tools/ocaml/libs/evtchn: add xenevtchn_fdopen bindings

2022-11-09 Thread Christian Lindig
neventchn.ml | 6 +++- tools/ocaml/libs/eventchn/xeneventchn.mli | 9 +- tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 28 +-- 3 files changed, 38 insertions(+), 5 deletions(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 v3 06/15] tools/ocaml/Makefile.rules: hide -include on *clean

2022-11-09 Thread Christian Lindig
comments received post commit Changes since v2: - add Fixes line - add 4.17 reason --- tools/ocaml/Makefile.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 v3 05/15] tools/ocaml/Makefile.rules: do not run ocamldep on distclean

2022-11-09 Thread Christian Lindig
comments received post commit Changes since v2: - add Fixes line - add 4.17 reason --- tools/ocaml/Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 v3 04/15] tools/ocaml/xenstored/Makefile: use ocamldep -sort for linking order

2022-11-09 Thread Christian Lindig
v2: - new in v3 (was previously emailed to security team though) --- tools/ocaml/xenstored/Makefile | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [[PATCH for-4.17 v1]] tools/ocaml/xenstored/store.ml: fix build error

2022-11-04 Thread Christian Lindig
e changed, 1 insertion(+), 1 deletion(-) Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 v1 0/2] xenctrl.ml: improve scalability of domain_getinfolist

2022-11-02 Thread Christian Lindig
insertions(+), 7 deletions(-) Acked-by: Christian Lindig > It was calling the Xen domainfolist hypercall N/2 times. > Optimize this such that it is called at most 2 times during normal use. > > Implement a tail recursive `rev_concat` equivalent to `concat |> rev`, > and use i

Re: [PATCH for-4.17] tools/ocaml/xenstored: fix live update exception

2022-10-21 Thread Christian Lindig
then > + Store.mkdir store > Perms.Connection.full_rights tool_path; > Store.write store Perms.Connection.full_rights > (Store.Path.of_string "/tool/xenstored") Sys.executable_name; I notice inconsistent indentation but let's ignore that or fix it before the committing. Acked-by: Christian Lindig

Re: [PATCH for-4.17] tools/oxenstored: Fix Oxenstored Live Update

2022-10-21 Thread Christian Lindig
ilable from git: https://github.com/edwintorok/xen/commit/12d90632bf881e96e0b6c256df193f00df187dc1 With both of these patches a smoketest 'xenstore-control live-update' with a stopped toolstack works now. Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17] tools/oxenstored: Fix Oxenstored Live Update

2022-10-20 Thread Christian Lindig
ave been part of what got comitted. Fixes: 00c48f57ab36 ("tools/oxenstored: Start live update process") Signed-off-by: Andrew Cooper mailto:andrew.coop...@citrix.com>> Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [XEN PATCH for-4.17 v5 00/17] Toolstack build system improvement, toward non-recursive makefiles

2022-10-14 Thread Christian Lindig
h linking with in-tree xen libraries - Add -Werror to CFLAGS for all builds in tools/ Changes in v2: - one new patch - other changes described in patch notes Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH for-4.17 0/2] Ocaml stub fixes

2022-10-13 Thread Christian Lindig
This is a good use of the OCaml type system to ensure only compatible flags are shared in a list and not mixed between architectures. The macro changes are good housekeeping. — C Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>> On 12 Oct 2022, at 19:25, Andrew

Re: [PATCH v2 4/5] tools/ocaml/libs/xc: OCaml 5.0 compatibility

2022-09-30 Thread Christian Lindig
> On 27 Sep 2022, at 17:13, Edwin Torok wrote: > > > See below for a patch for that. I've included this patch in the correct place > (before the patch that breaks it) in the git repository at: > https://github.com/edwintorok/xen/compare/private/edvint/public0 >

Re: [XEN PATCH v4 00/32] Toolstack build system improvement, toward non-recursive makefiles

2022-08-12 Thread Christian Lindig
/light: Makefile cleanup tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH v1 3/7] tools/ocaml/*/dune: dune based build system

2022-08-03 Thread Christian Lindig
On 3 Aug 2022, at 12:25, Anthony PERARD mailto:anthony.per...@citrix.com>> wrote: On Fri, Jul 29, 2022 at 06:53:26PM +0100, Edwin Török wrote: Based on Christian Lindig's work. Should we have is "Signed-off-by" tag then? Also he might be the author of the patch, isn't it? This only refers to

Re: [PATCH v1 5/7] tools/ocaml: fix compiler warnings

2022-08-03 Thread Christian Lindig
On 3 Aug 2022, at 11:39, Andrew Cooper mailto:andrew.coop...@citrix.com>> wrote: There are no side effects here. Can't the line simply be deleted? Yes. The compiler tells us about unused bindings like these and this is the easy way to acknowledge this without removing the code but it could b

Re: [PATCH v1 0/7] tools/ocaml code and build cleanups

2022-08-01 Thread Christian Lindig
ools/ocaml/libs/xb/dune create mode 100644 tools/ocaml/libs/xc/dune create mode 100644 tools/ocaml/libs/xs/dune create mode 100644 tools/ocaml/libs/xs/paths.ml.in create mode 100644 tools/ocaml/xenstored/dune create mode 100644 tools/ocaml/xenstored/paths.ml.in Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH v11 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86

2022-07-08 Thread Christian Lindig
On 8 Jul 2022, at 14:55, Jane Malalane mailto:jane.malal...@citrix.com>> wrote: tools/ocaml/libs/xc/xenctrl.ml | 9 + tools/ocaml/libs/xc/xenctrl.mli | 8 tools/ocaml/libs/xc/xenctrl_stubs.c | 18 — Acked-by: Christian Lindig mailto:christi

Re: [PATCH RESEND v10 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86

2022-06-29 Thread Christian Lindig
On 29 Jun 2022, at 14:55, Jane Malalane mailto:jane.malal...@citrix.com>> wrote: + physinfo = caml_alloc_tuple(11); Store_field(physinfo, 0, Val_int(c_physinfo.threads_per_core)); Store_field(physinfo, 1, Val_int(c_physinfo.cores_per_socket)); Store_field(physinfo, 2, Val_int(c_physinfo.nr_cpus

Re: [XEN PATCH v3 00/25] Toolstack build system improvement, toward non-recursive makefiles

2022-06-27 Thread Christian Lindig
S for all builds in tools/ Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>>

Re: [PATCH 2/2] tools/ocaml: Fix stubs the introduction of domain_create.cpupool_id

2022-05-18 Thread Christian Lindig
Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>> On 17 May 2022, at 20:41, Andrew Cooper mailto:andrew.coop...@citrix.com>> wrote: Sadly, cpupool IDs are chosen by the caller, not assigned sequentially, so this does need to have a full 32 bits of range.

Re: [PATCH v10 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-04-29 Thread Christian Lindig
rl.mli | 2 ++ tools/ocaml/libs/xc/xenctrl_stubs.c | 2 +- Acked-by: Christian Lindig mailto:christian.lin...@citrix.com>> The changes here are minimal - I had ack’ed an earlier iteration. — Christian

Re: [XEN PATCH v2 29/29] tools/ocaml: fix build dependency target

2022-02-25 Thread Christian Lindig
| 8 > tools/ocaml/libs/xs/Makefile | 8 > tools/ocaml/Makefile.rules | 2 +- Acked-by: Christian Lindig I am fine with this but in general think that the OCaml part should be built using Dune (but invoked from Make), which is now the standard tool to build OC

Re: [PATCH v2 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-02-08 Thread Christian Lindig
arch/x86/hvm/vmx/vmcs.c | 4 > xen/arch/x86/hvm/vmx/vmx.c| 14 +- > xen/arch/x86/include/asm/hvm/domain.h | 6 ++ > xen/arch/x86/traps.c | 8 > xen/include/public/arch-x86/xen.h | 2 ++ > 21 files changed, 173 insertions(+),

  1   2   3   >