Re: [PATCH] VT-x: extend LBR Broadwell errata coverage

2020-05-20 Thread Andrew Cooper
On 20/05/2020 13:52, Jan Beulich wrote: > For lbr_tsx_fixup_check() simply name a few more specific errata numbers. > > For bdf93_fixup_check(), however, more models are affected. Oddly enough > despite being the same model and stepping, the erratum is listed for Xeon > E3 but not its Core

Re: [PATCH] tools/libxengnttab: correct size of allocated memory

2020-05-20 Thread Roger Pau Monné
On Wed, May 20, 2020 at 03:49:59PM +0100, Ian Jackson wrote: > Juergen Gross writes ("[PATCH] tools/libxengnttab: correct size of allocated > memory"): > > The size of the memory allocated for the IOCTL_GNTDEV_MAP_GRANT_REF > > ioctl() parameters is calculated wrong, which results in too much > >

[XEN PATCH] tools/xenstore: mark variable in header as extern

2020-05-20 Thread Anthony PERARD
This patch fix "multiple definition of `xprintf'" (or xgt_handle) build error with GCC 10.1.0. These are the error reported: gcc xs_tdb_dump.o utils.o tdb.o talloc.o -o xs_tdb_dump /usr/bin/ld: utils.o:./utils.h:27: multiple definition of `xprintf'; xs_tdb_dump.o:./utils.h:27: first

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

2020-05-20 Thread osstest service owner
flight 150267 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/150267/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-rtds 16 guest-localmigrate fail REGR. vs. 150227 test-armhf-armhf-xl-rtds

Re: [XEN PATCH] tools/xenstore: mark variable in header as extern

2020-05-20 Thread Andrew Cooper
On 20/05/2020 17:39, Anthony PERARD wrote: > This patch fix "multiple definition of `xprintf'" (or xgt_handle) > build error with GCC 10.1.0. > > These are the error reported: > gcc xs_tdb_dump.o utils.o tdb.o talloc.o -o xs_tdb_dump > /usr/bin/ld: utils.o:./utils.h:27: multiple

[PATCH] 9p/xen: increase XEN_9PFS_RING_ORDER

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini Increase XEN_9PFS_RING_ORDER to 9 for performance reason. Order 9 is the max allowed by the protocol. We can't assume that all backends will support order 9. The xenstore property max-ring-page-order specifies the max order supported by the backend. We'll use

Re: [PATCH] VT-x: extend LBR Broadwell errata coverage

2020-05-20 Thread Jan Beulich
On 20.05.2020 16:07, Andrew Cooper wrote: > On 20/05/2020 13:52, Jan Beulich wrote: >> @@ -2895,15 +2897,26 @@ static void __init lbr_tsx_fixup_check(v >> static void __init bdf93_fixup_check(void) > > Seeing as this is no longer just BDF93, how about ler_tsx_fixup_check() ? I did consider

Re: grant table issues mapping a ring order 10

2020-05-20 Thread Stefano Stabellini
On Wed, 20 May 2020, Jürgen Groß wrote: > On 20.05.20 08:00, Jürgen Groß wrote: > > On 19.05.20 23:21, Stefano Stabellini wrote: > > > Hi Juergen, Boris, > > > > > > I am trying to increase the size of the rings used for Xen 9pfs > > > connections for performance reasons and also to reduce the

Re: [BUG] Consistent LBR/TSX vmentry failure (0x80000022) calling domain_crash() in vmx.c:3324

2020-05-20 Thread Andrew Cooper
On 20/05/2020 15:59, Elliot Killick wrote: > On 2020-05-20 12:31, Andrew Cooper wrote: >> On 20/05/2020 12:46, Elliot Killick wrote: >>> processor : 0 >>> vendor_id : GenuineIntel >>> cpu family : 6 >>> model : 60 >>> model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz >>>

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Roger Pau Monné
On Wed, May 20, 2020 at 03:12:25PM +0200, Jan Beulich wrote: > On 20.05.2020 13:43, Roger Pau Monné wrote: > > On Wed, May 20, 2020 at 12:57:27PM +0200, Jan Beulich wrote: > >> On 20.05.2020 12:28, Roger Pau Monné wrote: > >>> On Wed, May 20, 2020 at 12:17:15PM +0200, Jan Beulich wrote: > On

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

2020-05-20 Thread osstest service owner
flight 150271 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/150271/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-libvirt-raw 7 xen-boot fail in 150260 pass in 150271 test-amd64-amd64-xl-rtds

Re: [PATCH] VT-x: extend LBR Broadwell errata coverage

2020-05-20 Thread Andrew Cooper
On 20/05/2020 16:56, Jan Beulich wrote: > On 20.05.2020 16:07, Andrew Cooper wrote: >> On 20/05/2020 13:52, Jan Beulich wrote: >>> @@ -2895,15 +2897,26 @@ static void __init lbr_tsx_fixup_check(v >>> static void __init bdf93_fixup_check(void) >> Seeing as this is no longer just BDF93, how about

Re: [PATCH v3 2/2] x86/idle: prevent entering C6 with in service interrupts on Intel

2020-05-20 Thread Andrew Cooper
On 18/05/2020 16:47, Jan Beulich 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 18.05.2020 17:45, Roger Pau Monné wrote: >> On Mon, May 18, 2020 at 05:05:12PM +0200, Jan Beulich wrote:

[XEN PATCH] tools/xenstore: mark variable in header as extern

2020-05-20 Thread Ian Jackson
Anthony PERARD writes ("[XEN PATCH] tools/xenstore: mark variable in header as extern"): > This patch fix "multiple definition of `xprintf'" (or xgt_handle) > build error with GCC 10.1.0. Reviewed-by: Ian Jackson

Re: [BUG] Consistent LBR/TSX vmentry failure (0x80000022) calling domain_crash() in vmx.c:3324

2020-05-20 Thread Andrew Cooper
On 20/05/2020 12:46, Elliot Killick wrote: > On 2020-05-20 11:27, Andrew Cooper wrote: >> On 20/05/2020 12:20, Elliot Killick wrote: >>> On 2020-05-20 11:10, Andrew Cooper wrote: On 20/05/2020 11:33, Elliot Killick wrote: > Hello, > > Xen is crashing Windows 10 (64-bit) VMs

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Jan Beulich
On 20.05.2020 13:43, Roger Pau Monné wrote: > On Wed, May 20, 2020 at 12:57:27PM +0200, Jan Beulich wrote: >> On 20.05.2020 12:28, Roger Pau Monné wrote: >>> On Wed, May 20, 2020 at 12:17:15PM +0200, Jan Beulich wrote: On 20.05.2020 11:31, Roger Pau Monné wrote: > On Wed, May 20, 2020 at

Re: [PATCH 3/3] xen/vm_event: Add safe to disable vm_event

2020-05-20 Thread Tamas K Lengyel
On Wed, May 20, 2020 at 7:45 AM Jan Beulich wrote: > > On 15.05.2020 18:53, Tamas K Lengyel wrote: > > --- a/xen/arch/x86/hvm/hvm.c > > +++ b/xen/arch/x86/hvm/hvm.c > > @@ -563,15 +563,41 @@ void hvm_do_resume(struct vcpu *v) > > v->arch.hvm.inject_event.vector = HVM_EVENT_VECTOR_UNSET;

Re: [PATCH 1/3] xen/monitor: Control register values

2020-05-20 Thread Tamas K Lengyel
On Wed, May 20, 2020 at 7:36 AM Jan Beulich wrote: > > On 15.05.2020 18:53, Tamas K Lengyel wrote: > > Extend the monitor_op domctl to include option that enables > > controlling what values certain registers are permitted to hold > > by a monitor subscriber. > > This needs a bit more

Re: [GRUB PATCH 0/2] Better Xen support

2020-05-20 Thread Daniel Kiper
On Wed, May 20, 2020 at 01:14:18PM +0100, Ian Jackson wrote: > Hi. As maintainer of the Xen Project upstream CI, I do testing of > upstream Xen builds onto Debian systems. > > We use grub's 20_linux_xen to do the bootloader setup. However, it is > missing some features so we are carrying some

Re: [PATCH] tools/libxengnttab: correct size of allocated memory

2020-05-20 Thread Ian Jackson
Juergen Gross writes ("[PATCH] tools/libxengnttab: correct size of allocated memory"): > The size of the memory allocated for the IOCTL_GNTDEV_MAP_GRANT_REF > ioctl() parameters is calculated wrong, which results in too much > memory allocated. Added Roger to CC. Firstly, Reviewed-by: Ian

Re: [PATCH] x86/traps: Rework #PF[Rsvd] bit handling

2020-05-20 Thread Andrew Cooper
On 20/05/2020 08:48, Jan Beulich wrote: > On 19.05.2020 20:00, Andrew Cooper wrote: >> On 19/05/2020 17:09, Jan Beulich wrote: >>> In any event there would be 12 bits to reclaim from the up >>> pointer - it being a physical address, there'll not be more >>> than 52 significant bits. >> Right, but

[PATCH] VT-x: extend LBR Broadwell errata coverage

2020-05-20 Thread Jan Beulich
For lbr_tsx_fixup_check() simply name a few more specific errata numbers. For bdf93_fixup_check(), however, more models are affected. Oddly enough despite being the same model and stepping, the erratum is listed for Xeon E3 but not its Core counterpart. With this it's of course also uncertain

Re: [BUG] Consistent LBR/TSX vmentry failure (0x80000022) calling domain_crash() in vmx.c:3324

2020-05-20 Thread Elliot Killick
On 2020-05-20 12:31, Andrew Cooper wrote: > On 20/05/2020 12:46, Elliot Killick wrote: >> On 2020-05-20 11:27, Andrew Cooper wrote: >>> On 20/05/2020 12:20, Elliot Killick wrote: On 2020-05-20 11:10, Andrew Cooper wrote: > On 20/05/2020 11:33, Elliot Killick wrote: >> Hello, >>

[GRUB PATCH 0/2] Better Xen support

2020-05-20 Thread Ian Jackson
Hi. As maintainer of the Xen Project upstream CI, I do testing of upstream Xen builds onto Debian systems. We use grub's 20_linux_xen to do the bootloader setup. However, it is missing some features so we are carrying some patches. Here they are for your consideration. Regards, Ian. Ian

[GRUB PATCH 1/2] 20_linux_xen: Ignore xenpolicy and config files too

2020-05-20 Thread Ian Jackson
"file_is_not_sym" currently only checks for xen-syms. Extend it to disregard xenpolicy (XSM policy files) and files ending .config (which are built by the Xen upstream build system in some configurations and can therefore end up in /boot). Rename the function accordingly, to

[GRUB PATCH 2/2] 20_linux_xen: Support Xen Security Modules (XSM/FLASK)

2020-05-20 Thread Ian Jackson
XSM is enabled by adding "flask=enforcing" as a Xen command line argument, and providing the policy file as a grub module. We make entries for both with and without XSM. If XSM is not compiled into Xen, then there are no policy files, so no change to the boot options. Signed-off-by: Ian Jackson

Re: [PATCH 1/3] xen/monitor: Control register values

2020-05-20 Thread Jan Beulich
On 20.05.2020 15:42, Tamas K Lengyel wrote: > On Wed, May 20, 2020 at 7:36 AM Jan Beulich wrote: >> >> On 15.05.2020 18:53, Tamas K Lengyel wrote: >>> Extend the monitor_op domctl to include option that enables >>> controlling what values certain registers are permitted to hold >>> by a monitor

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

2020-05-20 Thread osstest service owner
flight 150276 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/150276/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [OSSTEST PATCH 34/38] buster: grub, arm64: extend chainloading workaround

2020-05-20 Thread Ian Jackson
Julien Grall writes ("Re: [OSSTEST PATCH 34/38] buster: grub, arm64: extend chainloading workaround"): > On 19/05/2020 20:02, Ian Jackson wrote: > > multiboot[2] isn't supported. > > > > Also link to the bug report. > > > > CC: Julien Grall > > CC: Stefano Stabellini > > Signed-off-by: Ian

Re: [PATCH] x86: refine guest_mode()

2020-05-20 Thread Roger Pau Monné
On Wed, May 20, 2020 at 10:56:26AM +0200, Jan Beulich wrote: > On 18.05.2020 16:51, Roger Pau Monné wrote: > > On Tue, Apr 28, 2020 at 08:30:12AM +0200, Jan Beulich wrote: > >> On 27.04.2020 22:11, Andrew Cooper wrote: > >>> On 27/04/2020 16:15, Jan Beulich wrote: > On 27.04.2020 16:35,

Re: [PATCH 1/3] xen/monitor: Control register values

2020-05-20 Thread Jan Beulich
On 15.05.2020 18:53, Tamas K Lengyel wrote: > Extend the monitor_op domctl to include option that enables > controlling what values certain registers are permitted to hold > by a monitor subscriber. This needs a bit more explanation, especially for those of us who aren't that introspection savvy.

Re: [PATCH 3/3] xen/vm_event: Add safe to disable vm_event

2020-05-20 Thread Jan Beulich
On 15.05.2020 18:53, Tamas K Lengyel wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -563,15 +563,41 @@ void hvm_do_resume(struct vcpu *v) > v->arch.hvm.inject_event.vector = HVM_EVENT_VECTOR_UNSET; > } > > -if ( unlikely(v->arch.vm_event) && >

Re: [OSSTEST PATCH 22/38] buster: Extend guest bootloader workaround

2020-05-20 Thread Ian Jackson
Julien Grall writes ("Re: [OSSTEST PATCH 22/38] buster: Extend guest bootloader workaround"): > On 19/05/2020 20:02, Ian Jackson wrote: > > CC: Julien Grall > > CC: Stefano Stabellini > > Signed-off-by: Ian Jackson > > Acked-by: Julien Grall Thanks. > > # Debian doesn't currently know

Re: [BUG] Consistent LBR/TSX vmentry failure (0x80000022) calling domain_crash() in vmx.c:3324

2020-05-20 Thread Elliot Killick
On 2020-05-20 11:27, Andrew Cooper wrote: > On 20/05/2020 12:20, Elliot Killick wrote: >> On 2020-05-20 11:10, Andrew Cooper wrote: >>> On 20/05/2020 11:33, Elliot Killick wrote: Hello, Xen is crashing Windows 10 (64-bit) VMs consistently whenever IDA Debugger

[PATCH] x86emul: correct {evex} assembler capability check

2020-05-20 Thread Jan Beulich
The {evex} pseudo prefix gets rejected by gas for insns not allowing EVEX encoding. Except there's a gas bug due to which its check gets bypassed for insns without operands. Let's not rely on that bug to remain there. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/Makefile +++

Re: [PATCH] x86emul: correct {evex} assembler capability check

2020-05-20 Thread Andrew Cooper
On 20/05/2020 15:20, Jan Beulich wrote: > The {evex} pseudo prefix gets rejected by gas for insns not allowing > EVEX encoding. Except there's a gas bug due to which its check gets > bypassed for insns without operands. Let's not rely on that bug to > remain there. > > Signed-off-by: Jan Beulich

Re: [PATCH] VT-x: extend LBR Broadwell errata coverage

2020-05-20 Thread Andrew Cooper
On 20/05/2020 13:52, Jan Beulich wrote: > For lbr_tsx_fixup_check() simply name a few more specific errata numbers. > > For bdf93_fixup_check(), however, more models are affected. Oddly enough > despite being the same model and stepping, the erratum is listed for Xeon > E3 but not its Core

Re: [PATCH v5] x86: clear RDRAND CPUID bit on AMD family 15h/16h

2020-05-20 Thread Andrew Cooper
On 18/05/2020 14:19, Jan Beulich wrote: > Inspired by Linux commit c49a0a80137c7ca7d6ced4c812c9e07a949f6f24: > > There have been reports of RDRAND issues after resuming from suspend on > some AMD family 15h and family 16h systems. This issue stems from a BIOS > not performing the

Re: [V9fs-developer] [PATCH] 9p/xen: increase XEN_9PFS_RING_ORDER

2020-05-20 Thread Stefano Stabellini
On Wed, 20 May 2020, Dominique Martinet wrote: > Stefano Stabellini wrote on Wed, May 20, 2020: > > From: Stefano Stabellini > > > > Increase XEN_9PFS_RING_ORDER to 9 for performance reason. Order 9 is the > > max allowed by the protocol. > > > > We can't assume that all backends will support

Re: [PATCH for-4.14 1/3] xen/arm: Allow a platform to override the DMA width

2020-05-20 Thread Stefano Stabellini
On Mon, 18 May 2020, Volodymyr Babchuk wrote: > Hi Julien, > > On Mon, 2020-05-18 at 12:30 +0100, Julien Grall wrote: > > From: Julien Grall > > > > At the moment, Xen is assuming that all the devices are at least 32-bit > > DMA capable. However, some SoC have devices that may be able to access

[ovmf test] 150278: all pass

2020-05-20 Thread osstest service owner
flight 150278 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/150278/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d3733188a2162abf72dd08c0cedd1119b5cfe6c4 baseline version: ovmf

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

2020-05-20 Thread osstest service owner
flight 150280 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/150280/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

[linux-5.4 test] 150273: tolerable FAIL

2020-05-20 Thread osstest service owner
flight 150273 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/150273/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds 12 guest-start fail REGR. vs. 150172 Tests which did not succeed,

Re: [PATCH v3 2/2] x86/idle: prevent entering C6 with in service interrupts on Intel

2020-05-20 Thread Andrew Cooper
On 15/05/2020 14:58, Roger Pau Monne wrote: > Apply a workaround for Intel errata BDX99, CLX30, SKX100, CFW125, > BDF104, BDH85, BDM135, KWB131: "A Pending Fixed Interrupt May Be > Dispatched Before an Interrupt of The Same Priority Completes". HSM175 et al, so presumably a HSD, and HSE as well.

Re: [PATCH for-4.14 0/3] Remove the 1GB limitation on Rasberry Pi 4

2020-05-20 Thread Stefano Stabellini
On Mon, 18 May 2020, Julien Grall wrote: > From: Julien Grall > > Hi all, > > At the moment, a user who wants to boot Xen on the Raspberry Pi 4 can > only use the first GB of memory. > > This is because several devices cannot DMA above 1GB but Xen doesn't > necessarily allocate memory for Dom0

Re: [PATCH 00/10] fix swiotlb-xen for RPi4

2020-05-20 Thread Roman Shaposhnik
On Wed, May 20, 2020 at 4:45 PM Stefano Stabellini wrote: > > Hi all, > > This series is a collection of fixes to get Linux running on the RPi4 as > dom0. > > Conceptually there are only two significant changes: > > - make sure not to call virt_to_page on vmalloc virt addresses (patch > #1) > -

Re: [PATCH 1/3] xen/monitor: Control register values

2020-05-20 Thread Tamas K Lengyel
On Wed, May 20, 2020 at 7:48 AM Jan Beulich wrote: > > On 20.05.2020 15:42, Tamas K Lengyel wrote: > > On Wed, May 20, 2020 at 7:36 AM Jan Beulich wrote: > >> > >> On 15.05.2020 18:53, Tamas K Lengyel wrote: > >>> Extend the monitor_op domctl to include option that enables > >>> controlling what

[PATCH 09/10] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini Add phys_to_dma/dma_to_phys calls to xen_dma_sync_for_cpu, xen_dma_sync_for_device, and xen_arch_need_swiotlb. In xen_arch_need_swiotlb, take the opportunity to switch to the simpler pfn_valid check we use everywhere else. dma_cache_maint is fixed by the next patch.

[PATCH 03/10] swiotlb-xen: add struct device* parameter to xen_phys_to_bus

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index

[PATCH 02/10] swiotlb-xen: remove start_dma_addr

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini It is not strictly needed. Call virt_to_phys on xen_io_tlb_start instead. It will be useful not to have a start_dma_addr around with the next patches. Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 5 + 1 file changed, 1 insertion(+), 4

[PATCH 08/10] swiotlb-xen: introduce phys_to_dma/dma_to_phys translations

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini Call dma_to_phys in is_xen_swiotlb_buffer. Call phys_to_dma in xen_phys_to_bus. Call dma_to_phys in xen_bus_to_phys. Everything is taken care of by these changes except for xen_swiotlb_alloc_coherent and xen_swiotlb_free_coherent, which need a few explicit

Re: [PATCH 3/3] xen/vm_event: Add safe to disable vm_event

2020-05-20 Thread Tamas K Lengyel
On Wed, May 20, 2020 at 7:45 AM Jan Beulich wrote: > > On 15.05.2020 18:53, Tamas K Lengyel wrote: > > --- a/xen/arch/x86/hvm/hvm.c > > +++ b/xen/arch/x86/hvm/hvm.c > > @@ -563,15 +563,41 @@ void hvm_do_resume(struct vcpu *v) > > v->arch.hvm.inject_event.vector = HVM_EVENT_VECTOR_UNSET;

[PATCH v2 for-4.14 3/3] xen/vm_event: Add safe to disable vm_event

2020-05-20 Thread Tamas K Lengyel
Instead of having to repeatedly try to disable vm_events, request a specific vm_event to be sent when the domain is safe to continue with shutting down the vm_event interface. Signed-off-by: Tamas K Lengyel --- xen/arch/x86/hvm/hvm.c| 38 ++-

[PATCH v2 for-4.14 2/3] xen/vm_event: add vm_event_check_pending_op

2020-05-20 Thread Tamas K Lengyel
Perform sanity checking when shutting vm_event down to determine whether it is safe to do so. Error out with -EAGAIN in case pending operations have been found for the domain. Signed-off-by: Tamas K Lengyel --- xen/arch/x86/vm_event.c| 23 +++ xen/common/vm_event.c

Re: [PATCH 00/10] fix swiotlb-xen for RPi4

2020-05-20 Thread Stefano Stabellini
On Wed, 20 May 2020, Roman Shaposhnik wrote: > On Wed, May 20, 2020 at 4:45 PM Stefano Stabellini > wrote: > > > > Hi all, > > > > This series is a collection of fixes to get Linux running on the RPi4 as > > dom0. > > > > Conceptually there are only two significant changes: > > > > - make sure

[PATCH 01/10] swiotlb-xen: use vmalloc_to_page on vmalloc virt addresses

2020-05-20 Thread Stefano Stabellini
From: Boris Ostrovsky Don't just assume that virt_to_page works on all virtual addresses. Instead add a is_vmalloc_addr check and use vmalloc_to_page on vmalloc virt addresses. Signed-off-by: Boris Ostrovsky Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 5 - 1 file

[PATCH 07/10] swiotlb-xen: add struct device* parameter to is_xen_swiotlb_buffer

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index

[PATCH 05/10] swiotlb-xen: add struct device* parameter to xen_dma_sync_for_cpu

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini --- arch/arm/xen/mm.c | 5 +++-- drivers/xen/swiotlb-xen.c | 4 ++-- include/xen/swiotlb-xen.h | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff

[PATCH 00/10] fix swiotlb-xen for RPi4

2020-05-20 Thread Stefano Stabellini
Hi all, This series is a collection of fixes to get Linux running on the RPi4 as dom0. Conceptually there are only two significant changes: - make sure not to call virt_to_page on vmalloc virt addresses (patch #1) - use phys_to_dma and dma_to_phys to translate phys to/from dma addresses

[PATCH 04/10] swiotlb-xen: add struct device* parameter to xen_bus_to_phys

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index

[PATCH 06/10] swiotlb-xen: add struct device* parameter to xen_dma_sync_for_device

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini --- arch/arm/xen/mm.c | 5 +++-- drivers/xen/swiotlb-xen.c | 4 ++-- include/xen/swiotlb-xen.h | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff

[PATCH 10/10] xen/arm: call dma_to_phys on the dma_addr_t parameter of dma_cache_maint

2020-05-20 Thread Stefano Stabellini
From: Stefano Stabellini Add a struct device* parameter to dma_cache_maint. Translate the dma_addr_t parameter of dma_cache_maint by calling dma_to_phys. Do it for the first page and all the following pages, in case of multipage handling. Signed-off-by: Stefano Stabellini ---

[xen-unstable test] 150279: regressions - FAIL

2020-05-20 Thread osstest service owner
flight 150279 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/150279/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-examine 4 memdisk-try-append fail REGR. vs. 150267 Tests which did

[PATCH v2 for-4.14 0/3] vm_event: fix race-condition when disabling monitor events

2020-05-20 Thread Tamas K Lengyel
For the last couple years we have received numerous reports from users of monitor vm_events of spurious guest crashes when using events. In particular, it has observed that the problem occurs when vm_events are being disabled. The nature of the guest crash varied widely and has only occured

[PATCH v2 for-4.14 1/3] xen/monitor: Control register values

2020-05-20 Thread Tamas K Lengyel
Extend the monitor_op domctl to include option that enables controlling what values certain registers are permitted to hold by a monitor subscriber. Signed-off-by: Tamas K Lengyel --- xen/arch/x86/hvm/hvm.c | 25 - xen/arch/x86/monitor.c | 10 +-

Re: [V9fs-developer] [PATCH] 9p/xen: increase XEN_9PFS_RING_ORDER

2020-05-20 Thread Dominique Martinet
Stefano Stabellini wrote on Wed, May 20, 2020: > From: Stefano Stabellini > > Increase XEN_9PFS_RING_ORDER to 9 for performance reason. Order 9 is the > max allowed by the protocol. > > We can't assume that all backends will support order 9. The xenstore > property max-ring-page-order specifies

Re: [PATCH] x86/traps: Rework #PF[Rsvd] bit handling

2020-05-20 Thread Tim Deegan
At 18:09 +0200 on 19 May (1589911795), Jan Beulich wrote: > static inline int sh_type_has_up_pointer(struct domain *d, unsigned int t) > { > /* Multi-page shadows don't have up-pointers */ > if ( t == SH_type_l1_32_shadow > || t == SH_type_fl1_32_shadow > || t ==

Re: grant table issues mapping a ring order 10

2020-05-20 Thread Jürgen Groß
On 19.05.20 23:21, Stefano Stabellini wrote: Hi Juergen, Boris, I am trying to increase the size of the rings used for Xen 9pfs connections for performance reasons and also to reduce the likehood of the backend having to wait on the frontend to free up space from the ring. FYI I realized that

[qemu-mainline test] 150260: regressions - FAIL

2020-05-20 Thread osstest service owner
flight 150260 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/150260/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw 7 xen-boot fail REGR. vs. 150243 Regressions

[PATCH v3 3/3] x86/PV: polish pv_set_gdt()

2020-05-20 Thread Jan Beulich
There's no need to invoke get_page_from_gfn(), and there's also no need to update the passed in frames[]. Invoke get_page_and_type() directly. Also make the function's frames[] parameter const, change its return type to int, and drop the bogus casts from two of its invocations. Finally a little

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Jan Beulich
On 14.05.2020 16:05, Roger Pau Monné wrote: > On Mon, Jul 15, 2019 at 02:39:04PM +, Jan Beulich wrote: >> @@ -251,6 +255,10 @@ boot/mkelf32: boot/mkelf32.c >> efi/mkreloc: efi/mkreloc.c >> $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< >> >> +nocov-y += hweight.o >> +noubsan-y += hweight.o >>

[PATCH 1/2] xen/displif: Protocol version 2

2020-05-20 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko 1. Change protocol version from string to integer Version string, which is in fact an integer, is hard to handle in the code that supports different protocol versions. To simplify that make the version an integer. 2. Pass buffer offset with XENDISPL_OP_DBUF_CREATE

[PATCH 2/2] libgnttab: Add support for Linux dma-buf offset

2020-05-20 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Add version 2 of the dma-buf ioctls which adds data_ofs parameter. dma-buf is backed by a scatter-gather table and has offset parameter which tells where the actual data starts. Relevant ioctls are extended to support that offset: - when dma-buf is created

[PATCH v3 0/3] x86: XSA-298 follow-up

2020-05-20 Thread Jan Beulich
A few things stumbled across while doing the investigations. 1: relax GDT check in arch_set_info_guest() 2: relax LDT check in arch_set_info_guest() 3: PV: polish pv_set_gdt() Jan

Re: [PATCH] x86/traps: Rework #PF[Rsvd] bit handling

2020-05-20 Thread Jan Beulich
On 19.05.2020 20:00, Andrew Cooper wrote: > On 19/05/2020 17:09, Jan Beulich wrote: >> In any event there would be 12 bits to reclaim from the up >> pointer - it being a physical address, there'll not be more >> than 52 significant bits. > > Right, but for L1TF safety, the address bits in the PTE

[PATCH v3 2/3] x86: relax LDT check in arch_set_info_guest()

2020-05-20 Thread Jan Beulich
It is wrong for us to check the base address when there's no LDT in the first place. Once we don't do this check anymore we can also set the base address to a non-canonical value when the LDT is empty. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné --- v3: Re-base over changes to

[PATCH v3 1/3] x86: relax GDT check in arch_set_info_guest()

2020-05-20 Thread Jan Beulich
It is wrong for us to check frames beyond the guest specified limit (in the compat case another loop bound is already correct). Signed-off-by: Jan Beulich --- v3: Move nr_gdt_frames range check earlier. Avoid |= where not really needed. --- a/xen/arch/x86/domain.c +++

Re: [PATCH] x86: refine guest_mode()

2020-05-20 Thread Jan Beulich
On 18.05.2020 16:51, Roger Pau Monné wrote: > On Tue, Apr 28, 2020 at 08:30:12AM +0200, Jan Beulich wrote: >> On 27.04.2020 22:11, Andrew Cooper wrote: >>> On 27/04/2020 16:15, Jan Beulich wrote: On 27.04.2020 16:35, Andrew Cooper wrote: > On 27/04/2020 09:03, Jan Beulich wrote: >>

[libvirt test] 150268: regressions - FAIL

2020-05-20 Thread osstest service owner
flight 150268 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/150268/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 146182 build-i386-libvirt

[PATCH] tools/libxengnttab: correct size of allocated memory

2020-05-20 Thread Juergen Gross
The size of the memory allocated for the IOCTL_GNTDEV_MAP_GRANT_REF ioctl() parameters is calculated wrong, which results in too much memory allocated. Signed-off-by: Juergen Gross --- tools/libs/gnttab/freebsd.c | 2 +- tools/libs/gnttab/linux.c | 8 +++- 2 files changed, 4

Re: grant table issues mapping a ring order 10

2020-05-20 Thread Jürgen Groß
On 20.05.20 08:00, Jürgen Groß wrote: On 19.05.20 23:21, Stefano Stabellini wrote: Hi Juergen, Boris, I am trying to increase the size of the rings used for Xen 9pfs connections for performance reasons and also to reduce the likehood of the backend having to wait on the frontend to free up

[PATCH 0/2] displif: Protocol version 2

2020-05-20 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Hello all, this series extends the existing displif protocol with new request and adds additional parameter to the exiting one. It also provides support for the new parameter in libgnttab via ioctl. The relevant changes in the backend can be found at [1] and the

Re: [PATCH v6 03/15] x86/mm: rewrite virt_to_xen_l*e

2020-05-20 Thread Jan Beulich
On 24.04.2020 16:08, Hongyan Xia wrote: > @@ -4998,31 +5005,40 @@ static l2_pgentry_t *virt_to_xen_l2e(unsigned long v) > if ( !(l3e_get_flags(*pl3e) & _PAGE_PRESENT) ) > { > bool locking = system_state > SYS_STATE_boot; > -l2_pgentry_t *l2t = alloc_xen_pagetable(); > +

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Roger Pau Monné
On Wed, May 20, 2020 at 10:31:38AM +0200, Jan Beulich wrote: > On 14.05.2020 16:05, Roger Pau Monné wrote: > > On Mon, Jul 15, 2019 at 02:39:04PM +, Jan Beulich wrote: > >> @@ -251,6 +255,10 @@ boot/mkelf32: boot/mkelf32.c > >> efi/mkreloc: efi/mkreloc.c > >>$(HOSTCC) $(HOSTCFLAGS) -g -o

Re: [PATCH v6 06/15] x86_64/mm: introduce pl2e in paging_init

2020-05-20 Thread Jan Beulich
On 24.04.2020 16:08, Hongyan Xia wrote: > From: Wei Liu > > Introduce pl2e so that we can use l2_ro_mpt to point to the page table > itself. > > No functional change. > > Signed-off-by: Wei Liu In principle I'm fine with the change, as a preparatory one for the next patch. The description,

Re: [PATCH v6 07/15] x86_64/mm: switch to new APIs in paging_init

2020-05-20 Thread Jan Beulich
On 24.04.2020 16:08, Hongyan Xia wrote: > @@ -493,22 +494,28 @@ void __init paging_init(void) > if ( !(l4e_get_flags(idle_pg_table[l4_table_offset(va)]) & >_PAGE_PRESENT) ) > { > -l3_pgentry_t *pl3t = alloc_xen_pagetable(); > +l3_pgentry_t

Re: [PATCH v6 15/15] x86/mm: drop _new suffix for page table APIs

2020-05-20 Thread Jan Beulich
On 24.04.2020 16:09, Hongyan Xia wrote: > From: Wei Liu > > No functional change. > > Signed-off-by: Wei Liu > Signed-off-by: Hongyan Xia Acked-by: Jan Beulich

Re: [PATCH v6 13/15] x86/mm: drop old page table APIs

2020-05-20 Thread Jan Beulich
On 24.04.2020 16:09, Hongyan Xia wrote: > --- a/xen/arch/x86/smpboot.c > +++ b/xen/arch/x86/smpboot.c > @@ -815,7 +815,7 @@ static int setup_cpu_root_pgt(unsigned int cpu) > if ( !opt_xpti_hwdom && !opt_xpti_domu ) > return 0; > > -rpt = alloc_xen_pagetable(); > +rpt =

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Jan Beulich
On 20.05.2020 11:31, Roger Pau Monné wrote: > On Wed, May 20, 2020 at 10:31:38AM +0200, Jan Beulich wrote: >> On 14.05.2020 16:05, Roger Pau Monné wrote: >>> On Mon, Jul 15, 2019 at 02:39:04PM +, Jan Beulich wrote: @@ -251,6 +255,10 @@ boot/mkelf32: boot/mkelf32.c efi/mkreloc:

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

2020-05-20 Thread osstest service owner
flight 150274 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/150274/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen e235fa2794c95365519eac714d6ea82f8e64752e baseline version: xen

Re: [PATCH v3 1/3] x86: relax GDT check in arch_set_info_guest()

2020-05-20 Thread Roger Pau Monné
On Wed, May 20, 2020 at 09:53:50AM +0200, Jan Beulich wrote: > It is wrong for us to check frames beyond the guest specified limit > (in the compat case another loop bound is already correct). > > Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Thanks, Roger.

Re: [PATCH v6 08/15] x86_64/mm: switch to new APIs in setup_m2p_table

2020-05-20 Thread Jan Beulich
On 24.04.2020 16:08, Hongyan Xia wrote: > --- a/xen/arch/x86/x86_64/mm.c > +++ b/xen/arch/x86/x86_64/mm.c > @@ -379,13 +379,13 @@ static int setup_m2p_table(struct mem_hotadd_info *info) > { > unsigned long i, va, smap, emap; > unsigned int n; > -l2_pgentry_t *l2_ro_mpt = NULL; >

[PATCH] docs: update xenstore-migration.md

2020-05-20 Thread Juergen Gross
Update connection record details: make flags common for sockets and domains, and add pending incoming data. Signed-off-by: Juergen Gross --- docs/designs/xenstore-migration.md | 63 -- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Roger Pau Monné
On Wed, May 20, 2020 at 12:17:15PM +0200, Jan Beulich wrote: > On 20.05.2020 11:31, Roger Pau Monné wrote: > > On Wed, May 20, 2020 at 10:31:38AM +0200, Jan Beulich wrote: > >> On 14.05.2020 16:05, Roger Pau Monné wrote: > >>> On Mon, Jul 15, 2019 at 02:39:04PM +, Jan Beulich wrote: > @@

[BUG] Consistent LBR/TSX vmentry failure (0x80000022) calling domain_crash() in vmx.c:3324

2020-05-20 Thread Elliot Killick
Hello, Xen is crashing Windows 10 (64-bit) VMs consistently whenever IDA Debugger (https://www.hex-rays.com/products/ida/support/download_freeware/) launches the Local Windows Debugger. The crash occurs when trying to launch the debugger against any executable (e.g. calc.exe) right at the time

RE: [PATCH] docs: update xenstore-migration.md

2020-05-20 Thread Paul Durrant
> -Original Message- > From: Xen-devel On Behalf Of Juergen > Gross > Sent: 20 May 2020 11:16 > To: xen-devel@lists.xenproject.org > Cc: Juergen Gross ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Andrew Cooper > ; Ian Jackson > ; George Dunlap ; Jan > Beulich > Subject:

Re: [PATCH v2] x86: use POPCNT for hweight() when available

2020-05-20 Thread Jan Beulich
On 20.05.2020 12:28, Roger Pau Monné wrote: > On Wed, May 20, 2020 at 12:17:15PM +0200, Jan Beulich wrote: >> On 20.05.2020 11:31, Roger Pau Monné wrote: >>> On Wed, May 20, 2020 at 10:31:38AM +0200, Jan Beulich wrote: On 14.05.2020 16:05, Roger Pau Monné wrote: > On Mon, Jul 15, 2019 at

Re: [BUG] Consistent LBR/TSX vmentry failure (0x80000022) calling domain_crash() in vmx.c:3324

2020-05-20 Thread Andrew Cooper
On 20/05/2020 11:33, Elliot Killick wrote: > Hello, > > Xen is crashing Windows 10 (64-bit) VMs consistently whenever IDA > Debugger > (https://www.hex-rays.com/products/ida/support/download_freeware/) > launches the Local Windows Debugger. The crash occurs when trying to > launch the debugger

Re: iommu=no-igfx

2020-05-20 Thread Jan Beulich
On 11.05.2020 19:43, buy computer wrote: > I've been working on a Windows 10 HVM on a Debian 10 dom0. When I was first > trying to make the VM, I was getting IOMMU errors. I had a hard time > figuring out what to do about this, and finally discovered that putting > iommu=no-igfx in the grub

Re: [PATCH] docs: update xenstore-migration.md

2020-05-20 Thread Julien Grall
On 20/05/2020 11:16, Juergen Gross wrote: Update connection record details: make flags common for sockets and domains, and add pending incoming data. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- docs/designs/xenstore-migration.md | 63 -- 1

  1   2   >