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

2024-09-09 Thread Edwin Torok
On Fri, Sep 6, 2024 at 3:55 PM Andrew Cooper wrote: > > The root .gitignore is quite stale from recent (and less recent) removals, but > also fails to work for the forthcoming dynamic plugin work. > > Strip all Ocaml content out of the root .gitignore, and provide a more local > .gitignore's with

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

2024-09-02 Thread Edwin Torok
On Mon, Sep 2, 2024 at 5:38 PM Andrew Cooper wrote: > > On 02/09/2024 9:10 am, Edwin Torok wrote: > > On Fri, Aug 30, 2024 at 6:53 PM Andrew Cooper > > wrote: > >> We should be doing this unilaterally. > > Agreed, but we should do it safely, since last time I d

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

2024-09-02 Thread Edwin Torok
[gmail is a bit terrible and defaults to reply to single person not reply all, resent] There is one bug here that would cause a crash, and several instances of undefined behaviour. On Mon, Sep 2, 2024 at 9:10 AM Edwin Torok wrote: > > On Fri, Aug 30, 2024 at 6:53 PM Andrew Cooper &

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

2024-08-28 Thread Edwin Torok
On Wed, Aug 28, 2024 at 3:20 PM Andrew Cooper wrote: > > On 28/08/2024 3:15 pm, Edwin Torok wrote: > > On Wed, Aug 28, 2024 at 2:30 PM Andrew Cooper > > wrote: > >> ... rather than having each library implement its own subset. > >> > >> Signed-off-b

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

2024-08-28 Thread Edwin Torok
On Wed, Aug 28, 2024 at 3:15 PM Edwin Torok wrote: > > On Wed, Aug 28, 2024 at 2:30 PM Andrew Cooper > wrote: > > > > ... rather than having each library implement its own subset. > > > > Signed-off-by: Andrew Cooper > > --- > > CC: Christian Lin

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

2024-08-28 Thread Edwin Torok
On Wed, Aug 28, 2024 at 2:30 PM 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 > > Broken out of a larger series, to

Re: [PATCH v1 2/4] ocaml/libs: Implement a dynamically-loaded plugin for Xenctrl.domain_getinfo

2024-08-27 Thread Edwin Torok
On Fri, Aug 23, 2024 at 6:19 PM Andrew Cooper wrote: > > On 22/08/2024 10:06 am, Andrii Sultanov wrote: > > This plugin intends to hide the unstable Xenctrl interface under a > > stable one. In case of the change in the interface, a V2 of this plugin > > would need to be produced, but V1 with the

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

2024-08-23 Thread Edwin Torok
The Makefile changes look fine to me as well. Reviewed-by: Edwin Török On Fri, Aug 23, 2024 at 11:53 AM Christian Lindig wrote: > > > > > On 23 Aug 2024, at 11:51, Andrew Cooper wrote: > > > > Various extra build bugfixes found while reviewing the `Stabilize > > Oxenstored's > > interface wit

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

2024-08-22 Thread Edwin Torok
On Thu, Aug 22, 2024 at 1:25 PM Andrew Cooper wrote: > > On 22/08/2024 10:06 am, Andrii Sultanov wrote: > > This flag does not work as assumed and will not pass > > options (such as -shared) to the C compiler: > > https://github.com/ocaml/ocaml/issues/12284 > > > > Signed-off-by: Andrii Sultanov

Re: [PATCH] tools/oxenstored: Re-format

2024-03-27 Thread Edwin Torok
On Mon, Feb 26, 2024 at 10:48 AM Andrew Cooper wrote: > > Rerun make format. Looks good, although not sure whether whitespace will be correctly preserved in email, recommend using git to push the changes. Reviewed-by: Edwin Török > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig >

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

2024-02-23 Thread Edwin Torok
> On 31 Jan 2024, at 16:27, Edwin Torok wrote: > > > >> On 31 Jan 2024, at 11:17, Christian Lindig >> wrote: >> >> >> >>> On 31 Jan 2024, at 10:52, Edwin Török wrote: >>> >>> Now that we no longer have a hashtable in

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

2024-02-01 Thread Edwin Torok
> On 31 Jan 2024, at 10:55, Andrew Cooper wrote: > > On 31/01/2024 10:44 am, Christian Lindig wrote: >>> On 31 Jan 2024, at 10:42, Edwin Török wrote: >>> >>> Fix building oxenstored with OCaml 5.x. >>> OCaml 5.x has removed some functions that have been deprecated for many >>> years, >>> in

Re: [PATCH v1 2/2] tools/ocaml: bump minimum version to OCaml 4.05

2024-01-31 Thread Edwin Torok
> On 31 Jan 2024, at 17:17, Andrew Cooper wrote: > > On 31/01/2024 4:36 pm, Anthony PERARD wrote: >> On Wed, Jan 31, 2024 at 10:42:49AM +, Edwin Török wrote: >>> We tried bumping to 4.06.1 [1] previously, but OSSTest was holding us >>> back. >>> So bump to OCaml 4.05 instead, which should m

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

2024-01-31 Thread Edwin Torok
> On 31 Jan 2024, at 11:17, Christian Lindig wrote: > > > >> 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 fu

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

2023-11-22 Thread Edwin Torok
> On 22 Nov 2023, at 10:06, Andrew Cooper wrote: > > On 22/11/2023 7:21 am, Juergen Gross wrote: >> diff --git a/CHANGELOG.md b/CHANGELOG.md >> index c341c9d0bf..bbb3cd5beb 100644 >> --- a/CHANGELOG.md >> +++ b/CHANGELOG.md >> @@ -14,6 +14,8 @@ The format is based on [Keep a >> Changelog](htt

Re: [PATCH 4/5] tools/xenstored: remove "-N" command line option

2023-11-15 Thread Edwin Torok
> On 14 Nov 2023, at 22:11, Andrew Cooper wrote: > > On 13/11/2023 12:43 pm, Juergen Gross wrote: >> The "-N" (do not daemonize) command line option is of questionable use: >> its sole purpose seems to be to aid debugging of xenstored by making it >> easier to start xenstored under gdb, or to

Re: [RFC PATCH 02/22] x86/msr: implement MSR_SMI_COUNT for Dom0 on Intel

2023-11-01 Thread Edwin Torok
> On 31 Oct 2023, at 09:57, Jan Beulich wrote: > > On 31.10.2023 10:42, Edwin Torok wrote: >>> On 30 Oct 2023, at 16:20, Jan Beulich wrote: >>> On 25.10.2023 21:29, Edwin Török wrote: >>>> Dom0 should always be able to read this MSR: it is useful when &

Re: [RFC PATCH 04/22] x86/msr-index: add references to vendor manuals

2023-10-31 Thread Edwin Torok
> On 31 Oct 2023, at 11:34, Andrew Cooper wrote: > > On 30/10/2023 4:15 pm, Jan Beulich wrote: >> >>> --- a/xen/arch/x86/include/asm/msr-index.h >>> +++ b/xen/arch/x86/include/asm/msr-index.h >>> @@ -13,6 +13,16 @@ >>> * Blocks of related constants should be sorted by MSR index. The constant

Re: [RFC PATCH 02/22] x86/msr: implement MSR_SMI_COUNT for Dom0 on Intel

2023-10-31 Thread Edwin Torok
> On 30 Oct 2023, at 16:20, Jan Beulich wrote: > > On 25.10.2023 21:29, Edwin Török wrote: >> Dom0 should always be able to read this MSR: it is useful when >> investigating performance issues in production. > > While I'm not outright opposed, I'm also not convinced. At the very least > ... >

Re: [RFC PATCH 03/22] x86/msr: always allow a pinned Dom0 to read any unknown MSR

2023-10-31 Thread Edwin Torok
> On 30 Oct 2023, at 16:29, Jan Beulich wrote: > > On 25.10.2023 21:29, Edwin Török wrote: >> This can be useful if you realize you have to inspect the value of an >> MSR in production, without having to change into a new Xen first that >> handles the MSR. > > Yet on a non-pinned Dom0 you'd s

Re: [PATCH] xenstored: do not redirect stderr to /dev/null

2023-10-30 Thread Edwin Torok
> On 25 Oct 2023, at 14:50, Edwin Török wrote: > > From: Edwin Török > > By default stderr gets redirected to /dev/null because oxenstored daemonizes > itself. > This must be a left-over from pre-systemd days. > > In ee7815f49f ("tools/oxenstored: Set uncaught exception handler") a > work

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

2023-10-26 Thread Edwin Torok
> On 25 Oct 2023, at 15:02, Christian Lindig wrote: > > > >> On 25 Oct 2023, at 14:52, Edwin Török wrote: >> >> From: Edwin Török >> >> The code currently uses GCC to compile OCaml C stubs directly, >> and although in most cases this works, it is not entirely correct. >> >> This will fa

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

2023-10-26 Thread Edwin Torok
> On 25 Oct 2023, at 15:04, Jan Beulich wrote: > > On 25.10.2023 15:52, Edwin Török wrote: >> --- a/tools/ocaml/Makefile.rules >> +++ b/tools/ocaml/Makefile.rules >> @@ -37,7 +37,7 @@ ALL_OCAML_OBJS ?= $(OBJS) >> $(call quiet-command, $(OCAMLYACC) -q $<,MLYACC,$@) >> >> %.o: %.c >> - $(call q

Re: [RFC PATCH 01/22] x86/msr: MSR_PLATFORM_INFO shouldn't claim that turbo is programmable

2023-10-26 Thread Edwin Torok
> On 25 Oct 2023, at 21:33, Andrew Cooper wrote: > > On 25/10/2023 8:29 pm, Edwin Török wrote: >> From: Edwin Török >> >> Xen forbids writes to the various turbo control MSRs, however >> MSR_PLATFORM_INFO claims that these MSRs are writable. >> Override MSR_PLATFORM_INFO bits to indicate la

Re: [RFC PATCH 22/22] x86/AMD: add IRPerf support

2023-10-26 Thread Edwin Torok
> On 25 Oct 2023, at 21:59, Andrew Cooper wrote: > > On 25/10/2023 8:29 pm, Edwin Török wrote: >> diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c >> index 483b5e4f70..b3cd851d9d 100644 >> --- a/xen/arch/x86/msr.c >> +++ b/xen/arch/x86/msr.c >> @@ -584,6 +584,13 @@ int guest_wrmsr(struct v

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

2023-10-25 Thread Edwin Torok
On Wed, Oct 25, 2023 at 2:58 PM Edwin Török wrote: > [...] > Signed-off-by: Edwin Török Sorry about the duplicate emails to the list, my 'git send-email' isn't working quite right.

xen summit 2023 design session: Using only stable interfaces for (o)xenstored

2023-06-27 Thread Edwin Torok
topic: we should also fix xcp-rrdd so it doesn't shell out to xenpm every 5s to collect statistics... Andrew Cooper: should be possible to use libxenctrl directly for that Edwin Torok: there are other interfacs that would need to be stabilized (see xenopsd), but lets start small and fix ju

xen summit 2023 design session: distributed tracing

2023-06-25 Thread Edwin Torok
design session: distributed tracing Marcusg: proof of concept * where to start, simplest parts * how to attempt to collect the context (unique/random id),begin/end events * e.g. domain create George: pass in id to hypervisor Andy: maybe userspace first, libraries/xenguest more difficult in calls

Re: [PATCH v1 1/2] xc_core_arch_map_p2m_tree_rw: fix memory leak

2023-02-27 Thread Edwin Torok
> On 24 Feb 2023, at 14:56, Andrew Cooper wrote: > > On 24/02/2023 1:36 pm, Edwin Török wrote: >> From: Edwin Török >> >> Prior to bd7a29c3d0 'out' would've always been executed and memory >> freed, but that commit changed it such that it returns early and leaks. >> >> Found using gcc 12.2.

Re: [PATCH] docs: clarify xenstore permission documentation

2023-02-09 Thread Edwin Torok
> On 9 Feb 2023, at 15:15, Andrew Cooper wrote: > > On 09/02/2023 2:41 pm, Juergen Gross wrote: >> In docs/misc/xenstore.txt the description of the Xenstore node access >> permissions is missing one important aspect, which can be found only >> in the code or in the wiki [1]: >> >> The first p

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

2022-12-19 Thread Edwin Torok
> On 19 Dec 2022, at 11:52, Anthony PERARD wrote: > > On Fri, Dec 16, 2022 at 06:25:12PM +, Edwin Török wrote: >> + git ls-files '*.c' '*.h' | xargs -n1 sed -ie 's/\t//g' > > Seen as there's a patch adding .clang-format, what the point of this > command? The diff to change tabs to sp

Re: [PATCH v4 06/11] tools/ocaml: add .clang-format

2022-12-19 Thread Edwin Torok
> On 19 Dec 2022, at 12:03, Anthony PERARD wrote: > > On Fri, Dec 16, 2022 at 06:25:15PM +, Edwin Török wrote: >> Add a .clang-format configuration that tries to match CODING_STYLE where >> possible. > > Is there going to be a patch applying this to "tools/ocaml", like you > did with "mak

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

2022-12-19 Thread Edwin Torok
> On 19 Dec 2022, at 09:37, Christian Lindig > wrote: > > > >> 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 entrie

Re: [PATCH v4 01/11] tools/ocaml/libs/{xb, mmap}: use Data_abstract_val wrapper

2022-12-19 Thread Edwin Torok
> On 16 Dec 2022, at 22:40, Andrew Cooper wrote: > > On 16/12/2022 6:25 pm, Edwin Török wrote: >> diff --git a/tools/ocaml/libs/mmap/mmap_stubs.h >> b/tools/ocaml/libs/mmap/mmap_stubs.h >> index 65e4239890..66f18d4406 100644 >> --- a/tools/ocaml/libs/mmap/mmap_stubs.h >> +++ b/tools/ocaml/lib

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

2022-12-02 Thread Edwin Torok
ing to support live update, so start by >>> moving the relevant manipulation into Domain. >>> >>> No practical change. >>> >>> Signed-off-by: Andrew Cooper >>> --- >>> CC: Christian Lindig >>> CC: David Scott >>&

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

2022-12-01 Thread Edwin Torok
gt; 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

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

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 14:22, Christian Lindig wrote: > > > >> 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 patt

Re: [PATCH v1 2/5] tools/ocaml/libs/xc: add binding to xc_evtchn_status

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 13:59, Andrew Cooper wrote: > > On 01/12/2022 13:35, Edwin Torok wrote: >>> On 1 Dec 2022, at 11:34, Andrew Cooper wrote: >>> >>> On 30/11/2022 17:32, Edwin Török wrote: >>>> + >>>> +caml_enter_blocking

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

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 13:57, Christian Lindig wrote: > > > >> 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 tha

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

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 11:51, Andrew Cooper wrote: > > On 30/11/2022 17:32, Edwin Török wrote: >> diff --git a/tools/ocaml/libs/xc/xenctrl.mli >> b/tools/ocaml/libs/xc/xenctrl.mli >> index 60e7902e66..f6c7e5b553 100644 >> --- a/tools/ocaml/libs/xc/xenctrl.mli >> +++ b/tools/ocaml/libs/xc/xenctrl.

Re: [PATCH v1 2/5] tools/ocaml/libs/xc: add binding to xc_evtchn_status

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 11:34, Andrew Cooper wrote: > > On 30/11/2022 17:32, Edwin Török wrote: >> There is no API or ioctl to query event channel status, it is only >> present in xenctrl.h > > Yeah, this is very unfortunate, because it really wanted to be part of > the xenevtchn stable API/ABI. >

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

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 09:11, Julien Grall wrote: > > Hi Edwin, > > The title should have "OCaml" to clarify that .clang-format is not added at > the root level. > Sure, I'll update that when I resend. > On 30/11/2022 17:32, Edwin Török wrote: >> Add a .clang-format configuration that tries t

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

2022-11-30 Thread Edwin Torok
; > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes > > v2: > * New > --- > tools/ocaml/xenstored/connections.ml | 9 + > tools/ocaml/xenstored/domain.ml | 75 ++--

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

2022-11-30 Thread Edwin Torok
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-11-30 Thread Edwin Torok
> Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes We've reviewed this change in-person: Reviewed-by: Edwin Török > > v2: > * New. > --- > tools/ocaml/xenstored/domains.ml | 26 ++

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

2022-11-30 Thread Edwin Torok
> 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-11-30 Thread Edwin Torok
gt; No functional change. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes Reviewed-by: Edwin Török > > v2: > * New > --- > tools/ocaml/xenstored/domain.ml | 16 +++- > 1 file changed

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

2022-11-24 Thread Edwin Torok
> On 24 Nov 2022, at 13:43, Andrew Cooper wrote: > > On 24/11/2022 09:03, Edwin Torok wrote: >>> On 23 Nov 2022, at 22:25, Andrew Cooper wrote: >>> >>> The binding for xc_interface_close() free the underlying handle while >>> leaving >>

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

2022-11-24 Thread Edwin Torok
goes out of scope. > > Signed-off-by: Andrew Cooper > --- > CC: Christian Lindig > CC: David Scott > CC: Edwin Torok > CC: Rob Hoes > > I've confirmed that Xenctrl.close_handle does cause the finaliser to be > called, simply by dropping the handle refer

Re: Summary: Re: [PATCH for-4.17 v3 00/15] OCaml fixes for Xen 4.17

2022-11-13 Thread Edwin Torok
> On 11 Nov 2022, at 20:46, Andrew Cooper wrote: > > Nothing here is critical enough to go into 4.17 at this juncture. Agreed > > Various notes/observations from having spent a day trying to untangle > things. Thanks. > > 1) Patches 5/6 are a single bugfix and need merging. Except ther

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

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 16:26, Edwin Török wrote: > > > >> On 9 Nov 2022, at 14:18, Edwin Torok wrote: >> >> >> >>> On 9 Nov 2022, at 02:40, Henry Wang wrote: >>> >>> Hi Julien, >>> >>>> -Origi

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

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 14:18, Edwin Torok wrote: > > > >> On 9 Nov 2022, at 02:40, Henry Wang wrote: >> >> Hi Julien, >> >>> -Original Message- >>> From: Julien Grall >>> Subject: Re: [PATCH for-4.17 v3 07/15] C

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

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 02:40, Henry Wang wrote: > > Hi Julien, > >> -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 l

Re: [PATCH for-4.17 v3 15/15] tools/ocaml/libs/xc: fix use of uninitialized memory in shadow_allocation_get

2022-11-09 Thread Edwin Torok
On 8 Nov 2022, at 15:34, Edwin Török wrote: > > It has been noticed in 2013 that shadow allocation sometimes returns the > wrong value, which got worked around by adding a limit to the shadow > multiplier of 1000 and ignoring the value from Xen in that case > to avoid a shadow multiplier causing

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

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 09:52, Jan Beulich wrote: > > On 09.11.2022 10:36, Jan Beulich wrote: >> On 09.11.2022 10:21, Edwin Torok wrote: >>> >>> >>>> On 9 Nov 2022, at 07:10, Jan Beulich wrote: >>>> >>>> On 09.11.2022 0

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

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 03:19, Henry Wang wrote: > > Hi Edwin, > >> -Original Message- >>> [1] >> AS8PR08MB7991145C8063D6939AFFED8F92829@AS8PR08MB7991.eurprd08 >> .prod.outlook.com >> >> >> Hmm I thought that is my Outlook rewriting the link, but the archive at >> lore.kernel.org seems

Re: [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 07:48, Jan Beulich wrote: > > On 08.11.2022 18:15, Roger Pau Monné wrote: >> On Tue, Nov 08, 2022 at 06:03:54PM +0100, Jan Beulich wrote: >>> On 08.11.2022 17:43, Roger Pau Monné wrote: On Tue, Nov 08, 2022 at 05:14:40PM +0100, Jan Beulich wrote: > On 08.11.2022 12:

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

2022-11-09 Thread Edwin Torok
> On 9 Nov 2022, at 07:10, Jan Beulich wrote: > > On 09.11.2022 03:47, Henry Wang wrote: >>> -Original Message- >>> From: Edwin Török >>> Subject: [PATCH for-4.17 v3 09/15] tools/ocaml/xenstored/store.ml: fix build >>> error >>> >>> Building with Dune in release mode fails with: >>> `

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

2022-11-08 Thread Edwin Torok
> On 8 Nov 2022, at 17:26, Julien Grall wrote: > > > > On 08/11/2022 17:02, Edwin Torok wrote: >>> On 8 Nov 2022, at 16:03, Julien Grall wrote: >>> >>> Hi, >>> >>> On 08/11/2022 15:33, Edwin Török wrote: >>>> See COD

Re: [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains

2022-11-08 Thread Edwin Torok
> On 8 Nov 2022, at 16:43, Roger Pau Monne wrote: > > On Tue, Nov 08, 2022 at 05:14:40PM +0100, Jan Beulich wrote: >> On 08.11.2022 12:38, Roger Pau Monne wrote: >>> Like on the Arm side, return -EINVAL when attempting to do a p2m >>> operation on dying domains. >>> >>> The current logic retu

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

2022-11-08 Thread Edwin Torok
> On 8 Nov 2022, at 16:07, Julien Grall wrote: > > > > On 08/11/2022 15:34, Edwin Török wrote: >> If we are out of memory then strdup may return NULL, and passing NULL to >> syslog may cause a crash. >> Avoid this by using `caml_stat_strdup` which will raise an OCaml out of >> memory exceptio

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

2022-11-08 Thread Edwin Torok
> On 8 Nov 2022, at 16:03, Julien Grall wrote: > > Hi, > > On 08/11/2022 15:33, Edwin Török wrote: >> See CODING_STYLE: Xen uses spaces, not tabs. >> * OCaml code: >> Using `ocp-indent` for now to just make minimal modifications in >> tabs vs spaces and get the right indentation. >> We can int

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

2022-11-02 Thread Edwin Torok
> On 2 Nov 2022, at 09:11, Christian Lindig wrote: > > > >> On 1 Nov 2022, at 17:59, Edwin Török wrote: >> >> >> Edwin Török (2): >> xenctrl.ml: make domain_getinfolist tail recursive >> xenctrl: use larger chunksize in domain_getinfolist >> >> tools/ocaml/libs/xc/xenctrl.ml | 25

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

2022-11-02 Thread Edwin Torok
> On 2 Nov 2022, at 09:11, Christian Lindig wrote: > > > >> On 1 Nov 2022, at 17:59, Edwin Török wrote: >> >> >> Edwin Török (2): >> xenctrl.ml: make domain_getinfolist tail recursive >> xenctrl: use larger chunksize in domain_getinfolist >> >> tools/ocaml/libs/xc/xenctrl.ml | 25

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

2022-10-21 Thread Edwin Torok
> On 21 Oct 2022, at 08:50, Christian Lindig > wrote: > > > >> On 20 Oct 2022, at 17:54, Edwin Török wrote: >> >> During live update we will load the /tool/xenstored path from the previous >> binary, >> and then try to mkdir /tool again which will fail with EEXIST. >> Check for existence

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

2022-10-20 Thread Edwin Torok
istake, and this hunk should have been part of >> what >> got comitted. >> >> Fixes: 00c48f57ab36 ("tools/oxenstored: Start live update process") >> Signed-off-by: Andrew Cooper >> --- >> CC: Christian Lindig >> CC: David Scott >>

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

2022-09-30 Thread Edwin Torok
> On 30 Sep 2022, at 15:59, Christian Lindig > wrote: > > > >> 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

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

2022-09-27 Thread Edwin Torok
This accidentally broke compatibility with OCaml 4.02.3, only realized when I went back to my Dune based build system which can automatically compile with multiple compiler versions. See below for a patch for that. I've included this patch in the correct place (before the patch that breaks it)

Design Session notes: tool chain (and other) dependencies of our build and runtime system

2022-09-22 Thread Edwin Torok
Hi, These are the raw notes for this design session from the Xen Summit: https://design-sessions.xenproject.org/uid/discussion/disc_JEWVIhuv2TRAo2AXAZnP/view Dependencies haven't been updated in quite some time: * Toolchain * system libraries, and other runtime deps E.g. when to drop Python2.

Re: [PATCH v1 7/7] tools/ocaml/libs/eventchn: do not leak event channels and OCaml 5.0 compat

2022-08-08 Thread Edwin Torok
> On 5 Aug 2022, at 19:06, Andrew Cooper wrote: > > On 29/07/2022 18:53, Edwin Török wrote: >> Add a finalizer on the event channel value, so that it calls >> `xenevtchn_close` when the value would be GCed. >> >> In practice oxenstored seems to be the only user of this, >> and it creates a sin

Re: [PATCH v1 4/7] tools/ocaml: Makefile to drive dune

2022-08-03 Thread Edwin Torok
> On 3 Aug 2022, at 14:46, Anthony PERARD wrote: > > On Fri, Jul 29, 2022 at 06:53:27PM +0100, Edwin Török wrote: >> create a separate Makefile that can be used to drive dune. >> >> Usage: >> `make -f Makefile.dune` >> >> There are some files that need to be created by the Makefile based >> b

Re: [PATCH v1 1/7] tools/ocaml/Makefile: do not run ocamldep during make clean

2022-08-03 Thread Edwin Torok
> On 3 Aug 2022, at 11:16, Jan Beulich wrote: > > On 29.07.2022 19:53, Edwin Török wrote: >> Trying to include .ocamldep.make will cause it to be generated if it >> doesn't exist. >> We do not want this during make clean: we would remove it anyway. >> >> Speeds up make clean. >> >> Before (me

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

2022-05-18 Thread Edwin Torok
> On 17 May 2022, at 20:41, Andrew Cooper wrote: > > Sadly, cpupool IDs are chosen by the caller, not assigned sequentially, so > this does need to have a full 32 bits of range. > > Also leave a BUILD_BUG_ON() to catch more obvious ABI changes in the future. > > Fixes: 92ea9c54fc81 ("arm/dom0

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

2022-02-25 Thread Edwin Torok
> On 25 Feb 2022, at 16:28, Anthony PERARD wrote: > > On Fri, Feb 25, 2022 at 03:30:59PM +, Christian Lindig wrote: >> >> >>> On 25 Feb 2022, at 15:13, Anthony PERARD wrote: >>> >>> This patch fix ".ocamldep.make" rule by always spelling the variable >>> $(OCAML_TOPLEVEL). >>> >>> Sig

Re: [PATCH 0/6] gnttab: add per-domain controls

2021-09-20 Thread Edwin Torok
> On 20 Sep 2021, at 08:26, Roger Pau Monne wrote: > > On Fri, Sep 17, 2021 at 06:06:42PM +0200, Christian Lindig wrote: >> >> >>> On 17 Sep 2021, at 16:46, Roger Pau Monne wrote: >>> >>> Hello, >>> >>> The first two patches of this series allows setting the preisoutly host >>> wide comma

Re: [PATCH] tools/ocaml/libs/xc: add OCaml stubs to query CPU policy

2021-06-18 Thread Edwin Torok
> On 18 Jun 2021, at 14:17, Andrew Cooper wrote: > > On 18/06/2021 11:45, Edwin Török wrote: >> diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c >> b/tools/ocaml/libs/xc/xenctrl_stubs.c >> index d05d7bb30e..4a230de8b7 100644 >> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c >> +++ b/tools/ocaml/lib

Re: [PATCH] tools/ocaml/libs/xc: add OCaml stubs to query CPU policy

2021-06-18 Thread Edwin Torok
> On 18 Jun 2021, at 14:09, Christian Lindig > wrote: > > > >> On 18 Jun 2021, at 11:45, Edwin Török wrote: >> >> Introduces following functions in Xenctrl and associated types: >> get_system_cpu_policy >> cpu_policy_to_featureset, >> string_of_xen_cpu_policy_index >> >> These are wrapper

Re: [PATCH v1.1 5/5] tests: Introduce a TSX test

2021-06-14 Thread Edwin Torok
On Mon, 2021-06-14 at 11:47 +0100, Andrew Cooper wrote: > See the comment at the top of test-tsx.c for details. > > This covers various complexities encountered while trying to address > the > recent TSX deprecation on client parts. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC:

Re: Preserving transactions accross Xenstored Live-Update

2021-05-19 Thread Edwin Torok
On Wed, 2021-05-19 at 11:09 +0200, Juergen Gross wrote: On 18.05.21 20:11, Julien Grall wrote: Hi Juergen, I have started to look at preserving transaction accross Live-update in C Xenstored. So far, I managed to transfer transaction that read/write existing nodes. Now, I am running into t

Re: [PATCH v2 00/17] live update and gnttab patches

2021-05-12 Thread Edwin Torok
On Wed, 2021-05-12 at 13:51 +0100, Andrew Cooper wrote: > On 12/05/2021 11:10, Edwin Torok wrote: > > On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote: > > > > > diff --git a/tools/ocaml/xenstored/disk.ml > > b/tools/ocaml/xenstored/disk.ml > > index 597

Re: [PATCH v2 00/17] live update and gnttab patches

2021-05-12 Thread Edwin Torok
On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote: > On 11/05/2021 19:05, Edwin Török wrote: > > These patches have been posted previously. > > The gnttab patches (tools/ocaml/libs/mmap) were not applied at the > > time > > to avoid conflicts with an in-progress XSA. > > The binary format live

Re: [PATCH v2 00/17] live update and gnttab patches

2021-05-11 Thread Edwin Torok
On Tue, 2021-05-11 at 19:05 +0100, Edwin Török wrote: > These patches have been posted previously. A git tree is available here for easier reviewing: https://github.com/edwintorok/xen/pull/2 > The gnttab patches (tools/ocaml/libs/mmap) were not applied at the > time > to avoid conflicts with an

Re: oxenstored restart after system crash

2021-02-18 Thread Edwin Torok
Pau Monne Sent: 18 February 2021 09:46 To: xen-devel@lists.xenproject.org Cc: Christian Lindig ; Edwin Torok ; Jürgen Groß ; Ian Jackson Subject: oxenstored restart after system crash Hello, Last month I got a query from a FreeBSD Xen user having issues with xenstored after a power failu

Re: [OSSTEST PATCH 7/7] make-flight: Stripy xenstored

2021-01-22 Thread Edwin Torok
On Fri, 2021-01-22 at 15:56 +, Ian Jackson wrote: > Previously, we let the Xen build system and startup scripts choose > which xenstored to use.  Before we upgraded to Debian buster, that > gave us C xentored tests on ARM.  Since then, armhf and arm64 have > both had enough ocaml support and we

Re: [PATCH v2 3/8] docs/designs/xenstore-migration.md: clarify that deletes are recursive

2021-01-22 Thread Edwin Torok
On Fri, 2021-01-22 at 14:04 +0100, Jürgen Groß wrote: > On 15.01.21 23:28, Edwin Török wrote: > > Signed-off-by: Edwin Török > > --- > > Changed since V1: > > * post publicly now that the XSA is out > > --- > >   docs/designs/xenstore-migration.md | 3 ++- > >   1 file changed, 2 insertions(+), 1 d

Re: [PATCH v2 1/8] tools/xenstore: add live update command to xenstore-control

2021-01-18 Thread Edwin Torok
On Mon, 2021-01-18 at 08:50 +0100, Jürgen Groß wrote: > On 15.01.21 23:28, Edwin Török wrote: > > From: Juergen Gross > > > > Add the "live-update" command to xenstore-control enabling updating > > xenstored to a new version in a running Xen system. > > > > With -c it is possible to pass a diff

Re: [PATCH v2 4/8] tools/ocaml/xenstored: only quit on SIGTERM when a reload is possible

2021-01-18 Thread Edwin Torok
On Mon, 2021-01-18 at 08:51 +0100, Jürgen Groß wrote: > On 15.01.21 23:28, Edwin Török wrote: > > Currently when oxenstored receives SIGTERM it dumps its state and > > quits. > > It is possible to then restart it if --restart is given, however > > that is > > not always safe: > > > > * domains cou

Re: [PATCH v10 06/25] tools/xenstore: add live update command to xenstore-control

2021-01-13 Thread Edwin Torok
On Wed, 2021-01-13 at 17:34 +0100, Jürgen Groß wrote: > On 06.01.21 15:42, Edwin Torok wrote: > > [...] > > > > I'd prefer it if there was a more asynchronous protocol available > > for > > live-update: > > * the live-update on its own queues

Re: [PATCH v10 06/25] tools/xenstore: add live update command to xenstore-control

2021-01-06 Thread Edwin Torok
On Tue, 2020-12-15 at 17:35 +0100, Juergen Gross wrote: > [...] > +static int live_update_start(struct xs_handle *xsh, bool force, > unsigned int to) > +{ > +    int len = 0; > +    char *buf = NULL, *ret; > +    time_t time_start; > + > +    if (asprintf(&ret, "%u", to) < 0) > +    return 1;

Re: [PATCH v1 4/4] tools/ocaml/libs/xc: backward compatible domid control at domain creation time

2020-11-19 Thread Edwin Torok
On Wed, 2020-11-18 at 18:13 +, Andrew Cooper wrote: > On 17/11/2020 18:24, Edwin Török wrote: > > One can specify the domid to use when creating the domain, but this > > was hardcoded to 0. > > > > Keep the existing `domain_create` function (and the type of its > > parameters) as is to make >

Re: [PATCH v1 2/4] automation/: add Ubuntu:focal container

2020-11-18 Thread Edwin Torok
On Wed, 2020-11-18 at 10:40 -0600, Doug Goldstein wrote: > > > On 11/17/20 12:24 PM, Edwin Török wrote: > > Signed-off-by: Edwin Török > > Looks good. Do you have permissions to push the container or do you > need > me to? > > Acked-by: Doug Goldstein Thanks, if you could push it that'd be g

Re: [XEN PATCH] tools/xenstore: Log xenstored build ID on startup

2020-11-13 Thread Edwin Torok
On Fri, 2020-11-13 at 17:13 +, Andrew Cooper wrote: > On 13/11/2020 16:56, Bjoern Doebel wrote: > > On 13.11.20 16:36, Jürgen Groß wrote: > > > On 13.11.20 15:18, Bjoern Doebel wrote: > > > > Right now we do not have a mechanism to determine the version > > > > of the > > > > currently running

Re: [PATCH 3/8] xen/domctl: Introduce and use XEN_DOMCTL_CDF_nested_virt

2020-09-30 Thread Edwin Torok
On Wed, 2020-09-30 at 14:42 +0100, Andrew Cooper wrote: > Like other major areas of functionality, nested virt (or not) needs > to be > known at domain creation time for sensible CPUID handling, and wants > to be > known this early for sensible infrastructure handling in Xen. > > Introduce XEN_DOM

Re: oxenstored performance issue when starting VMs in parallel

2020-09-22 Thread Edwin Torok
etwork vif for > exemple) and once all the VMs are down a call to xenstore-ls show > that > the store is indeed empty (dom0 excluded) > > We will continue additional testing and stress but in all cases a > huge thanks to you and Julien for your help on this issue ! > > Jerome

Re: [PATCH v4 2/4] Map: backport find_opt/update from 4.06

2020-08-28 Thread Edwin Torok
On Fri, 2020-08-28 at 10:30 +0200, Christian Lindig wrote: > +let find_opt k t = > > + (* avoid raising exceptions, they can be expensive *) > > + if mem k t then Some (find k t) else None > > > > I disagree with this argument. Exceptions in OCaml are cheap because > they don't wal

Re: [PATCH v1 0/6] tools/ocaml/xenstored: simplify code

2020-08-27 Thread Edwin Torok
th me but I assume that the project > > > might have its own ideas about this. > > > > > > ____ > > > From: Edwin Torok > > > Sent: 18 August 2020 08:28 > > > To: Christian Lindig; xen-devel@lists.xenproject.org

Re: [PATCH v1 0/6] tools/ocaml/xenstored: simplify code

2020-08-18 Thread Edwin Torok
On Mon, 2020-08-17 at 14:56 +0200, Christian Lindig wrote: > This all looks good - I left a small comment on one of the patches > and I agree that this needs testing. I also wonder about > compatibility with earlier OCaml releases that we support but I see > no real obstacles. > I've developed th

Re: [PATCH v1 5/6] tools/ocaml/xenstored: use more efficient node trees

2020-08-17 Thread Edwin Torok
ical to V1, not matching what I had in my git tree, perhaps git-format-patch didn't overwrite the patches?). Best regards, --Edwin > > -- C > > ________ > From: Edwin Torok > Sent: 14 August 2020 23:14 > To: xen-devel@lists.xenproject.or

Re: [PATCH v1 4/6] tools/ocaml/xenstored: drop select based

2020-08-17 Thread Edwin Torok
On Mon, 2020-08-17 at 09:59 +, Wei Liu wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open > attachments unless you have verified the sender and know the content > is safe. > > The subject line seems to be cut off half way. > > "Drop select based $SOMETHING"? $SOMETHING =

Re: [PATCH 2/2] tools/ocaml: Default to useful build output

2020-07-20 Thread Edwin Torok
On Mon, 2020-07-20 at 10:38 +0200, Christian Lindig wrote: > > Time for a bit of controversy. > > OCaml outside Xen has moved to a different model of building based on > dune which is fast, declarative and reliable. The OCaml xenstore is > stagnating because nobody with OCaml experience wants to t

  1   2   >