get this output:
```
(XEN) [6.614703] Detected 2600.010 MHz processor.
(XEN) [ 138.924342] TSC marked as reliable, warp = 0 (count=2)
(XEN) [ 138.924346] dom1(hvm): mode=0,ofs=0xfffed01901016d18,khz=2600012,inc=2
```
Signed-off-by: Edwin Török
---
xen/arch/x86/time.c | 8 +++-
1 file cha
RDTSC emulation due to that.
So far I have manually tested this on Intel(R) Xeon(R) CPU E5-2697 v3 and a
Debian 9 guest, more tests pending.
See the commit for more details.
Edwin Török (1):
x86/arch: VM resume: avoid RDTSC emulation due to host clock drift
xen/arch/x86/time.c | 8 +++-
1
On 03/09/2019 08:54, Jan Beulich wrote:
> On 02.09.2019 20:27, Edwin Török wrote:
>> On a Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz the host frequency drifts:
>> ```
>> (XEN) [6.607693] Detected 2600.004 MHz processor.
>> (XEN) [ 2674.213081] dom1(hvm):
>>
On 14/11/2018 18:17, Wei Liu wrote:
> Read from XEN_CONFIG_DIR/dom0-uuid. If it contains a valid UUID, set
> it for Dom0.
>
> Signed-off-by: Wei Liu
[snip]
In general this looks good, however I am not familiar with libxl
conventions, so just some generic comments below.
> +static void get_dom0_
+++--
> 5 files changed, 67 insertions(+), 4 deletions(-)
> create mode 100644 tools/examples/dom0-uuid
I can't spot anything wrong here.
Acked-by: Edwin Török
Best regards,
--Edwin
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
The readonly flag was propagated but ignored, so this was essentially
equivalent to a RW socket.
C xenstored is dropping the RO socket too, so drop it from oxenstored too.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml/xenstored/define.ml | 1
See
https://lore.kernel.org/xen-devel/20201002154141.11677-6-jgr...@suse.com/T/#u
Edwin Török (1):
tools/ocaml/xenstored: drop the creation of the RO socket
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml/xenstored/define.ml | 1 -
tools/ocaml/xenstored/xenstored.ml | 15
Signed-off-by: Edwin Török
---
automation/build/ubuntu/focal.dockerfile | 50
automation/scripts/containerize | 1 +
2 files changed, 51 insertions(+)
create mode 100644 automation/build/ubuntu/focal.dockerfile
diff --git a/automation/build/ubuntu
On CentOS 8 with SELinux containerize doesn't work at all:
Make sure that the source code and SSH agent directories are passed on
with SELinux relabeling enabled.
(`-security-opt label=disabled` would be another option)
Signed-off-by: Edwin Török
---
automation/scripts/containeriz
ime. This is inefficient,
but works.
Long term it would be beneficial to switch to Dune as build system,
which can do correct incremental builds with minimal configuration.
I'll send a separate patch series for that.
Edwin Török (4):
automation/scripts/containerize: fix DOCKER_CMD=podman
auto
As a convenience so that oxenstored patches can be compile-tested
using upstream's build-system before submitting upstream.
Signed-off-by: Edwin Török
---
Makefile | 6 ++
tools/ocaml/Makefile | 8
2 files changed, 14 insertions(+)
diff --git a/Makefile b/Mak
new version of xenopsd can choose to start using this, while old versions of
xenopsd will keep
building and using the old API.
Controlling the domid can be useful during testing or migration.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/xenctrl.ml | 3 +++
tools/ocaml/libs/xc
Signed-off-by: Edwin Török
Acked-by: Doug Goldstein
---
Changed since v1:
* dropped python-dev and markdown
---
automation/build/ubuntu/focal.dockerfile | 48
automation/scripts/containerize | 1 +
2 files changed, 49 insertions(+)
create mode 100644
The patches were posted previously, this is a repost after the XSA series.
For convenience here is a tree with all patch series applied:
https://github.com/edwintorok/xen/pull/1
Edwin Török (2):
automation/: add Ubuntu:focal container
Makefile: add build-tools-oxenstored
Makefile
As a convenience so that oxenstored patches can be compile-tested
using upstream's build-system before submitting upstream.
Signed-off-by: Edwin Török
---
Changed since V1:
* repost after XSA to avoid conflicts
---
Makefile | 6 ++
tools/ocaml/Makefile | 8
2
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 deletion(-)
diff --git a/docs/designs/xenstore-migration.md
b/docs/designs/xenstore-migration.md
index 2ce2c836f5
There are alternative fixes for this, e.g. do the entire live update
inside oxenstored and reply OK from the next oxenstored or an error.
This requires some asynchronous handling there.
Once that code is available we can revert this one.
Signed-off-by: Edwin Török
Reviewed-by: Pau Ruiz Safont
D and allow it to restart on success.
This should make updating oxenstored as easy as:
`systemctl stop -s SIGTERM xenstored` on a suitable xenstored version.
Signed-off-by: Edwin Török
Reviewed-by: Pau Ruiz Safont
Reviewed-by: Christian Lindig
---
Changed since V1:
* post publicly now that the X
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 different command line to the
new instance of xenstored. This will replace the command line used
for the invocation of the
red via SIGTERM in the above situations.
Also ignore domains marked as bad because oxenstored would never talk
to them again.
Signed-off-by: Edwin Török
Reviewed-by: Pau Ruiz Safont
Reviewed-by: Christian Lindig
---
Changed since V1:
* post publicly now that the XSA is out
---
tools/
transactions,
and no unprocess input or unflushed output.
It is not yet possible to force the live-update.
Signed-off-by: Edwin Török
Reviewed-by: Pau Ruiz Safont
Reviewed-by: Christian Lindig
---
Changed since V1:
* post publicly now that the XSA is out
---
tools/ocaml/xenstored/process.ml | 112
Now there is a periodic History.trim running every 0.05s, so I don't think you
can do much damage
with it.
But lets be safe an trim the transaction history anyway on reconnect.
Signed-off-by: Edwin Török
---
Changed since V1:
* post publicly now that the XSA is out (not a security issue)
-
OCaml 4.08+.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/disk.ml | 318 ++
1 file changed, 318 insertions(+)
diff --git a/tools/ocaml/xenstored/disk.ml b/tools/ocaml/xenstored/disk.ml
index 4739967b61..595fdab54a 100644
--- a/tools/ocaml/xenstored/disk.ml
Signed-off-by: Edwin Török
Reviewed-by: Pau Ruiz Safont
Reviewed-by: Christian Lindig
---
Changed since V1:
* post publicly now that the XSA is out
---
tools/ocaml/xenstored/logging.ml | 3 +++
tools/ocaml/xenstored/process.ml | 8 +---
tools/ocaml/xenstored/xenstored.ml | 29
Xenmmap.unmap sets the address to MAP_FAILED in xenmmap_stubs.c.
If due to a bug there were still references to the Xenbus and we attempt
to use it then we crash.
Raise an exception instead of crashing.
(My initial version of fuzz testing had such a bug)
Signed-off-by: Edwin Török
---
tools
`//`, which is an invalid path.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 5 ++---
tools/ocaml/xenstored/connections.ml | 4 +++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/ocaml/xenstored/connection.ml
b/tools/ocaml/xenstored/connection.ml
index
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 63 +
1 file changed, 47 insertions(+), 16 deletions(-)
diff --git a/tools/ocaml/xenstored/connection.ml
b/tools/ocaml/xenstored/connection.ml
index 51041dde8e..1f9fe9e3b2 100644
--- a/tools/ocaml
nd changing the
listing order changed what key got dropped making the test fail)
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changed since V3:
* repost after XSA to avoid conflicts
---
tools/ocaml/xenstored/store.ml | 48 +++-
tools/ocaml/xenstored/
oalesce" = 0;
"stat_transaction_abort" = 0;
"store" = /{n0}
/tool{n0}
/local{n0}
;
"quota" = { "maxent" = 8192;
"maxsize" = 2048;
"cur" = (hashtbl (0, +3+))-2-)) } }
Fatal error: exception Crowbar.TestFailure
```
This shows t
eding depending on timing.
Or one transaction reading an entry, concluding it doesn't exist,
do some other work based on that information and successfully commit
even if another transaction creates the node via mkdir meanwhile.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/transaction.ml
ecf33a0d.ca...@citrix.com/
for previous discussion of OCaml version.
Signed-off-by: Edwin Török
---
tools/ocaml/Makefile | 19 +
tools/ocaml/xenstored/process.ml | 12 +-
tools/ocaml/xenstored/store.ml| 1 +
tools/ocaml/xenstored/test
We are currently on OCaml 4.02 as minimum version.
To make the followup optimizations compile backport these functions from
OCaml 4.06.
This implementation is less efficient than the one in the 4.06 standard
library which has access to the internals of the Map.
Signed-off-by: Edwin Török
keep
building and using the old API.
(The ABI will change, but that changes every time a function is
introduced/removed or modified)
Controlling the domid can be useful during testing or migration.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changed since V1:
* introduced an
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/perms.ml | 2 +
tools/ocaml/xenstored/xenstored.ml | 201 -
2 files changed, 173 insertions(+), 30 deletions(-)
diff --git a/tools/ocaml/xenstored/perms.ml b/tools/ocaml/xenstored/perms.ml
index e8a16221f8
o longer referenced OCaml's GC will drop it from the
weak table: there is no need to manually do a mark-and-sweep, or to tell
OCaml when to drop it.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changed since V3:
* repost after XSA to avoid conflicts
---
tools/ocaml/xenstored/
t
actually starting up the daemon in a unit test.
Similarly argument parsing had to be delayed until after daemon startup.
Also had to disable setrlimit when running as non-root in poll.ml.
Signed-off-by: Edwin Török
---
tools/ocaml/.gitignore | 2 +
tools/ocam
From: Edvin Torok
Signed-off-by: Edwin Török
Reviewed-by: Pau Ruiz Safont
Reviewed-by: Christian Lindig
---
Changed since V1
* post publicly now that the XSA is out
---
tools/ocaml/xenstored/connection.ml | 25 +---
tools/ocaml/xenstored/parse_arg.ml | 4 ++
tools/ocaml/xenstored
No functional change, just an optimization.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changed since V3:
* repost after XSA to avoid conflicts
---
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml/xenstored/symbol.ml | 6 +--
tools/ocaml/xenstored/trie.ml
f a
suitable
control/platform-feature-xs_reset_watches field is present in xenstore.
Edwin Török (1):
oxenstored: fix ABI breakage introduced in Xen 4.9.0
tools/ocaml/libs/xb/op.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.25.1
ble watch reset,
we now see `reset watches` during kdump of a guest in xenstored-access.log.
Signed-off-by: Edwin Török
Tested-by: Igor Druzhinin
---
tools/ocaml/libs/xb/op.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/ocaml/libs/xb/op.ml b/tools/ocaml/libs/xb/op.
the legacy select based code: I think every
modern *nix should have a working poll(3) by now.
This is a draft series, in need of more testing.
Edwin Török (6):
tools/ocaml/libs/xc: Fix ambiguous documentation comment
tools/ocaml/xenstored: fix deprecation warning
tools/ocaml/xenstored: replace
```
File "xenstored/disk.ml", line 33, characters 9-23:
33 |let c = Char.lowercase c in
^^
(alert deprecated): Stdlib.Char.lowercase
Use Char.lowercase_ascii instead.
```
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/disk.ml | 2 +-
1 file
o longer referenced OCaml's GC will drop it from the
weak table: there is no need to manually do a mark-and-sweep, or to tell
OCaml when to drop it.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 3 --
tools/ocaml/xenstored/history.ml| 14 --
tools/ocaml/xenst
ch is inefficient.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/Makefile | 12 ++--
tools/ocaml/xenstored/parse_arg.ml | 7 ++-
tools/ocaml/xenstored/{select.ml => poll.ml} | 14 ++
tools/ocaml/xenstored/{select.mli => pol
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/xenctrl.mli | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
index 26ec7e59b1..f7f6ec570d 100644
--- a/tools/ocaml/libs/xc/xenctrl.mli
+++ b/tools/ocaml/libs/xc/xenctrl.mli
ev.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/store.ml | 46 +++-
tools/ocaml/xenstored/symbol.ml | 4 +++
tools/ocaml/xenstored/symbol.mli | 3 +++
3 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/tools/ocaml/xenstored/store.ml b/tools/
No functional change, just an optimization.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml/xenstored/trie.ml| 61
tools/ocaml/xenstored/trie.mli | 26 ++--
3 files changed, 41 insertions(+), 48
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/xenctrl.mli | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
index 26ec7e59b1..f7f6ec570d 100644
--- a/tools/ocaml/libs/xc/xenctrl.mli
+++ b/tools/ocaml/libs/xc/xenctrl.mli
ch is inefficient.
Signed-off-by: Edwin Török
---
Changed since v1:
* fix commit title
---
tools/ocaml/xenstored/Makefile | 12 ++--
tools/ocaml/xenstored/parse_arg.ml | 7 ++-
tools/ocaml/xenstored/{select.ml => poll.ml} | 14 ++
too
o longer referenced OCaml's GC will drop it from the
weak table: there is no need to manually do a mark-and-sweep, or to tell
OCaml when to drop it.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 3 --
tools/ocaml/xenstored/history.ml| 14 --
tools/ocaml/xenst
No functional change, just an optimization.
Signed-off-by: Edwin Török
---
Changed since v1:
* fix missing 'set_node' in 'set' that got lost in conversion to map
* simplify 'compare' function
---
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml
ev.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/store.ml | 46 +++-
tools/ocaml/xenstored/symbol.ml | 4 +++
tools/ocaml/xenstored/symbol.mli | 3 +++
3 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/tools/ocaml/xenstored/store.ml b/tools/
the legacy select based code: I think every
modern *nix should have a working poll(3) by now.
Changes since v1:
* passed some testing
* fix commit title on 'drop select based'
* fix missing 'set_node' in 'set' that got lost in conversion to map
* simplify
```
File "xenstored/disk.ml", line 33, characters 9-23:
33 |let c = Char.lowercase c in
^^
(alert deprecated): Stdlib.Char.lowercase
Use Char.lowercase_ascii instead.
```
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/disk.ml | 2 +-
1 file
ch is inefficient.
Signed-off-by: Edwin Török
---
Changed since v1:
* fix commit title
---
tools/ocaml/xenstored/Makefile | 12 ++--
tools/ocaml/xenstored/parse_arg.ml | 7 ++-
tools/ocaml/xenstored/{select.ml => poll.ml} | 14 ++
too
No functional change, just an optimization.
Signed-off-by: Edwin Török
---
Changed since v1:
* fix missing 'set_node' in 'set' that got lost in conversion to map
* simplify 'compare' function
---
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml
elect based'
* passed some testing
Please ignore V2, something went wrong and V2 was nearly identical to V1,
not matching what I had in my git tree.
Edwin Török (6):
tools/ocaml/libs/xc: Fix ambiguous documentation comment
tools/ocaml/xenstored: fix deprecation warning
tools/ocaml/xen
```
File "xenstored/disk.ml", line 33, characters 9-23:
33 |let c = Char.lowercase c in
^^
(alert deprecated): Stdlib.Char.lowercase
Use Char.lowercase_ascii instead.
```
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/disk.ml | 2 +-
1 file
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/xenctrl.mli | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
index 26ec7e59b1..f7f6ec570d 100644
--- a/tools/ocaml/libs/xc/xenctrl.mli
+++ b/tools/ocaml/libs/xc/xenctrl.mli
ev.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/store.ml | 46 +++-
tools/ocaml/xenstored/symbol.ml | 4 +++
tools/ocaml/xenstored/symbol.mli | 3 +++
3 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/tools/ocaml/xenstored/store.ml b/tools/
o longer referenced OCaml's GC will drop it from the
weak table: there is no need to manually do a mark-and-sweep, or to tell
OCaml when to drop it.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 3 --
tools/ocaml/xenstored/history.ml| 14 --
tools/ocaml/xenst
ev.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changes since V3:
* none, repost after preceding commits fix OCaml 4.02 compatibility
---
tools/ocaml/xenstored/store.ml | 46 +++-
tools/ocaml/xenstored/symbol.ml | 4 +++
tools/ocaml/xenstored/symbol.
o longer referenced OCaml's GC will drop it from the
weak table: there is no need to manually do a mark-and-sweep, or to tell
OCaml when to drop it.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changes since V3:
* replace String.equal with (=) for compatibility with 4.02
---
We are currently on OCaml 4.02 as minimum version.
To make the followup optimizations compile backport these functions from
OCaml 4.06.
This implementation is less efficient than the one in the 4.06 standard
library which has access to the internals of the Map.
Signed-off-by: Edwin Török
://gitlab.com/edwintorok/xen/-/compare/master...for-upstream
Edwin Török (4):
tools/ocaml/xenstored: replace hand rolled GC with weak GC references
Map: backport find_opt/update from 4.06
tools/ocaml/xenstored: use more efficient node trees
tools/ocaml/xenstored: use more efficient tries
tools
No functional change, just an optimization.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changes since V3:
* none, repost after previous commits fix compatibility with OCaml 4.02
---
tools/ocaml/xenstored/connections.ml | 2 +-
tools/ocaml/xenstored/symbol.ml | 6 +--
tools
This is a port of the following C xenstored commit
122b52230aa5b79d65e18b8b77094027faa2f8e2 tools/xenstore: don't store domU's mfn
of ring page in xenstored
Backwards compat: accept a domain dump both with and without MFN.
CC: Signed-off-by: Juergen Gross
Signed-off-by: Edwin Török
Xenmmap.mmap_interface is created from multiple places:
* via mmap(), which needs to be unmap()-ed
* xc_map_foreign_range
* xengnttab_map_grant_ref
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/xenmmap.ml | 14 --
tools/ocaml/libs/mmap/xenmmap.mli | 11 ---
tools
Xenmmap interface
(without it the code would build but the wrong unmap function would get
called on domain destruction)
CC: Andrew Cooper
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/domains.ml | 7 +--
tools/ocaml/xenstored/xenstored.ml | 3 ++-
2 files changed, 7 insertions
ep using sizeof,
but round up and convert to number of words.
For OCaml 1 word = sizeof(value)
The Wsize_bsize macro converts bytes to words.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/xenmmap_stubs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/
for mapping bigarrays, and int64 for just
the offset.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/mmap_stubs.h| 4 +++-
tools/ocaml/libs/mmap/xenmmap_stubs.c | 31 +--
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/tools/ocaml/libs/mmap/mmap_stub
xenstored's use only which needs a way to grant map
the xenstore ring without using xenctrl.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/Makefile | 11 ++-
tools/ocaml/xenstored/gnt.ml | 60 +++
tools/ocaml/xenstored/gnt.mli| 86 ++
Xenmmap is only modified by the ring functions,
these functions are unused.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/xenmmap.ml | 5
tools/ocaml/libs/mmap/xenmmap.mli | 4 ---
tools/ocaml/libs/mmap/xenmmap_stubs.c | 41 ---
3 files changed, 50
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/mmap_stubs.h| 7 +++
tools/ocaml/libs/mmap/xenmmap_stubs.c | 2 --
tools/ocaml/libs/xb/xs_ring_stubs.c | 14 +-
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/tools/ocaml/libs/mmap/mmap_stubs.h
b
om/edwintorok/xen/-/compare/master...for-upstream
Edwin Török (9):
tools/ocaml: use common macros for manipulating mmap_interface
tools/ocaml/libs/mmap: allocate correct number of bytes
tools/ocaml/libs/mmap: Expose stub_mmap_alloc
tools/ocaml/libs/xb: import gnttab stubs from mirage
tool
These functions can potentially take some time,
so allow other OCaml code to proceed meanwhile (if any).
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/xenmmap_stubs.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/ocaml/libs/mmap/xenmmap_stubs.c
From: Edwin Török
>From `man 2 realloc`:
`If realloc() fails, the original block is left untouched; it is not freed or
moved.`
Found using GCC -fanalyzer:
```
| 184 | backup->entries = realloc(backup-&g
From: Edwin Török
Using GCC 12.2.1 with -fanalyzer it has shown some memory leaks:
This is how I enabled -fanalyzer (adding it to CFLAGS for toplevel
configure didn't seem to work):
```
CFLAGS += $(call cc-option,$(CC),-fanalyzer)
```
Note that there are more errors shown than fixed here
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.1 `-fanalyzer`:
```
xg_core_x86.c: In function ‘xc_core_arch_map_p2m_tree_rw’:
xg_core_x86.c:300:5:
introduced in Icelake,
so this commit should be backported to Xen versions supporting Icelake.
Backport: 4.13+
Signed-off-by: Edwin Török
---
xen/arch/x86/include/asm/msr-index.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/include/asm/msr-index.h
b/xen/arch
architectural MSR.
The new MSR in this range appears to have been introduced in Icelake,
so this commit should be backported to Xen versions supporting Icelake.
Backport: 4.13+
Signed-off-by: Edwin Török
---
Notes:
Changed since v1:
* include version of Intel SDM where the change occured
Signed-off-by: Edwin Török
---
tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 29 +--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/tools/ocaml/libs/eventchn/xeneventchn_stubs.c
b/tools/ocaml/libs/eventchn/xeneventchn_stubs.c
index f889a7a2e4..c0d57e2954 100644
--
https://github.com/edwintorok/xen/compare/private/edvint/public?expand=1
Edwin Török (7):
tools/ocaml/Makefile: do not run ocamldep during make clean
tools/ocaml/*/Makefile: generate paths.ml from configure
tools/ocaml/*/dune: dune based build system
tools/ocaml: Makefile to drive dune
functional change.
Signed-off-by: Edwin Török
---
tools/configure | 4 +++-
tools/configure.ac| 2 ++
tools/ocaml/libs/xs/Makefile | 5 -
tools/ocaml/libs/xs/paths.ml.in | 1 +
tools/ocaml/xenstored/Makefile| 5 -
tools/ocaml/xenstored/paths.ml.in | 4
lementation
in the future without breaking code that relies on it.
No functional change.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xb/xb.ml | 3 +++
tools/ocaml/libs/xb/xb.mli | 9 ++---
tools/ocaml/xenstored/connection.ml | 8 ++--
3 files changed, 7 insertions(
Dune.
Using version 2.1 of Dune build language here, because that is the one
available in Ubuntu Focal (part of the CI here).
No functional change.
Signed-off-by: Edwin Török
---
tools/.gitignore | 7 +
tools/dune | 5
tools/dune-project
ke clean -j8 -s
Performance counter stats for 'make clean -j8 -s' (5 runs):
2.7325 +- 0.0138 seconds time elapsed ( +- 0.51% )
```
No functional change.
Signed-off-by: Edwin Török
---
tools/ocaml/Makefile.rules | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/oca
d it doesn't support including external
files. But could be generated by configure?
LD_LIBRARY_PATH needs to be set, because even with -Wl,-rpath
executables wouldn't be able to run using the just-built libraries,
unless we'd also link all the transitive dependencies of libs.
No functional
Fix compiler warning about:
* unused value
* ambiguous documentation comment
* non-principal type inference (compiler version dependent)
No functional change.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 2 +-
tools/ocaml/xenstored/process.ml| 5 +++--
2 files
-compilation using
Dune.
The unikernel itself also uses Solo5 instead of MiniOS, so the OCaml
code in stubdom/ is probably stale.
Signed-off-by: Edwin Török
Cc: Christian Lindig
---
tools/configure| 2 +-
tools/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools
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
---
tools/ocaml/libs/xc/xenctrl.ml | 44
tools/ocaml/libs/xc/xenctrl.ml
s to compile due to the missing uint32_t define.
Does not yet reformat any code.
No functional change.
Signed-off-by: Edwin Török
---
tools/ocaml/.clang-format | 9 +
1 file changed, 9 insertions(+)
create mode 100644 tools/ocaml/.clang-format
diff --git a/tools/ocaml/.clang-format b
hat
do not (want to) use it.
It also won't cause re-indentation of existing files when edited, only
newly added lines would follow the convention.
No functional change.
Signed-off-by: Edwin Török
---
.editorconfig | 20
1 file changed, 20 insertions(+)
create mode 10064
xs_wire.h fails to compile without this, and a slight rearrangement of
header includes (e.g. by clang-format) could cause the file to fail to
compile.
Be more robust and include the needed header file.
---
tools/ocaml/libs/xb/xenbus_stubs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tool
ither.
It doesn't yet reformat anything with it, just allows someone that
submits patches to use it if desired (e.g. on new code).
Edwin Török (5):
CODING-STYLE: add .editorconfig to clarify indentation uses spaces
tools/ocaml/libs/xc: add binding to xc_evtchn_status
tools/ocaml/li
event channel port number from
what it initially got booted with.
The information provided here is similar to 'lstevtchn', but rather than
parsing its output it queries the underlying API directly.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/xenctrl.ml | 14 +++
tools/oca
Changes since v1:
* dropped stdint.h patch, still being discussed on where to best fix it
* addressed review comments (see individual patches' changes section)
Edwin Török (4):
CODING-STYLE: add .editorconfig to clarify indentation uses spaces
tools/ocaml/libs/xc: add bindi
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
---
Changes since v1:
* drop accidental extra numbers in variant names
* use 'val' instead of 'result' f
hat
do not (want to) use it.
It also won't cause re-indentation of existing files when edited, only
newly added lines would follow the convention.
No functional change.
Signed-off-by: Edwin Török
---
.editorconfig | 20
1 file changed, 20 insertions(+)
create mode 10064
ueries the underlying API directly.
Signed-off-by: Edwin Török
---
Changes since v1:
* drop paragraph about where this is used
* add comment about max port
* use Xeneventchn.virq_t instead of int, add a dependency: xc -> eventchn
* initialize struct without memset-ing first
* use 2 CAMLreturn, I found
1 - 100 of 192 matches
Mail list logo