Re: [PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-14 Thread Christoph Hellwig
On Mon, Mar 14, 2022 at 07:07:44PM -0400, Boris Ostrovsky wrote: >> +swiotlb_init_remap(true, x86_swiotlb_flags, xen_swiotlb_fixup); > > > I think we need to have SWIOTLB_ANY set in x86_swiotlb_flags here. Yes. > Notice that we don't do remap() after final update to nslabs. We should. Indeed

Re: [PATCH 12/15] swiotlb: provide swiotlb_init variants that remap the buffer

2022-03-14 Thread Christoph Hellwig
On Mon, Mar 14, 2022 at 06:39:21PM -0400, Boris Ostrovsky wrote: > This is IO_TLB_MIN_SLABS, isn't it? (Xen code didn't say so but that's what > it meant to say I believe) Yes, that makes much more sense. I've switched the patch to use IO_TLB_MIN_SLABS and drop the 2MB comment in both places. C

[ovmf test] 168609: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168609 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168609/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH 1/2] xen/grant-table: remove gnttab_*transfer*() functions

2022-03-14 Thread Juergen Gross
On 15.03.22 00:37, Boris Ostrovsky wrote: On 3/11/22 5:34 AM, Juergen Gross wrote: All grant table operations related to the "transfer" functionality are unused currently. There have been users in the old days of the "Xen-o-Linux" kernel, but those didn't make it upstream. So remove the "trans

Re: [PATCH v2 4/6] xen/cpupool: Create different cpupools at boot time

2022-03-14 Thread Juergen Gross
On 12.03.22 01:10, Stefano Stabellini wrote: On Fri, 11 Mar 2022, Luca Fancellu wrote: On Thu, 10 Mar 2022, Luca Fancellu wrote: Introduce a way to create different cpupools at boot time, this is particularly useful on ARM big.LITTLE system where there might be the need to have different cpupoo

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Philippe Mathieu-Daudé
Hi Christian, On 14/3/22 17:42, Christian Schoenebeck wrote: On Montag, 14. März 2022 17:01:07 CET Markus Armbruster wrote: g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than

Re: [PATCH 0/3] Use g_new() & friends where that makes obvious

2022-03-14 Thread Philippe Mathieu-Daudé
On 14/3/22 17:01, Markus Armbruster wrote: g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This series only touches a

[ovmf test] 168606: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168606 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168606/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[ovmf test] 168602: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168602 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168602/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[xen-unstable-smoke bisection] complete build-amd64

2022-03-14 Thread osstest service owner
branch xen-unstable-smoke xenbranch xen-unstable-smoke job build-amd64 testid xen-build Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: xen git://xenbits.xen.org/xen.git *** Found and reproduced problem changeset *** Bug is in tree

[xen-unstable-smoke test] 168591: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168591 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168591/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168580 test-armhf-a

[xen-unstable test] 168585: tolerable FAIL - PUSHED

2022-03-14 Thread osstest service owner
flight 168585 xen-unstable real [real] flight 168592 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168585/ http://logs.test-lab.xenproject.org/osstest/logs/168592/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd6

[ovmf test] 168588: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168588 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168588/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[qemu-mainline test] 168586: tolerable FAIL - PUSHED

2022-03-14 Thread osstest service owner
flight 168586 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/168586/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 168510 test-amd64-amd64-qemuu-nested-amd 2

Re: [PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-14 Thread Stefano Stabellini
On Mon, 14 Mar 2022, Christoph Hellwig wrote: > Reuse the generic swiotlb initialization for xen-swiotlb. For ARM/ARM64 > this works trivially, while for x86 xen_swiotlb_fixup needs to be passed > as the remap argument to swiotlb_init_remap/swiotlb_init_late. > > Signed-off-by: Christoph Hellwig

Re: [PATCH early-RFC 4/5] xen/arm: mm: Rework switch_ttbr()

2022-03-14 Thread Stefano Stabellini
On Sat, 12 Mar 2022, Julien Grall wrote: > On 12/03/2022 01:31, Stefano Stabellini wrote: > > On Wed, 9 Mar 2022, Julien Grall wrote: > > > From: Julien Grall > > > > > > At the moment, switch_ttbr() is switching the TTBR whilst the MMU is > > > still on. > > > > > > Switching TTBR is like repla

Re: [PATCH 1/2] xen/grant-table: remove gnttab_*transfer*() functions

2022-03-14 Thread Boris Ostrovsky
On 3/11/22 5:34 AM, Juergen Gross wrote: All grant table operations related to the "transfer" functionality are unused currently. There have been users in the old days of the "Xen-o-Linux" kernel, but those didn't make it upstream. So remove the "transfer" related functions. Do we need to a

Re: [PATCH early-RFC 4/5] xen/arm: mm: Rework switch_ttbr()

2022-03-14 Thread Stefano Stabellini
On Sat, 12 Mar 2022, Julien Grall wrote: > On 12/03/2022 01:17, Stefano Stabellini wrote: > > On Wed, 9 Mar 2022, Julien Grall wrote: > > As far as I can tell this should work for coloring too. In the case of > > coloring: > > > > /* running on the old mapping, same as non-coloring */ > >

Re: [PATCH 14/15] swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl

2022-03-14 Thread Boris Ostrovsky
On 3/14/22 3:31 AM, Christoph Hellwig wrote: @@ -314,6 +293,7 @@ void __init swiotlb_init(bool addressing_limit, unsigned int flags) int swiotlb_init_late(size_t size, gfp_t gfp_mask, int (*remap)(void *tlb, unsigned long nslabs)) { + struct io_tlb_mem *mem = &io_tlb_

Re: [PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-14 Thread Boris Ostrovsky
On 3/14/22 3:31 AM, Christoph Hellwig wrote: - static void __init pci_xen_swiotlb_init(void) { if (!xen_initial_domain() && !x86_swiotlb_enable) return; x86_swiotlb_enable = true; - xen_swiotlb = true; - xen_swiotlb_init_early(); + swiotlb_i

Re: [XEN v10 2/4] xen/arm64: io: Support instructions (for which ISS is not valid) on emulated MMIO region using MMIO/ioreq handler

2022-03-14 Thread Julien Grall
Hi Ayan, On 10/03/2022 17:44, Ayan Kumar Halder wrote: diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c index 9c9790a6d1..159e3cef8b 100644 --- a/xen/arch/arm/arm32/traps.c +++ b/xen/arch/arm/arm32/traps.c @@ -18,9 +18,11 @@ #include #include +#include #includ

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > diff --git a/semihosting/conf

[xen-unstable-smoke test] 168589: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168589 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168589/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168580 test-armhf-a

Re: [PATCH 12/15] swiotlb: provide swiotlb_init variants that remap the buffer

2022-03-14 Thread Boris Ostrovsky
On 3/14/22 3:31 AM, Christoph Hellwig wrote: -void __init swiotlb_init(bool addressing_limit, unsigned int flags) +void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags, + int (*remap)(void *tlb, unsigned long nslabs)) { - size_t bytes = PAGE_ALIGN(defau

Re: [PATCH 35/36] doc, device-tree: introduce 'colors' property

2022-03-14 Thread Julien Grall
Hi, On 04/03/2022 17:47, Marco Solieri wrote: From: Luca Miccio Dom0less uses device tree for DomUs when booting them without using Dom0. Add a new device tree property 'colors' that specifies the coloring configuration for DomUs when using Dom0less. Signed-off-by: Luca Miccio Signed-off-by:

Re: [PATCH 33/36] doc, xen-command-line: introduce coloring options

2022-03-14 Thread Julien Grall
Hi Marco, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Four additional parameters in the Xen command line are used to define the underlying coloring policy, which is not directly configurable otherwise. Signed-off-by: Luca Miccio Signed-off-by: Marco Solieri --- docs/misc/x

Re: [PATCH 27/36] xen/arch: add coloring support for Xen

2022-03-14 Thread Julien Grall
Hi Marco, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Introduce a new implementation of setup_pagetables that uses coloring logic in order to isolate Xen code using its color selection. Page tables construction is essentially copied, except for the xenmap table, where coloring

Re: [PATCH] MAINTAINERS: Propose Henry Wang as the new release manager

2022-03-14 Thread Stefano Stabellini
On Thu, 10 Mar 2022, George Dunlap wrote: > ARM has proposed Henry Wang as a release manager for 4.17. Signify > this by giving him maintainership over CHANGELOG.md. > > Below is an introduction given by Bertrand Marquis: > > Henry Wang is an open-source software engineer at Arm focusing on the

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > This commit only touches alloc

Re: [PATCH 31/36] Disable coloring if static memory support is selected

2022-03-14 Thread Julien Grall
Hi Marco, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Static memory assumes to have physically contiguous memory mapped to domains. This assumption cannot be made when coloring is enabled. These two features have to be mutually exclusive. I understand that at runtime, you wan

Re: [PATCH 26/36] xen/arm: add argument to remove_early_mappings

2022-03-14 Thread Julien Grall
Hi Marco, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Upcoming patches will need to remove temporary mappings created during Xen coloring process. The function remove_early_mappings does what we need but it is case-specific. Parametrize the function to avoid code replication.

Re: [PATCH 24/36] xen/arm: enable consider_modules for coloring

2022-03-14 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio In order to relocate Xen the function get_xen_paddr will be used in the following patches. The method has "consider_modules" as a prerequisite so it has to be enabled both for ARM32 and coloring. Signed-off-by: Luca Miccio ---

Re: [PATCH 23/36] xen/arch: coloring: manually calculate Xen physical addresses

2022-03-14 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio During Xen coloring procedure, we need to manually calculate consecutive physical addresses that conform to the color selection. Add an helper function that does this operation. The latter will return the next address that conform

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > This commit only touches alloc

Re: [PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > This is the semantic patch from commit b45c03f585 "arm: Use g_new() & > friends where that makes obvious sense". > > Signed-off-by: Markus Armbruster Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 22/36] xen/arch: init cache coloring conf for Xen

2022-03-14 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Add initialization for Xen coloring data. By default, use the lowest color index available. Benchmarking the VM interrupt response time provides an estimation of LLC usage by Xen's most latency-critical runtime task. Results on

Re: [PATCH v4 11/11] xen/x86: remove cf_check attribute from hypercall handlers

2022-03-14 Thread Daniel P. Smith
On 3/10/22 02:34, Juergen Gross wrote: > Now that the hypercall handlers are all being called directly instead > through a function vector, the "cf_check" attribute can be removed. > > Signed-off-by: Juergen Gross > --- > V4: > - new patch > --- > xen/arch/x86/compat.c | 6 +++---

Re: [XEN v10 0/4] xen/arm64: io: Decode ldr/str post-indexing instruction

2022-03-14 Thread Julien Grall
On 10/03/2022 17:44, Ayan Kumar Halder wrote: Hi All, Hi Ayan, Thank you for your contribution. Ayan Kumar Halder (4): xen/arm64: Decode ldr/str post increment operations xen/arm64: io: Support instructions (for which ISS is not valid) on emulated MMIO region using MMIO/ioreq hand

Re: [PATCH] Arm: arrange to have linker script honor dependencies (again)

2022-03-14 Thread Julien Grall
Hi Jan, On 14/03/2022 17:16, Jan Beulich wrote: The if_changed macro leads to dependencies being recorded in .*.d, which aren't loaded anymore. Use if_changed_dep instead, like x86 does. Fixes: 06ef696c85a7 ("build: introduce if_changed_deps") Signed-off-by: Jan Beulich Acked-by: Julien Gral

Re: [XEN][RFC PATCH v3 09/14] xen/iommu: Introduce iommu_remove_dt_device()

2022-03-14 Thread Luca Fancellu
> +int iommu_remove_dt_device(struct dt_device_node *np) > +{ > +const struct iommu_ops *ops = iommu_get_ops(); > +struct device *dev = dt_to_dev(np); > +int rc; > + > +if ( !ops ) > +return -EOPNOTSUPP; Here we have that the counterpart iommu_add_dt_device returns EINVAL

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 05:52:32PM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: > >> > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > >> for two reasons. One, it catches multiplication overflowin

Re: [XEN][RFC PATCH v3 08/14] xen/iommu: protect iommu_add_dt_device() with dtdevs_lock

2022-03-14 Thread Luca Fancellu
> On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Protect iommu_add_dt_device() with dtdevs_lock to prevent concurrent access > add. > > Signed-off-by: Vikram Garhwal Reviewed-by: Luca Fancellu > --- > xen/drivers/passthrough/device_tree.c | 9 - > 1 file changed, 8 insertions(

[PATCH] Arm: arrange to have linker script honor dependencies (again)

2022-03-14 Thread Jan Beulich
The if_changed macro leads to dependencies being recorded in .*.d, which aren't loaded anymore. Use if_changed_dep instead, like x86 does. Fixes: 06ef696c85a7 ("build: introduce if_changed_deps") Signed-off-by: Jan Beulich --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -112,7 +112,7

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Cédric Le Goater
On 3/14/22 17:01, Markus Armbruster wrote: g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches a

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: >> >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void *, which lets the compiler ca

Some feature requests for guest consoles

2022-03-14 Thread Andy Smith
Hi, Mike H made a feature request in: https://lists.xenproject.org/archives/html/xen-users/2022-03/msg9.html for the Xen guest console as connected to with "xl console" to correctly support the terminal size rather than always being 80x20. Additionally I wondered about some other featu

[ovmf test] 168587: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168587 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168587/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH v3 2/4] x86/APIC: calibrate against platform timer when possible

2022-03-14 Thread Jan Beulich
On 11.03.2022 14:45, Roger Pau Monné wrote: > On Mon, Feb 14, 2022 at 10:25:11AM +0100, Jan Beulich wrote: >> Use the original calibration against PIT only when the platform timer >> is PIT. This implicitly excludes the "xen_guest" case from using the PIT >> logic (init_pit() fails there, and as of

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: > > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > Th

[PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster --- scripts/coccinelle/use-g_new-etc.cocci | 75 ++ 1 file changed, 75 insertions(+) create mode 100644 scripts/coccinelle/use-

[PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[PATCH 0/3] Use g_new() & friends where that makes obvious

2022-03-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This series only touches allocations with size arguments of the form si

Re: [XEN][RFC PATCH v3 07/14] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2022-03-14 Thread Luca Fancellu
> On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Rename iommu_dt_device_is_assigned() to iommu_dt_device_is_assigned_lock(). > > Moving spin_lock to caller was done to prevent the concurrent access to > iommu_dt_device_is_assigned while doing add/remove/assign/deassign. > > Signed-off-by

Re: [PATCH 3/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests using legacy SSBD

2022-03-14 Thread Jan Beulich
On 14.03.2022 16:32, Roger Pau Monné wrote: > On Mon, Feb 14, 2022 at 05:44:01PM +0100, Jan Beulich wrote: >> On 01.02.2022 17:46, Roger Pau Monne wrote: >>> + ASSERT(core->count <= c->x86_num_siblings); >>> + if ((enable && core->count == 1) || >>> + (!enable && core->count == 0)) >> >>

Re: [XEN][RFC PATCH v3 06/14] xen/smmu: Add remove_device callback for smmu_iommu ops

2022-03-14 Thread Luca Fancellu
> On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Add remove_device callback for removing the device entry from smmu-master > using > following steps: > 1. Find if SMMU master exists for the device node. > 2. Remove the SMMU master > > Signed-off-by: Vikram Garhwal Seems ok to me, Revi

Re: [XEN][RFC PATCH v3 05/14] xen/device-tree: Add _dt_find_node_by_path() to find nodes in device tree

2022-03-14 Thread Luca Fancellu
Hi Vikram, > On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Add _dt_find_by_path() to find a matching node with path for a dt_device_node. > > Signed-off-by: Vikram Garhwal > --- > xen/common/device_tree.c | 10 -- > xen/include/xen/device_tree.h | 9 + > 2 files change

Re: [PATCH 3/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests using legacy SSBD

2022-03-14 Thread Roger Pau Monné
On Mon, Feb 14, 2022 at 05:44:01PM +0100, Jan Beulich wrote: > On 01.02.2022 17:46, Roger Pau Monne wrote: > > + ASSERT(core->count <= c->x86_num_siblings); > > + if ((enable && core->count == 1) || > > + (!enable && core->count == 0)) > > Maybe simply "if ( core->count == enable )"? Or

Re: [XEN][RFC PATCH v3 04/14] libfdt: overlay: change overlay_get_target()

2022-03-14 Thread Luca Fancellu
> On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Rename overlay_get_target() to fdt_overlay_target_offset() and remove static > function type. > > This is done to get the target path for the overlay nodes which is very useful > in many cases. For example, Xen hypervisor needs it when apply

Re: [PATCH] x86/cet: Clear IST supervisor token busy bits on S3 resume

2022-03-14 Thread Jan Beulich
On 14.03.2022 12:00, Andrew Cooper wrote: > Stacks are not freed across S3. Execution just stops, leaving supervisor > token busy bits active. Fixing this for the primary shadow stack was done > previously, but there is a (rare) risk that an IST token is left busy too. > This will manifest as #DF

Re: [PATCH] x86/cet: Clear IST supervisor token busy bits on S3 resume

2022-03-14 Thread Jan Beulich
On 14.03.2022 12:00, Andrew Cooper wrote: > Stacks are not freed across S3. Execution just stops, leaving supervisor > token busy bits active. Fixing this for the primary shadow stack was done > previously, but there is a (rare) risk that an IST token is left busy too. > This will manifest as #DF

[ovmf test] 168584: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168584 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168584/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[xen-unstable-smoke test] 168580: tolerable all pass - PUSHED

2022-03-14 Thread osstest service owner
flight 168580 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168580/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: BUG: libxenlight fails to grant permission to access Intel IGD Opregion

2022-03-14 Thread Chuck Zmudzinski
On 3/14/22 3:26 AM, Jan Beulich wrote: On 11.03.2022 21:35, Chuck Zmudzinski wrote: So my only question is: Is it proper to include header files from tools/firmware/hvmloader in tools/libs/light/libxl_pci.c ? No, it certainly is not. Jan That's a relief, because if if was proper, I woul

Re: [XEN][RFC PATCH v3 02/14] xen/arm: Add CONFIG_OVERLAY_DTB

2022-03-14 Thread Luca Fancellu
> On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Introduce a config option where the user can enable support for > adding/removing > device tree nodes using a device tree binary overlay. > > Signed-off-by: Vikram Garhwal > --- > xen/arch/arm/Kconfig | 6 ++ > 1 file changed, 6 inserti

[ovmf test] 168583: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168583 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168583/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

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

2022-03-14 Thread osstest service owner
flight 168575 linux-linus real [real] flight 168582 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168575/ http://logs.test-lab.xenproject.org/osstest/logs/168582/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

Re: [XEN][RFC PATCH v3 01/14] xen/arm/device: Remove __init from function type

2022-03-14 Thread Luca Fancellu
> On 8 Mar 2022, at 19:46, Vikram Garhwal wrote: > > Change function type of following function to access during runtime: >1. map_irq_to_domain() >2. handle_device_interrupt() >3. map_range_to_domain() >4. unflatten_dt_node() >5. unflatten_device_tree() > > Move map_irq_to

[libvirt test] 168577: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168577 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/168577/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

Re: [PATCH] x86/hvm: Include interruptibility state in hvm_hw_cpu

2022-03-14 Thread Tamas K Lengyel
On Mon, Mar 14, 2022 at 3:22 AM Tian, Kevin wrote: > > > From: Lengyel, Tamas > > Sent: Friday, March 11, 2022 2:45 AM > > > > During VM fork resetting a failed vmentry has been observed when the reset > > is performed immediately after a STI instruction executed. This is due to > > the guest int

System hangs shortly after S3 resume, if suspended for a longer time

2022-03-14 Thread Marek Marczykowski-Górecki
Hi, I have another S3 issue, on the TGL system (the one with S3 present). If I suspend it for a short time, it works. But if I suspend it for longer, then it hangs shortly after resume - sometimes dom0's screenlocker manages to display password prompt, sometimes not even that. I have console on th

[ovmf test] 168581: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168581 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168581/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[xen-unstable test] 168573: tolerable FAIL

2022-03-14 Thread osstest service owner
flight 168573 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/168573/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-qemuu-freebsd11-amd64 21 guest-start/freebsd.repeat fail pass in 168545 Tests which did not s

[PATCH] x86/cet: Clear IST supervisor token busy bits on S3 resume

2022-03-14 Thread Andrew Cooper
Stacks are not freed across S3. Execution just stops, leaving supervisor token busy bits active. Fixing this for the primary shadow stack was done previously, but there is a (rare) risk that an IST token is left busy too. This will manifest as #DF next time the IST vector gets used. Introduce rd

[ovmf test] 168579: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168579 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168579/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[PATCH] kconfig: detect LD implementation

2022-03-14 Thread Roger Pau Monne
Detect GNU and LLVM ld implementations. This is required for further patches that will introduce diverging behaviour depending on the linker implementation in use. Note that LLVM ld returns "compatible with GNU linkers" as part of the version string, so be on the safe side and use '^' to only matc

Re: [PATCH v7 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-14 Thread Roger Pau Monné
On Fri, Mar 11, 2022 at 03:21:07PM +, Jane Malalane wrote: > diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c > index 117fcdcb2b..0ab9b145fe 100644 > --- a/tools/xl/xl_parse.c > +++ b/tools/xl/xl_parse.c > @@ -1681,6 +1681,22 @@ void parse_config_data(const char *config_source, >

Re: [PATCH v7 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86

2022-03-14 Thread Roger Pau Monné
On Fri, Mar 11, 2022 at 03:21:06PM +, Jane Malalane wrote: > Add XEN_SYSCTL_PHYSCAP_X86_ASSISTED_XAPIC and > XEN_SYSCTL_PHYSCAP_X86_ASSISTED_X2APIC to report accelerated xapic > and x2apic, on x86 hardware. > No such features are currently implemented on AMD hardware. > > HW assisted xAPIC vir

Re: [PATCH] MAINTAINERS: Propose Henry Wang as the new release manager

2022-03-14 Thread Julien Grall
Hi George, On 10/03/2022 21:46, George Dunlap wrote: ARM has proposed Henry Wang as a release manager for 4.17. Signify this by giving him maintainership over CHANGELOG.md. Below is an introduction given by Bertrand Marquis: Henry Wang is an open-source software engineer at Arm focusing on th

Re: [PATCH] include/public: add command result definitions to vscsiif.h

2022-03-14 Thread Jan Beulich
On 28.02.2022 12:22, Juergen Gross wrote: > --- a/xen/include/public/io/vscsiif.h > +++ b/xen/include/public/io/vscsiif.h > @@ -315,6 +315,33 @@ struct vscsiif_response { > }; > typedef struct vscsiif_response vscsiif_response_t; > > +/* SCSI I/O status from vscsiif_response->rslt */ > +#define

Re: [PATCH] include/public: add command result definitions to vscsiif.h

2022-03-14 Thread Juergen Gross
Ping? On 28.02.22 12:22, Juergen Gross wrote: The result field of struct vscsiif_response is lacking a detailed definition. Today the Linux kernel internal scsi definitions are being used, which is not a sane interface for a PV device driver. Add macros to change that by using today's values in

Re: [PATCH v2] x86: avoid SORT_BY_INIT_PRIORITY with old GNU ld

2022-03-14 Thread Jan Beulich
On 14.03.2022 10:05, Roger Pau Monné wrote: > On Mon, Mar 14, 2022 at 08:38:52AM +0100, Jan Beulich wrote: >> On 11.03.2022 16:07, Roger Pau Monné wrote: >>> On Fri, Mar 11, 2022 at 03:55:57PM +0100, Jan Beulich wrote: On 11.03.2022 15:34, Roger Pau Monné wrote: > On Fri, Mar 11, 2022 at 0

[PATCH] kexec-xen: Allow xen_kexec_exec() to return in case of Live Update

2022-03-14 Thread Raphael Ning
From: Raphael Ning Currently, my_exec() does not expect the Xen KEXEC_CMD_kexec hypercall to return on success, because it assumes that the hypercall always triggers an immediate reboot. However, for Live Update, the hypercall merely schedules the kexec operation and returns; the actual reboot ha

Re: [PATCH v2] x86: avoid SORT_BY_INIT_PRIORITY with old GNU ld

2022-03-14 Thread Roger Pau Monné
On Mon, Mar 14, 2022 at 08:38:52AM +0100, Jan Beulich wrote: > On 11.03.2022 16:07, Roger Pau Monné wrote: > > On Fri, Mar 11, 2022 at 03:55:57PM +0100, Jan Beulich wrote: > >> On 11.03.2022 15:34, Roger Pau Monné wrote: > >>> On Fri, Mar 11, 2022 at 02:28:40PM +0100, Jan Beulich wrote: > Supp

Re: [PATCH v3 3/4] x86/APIC: skip unnecessary parts of __setup_APIC_LVTT()

2022-03-14 Thread Roger Pau Monné
On Mon, Mar 14, 2022 at 09:25:07AM +0100, Jan Beulich wrote: > On 11.03.2022 15:05, Roger Pau Monné wrote: > > On Mon, Feb 14, 2022 at 10:25:31AM +0100, Jan Beulich wrote: > >> In TDT mode there's no point writing TDCR or TMICT, while outside of > >> that mode there's no need for the MFENCE. > >> >

Re: [PATCH v3 4/4] x86/APIC: make connections between seemingly arbitrary numbers

2022-03-14 Thread Roger Pau Monné
On Mon, Mar 14, 2022 at 09:19:01AM +0100, Jan Beulich wrote: > On 11.03.2022 15:24, Roger Pau Monné wrote: > > On Mon, Feb 14, 2022 at 10:25:57AM +0100, Jan Beulich wrote: > >> Making adjustments to arbitrarily chosen values shouldn't require > >> auditing the code for possible derived numbers - su

Re: [PATCH v3 3/4] x86/APIC: skip unnecessary parts of __setup_APIC_LVTT()

2022-03-14 Thread Jan Beulich
On 11.03.2022 15:05, Roger Pau Monné wrote: > On Mon, Feb 14, 2022 at 10:25:31AM +0100, Jan Beulich wrote: >> In TDT mode there's no point writing TDCR or TMICT, while outside of >> that mode there's no need for the MFENCE. >> >> No change intended to overall functioning. >> >> Signed-off-by: Jan B

Re: [PATCH v3 4/4] x86/APIC: make connections between seemingly arbitrary numbers

2022-03-14 Thread Jan Beulich
On 11.03.2022 15:24, Roger Pau Monné wrote: > On Mon, Feb 14, 2022 at 10:25:57AM +0100, Jan Beulich wrote: >> Making adjustments to arbitrarily chosen values shouldn't require >> auditing the code for possible derived numbers - such a change should >> be doable in a single place, having an effect o

[ovmf test] 168578: regressions - FAIL

2022-03-14 Thread osstest service owner
flight 168578 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168578/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: x86/vmx: Don't spuriously crash the domain when INIT is received

2022-03-14 Thread Jan Beulich
On 14.03.2022 07:35, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Monday, February 28, 2022 3:36 PM >> >> On 25.02.2022 18:11, Andrew Cooper wrote: >>> On 25/02/2022 13:19, Jan Beulich wrote: On 25.02.2022 13:28, Andrew Cooper wrote: > On 25/02/2022 08:44, Jan Beulich wrote: >> On

Re: [PATCH v2] x86: avoid SORT_BY_INIT_PRIORITY with old GNU ld

2022-03-14 Thread Jan Beulich
On 11.03.2022 16:07, Roger Pau Monné wrote: > On Fri, Mar 11, 2022 at 03:55:57PM +0100, Jan Beulich wrote: >> On 11.03.2022 15:34, Roger Pau Monné wrote: >>> On Fri, Mar 11, 2022 at 02:28:40PM +0100, Jan Beulich wrote: Support for this construct was added in 2.22 only. Avoid the need to i

Re: [PATCH v3 20/23] VT-d: free all-empty page tables

2022-03-14 Thread Jan Beulich
On 14.03.2022 05:01, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Friday, February 18, 2022 4:31 PM >> >> On 18.02.2022 06:20, Tian, Kevin wrote: From: Jan Beulich Sent: Tuesday, January 11, 2022 12:36 AM When a page table ends up with no present entries left, it can be >>

[PATCH 14/15] swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl

2022-03-14 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/swiotlb.h | 2 - kernel/dma/swiotlb.c| 85 +++-- 2 files changed, 30 insertions(+), 57 deletions(-) diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 7b50c82f84ce9..7ed3

[PATCH 15/15] x86: remove cruft from

2022-03-14 Thread Christoph Hellwig
gets pulled in by all drivers using the DMA API. Remove x86 internal variables and unnecessary includes from it. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/dma-mapping.h | 11 --- arch/x86/include/asm/iommu.h | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-

[PATCH 12/15] swiotlb: provide swiotlb_init variants that remap the buffer

2022-03-14 Thread Christoph Hellwig
To shared more code between swiotlb and xen-swiotlb, offer a swiotlb_init_remap interface and add a remap callback to swiotlb_init_late that will allow Xen to remap the buffer the buffer without duplicating much of the logic. Signed-off-by: Christoph Hellwig --- arch/x86/pci/sta2x11-fixup.c | 2

[PATCH 11/15] swiotlb: pass a gfp_mask argument to swiotlb_init_late

2022-03-14 Thread Christoph Hellwig
Let the caller chose a zone to allocate from. This will be used later on by the xen-swiotlb initialization on arm. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- arch/x86/pci/sta2x11-fixup.c | 2 +- include/linux/swiotlb.h | 2 +- kernel/dma/swiotlb.c | 7 ++--

[PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-14 Thread Christoph Hellwig
Reuse the generic swiotlb initialization for xen-swiotlb. For ARM/ARM64 this works trivially, while for x86 xen_swiotlb_fixup needs to be passed as the remap argument to swiotlb_init_remap/swiotlb_init_late. Signed-off-by: Christoph Hellwig --- arch/arm/xen/mm.c | 21 +++--- arch

[PATCH 10/15] swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction

2022-03-14 Thread Christoph Hellwig
Power SVM wants to allocate a swiotlb buffer that is not restricted to low memory for the trusted hypervisor scheme. Consolidate the support for this into the swiotlb_init interface by adding a new flag. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/svm.h | 4 arch/p

[PATCH 07/15] x86: remove the IOMMU table infrastructure

2022-03-14 Thread Christoph Hellwig
The IOMMU table tries to separate the different IOMMUs into different backends, but actually requires various cross calls. Rewrite the code to do the generic swiotlb/swiotlb-xen setup directly in pci-dma.c and then just call into the IOMMU drivers. Signed-off-by: Christoph Hellwig --- arch/ia64

[PATCH 03/15] swiotlb: simplify swiotlb_max_segment

2022-03-14 Thread Christoph Hellwig
Remove the bogus Xen override that was usually larger than the actual size and just calculate the value on demand. Note that swiotlb_max_segment still doesn't make sense as an interface and should eventually be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- driver

  1   2   >