Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Jan Beulich
On 25.05.2023 01:37, Stefano Stabellini wrote: > On Wed, 24 May 2023, Jan Beulich wrote: RFC: _setup_hwdom_pci_devices()' loop may want splitting: For modify_bars() to consistently respect BARs of hidden devices while setting up "normal" ones (i.e. to avoid as much as possi

Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Roger Pau Monné
On Wed, May 24, 2023 at 04:37:42PM -0700, Stefano Stabellini wrote: > On Wed, 24 May 2023, Jan Beulich wrote: > > >> RFC: _setup_hwdom_pci_devices()' loop may want splitting: For > > >> modify_bars() to consistently respect BARs of hidden devices while > > >> setting up "normal" ones (i.e

Re: [PATCH v2] iommu/vtd: fix address translation for superpages

2023-05-25 Thread Roger Pau Monné
On Wed, May 24, 2023 at 06:11:03PM +0200, Jan Beulich wrote: > On 24.05.2023 17:22, Roger Pau Monne wrote: > > When translating an address that falls inside of a superpage in the > > IOMMU page tables the fetching of the PTE value wasn't masking of the > > contiguous related data, which caused the

Re: [PATCH 3/3] xen/misra: xen-analysis.py: Fix cppcheck report relative paths

2023-05-25 Thread Luca Fancellu
> On 25 May 2023, at 01:46, Stefano Stabellini wrote: > > On Fri, 19 May 2023, Luca Fancellu wrote: >> Fix the generation of the relative path from the repo, for cppcheck >> reports, when the script is launching make with in-tree build. >> >> Fixes: b046f7e37489 ("xen/misra: xen-analysis.py: u

Re: [PATCH 2/2] xen/misra: diff-report.py: add report patching feature

2023-05-25 Thread Luca Fancellu
>>>if args.out == "stdout": >>>file_out = sys.stdout >>>else: >>> @@ -63,11 +90,35 @@ def main(argv): >>>new_rep.parse() >>>debug.debug_print_parsed_report(new_rep) >>>log_info(" [OK]") >>> -except ReportError as e: >>> +diff_source = None >>> +

[PATCH v3] iommu/vtd: fix address translation for leaf entries

2023-05-25 Thread Roger Pau Monne
Fix two issues related to leaf address lookups in VT-d: * When translating an address that falls inside of a superpage in the IOMMU page tables the fetching of the PTE value wasn't masking of the contiguous related data, which caused the returned data to be corrupt as it would contain bits t

Re: [PATCH v7 00/12] SVE feature for arm guests

2023-05-25 Thread Luca Fancellu
> On 23 May 2023, at 08:43, Luca Fancellu wrote: > > This serie is introducing the possibility for Dom0 and DomU guests to use > sve/sve2 instructions. > > SVE feature introduces new instruction and registers to improve performances > on > floating point operations. > > The SVE feature is a

[linux-linus test] 180934: regressions - FAIL

2023-05-25 Thread osstest service owner
flight 180934 linux-linus real [real] flight 180940 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/180934/ http://logs.test-lab.xenproject.org/osstest/logs/180940/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run

[qemu-mainline test] 180937: regressions - FAIL

2023-05-25 Thread osstest service owner
flight 180937 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/180937/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 180691 build-amd64-xsm

[PATCH] vpci/header: cope with devices not having vpci allocated

2023-05-25 Thread Roger Pau Monne
When traversing the list of pci devices assigned to a domain cope with some of them not having the vpci struct allocated. It's possible for the hardware domain to have read-only devices assigned that are not handled by vPCI, or for unprivileged domains to have some devices handled by an emulator di

[PATCH v3 1/3] xen/misra: add diff-report.py tool

2023-05-25 Thread Luca Fancellu
Add a new tool, diff-report.py that can be used to make diff between reports generated by xen-analysis.py tool. Currently this tool supports the Xen cppcheck text report format in its operations. The tool prints every finding that is in the report passed with -r (check report) which is not in the

[PATCH v3 2/3] xen/misra: diff-report.py: add report patching feature

2023-05-25 Thread Luca Fancellu
Add a feature to the diff-report.py script that improves the comparison between two analysis report, one from a baseline codebase and the other from the changes applied to the baseline. The comparison between reports of different codebase is an issue because entries in the baseline could have been

[PATCH v3 0/3] diff-report.py tool

2023-05-25 Thread Luca Fancellu
This serie is dependent on this patch, in case cppcheck report are generated using xen-analysis.py that calls the makefile with in-tree build, because this tool (in particular the patching feature) needs the path from

[PATCH v3 3/3] maintainers: Add Xen MISRA Analysis Tools section

2023-05-25 Thread Luca Fancellu
Add a section for the Xen MISRA Analysis Tools. Signed-off-by: Luca Fancellu --- Changes from v2: - New patch, suggested by Stefano: https://lore.kernel.org/all/alpine.DEB.2.22.394.2305171232440.128889@ubuntu-linux-20-04-desktop/ --- MAINTAINERS | 10 ++ 1 file changed, 10 insertion

Re: [PATCH v7 09/12] tools: add physinfo arch_capabilities handling for Arm

2023-05-25 Thread Marek Marczykowski-Górecki
On Tue, May 23, 2023 at 08:43:23AM +0100, Luca Fancellu wrote: > On Arm, the SVE vector length is encoded in arch_capabilities field > of struct xen_sysctl_physinfo, make use of this field in the tools > when building for arm. > > Create header arm-arch-capabilities.h to handle the arch_capabiliti

Re: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs

2023-05-25 Thread Michal Orzel
Hi Luca, Sorry for jumping into this but I just wanted to read the dt binding doc and spotted one thing by accident. On 24/05/2023 17:20, Bertrand Marquis wrote: > > > Hi Luca, > >> On 23 May 2023, at 09:43, Luca Fancellu wrote: >> >> Add a device tree property in the dom0less domU configura

Re: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs

2023-05-25 Thread Luca Fancellu
> On 25 May 2023, at 09:52, Michal Orzel wrote: > > Hi Luca, > > Sorry for jumping into this but I just wanted to read the dt binding doc and > spotted one thing by accident. > > On 24/05/2023 17:20, Bertrand Marquis wrote: >> >> >> Hi Luca, >> >>> On 23 May 2023, at 09:43, Luca Fancellu

Re: [PATCH v2 01/34] mm: Add PAGE_TYPE_OP folio functions

2023-05-25 Thread Mike Rapoport
Hi, On Mon, May 01, 2023 at 12:27:56PM -0700, Vishal Moola (Oracle) wrote: > No folio equivalents for page type operations have been defined, so > define them for later folio conversions. Can you please elaborate why would we need folios for page table descriptors? > Also changes the Page##una

Re: [PATCH v3] iommu/vtd: fix address translation for leaf entries

2023-05-25 Thread Jan Beulich
On 25.05.2023 10:08, Roger Pau Monne wrote: > Fix two issues related to leaf address lookups in VT-d: > > * When translating an address that falls inside of a superpage in the > IOMMU page tables the fetching of the PTE value wasn't masking of the > contiguous related data, which caused the re

Re: [PATCH v7 01/12] xen/arm: enable SVE extension for Xen

2023-05-25 Thread Julien Grall
On 23/05/2023 08:43, Luca Fancellu wrote: Enable Xen to handle the SVE extension, add code in cpufeature module to handle ZCR SVE register, disable trapping SVE feature on system boot only when SVE resources are accessed. While there, correct coding style for the comment on coprocessor trappin

Re: [PATCH v7 01/12] xen/arm: enable SVE extension for Xen

2023-05-25 Thread Julien Grall
On 23/05/2023 08:43, Luca Fancellu wrote: Enable Xen to handle the SVE extension, add code in cpufeature module to handle ZCR SVE register, disable trapping SVE feature on system boot only when SVE resources are accessed. While there, correct coding style for the comment on coprocessor trappin

Re: [PATCH v2 02/34] s390: Use _pt_s390_gaddr for gmap address tracking

2023-05-25 Thread Mike Rapoport
On Mon, May 01, 2023 at 12:27:57PM -0700, Vishal Moola (Oracle) wrote: > s390 uses page->index to keep track of page tables for the guest address > space. In an attempt to consolidate the usage of page fields in s390, > replace _pt_pad_2 with _pt_s390_gaddr to replace page->index in gmap. > > This

Re: [PATCH v7 02/12] xen/arm: add SVE vector length field to the domain

2023-05-25 Thread Julien Grall
Hi, On 23/05/2023 08:43, Luca Fancellu wrote: Add sve_vl field to arch_domain and xen_arch_domainconfig struct, to allow the domain to have an information about the SVE feature and the number of SVE register bits that are allowed for this domain. sve_vl field is the vector length in bits divide

Re: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs

2023-05-25 Thread Bertrand Marquis
Hi Luca, > On 25 May 2023, at 10:55, Luca Fancellu wrote: > > > >> On 25 May 2023, at 09:52, Michal Orzel wrote: >> >> Hi Luca, >> >> Sorry for jumping into this but I just wanted to read the dt binding doc and >> spotted one thing by accident. >> >> On 24/05/2023 17:20, Bertrand Marquis

Re: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs

2023-05-25 Thread Michal Orzel
On 25/05/2023 10:55, Luca Fancellu wrote: > > >> On 25 May 2023, at 09:52, Michal Orzel wrote: >> >> Hi Luca, >> >> Sorry for jumping into this but I just wanted to read the dt binding doc and >> spotted one thing by accident. >> >> On 24/05/2023 17:20, Bertrand Marquis wrote: >>> >>> >>> Hi

Re: [PATCH] vpci/header: cope with devices not having vpci allocated

2023-05-25 Thread Jan Beulich
On 25.05.2023 10:30, Roger Pau Monne wrote: > When traversing the list of pci devices assigned to a domain cope with > some of them not having the vpci struct allocated. It's possible for > the hardware domain to have read-only devices assigned that are not > handled by vPCI, or for unprivileged do

Re: [PATCH v7 05/12] arm/sve: save/restore SVE context switch

2023-05-25 Thread Julien Grall
Hi Luca, On 23/05/2023 08:43, Luca Fancellu wrote: +int sve_context_init(struct vcpu *v) +{ +unsigned int sve_vl_bits = sve_decode_vl(v->domain->arch.sve_vl); +uint64_t *ctx = _xzalloc(sve_zreg_ctx_size(sve_vl_bits) + + sve_ffrreg_ctx_size(sve_vl_bits), +

Re: [PATCH v2 05/34] mm: add utility functions for ptdesc

2023-05-25 Thread Mike Rapoport
On Mon, May 01, 2023 at 12:28:00PM -0700, Vishal Moola (Oracle) wrote: > Introduce utility functions setting the foundation for ptdescs. These > will also assist in the splitting out of ptdesc from struct page. > > ptdesc_alloc() is defined to allocate new ptdesc pages as compound > pages. This is

Re: [PATCH v7 09/12] tools: add physinfo arch_capabilities handling for Arm

2023-05-25 Thread Luca Fancellu
> On 25 May 2023, at 09:39, Marek Marczykowski-Górecki > wrote: > > On Tue, May 23, 2023 at 08:43:23AM +0100, Luca Fancellu wrote: >> On Arm, the SVE vector length is encoded in arch_capabilities field >> of struct xen_sysctl_physinfo, make use of this field in the tools >> when building for a

Re: [PATCH v7 07/12] xen: enable Dom0 to use SVE feature

2023-05-25 Thread Julien Grall
On 24/05/2023 11:05, Bertrand Marquis wrote: Hi Luca, Hi, On 23 May 2023, at 09:43, Luca Fancellu wrote: Add a command line parameter to allow Dom0 the use of SVE resources, the command line parameter sve=, sub argument of dom0=, controls the feature on this domain and sets the maximum

Re: [PATCH v2 13/34] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-05-25 Thread Mike Rapoport
On Mon, May 01, 2023 at 12:28:08PM -0700, Vishal Moola (Oracle) wrote: > Creates ptdesc_pte_ctor(), ptdesc_pmd_ctor(), ptdesc_pte_dtor(), and > ptdesc_pmd_dtor() and make the original pgtable constructor/destructors > wrappers. I think pgtable_pXY_ctor/dtor names would be better. > Signed-off-by

Re: [PATCH v7 09/12] tools: add physinfo arch_capabilities handling for Arm

2023-05-25 Thread Luca Fancellu
>> >> (...) >> >>> diff --git a/tools/python/xen/lowlevel/xc/xc.c >>> b/tools/python/xen/lowlevel/xc/xc.c >>> index 9728b34185ac..b3699fdac58e 100644 >>> --- a/tools/python/xen/lowlevel/xc/xc.c >>> +++ b/tools/python/xen/lowlevel/xc/xc.c >>> @@ -22,6 +22,7 @@ >>> #include >>> #include >>> >>>

Re: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs

2023-05-25 Thread Julien Grall
Hi, On 23/05/2023 08:43, Luca Fancellu wrote: Add a device tree property in the dom0less domU configuration to enable the guest to use SVE. Update documentation. Signed-off-by: Luca Fancellu --- Changes from v6: - Use ifdef in create_domUs and fail if 'sve' is used on systems with CONFI

Re: [PATCH] iscsi_ibft: Fix finding the iBFT under Xen Dom 0

2023-05-25 Thread Jan Beulich
On 24.05.2023 18:05, Ross Lagerwall wrote: > --- a/arch/x86/xen/setup.c > +++ b/arch/x86/xen/setup.c > @@ -772,8 +772,14 @@ char * __init xen_memory_setup(void) >* UNUSABLE regions in domUs are not handled and will need >* a patch in the future. >*/ I think this comment now

Re: [PATCH v7 12/12] xen/changelog: Add SVE and "dom0" options to the changelog for Arm

2023-05-25 Thread Julien Grall
Hi, On 23/05/2023 08:43, Luca Fancellu wrote: Arm now can use the "dom0=" Xen command line option and the support for guests running SVE instructions is added, put entries in the changelog. Mention the "Tech Preview" status and add an entry in SUPPORT.md Signed-off-by: Luca Fancellu Acked-by:

Re: xen | Failed pipeline for staging | 511b9f28

2023-05-25 Thread Jan Beulich
On 24.05.2023 21:51, GitLab wrote: > > > Pipeline #878023438 has failed! > > Project: xen ( https://gitlab.com/xen-project/xen ) > Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) > > Commit: 511b9f28 ( > https://gitlab.com/xen-project/xen/-/commit/511b9f286c3dadd041e0d

Re: xen | Failed pipeline for staging | 511b9f28

2023-05-25 Thread Andrew Cooper
On 25/05/2023 10:49 am, Jan Beulich wrote: > On 24.05.2023 21:51, GitLab wrote: >> >> Pipeline #878023438 has failed! >> >> Project: xen ( https://gitlab.com/xen-project/xen ) >> Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) >> >> Commit: 511b9f28 ( >> https://gitlab.com

Re: [PATCH v7 05/12] arm/sve: save/restore SVE context switch

2023-05-25 Thread Luca Fancellu
> On 25 May 2023, at 10:09, Julien Grall wrote: > > Hi Luca, > > On 23/05/2023 08:43, Luca Fancellu wrote: >> +int sve_context_init(struct vcpu *v) >> +{ >> +unsigned int sve_vl_bits = sve_decode_vl(v->domain->arch.sve_vl); >> +uint64_t *ctx = _xzalloc(sve_zreg_ctx_size(sve_vl_bits) +

Re: [PATCH v7 09/12] tools: add physinfo arch_capabilities handling for Arm

2023-05-25 Thread Luca Fancellu
> On 25 May 2023, at 10:21, Luca Fancellu wrote: > >>> >>> (...) >>> diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 9728b34185ac..b3699fdac58e 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/

Re: [XEN v7 06/11] xen: dt: Replace u64 with uint64_t as the callback function parameters for dt_for_each_range()

2023-05-25 Thread Julien Grall
Hi Ayan, On 18/05/2023 15:39, Ayan Kumar Halder wrote: In the callback functions invoked by dt_for_each_range() ie handle_pci_range(), map_range_to_domain(), 'u64' should be replaced with 'uint64_t' as the data type for the parameters. The reason being Xen coding style mentions that u32/u64 shou

Re: [PATCH v7 05/12] arm/sve: save/restore SVE context switch

2023-05-25 Thread Julien Grall
Hi Luca, On 25/05/2023 11:01, Luca Fancellu wrote: On 25 May 2023, at 10:09, Julien Grall wrote: diff --git a/xen/arch/arm/include/asm/arm64/vfp.h b/xen/arch/arm/include/asm/arm64/vfp.h index e6e8c363bc16..4aa371e85d26 100644 --- a/xen/arch/arm/include/asm/arm64/vfp.h +++ b/xen/arch/arm/inclu

Re: [XEN v7 07/11] xen/arm: p2m: Use the pa_range_info table to support ARM_32 and ARM_64

2023-05-25 Thread Julien Grall
Hi, On 24/05/2023 15:21, Ayan Kumar Halder wrote: On 19/05/2023 09:54, Michal Orzel wrote: Hi Ayan, Hi Michal, On 18/05/2023 16:39, Ayan Kumar Halder wrote: Restructure the code so that one can use pa_range_info[] table for both ARM_32 as well as ARM_64. Also, removed the hardcoding for P

Re: [XEN PATCH 02/15] build: rework asm-offsets.* build step to use kbuild

2023-05-25 Thread Anthony PERARD
On Wed, May 24, 2023 at 04:09:39PM +0200, Jan Beulich wrote: > On 23.05.2023 18:37, Anthony PERARD wrote: > > Use $(if_changed_dep, ) macro to generate "asm-offsets.s" and remove > > the use of $(move-if-changes,). That mean that "asm-offset.s" will be > > changed even when the output doesn't chang

Re: [XEN PATCH 03/15] build, x86: clean build log for boot/ targets

2023-05-25 Thread Anthony PERARD
On Wed, May 24, 2023 at 04:16:54PM +0200, Jan Beulich wrote: > On 23.05.2023 18:37, Anthony PERARD wrote: > > We are adding %.lnk to .PRECIOUS or make treat them as intermediate > > targets and remove them. > > What's wrong with them getting removed? Note also that's no different from > today, so

Re: [RFC] Xen crashes on ASSERT on suspend/resume, suggested fix

2023-05-25 Thread Jan Beulich
On 25.05.2023 01:51, Stefano Stabellini wrote: > xen/irq: fix races between send_cleanup_vector and _clear_irq_vector This title is, I'm afraid, already misleading. No such race can occur afaict, as both callers of _clear_irq_vector() acquire the IRQ descriptor lock first, and irq_complete_move()

Re: [XEN PATCH 07/15] build: move XEN_HAS_BUILD_ID out of Config.mk

2023-05-25 Thread Jan Beulich
On 23.05.2023 18:38, Anthony PERARD wrote: > Whether or not the linker can do build id is only used by the > hypervisor build, so move that there. > > Rename $(build_id_linker) to $(XEN_LDFLAGS_BUILD_ID) as this is a > better name to be exported as to use the "XEN_*" namespace. > > Also update XE

Re: [XEN PATCH 08/15] build: use $(filechk, ) for all compat/.xlat/%.lst

2023-05-25 Thread Jan Beulich
On 23.05.2023 18:38, Anthony PERARD wrote: > Make use of filechk mean that we don't have to use I think you mean "Making use of filechk means ...", or else it reads as if you're changing how filechk behaves. (I'd again be happy to adjust while committing, provided you agree; here it looks pretty c

Re: [XEN PATCH 09/15] build: hide commands run for kconfig

2023-05-25 Thread Jan Beulich
On 23.05.2023 18:38, Anthony PERARD wrote: > but still show a log entry for syncconfig. We have to use kecho > instead of $(cmd,) to avoid issue with prompt from kconfig. Reading this description I was looking for uses of $(cmd ...) that you replace. I think this wants wording differently, e.g. "W

Re: [XEN PATCH 10/15] build: rename $(AFLAGS) to $(XEN_AFLAGS)

2023-05-25 Thread Jan Beulich
On 24.05.2023 10:47, Luca Fancellu wrote: > > >> On 24 May 2023, at 09:29, Luca Fancellu wrote: >> >> >> >>> On 23 May 2023, at 17:38, Anthony PERARD wrote: >>> >>> We don't want the AFLAGS from the environment, they are usually meant >>> to build user space application and not for the hypervis

Re: [XEN PATCH 11/15] build: rename CFLAGS to XEN_CFLAGS in xen/Makefile

2023-05-25 Thread Jan Beulich
On 23.05.2023 18:38, Anthony PERARD wrote: > This is a preparatory patch. A future patch will not even use > $(CFLAGS) to seed $(XEN_CFLAGS). > > Signed-off-by: Anthony PERARD Acked-by: Jan Beulich I have a question though, albeit not directly related to this patch: > --- a/xen/Makefile > +++

Re: [XEN PATCH 12/15] build: avoid Config.mk's CFLAGS

2023-05-25 Thread Jan Beulich
On 23.05.2023 18:38, Anthony PERARD wrote: > The variable $(CFLAGS) is too often set in the environment, > especially when building a package for a distribution. Often, those > CFLAGS are intended to be use to build user spaces binaries, not a > kernel. This mean packager needs to takes extra steps

Re: [PATCH v5 05/14] tools/xenstore: use accounting buffering for node accounting

2023-05-25 Thread Juergen Gross
On 11.05.23 14:07, Julien Grall wrote: Hi Juergen, On 11/05/2023 06:25, Juergen Gross wrote: On 10.05.23 23:31, Julien Grall wrote: On 10/05/2023 13:54, Juergen Gross wrote: On 09.05.23 20:46, Julien Grall wrote: Hi Juergen, On 08/05/2023 12:47, Juergen Gross wrote: Add the node accounting

Re: [XEN PATCH 04/15] build: hide policy.bin commands

2023-05-25 Thread Daniel P. Smith
On 5/23/23 12:38, Anthony PERARD wrote: Instead, show only when "policy.bin" is been updated. We still have the full command from the flask/policy Makefile, but we can't change that Makefile. Signed-off-by: Anthony PERARD --- xen/xsm/flask/Makefile | 9 +++-- 1 file changed, 7 insertion

Re: [XEN PATCH 13/15] build: fix compile.h compiler version command line

2023-05-25 Thread Jan Beulich
On 23.05.2023 20:14, Andrew Cooper wrote: > On 23/05/2023 5:38 pm, Anthony PERARD wrote: >> CFLAGS is just from Config.mk, instead use the flags used to build >> Xen. >> >> Signed-off-by: Anthony PERARD >> --- >> >> Notes: >> I don't know if CFLAGS is even useful there, just --version without

Re: [XEN PATCH 13/15] build: fix compile.h compiler version command line

2023-05-25 Thread Jan Beulich
On 24.05.2023 11:43, Luca Fancellu wrote: > > >> On 23 May 2023, at 17:38, Anthony PERARD wrote: >> >> CFLAGS is just from Config.mk, instead use the flags used to build >> Xen. >> >> Signed-off-by: Anthony PERARD >> --- >> >> Notes: >>I don't know if CFLAGS is even useful there, just --ver

Re: [PATCH 1/3] docs: fix complex-and-wrong xenstore-path wording

2023-05-25 Thread Juergen Gross
On 10.05.23 16:20, Yann Dirson wrote: "0 or 1 ... to indicate whether it is capable or incapable, respectively" is luckily just swapped words. Making this shorter will make the reading easier. Signed-off-by: Yann Dirson Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc

Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Jan Beulich
On 24.05.2023 17:33, Roger Pau Monné wrote: > On Wed, May 24, 2023 at 04:44:49PM +0200, Jan Beulich wrote: >> On 24.05.2023 16:22, Roger Pau Monné wrote: >>> On Wed, May 24, 2023 at 03:45:58PM +0200, Jan Beulich wrote: Hidden devices (e.g. an add-in PCI serial card used for Xen's serial c

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Mickaël Salaün
On 24/05/2023 23:04, Trilok Soni wrote: On 5/5/2023 8:20 AM, Mickaël Salaün wrote: Hi, This patch series is a proof-of-concept that implements new KVM features (extended page tracking, MBEC support, CR pinning) and defines a new API to protect guest VMs. No VMM (e.g., Qemu) modification is re

Re: [PATCH] vpci/header: cope with devices not having vpci allocated

2023-05-25 Thread Roger Pau Monné
On Thu, May 25, 2023 at 11:05:52AM +0200, Jan Beulich wrote: > On 25.05.2023 10:30, Roger Pau Monne wrote: > > When traversing the list of pci devices assigned to a domain cope with > > some of them not having the vpci struct allocated. It's possible for > > the hardware domain to have read-only de

Re: [PATCH] vpci/header: cope with devices not having vpci allocated

2023-05-25 Thread Jan Beulich
On 25.05.2023 15:27, Roger Pau Monné wrote: > On Thu, May 25, 2023 at 11:05:52AM +0200, Jan Beulich wrote: >> On 25.05.2023 10:30, Roger Pau Monne wrote: >>> When traversing the list of pci devices assigned to a domain cope with >>> some of them not having the vpci struct allocated. It's possible f

Re: [XEN PATCH 04/15] build: hide policy.bin commands

2023-05-25 Thread Anthony PERARD
On Wed, May 24, 2023 at 09:11:10AM +0200, Jan Beulich wrote: > On 23.05.2023 18:38, Anthony PERARD wrote: > > --- a/xen/xsm/flask/Makefile > > +++ b/xen/xsm/flask/Makefile > > @@ -48,10 +48,15 @@ targets += flask-policy.S > > FLASK_BUILD_DIR := $(abs_objtree)/$(obj) > > POLICY_SRC := $(FLASK_BUIL

Re: [XEN PATCH 05/15] build: introduce a generic command for gzip

2023-05-25 Thread Anthony PERARD
On Wed, May 24, 2023 at 09:17:09AM +0200, Jan Beulich wrote: > On 23.05.2023 18:38, Anthony PERARD wrote: > > Make the gzip command generic and use -9 which wasn't use for > > config.gz. (xen.gz does use -9) > > You mention xen.gz here, but you don't make its rule use this new > construct. Is that

Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-25 Thread Linus Walleij
On Thu, May 25, 2023 at 7:12 AM Jakub Kicinski wrote: > On Wed, 24 May 2023 22:11:47 -0700 Jakub Kicinski wrote: > > On Tue, 23 May 2023 16:03:42 +0200 Linus Walleij wrote: > > > virt_to_page() takes a virtual address as argument but > > > the driver passes an unsigned long, which works because >

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Mickaël Salaün
On 25/05/2023 00:20, Edgecombe, Rick P wrote: On Fri, 2023-05-05 at 17:20 +0200, Mickaël Salaün wrote: # How does it work? This implementation mainly leverages KVM capabilities to control the Second Layer Address Translation (or the Two Dimensional Paging e.g., Intel's EPT or AMD's RVI/NPT) a

Re: [PATCH v3 06/12] x86/shadow: restrict OOS allocation to when it's really needed

2023-05-25 Thread Roger Pau Monné
On Tue, May 16, 2023 at 09:40:22AM +0200, Jan Beulich wrote: > PV domains won't use it, and even HVM ones won't when OOS is turned off > for them. There's therefore no point in putting extra pressure on the > (limited) pool of memory. > > While there also zap the sh_type_to_size[] entry when OOS i

Re: [PATCH v3 07/12] x86/shadow: OOS doesn't track VAs anymore

2023-05-25 Thread Roger Pau Monné
On Tue, May 16, 2023 at 09:40:50AM +0200, Jan Beulich wrote: > The tracking lasted only for about two weeks, but the related comment > parts were never purged. > > Fixes: 50b74f55e0c0 ("OOS cleanup: Fixup arrays instead of fixup tables") > Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné T

Re: [XEN PATCH 04/15] build: hide policy.bin commands

2023-05-25 Thread Jan Beulich
On 25.05.2023 15:34, Anthony PERARD wrote: > On Wed, May 24, 2023 at 09:11:10AM +0200, Jan Beulich wrote: >> On 23.05.2023 18:38, Anthony PERARD wrote: >>> --- a/xen/xsm/flask/Makefile >>> +++ b/xen/xsm/flask/Makefile >>> @@ -48,10 +48,15 @@ targets += flask-policy.S >>> FLASK_BUILD_DIR := $(abs_o

Re: [XEN PATCH 07/15] build: move XEN_HAS_BUILD_ID out of Config.mk

2023-05-25 Thread Anthony PERARD
On Thu, May 25, 2023 at 01:56:53PM +0200, Jan Beulich wrote: > On 23.05.2023 18:38, Anthony PERARD wrote: > > Whether or not the linker can do build id is only used by the > > hypervisor build, so move that there. > > > > Rename $(build_id_linker) to $(XEN_LDFLAGS_BUILD_ID) as this is a > > better

Re: [XEN PATCH 08/15] build: use $(filechk, ) for all compat/.xlat/%.lst

2023-05-25 Thread Anthony PERARD
On Thu, May 25, 2023 at 02:04:00PM +0200, Jan Beulich wrote: > On 23.05.2023 18:38, Anthony PERARD wrote: > > Make use of filechk mean that we don't have to use > > I think you mean "Making use of filechk means ...", or else it reads as > if you're changing how filechk behaves. (I'd again be happy

Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Jan Beulich
On 24.05.2023 17:56, Roger Pau Monné wrote: > On Wed, May 24, 2023 at 03:45:58PM +0200, Jan Beulich wrote: >> --- a/xen/drivers/vpci/header.c >> +++ b/xen/drivers/vpci/header.c >> @@ -218,6 +218,7 @@ static int modify_bars(const struct pci_ >> struct vpci_header *header = &pdev->vpci->header;

[PATCH v2] vpci/header: cope with devices not having vpci allocated

2023-05-25 Thread Roger Pau Monne
When traversing the list of pci devices assigned to a domain cope with some of them not having the vpci struct allocated. It should be possible for the hardware domain to have read-only devices assigned that are not handled by vPCI, such support will be added by further patches. Signed-off-by: Rog

Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Roger Pau Monné
On Thu, May 25, 2023 at 04:39:51PM +0200, Jan Beulich wrote: > On 24.05.2023 17:56, Roger Pau Monné wrote: > > On Wed, May 24, 2023 at 03:45:58PM +0200, Jan Beulich wrote: > >> --- a/xen/drivers/vpci/header.c > >> +++ b/xen/drivers/vpci/header.c > >> @@ -218,6 +218,7 @@ static int modify_bars(const

[xen-unstable test] 180938: regressions - FAIL

2023-05-25 Thread osstest service owner
flight 180938 xen-unstable real [real] flight 180944 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/180938/ http://logs.test-lab.xenproject.org/osstest/logs/180944/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be r

Re: [PATCH v2] vpci/header: cope with devices not having vpci allocated

2023-05-25 Thread Jan Beulich
On 25.05.2023 16:54, Roger Pau Monne wrote: > When traversing the list of pci devices assigned to a domain cope with > some of them not having the vpci struct allocated. It should be > possible for the hardware domain to have read-only devices assigned > that are not handled by vPCI, such support w

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

2023-05-25 Thread osstest service owner
flight 180943 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/180943/ 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

[PATCH v1] x86/hvm/ioreq: remove empty line after function declaration

2023-05-25 Thread Olaf Hering
Introduced in commit 6ddfaabceeec3c31bc97a7208c46f581de55f71d ("x86/hvm/ioreq: simplify code and use consistent naming"). Signed-off-by: Olaf Hering --- xen/arch/x86/hvm/ioreq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c index 20dbb4c8c

[PATCH v9 1/5] xen/riscv: add VM space layout

2023-05-25 Thread Oleksii Kurochko
Also it was added explanation about ignoring of top VA bits Signed-off-by: Oleksii Kurochko --- Changes in V9: - Update comment for VM layout description. --- Changes in V8: - Add "#ifdef RV_STAGE1_MODE == SATP_MODE_SV39" instead of "#ifdef SV39" in the comment to VM layout description. - U

[PATCH v9 2/5] xen/riscv: introduce setup_initial_pages

2023-05-25 Thread Oleksii Kurochko
The idea was taken from xvisor but the following changes were done: * Use only a minimal part of the code enough to enable MMU * rename {_}setup_initial_pagetables functions * add an argument for setup_initial_mapping to have an opportunity to make set PTE flags. * update setup_initial_pagetables

[PATCH v9 5/5] xen/riscv: remove dummy_bss variable

2023-05-25 Thread Oleksii Kurochko
After introduction of initial pagetables there is no any sense in dummy_bss variable as bss section will not be empty anymore. Signed-off-by: Oleksii Kurochko --- Changes in V9: - Nothing changed. Only rebase --- Changes in V8: - Nothing changed. Only rebase --- Changes in V7: - Nothing change

[PATCH v9 3/5] xen/riscv: align __bss_start

2023-05-25 Thread Oleksii Kurochko
bss clear cycle requires proper alignment of __bss_start. ALIGN(PAGE_SIZE) before "*(.bss.page_aligned)" in xen.lds.S was removed as any contribution to "*(.bss.page_aligned)" have to specify proper aligntment themselves. Fixes: cfa0409f7cbb ("xen/riscv: initialize .bss section") Signed-off-by: O

[PATCH v9 4/5] xen/riscv: setup initial pagetables

2023-05-25 Thread Oleksii Kurochko
The patch does two thing: 1. Setup initial pagetables. 2. Enable MMU which end up with code in cont_after_mmu_is_enabled() Signed-off-by: Oleksii Kurochko --- Changes in V9: - Nothing changed. Only rebase --- Changes in V8: - Nothing changed. Only rebase --- Changes in V7: - Nothing changed

[PATCH v9 0/5] enable MMU for RISC-V

2023-05-25 Thread Oleksii Kurochko
The patch series introduces the following things: 1. Functionality to build the page tables for Xen that map link-time to physical-time location. 2. Check that Xen is less then page size. 3. Check that load addresses don't overlap with linker addresses. 4. Prepare things for proper switch to vir

Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Jan Beulich
On 25.05.2023 17:02, Roger Pau Monné wrote: > On Thu, May 25, 2023 at 04:39:51PM +0200, Jan Beulich wrote: >> On 24.05.2023 17:56, Roger Pau Monné wrote: >>> On Wed, May 24, 2023 at 03:45:58PM +0200, Jan Beulich wrote: --- a/xen/drivers/vpci/header.c +++ b/xen/drivers/vpci/header.c @

[qemu-mainline test] 180942: regressions - FAIL

2023-05-25 Thread osstest service owner
flight 180942 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/180942/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 180691 build-amd64-xsm

Re: [PATCH RFC v2] vPCI: account for hidden devices

2023-05-25 Thread Jan Beulich
On 25.05.2023 17:30, Jan Beulich wrote: > On 25.05.2023 17:02, Roger Pau Monné wrote: >> On Thu, May 25, 2023 at 04:39:51PM +0200, Jan Beulich wrote: >>> On 24.05.2023 17:56, Roger Pau Monné wrote: On Wed, May 24, 2023 at 03:45:58PM +0200, Jan Beulich wrote: > --- a/xen/drivers/vpci/header

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Edgecombe, Rick P
On Thu, 2023-05-25 at 15:59 +0200, Mickaël Salaün wrote: [ snip ] > > The kernel often creates writable aliases in order to write to > > protected data (kernel text, etc). Some of this is done right as > > text > > is being first written out (alternatives for example), and some > > happens > > way

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Sean Christopherson
On Thu, May 25, 2023, Rick P Edgecombe wrote: > I wonder if it might be a good idea to POC the guest side before > settling on the KVM interface. Then you can also look at the whole > thing and judge how much usage it would get for the different options > of restrictions. As I said earlier[*], IMO

[libvirt test] 180939: tolerable all pass - PUSHED

2023-05-25 Thread osstest service owner
flight 180939 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/180939/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-qcow2 15 saverestore-support-check fail like 180924 test-armhf-armhf-libvirt-raw 15 saveresto

Re: [PATCH v1] x86/hvm/ioreq: remove empty line after function declaration

2023-05-25 Thread Paul Durrant
On 25/05/2023 16:25, Olaf Hering wrote: Introduced in commit 6ddfaabceeec3c31bc97a7208c46f581de55f71d ("x86/hvm/ioreq: simplify code and use consistent naming"). Signed-off-by: Olaf Hering --- xen/arch/x86/hvm/ioreq.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Paul Durrant

Re: [PATCH v2 01/34] mm: Add PAGE_TYPE_OP folio functions

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 1:56 AM Mike Rapoport wrote: > > Hi, > > On Mon, May 01, 2023 at 12:27:56PM -0700, Vishal Moola (Oracle) wrote: > > No folio equivalents for page type operations have been defined, so > > define them for later folio conversions. > > Can you please elaborate why would we nee

Re: [PATCH v2 02/34] s390: Use _pt_s390_gaddr for gmap address tracking

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 1:58 AM Mike Rapoport wrote: > > On Mon, May 01, 2023 at 12:27:57PM -0700, Vishal Moola (Oracle) wrote: > > s390 uses page->index to keep track of page tables for the guest address > > space. In an attempt to consolidate the usage of page fields in s390, > > replace _pt_pad

Re: [PATCH v2 5/6] block/linux-aio: convert to blk_io_plug_call() API

2023-05-25 Thread Stefan Hajnoczi
On Wed, May 24, 2023 at 10:52:03AM +0200, Stefano Garzarella wrote: > On Tue, May 23, 2023 at 01:12:59PM -0400, Stefan Hajnoczi wrote: > > Stop using the .bdrv_co_io_plug() API because it is not multi-queue > > block layer friendly. Use the new blk_io_plug_call() API to batch I/O > > submission ins

[PATCH] xen/arm: un-break build with clang

2023-05-25 Thread Stewart Hildebrand
clang doesn't like extern with __attribute__((__used__)): ./arch/arm/include/asm/setup.h:171:8: error: 'used' attribute ignored [-Werror,-Wignored-attributes] extern DEFINE_BOOT_PAGE_TABLE(boot_pgtable); ^ ./arch/arm/include/asm/lpae.h:273:29: note: expanded from macro 'DEFINE_BOO

Re: [PATCH v2 05/34] mm: add utility functions for ptdesc

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 2:10 AM Mike Rapoport wrote: > > On Mon, May 01, 2023 at 12:28:00PM -0700, Vishal Moola (Oracle) wrote: > > Introduce utility functions setting the foundation for ptdescs. These > > will also assist in the splitting out of ptdesc from struct page. > > > > ptdesc_alloc() is

Re: [PATCH] xen/arm: un-break build with clang

2023-05-25 Thread Andrew Cooper
On 25/05/2023 6:51 pm, Stewart Hildebrand wrote: > diff --git a/xen/arch/arm/include/asm/setup.h > b/xen/arch/arm/include/asm/setup.h > index 38e2ce255fcf..af53e58a6a07 100644 > --- a/xen/arch/arm/include/asm/setup.h > +++ b/xen/arch/arm/include/asm/setup.h > @@ -168,13 +168,13 @@ u32 device_tree_

Re: [PATCH v2 13/34] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 2:19 AM Mike Rapoport wrote: > > On Mon, May 01, 2023 at 12:28:08PM -0700, Vishal Moola (Oracle) wrote: > > Creates ptdesc_pte_ctor(), ptdesc_pmd_ctor(), ptdesc_pte_dtor(), and > > ptdesc_pmd_dtor() and make the original pgtable constructor/destructors > > wrappers. > > I t

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Trilok Soni
On 5/25/2023 6:25 AM, Mickaël Salaün wrote: On 24/05/2023 23:04, Trilok Soni wrote: On 5/5/2023 8:20 AM, Mickaël Salaün wrote: Hi, This patch series is a proof-of-concept that implements new KVM features (extended page tracking, MBEC support, CR pinning) and defines a new API to protect gue

Re: [PATCH] xen/arm: un-break build with clang

2023-05-25 Thread Stewart Hildebrand
On 5/25/23 14:05, Andrew Cooper wrote: > On 25/05/2023 6:51 pm, Stewart Hildebrand wrote: >> diff --git a/xen/arch/arm/include/asm/setup.h >> b/xen/arch/arm/include/asm/setup.h >> index 38e2ce255fcf..af53e58a6a07 100644 >> --- a/xen/arch/arm/include/asm/setup.h >> +++ b/xen/arch/arm/include/asm/se

[XEN PATCH] tools/xenstore: remove deprecated parameter from xenstore commands help

2023-05-25 Thread Cyril Rébert
Completing commit c65687e ("tools/xenstore: remove socket-only option from xenstore client"). As the socket-only option (-s) has been removed from the Xenstore access commands (xenstore-*), also remove the parameter from the commands help (xenstore-* -h). Suggested-by: Yann Dirson Signed-off-by

[PATCH v2] xen/arm: un-break build with clang

2023-05-25 Thread Stewart Hildebrand
clang doesn't like extern with __attribute__((__used__)): ./arch/arm/include/asm/setup.h:171:8: error: 'used' attribute ignored [-Werror,-Wignored-attributes] extern DEFINE_BOOT_PAGE_TABLE(boot_pgtable); ^ ./arch/arm/include/asm/lpae.h:273:29: note: expanded from macro 'DEFINE_BOO

  1   2   >