Re: [Viryaos-discuss] [ImageBuilder] [PATCH 2/2] uboot-script-gen: Enable direct mapping of statically allocated memory

2022-06-23 Thread xenia
Hi Ayan! On 6/23/22 13:02, Ayan Kumar Halder wrote: (Resending mail, as the previous delivery failed) On 21/06/2022 12:34, Ayan Kumar Halder wrote: Hi, On 19/06/2022 13:43, Xenia Ragiadakou wrote: Direct mapping for dom0less VMs is disabled by default in XEN and can be enabled through the

Re: [Viryaos-discuss] [ImageBuilder] [PATCH 1/2] uboot-script-gen: Skip dom0 instead of exiting if DOM0_KERNEL is not set

2022-06-23 Thread xenia
t; should not be defined         exit 1     fi fi The reason is that user should not be allowed to provide with an incorrect configuration. Sure. I will do with a follow-on patch. 3. Please test the patch for both dom0 and dom0less. The reason being such a change might break something. :)

Re: [PATCH 2/5] xen/common: vm_event: Fix MISRA C 2012 Rule 8.7 violation

2022-06-27 Thread xenia
Hi Jan, On 6/27/22 10:11, Jan Beulich wrote: On 26.06.2022 23:11, Xenia Ragiadakou wrote: The function vm_event_wake() is referenced only in vm_event.c. Change the linkage of the function from external to internal by adding the storage-class specifier static to the function definition. This

Re: [PATCH 2/5] xen/common: vm_event: Fix MISRA C 2012 Rule 8.7 violation

2022-06-27 Thread xenia
Hi Jan, On 6/27/22 11:43, Jan Beulich wrote: On 27.06.2022 09:54, xenia wrote: On 6/27/22 10:11, Jan Beulich wrote: On 26.06.2022 23:11, Xenia Ragiadakou wrote: The function vm_event_wake() is referenced only in vm_event.c. Change the linkage of the function from external to internal by

Re: [PATCH] xen/arm: smmu-v3: Fix MISRA C 2012 Rule 1.3 violations

2022-06-29 Thread xenia
Hi Bertrand, On 6/29/22 10:24, Bertrand Marquis wrote: Hi Xenia, On 28 Jun 2022, at 16:08, Xenia Ragiadakou wrote: The expression 1 << 31 produces undefined behaviour because the type of integer constant 1 is (signed) int and the result of shifting 1 by 31 bits is not representable

Re: [PATCH 2/2] uboot-script-gen: do not enable direct mapping by default

2022-06-29 Thread xenia
Hi Stefano, On 6/29/22 03:28, Stefano Stabellini wrote: On Sun, 26 Jun 2022, Xenia Ragiadakou wrote: To be inline with XEN, do not enable direct mapping automatically for all statically allocated domains. Signed-off-by: Xenia Ragiadakou Actually I don't know about this one. I think it

Re: [PATCH 2/2] uboot-script-gen: do not enable direct mapping by default

2022-06-30 Thread xenia
Hi Ayan, On 6/30/22 14:28, Ayan Kumar Halder wrote: On 29/06/2022 21:28, Stefano Stabellini wrote: On Wed, 29 Jun 2022, Ayan Kumar Halder wrote: Hi Stefano/Xenia, On 29/06/2022 18:01, xenia wrote: Hi Stefano, On 6/29/22 03:28, Stefano Stabellini wrote: On Sun, 26 Jun 2022, Xenia

[PATCH] xen/char: imx-lpuart: Fix MISRA C 2012 Rule 20.7 violation

2022-08-02 Thread Xenia Ragiadakou
The macro parameter 'off' is used as an expression and it is good to be enclosed in parentheses to prevent against unintended expansion. Signed-off-by: Xenia Ragiadakou --- xen/drivers/char/imx-lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/driver

Re: [PATCH] xen/char: imx-lpuart: Fix MISRA C 2012 Rule 20.7 violation

2022-08-02 Thread Xenia Ragiadakou
Hi Jan, On 8/2/22 14:58, Jan Beulich wrote: On 02.08.2022 09:54, Xenia Ragiadakou wrote: --- a/xen/drivers/char/imx-lpuart.c +++ b/xen/drivers/char/imx-lpuart.c @@ -26,8 +26,8 @@ #include #include -#define imx_lpuart_read(uart, off) readl((uart)->regs + off) -#def

[PATCH] xen/char: mvebu-uart: Fix MISRA C 2012 Rule 20.7 violation

2022-08-03 Thread Xenia Ragiadakou
The macro parameters 'off' and 'uart' are used as expressions and it is good to be enclosed in parentheses to prevent against unintended expansion. For the 'uart' case, in mvebu3700_write(), correct the second parentheses that seems to have been accidently mi

[PATCH] xen/compiler: Fix MISRA C 2012 Rule 20.7 violation

2022-08-04 Thread Xenia Ragiadakou
In __must_be_array(), the macro parameter 'a' is used as expression and therefore it is good to be enclosed in parentheses to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/include/xen/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v2] xen/hypfs: check the return value of snprintf to avoid leaking stack accidently

2022-08-04 Thread Xenia Ragiadakou
snprintf to prevent leaking stack contents to the guest by accident. Also, for debug builds, add an assertion to ensure that the assumption made on the size of the destination buffer still holds. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - add ASSERT_UNREACHABLE() - update commit

Re: [PATCH v2] xen/hypfs: check the return value of snprintf to avoid leaking stack accidently

2022-08-04 Thread Xenia Ragiadakou
Hi Jan, On 8/4/22 16:01, Jan Beulich wrote: On 04.08.2022 14:47, Xenia Ragiadakou wrote: Changes in v2: - add ASSERT_UNREACHABLE() Hmm, this ... --- a/xen/common/hypfs.c +++ b/xen/common/hypfs.c @@ -377,8 +377,10 @@ int hypfs_read_dyndir_id_entry(const struct hypfs_entry_dir *template

Re: [PATCH v2] xen/hypfs: check the return value of snprintf to avoid leaking stack accidently

2022-08-04 Thread Xenia Ragiadakou
On 8/4/22 16:13, Jan Beulich wrote: On 04.08.2022 15:10, Xenia Ragiadakou wrote: On 8/4/22 16:01, Jan Beulich wrote: On 04.08.2022 14:47, Xenia Ragiadakou wrote: Changes in v2: - add ASSERT_UNREACHABLE() Hmm, this ... --- a/xen/common/hypfs.c +++ b/xen/common/hypfs.c @@ -377,8 +377,10

[PATCH v3] xen/hypfs: check the return value of snprintf to avoid leaking stack accidently

2022-08-04 Thread Xenia Ragiadakou
snprintf to prevent leaking stack contents to the guest by accident. Also, for debug builds, add an assertion to ensure that the assumption made on the size of the destination buffer still holds. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - add ASSERT_UNREACHABLE() - update commit

[PATCH] xen/cpu: Fix MISRA C 2012 Rule 20.7 violation

2022-08-05 Thread Xenia Ragiadakou
In MASK_DECLARE_1(), the macro parameter 'x' is used as expression and therefore it is good to be enclosed in parentheses to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/common/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH v2 2/3] xen/cpu: Add missing white space around arithmetic operators

2022-08-05 Thread Xenia Ragiadakou
Signed-off-by: Xenia Ragiadakou --- Changes in v2: - new patch xen/common/cpu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/cpu.c b/xen/common/cpu.c index feb2a6634e..c48a1cabd2 100644 --- a/xen/common/cpu.c +++ b/xen/common/cpu.c @@ -25,12 +25,12

[PATCH v2 3/3] xen/cpu: Undefine MASK_DECLARE_ macros after their usage

2022-08-05 Thread Xenia Ragiadakou
MASK_DECLARE_ macros have only a limited scope. Remove their definitions immediately after their usage. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - new patch xen/common/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/common/cpu.c b/xen/common/cpu.c index c48a1cabd2

[PATCH v2 1/3] xen/cpu: Fix MISRA C 2012 Rule 20.7 violation

2022-08-05 Thread Xenia Ragiadakou
In MASK_DECLARE_ macros, the macro parameter 'x' is used as expression and therefore it is good to be enclosed in parentheses to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - fix MISRA C 2012 Rule 20.7 violation in all MASK_DECLARE_ ma

[PATCH v2 0/3] xen/cpu: Minor coding style fixes

2022-08-05 Thread Xenia Ragiadakou
Xenia Ragiadakou (3): xen/cpu: Fix MISRA C 2012 Rule 20.7 violation xen/cpu: Add missing white space around arithmetic operators xen/cpu: Undefine MASK_DECLARE_ macros after their usage xen/common/cpu.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) -- 2.34.1

Re: [PATCH v2 0/3] xen/cpu: Minor coding style fixes

2022-08-05 Thread Xenia Ragiadakou
Hi Jan, On 8/5/22 15:50, Jan Beulich wrote: On 05.08.2022 14:44, Xenia Ragiadakou wrote: Xenia Ragiadakou (3): xen/cpu: Fix MISRA C 2012 Rule 20.7 violation xen/cpu: Add missing white space around arithmetic operators xen/cpu: Undefine MASK_DECLARE_ macros after their usage xen

[PATCH 0/2] automation: Test a pv network interface under dom0less enhanced

2022-08-05 Thread Xenia Ragiadakou
Xenia Ragiadakou (2): automation: qemu-smoke-arm64: Use kernel 5.19 automation: qemu-smoke-arm64: Run ping test over a pv network interface automation/gitlab-ci/build.yaml | 11 + automation/gitlab-ci/test.yaml| 10 +++-- automation/scripts/qemu-smoke

[PATCH 1/2] automation: qemu-smoke-arm64: Use kernel 5.19

2022-08-05 Thread Xenia Ragiadakou
and Dom1 over a pv network interface. Signed-off-by: Xenia Ragiadakou --- automation/gitlab-ci/build.yaml | 11 ++ automation/gitlab-ci/test.yaml| 4 +- .../kernel/5.19-arm64v8.dockerfile| 37 +++ 3 files changed, 50 insertions(+), 2

[PATCH 2/2] automation: qemu-smoke-arm64: Run ping test over a pv network interface

2022-08-05 Thread Xenia Ragiadakou
to Dom1. - In the meantime, Dom1 in its init script tries to assign an ip to eth0 and ping Dom0, - If Dom1 manages to ping Dom0, it prints 'passed'. Signed-off-by: Xenia Ragiadakou --- automation/gitlab-ci/test.yaml | 6 ++-- automation/scripts/qemu-smoke-arm

Re: [PATCH 2/2] automation: qemu-smoke-arm64: Run ping test over a pv network interface

2022-08-06 Thread Xenia Ragiadakou
Hi Stefano, On 8/6/22 04:18, Stefano Stabellini wrote: On Fri, 5 Aug 2022, Stefano Stabellini wrote: On Sat, 6 Aug 2022, Xenia Ragiadakou wrote: This patch modified the test in the following way - Dom0 is booted with an alpine linux rootfs with the xen tools. - Once Dom0 is booted, it starts

[PATCH] xen/arm: regs: Fix MISRA C 2012 Rule 20.7 violation

2022-08-08 Thread Xenia Ragiadakou
In macro psr_mode(), the macro parameter 'm' is used as expression and therefore it is good to be enclosed in parentheses to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v2 2/2] automation: qemu-smoke-arm64: Run ping test over a pv network interface

2022-08-08 Thread Xenia Ragiadakou
to Dom1. - In the meantime, Dom1 in its init script tries to assign an ip to eth0 and ping Dom0, - If Dom1 manages to ping Dom0, it prints 'passed'. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - rebase against the latest changes on staging - search for 'Welcome to Alpine Li

[PATCH v2 0/2] automation: Test a pv network interface under dom0less enhanced

2022-08-08 Thread Xenia Ragiadakou
Xenia Ragiadakou (2): automation: qemu-smoke-arm64: Use kernel 5.19 automation: qemu-smoke-arm64: Run ping test over a pv network interface automation/gitlab-ci/build.yaml | 11 + automation/gitlab-ci/test.yaml| 10 +++-- automation/scripts/qemu-smoke

[PATCH v2 1/2] automation: qemu-smoke-arm64: Use kernel 5.19

2022-08-08 Thread Xenia Ragiadakou
and Dom1 over a pv network interface. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - none automation/gitlab-ci/build.yaml | 11 ++ automation/gitlab-ci/test.yaml| 4 +- .../kernel/5.19-arm64v8.dockerfile| 37 +++ 3 files

[PATCH] xen/arm: vreg: Fix MISRA C 2012 Rule 20.7 violation

2022-08-09 Thread Xenia Ragiadakou
In VREG_REG_HELPERS(), the macro parameter 'offmask' is used as expression and therefore it is good to be enclosed in parentheses to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/vreg.h | 8 1 file changed, 4 insert

[PATCH] xen/arm: vgic: Fix coding style in macro REG_RANK_INDEX()

2022-08-10 Thread Xenia Ragiadakou
Add parentheses around the macro parameter 's' to prevent against unintended expansions. This, also, resolves a MISRA C 2012 Rule 20.7 violation warning. Add white spaces around the subtraction operator. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/vgic.h | 2 +- 1 fi

[PATCH] xen/arm: gic: Fix MISRA C 2012 Rule 20.7 violation

2022-08-10 Thread Xenia Ragiadakou
In GIC_PRI_TO_GUEST(), add parentheses around the macro parameter 'pri' to prevent against unintended expansions and realign comment. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/gic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/a

Re: [PATCH] xen/arm: gic: Fix MISRA C 2012 Rule 20.7 violation

2022-08-13 Thread Xenia Ragiadakou
Hi Julien, On 8/10/22 13:24, Julien Grall wrote: Hi Xenia, Thank for your effort to make Xen MISRA compliant. Personally, I find quite difficult to follow what's going on with dozen of single patches. It is also makes more difficult for a committer to apply them. For instance, tools

[PATCH 2/7] xsm/flask: sidtab: Fix MISRA C 2012 Rule 20.7 violations

2022-08-19 Thread Xenia Ragiadakou
In macros SIDTAB_HASH(), INIT_SIDTAB_LOCK(), SIDTAB_LOCK() and SIDTAB_UNLOCK(), add parentheses around the macro parameter to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/xsm/flask/ss/sidtab.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 3/7] xen/elf: Fix MISRA C 2012 Rule 20.7 violations

2022-08-19 Thread Xenia Ragiadakou
In macros ELF32_ST_TYPE() and ELF64_ST_TYPE(), add parentheses around the macro parameter to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/include/xen/elfstructs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/xen

[PATCH 5/7] xen/rbtree: Fix MISRA C 2012 Rule 20.7 violation

2022-08-19 Thread Xenia Ragiadakou
In macro __rb_parent(), add parentheses around the macro parameter to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/lib/rbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/lib/rbtree.c b/xen/lib/rbtree.c index 85a4f20313..eb418baabb

[PATCH 4/7] xen/vgic: Fix MISRA C 2012 Rule 20.7 violation

2022-08-19 Thread Xenia Ragiadakou
In macro VGIC_V3_LR_INDEX(), add parentheses around the macro parameter to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/new_vgic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/new_vgic.h b

[PATCH 1/7] xen/arm: gic_v3_its: Fix MISRA C 2012 Rule 20.7 violations

2022-08-19 Thread Xenia Ragiadakou
In macros GITS_TYPER_DEVICE_ID_BITS(), GITS_TYPER_EVENT_ID_BITS() and GITS_BASER_ENTRY_SIZE(), add parentheses around the macro parameter to prevent against unintended expansions. Realign subsequent lines, if any. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/gic_v3_its.h | 10

[PATCH 7/7] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations

2022-08-19 Thread Xenia Ragiadakou
In macros dt_for_each_property_node(), dt_for_each_device_node() and dt_for_each_child_node(), add parentheses around the macro parameters that have the arrow operator applied, to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/include/xen/device_tree.h | 6

[PATCH 6/7] xen/arm: processor: Fix MISRA C 2012 Rule 20.7 violations

2022-08-19 Thread Xenia Ragiadakou
In macros MPIDR_LEVEL_SHIFT() and MPIDR_AFFINITY_LEVEL(), add parentheses around the macro parameters 'level' and 'mpidr', respectively, to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/processor.h | 4 ++-- 1 file c

[PATCH 0/7] Fix MISRA C 2012 Rule 20.7 violations

2022-08-19 Thread Xenia Ragiadakou
Xenia Ragiadakou (7): xen/arm: gic_v3_its: Fix MISRA C 2012 Rule 20.7 violations xsm/flask: sidtab: Fix MISRA C 2012 Rule 20.7 violations xen/elf: Fix MISRA C 2012 Rule 20.7 violations xen/vgic: Fix MISRA C 2012 Rule 20.7 violation xen/rbtree: Fix MISRA C 2012 Rule 20.7 violation xen

Re: [PATCH 7/7] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations

2022-08-22 Thread Xenia Ragiadakou
Hi Jan, On 8/22/22 12:59, Jan Beulich wrote: On 19.08.2022 21:43, Xenia Ragiadakou wrote: In macros dt_for_each_property_node(), dt_for_each_device_node() and dt_for_each_child_node(), add parentheses around the macro parameters that have the arrow operator applied, to prevent against

Re: [PATCH 7/7] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations

2022-08-25 Thread Xenia Ragiadakou
On 8/22/22 14:48, Jan Beulich wrote: On 22.08.2022 12:43, Xenia Ragiadakou wrote: On 8/22/22 12:59, Jan Beulich wrote: On 19.08.2022 21:43, Xenia Ragiadakou wrote: In macros dt_for_each_property_node(), dt_for_each_device_node() and dt_for_each_child_node(), add parentheses around the macro

Re: [PATCH 7/7] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations

2022-08-26 Thread Xenia Ragiadakou
aced around all macro parameters that represent expressions, that is #define dt_for_each_property_node(dn, pp) \ for ( (pp) = (dn)->properties; (pp) != NULL; (pp) = (pp)->next ) -- Xenia

[PATCH v2] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations

2022-08-30 Thread Xenia Ragiadakou
Add parentheses around the macro parameters that are used as expressions to prevent against unintended expansions during macro substitution. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - apply rule 20.7 as is, without deviating from it - adjust commit message accordingly Also, in this

Re: [PATCH 0/7] Fix MISRA C 2012 Rule 20.7 violations

2022-09-01 Thread Xenia Ragiadakou
acro parameters used as function arguments and neither cppcheck nor Eclair report violation for missing parentheses around macro parameters used as function arguments. On Fri, 19 Aug 2022, Xenia Ragiadakou wrote: Xenia Ragiadakou (7): xen/arm: gic_v3_its: Fix MISRA C 2012 Rule 20.7 vio

Re: [PATCH 0/7] Fix MISRA C 2012 Rule 20.7 violations

2022-09-02 Thread Xenia Ragiadakou
On 9/2/22 05:07, Stefano Stabellini wrote: On Thu, 1 Sep 2022, Bertrand Marquis wrote: Hi Xenia, On 1 Sep 2022, at 10:27, Xenia Ragiadakou wrote: On 9/1/22 01:35, Stefano Stabellini wrote: Patches 1, 4, and 6 are already committed. I plan to commit patches 2, 3 and 5 in the next couple

[PATCH v3 2/8] x86/iommu: iommu_igfx and iommu_qinval are Intel VT-d specific

2023-01-15 Thread Xenia Ragiadakou
Use CONFIG_INTEL_IOMMU to guard the usage of iommu_igfx and iommu_qinval in common code. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - handle iommu_snoop case in a different patch and update commit msg - use no_config_param() to print a warning when

[PATCH v3 1/8] x86/iommu: amd_iommu_perdev_intremap is AMD-Vi specific

2023-01-15 Thread Xenia Ragiadakou
Move its definition to the AMD-Vi driver and use CONFIG_AMD_IOMMU to guard its usage in common code. Take the opportunity to replace bool_t with bool and 1 with true. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - the second arg of no_config_param

[PATCH v3 0/8] Make x86 IOMMU driver support configurable

2023-01-15 Thread Xenia Ragiadakou
] x86/iommu: introduce AMD-Vi and Intel VT-d Kconfig options" is not included in this series because it has been already merged, and patch "[v2] x86/iommu: iommu_igfx, iommu_qinval and iommu_snoop are VT-d specific" has been splitted up into two separate patches. Xenia Ragiada

[PATCH v3 4/8] x86/acpi: separate AMD-Vi and VT-d specific functions

2023-01-15 Thread Xenia Ragiadakou
calls, implement them as empty static inline functions. Take the opportunity to move the declaration of acpi_dmar_init from the x86 arch-specific header to the common header, since Intel VT-d has been also used on IA-64 platforms. No functional change intended. Signed-off-by: Xenia Ragiadakou

[PATCH v3 3/8] x86/iommu: snoop control is allowed only by Intel VT-d

2023-01-15 Thread Xenia Ragiadakou
-by: Xenia Ragiadakou --- Changes in v3: - new patch This patch depends on Jan's patch "x86/shadow: sanitize iommu_snoop usage" to ensure that iommu_snoop is used only when the iommu is enabled xen/include/xen/iommu.h | 7 ++- 1 file changed, 6 insertions(+), 1 de

[PATCH v3 5/8] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific

2023-01-15 Thread Xenia Ragiadakou
current implementation assumes that only PV guests are prone to this attack, take the opportunity to define untrusted_msi only when PV is enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - change untrusted_msi from being VT-d specific to PV specific and

[PATCH v3 6/8] x86/iommu: call pi_update_irte through an hvm_function callback

2023-01-15 Thread Xenia Ragiadakou
Intel VT-d anymore. Remove the now unused pi_update_irte() implementation. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - open code pi_update_irte() in vmx_pi_update_irte() but instead of using the VT-d specific function msi_msg_write_remap_rte() use the

[PATCH v3 8/8] x86/iommu: make AMD-Vi and Intel VT-d support configurable

2023-01-15 Thread Xenia Ragiadakou
unknowingly disabling it and ending up with a broken hypervisor, make the support user selectable only if EXPERT is enabled. To preserve the current default configuration of an x86 system, both options depend on X86 and default to Y. Signed-off-by: Xenia Ragiadakou Acked-by: Jan Beulich

[PATCH v3 7/8] x86/dpci: move hvm_dpci_isairq_eoi() to generic HVM code

2023-01-15 Thread Xenia Ragiadakou
used only in this file, declare it static. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - in _hvm_dpci_isairq_eoi(), make hvm_irq pointer to const - in hvm_dpci_isairq_eoi(), make dpci pointer to const, add a blank line after

Re: [PATCH v3 5/8] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific

2023-01-15 Thread Xenia Ragiadakou
On 1/16/23 09:04, Xenia Ragiadakou wrote: The variable untrusted_msi indicates whether the system is vulnerable to CVE-2011-1898 due to the absence of interrupt remapping support. AMD iommus with interrupt remapping disabled are also exposed. Therefore move the definition of the variable to

Re: [PATCH v3 6/8] x86/iommu: call pi_update_irte through an hvm_function callback

2023-01-16 Thread Xenia Ragiadakou
On 1/16/23 09:04, Xenia Ragiadakou wrote: Posted interrupt support in Xen is currently implemented only for the Intel platforms. Instead of calling directly pi_update_irte() from the common hvm code, add a pi_update_irte callback to the hvm_function_table. Then, create a wrapper function

Re: [PATCH v3 5/8] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific

2023-01-16 Thread Xenia Ragiadakou
On 1/16/23 18:49, Jan Beulich wrote: On 16.01.2023 08:21, Xenia Ragiadakou wrote: On 1/16/23 09:04, Xenia Ragiadakou wrote: The variable untrusted_msi indicates whether the system is vulnerable to CVE-2011-1898 due to the absence of interrupt remapping support. AMD iommus with interrupt

Re: [PATCH v2] x86/shadow: make iommu_snoop usage consistent with HAP's

2023-01-20 Thread Xenia Ragiadakou
sabled, so there's no point touching it there. Finally also correct a relevant nearby comment. Signed-off-by: Jan Beulich Reviewed-by: Xenia Ragiadakou --- I was first considering to add the extra check to the outermost enclosing if(), but I guess that would break the (questionable) ca

Re: [PATCH] automation: Modify static-mem check in qemu-smoke-dom0less-arm64.sh

2023-01-23 Thread Xenia Ragiadakou
ize} definition rather than adding it in front of each occurence. Signed-off-by: Michal Orzel Reviewed-by: Xenia Ragiadakou Also you fixed the hard tab. --- Patch made as part of the discussion: https://lore.kernel.org/xen-devel/ba37ee02-c07c-2803-0867-149c77989...@amd.com/ C

[PATCH v4 1/5] x86/iommu: snoop control is allowed only by Intel VT-d

2023-01-24 Thread Xenia Ragiadakou
-by: Xenia Ragiadakou --- No changes in v4 Depends on Jan's "x86/shadow: make iommu_snoop usage consistent with HAP's" being applied first. xen/include/xen/iommu.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/include/xen/iommu.h b/xen/inclu

[PATCH v4 3/5] x86/iommu: call pi_update_irte through an hvm_function callback

2023-01-24 Thread Xenia Ragiadakou
Intel VT-d anymore. Remove the now unused pi_update_irte() implementation. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v4: - remove the now unused asm/hvm/vmx/vmcs.h xen/arch/x86/hvm/vmx/vmx.c | 41 ++ xen/arch/x86/include

[PATCH v4 0/5] Make x86 IOMMU driver support configurable

2023-01-24 Thread Xenia Ragiadakou
3 1/8] x86/iommu: amd_iommu_perdev_intremap is AMD-Vi specific" "[v3 2/8] x86/iommu: iommu_igfx and iommu_qinval are Intel VT-d specific" "[v3 4/8] x86/acpi: separate AMD-Vi and VT-d specific functions" are not included in this series because they have been already merged. Xen

[PATCH v4 2/5] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific

2023-01-24 Thread Xenia Ragiadakou
only when PV is enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v4: - in vtd code, guard with CONFIG_PV the use of untrusted_msi - mention in commit log that CVE-2011-1898 currently is not addressed for AMD iommus with

[PATCH v4 4/5] x86/dpci: move hvm_dpci_isairq_eoi() to generic HVM code

2023-01-24 Thread Xenia Ragiadakou
used only in this file, declare it static. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- No changes in v4 xen/drivers/passthrough/vtd/x86/Makefile | 1 - xen/drivers/passthrough/vtd/x86/hvm.c| 64 xen/drivers

[PATCH v4 5/5] x86/iommu: make AMD-Vi and Intel VT-d support configurable

2023-01-24 Thread Xenia Ragiadakou
unknowingly disabling it and ending up with a broken hypervisor, make the support user selectable only if EXPERT is enabled. To preserve the current default configuration of an x86 system, both options depend on X86 and default to Y. Signed-off-by: Xenia Ragiadakou Acked-by: Jan Beulich --- No

[PATCH 1/2] x86/emulate: remove unused svm specific header

2023-01-27 Thread Xenia Ragiadakou
Fixes: 2191599bacb7 ("x86/emul: Simplfy emulation state setup") Signed-off-by: Xenia Ragiadakou --- I 'm not sure that a Fixes tag applies in this case. I 've added it mostly for reference. xen/arch/x86/hvm/emulate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/ar

[PATCH 0/2] Remove unused virtualization technology specific headers

2023-01-27 Thread Xenia Ragiadakou
The patches remove forgotten and now unused virtualization technology specific headers from arch/x86/cpu/vpmu.c and arch/x86/hvm/emulate.c. Xenia Ragiadakou (2): x86/emulate: remove unused svm specific header x86/vpmu: remove unused svm and vmx specific headers xen/arch/x86/cpu/vpmu.c

[PATCH 2/2] x86/vpmu: remove unused svm and vmx specific headers

2023-01-27 Thread Xenia Ragiadakou
Fixes: 8c20aca6751b ("x86/vPMU: invoke _vpmu_initialise() through a hook as well") Signed-off-by: Xenia Ragiadakou --- I 'm not sure that a Fixes tag applies in this case. I 've added it mostly for reference. xen/arch/x86/cpu/vpmu.c | 4 1 file changed, 4 deletions(

Re: [PATCH v4 2/5] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific

2023-01-31 Thread Xenia Ragiadakou
On 2/1/23 07:07, Tian, Kevin wrote: From: Xenia Ragiadakou Sent: Tuesday, January 24, 2023 8:42 PM The variable untrusted_msi indicates whether the system is vulnerable to CVE-2011-1898 due to the absence of interrupt remapping support. Although AMD iommus with interrupt remapping disabled

[PATCH v3 1/2] xen/device_tree: fix Eclair findings for MISRA C 2012 Rule 20.7

2023-02-03 Thread Xenia Ragiadakou
Signed-off-by: Xenia Ragiadakou --- Changes in v3: - the fixes are based solely to Eclair findings (the tool has been adjusted to report only those violations that can result to a bug) - reflect this in the commit title xen/include/xen/device_tree.h | 14 +++--- 1 file changed

[PATCH v3 2/2] xen/device_tree: remove incorrect and unused dt_irq() and dt_irq_flags() macros

2023-02-03 Thread Xenia Ragiadakou
pon the issues above, remove them instead of fixing them. Fixes: 886f34045bf0 ("xen/arm: Add helpers to retrieve an interrupt description from the device tree") Signed-off-by: Xenia Ragiadakou --- Changes in v3: - new patch xen/include/xen/device_tree.h | 3 --- 1 file changed, 3

[PATCH v3 0/2] Resolve issues related to macros in device_tree.h

2023-02-03 Thread Xenia Ragiadakou
Xenia Ragiadakou (2): xen/device_tree: fix Eclair findings for MISRA C 2012 Rule 20.7 xen/device_tree: remove incorrect and unused dt_irq() and dt_irq_flags() macros xen/include/xen/device_tree.h | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) -- 2.37.2

[PATCH 0/2] Remove unnecessary asm/hvm/support.h includes

2023-02-06 Thread Xenia Ragiadakou
changes are sent as 2 patches to aid review (especially the change in asm/spec_ctrl.h). Xenia Ragiadakou (2): x86: do not include asm/hvm/support.h when not used x86/hygon: do not include asm/hvm/support.h when not used xen/arch/x86/cpu/amd.c | 2 +- xen/arch/x86/cpu/hygon.c

[PATCH 1/2] x86: do not include asm/hvm/support.h when not used

2023-02-06 Thread Xenia Ragiadakou
functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/cpu/amd.c | 2 +- xen/arch/x86/cpu/intel.c| 2 +- xen/arch/x86/cpu/vpmu.c | 1 - xen/arch/x86/cpu/vpmu_intel.c | 1 - xen/arch/x86/crash.c| 1

[PATCH 2/2] x86/hygon: do not include asm/hvm/support.h when not used

2023-02-06 Thread Xenia Ragiadakou
asm/spec_ctrl.h's included headers. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/cpu/hygon.c | 1 - xen/arch/x86/include/asm/spec_ctrl.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/cpu/hygon.c b/xen/arc

[PATCH] x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback

2023-02-06 Thread Xenia Ragiadakou
include header asm/hvm/vmx/vmx.h as it is not required anymore and resolve subsequent build errors for implicit declaration of functions ‘TRACE_2_LONG_3D’ and ‘TRC_PAR_LONG’ by including missing asm/hvm/trace.h header. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch

Re: [PATCH 1/2] x86: do not include asm/hvm/support.h when not used

2023-02-06 Thread Xenia Ragiadakou
On 2/6/23 15:01, Jan Beulich wrote: On 06.02.2023 13:42, Xenia Ragiadakou wrote: --- a/xen/arch/x86/emul-i8254.c +++ b/xen/arch/x86/emul-i8254.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include To be honest I'd prefer if only th

Re: [PATCH] x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback

2023-02-06 Thread Xenia Ragiadakou
On 2/6/23 15:32, Andrew Cooper wrote: On 06/02/2023 12:58 pm, Xenia Ragiadakou wrote: diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 270bc98195..6138dc0885 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -3011,6 +3011,10 @@ const struct

Re: [PATCH v3 2/2] xen/device_tree: remove incorrect and unused dt_irq() and dt_irq_flags() macros

2023-02-06 Thread Xenia Ragiadakou
Hi Luca On 2/6/23 16:42, Luca Fancellu wrote: On 3 Feb 2023, at 19:09, Xenia Ragiadakou wrote: Macro dt_irq() is broken because the macro parameter has the same name with the struct dt_irq member "irq". I’m not sure about the wording “broken”, it should work anyway or am I w

Re: [PATCH 1/2] x86: do not include asm/hvm/support.h when not used

2023-02-06 Thread Xenia Ragiadakou
On 2/6/23 15:11, Xenia Ragiadakou wrote: On 2/6/23 15:01, Jan Beulich wrote: On 06.02.2023 13:42, Xenia Ragiadakou wrote: --- a/xen/arch/x86/emul-i8254.c +++ b/xen/arch/x86/emul-i8254.c @@ -34,7 +34,7 @@   #include   #include   #include -#include +#include   #include   #include To

[PATCH v2] x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback

2023-02-07 Thread Xenia Ragiadakou
asm/hvm/trace.h header. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - rename set_virtual_apic_mode to update_vlapic_mode, suggested by Andrew - in hvm_update_vlapic_mode(), call the stub only if available, otherwise a BUG() will be triggered every time

Re: [PATCH v3 1/2] xen/device_tree: fix Eclair findings for MISRA C 2012 Rule 20.7

2023-02-07 Thread Xenia Ragiadakou
On 2/7/23 12:39, Julien Grall wrote: Hi, On 07/02/2023 10:23, Luca Fancellu wrote: On 3 Feb 2023, at 19:09, Xenia Ragiadakou wrote: I’m not really a supporter of empty commit message, but it’s up to the maintainer :) +1. In this case a brief summary of the rule would be handy for

Re: [PATCH v3 1/2] xen/device_tree: fix Eclair findings for MISRA C 2012 Rule 20.7

2023-02-07 Thread Xenia Ragiadakou
On 2/7/23 14:25, Julien Grall wrote: On 07/02/2023 10:46, Xenia Ragiadakou wrote: On 2/7/23 12:39, Julien Grall wrote: Hi, On 07/02/2023 10:23, Luca Fancellu wrote: On 3 Feb 2023, at 19:09, Xenia Ragiadakou wrote: I’m not really a supporter of empty commit message, but it’s up

Re: [PATCH v3 1/2] xen/device_tree: fix Eclair findings for MISRA C 2012 Rule 20.7

2023-02-07 Thread Xenia Ragiadakou
Hi Julien, On 2/7/23 15:01, Julien Grall wrote: Hi, On 07/02/2023 12:46, Xenia Ragiadakou wrote: On 2/7/23 14:25, Julien Grall wrote: On 07/02/2023 10:46, Xenia Ragiadakou wrote: On 2/7/23 12:39, Julien Grall wrote: Hi, On 07/02/2023 10:23, Luca Fancellu wrote: On 3 Feb 2023, at 19

Re: [PATCH v3 1/2] xen/device_tree: fix Eclair findings for MISRA C 2012 Rule 20.7

2023-02-08 Thread Xenia Ragiadakou
On 2/8/23 10:38, Julien Grall wrote: On 07/02/2023 13:59, Xenia Ragiadakou wrote: Hi Julien, Hi Xenia, On 2/7/23 15:01, Julien Grall wrote: Hi, On 07/02/2023 12:46, Xenia Ragiadakou wrote: On 2/7/23 14:25, Julien Grall wrote: On 07/02/2023 10:46, Xenia Ragiadakou wrote: On 2/7

Re: [PATCH v2] x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback

2023-02-13 Thread Xenia Ragiadakou
On 2/13/23 12:09, Jan Beulich wrote: On 07.02.2023 10:43, Xenia Ragiadakou wrote: APIC virtualization support is currently implemented only for Intel VT-x. To aid future work on separating AMD-V from Intel VT-x code, instead of calling directly vmx_vlapic_msr_changed() from common hvm code

[PATCH v3] x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback

2023-02-13 Thread Xenia Ragiadakou
/trace.h header. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - add cf_check attribute in both the function declaration and definition of vmx_vlapic_msr_changed since it is used as callback, bug reported by Jan - initialize update_vlapic_mode in the

[RFC 00/10] x86: Make cpu virtualization support configurable

2023-02-13 Thread Xenia Ragiadakou
depends on Intel VT-x for posted interrupts. Xenia Ragiadakou (10): x86: introduce AMD-V and Intel VT-x Kconfig options x86/hvm: separate AMD-V and Intel VT-x hvm_function_table initializers x86/p2m: guard vmx specific ept functions with INTEL_VMX x86/vpmu: separate AMD-V and Inte

[RFC 01/10] x86: introduce AMD-V and Intel VT-x Kconfig options

2023-02-13 Thread Xenia Ragiadakou
not selectable by the user. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/Kconfig| 6 ++ xen/arch/x86/cpu/Makefile | 4 +++- xen/arch/x86/hvm/Makefile | 4 ++-- xen/arch/x86/mm/Makefile| 3 ++- xen/arch/x86/mm/hap/Makefile

[RFC 02/10] x86/hvm: separate AMD-V and Intel VT-x hvm_function_table initializers

2023-02-13 Thread Xenia Ragiadakou
enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/include/asm/hvm/hvm.h | 8 1 file changed, 8 insertions(+) diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h index 43d3fc2498..353e48f4e3 100644 --- a/xen/arch/x86

[RFC 03/10] x86/p2m: guard vmx specific ept functions with INTEL_VMX

2023-02-13 Thread Xenia Ragiadakou
The functions ept_p2m_init(), ept_p2m_uninit() and p2m_init_altp2m_ept() are VT-x specific. Implement them as unreachable static inline functions when !INTEL_VMX. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/mm/p2m.h | 16 1 file changed, 16

[RFC 04/10] x86/vpmu: separate AMD-V and Intel VT-x init arch_vpmu_ops initializers

2023-02-13 Thread Xenia Ragiadakou
inline null-returning functions when the respective technology is not enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/include/asm/vpmu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/xen/arch/x86/include/asm/vpmu.h b/xen/arch/x86/include/asm

[RFC 07/10] x86/oprofile: guard svm specific symbols with AMD_SVM

2023-02-13 Thread Xenia Ragiadakou
The symbol svm_stgi_label is AMD-V specific so guard its usage in common code with AMD_SVM. Since AMD_SVM depends on HVM, it can be used alone. Also, use #ifdef instead of #if. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/oprofile/op_model_athlon.c | 2 +- 1

[RFC 08/10] x86: wire cpu_has_svm/vmx_* to false when svm/vmx not enabled

2023-02-13 Thread Xenia Ragiadakou
To be able to use cpu_has_svm/vmx_* macros in common code without enclosing them inside #ifdef guards when the respective virtualization technology is not enabled, define them as false when not applicable. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/include

[RFC 05/10] x86/traps: guard vmx specific functions with INTEL_VMX

2023-02-13 Thread Xenia Ragiadakou
The functions vmx_vmcs_enter() and vmx_vmcs_exit() are VT-x specific. Guard their calls with INTEL_VMX. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen

[RFC 06/10] x86/domain: guard svm specific functions with AMD_SVM

2023-02-13 Thread Xenia Ragiadakou
The functions svm_load_segs() and svm_load_segs_prefetch() are AMD-V specific so guard their calls in common code with AMD_SVM. Since AMD_SVM depends on HVM, it can be used alone. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/domain.c | 4 ++-- 1 file changed

[RFC 09/10] x86/ioreq: guard VIO_realmode_completion with INTEL_VMX

2023-02-13 Thread Xenia Ragiadakou
VIO_realmode_completion is specific to vmx realmode, so guard the completion handling code with INTEL_VMX. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/hvm/ioreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86

[RFC 10/10] x86/hvm: make AMD-V and Intel VT-x support configurable

2023-02-13 Thread Xenia Ragiadakou
support, make the controls user selectable only if EXPERT is enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/Kconfig | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index

  1   2   3   4   >