Re: [PATCH 2/9] arm/domain: Get rid of READ/WRITE_SYSREG32

2021-04-21 Thread Michal Orzel
Hi Julien, On 20.04.2021 15:12, Julien Grall wrote: > Hi Michal, > > On 20/04/2021 08:08, Michal Orzel wrote: >> AArch64 system registers are 64bit whereas AArch32 ones >> are 32bit or 64bit. MSR/MRS are expecting 64bit values thus >> we should get rid of helpers READ/WRITE_SYSREG32 >> in favour

Re: [PATCH] tools/xenstored: Remove unused prototype

2021-04-21 Thread Juergen Gross
On 20.04.21 15:49, Julien Grall wrote: From: Julien Grall A prototype for dump_conn() has been present for quite a long time but there are no implementation. Even, AFAICT in the patch that introduced it. So drop it. Signed-off-by: Julien Grall Reviewed-by: Juergen Gross Juergen OpenPGP

Re: [PATCH 3/9] arm/gic: Get rid of READ/WRITE_SYSREG32

2021-04-21 Thread Michal Orzel
Hi Julien, On 20.04.2021 15:28, Julien Grall wrote: > Hi Michal, > > On 20/04/2021 08:08, Michal Orzel wrote: >> AArch64 system registers are 64bit whereas AArch32 ones >> are 32bit or 64bit. MSR/MRS are expecting 64bit values thus >> we should get rid of helpers READ/WRITE_SYSREG32 >> in favour

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Rahul Singh
Hi Jan, > On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: > > On 20.04.2021 15:45, Rahul Singh wrote: >>> On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: >>> On 19.04.2021 13:54, Julien Grall wrote: For the time being, I think move this code in x86 is a lot better than #ifdef or keep t

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Roger Pau Monné
On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: > Hi Jan, > > > On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: > > > > On 20.04.2021 15:45, Rahul Singh wrote: > >>> On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: > >>> On 19.04.2021 13:54, Julien Grall wrote: > For the time bei

Re: [PATCH 2/8] x86/EFI: sections may not live at VA 0 in PE binaries

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:44:45AM +0200, Jan Beulich wrote: > PE binaries specify section addresses by (32-bit) RVA. GNU ld up to at > least 2.36 would silently truncate the (negative) difference when a > section is placed below the image base. Such sections would also be > wrongly placed ahead of

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Jan Beulich
On 21.04.2021 10:07, Rahul Singh wrote: > Hi Jan, > >> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: >> >> On 20.04.2021 15:45, Rahul Singh wrote: On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: On 19.04.2021 13:54, Julien Grall wrote: > For the time being, I think move this code i

Re: Discussion of Xenheap problems on AArch64

2021-04-21 Thread Julien Grall
On 21/04/2021 07:28, Henry Wang wrote: Hi, Hi Henry, We are trying to implement the static memory allocation on AArch64. Part of this feature is the reserved heap memory allocation, where a specific range of memory is reserved only for heap. In the development process, we found a pitfall

Re: [PATCH 3/8] x86/EFI: program headers are an ELF concept

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:45:09AM +0200, Jan Beulich wrote: > While they apparently do no harm when building xen.efi, their use is > potentially misleading. Conditionalize their use to be for just the ELF > binary we produce. > > No change to the resulting binaries. The GNU Linker manual notes t

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Rahul Singh
Hi Roger, > On 21 Apr 2021, at 9:16 am, Roger Pau Monné wrote: > > On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: >> Hi Jan, >> >>> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: >>> >>> On 20.04.2021 15:45, Rahul Singh wrote: > On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote

Re: [PATCH v2] VT-d: Don't assume register-based invalidation is always supported

2021-04-21 Thread Jan Beulich
On 20.04.2021 18:17, Roger Pau Monné wrote: > On Tue, Apr 20, 2021 at 05:38:51PM +0200, Jan Beulich wrote: >> On 20.04.2021 17:08, Roger Pau Monné wrote: >>> On Thu, Apr 02, 2020 at 04:06:06AM +0800, Chao Gao wrote: --- a/xen/drivers/passthrough/vtd/qinval.c +++ b/xen/drivers/passthrough/

[PATCH] CI: Drop TravisCI

2021-04-21 Thread Andrew Cooper
Travis-ci.org is shutting down shortly. The arm cross-compile testing has been broken for a long time now, and all testing has now been superseded by our Gitlab infrastructure. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Stefano Stabellini CC: Wei L

Re: [PATCH v2] x86/shim: Simplify compat handling in write_start_info()

2021-04-21 Thread Jan Beulich
On 20.04.2021 19:41, Andrew Cooper wrote: > Factor out a compat boolean to remove the lfence overhead from multiple > is_pv_32bit_domain() calls. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > > v2: > * Reinstate the conditional for the start i

Re: [PATCH 0/7] xen: Switch to using -Og for debug builds

2021-04-21 Thread Andrew Cooper
On 19/04/2021 16:45, Jan Beulich wrote: > On 19.04.2021 16:01, Andrew Cooper wrote: >> As with the toolstack side, we ought to use -Og for debug builds. >> >> All fixes are trivial. The first 3 are understandable, given reduced >> optimisations. The next 3 are, AFAICT, bogus diagnostics. >> >> An

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Jan Beulich
On 21.04.2021 10:16, Roger Pau Monné wrote: > On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: >> Hi Jan, >> >>> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: >>> >>> On 20.04.2021 15:45, Rahul Singh wrote: > On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: > On 19.04.2021 13:5

RE: Discussion of Xenheap problems on AArch64

2021-04-21 Thread Henry Wang
Hi Julien, > -Original Message- > From: Julien Grall > Sent: Wednesday, April 21, 2021 5:04 PM > To: Henry Wang ; sstabell...@kernel.org; xen- > de...@lists.xenproject.org > Cc: Wei Chen ; Penny Zheng > ; Bertrand Marquis > Subject: Re: Discussion of Xenheap problems on AArch64 > > >

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Jan Beulich
On 21.04.2021 11:15, Rahul Singh wrote: > Hi Roger, > >> On 21 Apr 2021, at 9:16 am, Roger Pau Monné wrote: >> >> On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: >>> Hi Jan, >>> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: On 20.04.2021 15:45, Rahul Singh wrote: >>>

Re: [PATCH] CI: Drop TravisCI

2021-04-21 Thread Jan Beulich
On 21.04.2021 11:27, Andrew Cooper wrote: > Travis-ci.org is shutting down shortly. The arm cross-compile testing has > been broken for a long time now, and all testing has now been superseded by > our Gitlab infrastructure. > > Signed-off-by: Andrew Cooper FWIW Acked-by: Jan Beulich

[xen-4.13-testing test] 161323: tolerable FAIL - PUSHED

2021-04-21 Thread osstest service owner
flight 161323 xen-4.13-testing real [real] flight 161348 xen-4.13-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/161323/ http://logs.test-lab.xenproject.org/osstest/logs/161348/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): t

Re: [PATCH 4/8] x86/EFI: redo .reloc section bounds determination

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:45:38AM +0200, Jan Beulich wrote: > There's no need to link relocs-dummy.o into the ELF binary. The two > symbols needed can as well be provided by the linker script. Then our > mkreloc tool also doesn't need to put them in the generated assembler > source. Maybe I'm jus

[xen-unstable-coverity test] 161350: all pass - PUSHED

2021-04-21 Thread osstest service owner
flight 161350 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/161350/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen aaa3eafb3ba8b544d19ca41cda1477640b22b8fc baseline version: xen dd22

Re: [PATCH 5/8] x86: drop use of prelink-efi.o

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:46:00AM +0200, Jan Beulich wrote: > Now that its contents matches prelink.o, use that one uniformly. > > Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Thanks, Roger.

Re: [PATCH 0/7] xen: Switch to using -Og for debug builds

2021-04-21 Thread Jan Beulich
On 21.04.2021 11:31, Andrew Cooper wrote: > On 19/04/2021 16:45, Jan Beulich wrote: >> On 19.04.2021 16:01, Andrew Cooper wrote: >>> As with the toolstack side, we ought to use -Og for debug builds. >>> >>> All fixes are trivial. The first 3 are understandable, given reduced >>> optimisations. Th

Re: [PATCH v4 2/3] x86/time: yield to hyperthreads after updating TSC during rendezvous

2021-04-21 Thread Jan Beulich
On 20.04.2021 17:59, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:54:27AM +0200, Jan Beulich wrote: >> Since we'd like the updates to be done as synchronously as possible, >> make an attempt at yielding immediately after the TSC write. >> >> Signed-off-by: Jan Beulich > > Reviewed-by: Roge

Re: [PATCH] CI: Drop TravisCI

2021-04-21 Thread Wei Liu
On Wed, Apr 21, 2021 at 10:27:05AM +0100, Andrew Cooper wrote: > Travis-ci.org is shutting down shortly. The arm cross-compile testing has > been broken for a long time now, and all testing has now been superseded by > our Gitlab infrastructure. > > Signed-off-by: Andrew Cooper Acked-by: Wei Li

Re: [PATCH] tools: Drop XGETTEXT from Tools.mk.in

2021-04-21 Thread Wei Liu
On Fri, Apr 16, 2021 at 04:59:41PM +0100, Andrew Cooper wrote: > This hunk was missing from the work to drop gettext as a build dependency. > > Fixes: e21a6a4f96 ("tools: Drop gettext as a build dependency") > Signed-off-by: Andrew Cooper Acked-by: Wei Liu > --- > CC: George Dunlap > CC: Ian

Re: [PATCH v4 3/3] x86/time: avoid reading the platform timer in rendezvous functions

2021-04-21 Thread Jan Beulich
On 20.04.2021 18:12, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:55:10AM +0200, Jan Beulich wrote: >> Reading the platform timer isn't cheap, so we'd better avoid it when the >> resulting value is of no interest to anyone. >> >> The consumer of master_stime, obtained by >> time_calibration_

Re: [PATCH] tools/libs/light: Remove unnecessary libxl_list_vm() call

2021-04-21 Thread Wei Liu
On Mon, Apr 19, 2021 at 04:01:42PM +0300, Costin Lupu wrote: > The removed lines were initially added by commit 314e64084d31, but the > subsequent code which was using the nb_vm variable was later removed by > commit 2ba368d13893, which makes these lines of code an overlooked > reminiscence. Moreov

Re: [PATCH] CI: Drop TravisCI

2021-04-21 Thread Andrew Cooper
On 21/04/2021 11:04, Wei Liu wrote: > On Wed, Apr 21, 2021 at 10:27:05AM +0100, Andrew Cooper wrote: >> Travis-ci.org is shutting down shortly. The arm cross-compile testing has >> been broken for a long time now, and all testing has now been superseded by >> our Gitlab infrastructure. >> >> Signe

Re: [PATCH v2 2/6] tools/libs/ctrl: fix xc_core_arch_map_p2m() to support linear p2m table

2021-04-21 Thread Wei Liu
On Mon, Apr 12, 2021 at 05:22:32PM +0200, Juergen Gross wrote: > The core of a pv linux guest produced via "xl dump-core" is not usable > as since kernel 4.14 only the linear p2m table is kept if Xen indicates > it is supporting that. Unfortunately xc_core_arch_map_p2m() is still > supporting the 3

Re: [PATCH v2 1/6] tools/libs/guest: fix max_pfn setting in map_p2m()

2021-04-21 Thread Wei Liu
On Mon, Apr 12, 2021 at 05:22:31PM +0200, Juergen Gross wrote: > When setting the highest pfn used in the guest, don't subtract 1 from > the value read from the shared_info data. The value read already is > the correct pfn. > > Fixes: 91e204d37f449 ("libxc: try to find last used pfn when migrating

Re: [PATCH v2 3/6] tools/libs/ctrl: use common p2m mapping code in xc_domain_resume_any()

2021-04-21 Thread Wei Liu
On Mon, Apr 12, 2021 at 05:22:33PM +0200, Juergen Gross wrote: > Instead of open coding the mapping of the p2m list use the already > existing xc_core_arch_map_p2m() call, especially as the current code > does not support guests with the linear p2m map. It should be noted > that this code is needed

Re: [PATCH] CI: Drop TravisCI

2021-04-21 Thread Jan Beulich
On 21.04.2021 12:08, Andrew Cooper wrote: > On 21/04/2021 11:04, Wei Liu wrote: >> On Wed, Apr 21, 2021 at 10:27:05AM +0100, Andrew Cooper wrote: >>> Travis-ci.org is shutting down shortly. The arm cross-compile testing has >>> been broken for a long time now, and all testing has now been supersed

Re: [PATCH v2 4/6] tools/libs: move xc_resume.c to libxenguest

2021-04-21 Thread Wei Liu
On Mon, Apr 12, 2021 at 05:22:34PM +0200, Juergen Gross wrote: > The guest suspend functionality is already part of libxenguest. Move > the resume functionality from libxenctrl to libxenguest, too. > > Signed-off-by: Juergen Gross Acked-by: Wei Liu

Re: [PATCH v2 5/6] tools/libs: move xc_core* from libxenctrl to libxenguest

2021-04-21 Thread Wei Liu
On Mon, Apr 12, 2021 at 05:22:35PM +0200, Juergen Gross wrote: > The functionality in xc_core* should be part of libxenguest instead > of libxenctrl. Users are already either in libxenguest, or in xl. > There is one single exception: xc_core_arch_auto_translated_physmap() > is being used by xc_doma

Re: [PATCH v2 6/6] tools/libs/guest: make some definitions private to libxenguest

2021-04-21 Thread Wei Liu
On Mon, Apr 12, 2021 at 05:22:36PM +0200, Juergen Gross wrote: > There are some definitions which are used in libxenguest only now. > Move them from libxenctrl over to libxenguest. > > Remove an unused macro. > > Signed-off-by: Juergen Gross Acked-by: Wei Liu

Re: [PATCH v2 2/6] tools/libs/ctrl: fix xc_core_arch_map_p2m() to support linear p2m table

2021-04-21 Thread Juergen Gross
On 21.04.21 12:13, Wei Liu wrote: On Mon, Apr 12, 2021 at 05:22:32PM +0200, Juergen Gross wrote: The core of a pv linux guest produced via "xl dump-core" is not usable as since kernel 4.14 only the linear p2m table is kept if Xen indicates it is supporting that. Unfortunately xc_core_arch_map_p2

Re: [PATCH 2/9] arm/domain: Get rid of READ/WRITE_SYSREG32

2021-04-21 Thread Julien Grall
On 21/04/2021 08:36, Michal Orzel wrote: Hi Julien, Hi Michal, On 20.04.2021 15:12, Julien Grall wrote: Hi Michal, On 20/04/2021 08:08, Michal Orzel wrote: AArch64 system registers are 64bit whereas AArch32 ones are 32bit or 64bit. MSR/MRS are expecting 64bit values thus we should get

[PATCH v4 0/3] zstd decompression fallout / consolidation

2021-04-21 Thread Jan Beulich
1: unzstd: replace INIT{,DATA} and STATIC 2: xen/decompress: drop STATIC and INIT 3: unzstd: make helper symbols static Jan

Re: [PATCH 3/9] arm/gic: Get rid of READ/WRITE_SYSREG32

2021-04-21 Thread Julien Grall
Hi Michal, On 21/04/2021 08:48, Michal Orzel wrote: On 20.04.2021 15:28, Julien Grall wrote: On 20/04/2021 08:08, Michal Orzel wrote: Signed-off-by: Michal Orzel     static unsigned int gicv3_read_irq(void)   { -    unsigned int irq = READ_SYSREG32(ICC_IAR1_EL1); +    register_t irq = READ_

[PATCH v4 1/3] unzstd: replace INIT and STATIC

2021-04-21 Thread Jan Beulich
With xen/common/decompress.h now agreeing in both build modes about what STATIC expands to, there's no need for these abstractions anymore. Requested-by: Andrew Cooper Signed-off-by: Jan Beulich --- v4: Minor wording adjustment to description. v3: New. --- a/xen/common/unzstd.c +++ b/xen/common

[PATCH v4 2/3] xen/decompress: drop STATIC and INIT

2021-04-21 Thread Jan Beulich
Except for one last instance, all users have been removed in earlier changes. Requested-by: Andrew Cooper Signed-off-by: Jan Beulich Acked-by: Julien Grall --- v3: New. --- a/xen/arch/arm/efi/efi-dom0.c +++ b/xen/arch/arm/efi/efi-dom0.c @@ -28,7 +28,7 @@ #include #include #include "../../

Re: [PATCH 6/8] x86/EFI: avoid use of GNU ld's --disable-reloc-section when possible

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:46:44AM +0200, Jan Beulich wrote: > As of commit 6fa7408d72b3 ("ld: don't generate base relocations in PE > output for absolute symbols") I'm feeling sufficiently confident in GNU > ld to use its logic for generating base relocations, which was enabled > for executables a

[PATCH v4 3/3] unzstd: make helper symbols static

2021-04-21 Thread Jan Beulich
While for the original library's purposes these functions of course want to be externally exposed, we don't need this, and we also don't want this both to prevent unintended use and to keep the name space tidy. (When functions have no callers at all, wrap them with a suitable #ifdef.) This has the

Re: [PATCH v2 15/21] libs/guest: obtain a compatible cpu policy from two input ones

2021-04-21 Thread Wei Liu
On Tue, Apr 13, 2021 at 04:01:33PM +0200, Roger Pau Monne wrote: > Introduce a helper to obtain a compatible cpu policy based on two > input cpu policies. Currently this is done by and'ing all CPUID leaves > and MSR entries, except for MSR_ARCH_CAPABILITIES which has the RSBA > bit or'ed. > I tho

Re: [PATCH v3] tools: create libxensaverestore

2021-04-21 Thread Wei Liu
On Tue, Apr 13, 2021 at 07:20:27PM +0200, Olaf Hering wrote: > Move all save/restore related code from libxenguest.so into a separate > library libxensaverestore.so. The only consumer is libxl-save-helper. > There is no need to have the moved code mapped all the time in binaries > where libxenguest

Re: [PATCH v4] tools: create libxensaverestore

2021-04-21 Thread Wei Liu
On Thu, Apr 15, 2021 at 03:11:38PM +0200, Olaf Hering wrote: > Move all save/restore related code from libxenguest.so into a separate > library libxensaverestore.so. The only consumer is libxl-save-helper. > There is no need to have the moved code mapped all the time in binaries > where libxenguest

Re: [PATCH 2/8] x86/EFI: sections may not live at VA 0 in PE binaries

2021-04-21 Thread Jan Beulich
On 21.04.2021 10:52, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:44:45AM +0200, Jan Beulich wrote: >> PE binaries specify section addresses by (32-bit) RVA. GNU ld up to at >> least 2.36 would silently truncate the (negative) difference when a >> section is placed below the image base. Such

Re: [PATCH 3/8] x86/EFI: program headers are an ELF concept

2021-04-21 Thread Jan Beulich
On 21.04.2021 11:11, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:45:09AM +0200, Jan Beulich wrote: >> While they apparently do no harm when building xen.efi, their use is >> potentially misleading. Conditionalize their use to be for just the ELF >> binary we produce. >> >> No change to the

Re: [PATCH 4/8] x86/EFI: redo .reloc section bounds determination

2021-04-21 Thread Jan Beulich
On 21.04.2021 11:46, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:45:38AM +0200, Jan Beulich wrote: >> There's no need to link relocs-dummy.o into the ELF binary. The two >> symbols needed can as well be provided by the linker script. Then our >> mkreloc tool also doesn't need to put them in

Re: [PATCH 7/8] x86/EFI: keep debug info in xen.efi

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:47:03AM +0200, Jan Beulich wrote: > ... provided the linker supports it (which it does as of commit > 2dfa8341e079 ["ELF DWARF in PE output"]). > > Without mentioning debugging sections, the linker would put them at > VA 0, thus making them unreachable by 32-bit (relativ

Re: [PATCH 8/8] x86/EFI: don't have an overly large image size

2021-04-21 Thread Roger Pau Monné
On Thu, Apr 01, 2021 at 11:47:35AM +0200, Jan Beulich wrote: > While without debug info the difference is benign (so far), since we pad > the image to 16Mb anyway, forcing the .reloc section to a 2Mb boundary > causes subsequent .debug_* sections to go farther beyond 16Mb than > needed. There's no

Re: [PATCH v2 15/21] libs/guest: obtain a compatible cpu policy from two input ones

2021-04-21 Thread Roger Pau Monné
On Wed, Apr 21, 2021 at 10:22:39AM +, Wei Liu wrote: > On Tue, Apr 13, 2021 at 04:01:33PM +0200, Roger Pau Monne wrote: > > Introduce a helper to obtain a compatible cpu policy based on two > > input cpu policies. Currently this is done by and'ing all CPUID leaves > > and MSR entries, except fo

Re: [PATCH v2] VT-d: Don't assume register-based invalidation is always supported

2021-04-21 Thread Chao Gao
On Wed, Apr 21, 2021 at 11:23:13AM +0200, Jan Beulich wrote: >On 20.04.2021 18:17, Roger Pau Monné wrote: >> On Tue, Apr 20, 2021 at 05:38:51PM +0200, Jan Beulich wrote: >>> On 20.04.2021 17:08, Roger Pau Monné wrote: On Thu, Apr 02, 2020 at 04:06:06AM +0800, Chao Gao wrote: > --- a/xen/dr

Re: [PATCH v9 01/13] x86/mm: rewrite virt_to_xen_l*e

2021-04-21 Thread Hongyan Xia
On Tue, 2021-04-20 at 14:17 +0200, Jan Beulich wrote: > On 06.04.2021 13:05, Hongyan Xia wrote: > > From: Wei Liu > > > > Rewrite those functions to use the new APIs. Modify its callers to > > unmap > > the pointer returned. Since alloc_xen_pagetable_new() is almost > > never > > useful unless ac

Re: [PATCH v9 01/13] x86/mm: rewrite virt_to_xen_l*e

2021-04-21 Thread Jan Beulich
On 21.04.2021 13:33, Hongyan Xia wrote: > On Tue, 2021-04-20 at 14:17 +0200, Jan Beulich wrote: >> On 06.04.2021 13:05, Hongyan Xia wrote: >>> @@ -5305,6 +5339,8 @@ int map_pages_to_xen( >>> pl1e = virt_to_xen_l1e(virt); >>> if ( pl1e == NULL ) >>>

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Rahul Singh
Hi Jan, > On 21 Apr 2021, at 10:33 am, Jan Beulich wrote: > > On 21.04.2021 11:15, Rahul Singh wrote: >> Hi Roger, >> >>> On 21 Apr 2021, at 9:16 am, Roger Pau Monné wrote: >>> >>> On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: Hi Jan, > On 20 Apr 2021, at 4:36 pm

Re: [PATCH 6/8] x86/EFI: avoid use of GNU ld's --disable-reloc-section when possible

2021-04-21 Thread Jan Beulich
On 21.04.2021 12:21, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:46:44AM +0200, Jan Beulich wrote: >> @@ -189,7 +208,11 @@ EFI_LDFLAGS += --no-insert-timestamp >> endif >> >> $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, >> A VIRT_START$$,,p') >> +ifeq ($(M

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-21 Thread Julien Grall
Hi Stefano, On 21/04/2021 01:38, Stefano Stabellini wrote: On Tue, 20 Apr 2021, Julien Grall wrote: AFAICT, there is nothing in the implementation of XEN_DOMCTL_getvcpucontext that justify the extra barrier (assuming we consider vcpu_pause() as a full memory barrier). From your e-mail, I also

[xen-4.14-testing test] 161324: tolerable FAIL - PUSHED

2021-04-21 Thread osstest service owner
flight 161324 xen-4.14-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/161324/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 161048 test-amd64-i386-xl-qemuu-win7-am

Re: [PATCH 2/8] x86/EFI: sections may not live at VA 0 in PE binaries

2021-04-21 Thread Roger Pau Monné
On Wed, Apr 21, 2021 at 12:32:42PM +0200, Jan Beulich wrote: > On 21.04.2021 10:52, Roger Pau Monné wrote: > > On Thu, Apr 01, 2021 at 11:44:45AM +0200, Jan Beulich wrote: > >> PE binaries specify section addresses by (32-bit) RVA. GNU ld up to at > >> least 2.36 would silently truncate the (negati

Re: [PATCH 7/8] x86/EFI: keep debug info in xen.efi

2021-04-21 Thread Jan Beulich
On 21.04.2021 13:15, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:47:03AM +0200, Jan Beulich wrote: >> ... provided the linker supports it (which it does as of commit >> 2dfa8341e079 ["ELF DWARF in PE output"]). >> >> Without mentioning debugging sections, the linker would put them at >> VA

Re: [PATCH 8/8] x86/EFI: don't have an overly large image size

2021-04-21 Thread Jan Beulich
On 21.04.2021 13:18, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 11:47:35AM +0200, Jan Beulich wrote: >> While without debug info the difference is benign (so far), since we pad >> the image to 16Mb anyway, forcing the .reloc section to a 2Mb boundary >> causes subsequent .debug_* sections to

Re: [PATCH 2/8] x86/EFI: sections may not live at VA 0 in PE binaries

2021-04-21 Thread Jan Beulich
On 21.04.2021 14:57, Roger Pau Monné wrote: > So from a bit of searching I just did it seems like stab sections > where used during the 90s with ELF, but that this has long been > superseded by DWARF 2 becoming the default in the late 90s, hence I > think it would be fine to just remove those secti

Re: [PATCH v9 10/13] x86/smpboot: switch clone_mapping() to new APIs

2021-04-21 Thread Hongyan Xia
On Tue, 2021-04-20 at 14:32 +0200, Jan Beulich wrote: > On 06.04.2021 13:05, Hongyan Xia wrote: > > @@ -742,51 +742,58 @@ static int clone_mapping(const void *ptr, > > root_pgentry_t *rpt) > > } > > } > > > > +UNMAP_DOMAIN_PAGE(pl1e); > > +UNMAP_DOMAIN_PAGE(pl2e); > > +U

Re: x86: memset() / clear_page() / page scrubbing

2021-04-21 Thread Jan Beulich
On 15.04.2021 18:21, Andrew Cooper wrote: > On 14/04/2021 09:12, Jan Beulich wrote: >> On 13.04.2021 15:17, Andrew Cooper wrote: >>> Do you have actual numbers from these experiments? >> Attached is the collected raw output from a number of systems. > > Wow Tulsa is vintage.  Is that new enough to

[PATCH] tools/xenstored: Wire properly the command line option -M/--path-max

2021-04-21 Thread Julien Grall
From: Julien Grall The command line option -M/--path-max was meant to be added by commit 924bf8c793cb "tools/xenstore: rework path length check" but this wasn't wired through properly. Fix it by adding the missing "case 'M':". Fixes: 924bf8c793cb ("tools/xenstore: rework path length check") Sig

Re: [PATCH] build: centralize / unify asm-offsets generation

2021-04-21 Thread Jan Beulich
On 20.04.2021 18:20, Roger Pau Monné wrote: > On Tue, Apr 20, 2021 at 05:47:49PM +0200, Jan Beulich wrote: >> On 20.04.2021 17:29, Roger Pau Monné wrote: >>> On Thu, Apr 01, 2021 at 10:33:47AM +0200, Jan Beulich wrote: @@ -399,7 +399,11 @@ include/xen/compile.h: include/xen/compi @sed

Re: [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max

2021-04-21 Thread Luca Fancellu
> On 21 Apr 2021, at 15:02, Julien Grall wrote: > > From: Julien Grall > > The command line option -M/--path-max was meant to be added by > commit 924bf8c793cb "tools/xenstore: rework path length check" but this > wasn't wired through properly. > > Fix it by adding the missing "case 'M':".

[PATCH v2 00/20] further population of xen/lib/

2021-04-21 Thread Jan Beulich
This is to dissolve / move xen/common/string.c. One benefit of moving these functions into an archive is that we can drop some of the related __HAVE_ARCH_* #define-s: By living in an archive, the per-arch functions will preempt any loading of the respective functions (objects) from the archive. (Do

[PATCH v10 00/13] switch to domheap for Xen page tables

2021-04-21 Thread Hongyan Xia
From: Hongyan Xia This series rewrites all the remaining functions and finally makes the switch from xenheap to domheap for Xen page tables, so that they no longer need to rely on the direct map, which is a big step towards removing the direct map. --- Changed in v10: - rebase. - address comment

[PATCH v10 01/13] x86/mm: rewrite virt_to_xen_l*e

2021-04-21 Thread Hongyan Xia
From: Wei Liu Rewrite those functions to use the new APIs. Modify its callers to unmap the pointer returned. Since alloc_xen_pagetable_new() is almost never useful unless accompanied by page clearing and a mapping, introduce a helper alloc_map_clear_xen_pt() for this sequence. Signed-off-by: Wei

[PATCH v10 03/13] x86/mm: switch to new APIs in modify_xen_mappings

2021-04-21 Thread Hongyan Xia
From: Wei Liu Page tables allocated in that function should be mapped and unmapped now. Note that pl2e now maybe mapped and unmapped in different iterations, so we need to add clean-ups for that. Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v7: -

[PATCH v10 02/13] x86/mm: switch to new APIs in map_pages_to_xen

2021-04-21 Thread Hongyan Xia
From: Wei Liu Page tables allocated in that function should be mapped and unmapped now. Take the opportunity to avoid a potential double map in map_pages_to_xen() by initialising pl1e to NULL and only map it if it was not mapped earlier. Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia ---

[PATCH v10 04/13] x86_64/mm: introduce pl2e in paging_init

2021-04-21 Thread Hongyan Xia
From: Wei Liu We will soon map and unmap pages in paging_init(). Introduce pl2e so that we can use l2_ro_mpt to point to the page table itself. No functional change. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- Changed in v7: - reword commit message. --- xen/arch/x86/x86_64/mm.c | 16 ++

[PATCH v10 06/13] x86_64/mm: switch to new APIs in setup_m2p_table

2021-04-21 Thread Hongyan Xia
From: Wei Liu While doing so, avoid repetitive mapping of l2_ro_mpt by keeping it across loops, and only unmap and map it when crossing 1G boundaries. Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v8: - re-structure if condition around l2_ro_mpt. -

[PATCH v10 05/13] x86_64/mm: switch to new APIs in paging_init

2021-04-21 Thread Hongyan Xia
From: Wei Liu Map and unmap pages instead of relying on the direct map. Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v9: - remove an unnecessary l3mfn variable. Changed in v8: - replace l3/2_ro_mpt_mfn with just mfn since their lifetimes do not

[PATCH v10 08/13] efi: switch to new APIs in EFI code

2021-04-21 Thread Hongyan Xia
From: Wei Liu Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v7: - add blank line after declaration. - rename efi_l4_pgtable into efi_l4t. - pass the mapped efi_l4t to copy_mapping() instead of map it again. - use the alloc_map_clear_xen_pt() API. -

[PATCH v10 07/13] efi: use new page table APIs in copy_mapping

2021-04-21 Thread Hongyan Xia
From: Wei Liu Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v8: - remove redundant commit message. - unmap l3src based on va instead of mfn. - re-structure if condition around l3dst. Changed in v7: - hoist l3 variables out of the loop to avoid repe

[PATCH v10 09/13] x86/smpboot: add exit path for clone_mapping()

2021-04-21 Thread Hongyan Xia
From: Wei Liu We will soon need to clean up page table mappings in the exit path. No functional change. Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Acked-by: Jan Beulich --- Changed in v7: - edit commit message. - begin with rc = 0 and set it to -ENOMEM ahead of if(). --- xen/arch/x8

[PATCH v2 01/20] lib: move memset()

2021-04-21 Thread Jan Beulich
By moving the function into an archive, x86 doesn't need to announce anymore that is has its own implementation - symbol resolution by the linker will now guarantee that the generic function remains unused, and the forwarding to the compiler built-in gets done by the common header anyway. Allow th

[PATCH v2 02/20] lib: move memcpy()

2021-04-21 Thread Jan Beulich
By moving the function into an archive, x86 doesn't need to announce anymore that is has its own implementation - symbol resolution by the linker will now guarantee that the generic function remains unused, and the forwarding to the compiler built-in gets done by the common header anyway. Allow th

[PATCH v2 03/20] lib: move memmove()

2021-04-21 Thread Jan Beulich
By moving the function into an archive, x86 doesn't need to announce anymore that is has its own implementation - symbol resolution by the linker will now guarantee that the generic function remains unused, and the forwarding to the compiler built-in gets done by the common header anyway. Allow th

[PATCH v2 04/20] lib: move memcmp()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -311,25 +311,6 @@ char *(strstr)(const char *s1, const cha } #endif -#ifndef __HAVE_ARCH_MEMCMP -/** - * memcmp - Compare two areas

[PATCH v2 05/20] lib: move memchr()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -311,28 +311,6 @@ char *(strstr)(const char *s1, const cha } #endif -#ifndef __HAVE_ARCH_MEMCHR -/** - * memchr - Find a character i

[PATCH v2 06/20] lib: move memchr_inv()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -311,26 +311,6 @@ char *(strstr)(const char *s1, const cha } #endif -/** - * memchr_inv - Find an unmatching character in an area of

Re: [PATCH 3/8] x86/EFI: program headers are an ELF concept

2021-04-21 Thread Roger Pau Monné
On Wed, Apr 21, 2021 at 12:36:16PM +0200, Jan Beulich wrote: > On 21.04.2021 11:11, Roger Pau Monné wrote: > > On Thu, Apr 01, 2021 at 11:45:09AM +0200, Jan Beulich wrote: > >> While they apparently do no harm when building xen.efi, their use is > >> potentially misleading. Conditionalize their use

[PATCH v2 07/20] lib: move strlen()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -184,21 +184,6 @@ char *(strrchr)(const char *s, int c) } #endif -#ifndef __HAVE_ARCH_STRLEN -/** - * strlen - Find the length of a

[PATCH v2 08/20] lib: move strnlen()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -184,22 +184,6 @@ char *(strrchr)(const char *s, int c) } #endif -#ifndef __HAVE_ARCH_STRNLEN -/** - * strnlen - Find the length of

[PATCH v2 09/20] lib: move strcmp()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -111,25 +111,6 @@ size_t strlcat(char *dest, const char *s EXPORT_SYMBOL(strlcat); #endif -#ifndef __HAVE_ARCH_STRCMP -/** - * strcm

[PATCH v2 10/20] lib: move strncmp()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -111,27 +111,6 @@ size_t strlcat(char *dest, const char *s EXPORT_SYMBOL(strlcat); #endif -#ifndef __HAVE_ARCH_STRNCMP -/** - * strn

[PATCH v2 11/20] lib: move strlcpy()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -56,32 +56,6 @@ int (strcasecmp)(const char *s1, const c } #endif -#ifndef __HAVE_ARCH_STRLCPY -/** - * strlcpy - Copy a %NUL termin

[PATCH v2 12/20] lib: move strlcat()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -56,35 +56,6 @@ int (strcasecmp)(const char *s1, const c } #endif -#ifndef __HAVE_ARCH_STRLCAT -/** - * strlcat - Append a %NUL term

[PATCH v2 13/20] lib: move strchr()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -56,21 +56,6 @@ int (strcasecmp)(const char *s1, const c } #endif -#ifndef __HAVE_ARCH_STRCHR -/** - * strchr - Find the first occur

[PATCH v2 14/20] lib: move strrchr()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -56,24 +56,6 @@ int (strcasecmp)(const char *s1, const c } #endif -#ifndef __HAVE_ARCH_STRRCHR -/** - * strrchr - Find the last occu

[PATCH v2 15/20] lib: move strstr()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -131,27 +131,6 @@ char * strsep(char **s, const char *ct) } #endif -#ifndef __HAVE_ARCH_STRSTR -/** - * strstr - Find the first subs

[PATCH v2 16/20] lib: move strcasecmp()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -41,21 +41,6 @@ int strnicmp(const char *s1, const char } #endif -#ifndef __HAVE_ARCH_STRCASECMP -int (strcasecmp)(const char *s1, c

[PATCH v2 17/20] lib: move/rename strnicmp() to strncasecmp()

2021-04-21 Thread Jan Beulich
While moving the implementation, also rename it to match strcasecmp(), allowing the similar use of a compiler builting in this case as well. Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/

[PATCH v2 18/20] lib: move strspn()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. In fact the function is unused at present, and hence will now get omitted from the final binaries. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -8,33 +8,6 @@ #include #include

[PATCH v2 19/20] lib: move strpbrk()

2021-04-21 Thread Jan Beulich
Allow the function to be individually linkable, discardable, and overridable. Signed-off-by: Jan Beulich --- a/xen/common/string.c +++ b/xen/common/string.c @@ -8,26 +8,6 @@ #include #include -#ifndef __HAVE_ARCH_STRPBRK -/** - * strpbrk - Find the first occurrence of a set of characters -

  1   2   >