[PATCH] lib/strtoul: fix MISRA R10.2 violation

2024-05-13 Thread Stefano Stabellini
Fix last violation of R10.2 by casting the result of toupper to plain char. Note that we don't want to change toupper itself as it is a legacy interface and it would cause more issues. Signed-off-by: Stefano Stabellini --- I believe this is the last R10.2 violation diff --git a/xen/lib/strtoul.c

[linux-linus test] 185990: tolerable FAIL - PUSHED

2024-05-13 Thread osstest service owner
flight 185990 linux-linus real [real] flight 185991 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185990/ http://logs.test-lab.xenproject.org/osstest/logs/185991/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-

Re: [PATCH] x86/cpufreq: Rename cpuid variable/parameters to cpu

2024-05-13 Thread Stefano Stabellini
On Sat, 11 May 2024, Andrew Cooper wrote: > Various functions have a parameter or local variable called cpuid, but this > triggers a MISRA R5.3 violation because we also have a function called cpuid() > which wraps the real CPUID instruction. > > In all these cases, it's a Xen cpu index, which is

Re: [PATCH] fix Rule 10.2 violation

2024-05-13 Thread Stefano Stabellini
On Mon, 13 May 2024, Julien Grall wrote: > Hi Stefano, > > title: Is this the only violation we have in Xen? If so, then please add the > subsystem in the title. The only remaining violations are about the use of the "toupper" macro. Bugseng is recommending to add a cast to fix those or deviate t

Re: [RFC PATCH 2/2] xen/arm: Rework dt_unreserved_regions to avoid recursion

2024-05-13 Thread Julien Grall
Hi Luca, On 25/04/2024 14:11, Luca Fancellu wrote: The function dt_unreserved_regions is currently using recursion to compute the non overlapping ranges of a passed region against the reserved memory banks, in the spirit of removing the recursion to improve safety and also improve the scalabilit

Re: [RFC PATCH 1/2] xen/arm: Add DT reserve map regions to bootinfo.reserved_mem

2024-05-13 Thread Julien Grall
Hi Luca, On 25/04/2024 14:11, Luca Fancellu wrote: Currently the code is listing device tree reserve map regions as reserved memory for Xen, but they are not added into bootinfo.reserved_mem and they are fetched in multiple places using the same code sequence, causing duplication. Fix this by ad

Re: [PATCH] fix Rule 10.2 violation

2024-05-13 Thread Julien Grall
Hi Stefano, title: Is this the only violation we have in Xen? If so, then please add the subsystem in the title. On 11/05/2024 00:37, Stefano Stabellini wrote: Change opt_conswitch to char to fix a violation of Rule 10.2. Signed-off-by: Stefano Stabellini diff --git a/xen/drivers/char/cons

Re: Serious AMD-Vi(?) issue

2024-05-13 Thread Elliott Mitchell
On Mon, May 13, 2024 at 10:44:59AM +0200, Roger Pau Monné wrote: > On Fri, May 10, 2024 at 09:09:54PM -0700, Elliott Mitchell wrote: > > On Thu, Apr 18, 2024 at 09:33:31PM -0700, Elliott Mitchell wrote: > > > > > > I suspect this is a case of there is some step which is missing from > > > Xen's IO

Re: [PATCH 4.5/8] tools/hvmloader: Further simplify SMP setup

2024-05-13 Thread Alejandro Vallejo
On 09/05/2024 18:50, Andrew Cooper wrote: > Now that we're using hypercalls to start APs, we can replace the 'ap_cpuid' > global with a regular function parameter. This requires telling the compiler > that we'd like the parameter in a register rather than on the stack. > > While adjusting, rename

Re: [PATCH V3 (resend) 03/19] x86/pv: Rewrite how building PV dom0 handles domheap mappings

2024-05-13 Thread Roger Pau Monné
On Mon, May 13, 2024 at 01:40:30PM +, Elias El Yandouzi wrote: > From: Hongyan Xia > > Building a PV dom0 is allocating from the domheap but uses it like the > xenheap. Use the pages as they should be. > > Signed-off-by: Hongyan Xia > Signed-off-by: Julien Grall > Signed-off-by: Elias El Y

Re: [PATCH V3 (resend) 02/19] x86/pv: Domheap pages should be mapped while relocating initrd

2024-05-13 Thread Roger Pau Monné
On Mon, May 13, 2024 at 01:40:29PM +, Elias El Yandouzi wrote: > From: Wei Liu > > Xen shouldn't use domheap page as if they were xenheap pages. Map and > unmap pages accordingly. > > Signed-off-by: Wei Liu > Signed-off-by: Wei Wang > Signed-off-by: Julien Grall > Signed-off-by: Elias El

Re: [PATCH V3 01/19] x86: Create per-domain mapping of guest_root_pt

2024-05-13 Thread Roger Pau Monné
On Mon, May 13, 2024 at 11:10:59AM +, Elias El Yandouzi wrote: > From: Hongyan Xia > > Create a per-domain mapping of PV guest_root_pt as direct map is being > removed. > > Note that we do not map and unmap root_pgt for now since it is still a > xenheap page. I'm afraid this needs more cont

[PATCH V3 (resend) 17/19] xen/arm64: mm: Use per-pCPU page-tables

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall At the moment, on Arm64, every pCPU is sharing the same page-tables. In a follow-up patch, we will allow the possibility to remove the direct map and therefore it will be necessary to have a mapcache. While we have plenty of spare virtual address space to reserve part for eac

[PATCH V3 (resend) 14/19] Rename mfn_to_virt() calls

2024-05-13 Thread Elias El Yandouzi
Until directmap gets completely removed, we'd still need to keep some calls to mfn_to_virt() for xenheap pages or when the directmap is enabled. Rename the macro to mfn_to_directmap_virt() to flag them and prevent further use of mfn_to_virt(). Signed-off-by: Elias El Yandouzi diff --git a/xen/a

[PATCH V3 (resend) 18/19] xen/arm64: Implement a mapcache for arm64

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall At the moment, on arm64, map_domain_page() is implemented using virt_to_mfn(). Therefore it is relying on the directmap. In a follow-up patch, we will allow the admin to remove the directmap. Therefore we want to implement a mapcache. Thanksfully there is already one for arm3

[PATCH V3 (resend) 16/19] xen/arm32: mm: Rename 'first' to 'root' in init_secondary_pagetables()

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall The arm32 version of init_secondary_pagetables() will soon be re-used for arm64 as well where the root table starts at level 0 rather than level 1. So rename 'first' to 'root'. Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changelog in v2:

[PATCH V3 (resend) 19/19] xen/arm64: Allow the admin to enable/disable the directmap

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall Implement the same command line option as x86 to enable/disable the directmap. By default this is kept enabled. Also modify setup_directmap_mappings() to populate the L0 entries related to the directmap area. Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi ---

[PATCH V3 (resend) 15/19] Rename maddr_to_virt() calls

2024-05-13 Thread Elias El Yandouzi
Until directmap gets completely removed, we'd still need to keep some calls to mmaddr_to_virt() for xenheap pages or when the directmap is enabled. Rename the macro to maddr_to_directmap_virt() to flag them and prevent further use of maddr_to_virt(). Signed-off-by: Elias El Yandouzi diff --git

[PATCH V3 (resend) 13/19] x86/setup: Do not create valid mappings when directmap=no

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Create empty mappings in the second e820 pass. Also, destroy existing direct map mappings created in the first pass. To make xenheap pages visible in guests, it is necessary to create empty L3 tables in the direct map even when directmap=no, since guest cr3s copy idle domain's

[PATCH V3 (resend) 10/19] xen/page_alloc: Add a path for xenheap when there is no direct map

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When there is not an always-mapped direct map, xenheap allocations need to be mapped and unmapped on-demand. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi I have left the call to map_pages_to_xen() and destroy_xen_mappings

[PATCH V3 (resend) 08/19] xen/x86: Add build assertion for fixmap entries

2024-05-13 Thread Elias El Yandouzi
The early fixed addresses must all fit into the static L1 table. Introduce a build assertion to this end. Signed-off-by: Elias El Yandouzi Changes in v2: * New patch diff --git a/xen/arch/x86/include/asm/fixmap.h b/xen/arch/x86/include/asm/fixmap.h index a7ac365fc6..904bee0

[PATCH V3 (resend) 12/19] x86/setup: vmap heap nodes when they are outside the direct map

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When we do not have a direct map, archs_mfn_in_direct_map() will always return false, thus init_node_heap() will allocate xenheap pages from an existing node for the metadata of a new node. This means that the metadata of a new node is in a different node, slowing down heap allo

[PATCH V3 (resend) 01/19] x86: Create per-domain mapping of guest_root_pt

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Create a per-domain mapping of PV guest_root_pt as direct map is being removed. Note that we do not map and unmap root_pgt for now since it is still a xenheap page. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changes in

[PATCH V3 (resend) 11/19] x86/setup: Leave early boot slightly earlier

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When we do not have a direct map, memory for metadata of heap nodes in init_node_heap() is allocated from xenheap, which needs to be mapped and unmapped on demand. However, we cannot just take memory from the boot allocator to create the PTEs while we are passing memory to the h

[PATCH V3 (resend) 06/19] x86: Add a boot option to enable and disable the direct map

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Also add a helper function to retrieve it. Change arch_mfns_in_direct_map to check this option before returning. This is added as a Kconfig option as well as a boot command line option. While being generic, the Kconfig option is only usable for x86 at the moment. Note that the

[PATCH V3 (resend) 05/19] x86/mapcache: Initialise the mapcache for the idle domain

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia In order to use the mapcache in the idle domain, we also have to populate its page tables in the PERDOMAIN region, and we need to move mapcache_domain_init() earlier in arch_domain_create(). Note, commit 'x86: lift mapcache variable to the arch level' has initialised the mapcac

[PATCH V3 (resend) 07/19] xen/x86: Add support for the PMAP

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall PMAP will be used in a follow-up patch to bootstrap map domain page infrastructure -- we need some way to map pages to setup the mapcache without a direct map. The functions pmap_{map, unmap} open code {set, clear}_fixmap to break the loop. Signed-off-by: Julien Grall Signed

[PATCH V3 (resend) 04/19] x86: Lift mapcache variable to the arch level

2024-05-13 Thread Elias El Yandouzi
From: Wei Liu It is going to be needed by HVM and idle domain as well, because without the direct map, both need a mapcache to map pages. This commit lifts the mapcache variable up and initialise it a bit earlier for PV and HVM domains. Signed-off-by: Wei Liu Signed-off-by: Wei Wang Signed-of

[PATCH V3 (resend) 09/19] x86/domain_page: Remove the fast paths when mfn is not in the directmap

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When mfn is not in direct map, never use mfn_to_virt for any mappings. We replace mfn_x(mfn) <= PFN_DOWN(__pa(HYPERVISOR_VIRT_END - 1)) with arch_mfns_in_direct_map(mfn, 1) because these two are equivalent. The extra comparison in arch_mfns_in_direct_map() looks different but b

[PATCH V3 (resend) 03/19] x86/pv: Rewrite how building PV dom0 handles domheap mappings

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Building a PV dom0 is allocating from the domheap but uses it like the xenheap. Use the pages as they should be. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changes in V3: * Fold following patch 'x86/pv: Map L4 pa

[PATCH V3 (resend) 00/19] Remove the directmap

2024-05-13 Thread Elias El Yandouzi
Hi all, A few years ago, Wei Liu implemented a PoC to remove the directmap from Xen. The last version was sent by Hongyan Xia [1]. I will start with thanking both Wei and Hongyan for the initial work to upstream the feature. A lot of patches already went in and this is the last few patches missin

[PATCH V3 (resend) 02/19] x86/pv: Domheap pages should be mapped while relocating initrd

2024-05-13 Thread Elias El Yandouzi
From: Wei Liu Xen shouldn't use domheap page as if they were xenheap pages. Map and unmap pages accordingly. Signed-off-by: Wei Liu Signed-off-by: Wei Wang Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changes in V3: * Rename commit title * Rework the

[libvirt test] 185988: tolerable all pass - PUSHED

2024-05-13 Thread osstest service owner
flight 185988 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/185988/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185978 test-amd64-amd64-libvirt-xsm 15 migrate-s

Re: [PATCH V3 00/19] Remove the directmap

2024-05-13 Thread Roger Pau Monné
You seem to have forgotten to add the maintainers on Cc for the patches. Adding them here for reference. Regards, Roger. On Mon, May 13, 2024 at 11:10:58AM +, Elias El Yandouzi wrote: > Hi all, > > A few years ago, Wei Liu implemented a PoC to remove the directmap > from Xen. The last versi

[xen-unstable test] 185987: tolerable FAIL

2024-05-13 Thread osstest service owner
flight 185987 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/185987/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185980 test-amd64-amd64-xl-qemut-win7-amd64

[PATCH V3 19/19] xen/arm64: Allow the admin to enable/disable the directmap

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall Implement the same command line option as x86 to enable/disable the directmap. By default this is kept enabled. Also modify setup_directmap_mappings() to populate the L0 entries related to the directmap area. Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi ---

[PATCH V3 09/19] x86/domain_page: Remove the fast paths when mfn is not in the directmap

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When mfn is not in direct map, never use mfn_to_virt for any mappings. We replace mfn_x(mfn) <= PFN_DOWN(__pa(HYPERVISOR_VIRT_END - 1)) with arch_mfns_in_direct_map(mfn, 1) because these two are equivalent. The extra comparison in arch_mfns_in_direct_map() looks different but b

[PATCH V3 08/19] xen/x86: Add build assertion for fixmap entries

2024-05-13 Thread Elias El Yandouzi
The early fixed addresses must all fit into the static L1 table. Introduce a build assertion to this end. Signed-off-by: Elias El Yandouzi Changes in v2: * New patch diff --git a/xen/arch/x86/include/asm/fixmap.h b/xen/arch/x86/include/asm/fixmap.h index a7ac365fc6..904bee0

[PATCH V3 14/19] Rename mfn_to_virt() calls

2024-05-13 Thread Elias El Yandouzi
Until directmap gets completely removed, we'd still need to keep some calls to mfn_to_virt() for xenheap pages or when the directmap is enabled. Rename the macro to mfn_to_directmap_virt() to flag them and prevent further use of mfn_to_virt(). Signed-off-by: Elias El Yandouzi diff --git a/xen/a

[PATCH V3 17/19] xen/arm64: mm: Use per-pCPU page-tables

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall At the moment, on Arm64, every pCPU is sharing the same page-tables. In a follow-up patch, we will allow the possibility to remove the direct map and therefore it will be necessary to have a mapcache. While we have plenty of spare virtual address space to reserve part for eac

[PATCH V3 10/19] xen/page_alloc: Add a path for xenheap when there is no direct map

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When there is not an always-mapped direct map, xenheap allocations need to be mapped and unmapped on-demand. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi I have left the call to map_pages_to_xen() and destroy_xen_mappings

[PATCH V3 16/19] xen/arm32: mm: Rename 'first' to 'root' in init_secondary_pagetables()

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall The arm32 version of init_secondary_pagetables() will soon be re-used for arm64 as well where the root table starts at level 0 rather than level 1. So rename 'first' to 'root'. Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changelog in v2:

[PATCH V3 13/19] x86/setup: Do not create valid mappings when directmap=no

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Create empty mappings in the second e820 pass. Also, destroy existing direct map mappings created in the first pass. To make xenheap pages visible in guests, it is necessary to create empty L3 tables in the direct map even when directmap=no, since guest cr3s copy idle domain's

[PATCH V3 18/19] xen/arm64: Implement a mapcache for arm64

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall At the moment, on arm64, map_domain_page() is implemented using virt_to_mfn(). Therefore it is relying on the directmap. In a follow-up patch, we will allow the admin to remove the directmap. Therefore we want to implement a mapcache. Thanksfully there is already one for arm3

[PATCH V3 12/19] x86/setup: vmap heap nodes when they are outside the direct map

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When we do not have a direct map, archs_mfn_in_direct_map() will always return false, thus init_node_heap() will allocate xenheap pages from an existing node for the metadata of a new node. This means that the metadata of a new node is in a different node, slowing down heap allo

[PATCH V3 15/19] Rename maddr_to_virt() calls

2024-05-13 Thread Elias El Yandouzi
Until directmap gets completely removed, we'd still need to keep some calls to mmaddr_to_virt() for xenheap pages or when the directmap is enabled. Rename the macro to maddr_to_directmap_virt() to flag them and prevent further use of maddr_to_virt(). Signed-off-by: Elias El Yandouzi diff --git

[PATCH V3 03/19] x86/pv: Rewrite how building PV dom0 handles domheap mappings

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Building a PV dom0 is allocating from the domheap but uses it like the xenheap. Use the pages as they should be. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changes in V3: * Fold following patch 'x86/pv: Map L4 pa

[PATCH V3 06/19] x86: Add a boot option to enable and disable the direct map

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Also add a helper function to retrieve it. Change arch_mfns_in_direct_map to check this option before returning. This is added as a Kconfig option as well as a boot command line option. While being generic, the Kconfig option is only usable for x86 at the moment. Note that the

[PATCH V3 05/19] x86/mapcache: Initialise the mapcache for the idle domain

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia In order to use the mapcache in the idle domain, we also have to populate its page tables in the PERDOMAIN region, and we need to move mapcache_domain_init() earlier in arch_domain_create(). Note, commit 'x86: lift mapcache variable to the arch level' has initialised the mapcac

[PATCH V3 11/19] x86/setup: Leave early boot slightly earlier

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia When we do not have a direct map, memory for metadata of heap nodes in init_node_heap() is allocated from xenheap, which needs to be mapped and unmapped on demand. However, we cannot just take memory from the boot allocator to create the PTEs while we are passing memory to the h

[PATCH V3 04/19] x86: Lift mapcache variable to the arch level

2024-05-13 Thread Elias El Yandouzi
From: Wei Liu It is going to be needed by HVM and idle domain as well, because without the direct map, both need a mapcache to map pages. This commit lifts the mapcache variable up and initialise it a bit earlier for PV and HVM domains. Signed-off-by: Wei Liu Signed-off-by: Wei Wang Signed-of

[PATCH V3 02/19] x86/pv: Domheap pages should be mapped while relocating initrd

2024-05-13 Thread Elias El Yandouzi
From: Wei Liu Xen shouldn't use domheap page as if they were xenheap pages. Map and unmap pages accordingly. Signed-off-by: Wei Liu Signed-off-by: Wei Wang Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changes in V3: * Rename commit title * Rework the

[PATCH V3 07/19] xen/x86: Add support for the PMAP

2024-05-13 Thread Elias El Yandouzi
From: Julien Grall PMAP will be used in a follow-up patch to bootstrap map domain page infrastructure -- we need some way to map pages to setup the mapcache without a direct map. The functions pmap_{map, unmap} open code {set, clear}_fixmap to break the loop. Signed-off-by: Julien Grall Signed

[PATCH V3 01/19] x86: Create per-domain mapping of guest_root_pt

2024-05-13 Thread Elias El Yandouzi
From: Hongyan Xia Create a per-domain mapping of PV guest_root_pt as direct map is being removed. Note that we do not map and unmap root_pgt for now since it is still a xenheap page. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall Signed-off-by: Elias El Yandouzi Changes in

[PATCH V3 00/19] Remove the directmap

2024-05-13 Thread Elias El Yandouzi
Hi all, A few years ago, Wei Liu implemented a PoC to remove the directmap from Xen. The last version was sent by Hongyan Xia [1]. I will start with thanking both Wei and Hongyan for the initial work to upstream the feature. A lot of patches already went in and this is the last few patches missin

Re: [PATCH v2 (resend) 13/27] x86: Add a boot option to enable and disable the direct map

2024-05-13 Thread Elias El Yandouzi
On 20/02/2024 11:14, Jan Beulich wrote: On 16.01.2024 20:25, Elias El Yandouzi wrote: --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -29,6 +29,7 @@ config X86 select HAS_UBSAN select HAS_VPCI if HVM select NEEDS_LIBELF + select HAS_SECRET_HIDING Pleas

[linux-linus test] 185986: tolerable FAIL - PUSHED

2024-05-13 Thread osstest service owner
flight 185986 linux-linus real [real] flight 185989 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185986/ http://logs.test-lab.xenproject.org/osstest/logs/185989/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

Re: [PATCH v2 (resend) 12/27] x86/mapcache: Initialise the mapcache for the idle domain

2024-05-13 Thread Elias El Yandouzi
On 20/02/2024 10:51, Jan Beulich wrote: On 16.01.2024 20:25, Elias El Yandouzi wrote: --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -750,9 +750,16 @@ int arch_domain_create(struct domain *d, spin_lock_init(&d->arch.e820_lock); +if ( (rc = mapcache_domain_init(d))

Re: [XEN PATCH v2 5/5] x86/MCE: optional build of AMD/Intel MCE code

2024-05-13 Thread Sergiy Kibrik
06.05.24 14:32, Jan Beulich: On 02.05.2024 11:21, Sergiy Kibrik wrote: Separate Intel/AMD-specific MCE code using CONFIG_{INTEL,AMD} config options. Now we can avoid build of mcheck code if support for specific platform is intentionally disabled by configuration. Add default return value to ini

[PATCH for-4.19] x86/mtrr: avoid system wide rendezvous when setting AP MTRRs

2024-05-13 Thread Roger Pau Monne
There's no point in forcing a system wide update of the MTRRs on all processors when there are no changes to be propagated. On AP startup it's only the AP that needs to write the system wide MTRR values in order to match the rest of the already online CPUs. We have occasionally seen the watchdog

Re: Serious AMD-Vi(?) issue

2024-05-13 Thread Roger Pau Monné
On Fri, May 10, 2024 at 09:09:54PM -0700, Elliott Mitchell wrote: > On Thu, Apr 18, 2024 at 09:33:31PM -0700, Elliott Mitchell wrote: > > > > I suspect this is a case of there is some step which is missing from > > Xen's IOMMU handling. Perhaps something which Linux does during an early > > DMA s

Re: [XEN PATCH v2 2/5] x86/intel: move vmce_has_lmce() routine to header

2024-05-13 Thread Sergiy Kibrik
06.05.24 14:18, Jan Beulich: On 02.05.2024 11:14, Sergiy Kibrik wrote: Moving this function out of mce_intel.c would make it possible to disable build of Intel MCE code later on, because the function gets called from common x86 code. Add internal check for CONFIG_INTEL option, as MCG_LMCE_P bit

Re: [PATCH 3/7] xen/p2m: put reference for superpage

2024-05-13 Thread Roger Pau Monné
On Fri, May 10, 2024 at 10:37:53PM +0100, Julien Grall wrote: > Hi Roger, > > On 09/05/2024 13:58, Roger Pau Monné wrote: > > On Thu, May 09, 2024 at 01:12:00PM +0100, Julien Grall wrote: > > > Hi, > > > > > > On 09/05/2024 12:28, Roger Pau Monné wrote: > > > > OTOH for 1GB given the code here th

Re: [RFC KERNEL PATCH v6 3/3] xen/privcmd: Add new syscall to get gsi from irq

2024-05-13 Thread Jürgen Groß
On 13.05.24 09:47, Chen, Jiqian wrote: Hi, On 2024/5/10 17:06, Chen, Jiqian wrote: Hi, On 2024/5/10 14:46, Jürgen Groß wrote: On 19.04.24 05:36, Jiqian Chen wrote: In PVH dom0, it uses the linux local interrupt mechanism, when it allocs irq for a gsi, it is dynamic, and follow the principle o

Re: [RFC KERNEL PATCH v6 3/3] xen/privcmd: Add new syscall to get gsi from irq

2024-05-13 Thread Chen, Jiqian
Hi, On 2024/5/10 17:06, Chen, Jiqian wrote: > Hi, > > On 2024/5/10 14:46, Jürgen Groß wrote: >> On 19.04.24 05:36, Jiqian Chen wrote: >>> In PVH dom0, it uses the linux local interrupt mechanism, >>> when it allocs irq for a gsi, it is dynamic, and follow >>> the principle of applying first, distr

[PATCH for-4.19 v3] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-13 Thread Roger Pau Monne
Like it was done recently for libxl, switch to using the auto-generated feature names by the processing of cpufeatureset.h, this allows removing the open-coded feature names, and unifies the feature naming with libxl and the hypervisor. Introduce a newly auto-generated array that contains the feat