[ovmf test] 168672: regressions - FAIL

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

[ovmf test] 168670: regressions - FAIL

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

RE: [PATCH 2/3] xen/arm: Add i.MX lpuart early printk support

2022-03-17 Thread Peng Fan
> Subject: Re: [PATCH 2/3] xen/arm: Add i.MX lpuart early printk support > > Hi Peng, > > On 28/02/2022 01:07, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Signed-off-by: Peng Fan > > --- > > xen/arch/arm/Kconfig.debug | 18 ++ > >

RE: [PATCH 3/3] xen/arm: Add i.MX8QM platform support

2022-03-17 Thread Peng Fan
> Subject: Re: [PATCH 3/3] xen/arm: Add i.MX8QM platform support > > Hi Peng, > > On 28/02/2022 01:07, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Signed-off-by: Peng Fan > > --- > > xen/arch/arm/Kconfig.debug | 3 +++ > > xen/arch/arm/platforms/Makefile | 1 + > >

RE: [PATCH 1/3] xen/arm: Add i.MX lpuart driver

2022-03-17 Thread Peng Fan
Hi Julien, > Subject: Re: [PATCH 1/3] xen/arm: Add i.MX lpuart driver > > Hi Peng, > > On 28/02/2022 01:07, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Signed-off-by: Peng Fan > > --- > > xen/drivers/char/Kconfig | 8 + > > xen/drivers/char/Makefile | 1 + > >

[ovmf test] 168668: regressions - FAIL

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

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

2022-03-17 Thread osstest service owner
flight 168669 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168669/ 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

Re: [PATCH v1 11/13] xen/arm: store shm-info for deferred foreign memory map

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > In a few scenarios where owner domain, is defined after borrower domain in > device tree configuration, then statically shared pages haven't been properly > allocated if borrower domain tries to do foreign memory map during > domain

Re: [PATCH v1 07/13] xen/arm: create shared memory nodes in guest device tree

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > We expose the shared memory to the domU using the "xen,shared-memory-v1" > reserved-memory binding. See > Documentation/devicetree/bindings/reserved-memory/xen,shared-memory.txt > in Linux for the corresponding device tree binding.

Re: [PATCH v1 10/13] xen/arm: allocate static shared memory to a specific owner domain

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > If owner property is defined, then owner domain of a static shared memory > region is not the default dom_shared anymore, but a specific domain. > > This commit implements allocating static shared memory to a specific domain > when

Re: [PATCH v1 03/13] xen/arm: allocate static shared memory to dom_shared

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > This commit introduces process_shm to cope with static shared memory in > domain construction. > > This commit only considers allocating static shared memory to dom_shared > when owner domain is not explicitly defined in device

Re: [PATCH v1 06/13] xen/arm: set up shared memory foreign mapping for borrower domain

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > This commits introduces a new helper guest_physmap_add_shm to set up shared > memory foreign mapping for borrower domain. > > Firstly it should get and take reference of statically shared pages from > owner dom_shared. Then it will

Re: [PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > In case to own statically shared pages when owner domain is not > explicitly defined, this commits propose a special domain DOMID_SHARED, > and we assign it 0x7FF5, as one of the system domains. > > Statically shared memory reuses

Re: [PATCH v1 01/13] xen/arm: introduce static shared memory

2022-03-17 Thread Stefano Stabellini
On Fri, 11 Mar 2022, Penny Zheng wrote: > From: Penny Zheng > > This patch serie introduces a new feature: setting up static > shared memory on a dom0less system, through device tree configuration. > > This commit parses shared memory node at boot-time, and reserve it in > bootinfo.reserved_mem

Re: [PATCH 1/1] xen/blkfront: fix comment for need_copy

2022-03-17 Thread Chaitanya Kulkarni
On 3/17/22 3:09 PM, Dongli Zhang wrote: > The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to > copy the written data to persistent page. > > ".need_copy = rq_data_dir(req) && info->feature_persistent," > > Signed-off-by: Dongli Zhang > --- Looks good. Reviewed-by:

Re: [PATCH] xen-blkback: remove redundant assignment to variable i

2022-03-17 Thread Chaitanya Kulkarni
On 3/17/22 4:46 PM, Colin Ian King wrote: > Variable i is being assigned a value that is never read, it is being > re-assigned later in a for-loop. The assignment is redundant and can > be removed. > > Cleans up clang scan build warning: > drivers/block/xen-blkback/blkback.c:934:14: warning:

[qemu-upstream-4.16-testing test] 168659: tolerable FAIL - PUSHED

2022-03-17 Thread osstest service owner
flight 168659 qemu-upstream-4.16-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/168659/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemuu-win7-amd64 19 guest-stop fail blocked in 167686

Re: [PATCH v11 3/3] xen/arm64: io: Handle data abort due to cache maintenance instructions

2022-03-17 Thread Stefano Stabellini
On Thu, 17 Mar 2022, Ayan Kumar Halder wrote: > When the data abort is caused due to cache maintenance for an address, > there are three scenarios:- > > 1. Address belonging to a non emulated region - For this, Xen should > set the corresponding bit in the translation table entry to valid and >

Re: [PATCH v11 2/3] xen/arm64: io: Handle the abort due to access to stage1 translation table

2022-03-17 Thread Stefano Stabellini
On Thu, 17 Mar 2022, Ayan Kumar Halder wrote: > If the abort was caused due to access to stage1 translation table, Xen > will try to set the p2m entry (assuming that the Stage 1 translation > table is in a non MMIO region). > If there is no such entry found, then Xen will try to map the address as

Re: [PATCH v11 1/3] xen/arm64: io: Emulate instructions (with invalid ISS) on MMIO region

2022-03-17 Thread Stefano Stabellini
On Thu, 17 Mar 2022, Ayan Kumar Halder wrote: > When an instruction is trapped in Xen due to translation fault, Xen > checks if the ISS is invalid (for data abort) or it is an instruction > abort. If so, Xen tries to resolve the translation fault using p2m page > tables. In case of data abort, Xen

[ovmf test] 168664: regressions - FAIL

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

[PATCH 1/1] xen/blkfront: fix comment for need_copy

2022-03-17 Thread Dongli Zhang
The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to copy the written data to persistent page. ".need_copy = rq_data_dir(req) && info->feature_persistent," Signed-off-by: Dongli Zhang --- drivers/block/xen-blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2022-03-17 Thread osstest service owner
flight 168666 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168666/ 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

Re: [PATCH early-RFC 2/5] xen/arm64: Rework the memory layout

2022-03-17 Thread Julien Grall
Hi, On 09/03/2022 11:20, Julien Grall wrote: From: Julien Grall Xen is currently not fully compliant with the Arm because it will switch the TTBR with the MMU on. In order to be compliant, we need to disable the MMU before switching the TTBR. The implication is the page-tables should contain

Re: [PATCH early-RFC 1/5] xen/arm: Clean-up the memory layout

2022-03-17 Thread Julien Grall
On 17/03/2022 15:23, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, On 9 Mar 2022, at 11:20, Julien Grall wrote: From: Julien Grall In a follow-up patch, the base address for the common mappings will vary between arm32 and arm64. To avoid any duplication, define every mapping in the

[qemu-upstream-4.14-testing test] 168657: tolerable FAIL - PUSHED

2022-03-17 Thread osstest service owner
flight 168657 qemu-upstream-4.14-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/168657/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-qcow2 15 saverestore-support-check fail baseline untested

[qemu-upstream-4.15-testing test] 168658: tolerable FAIL - PUSHED

2022-03-17 Thread osstest service owner
flight 168658 qemu-upstream-4.15-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/168658/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-qcow2 15 saverestore-support-check fail baseline untested

Re: Nonsensical XSM Flask denial

2022-03-17 Thread Jason Andryuk
On Thu, Mar 17, 2022 at 2:14 PM Andrew Cooper wrote: > > On 17/03/2022 17:52, Jason Andryuk wrote: > > I shut down a domU (HVM dom9 w/ Linux stubdom dom10) with a single PCI > > device assigned. Xen logged the following Flask denial for a second > > PVH dom5 (uivm) without any PCI devices

Re: [XEN][RFC PATCH v3 14/14] tools/xl: Add new xl command overlay for device tree overlay support

2022-03-17 Thread Anthony PERARD
On Tue, Mar 08, 2022 at 11:47:04AM -0800, Vikram Garhwal wrote: > Signed-off-by: Vikram Garhwal > --- > tools/xl/xl.h | 4 > tools/xl/xl_cmdtable.c | 6 ++ > tools/xl/xl_vmcontrol.c | 45 + > 3 files changed, 55 insertions(+) > >

Re: Nonsensical XSM Flask denial

2022-03-17 Thread Andrew Cooper
On 17/03/2022 17:52, Jason Andryuk wrote: > I shut down a domU (HVM dom9 w/ Linux stubdom dom10) with a single PCI > device assigned. Xen logged the following Flask denial for a second > PVH dom5 (uivm) without any PCI devices assigned. This is Xen 4.14.4. > > (XEN) avc: denied { remove_irq }

Nonsensical XSM Flask denial

2022-03-17 Thread Jason Andryuk
I shut down a domU (HVM dom9 w/ Linux stubdom dom10) with a single PCI device assigned. Xen logged the following Flask denial for a second PVH dom5 (uivm) without any PCI devices assigned. This is Xen 4.14.4. (XEN) avc: denied { remove_irq } for domid=5 irq=17

Re: [XEN][RFC PATCH v3 13/14] tools/libs/light: Implement new libxl functions for device tree overlay ops

2022-03-17 Thread Anthony PERARD
On Tue, Mar 08, 2022 at 11:47:03AM -0800, Vikram Garhwal wrote: > Signed-off-by: Vikram Garhwal > --- > tools/include/libxl.h| 3 ++ > tools/libs/light/Makefile| 1 + > tools/libs/light/libxl_overlay.c | 67 > 3 files changed, 71

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

2022-03-17 Thread osstest service owner
flight 168662 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168662/ 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

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

2022-03-17 Thread Jan Beulich
On 17.03.2022 17:47, Jan Beulich wrote: > On 10.03.2022 08:34, Juergen Gross wrote: >> Now that the hypercall handlers are all being called directly instead >> through a function vector, the "cf_check" attribute can be removed. >> >> Signed-off-by: Juergen Gross >> --- >> V4: >> - new patch >>

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

2022-03-17 Thread Juergen Gross
On 17.03.22 17:47, Jan Beulich wrote: On 10.03.2022 08:34, Juergen Gross wrote: Now that the hypercall handlers are all being called directly instead through a function vector, the "cf_check" attribute can be removed. Signed-off-by: Juergen Gross --- V4: - new patch ---

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

2022-03-17 Thread Jan Beulich
On 10.03.2022 08:34, Juergen Gross wrote: > Now that the hypercall handlers are all being called directly instead > through a function vector, the "cf_check" attribute can be removed. > > Signed-off-by: Juergen Gross > --- > V4: > - new patch > --- > xen/arch/x86/compat.c | 6

Re: [PATCH] Livepatch: fix typos

2022-03-17 Thread Luca Fancellu
> On 11 Mar 2022, at 19:11, Bjoern Doebel wrote: > > Fix a couple of typos in livepatch code. NIT: I would say: [...] in livepatch code comments. > > Signed-off-by: Bjoern Doebel With or without it: Reviewed-by: Luca Fancellu Cheers, Luca > CC: Konrad Rzeszutek Wilk > CC: Ross

Re: [PATCH] x86/cet: Remove writeable mapping of the BSPs shadow stack

2022-03-17 Thread Andrew Cooper
On 17/03/2022 16:28, Jan Beulich wrote: > On 17.03.2022 17:19, Andrew Cooper wrote: >> On 17/03/2022 09:17, Jan Beulich wrote: >>> On 16.03.2022 20:23, Andrew Cooper wrote: On 16/03/2022 08:33, Jan Beulich wrote: > On 15.03.2022 17:53, Andrew Cooper wrote: >> ---

Re: [PATCH] x86/cet: Remove writeable mapping of the BSPs shadow stack

2022-03-17 Thread Jan Beulich
On 17.03.2022 17:19, Andrew Cooper wrote: > On 17/03/2022 09:17, Jan Beulich wrote: >> On 16.03.2022 20:23, Andrew Cooper wrote: >>> On 16/03/2022 08:33, Jan Beulich wrote: On 15.03.2022 17:53, Andrew Cooper wrote: > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@

Re: [PATCH] x86/cet: Remove writeable mapping of the BSPs shadow stack

2022-03-17 Thread Andrew Cooper
On 17/03/2022 09:17, Jan Beulich wrote: > On 16.03.2022 20:23, Andrew Cooper wrote: >> On 16/03/2022 08:33, Jan Beulich wrote: >>> On 15.03.2022 17:53, Andrew Cooper wrote: --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -215,8 +215,9 @@ SECTIONS } PHDR(text)

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

2022-03-17 Thread Tamas K Lengyel
On Thu, Mar 17, 2022 at 12:07 PM Jan Beulich wrote: > > On 17.03.2022 16:59, Tamas K Lengyel wrote: > > On Thu, Mar 17, 2022 at 11:06 AM Jan Beulich wrote: > >> > >> On 17.03.2022 15:43, Tamas K Lengyel wrote: > >>> On Thu, Mar 17, 2022 at 9:56 AM Jan Beulich wrote: > On 10.03.2022 19:44,

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

2022-03-17 Thread Jan Beulich
On 17.03.2022 16:59, Tamas K Lengyel wrote: > On Thu, Mar 17, 2022 at 11:06 AM Jan Beulich wrote: >> >> On 17.03.2022 15:43, Tamas K Lengyel wrote: >>> On Thu, Mar 17, 2022 at 9:56 AM Jan Beulich wrote: On 10.03.2022 19:44, Tamas K Lengyel wrote: > @@ -1155,6 +1154,8 @@ static int

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

2022-03-17 Thread Tamas K Lengyel
On Thu, Mar 17, 2022 at 11:06 AM Jan Beulich wrote: > > On 17.03.2022 15:43, Tamas K Lengyel wrote: > > On Thu, Mar 17, 2022 at 9:56 AM Jan Beulich wrote: > >> On 10.03.2022 19:44, Tamas K Lengyel wrote: > >>> @@ -1155,6 +1154,8 @@ static int cf_check hvm_load_cpu_ctxt(struct domain > >>> *d,

[PATCH v2] x86/vmx: save guest non-register state in hvm_hw_cpu

2022-03-17 Thread Tamas K Lengyel
During VM forking and resetting a failed vmentry has been observed due to the guest non-register state going out-of-sync with the guest register state. For example, a VM fork reset right after a STI instruction can trigger the failed entry. This is due to the guest non-register state not being

Re: [XEN][RFC PATCH v3 12/14] tools/libs/ctrl: Implement new xc interfaces for dt overlay

2022-03-17 Thread Anthony PERARD
Hi Vikram, On Tue, Mar 08, 2022 at 11:47:02AM -0800, Vikram Garhwal wrote: > diff --git a/tools/libs/ctrl/xc_overlay.c b/tools/libs/ctrl/xc_overlay.c > new file mode 100644 > index 00..8fe780d75a > --- /dev/null > +++ b/tools/libs/ctrl/xc_overlay.c Could rename this new file? I don't

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread Raphael Ning
On 17/03/2022 14:26, Luca Fancellu wrote: > I’ve tested on the ARM side, I’ve started/destroyed few guests from Dom0, > connect to the console, run > some network communications between guest and Dom0, everything works: > > Tested-by: Luca Fancellu Thanks!  I tested on x86 (in a QEMU VM) by

Re: [PATCH early-RFC 1/5] xen/arm: Clean-up the memory layout

2022-03-17 Thread Bertrand Marquis
Hi Julien, > On 9 Mar 2022, at 11:20, Julien Grall wrote: > > From: Julien Grall > > In a follow-up patch, the base address for the common mappings will > vary between arm32 and arm64. To avoid any duplication, define > every mapping in the common region from the previous one. > > Take the

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

2022-03-17 Thread Jan Beulich
On 17.03.2022 15:43, Tamas K Lengyel wrote: > On Thu, Mar 17, 2022 at 9:56 AM Jan Beulich wrote: >> On 10.03.2022 19:44, Tamas K Lengyel wrote: >>> @@ -1155,6 +1154,8 @@ static int cf_check hvm_load_cpu_ctxt(struct domain >>> *d, hvm_domain_context_t *h) >>> v->arch.dr6 = ctxt.dr6; >>>

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

2022-03-17 Thread Tamas K Lengyel
On Thu, Mar 17, 2022 at 9:56 AM Jan Beulich wrote: > > On 10.03.2022 19:44, Tamas K Lengyel wrote: > > During VM fork resetting a failed vmentry has been observed when the reset > > is performed immediately after a STI instruction executed. This is due to > > the guest interruptibility state in

[ovmf test] 168663: regressions - FAIL

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

Re: [PATCH v3] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-17 Thread Andrew Cooper
On 17/03/2022 14:21, Jan Beulich wrote: > On 17.03.2022 15:06, Andrew Cooper wrote: >> For livepatching, we need to look at a potentially clobbered function and >> determine whether it used to have an ENDBR64 instruction. >> >> Use a non-default 4-byte P6 long nop, not emitted by toolchains, and

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread Luca Fancellu
> On 16 Mar 2022, at 18:58, Andrew Cooper wrote: > > On 16/03/2022 18:38, Raphael Ning wrote: >> From: Raphael Ning >> >> Currently, evtchn_fifo_set_pending() will mark the event as PENDING even >> if it fails to lock the FIFO event queue(s), or if the guest has not >> initialized the FIFO

Re: [PATCH 1/2] livepatch: do not ignore sections with 0 size

2022-03-17 Thread Andrew Cooper
On 17/03/2022 14:16, Roger Pau Monné wrote: > On Thu, Mar 17, 2022 at 02:00:19PM +, Andrew Cooper wrote: >> On 17/03/2022 11:08, Roger Pau Monne wrote: >>> A side effect of ignoring such sections is that symbols belonging to >>> them won't be resolved, and that could make relocations belonging

Re: [PATCH v3] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-17 Thread Jan Beulich
On 17.03.2022 15:06, Andrew Cooper wrote: > For livepatching, we need to look at a potentially clobbered function and > determine whether it used to have an ENDBR64 instruction. > > Use a non-default 4-byte P6 long nop, not emitted by toolchains, and extend > check-endbr.sh to look for it. The

Re: [PATCH 1/2] livepatch: do not ignore sections with 0 size

2022-03-17 Thread Roger Pau Monné
On Thu, Mar 17, 2022 at 02:00:19PM +, Andrew Cooper wrote: > On 17/03/2022 11:08, Roger Pau Monne wrote: > > A side effect of ignoring such sections is that symbols belonging to > > them won't be resolved, and that could make relocations belonging to > > other sections that reference those

Re: [PATCH 1/2] livepatch: do not ignore sections with 0 size

2022-03-17 Thread Jan Beulich
On 17.03.2022 15:00, Andrew Cooper wrote: > On 17/03/2022 11:08, Roger Pau Monne wrote: >> A side effect of ignoring such sections is that symbols belonging to >> them won't be resolved, and that could make relocations belonging to >> other sections that reference those symbols fail. >> >> For

[PATCH v3] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-17 Thread Andrew Cooper
For livepatching, we need to look at a potentially clobbered function and determine whether it used to have an ENDBR64 instruction. Use a non-default 4-byte P6 long nop, not emitted by toolchains, and extend check-endbr.sh to look for it. The same logic can check for the absence of any endbr32

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

2022-03-17 Thread Jan Beulich
On 17.03.2022 12:06, Tamas K Lengyel wrote: > Another question I would be interested to hear from the maintainers is in > regards to the hvm context compat macros. Right now they differentiate > between hvm hw cpu struct versions based on size. So since this patch > doesn't change the size how is

[PATCH v11 3/3] xen/arm64: io: Handle data abort due to cache maintenance instructions

2022-03-17 Thread Ayan Kumar Halder
When the data abort is caused due to cache maintenance for an address, there are three scenarios:- 1. Address belonging to a non emulated region - For this, Xen should set the corresponding bit in the translation table entry to valid and return to the guest to retry the instruction. This can

[PATCH v11 1/3] xen/arm64: io: Emulate instructions (with invalid ISS) on MMIO region

2022-03-17 Thread Ayan Kumar Halder
When an instruction is trapped in Xen due to translation fault, Xen checks if the ISS is invalid (for data abort) or it is an instruction abort. If so, Xen tries to resolve the translation fault using p2m page tables. In case of data abort, Xen will try to map the mmio region to the guest (ie

[PATCH v11 2/3] xen/arm64: io: Handle the abort due to access to stage1 translation table

2022-03-17 Thread Ayan Kumar Halder
If the abort was caused due to access to stage1 translation table, Xen will try to set the p2m entry (assuming that the Stage 1 translation table is in a non MMIO region). If there is no such entry found, then Xen will try to map the address as a MMIO region (assuming that the Stage 1 translation

[PATCH v11 0/3] xen/arm64: io: Decode ldr/str post-indexing instruction

2022-03-17 Thread Ayan Kumar Halder
Hi All, The patch series continues with the support to decode instructions by Xen when ISS is invalid. Currently, when the guest executes post indexing ldr/str instructions on emulated MMIO, these instructions are trapped into Xen as a data abort. Xen reads hsr_dabt.isv == 0, so ISS is invalid.

Re: [PATCH 1/2] livepatch: do not ignore sections with 0 size

2022-03-17 Thread Andrew Cooper
On 17/03/2022 11:08, Roger Pau Monne wrote: > A side effect of ignoring such sections is that symbols belonging to > them won't be resolved, and that could make relocations belonging to > other sections that reference those symbols fail. > > For example it's likely to have an empty

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

2022-03-17 Thread Jan Beulich
On 10.03.2022 19:44, Tamas K Lengyel wrote: > During VM fork resetting a failed vmentry has been observed when the reset > is performed immediately after a STI instruction executed. This is due to > the guest interruptibility state in the VMCS being modified by STI but the > subsequent reset

Re: [PATCH 2/2] livepatch: avoid relocations referencing ignored section symbols

2022-03-17 Thread Roger Pau Monné
On Thu, Mar 17, 2022 at 02:26:50PM +0100, Jan Beulich wrote: > On 17.03.2022 12:08, Roger Pau Monne wrote: > > Track whether symbols belong to ignored sections in order to avoid > > applying relocations referencing those symbols. The address of such > > symbols won't be resolved and thus the

Re: [PATCH 2/2] livepatch: avoid relocations referencing ignored section symbols

2022-03-17 Thread Jan Beulich
On 17.03.2022 12:08, Roger Pau Monne wrote: > Track whether symbols belong to ignored sections in order to avoid > applying relocations referencing those symbols. The address of such > symbols won't be resolved and thus the relocation will likely fail or > write garbage to the destination. > >

[ovmf test] 168661: regressions - FAIL

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

Re: [PATCH 0/2] livepatch: fix handling of (some) relocations

2022-03-17 Thread Jan Beulich
On 17.03.2022 12:08, Roger Pau Monne wrote: > I wonder whether it's possible to have unresolved symbols if we only > ignore non SHF_ALLOC sections, so we could maybe error out earlier if we > found a symbols that belongs to a non SHF_ALLOC section in > livepatch_elf_resolve_symbols. The current

Re: [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-17 Thread Doebel, Bjoern
On 17.03.22 11:00, Jiamei Xie wrote: -Original Message- From: Xen-devel On Behalf Of Jiamei Xie Sent: 2022年3月17日 17:17 To: Ross Lagerwall ; Bjoern Doebel ; xen-devel@lists.xenproject.org Cc: Michael Kurth ; Martin Pohlack ; Roger Pau Monne ; Andrew Cooper ; Konrad Rzeszutek Wilk

Re: [PATCH 0/2] livepatch: fix handling of (some) relocations

2022-03-17 Thread Doebel, Bjoern
On 17.03.22, 12:10, "Xen-devel on behalf of Roger Pau Monne" wrote: Hello, Relocations that reference symbols that belong to sections with a size of 0 are not properly resolved, as the address of those symbols won't be resolved in the first place. Fix this by not

[linux-5.4 test] 168644: tolerable FAIL - PUSHED

2022-03-17 Thread osstest service owner
flight 168644 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/168644/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 168515 test-amd64-i386-xl-qemut-win7-amd64 19

[ovmf test] 168653: regressions - FAIL

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

Re: [PATCH] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-17 Thread Andrew Cooper
On 17/03/2022 10:43, Jan Beulich wrote: > On 17.03.2022 11:02, Andrew Cooper wrote: >> For livepatching, we need to look at a potentially clobbered function and >> determine whether it used to have an ENDBR64 instruction. >> >> Use a non-default 4-byte P6 long nop, not emitted by toolchains, and

v2: XTF on arm

2022-03-17 Thread Michal Orzel
Hello, Following up a discussion from the v1 of "XTF on arm" patch series(it's been almost a year), I created a new version with the following major changes: -fixed comments from v1 -no non-MMU environment for arm64 -no PL011 driver -no test-naming/xtf-runner modifications to make OSSTEST happy

Re: [PATCH 1/3] tools/xenstore: add documentation for new set/get-feature commands

2022-03-17 Thread Juergen Gross
On 17.03.22 12:07, Julien Grall wrote: Hi Juergen, On 16/03/2022 16:10, Juergen Gross wrote: Add documentation for two new Xenstore wire commands SET_FEATURE and GET_FEATURE used to set or query the Xenstore features visible in the ring page of a given domain. Signed-off-by: Juergen Gross

Re: [PATCH 1/3] tools/xenstore: add documentation for new set/get-feature commands

2022-03-17 Thread Julien Grall
On 17/03/2022 11:07, Julien Grall wrote: Hi Juergen, On 16/03/2022 16:10, Juergen Gross wrote: Add documentation for two new Xenstore wire commands SET_FEATURE and GET_FEATURE used to set or query the Xenstore features visible in the ring page of a given domain. Signed-off-by: Juergen

[PATCH 1/2] livepatch: do not ignore sections with 0 size

2022-03-17 Thread Roger Pau Monne
A side effect of ignoring such sections is that symbols belonging to them won't be resolved, and that could make relocations belonging to other sections that reference those symbols fail. For example it's likely to have an empty .altinstr_replacement with symbols pointing to it, and marking the

[PATCH 2/2] livepatch: avoid relocations referencing ignored section symbols

2022-03-17 Thread Roger Pau Monne
Track whether symbols belong to ignored sections in order to avoid applying relocations referencing those symbols. The address of such symbols won't be resolved and thus the relocation will likely fail or write garbage to the destination. Return an error in that case, as leaving unresolved

[PATCH 0/2] livepatch: fix handling of (some) relocations

2022-03-17 Thread Roger Pau Monne
Hello, Relocations that reference symbols that belong to sections with a size of 0 are not properly resolved, as the address of those symbols won't be resolved in the first place. Fix this by not ignoring sections with a size of 0, while still properly handling the detection of whether a

Re: [PATCH 1/3] tools/xenstore: add documentation for new set/get-feature commands

2022-03-17 Thread Julien Grall
Hi Juergen, On 16/03/2022 16:10, Juergen Gross wrote: Add documentation for two new Xenstore wire commands SET_FEATURE and GET_FEATURE used to set or query the Xenstore features visible in the ring page of a given domain. Signed-off-by: Juergen Gross --- docs/misc/xenstore-ring.txt | 1 +

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

2022-03-17 Thread Tamas K Lengyel
On Thu, Mar 17, 2022, 2:09 AM Tian, Kevin wrote: > > From: Tamas K Lengyel > > Sent: Monday, March 14, 2022 8:14 PM > > > > On Mon, Mar 14, 2022 at 3:22 AM Tian, Kevin > wrote: > > > > > > > From: Lengyel, Tamas > > > > Sent: Friday, March 11, 2022 2:45 AM > > > > > > > > During VM fork

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread Raphael Ning
On 16/03/2022 18:58, Andrew Cooper wrote: > On 16/03/2022 18:38, Raphael Ning wrote: >> From: Raphael Ning >> >> Currently, evtchn_fifo_set_pending() will mark the event as PENDING even >> if it fails to lock the FIFO event queue(s), or if the guest has not >> initialized the FIFO control block

Re: [PATCH] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-17 Thread Jan Beulich
On 17.03.2022 11:02, Andrew Cooper wrote: > For livepatching, we need to look at a potentially clobbered function and > determine whether it used to have an ENDBR64 instruction. > > Use a non-default 4-byte P6 long nop, not emitted by toolchains, and extend > check-endbr.sh to look for it. > >

Re: [XEN v10 4/4] xen/arm64: io: Handle data abort due to cache maintenance instructions

2022-03-17 Thread Ayan Kumar Halder
Hi Julien, On 11/03/2022 18:34, Julien Grall wrote: Hi, On 10/03/2022 17:45, Ayan Kumar Halder wrote: When the data abort is caused due to cache maintenance for an address, there are three scenarios:- 1. Address belonging to a non emulated region - For this, Xen should set the corresponding

Re: [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-17 Thread Jan Beulich
On 17.03.2022 11:00, Jiamei Xie wrote: >> -Original Message- >> From: Xen-devel On Behalf Of >> Jiamei Xie >> Sent: 2022年3月17日 17:17 >> >>> -Original Message- >>> From: Xen-devel On Behalf Of >>> Ross Lagerwall >>> Sent: 2022年3月10日 1:12 >>> To: Bjoern Doebel ;

[xen-unstable test] 168642: trouble: broken/fail/pass

2022-03-17 Thread osstest service owner
flight 168642 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/168642/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw broken Tests which are

[PATCH] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-17 Thread Andrew Cooper
For livepatching, we need to look at a potentially clobbered function and determine whether it used to have an ENDBR64 instruction. Use a non-default 4-byte P6 long nop, not emitted by toolchains, and extend check-endbr.sh to look for it. The choice of nop has some complicated consequences.

RE: [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-17 Thread Jiamei Xie
> -Original Message- > From: Xen-devel On Behalf Of > Jiamei Xie > Sent: 2022年3月17日 17:17 > To: Ross Lagerwall ; Bjoern Doebel > ; xen-devel@lists.xenproject.org > Cc: Michael Kurth ; Martin Pohlack > ; Roger Pau Monne ; > Andrew Cooper ; Konrad Rzeszutek Wilk > > Subject: RE: [PATCH

Re: [PATCH] x86/spec-ctrl: Knobs for STIBP and PSFD, and follow hardware STIBP hint

2022-03-17 Thread Jan Beulich
On 16.03.2022 15:00, Andrew Cooper wrote: > STIBP and PSFD are slightly weird bits, because they're both implied by other > bits in MSR_SPEC_CTRL. Add fine grain controls for them, and take the > implications into account when setting IBRS/SSBD. > > Rearrange the IBPB text/variables/logic to

[libvirt test] 168649: regressions - FAIL

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

Re: [PATCH] x86/cet: Remove writeable mapping of the BSPs shadow stack

2022-03-17 Thread Jan Beulich
On 16.03.2022 20:23, Andrew Cooper wrote: > On 16/03/2022 08:33, Jan Beulich wrote: >> On 15.03.2022 17:53, Andrew Cooper wrote: >>> --- a/xen/arch/x86/xen.lds.S >>> +++ b/xen/arch/x86/xen.lds.S >>> @@ -215,8 +215,9 @@ SECTIONS >>>} PHDR(text) >>>DECL_SECTION(.init.data) { >>> #endif >>>

RE: [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-17 Thread Jiamei Xie
Hi Bjoern, > -Original Message- > From: Xen-devel On Behalf Of > Ross Lagerwall > Sent: 2022年3月10日 1:12 > To: Bjoern Doebel ; xen-devel@lists.xenproject.org > Cc: Michael Kurth ; Martin Pohlack > ; Roger Pau Monne ; > Andrew Cooper ; Konrad Rzeszutek Wilk > > Subject: Re: [PATCH v5

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

2022-03-17 Thread Roger Pau Monné
On Wed, Mar 16, 2022 at 09:13:15AM +, Jane Malalane wrote: > Introduce a new per-domain creation x86 specific flag to > select whether hardware assisted virtualization should be used for > x{2}APIC. > > A per-domain option is added to xl in order to select the usage of > x{2}APIC hardware

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

2022-03-17 Thread Jan Beulich
On 17.03.2022 06:55, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Monday, March 14, 2022 3:33 PM >> >> On 14.03.2022 05:01, Tian, Kevin wrote: From: Jan Beulich Sent: Friday, February 18, 2022 4:31 PM On 18.02.2022 06:20, Tian, Kevin wrote: >> From: Jan Beulich

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread David Vrabel
On 17/03/2022 06:28, Juergen Gross wrote: On 16.03.22 19:38, Raphael Ning wrote: From: Raphael Ning Currently, evtchn_fifo_set_pending() will mark the event as PENDING even if it fails to lock the FIFO event queue(s), or if the guest has not initialized the FIFO control block for the

Re: [PATCH] kconfig: detect LD implementation

2022-03-17 Thread Roger Pau Monné
On Wed, Mar 16, 2022 at 11:28:48AM +0100, Michal Orzel wrote: > Hi Roger, > > On 14.03.2022 11:55, Roger Pau Monne wrote: > > Detect GNU and LLVM ld implementations. This is required for further > > patches that will introduce diverging behaviour depending on the > > linker implementation in use.

[ovmf test] 168651: regressions - FAIL

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

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

2022-03-17 Thread osstest service owner
flight 168638 qemu-mainline real [real] flight 168647 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168638/ http://logs.test-lab.xenproject.org/osstest/logs/168647/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread Juergen Gross
On 16.03.22 19:38, Raphael Ning wrote: From: Raphael Ning Currently, evtchn_fifo_set_pending() will mark the event as PENDING even if it fails to lock the FIFO event queue(s), or if the guest has not initialized the FIFO control block for the target vCPU. A well-behaved guest should never

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

2022-03-17 Thread Tian, Kevin
> From: Jane Malalane > Sent: Wednesday, March 16, 2022 5:13 PM > > Add XEN_SYSCTL_PHYSCAP_X86_ASSISTED_XAPIC and > XEN_SYSCTL_PHYSCAP_X86_ASSISTED_X2APIC to report accelerated xAPIC > and > x2APIC, on x86 hardware. This is so that xAPIC and x2APIC virtualization > can subsequently be enabled on

  1   2   >