Re: [PATCH] OvmfPkg/XenPlatformPei: Grab 64-bit PCI MMIO hole size from OVMF info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 04:45, Igor Druzhinin wrote: > We faced a problem with passing through a PCI device with 64GB BAR to UEFI > guest. The BAR is expectedly programmed into 64-bit PCI aperture at > 64G address which pushes physical address space to 37 bits. That is above > 36-bit width that OVMF exposes cu

Re: [PATCH 2/6] x86/mm: p2m_add_foreign() is HVM-only

2021-01-11 Thread Oleksandr
On 11.01.21 09:41, Jan Beulich wrote: Hi Jan On 08.01.2021 18:37, Oleksandr wrote: On 08.01.21 19:01, Jan Beulich wrote: Hi Jan On 08.01.2021 17:38, Oleksandr wrote: On 05.01.21 10:48, Jan Beulich wrote: On 04.01.2021 17:57, Oleksandr Tyshchenko wrote: Hello all. [Sorry for the possib

RE: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Paul Durrant
> -Original Message- > From: Igor Druzhinin > Sent: 09 January 2021 00:56 > To: p...@xen.org; xen-devel@lists.xenproject.org > Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; > andrew.coop...@citrix.com; > george.dun...@citrix.com; jbeul...@suse.com; jul...@xen.org; > s

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Jan Beulich
On 08.01.2021 20:22, Stefano Stabellini wrote: > MVFR2 is not available on ARMv7. It is available on ARMv8 aarch32 and > aarch64. If Xen reads MVFR2 on ARMv7 it could crash. > > Avoid the issue by doing the following: > > - define MVFR2_MAYBE_UNDEFINED on arm32 > - if MVFR2_MAYBE_UNDEFINED, do no

Re: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Jan Beulich
On 11.01.2021 09:45, Paul Durrant wrote: >> -Original Message- >> From: Igor Druzhinin >> Sent: 09 January 2021 00:56 >> To: p...@xen.org; xen-devel@lists.xenproject.org >> Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; >> andrew.coop...@citrix.com; >> george.dun...@cit

RE: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 11 January 2021 09:00 > To: p...@xen.org > Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; > andrew.coop...@citrix.com; > george.dun...@citrix.com; jul...@xen.org; sstabell...@kernel.org; > roger@citrix.com; xen- > de

RE: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Paul Durrant
> -Original Message- > From: Paul Durrant > Sent: 11 January 2021 09:10 > To: 'Jan Beulich' > Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; > andrew.coop...@citrix.com; > george.dun...@citrix.com; jul...@xen.org; sstabell...@kernel.org; > roger@citrix.com; xen- >

Re: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Jan Beulich
On 11.01.2021 10:09, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 11 January 2021 09:00 >> To: p...@xen.org >> Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; >> andrew.coop...@citrix.com; >> george.dun...@citrix.com; jul...@xen.org; sstabell..

Re: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Jan Beulich
On 11.01.2021 10:12, Paul Durrant wrote: >> From: Paul Durrant >> Sent: 11 January 2021 09:10 >> >>> From: Jan Beulich >>> Sent: 11 January 2021 09:00 >>> >>> On 11.01.2021 09:45, Paul Durrant wrote: You can add my R-b to the patch. >>> >>> That's the unchanged patch then, including the libx

RE: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 11 January 2021 09:16 > To: p...@xen.org > Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; > andrew.coop...@citrix.com; > george.dun...@citrix.com; jul...@xen.org; sstabell...@kernel.org; > roger@citrix.com; xen- > de

[PATCH] x86/acpi: remove dead code

2021-01-11 Thread Roger Pau Monne
After the recent changes to acpi_fadt_parse_sleep_info the bad label can never be called with facs mapped, and hence the unmap can be removed. Additionally remove the whole label, since it was used by a single caller. Move the relevant code from the label. No functional change intended. CID: 147

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Jan Beulich
On 11.01.2021 05:53, Igor Druzhinin wrote: > We faced a problem with passing through a PCI device with 64GB BAR to > UEFI guest. The BAR is expectedly programmed into 64-bit PCI aperture at > 64G address which pushes physical address space to 37 bits. OVMF uses > address width early in PEI phase to

Re: [PATCH] x86/acpi: remove dead code

2021-01-11 Thread Jan Beulich
On 11.01.2021 10:26, Roger Pau Monne wrote: > After the recent changes to acpi_fadt_parse_sleep_info the bad label > can never be called with facs mapped, and hence the unmap can be > removed. > > Additionally remove the whole label, since it was used by a > single caller. Move the relevant code f

[xen-unstable test] 158335: regressions - trouble: blocked/broken/fail/pass

2021-01-11 Thread osstest service owner
flight 158335 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/158335/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken build-arm64-xsm

Re: [PATCH v4 01/10] evtchn: use per-channel lock where possible

2021-01-11 Thread Jan Beulich
On 08.01.2021 21:32, Julien Grall wrote: > Hi Jan, > > On 05/01/2021 13:09, Jan Beulich wrote: >> Neither evtchn_status() nor domain_dump_evtchn_info() nor >> flask_get_peer_sid() need to hold the per-domain lock - they all only >> read a single channel's state (at a time, in the dump case). >> >>

Re: [patch 02/30] genirq: Move status flag checks to core

2021-01-11 Thread Thomas Gleixner
On Sun, Dec 27 2020 at 11:20, Guenter Roeck wrote: > On Thu, Dec 10, 2020 at 08:25:38PM +0100, Thomas Gleixner wrote: > Yes, but that means that irq_check_status_bit() may be called from modules, > but it is not exported, resulting in build errors such as the following. > > arm64:allmodconfig: > >

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Julien Grall
Hi Jan, On 11/01/2021 08:49, Jan Beulich wrote: On 08.01.2021 20:22, Stefano Stabellini wrote: MVFR2 is not available on ARMv7. It is available on ARMv8 aarch32 and aarch64. If Xen reads MVFR2 on ARMv7 it could crash. Avoid the issue by doing the following: - define MVFR2_MAYBE_UNDEFINED on a

[PATCH] iommu/arm: ipmmu-vmsa: Use 1U << 31 rather than 1 << 31

2021-01-11 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Replace all the use of 1 << 31 with 1U << 31 to prevent undefined behavior in the IPMMU-VMSA driver. Signed-off-by: Oleksandr Tyshchenko --- This is a follow-up to https://patchew.org/Xen/20201224152419.22453-1-jul...@xen.org/ --- xen/drivers/passthrough/arm/ipmmu-vm

Re: [PATCH 2/5] x86/PV: fold redundant calls to adjust_guest_le()

2021-01-11 Thread Roger Pau Monné
On Tue, Nov 03, 2020 at 11:56:44AM +0100, Jan Beulich wrote: > At least from an abstract perspective it is quite odd for us to compare > adjusted old and unadjusted new page table entries when determining > whether the fast path can be used. This is largely benign because > FASTPATH_FLAG_WHITELIST

Re: [PATCH v2 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Roger Pau Monné
On Fri, Jan 08, 2021 at 05:52:36PM +, Andrew Cooper wrote: > On 22/09/2020 19:24, Andrew Cooper wrote: > > diff --git a/tools/libs/foreignmemory/linux.c > > b/tools/libs/foreignmemory/linux.c > > index fe73d5ab72..eec089e232 100644 > > --- a/tools/libs/foreignmemory/linux.c > > +++ b/tools/lib

laxton0 (was Re: [xen-unstable test] 158335: regressions - trouble: blocked/broken/fail/pass)

2021-01-11 Thread Ian Jackson
osstest service owner writes ("[xen-unstable test] 158335: regressions - trouble: blocked/broken/fail/pass"): > flight 158335 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/158335/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including test

Re: [PATCH v4 01/10] evtchn: use per-channel lock where possible

2021-01-11 Thread Julien Grall
Hi Jan, On 11/01/2021 10:14, Jan Beulich wrote: On 08.01.2021 21:32, Julien Grall wrote: Hi Jan, On 05/01/2021 13:09, Jan Beulich wrote: Neither evtchn_status() nor domain_dump_evtchn_info() nor flask_get_peer_sid() need to hold the per-domain lock - they all only read a single channel's stat

Re: [PATCH 3/5] x86/PV: _PAGE_RW changes may take fast path of mod_l[234]_entry()

2021-01-11 Thread Roger Pau Monné
On Tue, Nov 03, 2020 at 11:57:10AM +0100, Jan Beulich wrote: > The only time _PAGE_RW matters when validating an L2 or higher entry is > when a linear page table is tried to be installed. Therefore when we > disallow such at build time, we can allow _PAGE_RW changes to take the > fast paths there.

Re: Smoke test failure on Arm (was Re: [PATCH v4 0/8] xen/arm: Emulate ID registers) [and 2 more messages]

2021-01-11 Thread Ian Jackson
It seems there is still something wrong with ARM in staging. Whatever change was made passed the smoke test but now the main flights are failing: osstest service owner writes: > flight 158303 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/158303/ > > Regressions :-(

Re: Smoke test failure on Arm (was Re: [PATCH v4 0/8] xen/arm: Emulate ID registers) [and 2 more messages]

2021-01-11 Thread Julien Grall
Hi Ian, On 11/01/2021 11:19, Ian Jackson wrote: It seems there is still something wrong with ARM in staging. Whatever change was made passed the smoke test but now the main flights are failing: osstest service owner writes: flight 158303 xen-unstable real [real] http://logs.test-lab.xenprojec

Re: [PATCH 2/5] x86/PV: fold redundant calls to adjust_guest_le()

2021-01-11 Thread Jan Beulich
On 11.01.2021 11:36, Roger Pau Monné wrote: > On Tue, Nov 03, 2020 at 11:56:44AM +0100, Jan Beulich wrote: >> At least from an abstract perspective it is quite odd for us to compare >> adjusted old and unadjusted new page table entries when determining >> whether the fast path can be used. This is

[ovmf test] 158356: all pass - PUSHED

2021-01-11 Thread osstest service owner
flight 158356 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/158356/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf e992cc3f4859f653d6a42c4d600c80378759901a baseline version: ovmf a8a0831589a92a60110b0

Re: [PATCH 4/5] x86/PV: restrict TLB flushing after mod_l[234]_entry()

2021-01-11 Thread Roger Pau Monné
On Tue, Nov 03, 2020 at 11:57:33AM +0100, Jan Beulich wrote: > Just like we avoid to invoke remote root pt flushes when all uses of an > L4 table can be accounted for locally, the same can be done for all of > L[234] for the linear pt flush when the table is a "free floating" one, > i.e. it is pinn

Re: [PATCH v2 07/11] xen/memory: Improve compat XENMEM_acquire_resource handling

2021-01-11 Thread Andrew Cooper
On 28/09/2020 10:09, Jan Beulich wrote: > On 22.09.2020 20:24, Andrew Cooper wrote: >> @@ -446,6 +430,31 @@ int compat_memory_op(unsigned int cmd, >> XEN_GUEST_HANDLE_PARAM(void) compat) >> >> #undef XLAT_mem_acquire_resource_HNDL_frame_list >> >> +if ( xen_frame_list && cmp.mar.n

Re: [PATCH 4/5] x86/PV: restrict TLB flushing after mod_l[234]_entry()

2021-01-11 Thread Jan Beulich
On 11.01.2021 14:00, Roger Pau Monné wrote: > On Tue, Nov 03, 2020 at 11:57:33AM +0100, Jan Beulich wrote: >> Just like we avoid to invoke remote root pt flushes when all uses of an >> L4 table can be accounted for locally, the same can be done for all of >> L[234] for the linear pt flush when the

Re: [PATCH 3/5] x86/PV: _PAGE_RW changes may take fast path of mod_l[234]_entry()

2021-01-11 Thread Jan Beulich
On 11.01.2021 12:08, Roger Pau Monné wrote: > On Tue, Nov 03, 2020 at 11:57:10AM +0100, Jan Beulich wrote: >> The only time _PAGE_RW matters when validating an L2 or higher entry is >> when a linear page table is tried to be installed. Therefore when we >> disallow such at build time, we can allow

Re: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 09:16, Jan Beulich wrote: > On 11.01.2021 10:12, Paul Durrant wrote: >>> From: Paul Durrant >>> Sent: 11 January 2021 09:10 >>> From: Jan Beulich Sent: 11 January 2021 09:00 On 11.01.2021 09:45, Paul Durrant wrote: > You can add my R-b to the patch.

Re: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Jan Beulich
On 11.01.2021 14:34, Igor Druzhinin wrote: > On 11/01/2021 09:16, Jan Beulich wrote: >> On 11.01.2021 10:12, Paul Durrant wrote: From: Paul Durrant Sent: 11 January 2021 09:10 > From: Jan Beulich > Sent: 11 January 2021 09:00 > > On 11.01.2021 09:45, Paul Durrant wr

RE: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 11 January 2021 13:38 > To: Igor Druzhinin ; p...@xen.org > Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; > andrew.coop...@citrix.com; > george.dun...@citrix.com; jul...@xen.org; sstabell...@kernel.org; > roger@citr

Re: [PATCH 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 13:47, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 11 January 2021 13:38 >> To: Igor Druzhinin ; p...@xen.org >> Cc: w...@xen.org; i...@xenproject.org; anthony.per...@citrix.com; >> andrew.coop...@citrix.com; >> george.dun...@citrix.com; jul...@xe

Re: [PATCH v2 09/11] xen/memory: Fix mapping grant tables with XENMEM_acquire_resource

2021-01-11 Thread Andrew Cooper
On 24/09/2020 11:47, Paul Durrant wrote: >> diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c >> index e82307bdae..8628f51402 100644 >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -4632,7 +4632,6 @@ int arch_acquire_resource(struct domain *d, unsigned >> int type, >> if ( id

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 09:27, Jan Beulich wrote: > On 11.01.2021 05:53, Igor Druzhinin wrote: >> We faced a problem with passing through a PCI device with 64GB BAR to >> UEFI guest. The BAR is expectedly programmed into 64-bit PCI aperture at >> 64G address which pushes physical address space to 37 bits. OV

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Jan Beulich
On 11.01.2021 15:00, Igor Druzhinin wrote: > On 11/01/2021 09:27, Jan Beulich wrote: >> On 11.01.2021 05:53, Igor Druzhinin wrote: >>> --- a/tools/firmware/hvmloader/ovmf.c >>> +++ b/tools/firmware/hvmloader/ovmf.c >>> @@ -61,6 +61,14 @@ struct ovmf_info { >>> uint32_t e820_nr; >>> } __attrib

Re: [PATCH 5/5] x86/PV32: avoid TLB flushing after mod_l3_entry()

2021-01-11 Thread Roger Pau Monné
On Tue, Nov 03, 2020 at 11:58:16AM +0100, Jan Beulich wrote: > 32-bit guests may not depend upon the side effect of using ordinary > 4-level paging when running on a 64-bit hypervisor. For L3 entry updates > to take effect, they have to use a CR3 reload. Therefore there's no need > to issue a pagin

Re: [PATCH v2 07/11] xen/memory: Improve compat XENMEM_acquire_resource handling

2021-01-11 Thread Jan Beulich
On 08.01.2021 19:57, Andrew Cooper wrote: > On 28/09/2020 10:09, Jan Beulich wrote: >> On 22.09.2020 20:24, Andrew Cooper wrote: >>> @@ -446,6 +430,31 @@ int compat_memory_op(unsigned int cmd, >>> XEN_GUEST_HANDLE_PARAM(void) compat) >>> >>> #undef XLAT_mem_acquire_resource_HNDL_frame_list >>>

Re: [PATCH 3/5] x86/PV: _PAGE_RW changes may take fast path of mod_l[234]_entry()

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 02:31:10PM +0100, Jan Beulich wrote: > On 11.01.2021 12:08, Roger Pau Monné wrote: > > On Tue, Nov 03, 2020 at 11:57:10AM +0100, Jan Beulich wrote: > >> The only time _PAGE_RW matters when validating an L2 or higher entry is > >> when a linear page table is tried to be insta

Re: [PATCH 5/5] x86/PV32: avoid TLB flushing after mod_l3_entry()

2021-01-11 Thread Jan Beulich
On 11.01.2021 15:23, Roger Pau Monné wrote: > On Tue, Nov 03, 2020 at 11:58:16AM +0100, Jan Beulich wrote: >> 32-bit guests may not depend upon the side effect of using ordinary >> 4-level paging when running on a 64-bit hypervisor. For L3 entry updates >> to take effect, they have to use a CR3 rel

[PATCH] tools/libxenstat: ensure strnlen() declaration is visible

2021-01-11 Thread Jan Beulich
Its guard was updated such that it is visible by default when POSIX 2008 was adopted by glibc. It's not visible by default on older glibc. Fixes: 40fe714ca424 ("tools/libs/stat: use memcpy instead of strncpy in getBridge") Signed-off-by: Jan Beulich --- a/tools/libs/stat/xenstat_linux.c +++ b/t

[PATCH] kconfig: ensure strndup() declaration is visible

2021-01-11 Thread Jan Beulich
Its guard was updated such that it is visible by default when POSIX 2008 was adopted by glibc. It's not visible by default on older glibc. Fixes: f80fe2b34f08 ("xen: Update Kconfig to Linux v5.4") Signed-off-by: Jan Beulich --- a/xen/tools/kconfig/parser.y +++ b/xen/tools/kconfig/parser.y @@ -4,

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 14:14, Jan Beulich wrote: > On 11.01.2021 15:00, Igor Druzhinin wrote: >> On 11/01/2021 09:27, Jan Beulich wrote: >>> On 11.01.2021 05:53, Igor Druzhinin wrote: --- a/tools/firmware/hvmloader/ovmf.c +++ b/tools/firmware/hvmloader/ovmf.c @@ -61,6 +61,14 @@ struct ovmf_in

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 15:00, Igor Druzhinin wrote: > On 11/01/2021 09:27, Jan Beulich wrote: >> On 11.01.2021 05:53, Igor Druzhinin wrote: >>> We faced a problem with passing through a PCI device with 64GB BAR to >>> UEFI guest. The BAR is expectedly programmed into 64-bit PCI aperture at >>> 64G address whi

Re: [PATCH v2 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Andrew Cooper
On 11/01/2021 10:50, Roger Pau Monné wrote: > On Fri, Jan 08, 2021 at 05:52:36PM +, Andrew Cooper wrote: >> On 22/09/2020 19:24, Andrew Cooper wrote: >>> diff --git a/tools/libs/foreignmemory/linux.c >>> b/tools/libs/foreignmemory/linux.c >>> index fe73d5ab72..eec089e232 100644 >>> --- a/tools

Re: [PATCH] tools/libxenstat: ensure strnlen() declaration is visible

2021-01-11 Thread Ian Jackson
Jan Beulich writes ("[PATCH] tools/libxenstat: ensure strnlen() declaration is visible"): > Its guard was updated such that it is visible by default when POSIX 2008 > was adopted by glibc. It's not visible by default on older glibc. > > Fixes: 40fe714ca424 ("tools/libs/stat: use memcpy instead of

[PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-01-11 Thread Philippe Mathieu-Daudé
runstate_check() returns a boolean. runstate_is_running() returns what runstate_check() returns, also a boolean. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/runstate.h | 2 +- softmmu/runstate.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sy

[PATCH 0/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread Philippe Mathieu-Daudé
Trivial prototype change to clarify the use of the 'running' argument of VMChangeStateHandler. Green CI: https://gitlab.com/philmd/qemu/-/pipelines/239497352 Philippe Mathieu-Daudé (2): sysemu/runstate: Let runstate_is_running() return bool sysemu: Let VMChangeStateHandler take boolean 'runni

[PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread Philippe Mathieu-Daudé
The 'running' argument from VMChangeStateHandler does not require other value than 0 / 1. Make it a plain boolean. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/runstate.h | 10 -- target/arm/kvm_arm.h| 2 +- target/ppc/cpu-qom.h| 2 +- accel/xen/xen-all.c

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Jan Beulich
On 11.01.2021 15:49, Laszlo Ersek wrote: > On 01/11/21 15:00, Igor Druzhinin wrote: >> On 11/01/2021 09:27, Jan Beulich wrote: >>> On 11.01.2021 05:53, Igor Druzhinin wrote: We faced a problem with passing through a PCI device with 64GB BAR to UEFI guest. The BAR is expectedly programmed

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 15:21, Jan Beulich wrote: > On 11.01.2021 15:49, Laszlo Ersek wrote: >> On 01/11/21 15:00, Igor Druzhinin wrote: >>> On 11/01/2021 09:27, Jan Beulich wrote: On 11.01.2021 05:53, Igor Druzhinin wrote: > We faced a problem with passing through a PCI device with 64GB BAR to

[PATCH v3 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Andrew Cooper
With the Xen side of this interface fixed to return real sizes, userspace needs to be able to make the query. Introduce xenforeignmemory_resource_size() for the purpose, bumping the library minor version. Update both Linux and FreeBSD's osdep_xenforeignmemory_map_resource() to understand size req

[PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread Roger Pau Monne
Allow issuing an IOCTL_PRIVCMD_MMAP_RESOURCE ioctl with num = 0 and addr = 0 in order to fetch the size of a specific resource. Add a shortcut to the default map resource path, since fetching the size requires no address to be passed in, and thus no VMA to setup. Fixes: 3ad0876554caf ('xen/privcm

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 16:21, Jan Beulich wrote: > On 11.01.2021 15:49, Laszlo Ersek wrote: >> On 01/11/21 15:00, Igor Druzhinin wrote: >>> On 11/01/2021 09:27, Jan Beulich wrote: On 11.01.2021 05:53, Igor Druzhinin wrote: > We faced a problem with passing through a PCI device with 64GB BAR to >

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Jan Beulich
On 11.01.2021 16:26, Igor Druzhinin wrote: > Another problem that I faced while experimenting is that creating page > tables for 46-bits (that CPUID returned in my case) of address space takes > about a minute on a modern CPU. Which probably isn't fundamentally different from bare metal? Jan

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 16:26, Igor Druzhinin wrote: > On 11/01/2021 15:21, Jan Beulich wrote: >> On 11.01.2021 15:49, Laszlo Ersek wrote: >>> On 01/11/21 15:00, Igor Druzhinin wrote: On 11/01/2021 09:27, Jan Beulich wrote: > On 11.01.2021 05:53, Igor Druzhinin wrote: >> We faced a problem with pa

Re: [PATCH v3 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 03:26:57PM +, Andrew Cooper wrote: > With the Xen side of this interface fixed to return real sizes, userspace > needs to be able to make the query. > > Introduce xenforeignmemory_resource_size() for the purpose, bumping the > library minor version. > > Update both Lin

Re: [PATCH 5/5] x86/PV32: avoid TLB flushing after mod_l3_entry()

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 03:28:23PM +0100, Jan Beulich wrote: > On 11.01.2021 15:23, Roger Pau Monné wrote: > > On Tue, Nov 03, 2020 at 11:58:16AM +0100, Jan Beulich wrote: > >> 32-bit guests may not depend upon the side effect of using ordinary > >> 4-level paging when running on a 64-bit hyperviso

[qemu-mainline test] 158341: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158341 qemu-mainline real [real] flight 158363 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/158341/ http://logs.test-lab.xenproject.org/osstest/logs/158363/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-01-11 Thread David Hildenbrand
On 11.01.21 16:20, Philippe Mathieu-Daudé wrote: > runstate_check() returns a boolean. runstate_is_running() > returns what runstate_check() returns, also a boolean. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/runstate.h | 2 +- > softmmu/runstate.c| 2 +- > 2 files

Re: [PATCH v4 11/11] xen/arm: smmuv3: Add support for SMMUv3 driver

2021-01-11 Thread Oleksandr
On 08.01.21 16:46, Rahul Singh wrote: Hi Rahul Add support for ARM architected SMMUv3 implementation. It is based on the Linux SMMUv3 driver. Driver is currently supported as Tech Preview. Major differences with regard to Linux driver are as follows: 2. Only Stage-2 translation is supported

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 15:35, Laszlo Ersek wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 01/11/21 16:26, Igor Druzhinin wrote: >> On 11/01/2021 15:21, Jan Beulich wrote: >>> On 11.01.2021 15:49,

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 17:31, Igor Druzhinin wrote: > On 11/01/2021 15:35, Laszlo Ersek wrote: >> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments >> unless you have verified the sender and know the content is safe. >> >> On 01/11/21 16:26, Igor Druzhinin wrote: >>> On 11/01/2021 15:

Re: [PATCH 3/4] x86: Allow non-faulting accesses to non-emulated MSRs if policy permits this

2021-01-11 Thread boris . ostrovsky
On 1/11/21 2:48 AM, Jan Beulich wrote: > On 08.01.2021 21:39, boris.ostrov...@oracle.com wrote: >> On 1/8/21 10:18 AM, Jan Beulich wrote: >> >>> >>> Just to re-raise the question raised by Andrew already earlier >>> on: Has Solaris been fixed in the meantime, or is this at least >>> firmly planne

Re: [PATCH v4 11/11] xen/arm: smmuv3: Add support for SMMUv3 driver

2021-01-11 Thread Oleksandr
Hi Rahul -   static int arm_smmu_device_probe(struct platform_device *pdev)   {   int irq, ret; -    struct resource *res; -    resource_size_t ioaddr; +    paddr_t ioaddr, iosize;   struct arm_smmu_device *smmu; -    struct device *dev = &pdev->dev; -    bool bypass;   -    smmu = de

[PATCH v2] tools: create libxensaverestore

2021-01-11 Thread Olaf Hering
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.so is used. According to size(1) the change is: textdata

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

2021-01-11 Thread osstest service owner
flight 158362 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/158362/ 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

[xen-unstable bisection] complete test-arm64-arm64-xl-credit1

2021-01-11 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-arm64-arm64-xl-credit1 testid xen-boot Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: xen git://xenbits.xen.org/xen.git

Re: [PATCH] x86/acpi: remove dead code

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 10:33:28AM +0100, Jan Beulich wrote: > On 11.01.2021 10:26, Roger Pau Monne wrote: > > After the recent changes to acpi_fadt_parse_sleep_info the bad label > > can never be called with facs mapped, and hence the unmap can be > > removed. > > > > Additionally remove the whol

Re: [PATCH 12/24] Implement gnttab on NetBSD

2021-01-11 Thread Roger Pau Monné
On Sun, Jan 10, 2021 at 01:40:50PM +0100, Manuel Bouyer wrote: > On Mon, Jan 04, 2021 at 06:24:11PM +0100, Roger Pau Monné wrote: > > On Mon, Jan 04, 2021 at 11:29:51AM +0100, Manuel Bouyer wrote: > > > On Tue, Dec 29, 2020 at 12:16:01PM +0100, Roger Pau Monné wrote: > > > > Might need some kind of

[linux-linus test] 158346: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158346 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/158346/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-xsm7 xen-install fail REGR. vs. 152332 test-amd64-i386-qem

Re: [PATCH 10/24] Make libs/evtchn build on NetBSD

2021-01-11 Thread Roger Pau Monné
On Sun, Jan 10, 2021 at 01:22:50PM +0100, Manuel Bouyer wrote: > On Mon, Jan 04, 2021 at 06:15:24PM +0100, Roger Pau Monné wrote: > > On Mon, Jan 04, 2021 at 11:26:45AM +0100, Manuel Bouyer wrote: > > > On Tue, Dec 29, 2020 at 12:52:43PM +0100, Roger Pau Monné wrote: > > > > On Mon, Dec 14, 2020 at

[PATCH v20210111 04/39] docs: substitute XEN_CONFIG_DIR in xl.conf.5

2021-01-11 Thread Olaf Hering
xl(1) opens xl.conf in XEN_CONFIG_DIR. Substitute this variable also in the man page. Signed-off-by: Olaf Hering Reviewed-by: Anthony PERARD --- docs/man/xl.1.pod.in | 2 +- docs/man/xl.conf.5.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/man/xl.1.pod.in b/do

[PATCH v20210111 03/39] docs: remove stale create example from xl.1

2021-01-11 Thread Olaf Hering
Maybe xm create had a feature to create a domU based on a configuration file. xl create requires the '-f' option to refer to a file. There is no code to look into XEN_CONFIG_DIR, so remove the example. Signed-off-by: Olaf Hering --- docs/man/xl.1.pod.in | 7 --- 1 file changed, 7 deletions(-

[PATCH v20210111 10/39] tools: add xc_is_known_page_type to libxenctrl

2021-01-11 Thread Olaf Hering
Users of xc_get_pfn_type_batch may want to sanity check the data returned by Xen. Add a simple helper for this purpose. Signed-off-by: Olaf Hering --- tools/libs/ctrl/xc_private.h | 33 + 1 file changed, 33 insertions(+) diff --git a/tools/libs/ctrl/xc_private.h

[PATCH v20210111 09/39] tools: add readv_exact to libxenctrl

2021-01-11 Thread Olaf Hering
Read a batch of iovec's. In the common case of short reads, finish individual iov's with read_exact. Signed-off-by: Olaf Hering --- tools/libs/ctrl/xc_private.c | 55 +++- tools/libs/ctrl/xc_private.h | 1 + 2 files changed, 55 insertions(+), 1 deletion(-) diff

[PATCH v20210111 11/39] tools: use xc_is_known_page_type

2021-01-11 Thread Olaf Hering
Verify pfn type on sending side, also verify incoming batch of pfns. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_restore.c | 3 +-- tools/libs/guest/xg_sr_save.c| 6 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/libs/guest/xg_sr_restore.c b/tools/libs/

[PATCH v20210111 08/39] xl: fix description of migrate --debug

2021-01-11 Thread Olaf Hering
xl migrate --debug used to track every pfn in every batch of pages. But these times are gone. Adjust the help text to tell what --debug is supposed to do today. Signed-off-by: Olaf Hering --- docs/man/xl.1.pod.in | 4 +++- tools/xl/xl_cmdtable.c | 2 +- 2 files changed, 4 insertions(+), 2 dele

[PATCH v20210111 05/39] tools: add with-xen-scriptdir configure option

2021-01-11 Thread Olaf Hering
In the near future all fresh installations will have an empty /etc. The content of this directory will not be controlled by the package manager anymore. One of the reasons for this move is to make snapshots more robust. As a first step into this direction, add a knob to configure to allow storing

[PATCH v20210111 02/39] xl: use proper name for bash_completion file

2021-01-11 Thread Olaf Hering
Files in the bash-completion dirs should be named like the commands, without suffix. Without this change 'xl' will not be recognized as a command with completion support if BASH_COMPLETION_DIR is set to /usr/share/bash-completion/completions. Fixes commit 9136a919b19929ecb242ef327053d55d824397df

[PATCH v20210111 12/39] tools: unify type checking for data pfns in migration stream

2021-01-11 Thread Olaf Hering
Introduce a helper which decides if a given pfn type has data for the migration stream. No change in behavior intended. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 17 tools/libs/guest/xg_sr_restore.c | 34 +--- tools/libs/guest

[PATCH v20210111 07/39] xl: optionally print timestamps during xl migrate

2021-01-11 Thread Olaf Hering
During 'xl -v.. migrate domU host' a large amount of debug is generated. It is difficult to map each line to the sending and receiving side. Also the time spent for migration is not reported. With 'xl migrate -T domU host' both sides will print timestamps and also the pid of the invoked xl process

[PATCH v20210111 15/39] tools/guest: save: move batch_pfns

2021-01-11 Thread Olaf Hering
The batch_pfns array is already allocated in advance. Move it into the preallocated area. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 +- tools/libs/guest/xg_sr_save.c | 25 +++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/tools

[PATCH v20210111 13/39] tools: show migration transfer rate in send_dirty_pages

2021-01-11 Thread Olaf Hering
Show how fast domU pages are transferred in each iteration. The relevant data is how fast the pfns travel, not so much how much protocol overhead exists. So the reported MiB/sec is just for pfns. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save

[PATCH v20210111 14/39] tools/guest: prepare to allocate arrays once

2021-01-11 Thread Olaf Hering
The hotpath 'send_dirty_pages' is supposed to do just one thing: sending. The other end 'handle_page_data' is supposed to do just receiving. But instead both do other costly work like memory allocations and data moving. Do the allocations once, the array sizes are a compiletime constant. Avoid unn

[PATCH v20210111 17/39] tools/guest: save: move types array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move types array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/lib

[PATCH v20210111 18/39] tools/guest: save: move errors array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move errors array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/li

[PATCH v20210111 16/39] tools/guest: save: move mfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move mfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/libs

[PATCH v20210111 20/39] tools/guest: save: move rec_pfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move rec_pfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 11 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b

[PATCH v20210111 21/39] tools/guest: save: move guest_data array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move guest_data array into preallocated space. Because this was allocated with calloc: Adjust the loop to clear unused entries as needed. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 11 ++- 2 f

Re: [PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-01-11 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > runstate_check() returns a boolean. runstate_is_running() > returns what runstate_check() returns, also a boolean. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > The 'running' argument from VMChangeStateHandler does not require > other value than 0 / 1. Make it a plain boolean. > > Signed-off-by: Philippe Mathieu-Daudé Seems reasonable Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v20210111 25/39] tools/guest: restore: move mfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move mfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_restore.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/libs

[PATCH v20210111 27/39] tools/guest: restore: move mfns array in populate_pfns

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move populate_pfns mfns array into preallocated space. Use some prefix to avoid conflict with an array used in handle_page_data. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_restore.c | 5 ++--- 2 files changed, 4

[PATCH v20210111 23/39] tools/guest: restore: move pfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move pfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_restore.c | 6 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/lib

[PATCH v20210111 35/39] tools: change struct precopy_stats to precopy_stats_t

2021-01-11 Thread Olaf Hering
This will help libxl_save_msgs_gen.pl to copy the struct as a region of memory. No change in behavior intented. Signed-off-by: Olaf Hering --- tools/include/xenguest.h| 7 +++ tools/libs/guest/xg_sr_common.h | 2 +- tools/libs/guest/xg_sr_save.c | 6 +++--- 3 files changed, 7 inse

[PATCH v20210111 29/39] tools/guest: restore: split record processing

2021-01-11 Thread Olaf Hering
handle_page_data must be able to read directly into mapped guest memory. This will avoid unneccesary memcpy calls for data which can be consumed verbatim. Rearrange the code to allow decisions based on the incoming record. This change is preparation for future changes in handle_page_data, no cha

[PATCH v20210111 24/39] tools/guest: restore: move types array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move types array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 1 + tools/libs/guest/xg_sr_restore.c | 12 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/

  1   2   >