Re: [PATCH v5] x86/vmx: add hvm functions to get/set non-register state

2022-04-19 Thread Jan Beulich
On 20.04.2022 08:39, Tian, Kevin wrote: >> From: Tamas K Lengyel >> Sent: Tuesday, April 19, 2022 2:43 AM >> >> On Fri, Mar 25, 2022 at 9:34 AM Tamas K Lengyel >> wrote: >>> >>> During VM forking and resetting a failed vmentry has been observed due >>> to the guest non-register state going out-of

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

2022-04-19 Thread osstest service owner
flight 169545 linux-linus real [real] flight 169557 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/169545/ http://logs.test-lab.xenproject.org/osstest/logs/169557/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-

RE: [PATCH v5] x86/vmx: add hvm functions to get/set non-register state

2022-04-19 Thread Tian, Kevin
> From: Tamas K Lengyel > Sent: Tuesday, April 19, 2022 2:43 AM > > On Fri, Mar 25, 2022 at 9:34 AM Tamas K Lengyel > wrote: > > > > 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

RE: [PATCH 8/8] PCI: replace "secondary" flavors of PCI_{DEVFN,BDF,SBDF}()

2022-04-19 Thread Tian, Kevin
> From: Jan Beulich > Sent: Monday, April 11, 2022 5:42 PM > > At their use sites the numeric suffixes are at least odd to read, first > and foremost for PCI_DEVFN2() where the suffix doesn't even match the > number of arguments. Make use of count_args() such that a single flavor > each suffices

Re: [PATCH v1] x86/mm: avoid inadvertently degrading a TLB flush to local only

2022-04-19 Thread Jan Beulich
On 19.04.2022 17:03, David Vrabel wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -5071,11 +5071,10 @@ l1_pgentry_t *virt_to_xen_l1e(unsigned long v) > #define lNf_to_l1f(f) (((f) & _PAGE_PRESENT) ? ((f) & ~_PAGE_PSE) : (f)) > > /* > - * map_pages_to_xen() can be called with int

RE: [PATCH 7/8] PCI: replace stray uses of PCI_{DEVFN,BDF}2()

2022-04-19 Thread Tian, Kevin
> From: Jan Beulich > Sent: Monday, April 11, 2022 5:40 PM > > There's no good reason to use these when we already have a pci_sbdf_t > type object available. This extends to the use of PCI_BUS() in > pci_ecam_map_bus() as well. > > No change to generated code (with gcc11 at least, and I have to

[ovmf test] 169558: regressions - FAIL

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

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 20.04.2022 08:22, Juergen Gross wrote: > On 20.04.22 08:11, Jan Beulich wrote: >> On 20.04.2022 07:57, Juergen Gross wrote: >>> --- a/xen/include/xen/iommu.h >>> +++ b/xen/include/xen/iommu.h >>> @@ -341,8 +341,17 @@ struct domain_iommu { >>> /* Does the IOMMU pagetable need to be kept synchro

Re: [PATCH v1] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-19 Thread Jan Beulich
On 19.04.2022 17:01, David Vrabel wrote: > From: David Vrabel > > Heap pages can only be safely allocated and freed with interuupts > enabled as they may require a TLB flush which will send IPIs. > > Enhance the assertions in alloc_xenheap_pages() and > alloc_domheap_pages() to check interrupts

RE: [PATCH 4/8] VT-d: refuse to use IOMMU with reserved CAP.ND value

2022-04-19 Thread Tian, Kevin
> From: Jan Beulich > Sent: Monday, April 11, 2022 5:37 PM > > The field taking the value 7 (resulting in 18-bit DIDs when using the > calculation in cap_ndoms(), when the DID fields are only 16 bits wide) > is reserved. Instead of misbehaving in case we would encounter such an > IOMMU, refuse to

RE: [PATCH 3/8] VT-d: plug memory leaks in iommu_alloc()

2022-04-19 Thread Tian, Kevin
> From: Jan Beulich > Sent: Monday, April 11, 2022 5:37 PM > > While 97af062b89d5 ("IOMMU/x86: maintain a per-device pseudo domain > ID") > took care of not making things worse, plugging pre-existing leaks wasn't > the purpose of that change; they're not security relevant after all. > > Signed-o

RE: [PATCH 2/8] VT-d: drop ROOT_ENTRY_NR

2022-04-19 Thread Tian, Kevin
> From: Jan Beulich > Sent: Monday, April 11, 2022 5:36 PM > > It's not only misplaced, but entirely unused. > > Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian > > --- a/xen/drivers/passthrough/vtd/iommu.h > +++ b/xen/drivers/passthrough/vtd/iommu.h > @@ -204,7 +204,6 @@ struct context_

RE: [PATCH 1/8] IOMMU/x86: drop locking from quarantine_init() hooks

2022-04-19 Thread Tian, Kevin
> From: Jan Beulich > Sent: Monday, April 11, 2022 5:36 PM > > Prior extension of these functions to enable per-device quarantine page > tables already didn't add more locking there, but merely left in place > what had been there before. But really locking is unnecessary here: > We're running wit

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
On 20.04.22 08:11, Jan Beulich wrote: On 20.04.2022 07:57, Juergen Gross wrote: --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -341,8 +341,17 @@ struct domain_iommu { /* Does the IOMMU pagetable need to be kept synchronized with the P2M */ #ifdef CONFIG_HAS_PASSTHROUGH #def

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 20.04.2022 07:57, Juergen Gross wrote: > --- a/xen/include/xen/iommu.h > +++ b/xen/include/xen/iommu.h > @@ -341,8 +341,17 @@ struct domain_iommu { > /* Does the IOMMU pagetable need to be kept synchronized with the P2M */ > #ifdef CONFIG_HAS_PASSTHROUGH > #define need_iommu_pt_sync(d) (d

Re: [PATCH v2] xen: Convert kmap() to kmap_local_page()

2022-04-19 Thread Julia Lawall
On Wed, 20 Apr 2022, Alaa Mohamed wrote: > kmap() is being deprecated and these usages are all local to the thread > so there is no reason kmap_local_page() can't be used. > > Replace kmap() calls with kmap_local_page(). OK, so from a Coccinelle point of view, could we do @@ expression e1,e2,

[ovmf test] 169556: regressions - FAIL

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

[PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
Today iommu_do_domctl() is being called from arch_do_domctl() in the "default:" case of a switch statement. This has led already to crashes due to unvalidated parameters. Fix that by moving the call of iommu_do_domctl() to the main switch statement of do_domctl(). Signed-off-by: Juergen Gross --

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Jan Beulich
On 19.04.2022 18:06, Andrew Cooper wrote: > On 19/04/2022 16:52, Juergen Gross wrote: >> On 19.04.22 17:48, Andrew Cooper wrote: >>> On 19/04/2022 10:39, Jan Beulich wrote: Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, XEN_DOMCTL_test_assign_device can legi

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

2022-04-19 Thread Tian, Kevin
> From: Jane Malalane > Sent: Friday, April 1, 2022 6:47 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 a pe

[ovmf test] 169554: regressions - FAIL

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

RE: [PATCH V7 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-04-19 Thread Henry Wang
Hi Oleksandr, > -Original Message- > From: Oleksandr Tyshchenko > Subject: [PATCH V7 2/2] libxl: Introduce basic virtio-mmio support on Arm > > From: Julien Grall > > This patch introduces helpers to allocate Virtio MMIO params > (IRQ and memory region) and create specific device node

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

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

Re: [PATCH 0/2] Allow use of JSON in domain configuration files

2022-04-19 Thread Elliott Mitchell
On Tue, Apr 19, 2022 at 07:41:57PM -0700, Elliott Mitchell wrote: > While the traditional domain configuration file format works acceptably, > I can see uses for having full JSON support. As such add "-j" and "-J" > to `xl create` to specify format. The traditional format is the current > default

[PATCH 2/2] tools/xl: Allow specifying JSON for domain configuration file format

2022-04-19 Thread Elliott Mitchell
JSON is currently used when saving domains to mass storage. Being able to use JSON as the normal input to `xl create` has potential to be valuable. Add the functionality. Signed-off-by: Elliott Mitchell --- tools/xl/xl.h | 5 + tools/xl/xl_cmdtable.c | 2 ++ tools/xl/xl_vmcont

[PATCH 1/2] tools/xl: Sort create command options

2022-04-19 Thread Elliott Mitchell
Hopefully simplify future changes by sorting options lists for `xl create`. Signed-off-by: Elliott Mitchell --- tools/xl/xl_cmdtable.c | 10 +- tools/xl/xl_vmcontrol.c | 40 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tools/x

[PATCH 0/2] Allow use of JSON in domain configuration files

2022-04-19 Thread Elliott Mitchell
While the traditional domain configuration file format works acceptably, I can see uses for having full JSON support. As such add "-j" and "-J" to `xl create` to specify format. The traditional format is the current default. While attempting this, it came up that options for `xl create` aren't i

[ovmf test] 169553: regressions - FAIL

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

[PATCH 06/10] docs: xlexample.hvm: Add reference to nographic option

2022-04-19 Thread Elliott Mitchell
Running without any display device is a completely legal configuration. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.hvm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/examples/xlexample.hvm b/tools/examples/xlexample.hvm index a6cafcbf9f..7afb7c731d

Re: xen-swiotlb issue when NVMe driver is enabled in Dom0 on ARM

2022-04-19 Thread Stefano Stabellini
> > Then there is xen_swiotlb_init() which allocates some memory for > > swiotlb-xen at boot. It could lower the total amount of memory > > available, but if you disabled swiotlb-xen like I suggested, > > xen_swiotlb_init() still should get called and executed anyway at boot > > (it is called from

[PATCH 05/10] docs: xlexample.hvm: Fix maxmem value

2022-04-19 Thread Elliott Mitchell
HVM doesn't balloon and so it makes no sense to specify maxmem. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.hvm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/examples/xlexample.hvm b/tools/examples/xlexample.hvm index 26ae1c2fb4..a6cafcbf9f 1006

[PATCH 10/10] docs: xlexample.pvhlinux: Use similar text to other examples

2022-04-19 Thread Elliott Mitchell
Simply making the word choice match the other examples. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.pvhlinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/examples/xlexample.pvhlinux b/tools/examples/xlexample.pvhlinux index a6a52c336c..7685fb67b6 10

[PATCH 09/10] docs: xlexample.pvlinux: Add "type" setting

2022-04-19 Thread Elliott Mitchell
Some environments will prefer to explicitly include this setting despite being the default. This also increases consistency with other examples. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.pvlinux | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/examples/xlexample.p

[PATCH 08/10] docs: xlexample.hvm: Fix grammmer

2022-04-19 Thread Elliott Mitchell
This is correct and makes comparing the files with `diff` easier. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.hvm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/examples/xlexample.hvm b/tools/examples/xlexample.hvm index 7afb7c731d..df82280531 1006

[PATCH 07/10] docs: xlexample.pvhlinux: Make disk setting consistent with other examples

2022-04-19 Thread Elliott Mitchell
While storing images on ZFS is now quite common, such isn't required at all. As such the example should be as generic as possible and consistent with other examples. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.pvhlinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 04/10] docs: xlexample.pvhlinux: Add commented maxmem setting

2022-04-19 Thread Elliott Mitchell
Avoid confusion caused by differing example configuration files. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.pvhlinux | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/examples/xlexample.pvhlinux b/tools/examples/xlexample.pvhlinux index 1e9bcb9de5..e1bf845093 1006

[PATCH 03/10] docs: xlexample.*: Use consistent initial memory

2022-04-19 Thread Elliott Mitchell
Avoid confusing benchmarking during initial installation by using consistent amounts of memory for examples. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.hvm | 2 +- tools/examples/xlexample.pvhlinux | 2 +- tools/examples/xlexample.pvlinux | 2 +- 3 files changed, 3 insert

[PATCH 02/10] docs: xlexample.*: Use consistent vCPU count

2022-04-19 Thread Elliott Mitchell
Make all examples use the same number of vCPUs. Hopefully this avoids confusing attempts at benchmarking during installation. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.hvm | 2 +- tools/examples/xlexample.pvhlinux | 2 +- tools/examples/xlexample.pvlinux | 2 +- 3 files

[PATCH 01/10] docs: xlexample.hvm: Mention this isn't useful for other guests

2022-04-19 Thread Elliott Mitchell
I dislike the implication this default is valuable for all guests, need some mention of trade-off. Signed-off-by: Elliott Mitchell --- tools/examples/xlexample.hvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/examples/xlexample.hvm b/tools/examples/xlexample.hvm inde

[PATCH 00/10] Increase consistency of domain examples

2022-04-19 Thread Elliott Mitchell
The "xlexample.*" files have drifted apart rather distinctly. This may cause puzzlement at why the distinct choices were made. Worse, I have an unpleasant suspicion a naive user could benchmark with these files and not realize performance differences were due to different settings, not the domain

[ovmf test] 169551: regressions - FAIL

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

Re: Problem creating domU guest on arm64

2022-04-19 Thread Wei Chen
Hi Marco, On 2022/4/15 18:56, Marco Cacre wrote: Hi all, I'm facing always the same problem (described below) trying to create a Xen guest domain on rockpro64 (arm64). I have successfully built uboot, xen (4.14.4) and dom0 linux kernel with xen tool stack, these two last starting from build

RE: Proposal for Porting Xen to Armv8-R64 - DraftB

2022-04-19 Thread Stefano Stabellini
On Tue, 19 Apr 2022, Wei Chen wrote: > > > ### 3.2. Xen Event Channel Support > > > In Current RFC patches we haven't enabled the event channel support. > > > But I think it's good opportunity to do some discussion in advanced. > > > On Armv8-R, all VMs are native direct-map, because th

[PATCH v2] arm/xen: Fix some refcount leaks

2022-04-19 Thread Miaoqian Lin
The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount. Fixes: 9b08aaa3199a ("ARM: XEN: Move xen_early_init() before efi_init()") Fixes: b2371587fe0c ("arm/xen: Read

Re: [PATCH V6 0/2] xen/arm: add i.MX lpuart and i.MX8QM initial support

2022-04-19 Thread Stefano Stabellini
I committed both patches, thanks! On Tue, 19 Apr 2022, Peng Fan (OSS) wrote: > From: Peng Fan > > V6: > Fix a stale variable check per Stefano's comments. > > V5: > Align code > drop early_uart_init > > V4: > Wrong v3 version, some BIT definition are mixed in patch 1,2. > > V3: > Addres

Re: [PATCH] xen/arm: Make use of DT_MATCH_TIMER in make_timer_node

2022-04-19 Thread Stefano Stabellini
On Tue, 19 Apr 2022, Michal Orzel wrote: > Hi Stefano, > > On 16.04.2022 01:10, Stefano Stabellini wrote: > > On Thu, 14 Apr 2022, Michal Orzel wrote: > >> DT_MATCH_TIMER stores the compatible timer ids and as such should be > >> used in all the places where we need to refer to them. make_timer_no

[ovmf test] 169549: regressions - FAIL

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

Re: [PATCH] xen/evtchn: Add design for static event channel signaling for domUs..

2022-04-19 Thread Stefano Stabellini
On Tue, 19 Apr 2022, Rahul Singh wrote: > > On 14 Apr 2022, at 2:14 am, Stefano Stabellini > > wrote: > > > > On Mon, 11 Apr 2022, Bertrand Marquis wrote: > >> What you mention here is actually combining 2 different solutions inside > >> Xen to build a custom communication solution. > >> My assu

Re: [RFC PATCH 6/6] arm/xen: Assign xen-virtio DMA ops for virtio devices in Xen guests

2022-04-19 Thread Stefano Stabellini
On Tue, 19 Apr 2022, Oleksandr wrote: > On 19.04.22 17:48, Juergen Gross wrote: > > On 19.04.22 14:17, Oleksandr wrote: > > > > > > Hello Stefano, Juergen > > > > > > > > > On 18.04.22 22:11, Stefano Stabellini wrote: > > > > On Mon, 18 Apr 2022, Oleksandr wrote: > > > > > On 16.04.22 09:07, Chr

Re: [PATCH V7 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-04-19 Thread Stefano Stabellini
On Tue, 19 Apr 2022, Oleksandr wrote: > On 19.04.22 00:41, Stefano Stabellini wrote: > Hello Stefano > > > On Fri, 8 Apr 2022, Oleksandr Tyshchenko wrote: > > > From: Julien Grall > > > > > > This patch introduces helpers to allocate Virtio MMIO params > > > (IRQ and memory region) and create sp

[PATCH v2] xen: Convert kmap() to kmap_local_page()

2022-04-19 Thread Alaa Mohamed
kmap() is being deprecated and these usages are all local to the thread so there is no reason kmap_local_page() can't be used. Replace kmap() calls with kmap_local_page(). Signed-off-by: Alaa Mohamed --- changes in V2: -edit commit subject -edit commit message --- drivers/xen/gn

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

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

[ovmf test] 169548: regressions - FAIL

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

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

2022-04-19 Thread osstest service owner
flight 169541 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/169541/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail like 169412 test-amd64-amd64-xl-qemut-win7

[ovmf test] 169544: regressions - FAIL

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

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Julien Grall
Hi, On Tue, 19 Apr 2022, 17:09 Paran Lee, wrote: > Debugging with GDB from head.S with QEMU runtime was very convenient for > analysis(linux). so I have trying it in Xen. As I built it. > I don't understand how this is related to adding extra cflags. Can you clarify it? > Wouldn't it be helpf

Re: [PATCH] xen/evtchn: Add design for static event channel signaling for domUs..

2022-04-19 Thread Rahul Singh
Hello Stefano, > On 14 Apr 2022, at 2:14 am, Stefano Stabellini wrote: > > On Mon, 11 Apr 2022, Bertrand Marquis wrote: >> What you mention here is actually combining 2 different solutions inside >> Xen to build a custom communication solution. >> My assumption here is that the user will actuall

Re: [PATCH V7 1/2] libxl: Add support for Virtio disk configuration

2022-04-19 Thread Oleksandr
On 19.04.22 00:38, Stefano Stabellini wrote: Hello Stefano From: Oleksandr Tyshchenko This patch adds basic support for configuring and assisting virtio-mmio based virtio-disk backend (emualator) which is intended to run out of ^ emulator ok) -- Regards,

Re: [RFC PATCH 6/6] arm/xen: Assign xen-virtio DMA ops for virtio devices in Xen guests

2022-04-19 Thread Oleksandr
Hello Stefano, Juergen On 19.04.22 17:48, Juergen Gross wrote: On 19.04.22 14:17, Oleksandr wrote: Hello Stefano, Juergen On 18.04.22 22:11, Stefano Stabellini wrote: On Mon, 18 Apr 2022, Oleksandr wrote: On 16.04.22 09:07, Christoph Hellwig wrote: Hello Christoph On Fri, Apr 15, 202

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
Debugging with GDB from head.S with QEMU runtime was very convenient for analysis(linux). so I have trying it in Xen. As I built it. Wouldn't it be helpful if I fixed the code little by little? 2022-04-20 오전 1:31에 Paran Lee 이(가) 쓴 글: > Hi, Julien Grall. > > Thank you for checking it out. I'm sor

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Julien Grall
On Tue, 19 Apr 2022, 16:31 Paran Lee, wrote: > Hi, Julien Grall. > > Thank you for checking it out. I'm sorry I forgot to attach the make log > as well. > Thanks for the logs! > My build configuration (include CFLGAS) > > export ARCH=arm64 > export XEN_TARGET_ARCH=arm64 > export $(dpkg-archit

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
Hi, Julien Grall. Thank you for checking it out. I'm sorry I forgot to attach the make log as well. My build configuration (include CFLGAS) export ARCH=arm64 export XEN_TARGET_ARCH=arm64 export $(dpkg-architecture -aarm64); export CROSS_COMPILE=aarch64-linux-gnu- export CFLAGS="-g -Wall -Wextra

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 19.04.2022 16:56, Juergen Gross wrote: > On 19.04.22 16:51, Andrew Cooper wrote: >> On 19/04/2022 14:52, Juergen Gross wrote: >>> Today iommu_do_domctl() is being called from arch_do_domctl() in the >>> "default:" case of a switch statement. This has led already to crashes >>> due to unvalidated

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Jan Beulich
On 19.04.2022 17:39, Andrew Cooper wrote: > On 19/04/2022 11:59, Jan Beulich wrote: >> On 19.04.2022 12:49, Andrew Cooper wrote: >>> On 19/04/2022 10:39, Jan Beulich wrote: >>> Furthermore, under what circumstances is test_assign_device legitimate >>> when passing DOMID_INVALID ?  This has been bro

Re: [PATCH V7 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-04-19 Thread Oleksandr
On 19.04.22 00:41, Stefano Stabellini wrote: Hello Stefano On Fri, 8 Apr 2022, Oleksandr Tyshchenko wrote: From: Julien Grall This patch introduces helpers to allocate Virtio MMIO params (IRQ and memory region) and create specific device node in the Guest device-tree with allocated params

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 16:52, Juergen Gross wrote: > On 19.04.22 17:48, Andrew Cooper wrote: >> On 19/04/2022 10:39, Jan Beulich wrote: >>> Besides the reporter's issue of hitting a NULL deref when >>> !CONFIG_GDBSX, >>> XEN_DOMCTL_test_assign_device can legitimately end up having NULL >>> passed >>> here,

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Juergen Gross
On 19.04.22 17:48, Andrew Cooper wrote: On 19/04/2022 10:39, Jan Beulich wrote: Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed here, when the domctl was passed DOMID_INVALID. Fixes: 71e617a6b8f6 (

[PATCH v3 4/4] Add emacs file-local variables

2022-04-19 Thread Demi Marie Obenour
These were very helpful for me when I was working on the code. --- xen/common/efi/boot.c| 10 ++ xen/common/efi/runtime.c | 10 ++ 2 files changed, 20 insertions(+) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 01b2409c5e..5415785bef 100644 --- a/xen/common/

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Julien Grall
Hi, On Tue, 19 Apr 2022, 15:41 Paran Lee, wrote: > GCC with "-g -Wall -Wextra" option throws warning message as below: Which version of the compiler? Also you specify the exact cflags, did you tweak Xen? > error: comparison of integer expressions of different signedness: > ‘int’ and ‘unsign

[PATCH v3 3/4] Add a new hypercall to get the ESRT

2022-04-19 Thread Demi Marie Obenour
This hypercall can be used to get the ESRT from the hypervisor. It returning successfully also indicates that Xen has reserved the ESRT and it can safely be parsed by dom0. --- xen/common/efi/boot.c | 15 ++- xen/common/efi/efi.h | 2 ++ xen/common/efi/runtime.c

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 10:39, Jan Beulich wrote: > Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, > XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed > here, when the domctl was passed DOMID_INVALID. > > Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appr

[PATCH] xen/device_tree: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
GCC with "-g -Wall -Wextra" option throws warning message as below: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] Silence the warning by correcting the integer type. Signed-off-by: Paran Lee --- xen/common/device_tree.c | 31

[PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
GCC with "-g -Wall -Wextra" option throws warning message as below: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] Silence the warning by correcting the integer type. Signed-off-by: Paran Lee --- xen/arch/arm/gic-v3.c | 5 +++-

[PATCH v3 2/4] Add a dedicated memory region for the ESRT

2022-04-19 Thread Demi Marie Obenour
This allows the ESRT to be marked as reserved without having to waste a potentially large amount of memory. This patch assumes that Xen can handle memory regions that are not page-aligned. If it cannot, additional code will need to be added to align the regions. --- xen/arch/x86/efi/efi-boot.h

[PATCH v3 1/4] Grab the EFI System Resource Table and check it

2022-04-19 Thread Demi Marie Obenour
The EFI System Resource Table (ESRT) is necessary for fwupd to identify firmware updates to install. According to the UEFI specification §23.4, the table shall be stored in memory of type EfiBootServicesData. Therefore, Xen must avoid reusing that memory for other purposes, so that Linux can acces

[ovmf test] 169543: regressions - FAIL

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

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 11:59, Jan Beulich wrote: > On 19.04.2022 12:49, Andrew Cooper wrote: >> On 19/04/2022 10:39, Jan Beulich wrote: >> Furthermore, under what circumstances is test_assign_device legitimate >> when passing DOMID_INVALID ?  This has been broken for 3 years now >> without report, so it's c

[PATCH v3 1/4] Grab the EFI System Resource Table and check it

2022-04-19 Thread Demi Marie Obenour
The EFI System Resource Table (ESRT) is necessary for fwupd to identify firmware updates to install. According to the UEFI specification §23.4, the table shall be stored in memory of type EfiBootServicesData. Therefore, Xen must avoid reusing that memory for other purposes, so that Linux can acces

[PATCH v3 0/4] EFI System Resource Table support

2022-04-19 Thread Demi Marie Obenour
This adds support for the EFI System Resource Table. This involves reserving the table in Xen and adding a new hypercall so that dom0 can access it. Changes since v2: - Use the esrt_desc global variable instead of passing it as a function parameter - Add an overflow check for the ESRT size - C

[PATCH v1] x86/mm: avoid inadvertently degrading a TLB flush to local only

2022-04-19 Thread David Vrabel
From: David Vrabel If the direct map is incorrectly modified with interrupts disabled, the required TLB flushes are degraded to flushing the local CPU only. This could lead to very hard to diagnose problems as different CPUs will end up with different views of memory. Although, no such issues ha

[PATCH v1] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-19 Thread David Vrabel
From: David Vrabel Heap pages can only be safely allocated and freed with interuupts enabled as they may require a TLB flush which will send IPIs. Enhance the assertions in alloc_xenheap_pages() and alloc_domheap_pages() to check interrupts are enabled. For consistency the same asserts are used

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
On 19.04.22 16:51, Andrew Cooper wrote: On 19/04/2022 14:52, Juergen Gross wrote: Today iommu_do_domctl() is being called from arch_do_domctl() in the "default:" case of a switch statement. This has led already to crashes due to unvalidated parameters. Fix that by moving the call of iommu_do_do

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:52, Juergen Gross wrote: > Today iommu_do_domctl() is being called from arch_do_domctl() in the > "default:" case of a switch statement. This has led already to crashes > due to unvalidated parameters. > > Fix that by moving the call of iommu_do_domctl() to the main switch > statem

Re: [PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
On 19.04.22 16:37, Andrew Cooper wrote: On 19/04/2022 14:52, Juergen Gross wrote: A hypervisor built without CONFIG_GDBSX will crash in case the XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will end up in iommu_do_domctl() with d == NULL: (XEN) CPU:6 (XEN) RIP:e008:[]

Re: [RFC PATCH 6/6] arm/xen: Assign xen-virtio DMA ops for virtio devices in Xen guests

2022-04-19 Thread Juergen Gross
On 19.04.22 14:17, Oleksandr wrote: Hello Stefano, Juergen On 18.04.22 22:11, Stefano Stabellini wrote: On Mon, 18 Apr 2022, Oleksandr wrote: On 16.04.22 09:07, Christoph Hellwig wrote: Hello Christoph On Fri, Apr 15, 2022 at 03:02:45PM -0700, Stefano Stabellini wrote: This makes sense o

Re: [PATCH v3 2/3] xen: cleanup gdbsx_guest_mem_io() call

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:52, Juergen Gross wrote: > Modify the gdbsx_guest_mem_io() interface to take the already known > domain pointer as parameter instead of the domid. This enables to > remove some more code further down the call tree. > > Suggested-by: Jan Beulich > Signed-off-by: Juergen Gross Rev

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 19.04.2022 15:52, Juergen Gross wrote: > --- a/xen/common/domctl.c > +++ b/xen/common/domctl.c > @@ -871,6 +871,13 @@ long cf_check > do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) > copyback = 1; > break; > > +case XEN_DOMCTL_assign_device: > +case XEN

Re: [PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:52, Juergen Gross wrote: > A hypervisor built without CONFIG_GDBSX will crash in case the > XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will > end up in iommu_do_domctl() with d == NULL: > > (XEN) CPU:6 > (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 > (XEN

Re: [PATCH v3 2/3] xen: cleanup gdbsx_guest_mem_io() call

2022-04-19 Thread Jan Beulich
On 19.04.2022 15:52, Juergen Gross wrote: > Modify the gdbsx_guest_mem_io() interface to take the already known > domain pointer as parameter instead of the domid. This enables to > remove some more code further down the call tree. > > Suggested-by: Jan Beulich > Signed-off-by: Juergen Gross Re

Re: [PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Jan Beulich
On 19.04.2022 15:52, Juergen Gross wrote: > A hypervisor built without CONFIG_GDBSX will crash in case the > XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will > end up in iommu_do_domctl() with d == NULL: > > (XEN) CPU:6 > (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 > (XE

[ovmf test] 169542: regressions - FAIL

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

Re: [PATCH v2] xen/build: Add cppcheck and cppcheck-html make rules

2022-04-19 Thread Bertrand Marquis
Hi Stefano, > On 16 Apr 2022, at 00:42, Stefano Stabellini wrote: > > On Wed, 13 Apr 2022, Bertrand Marquis wrote: >> cppcheck can be used to check Xen code quality. >> >> To create a report do "make cppcheck" on a built tree adding any options >> you added during the process you used to build

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:10, Peter Zijlstra wrote: > On Tue, Apr 19, 2022 at 01:12:14PM +0100, Andrew Cooper wrote: > >>> Subject: x86/xen: Add ANNOTATE_ENDBR to startup_xen() >>> From: Josh Poimboeuf >>> Date: Mon, 18 Apr 2022 09:50:25 -0700 >>> >>> From: Josh Poimboeuf >>> >>> The startup_xen() kernel

[PATCH v3 2/3] xen: cleanup gdbsx_guest_mem_io() call

2022-04-19 Thread Juergen Gross
Modify the gdbsx_guest_mem_io() interface to take the already known domain pointer as parameter instead of the domid. This enables to remove some more code further down the call tree. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross --- V2: - split off from previous patch (Andrew Cooper) -

[PATCH v3 0/3] xen: fix and cleanup domctl handling

2022-04-19 Thread Juergen Gross
A fix of a hypervisor crash in domctl handling and some related cleanup. Juergen Gross (3): xen: fix XEN_DOMCTL_gdbsx_guestmemio crash xen: cleanup gdbsx_guest_mem_io() call xen/iommu: cleanup iommu related domctl handling xen/arch/arm/domctl.c | 11 +-- xen/arch/x86/

[PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
A hypervisor built without CONFIG_GDBSX will crash in case the XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will end up in iommu_do_domctl() with d == NULL: (XEN) CPU:6 (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 (XEN) RFLAGS: 00010202 CONTEXT: hypervisor (d0v0)

[PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
Today iommu_do_domctl() is being called from arch_do_domctl() in the "default:" case of a switch statement. This has led already to crashes due to unvalidated parameters. Fix that by moving the call of iommu_do_domctl() to the main switch statement of do_domctl(). Signed-off-by: Juergen Gross --

Re: [PATCH v2] of: of_property_read_string return -ENODATA when !length

2022-04-19 Thread Rob Herring
On Fri, 15 Apr 2022 17:30:28 -0700, Stefano Stabellini wrote: > From: Stefano Stabellini > > When the length of the string is zero of_property_read_string should > return -ENODATA according to the description of the function. > > However, of_property_read_string doesn't check prop->length. If >

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Peter Zijlstra
On Tue, Apr 19, 2022 at 01:12:14PM +0100, Andrew Cooper wrote: > > Subject: x86/xen: Add ANNOTATE_ENDBR to startup_xen() > > From: Josh Poimboeuf > > Date: Mon, 18 Apr 2022 09:50:25 -0700 > > > > From: Josh Poimboeuf > > > > The startup_xen() kernel entry point is referenced by the ".note.Xen" >

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

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

  1   2   >