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

2024-02-08 Thread Petr Beneš
> On Thu, Feb 8, 2024 at 10:14 AM Christian Lindig > wrote: > > > On 7 Feb 2024, at 22:04, Petr Beneš wrote: > > > > > > Add the missing `vmtrace_buf_kb` field to the OCaml bindings to match the > > vm.cfg configuration, correcting an oversight from its i

[PATCH] x86/hvm: Fix fast singlestep state persistence

2024-02-08 Thread Petr Beneš
From: Petr Beneš This patch addresses an issue where the fast singlestep setting would persist despite xc_domain_debug_control being called with XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_OFF. Specifically, if fast singlestep was enabled in a VMI session and that session stopped before the MTF trap

[PATCH] x86: Add configuration options for max_altp2m and max_nestedp2m limits

2024-02-06 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m and nestedp2m tables through boot-time parameters. Previously, the limits were hardcoded to a maximum of 10 for both. This change allows for greater flexibility in environments that require more

[PATCH] x86/altp2m: p2m_altp2m_get_or_propagate() should honor ap2m->default_access

2024-02-06 Thread Petr Beneš
From: Petr Beneš This patch addresses a behavior discrepancy in the handling of altp2m views, where upon the creation and subsequent EPT violation, the page access permissions were incorrectly inherited from the hostp2m instead of respecting the altp2m default_access. Previously, when a new

Re: [PATCH] x86/hvm: Fix fast singlestep state persistence

2024-02-09 Thread Petr Beneš
> On Fri, Feb 9, 2024 at 3:58 PM Andrew Cooper > wrote: > > On 08/02/2024 9:20 pm, Petr Beneš wrote: > > From: Petr Beneš > > > > This patch addresses an issue where the fast singlestep setting would > > persist > > de

[PATCH v2] libxl: Fix comment for LIBXL_HAVE_VMTRACE_BUF_KB

2024-02-13 Thread Petr Beneš
From: Petr Beneš It's located in libxl_domain_build_info, not libxl_domain_create_info. Signed-off-by: Petr Beneš Acked-by: Anthony PERARD --- tools/include/libxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/libxl.h b/tools/include/libxl.h index

Re: [PATCH v2] libxl: Fix comment for LIBXL_HAVE_VMTRACE_BUF_KB

2024-02-13 Thread Petr Beneš
> On Tue, Feb 13, 2024 at 4:02 PM Jan Beulich wrote: > > On 13.02.2024 15:56, Petr Beneš wrote: > > From: Petr Beneš > > > > It's located in libxl_domain_build_info, not libxl_domain_create_info. > > > > Signed-off-by: Petr Beneš > > Acked-by: Antho

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

2024-02-14 Thread Petr Beneš
On Wed, Feb 14, 2024 at 8:12 AM Jan Beulich wrote: > > On 08.02.2024 10:13, Christian Lindig wrote: > >> On 7 Feb 2024, at 22:04, Petr Beneš wrote: > >> Add the missing `vmtrace_buf_kb` field to the OCaml bindings to match the > >> vm.cfg configuration, correct

[PATCH] tools/ocaml: Add missing vmtrace_buf_kb field

2024-02-07 Thread Petr Beneš
From: Petr Beneš Add the missing `vmtrace_buf_kb` field to the OCaml bindings to match the vm.cfg configuration, correcting an oversight from its initial introduction. Signed-off-by: Petr Beneš --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools

[PATCH] libxl: Fix comment for LIBXL_HAVE_VMTRACE_BUF_KB

2024-02-06 Thread Petr Beneš
From: Petr Beneš It's located in libxl_domain_build_info, not libxl_domain_create_info. --- tools/include/libxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/libxl.h b/tools/include/libxl.h index 907aa0a330..14f69823e0 100644 --- a/tools/include/libxl.h

[PATCH] x86/monitor: allow fast-singlestepping without enabling singlestep monitor

2024-04-14 Thread Petr Beneš
From: Petr Beneš Reorder the condition checks within the HVM_MONITOR_SINGLESTEP_BREAKPOINT case to enable fast singlestepping independently of the singlestep monitor being enabled. Previously, fast singlestepping required the singlestep monitor to be explicitly enabled through

[PATCH 0/7] x86: Make MAX_ALTP2M configurable

2024-04-24 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Adjustments

[PATCH 5/7] docs/man: Add max_altp2m parameter to the xl.cfg manual

2024-04-24 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the max_altp2m configuration parameter. Signed-off-by: Petr Beneš --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in

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

2024-04-24 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the max_altp2m parameter. Signed-off-by: Petr Beneš --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 17 ++--- 3 files changed, 12

[PATCH 1/7] x86/p2m: Add braces for better code clarity

2024-04-24 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš --- xen/arch/x86/mm/p2m.c | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index ce742c12e0..eb7996170d 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c

[PATCH 7/7] x86/hap: Increase the number of initial mempool_size to 1024 pages

2024-04-24 Thread Petr Beneš
From: Petr Beneš This change anticipates scenarios where `max_altp2m` is set to its maximum supported value (i.e., 512), ensuring sufficient memory is allocated upfront to accommodate all altp2m tables without initialization failure. Signed-off-by: Petr Beneš --- tools/tests/paging-mempool

[PATCH 2/7] x86/hap: Refactor boolean field assignments

2024-04-24 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš --- xen/arch/x86/mm/hap/hap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 9f964c1d87..d2011fde24 100644 --- a/xen/arch/x86/mm/hap/hap.c

[PATCH 6/7] x86: Make the maximum number of altp2m views configurable

2024-04-24 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Signed-off

[PATCH 3/7] tools/xl: Add max_altp2m parameter

2024-04-24 Thread Petr Beneš
From: Petr Beneš Introduce a new max_altp2m parameter to control the maximum number of altp2m views a domain can use. By default, if max_altp2m is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. Signed-off-by: Petr Beneš --- tools/golang/xenlight

Re: [PATCH 1/7] x86/p2m: Add braces for better code clarity

2024-04-25 Thread Petr Beneš
On Thu, Apr 25, 2024 at 8:21 AM Jan Beulich wrote: > > On 24.04.2024 22:41, Petr Beneš wrote: > > From: Petr Beneš > > > > No functional change. > > > > Signed-off-by: Petr Beneš > > Hmm. I don't really mind the extra braces, but I also don't really

Re: [PATCH 3/7] tools/xl: Add max_altp2m parameter

2024-04-25 Thread Petr Beneš
On Thu, Apr 25, 2024 at 8:19 AM Jan Beulich wrote: > > On 24.04.2024 22:42, Petr Beneš wrote: > > Introduce a new max_altp2m parameter to control the maximum number of altp2m > > views a domain can use. By default, if max_altp2m is unspecified and altp2m > > is >

[PATCH v2 3/7] docs/man: Add max_altp2m parameter to the xl.cfg manual

2024-04-28 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the max_altp2m configuration parameter. Signed-off-by: Petr Beneš --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in

[PATCH v2 1/7] x86/p2m: Add braces for better code clarity

2024-04-28 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš --- xen/arch/x86/mm/p2m.c | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index ce742c12e0..eb7996170d 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c

[PATCH v2 4/7] x86: Make the maximum number of altp2m views configurable

2024-04-28 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. The maximum

[PATCH v2 7/7] x86/hap: Increase the number of initial mempool_size to 1024 pages

2024-04-28 Thread Petr Beneš
From: Petr Beneš This change anticipates scenarios where `max_altp2m` is set to its maximum supported value (i.e., 512), ensuring sufficient memory is allocated upfront to accommodate all altp2m tables without initialization failure. The necessity for this increase arises from the current

[PATCH v2 2/7] tools/xl: Add max_altp2m parameter

2024-04-28 Thread Petr Beneš
From: Petr Beneš Introduce a new max_altp2m parameter to control the maximum number of altp2m views a domain can use. By default, if max_altp2m is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. This change is preparatory; it establishes the groundwork

[PATCH v2 6/7] tools/ocaml: Add max_altp2m parameter

2024-04-28 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the max_altp2m parameter. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- Changed since v1: * Moved this commit AFTER Xen changes (where xen_domctl_createdomain::max_altp2m field is introduced) to avoid breaking

[PATCH v2 5/7] tools/libxl: Activate the max_altp2m feature

2024-04-28 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced max_altp2m parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš --- Changed since v1: * This is a new commit in the series tools/libs/light/libxl_create.c | 1 + 1 file changed, 1 insertion

[PATCH v2 0/7] x86: Make MAX_ALTP2M configurable

2024-04-28 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Adjustments

Re: [PATCH v2 7/7] x86/hap: Increase the number of initial mempool_size to 1024 pages

2024-04-30 Thread Petr Beneš
On Tue, Apr 30, 2024 at 4:47 PM Jan Beulich wrote: > > On 28.04.2024 18:52, Petr Beneš wrote: > > From: Petr Beneš > > > > This change anticipates scenarios where `max_altp2m` is set to its maximum > > supported value (i.e., 512), ensuring sufficie

Re: [PATCH v2 4/7] x86: Make the maximum number of altp2m views configurable

2024-04-30 Thread Petr Beneš
On Tue, Apr 30, 2024 at 4:27 PM Jan Beulich wrote: > > > --- a/xen/arch/x86/domain.c > > +++ b/xen/arch/x86/domain.c > > @@ -685,6 +685,12 @@ int arch_sanitise_domain_config(struct > > xen_domctl_createdomain *config) > > return -EINVAL; > > } > > > > +if ( config->max_altp2m >

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

2024-05-08 Thread Petr Beneš
On Wed, May 8, 2024 at 9:38 PM Andrew Cooper wrote: > Both fields can reasonably share uint32_t, but could you work with Petr > to make both halfs of this land cleanly. Hi, I think creating a new anonymous struct "altp2m" within `struct domain` would be a good fit. uint16_t for my MAX_ALTP2M

Re: [PATCH v2 7/7] x86/hap: Increase the number of initial mempool_size to 1024 pages

2024-05-02 Thread Petr Beneš
On Thu, May 2, 2024 at 8:36 AM Jan Beulich wrote: > > On 30.04.2024 17:40, Petr Beneš wrote: > > On Tue, Apr 30, 2024 at 4:47 PM Jan Beulich wrote: > >> > >> On 28.04.2024 18:52, Petr Beneš wrote: > >>> From: Petr Beneš > >>> > >&g

[PATCH for-4.19? v3 4/6] x86: Make the maximum number of altp2m views configurable

2024-05-16 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m views for the domain during its creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views

[PATCH for-4.19? v3 2/6] tools/xl: Add altp2m_count parameter

2024-05-16 Thread Petr Beneš
From: Petr Beneš Introduce a new altp2m_count parameter to control the maximum number of altp2m views a domain can use. By default, if altp2m_count is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. This change is preparatory; it establishes

[PATCH for-4.19? v3 1/6] x86/p2m: Add braces for better code clarity

2024-05-16 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš Reviewed-by: Stefano Stabellini --- xen/arch/x86/mm/p2m.c | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index ce742c12e0..eb7996170d 100644 --- a/xen/arch/x86/mm/p2m.c

[PATCH for-4.19? v3 6/6] tools/ocaml: Add altp2m_count parameter

2024-05-16 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the altp2m_count parameter. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 11

[PATCH for-4.19? v3 0/6] x86: Make MAX_ALTP2M configurable

2024-05-16 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Adjustments

[PATCH for-4.19? v3 3/6] docs/man: Add altp2m_count parameter to the xl.cfg manual

2024-05-16 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the altp2m_count configuration parameter. Signed-off-by: Petr Beneš --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in

[PATCH for-4.19? v3 5/6] tools/libxl: Activate the altp2m_count feature

2024-05-16 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced altp2m_count parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš --- tools/libs/light/libxl_create.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/light/libxl_create.c b/tools

Re: [PATCH v2 1/7] x86/p2m: Add braces for better code clarity

2024-04-29 Thread Petr Beneš
On Mon, Apr 29, 2024 at 9:07 AM Jan Beulich wrote: > > On 28.04.2024 18:52, Petr Beneš wrote: > > From: Petr Beneš > > > > No functional change. > > > > Signed-off-by: Petr Beneš > > Where did Stefano's R-b go? > > Jan Oh no, I missed that one. Should I do v3?

[PATCH for-4.19? v4 4/6] x86: Make the maximum number of altp2m views configurable

2024-05-18 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m views for the domain during its creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views

[PATCH for-4.19? v4 2/6] tools/xl: Add altp2m_count parameter

2024-05-18 Thread Petr Beneš
From: Petr Beneš Introduce a new altp2m_count parameter to control the maximum number of altp2m views a domain can use. By default, if altp2m_count is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. This change is preparatory; it establishes

[PATCH for-4.19? v4 3/6] docs/man: Add altp2m_count parameter to the xl.cfg manual

2024-05-18 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the altp2m_count configuration parameter. Signed-off-by: Petr Beneš --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in

[PATCH for-4.19? v4 1/6] x86/p2m: Add braces for better code clarity

2024-05-18 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš Reviewed-by: Stefano Stabellini --- xen/arch/x86/mm/p2m.c | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 4a4620e870..db5d9b6c2a 100644 --- a/xen/arch/x86/mm/p2m.c

[PATCH for-4.19? v4 0/6] x86: Make MAX_ALTP2M configurable

2024-05-18 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Adjustments

[PATCH for-4.19? v4 5/6] tools/libxl: Activate the altp2m_count feature

2024-05-18 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced altp2m_count parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš --- tools/libs/light/libxl_create.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/light/libxl_create.c b/tools

[PATCH for-4.19? v4 6/6] tools/ocaml: Add altp2m_count parameter

2024-05-18 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the altp2m_count parameter. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 11

Re: [PATCH for-4.19? v3 4/6] x86: Make the maximum number of altp2m views configurable

2024-05-18 Thread Petr Beneš
On Sat, May 18, 2024 at 3:18 AM Tamas K Lengyel wrote: > > > -ap2m = array_access_nospec(d->arch.altp2m_p2m, altp2m_idx); > > +ap2m = d->arch.altp2m_p2m[altp2m_idx]; > > Why is it no longer necessary to use array_access_nospec? > > Tamas I was under the impression that when the

Re: [PATCH for-4.19? v4 4/6] x86: Make the maximum number of altp2m views configurable

2024-05-29 Thread Petr Beneš
On Mon, May 27, 2024 at 8:19 AM Jan Beulich wrote: > > > This is suspicious: You compare against one value but log another. This > isn't EPT-specific, so shouldn't use MAX_EPTP. Sorry, I copy-pasted a snippet and didn't edit it correctly. Of course, it should have been: if ( config->nr_altp2m >

Re: [PATCH for-4.19? v4 4/6] x86: Make the maximum number of altp2m views configurable

2024-05-26 Thread Petr Beneš
On Tue, May 21, 2024 at 12:59 PM Jan Beulich wrote: > > The compared entities don't really fit together. I think we want a new > MAX_NR_ALTP2M, which - for the time being - could simply be > > #define MAX_NR_ALTP2M MAX_EPTP > > in the header. That would then be a suitable replacement for the >

[PATCH for-4.19? v5 07/10] xen: Make the maximum number of altp2m views configurable for x86

2024-06-02 Thread Petr Beneš
From: Petr Beneš x86: Make the maximum number of altp2m views configurable This commit introduces the ability to configure the maximum number of altp2m views for the domain during its creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility

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

2024-06-02 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views

[PATCH for-4.19? v5 03/10] xen: Refactor altp2m options into a structured format

2024-06-02 Thread Petr Beneš
From: Petr Beneš Encapsulate the altp2m options within a struct. This change is preparatory and sets the groundwork for introducing additional parameter in subsequent commit. Signed-off-by: Petr Beneš --- tools/libs/light/libxl_create.c | 6 +++--- tools/ocaml/libs/xc/xenctrl_stubs.c | 4

[PATCH for-4.19? v5 05/10] docs/man: Add altp2m_count parameter to the xl.cfg manual

2024-06-02 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the altp2m_count configuration parameter. Signed-off-by: Petr Beneš --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in

[PATCH for-4.19? v5 08/10] tools/libxl: Activate the altp2m_count feature

2024-06-02 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced altp2m_count parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš --- tools/libs/light/libxl_create.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/libs/light/libxl_create.c b

[PATCH for-4.19? v5 04/10] tools/xl: Add altp2m_count parameter

2024-06-02 Thread Petr Beneš
From: Petr Beneš Introduce a new altp2m_count parameter to control the maximum number of altp2m views a domain can use. By default, if altp2m_count is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. This change is preparatory; it establishes

[PATCH for-4.19? v5 10/10] tools/ocaml: Add altp2m_count parameter

2024-06-02 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the altp2m_count parameter. Signed-off-by: Petr Beneš --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 19 +++ 3 files changed, 17

[PATCH for-4.19? v5 06/10] x86/altp2m: Introduce accessor functions for safer array indexing

2024-06-02 Thread Petr Beneš
From: Petr Beneš This patch introduces a set of accessor functions for altp2m array operations, and refactoring direct array accesses with them. This approach aims on improving the code clarity and also future-proofing the codebase against potential speculative execution attacks. Signed-off

[PATCH for-4.19? v5 02/10] tools/ocaml: Add missing ocaml bindings for altp2m_opts

2024-06-02 Thread Petr Beneš
From: Petr Beneš Fixes: 0291089f6ea8 ("xen: enable altp2m at create domain domctl") Signed-off-by: Petr Beneš --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 9 ++--- 3 files changed, 8 insert

[PATCH for-4.19? v5 01/10] tools/ocaml: Fix mixed tabs/spaces

2024-06-02 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš --- tools/ocaml/libs/xc/xenctrl_stubs.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index c6da9bb091

[PATCH for-4.19? v5 09/10] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0

2024-06-02 Thread Petr Beneš
From: Petr Beneš Since libxl finally sends the altp2m.nr value, we can remove the previously introduced temporary workaround. Creating domain with enabled altp2m while setting altp2m.nr == 0 doesn't make sense and it's probably not what user wants. Signed-off-by: Petr Beneš --- xen/arch/x86

Re: [PATCH for-4.19? v5 07/10] xen: Make the maximum number of altp2m views configurable for x86

2024-06-08 Thread Petr Beneš
On Thu, Jun 6, 2024 at 9:24 AM Jan Beulich wrote: > > @@ -122,7 +131,12 @@ int p2m_init_altp2m(struct domain *d) > > struct p2m_domain *hostp2m = p2m_get_hostp2m(d); > > > > mm_lock_init(>arch.altp2m_list_lock); > > -for ( i = 0; i < MAX_ALTP2M; i++ ) > > +d->arch.altp2m_p2m =

Re: [PATCH for-4.19? v5 09/10] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0

2024-06-08 Thread Petr Beneš
The flag isn't bool. It can hold one of 3 values (besides 0). P. On Thu, Jun 6, 2024 at 9:57 AM Jan Beulich wrote: > > On 02.06.2024 22:04, Petr Beneš wrote: > > From: Petr Beneš > > > > Since libxl finally sends the altp2m.nr value, we can remove the previously

Re: [PATCH for-4.19? v5 07/10] xen: Make the maximum number of altp2m views configurable for x86

2024-06-10 Thread Petr Beneš
> (when booted with altp2m=1) Sorry, forgot to remove this statement before sending the email, it's not really true. I wanted to add that as I wrote in a previous email exchange - altp2m should be ideally initialized only when it's requested - as opposed to the current situation, when it's

Re: [PATCH for-4.19? v5 07/10] xen: Make the maximum number of altp2m views configurable for x86

2024-06-10 Thread Petr Beneš
On Mon, Jun 10, 2024 at 12:16 PM Jan Beulich wrote: > > On 10.06.2024 11:10, Petr Beneš wrote: > > On Mon, Jun 10, 2024 at 9:30 AM Jan Beulich wrote: > >> > >> On 09.06.2024 01:06, Petr Beneš wrote: > >>> On Thu, Jun 6, 2024 at 9:24 AM Jan Beulic

Re: [PATCH for-4.19? v5 07/10] xen: Make the maximum number of altp2m views configurable for x86

2024-06-10 Thread Petr Beneš
On Mon, Jun 10, 2024 at 9:30 AM Jan Beulich wrote: > > On 09.06.2024 01:06, Petr Beneš wrote: > > On Thu, Jun 6, 2024 at 9:24 AM Jan Beulich wrote: > >>> @@ -122,7 +131,12 @@ int p2m_init_altp2m(struct domain *d) > >>> struct p2m

Re: [PATCH for-4.19? v5 07/10] xen: Make the maximum number of altp2m views configurable for x86

2024-06-10 Thread Petr Beneš
On Mon, Jun 10, 2024 at 1:21 PM Jan Beulich wrote: > > On 10.06.2024 12:34, Petr Beneš wrote: > > On Mon, Jun 10, 2024 at 12:16 PM Jan Beulich wrote: > >> > >> On 10.06.2024 11:10, Petr Beneš wrote: > >>> On Mon, Jun 10, 2024 at 9:30 AM Jan Beulich wrot

[PATCH for-4.19? v6 1/9] tools/ocaml: Fix mixed tabs/spaces

2024-06-10 Thread Petr Beneš
From: Petr Beneš No functional change. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl_stubs.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc

[PATCH for-4.19? v6 9/9] tools/ocaml: Add altp2m_count parameter

2024-06-10 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the altp2m_count parameter. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 19

[PATCH for-4.19? v6 7/9] tools/libxl: Activate the altp2m_count feature

2024-06-10 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced altp2m_count parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš --- tools/libs/light/libxl_create.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/libs/light/libxl_create.c b

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

2024-06-10 Thread Petr Beneš
From: Petr Beneš Encapsulate the altp2m options within a struct. This change is preparatory and sets the groundwork for introducing additional parameter in subsequent commit. Signed-off-by: Petr Beneš Acked-by: Julien Grall # arm Reviewed-by: Jan Beulich # hypervisor --- tools/libs/light

[PATCH for-4.19? v6 5/9] docs/man: Add altp2m_count parameter to the xl.cfg manual

2024-06-10 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the altp2m_count configuration parameter. Signed-off-by: Petr Beneš --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in

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

2024-06-11 Thread Petr Beneš
On Tue, Jun 11, 2024 at 8:41 AM Jan Beulich wrote: > > On 10.06.2024 19:10, Petr Beneš wrote: > > From: Petr Beneš > > > > Encapsulate the altp2m options within a struct. This change is preparatory > > and sets the groundwork for introducing additional para

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

2024-06-11 Thread Petr Beneš
On Tue, Jun 11, 2024 at 11:36 AM Jan Beulich wrote: > > On 11.06.2024 11:34, Petr Beneš wrote: > > On Tue, Jun 11, 2024 at 11:14 AM Jan Beulich wrote: > >> On 11.06.2024 10:00, Petr Beneš wrote: > >>> On Tue, Jun 11, 2024 at 8:41 AM Jan Beulich wrote: >

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

2024-06-11 Thread Petr Beneš
On Tue, Jun 11, 2024 at 11:14 AM Jan Beulich wrote: > > On 11.06.2024 10:00, Petr Beneš wrote: > > On Tue, Jun 11, 2024 at 8:41 AM Jan Beulich wrote: > >> > >> On 10.06.2024 19:10, Petr Beneš wrote: > >>> From: Petr Beneš > >>> > >&g

[PATCH for-4.19? v6 6/9] xen: Make the maximum number of altp2m views configurable for x86

2024-06-10 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m views for the domain during its creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views

[PATCH for-4.19? v6 2/9] tools/ocaml: Add missing ocaml bindings for altp2m_opts

2024-06-10 Thread Petr Beneš
From: Petr Beneš Fixes: 0291089f6ea8 ("xen: enable altp2m at create domain domctl") Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 9 ++--

[PATCH for-4.19? v6 4/9] tools/xl: Add altp2m_count parameter

2024-06-10 Thread Petr Beneš
From: Petr Beneš Introduce a new altp2m_count parameter to control the maximum number of altp2m views a domain can use. By default, if altp2m_count is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. This change is preparatory; it establishes

[PATCH for-4.19? v6 0/9] x86: Make MAX_ALTP2M configurable

2024-06-10 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views

[PATCH for-4.19? v6 8/9] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0

2024-06-10 Thread Petr Beneš
From: Petr Beneš Since libxl finally sends the altp2m.nr value, we can remove the previously introduced temporary workaround. Creating domain with enabled altp2m while setting altp2m.nr == 0 doesn't make sense and it's probably not what user wants. Signed-off-by: Petr Beneš Acked-by: Jan