Do not rely on the string values of the `Failure` exception,
but use the `_opt` functions instead.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/config.ml | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/tools/ocaml/xenstored/config.ml b/tools
, and a better fit for the immutable xenstore
tree.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/quota.ml | 65 ++
1 file changed, 34 insertions(+), 31 deletions(-)
diff --git a/tools/ocaml/xenstored/quota.ml b/tools/ocaml/xenstored/quota.ml
index 300d78a50b
the speedup, but thought to send out the patch for
review early.
Edwin Török (2):
oxenstored: use Map instead of Hashtbl for quotas
oxenstored: make Quota.t pure
tools/ocaml/xenstored/quota.ml | 65 ++
tools/ocaml/xenstored/store.ml | 17 +
2 files
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.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/quota.ml | 8
tools/ocaml/xenstored/store.ml
for OCaml <4.03)
Signed-off-by: Edwin Török
---
tools/configure | 2 +-
tools/configure.ac| 2 +-
tools/ocaml/xenstored/disk.ml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/configure b/tools/configure
index 0135a0059a..5723efaa56 100
/-/pipelines/1158302827
Edwin Török (2):
oxenstored: fix build on OCaml 5.x
tools/ocaml: bump minimum version to OCaml 4.05
tools/configure | 2 +-
tools/configure.ac| 2 +-
tools/ocaml/xenstored/disk.ml | 2 +-
3 files changed, 3 insertions(+), 3 deletions
-off-by: Edwin Török
---
tools/configure| 2 +-
tools/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/configure b/tools/configure
index 5723efaa56..3d557234b3 100755
--- a/tools/configure
+++ b/tools/configure
@@ -6836,7 +6836,7 @@ else
From: Edwin Török
AnyThread deprecation means a bit in 0xa edx, which we pass through.
(we could also avoid doing the anythread masking, but we need that
for version <= 4 support).
Fixed Counter enumeration means we need to limit fixed counters if we
hide any.
Domain separation ne
From: Edwin Török
Instruction retired perf counter, enabled by writing to a bit in HWCR.
Signed-off-by: Edwin Török
---
xen/arch/x86/include/asm/msr-index.h| 1 +
xen/arch/x86/msr.c | 7 +++
xen/include/public/arch-x86/cpufeatureset.h | 2 +-
3 files
From: Edwin Török
Now that we have a way to set PERF_GLOBAL_STATUS by writing to
PERF_GLOBAL_STATUS_RESET (== PERF_GLOBAL_OVF_CTRL) and
PERF_GLOBAL_STATUS_SET we do not need to intercept this MSR anymore.
We can save/restore its state when saving/loading vPMU state, and
otherwise let the guest
From: Edwin Török
These are available, but were hidden by CPUID previously.
There are IR (all guests), NB and L2I (dom0 only) performance counters too
that need to be implemented, add placeholder entries for them.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu-policy.c
From: Edwin Török
The behaviour is changed from Legacy to Streamlined for the LBR and
PERFMON freeze bits.
See "17.4.7 Freezing LBR and Performance Counters on PMI".
Instead of clearing the freeze bits through DEBUGCTL they are now
cleared through MSR 0x390 like everything else.
From: Edwin Török
Expose MSR_TURBO_RATIO_LIMIT{,1,2} and MSR_TEMPERATURE_TARGET to guest as RO.
Although these are not architectural MSRs they are in the same place
currently on all supported CPUs.
They also have the same meaning, except for 06_55H and 06_5C where
they have a different meaning
From: Edwin Török
This ensures consistency between the 2 pieces of code that check for
VPMU version.
No functional change.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu_intel.c | 20 ++--
xen/arch/x86/include/asm/vpmu.h | 1 +
2 files changed, 7 insertions(+), 14
From: Edwin Török
This is not yet exposed by HVM policies, but PMU version 2 requires that
if PDCM is supported in CPUID then these 2 bits would work.
Signed-off-by: Edwin Török
---
xen/arch/x86/hvm/vmx/vmx.c | 4
xen/arch/x86/include/asm/msr-index.h | 4 +++-
2 files changed
From: Edwin Török
Dom0 should always be able to read this MSR: it is useful when
investigating performance issues in production.
Although the count is Thread scoped, in practice all cores were observed
to return the same count (perhaps due to implementation details of SMM),
so do not require
From: Edwin Török
Depends on the other x86/PMUv4 patches:
"x86/PMUv4: disable intercept for PERF_GLOBAL_STATUS"
"x86/PMUv4: IA32_PERF_GLOBAL_{STATUS_SET, INUSE} support"
"x86/PMUv4: support LBR_Frz and CTR_Frz"
Signed-off-by: Edwin Török
---
xen/arch/x86/inc
From: Edwin Török
Add most architectural MSRs, except those behind CPUID features that are
not yet implemented, such as TME, SGX.
Based on "2.1 Architectural MSRs" of Intel SDM volume 4
Signed-off-by: Edwin Török
---
xen/arch/x86/include/asm/msr-index.h | 54 +
From: Edwin Török
The 0xa CPUID leaf has to report supported number of:
- fixed performance counters
- general purpose performance counters
- architectural predefined events
And the PMU version (which was already limited to 3).
Type punning is used, which should be safe due to -fno-strict
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 lack of support.
See Intel SDM Volume 4, 2.17.6 "MSRs Introduced in the Intel Xeon Scaslable
Processor F
From: Edwin Török
This is part of 'Architectural Performance Monitoring Version 1'
and implemented on Icelake.
Backport: 4.13+
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu_intel.c | 1 +
xen/arch/x86/cpuid.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Edwin Török
The code is currently inconsistent: supports 4 on read and 8 on write.
Sandy Bridge+ supports 8 of these, and the MSR range is architecturally
reserved, so always support 8.
Make it a macro to ensure we use the same value everywhere.
Although DomUs are now restricted to only
From: Edwin Török
Marked as exposed by default, but then hidden if vpmu is not available.
TODO: the interaction between vpmu and policy might need some changes.
Only expose LBR and the full-width MSR capabilities, and not PEBS.
Backport: 4.15+
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu
From: Edwin Török
Expose thse MSRs to the guest when PMU version is >= 4.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu_intel.c | 20 +++-
xen/arch/x86/hvm/vmx/vmx.c | 5 +
xen/arch/x86/pv/emul-priv-op.c | 5 +
3 files changed, 29 insertions(+)
From: Edwin Török
There are only 3 architectural fixed function counters defined,
however Icelake introduces a 4th.
So we'll need to report the number of fixed counter implemented in CPUID
correctly for Icelake, define a macro to ensure we are consistent about
which counter is last.
Note
From: Edwin Török
Only PERFEVTSEL{0-3} are architectural MSRs and Thread scoped.
PERFEVTSEL{4-7} are Core scoped, and we cannot allow using them if more
than 1 guest can attempt to modify them: if they program them with
different events (quite likely when multiplexing) then one of the VMs
would
From: Edwin Török
This is needed so we can expose the maximum supported in CPUID,
without cpuid.c and vpmu_intel.c going out of sync.
The macros defined here take a parameter that controls how the enum
values are used: either to generate case statements or to count how many
elements we have
From: Edwin Török
To more easily lookup the semantics of these MSRs add references to
vendor manuals.
Signed-off-by: Edwin Török
---
xen/arch/x86/include/asm/msr-index.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/xen/arch/x86/include/asm/msr-index.h
b/xen/arch/x86
be backported.
Edwin Török (22):
x86/msr: MSR_PLATFORM_INFO shouldn't claim that turbo is programmable
x86/msr: implement MSR_SMI_COUNT for Dom0 on Intel
x86/msr: always allow a pinned Dom0 to read any unknown MSR
x86/msr-index: add references to vendor manuals
x86/PMUv1: report correct
From: Edwin Török
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.
E.g. SMI count didn't use to be explicitly allowed in the past
(it now is, see a previous commit), but there could
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 fail if the OCaml runtime has been recompiled to use and link with
ASAN for example
(or other situations where a flag needs to be used
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 workaround
was added to log exceptions
directly to sysl
From: Edwin Török
`Tag_cons` is `0` and is meant to be used as the tag argument for
`caml_alloc`/`caml_alloc_small`
when constructing a non-empty list.
The empty list is `Val_emptylist` instead (which is really just `Val_int(0)`).
Assigning `0` to a list value like this is equivalent
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: error: leak
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
was used as a build system this wouldn't be a problem, but we
can't use Dune yet due to OSSTest, which is stuck on Debian oldstable.
No functional change.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Reason for inclusion in 4.17:
Avoids having to put this patch as a prerequisite
Fix unused value warning.
Fixes: 8b3c06a3e5 ("tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free")
Signed-off-by: Edwin Török
Cc: Andrew Cooper
---
Changes:
* new patch
---
tools/ocaml/libs/xc/xenctrl.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t
it to the ring, so the C stub should implement the read-only string
version, and if needed we could use Bytes.unsafe_to_string to be able to send
'bytes'. However that is not necessary as the 'bytes' version is dropped above.
Signed-off-by: Edwin Török
---
Changes:
* new patch
---
tools/ocaml/libs/xb
that the config
file
is valid *for the new binary*.
For compatibility with running old code during live update recognize
--live --help as an equivalent to --config-test.
Signed-off-by: Edwin Török
---
Changes since v2:
* repost of lost patch from 2021:
https://patchwork.kernel.org/project/xen-devel
change code too much for 4.17.
This avoids perpetuating a formatting style that is inconsistent with
the rest of Xen, and that makes preparing and submitting patches more
difficult (OCaml indentation tools usually only support spaces, not tabs).
No functional change.
Signed-off-by: Edwin Török
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
Cc: Christian Lindig
---
.editorconfig | 20
1 file changed, 20 insertions(+)
create mode
to release before destroying the domain.
Signed-off-by: Edwin Török
---
Changes:
* new patch
---
tools/ocaml/libs/xb/xs_ring_stubs.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/ocaml/libs/xb/xs_ring_stubs.c
b/tools/ocaml/libs/xb/xs_ring_stubs.c
index
From: Edwin Török
Various OCaml fixes, some of which got Acked already.
Note: the Data_abstract_val got Acked but not yet commited because we thought
there might be a better way with finalizers/etc.
It is not possible to use finalizers here but there is a new followup patch in
this series
will add use-after-free detection instead.
No functional change.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Reason for inclusion in 4.17:
- make code follow best practice for upcoming OCaml 5.0 compiler (already in
beta)
Changes since v2:
- add Acked-by line
Changes since v3
These functions can potentially take some time,
so allow other OCaml code to proceed meanwhile (if any).
Also raise a Unix_error based on `errno` if `mmap` fails, instead of just
calling failwith (which would lose the error reason).
Signed-off-by: Edwin Török
---
Changes since v2:
* repost
infrequently, so shouldn't cause issues with
backporting security fixes (could either backport the reindentation
patch too, or use git cherry-pick with `-Xignore-space-change`)
Does not yet reformat any code.
No functional change.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changes
infrequently, so shouldn't cause issues with
backporting security fixes (could either backport the reindentation
patch too, or use git cherry-pick with `-Xignore-space-change`)
Does not yet reformat any code.
No functional change.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Changes
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 an exam
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 100644 .editorconfig
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' for local var
* add binding
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 binding
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/ocaml/libs/xc
.
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/libs/xc: add
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
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 100644 .editorconfig
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.mli | 45
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/tools/ocaml/.clang-format
new file mode
otherwise
have IO credit.
Remove the debug line.
Fixes: 42f0581a91 ("tools/oxenstored: Implement live update for socket
connections")
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- bugfix for commit already in master
Changes since v3:
- new in v4
---
tools/ocaml
).
Signed-off-by: Edwin Török
---
docs/process/sending-patches.pandoc | 6 ++
1 file changed, 6 insertions(+)
diff --git a/docs/process/sending-patches.pandoc
b/docs/process/sending-patches.pandoc
index 2e74c3b57e..90ac7b6cf1 100644
--- a/docs/process/sending-patches.pandoc
+++ b/docs
handle that case by
reopening the evtchn as a fallback.
A followup commit will avoid rebind the guest remote port (we cannot
rely on the remote port staying the same, e.g. the windows PV drivers
change it)
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- fixes live update
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 exception instead.
This then needs to be paired with caml_stat_free.
Signed-off-by: Edwin Török
---
Reason
is warning, which means that problems during live
update were not logged at all, unless you've changes oxenstored.conf
prior to live-update.
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- makes live update issues debuggable (live update can be used to apply
security updates to 4.17
See explanation in previous commit.
This introduces a new field into the live update stream to retain both
ports, and handles the missing value in a backward compatible way.
Signed-off-by: Edwin Török
---
Reason for inclusion 4.17:
- fixes a bug in oxenstored live update, needed to make live
bly uninitialized data.
It might be desirable to change the x86 path in the hypervisor to return
EINVAL, although that would require more testing in case it breaks
somethig.
But the bindings should be defensive anyway against bugs like this.
Signed-off-by: Edwin Török
---
Reason for inclusion in 4
error and oxenstored just
disappears you'd want to know why.
There has been at least one observed instance of a bug where oxenstored
just disappeared inexplicably (it was believed due to an OOM exception).
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- avoids losing crucial
ecking; yet it is a good idea to use it once before publishing source code.
Fixes: db471408edd46 "tools/ocaml/xenstored: Fix quota bypass on domain
shutdown"
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- fixes a build error in a previous commit that is already in
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Reason for inclusion in 4.17:
- Fixes a runtime bug with upcoming OCaml 5.0 (already in beta)
Changes since v2:
- added Acked-by line
- add 4.17 reason
---
tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 29 +--
1 file changed, 27
was used as a build system this wouldn't be a problem, but we
can't use Dune yet due to OSSTest, which is stuck on Debian oldstable.
No functional change.
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
Avoids having to put this patch as a prerequisite into a security update.
Earlier
is no reason
to keep the code as is (initially I thought it uses tabs to follow Xen
style, but after reading CODING_STYLE I realized that is not true).
It is very easy to verify that the patch changes nothing with `git diff
-w`, or `git log -p -1`.
Edwin Török (15):
tools/ocaml/libs/eventchn: do
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- needed for a bugfix in a followup commit
Changes since v2:
- new in v3
---
tools/ocaml/libs/eventchn/xeneventchn.ml | 6 +++-
tools/ocaml/libs/eventchn/xeneventchn.mli | 9 +-
tools/ocaml/libs/eventchn
more closely:
https://v2.ocaml.org/manual/intfc.html#ss:c-outside-head
It also makes it clearer that these modules have been reviewed for
compat with OCaml 5.0.
No functional change.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Reason for inclusion in 4.17:
- make code follow best
Follow the manual to avoid naked pointers:
https://v2.ocaml.org/manual/intfc.html#ss:c-outside-head
No functional change, except on OCaml 5.0 where it is a bugfix.
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
Reason for inclusion in 4.17:
- bugfix for upcoming OCaml 5.0 compiler
Fixes: 2f2b76d47c5bcd9 ("tools/ocaml: do not run ocamldep during make clean")
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- addresses review comments received post commit
Changes since v2:
- add Fixes line
- add 4.17 reason
---
tools/ocaml/Makefile.rules | 2 +-
1 fi
Fixes: 2f2b76d47c5bcd9 ("tools/ocaml: do not run ocamldep during make clean")
Signed-off-by: Edwin Török
---
Reason for inclusion in 4.17:
- addresses review comments received post commit
Changes since v2:
- add Fixes line
- add 4.17 reason
---
tools/ocaml/Makefile.rules | 4 ++
ecking; yet it is a good idea to use it once before publishing source code.
Fixes: db471408edd46 "tools/ocaml/xenstored: Fix quota bypass on domain
shutdown"
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/store.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dif
t the
mapping from xenstore if not in the cache), but it looks like that
improvement is not even needed if this function barely registers on a
flamegraph now.
P.S.: the mirage test VM is a very old PV version, at some point we'll
repeat the test with a Solo5 based PVH one.
Edwin Török (2):
xen
of `domain_getinfolist`
in a lot of places where info list is used, but that is another
optimization.
Signed-off-by: Edwin Török
Tested-by: Pau Ruiz Safont
---
tools/ocaml/libs/xc/xenctrl.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml
ead of having pairs of 2 changing direction every time.
Signed-off-by: Edwin Török
Tested-by: Pau Ruiz Safont
---
tools/ocaml/libs/xc/xenctrl.ml | 23 +--
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl
Live Update")
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
Release-acked-by: Henry Wang
---
tools/ocaml/xenstored/xenstored.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/ocaml/xenstored/xenstored.ml
b/tools/ocaml/xenstored/xenstored.ml
index
Live Update")
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/xenstored.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/ocaml/xenstored/xenstored.ml
b/tools/ocaml/xenstored/xenstored.ml
index fc90fcdeb5..3299fe73f7 100644
--- a/tools/ocaml/xenstored/xe
Signed-off-by: Edwin Török
---
tools/ocaml/Makefile.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
index 0d3c6ac839..e0b9de34e4 100644
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
@@ -44,7
Signed-off-by: Edwin Török
---
tools/ocaml/Makefile.rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
index e0b9de34e4..39ac260a4d 100644
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
Follow the manual to avoid naked pointers:
https://v2.ocaml.org/manual/intfc.html#ss:c-outside-head
No functional change, except on OCaml 5.0 where it is a bugfix.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/xenctrl_stubs.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions
Signed-off-by: Edwin Török
Acked-by: Christian Lindig
---
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..
ers at all, and thus
it doesn't have the checker either)
It would be good to get this included in Xen 4.17, especially that it
changes the internal ABI of xenctrl bindings.
Edwin Török (5):
tools/ocaml/Makefile.rules: do not run ocamldep on distclean
tools/ocaml/Makefile.rules: hide -incl
more closely:
https://v2.ocaml.org/manual/intfc.html#ss:c-outside-head
It also makes it clearer that these modules have been reviewed for
compat with OCaml 5.0.
No functional change.
Signed-off-by: Edwin Török
---
tools/ocaml/libs/mmap/xenmmap_stubs.c | 2 +-
tools/ocaml/libs/xb/xs_ring_stubs.c
-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
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
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 change.
Signed-off-by: Edwin Török
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/ocaml/Makefile.rules b/tools
.
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 | 1
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(+), 13 deletions(-)
diff
.
No 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
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
--- a/t
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
, an 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
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
to allow mixing
declarations and code to simplify writing the stubs
by using variable length arrays on the stack instead of
allocating/freeing memory
(which would require additional error-handling logic).
Signed-off-by: Edwin Török
---
tools/ocaml/libs/xc/Makefile| 2 +-
tools/ocaml/libs
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/gnt.ml | 14 --
tools/ocaml/libs/mmap/gnt.mli | 3 ++-
tools/ocaml/libs
1 - 100 of 192 matches
Mail list logo