ey change relatively 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: Chri
ey change relatively 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: Chri
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 of
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
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 that
nt 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
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
Cc: Christian Lindig
---
.editorconfig | 20
1 file changed, 20 insertions(
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
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
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
---
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
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 prerequis
e that the live-update fuzz test doesn't yet pass, it is still able to find
bugs.
However the reduced version with a fixed seed used as a unit test does pass,
so it is useful to have it committed, and further improvements can be made later
as more bugs are discovered and fixed.
Edwin Tör
Do not dump -1, it'll trigger an assertion, use 0xFF.. instead.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/connection.ml | 63 +
tools/ocaml/xenstored/disk.ml | 3 +-
2 files changed, 49 insertions(+), 17 deletions(-)
diff --git a/tools/
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
---
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 5f1155273e..87ef540918 100644
--- a/docs/designs/xenstore-migration.md
+++ b/docs
format has
been
released as part of the security series)
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/perms.ml | 2 +
tools/ocaml/xenstored/xenstored.ml | 202 -
2 files changed, 174 insertions(+), 30 deletions(-)
diff --git a/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
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/dune | 12 +
tools/ocaml/xenstored/test
Also expose these macros in a header file that can be reused by
the upcoming grant table code.
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
config
file
is valid *for the new binary*.
Signed-off-by: Edwin Török
---
tools/ocaml/xenstored/parse_arg.ml | 4
tools/ocaml/xenstored/process.ml | 2 +-
tools/ocaml/xenstored/xenstored.ml | 9 +++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/tools/ocaml
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
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: Juergen Gross
Signed-off-by: Edwin Török
---
t
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
nt.ml needs to be in a dir other than xenstored/.
Signed-off-by: Edwin Török
---
tools/ocaml/Makefile | 1 +
tools/ocaml/libs/mmap/Makefile | 19 +++--
tools/ocaml/libs/mmap/dune | 10 +++
tools/ocaml/libs/mmap/gnt.ml | 60 ++
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
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
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
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 to
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 syslog to
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
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 cou
ctly, so those patches+AMD CPUID fix could 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 refere
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
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
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
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.
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
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(-)
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
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
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
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 the
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
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.
Sig
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
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
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 needs
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
/-/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
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 100755
--
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
x27;t yet measured 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 +++
ner, 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
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
aml 5.0 won't have support for naked pointers 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 o
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 f889a7a
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
---
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
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
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
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
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
`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
all just domain_getinfo (or get 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
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
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 ++
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
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
, not tabs, so there really 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):
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
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 updat
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
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
fatal 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 losi
dying domain,
and X86-64 would return 0 with possibly 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-
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
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
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 for
in the update stream, so 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.1
).
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
ains which 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
---
t
en_pmu_hv_stacktrace` for
future-proofing.
No functional change.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu.c | 2 +-
xen/arch/x86/cpu/vpmu_amd.c | 2 +-
xen/arch/x86/cpu/vpmu_intel.c | 2 +-
xen/include/public/arch-arm.h | 1 +
xen/include/public/arch-ppc.h
Linux already has a similar BUILD_BUG_ON.
Currently this struct is ~224 bytes on x86-64.
No functional change.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu.c | 1 +
xen/include/public/pmu.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86
meanwhile it is useful to have
some way for automatically converting stacktraces.
Signed-off-by: Edwin Török
---
xen/tools/pyperf.py | 146
1 file changed, 146 insertions(+)
create mode 100644 xen/tools/pyperf.py
diff --git a/xen/tools/pyperf.py b/xen
Using `aa2u` tool.
Signed-off-by: Edwin Török
---
xen/include/public/arch-x86/pmu.h | 47 ---
xen/include/public/pmu.h | 2 +-
2 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/xen/include/public/arch-x86/pmu.h
b/xen/include/public/arch-x86
Signed-off-by: Edwin Török
---
arch/x86/include/asm/xen/interface.h | 100 +++
include/xen/interface/xenpmu.h | 56 +--
2 files changed, 152 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/xen/interface.h
b/arch/x86/include/asm/xen
s always initialized to the
correct value, and ip is set to 0.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu.c | 33 -
xen/arch/x86/include/asm/vpmu.h | 1 +
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/cpu/vpmu.c b/
A followup commit will use this to store the guest's regs when domid ==
DOMID_XEN.
To avoid code duplication move the code into a function.
No functional change.
Signed-off-by: Edwin Török
---
xen/arch/x86/cpu/vpmu.c | 49 ++---
1 file changed, 26 inser
stacktraces, that is fixed here!
* Dom0 must run hard pinned on all host CPUs
* Watchdog must be disabled
* not security supported
* x86 only
* secureboot needs to be disabled
Edwin Török (10):
pmu.h: add a BUILD_BUG_ON to ensure it fits within one page
arch-x86/pmu.h: docu
101 - 200 of 206 matches
Mail list logo