Re: [Xen-devel] [PATCH] xen/arm: p2m: Free the p2m entry after flushing the IOMMU TLBs

2019-10-01 Thread Jürgen Groß
On 02.10.19 04:07, Stefano Stabellini wrote: + Juergen On Mon, 12 Aug 2019, Julien Grall wrote: When freeing a p2m entry, all the sub-tree behind it will also be freed. This may include intermediate page-tables or any l3 entry requiring to drop a reference (e.g for foreign pages). As soon as

Re: [Xen-devel] [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API

2019-10-01 Thread Oleksandr Andrushchenko
On 10/1/19 9:23 PM, Stefano Stabellini wrote: > On Thu, 26 Sep 2019, Rob Herring wrote: >> On Thu, Sep 26, 2019 at 6:16 AM Oleksandr Andrushchenko >> wrote: >>> On 9/26/19 1:46 PM, Robin Murphy wrote: On 2019-09-26 11:17 am, Oleksandr Andrushchenko wrote: > On 9/26/19 12:49 PM, Julien

Re: [Xen-devel] [PATCH] x86/xen: Return from panic notifier

2019-10-01 Thread Jürgen Groß
On 01.10.19 17:16, Boris Ostrovsky wrote: Currently execution of panic() continues until Xen's panic notifier (xen_panic_event()) is called at which point we make a hypercall that never returns. This means that any notifier that is supposed to be called later as well as significant part of

[Xen-devel] [linux-4.19 test] 142087: regressions - trouble: broken/fail/pass

2019-10-01 Thread osstest service owner
flight 142087 linux-4.19 real [real] http://logs.test-lab.xenproject.org/osstest/logs/142087/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-arndale broken test-armhf-armhf-xl-arndale 4

Re: [Xen-devel] [PATCH] xen/arm: p2m: Free the p2m entry after flushing the IOMMU TLBs

2019-10-01 Thread Stefano Stabellini
+ Juergen On Mon, 12 Aug 2019, Julien Grall wrote: > When freeing a p2m entry, all the sub-tree behind it will also be freed. > This may include intermediate page-tables or any l3 entry requiring to > drop a reference (e.g for foreign pages). As soon as pages are freed, > they may be re-used by

Re: [Xen-devel] [PATCH v2 1/1] xen-netfront: do not use ~0U as error return value for xennet_fill_frags()

2019-10-01 Thread David Miller
From: Dongli Zhang Date: Tue, 1 Oct 2019 21:56:41 +0800 > xennet_fill_frags() uses ~0U as return value when the sk_buff is not able > to cache extra fragments. This is incorrect because the return type of > xennet_fill_frags() is RING_IDX and 0x is an expected value for > ring buffer

Re: [Xen-devel] [PATCH V3] arm: xen: mm: use __GPF_DMA32 for arm64

2019-10-01 Thread Stefano Stabellini
On Mon, 16 Sep 2019, Peng Fan wrote: > From: Peng Fan > > arm64 shares some code under arch/arm/xen, including mm.c. > However ZONE_DMA is removed by commit > ad67f5a6545("arm64: replace ZONE_DMA with ZONE_DMA32"). > > So add a check if CONFIG_ZONE_DMA32 is enabled use __GFP_DMA32. > >

Re: [Xen-devel] [PATCH v2 1/4] xen/console: Don't treat NUL character as the end of the buffer

2019-10-01 Thread Stefano Stabellini
On Mon, 5 Aug 2019, Julien Grall wrote: > After upgrading Debian to Buster, I have began to notice console > mangling when using zsh in Dom0. This is happenning because output sent by > zsh to the console may contain NULs in the middle of the buffer. > > The actual implementation of

Re: [Xen-devel] [PATCH v2] xen/arm: domain_build: Print the correct domain in dtb_load()

2019-10-01 Thread Stefano Stabellini
On Thu, 15 Aug 2019, Julien Grall wrote: > dtb_load() can be called by other domain than dom0. To avoid confusion > in the log, print the correct domain. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > Changes in v2: > - Fix the second print in the function

Re: [Xen-devel] [PATCH] xen/arm: domain_build: Remove redundant check in make_vpl011_uart_node()

2019-10-01 Thread Stefano Stabellini
On Thu, 15 Aug 2019, Julien Grall wrote: > None of the code since the last check of res modify the value. So the > check can be removed. > > Coverity-ID: 1476824 > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > xen/arch/arm/domain_build.c | 3 +-- > 1 file changed, 1

Re: [Xen-devel] [PATCH] xen/arm: domain_build: Print the correct domain in construct_domain()

2019-10-01 Thread Stefano Stabellini
On Thu, 15 Aug 2019, Julien Grall wrote: > construct_domain() can be called by other domain than dom0. To avoid > confusion in the log, print the correct domain. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > xen/arch/arm/domain_build.c | 2 +- > 1 file changed, 1

Re: [Xen-devel] [PATCH] xen/arm: domain_build: Print the correct domain in initrd_load()

2019-10-01 Thread Stefano Stabellini
On Thu, 15 Aug 2019, Julien Grall wrote: > initrd_load() can be called by other domain than dom0. To avoid > confusion in the log, print the correct domain. > > Signed-off-by: Julien Grall Thanks the bug was really annoying. Reviewed-by: Stefano Stabellini > --- >

Re: [Xen-devel] [PATCH] xen/arm: domain_build: Don't continue if unable to allocate all dom0 banks

2019-10-01 Thread Stefano Stabellini
On Wed, 21 Aug 2019, Julien Grall wrote: > Xen will only print a warning if there are memory unallocated when using ^ is > 1:1 mapping (only used by dom0). This also includes the case where no > memory has been allocated. > > It will bring to all sort of

Re: [Xen-devel] [PATCH for-4.13 v2 2/2] docs: Replace all instance of ARM by Arm

2019-10-01 Thread Stefano Stabellini
On Tue, 24 Sep 2019, Julien Grall wrote: > The documentation is using a mix of ARM (old) and Arm (new). To stay > consistent, use only the new name. Thank you for the patch, it must have been "not fun" to write this patch. However, let me suggest a radical maybe controversial idea. What about

Re: [Xen-devel] [PATCH for-4.13 v2 1/2] xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate

2019-10-01 Thread Stefano Stabellini
On Tue, 24 Sep 2019, Julien Grall wrote: > Both Cortex-A57 (erratum 1319537) and Cortex-A72 (erratum 1319367) can > end with corrupt TLBs if they speculate an AT instruction while S1/S2 ^ corrupted > system registers in inconsistent state. > > The workaround is the same as for Cortex

Re: [Xen-devel] [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early printk using Kconfig

2019-10-01 Thread Stefano Stabellini
On Tue, 1 Oct 2019, Julien Grall wrote: > Hi Stefano, > > On 10/1/19 8:33 PM, Stefano Stabellini wrote: > > On Fri, 13 Sep 2019, Julien Grall wrote: > > > At the moment, early printk can only be configured on the make command > > > line. It is not very handy because a user has to remove the

Re: [Xen-devel] [PATCH RFC for-4.13 10/10] xen/arm64: entry: Ensure the guest state is synced when receiving a vSError

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Julien Grall wrote: > At the moment, when a SError is received while checking for a pending > one, we will skip the handling the initial exception. > > This includes call to exit_from_guest{, _noirq} that is used to > synchronize part of the guest state with the internal

[Xen-devel] Errors with Loading Xen at a Certain Address

2019-10-01 Thread Brian Woods
Hello, While testing some things out, I found a possible bug in Xen. Xen would successfully run when loaded (from u-boot) at some addresses but not others. I didn't observe this issue in 4.11 stable, so I did a bisect and found that: commit f60658c6ae47e74792e6cc48ea2effac8bb52826 Author:

Re: [Xen-devel] [PATCH RFC for-4.13 03/10] xen/arm: traps: Rework entry/exit from the guest path

2019-10-01 Thread Stefano Stabellini
On Tue, 1 Oct 2019, Julien Grall wrote: > Hi, > > On 01/10/2019 21:12, Stefano Stabellini wrote: > > On Thu, 26 Sep 2019, Julien Grall wrote: > >> At the moment, enter_hypervisor_head() and leave_hypervisor_tail() are > >> used to deal with actions to be done before/after any guest request is >

Re: [Xen-devel] [PATCH v2 00/21] Refine memblock API

2019-10-01 Thread Adam Ford
On Sun, Sep 29, 2019 at 8:33 AM Adam Ford wrote: > > I am attaching two logs. I now the mailing lists will be unhappy, but > don't want to try and spam a bunch of log through the mailing liast. > The two logs show the differences between the working and non-working > imx6q 3D accelerator when

Re: [Xen-devel] [PATCH RFC for-4.13 09/10] xen/arm: asm: Replace use of ALTERNATIVE with alternative_if

2019-10-01 Thread Stefano Stabellini
On Tue, 1 Oct 2019, Julien Grall wrote: > Hi Stefano, > > On 01/10/2019 23:19, Stefano Stabellini wrote: > > On Thu, 26 Sep 2019, Julien Grall wrote: > >> Using alternative_if makes the code a bit more streamlined. > >> > >> Take the opportunity to use the new auto-nop infrastructure to avoid >

Re: [Xen-devel] [PATCH RFC for-4.13 09/10] xen/arm: asm: Replace use of ALTERNATIVE with alternative_if

2019-10-01 Thread Julien Grall
Hi Stefano, On 01/10/2019 23:19, Stefano Stabellini wrote: > On Thu, 26 Sep 2019, Julien Grall wrote: >> Using alternative_if makes the code a bit more streamlined. >> >> Take the opportunity to use the new auto-nop infrastructure to avoid >> counting the number of nop in the else part for

Re: [Xen-devel] I want to participate in Outreachy with CONFIG_PDX related project

2019-10-01 Thread Kateryna Razumova
Hello, I want to make the first contribution for xen. I want to participate with: Introduce CONFIG_PDX and use it in Xen hypervisor Where can I start? I have few years of C programming experience but never had contributed to open-source projects before. On Wed, 25 Sep 2019 at 11:27, Kateryna

Re: [Xen-devel] [PATCH RFC for-4.13 09/10] xen/arm: asm: Replace use of ALTERNATIVE with alternative_if

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Julien Grall wrote: > Using alternative_if makes the code a bit more streamlined. > > Take the opportunity to use the new auto-nop infrastructure to avoid > counting the number of nop in the else part for arch/arm/arm64/entry.S > > Signed-off-by: Julien Grall > > --- >

Re: [Xen-devel] [PATCH RFC for-4.13 08/10] xen/arm: alternative: add auto-nop infrastructure

2019-10-01 Thread Stefano Stabellini
On Fri, 27 Sep 2019, Volodymyr Babchuk wrote: > Julien Grall writes: > > > From: Mark Rutland > > > > In some cases, one side of an alternative sequence is simply a number of > > NOPs used to balance the other side. Keeping track of this manually is > > tedious, and the presence of large chains

Re: [Xen-devel] [PATCH RFC for-4.13 03/10] xen/arm: traps: Rework entry/exit from the guest path

2019-10-01 Thread Julien Grall
Hi, On 01/10/2019 21:12, Stefano Stabellini wrote: > On Thu, 26 Sep 2019, Julien Grall wrote: >> At the moment, enter_hypervisor_head() and leave_hypervisor_tail() are >> used to deal with actions to be done before/after any guest request is >> handled. >> >> While they are meant to work in pair,

Re: [Xen-devel] [PATCH RFC for-4.13 07/10] xen/arm: Allow insn.h to be called from assembly

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Julien Grall wrote: > A follow-up patch will require to include insn.h from assembly code. So > wee need to protect any C-specific definition to avoid compilation ^ we ^ definitions > error when used in assembly code. ^ errors > >

Re: [Xen-devel] [PATCH] xen/typesafe: Force helpers to be always_inline

2019-10-01 Thread Andrew Cooper
On 01/10/2019 09:38, Jan Beulich wrote: > On 30.09.2019 21:16, Andrew Cooper wrote: >> Clang in particular has a habit of out-of-lining these and creating multiple >> local copies of _mfn() and mfn_x(), etc. Override this behaviour. > Is special casing the typesafe helpers then the right

Re: [Xen-devel] [PATCH RFC for-4.13 06/10] xen/arm: Move ARCH_PATCH_INSN_SIZE out of the header livepatch.h

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Julien Grall wrote: > At the moment, ARCH_PATCH_INSN_SIZE is defined in the header > livepatch.h. However, this is also used in the alternative code. > > Rather than including livepatch.h just for using the define, move it in > the header insn.h which seems more suitable. >

Re: [Xen-devel] [PATCH RFC for-4.13 05/10] xen/arm: alternative: Remove unused parameter for alternative_if_not_cap

2019-10-01 Thread Stefano Stabellini
On Fri, 27 Sep 2019, Volodymyr Babchuk wrote: > > Julien Grall writes: > > > The macro alternative_if_not_cap is taking two parameters. The second > > parameter is never used and it is hard to see how this can be used > > correctly as it is only protecting the alternative section magic. > > > >

[Xen-devel] [libvirt test] 142080: tolerable all pass - PUSHED

2019-10-01 Thread osstest service owner
flight 142080 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/142080/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 141931 test-armhf-armhf-libvirt-raw 13

Re: [Xen-devel] [PATCH RFC for-4.13 03/10] xen/arm: traps: Rework entry/exit from the guest path

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Julien Grall wrote: > At the moment, enter_hypervisor_head() and leave_hypervisor_tail() are > used to deal with actions to be done before/after any guest request is > handled. > > While they are meant to work in pair, the former is called for most of > the traps, including

Re: [Xen-devel] [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early printk using Kconfig

2019-10-01 Thread Julien Grall
Hi Stefano, On 10/1/19 8:33 PM, Stefano Stabellini wrote: On Fri, 13 Sep 2019, Julien Grall wrote: At the moment, early printk can only be configured on the make command line. It is not very handy because a user has to remove the option everytime it is using another command other than

Re: [Xen-devel] [PATCH RFC for-4.13 02/10] xen/arm64: head: Check if an SError is pending when receiving a vSError

2019-10-01 Thread Stefano Stabellini
On Fri, 27 Sep 2019, Volodymyr Babchuk wrote: > Julien Grall writes: > > > At the moment, when we receive an SError exception from the guest, we > > don't check if there are any other pending. For hardening the code, we > > should ensure any pending SError are accounted to the guest before > >

Re: [Xen-devel] [PATCH RFC for-4.13 01/10] xen/arm64: entry: Introduce a macro to generate guest vector and use it

2019-10-01 Thread Stefano Stabellini
On Fri, 27 Sep 2019, Volodymyr Babchuk wrote: > > Hello Julien, > > Julien Grall writes: > > > Most of the guest vectors are using the same pattern. This makes fairly > > tedious to alter the pattern and risk introducing mistakes when updating > > each path. > > > > A new macro is introduced to

Re: [Xen-devel] [PATCH for-4.13] x86/crash: force unlock console before printing on kexec crash

2019-10-01 Thread Igor Druzhinin
On 01/10/2019 20:48, Andrew Cooper wrote: > On 01/10/2019 20:15, Igor Druzhinin wrote: >> There is a small window where shootdown NMI might come to a CPU >> (e.g. in serial interrupt handler) where console lock is taken. In order >> not to leave following console prints waiting infinitely for shot

Re: [Xen-devel] [PATCH for-4.13] x86/crash: force unlock console before printing on kexec crash

2019-10-01 Thread Andrew Cooper
On 01/10/2019 20:15, Igor Druzhinin wrote: > There is a small window where shootdown NMI might come to a CPU > (e.g. in serial interrupt handler) where console lock is taken. In order > not to leave following console prints waiting infinitely for shot down > CPUs to free the lock - force unlock

Re: [Xen-devel] [PATCH 2/2] x86emul: adjust MOVSXD source operand handling

2019-10-01 Thread Andrew Cooper
On 19/09/2019 10:31, Jan Beulich wrote: > On 18.09.2019 21:22, Andrew Cooper wrote: >> On 18/09/2019 07:34, Jan Beulich wrote: >>> On 17.09.2019 19:17, Andrew Cooper wrote: On 16/09/2019 10:48, Jan Beulich wrote: > XED commit 1b2fd94425 ("Update MOVSXD to modern behavior") points out

[Xen-devel] [linux-4.4 test] 142067: regressions - FAIL

2019-10-01 Thread osstest service owner
flight 142067 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/142067/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 20 guest-start/debian.repeat fail in 142019 REGR. vs. 139698 Tests

Re: [Xen-devel] [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early printk using Kconfig

2019-10-01 Thread Stefano Stabellini
On Fri, 13 Sep 2019, Julien Grall wrote: > At the moment, early printk can only be configured on the make command > line. It is not very handy because a user has to remove the option > everytime it is using another command other than compiling the > hypervisor. > > Furthermore, early printk is

[Xen-devel] [PATCH for-4.13] x86/crash: force unlock console before printing on kexec crash

2019-10-01 Thread Igor Druzhinin
There is a small window where shootdown NMI might come to a CPU (e.g. in serial interrupt handler) where console lock is taken. In order not to leave following console prints waiting infinitely for shot down CPUs to free the lock - force unlock the console. The race has been frequently observed

Re: [Xen-devel] [PATCH 2/2] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest

2019-10-01 Thread Julien Grall
Hi Oleksandr, On 10/1/19 5:07 PM, Oleksandr wrote: On 01.10.19 18:36, Julien Grall wrote: On 01/10/2019 16:25, Oleksandr wrote: On 01.10.19 18:04, Julien Grall wrote: > 1. Giving the IOMMU to Dom0 is a bad idea. Please to try expand your thoughts in the same e-mail when you say "this is

[Xen-devel] [linux-linus bisection] complete test-amd64-i386-xl-raw

2019-10-01 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-xl-raw testid xen-boot Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git Tree: qemu

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Arnd Bergmann
On Tue, Oct 1, 2019 at 7:38 PM Stefano Stabellini wrote: > Thank you for the patch. HYPERVISOR_platform_op() is an inline function, > the underlying function that should be exported is > HYPERVISOR_platform_op_raw. So, instead of removing > HYPERVISOR_platform_op, we should change it to >

Re: [Xen-devel] [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early printk using Kconfig

2019-10-01 Thread Julien Grall
Hi, On 10/1/19 7:30 PM, Stefano Stabellini wrote: On Mon, 16 Sep 2019, Wei Liu wrote: On Fri, Sep 13, 2019 at 11:39:53AM +0100, Julien Grall wrote: At the moment, early printk can only be configured on the make command line. It is not very handy because a user has to remove the option

[Xen-devel] [xen-unstable test] 142066: regressions - FAIL

2019-10-01 Thread osstest service owner
flight 142066 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/142066/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 141822

Re: [Xen-devel] [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early printk using Kconfig

2019-10-01 Thread Stefano Stabellini
On Mon, 16 Sep 2019, Wei Liu wrote: > On Fri, Sep 13, 2019 at 11:39:53AM +0100, Julien Grall wrote: > > At the moment, early printk can only be configured on the make command > > line. It is not very handy because a user has to remove the option > > everytime it is using another command other than

Re: [Xen-devel] [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Rob Herring wrote: > On Thu, Sep 26, 2019 at 6:16 AM Oleksandr Andrushchenko > wrote: > > > > On 9/26/19 1:46 PM, Robin Murphy wrote: > > > On 2019-09-26 11:17 am, Oleksandr Andrushchenko wrote: > > >> > > >> On 9/26/19 12:49 PM, Julien Grall wrote: > > >>> Hi Rob, > > >>> >

[Xen-devel] [ovmf test] 142070: all pass - PUSHED

2019-10-01 Thread osstest service owner
flight 142070 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/142070/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf ed9db1b91ceba7d3a24743d4d9314c6fbe11c4b3 baseline version: ovmf

Re: [Xen-devel] [PATCH] SUPPORT.md: Describe Renesas IPMMU-VMSA support (Arm)

2019-10-01 Thread Stefano Stabellini
On Thu, 26 Sep 2019, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Renesas IPMMU-VMSA support (Arm) can be considered > as Technological Preview feature. > > Signed-off-by: Oleksandr Tyshchenko Acked-by: Stefano Stabellini > --- > Please note, should only go in after: >

Re: [Xen-devel] [PATCH v3] x86/HVM: p2m_ram_ro is incompatible with device pass-through

2019-10-01 Thread Andrew Cooper
On 01/10/2019 10:07, Jan Beulich wrote: > The write-discard property of the type can't be represented in IOMMU > page table entries. Make sure the respective checks / tracking can't > race, by utilizing the domain lock. The other sides of the sharing/ > paging/log-dirty exclusion checks should

Re: [Xen-devel] [PATCH] xen/efi: Set nonblocking callbacks

2019-10-01 Thread Stefano Stabellini
On Fri, 27 Sep 2019, Ross Lagerwall wrote: > Other parts of the kernel expect these nonblocking EFI callbacks to > exist and crash when running under Xen. Since the implementations of > xen_efi_set_variable() and xen_efi_query_variable_info() do not take any > locks, use them for the nonblocking

Re: [Xen-devel] [PATCH v1 1/3] xen/balloon: Drop __balloon_append()

2019-10-01 Thread Boris Ostrovsky
On 10/1/19 5:01 AM, David Hildenbrand wrote: > Let's simply use balloon_append() directly. > > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Signed-off-by: David Hildenbrand For the series (and your earlier patch) Reviewed-by: Boris Ostrovsky

Re: [Xen-devel] [PATCH v5 5/8] xen/arm: assign devices to boot domains

2019-10-01 Thread Stefano Stabellini
On Tue, 1 Oct 2019, Julien Grall wrote: > Hi Stefano, > > On 01/10/2019 00:24, Stefano Stabellini wrote: > > On Mon, 30 Sep 2019, Julien Grall wrote: > > > Hi Oleksandr, > > > > > > On 30/09/2019 10:34, Oleksandr wrote: > > > > On 28.09.19 02:28, Stefano Stabellini wrote: > > > > > > > I have to

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Stefano Stabellini
On Fri, 6 Sep 2019, Arnd Bergmann wrote: > HYPERVISOR_platform_op() is an inline function and should not > be exported. Since commit 15bfc2348d54 ("modpost: check for > static EXPORT_SYMBOL* functions"), this causes a warning: > > WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static

Re: [Xen-devel] [PATCH] xen/xenbus: fix self-deadlock after killing user process

2019-10-01 Thread Boris Ostrovsky
On 10/1/19 11:03 AM, Juergen Gross wrote: > In case a user process using xenbus has open transactions and is killed > e.g. via ctrl-C the following cleanup of the allocated resources might > result in a deadlock due to trying to end a transaction in the xenbus > worker thread: > > [ 2551.474706]

Re: [Xen-devel] [PATCH v2] libxl: wait for the ack when issuing power control requests

2019-10-01 Thread Anthony PERARD
On Tue, Oct 01, 2019 at 05:22:33PM +0200, Roger Pau Monne wrote: > Currently only suspend power control requests wait for an ack from the > domain, while power off or reboot requests simply write the command to > xenstore and exit. > > Introduce a 1 minute wait for the domain to acknowledge the

Re: [Xen-devel] [PATCH] x86/Kconfig: Invert the defaults for CONFIG_{PVH_GUEST, PV_SHIM}

2019-10-01 Thread Wei Liu
On Tue, Oct 01, 2019 at 05:32:37PM +0100, Andrew Cooper wrote: > This is a minor UI change, but users which have elected to enable > XEN_GUEST (which still defaults to no) will definitely need one of these > options, and will typically want both. > > Signed-off-by: Andrew Cooper Makes sense.

[Xen-devel] [PATCH] x86/Kconfig: Invert the defaults for CONFIG_{PVH_GUEST, PV_SHIM}

2019-10-01 Thread Andrew Cooper
This is a minor UI change, but users which have elected to enable XEN_GUEST (which still defaults to no) will definitely need one of these options, and will typically want both. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Juergen Gross RFC For-4.13 -

Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-10-01 Thread Joe Jin
On 10/1/19 9:01 AM, Roger Pau Monné wrote: > Can you give a try to the patch above? I don't have the hardware to > test any of this ATM, so your help would be appreciated. I'd like to test this patch, but now there is hardware issue, once the my test env is available I'll test it and update you

Re: [Xen-devel] [PATCH v2 1/2] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_ARRAY

2019-10-01 Thread Andrew Cooper
On 01/10/2019 16:58, Jan Beulich wrote: > On 01.10.2019 17:52, Andrew Cooper wrote: >> On 01/10/2019 15:48, Jan Beulich wrote: >>> On 01.10.2019 16:32, Andrew Cooper wrote: There are legitimate circumstance where array hardening is not wanted or needed. Allow it to be turned off.

Re: [Xen-devel] [PATCH 2/2] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest

2019-10-01 Thread Oleksandr
On 01.10.19 18:36, Julien Grall wrote: Hi Oleksandr, Hi Julien On 01/10/2019 16:25, Oleksandr wrote: On 01.10.19 18:04, Julien Grall wrote: Hi, Hi Julien I am reviving the thread. I think we need a patch similar to this one for Xen 4.13. This is because generic are now used by

Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-10-01 Thread Roger Pau Monné
On Thu, Sep 26, 2019 at 01:33:42PM -0700, Joe Jin wrote: > On 9/24/19 8:42 AM, Roger Pau Monné wrote: > > On Fri, Sep 13, 2019 at 09:50:34AM -0700, Joe Jin wrote: > >> On 9/13/19 3:33 AM, Roger Pau Monné wrote: > >>> On Thu, Sep 12, 2019 at 11:03:14AM -0700, Joe Jin wrote: > With below

Re: [Xen-devel] [PATCH v2 1/2] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_ARRAY

2019-10-01 Thread Jan Beulich
On 01.10.2019 17:52, Andrew Cooper wrote: > On 01/10/2019 15:48, Jan Beulich wrote: >> On 01.10.2019 16:32, Andrew Cooper wrote: >>> There are legitimate circumstance where array hardening is not wanted or >>> needed. Allow it to be turned off. >>> >>> Signed-off-by: Andrew Cooper >>

Re: [Xen-devel] [PATCH v2 1/2] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_ARRAY

2019-10-01 Thread Andrew Cooper
On 01/10/2019 15:48, Jan Beulich wrote: > On 01.10.2019 16:32, Andrew Cooper wrote: >> There are legitimate circumstance where array hardening is not wanted or >> needed. Allow it to be turned off. >> >> Signed-off-by: Andrew Cooper > Reviewed-by: Jan Beulich > with one more question (I'm

Re: [Xen-devel] [PATCH for-4.13 2/2] xen/nospec: Introduce CONFIG_SPECULATIVE_BRANCH_HARDEN and disable it

2019-10-01 Thread Andrew Cooper
On 01/10/2019 15:32, Jan Beulich wrote: > On 01.10.2019 14:51, Andrew Cooper wrote: >> On 01/10/2019 13:21, Jan Beulich wrote: >>> On 30.09.2019 20:24, Andrew Cooper wrote: The code generation for barrier_nospec_true() is not correct. We are taking a perf it from the added fences,

Re: [Xen-devel] [PATCH 2/2] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest

2019-10-01 Thread Julien Grall
Hi Oleksandr, On 01/10/2019 16:25, Oleksandr wrote: On 01.10.19 18:04, Julien Grall wrote: Hi, Hi Julien I am reviving the thread. I think we need a patch similar to this one for Xen 4.13. This is because generic are now used by Xen so they should be hidden from the hardware domain.

Re: [Xen-devel] [PATCH v2 39/55] x86: switch root_pgt to mfn_t and use new APIs

2019-10-01 Thread Hongyan Xia
On 01/10/2019 16:20, Wei Liu wrote: On Tue, Oct 01, 2019 at 02:54:19PM +0100, Hongyan Xia wrote: On 30/09/2019 11:33, Hongyan Xia wrote: From: Wei Liu This then requires moving declaration of root page table mfn into mm.h and modify setup_cpu_root_pgt to have a single exit path. We also

Re: [Xen-devel] [PATCH v2] libxl: wait for the ack when issuing power control requests

2019-10-01 Thread Roger Pau Monné
On Tue, Oct 01, 2019 at 05:22:33PM +0200, Roger Pau Monne wrote: > +int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid, > +const libxl_asyncop_how *ao_how) > { > -GC_INIT(ctx); > +AO_CREATE(ctx, domid, ao_how); > +libxl__xswait_state *pvcontrol; > int

Re: [Xen-devel] [PATCH 2/2] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest

2019-10-01 Thread Oleksandr
On 01.10.19 18:04, Julien Grall wrote: Hi, Hi Julien I am reviving the thread. I think we need a patch similar to this one for Xen 4.13. This is because generic are now used by Xen so they should be hidden from the hardware domain. Andrii, Oleksandr, can one of you look at it? I

[Xen-devel] [PATCH v2] libxl: wait for the ack when issuing power control requests

2019-10-01 Thread Roger Pau Monne
Currently only suspend power control requests wait for an ack from the domain, while power off or reboot requests simply write the command to xenstore and exit. Introduce a 1 minute wait for the domain to acknowledge the request, or else return an error. The suspend code is slightly modified to

Re: [Xen-devel] [PATCH v2 39/55] x86: switch root_pgt to mfn_t and use new APIs

2019-10-01 Thread Wei Liu
On Tue, Oct 01, 2019 at 02:54:19PM +0100, Hongyan Xia wrote: > On 30/09/2019 11:33, Hongyan Xia wrote: > > From: Wei Liu > > > > This then requires moving declaration of root page table mfn into mm.h > > and modify setup_cpu_root_pgt to have a single exit path. > > > > We also need to force

[Xen-devel] [PATCH] x86/xen: Return from panic notifier

2019-10-01 Thread Boris Ostrovsky
Currently execution of panic() continues until Xen's panic notifier (xen_panic_event()) is called at which point we make a hypercall that never returns. This means that any notifier that is supposed to be called later as well as significant part of panic() code (such as pstore writes from

Re: [Xen-devel] [PATCH for-4.13] xen/arm: boot with device trees with "mmu-masters" and "iommus"

2019-10-01 Thread Oleksandr
On 30.09.19 23:56, Stefano Stabellini wrote: Hi Stefano Some Device Trees may expose both legacy SMMU and generic IOMMU bindings together. However, the SMMU driver in Xen is only supporting the legacy SMMU bindings, leading to fatal initialization errors at boot time. This patch fixes the

[Xen-devel] [PATCH-for-4.13 v2] x86/mm: don't needlessly veto migration

2019-10-01 Thread Paul Durrant
Now that xl.cfg has an option to explicitly enable IOMMU mappings for a domain, migration may be needlessly vetoed due to the check of is_iommu_enabled() in paging_log_dirty_enable(). There is actually no need to prevent logdirty from being enabled unless devices are assigned to a domain and that

Re: [Xen-devel] [PATCH] libxl: wait for the ack when issuing power control requests

2019-10-01 Thread Roger Pau Monné
On Tue, Oct 01, 2019 at 12:44:38PM +0100, Anthony PERARD wrote: > On Tue, Oct 01, 2019 at 12:12:59PM +0200, Roger Pau Monne wrote: > > -return libxl__xs_printf(gc, t, shutdown_path, "%s", cmd); > > +rc = libxl__xs_printf(gc, XBT_NULL, shutdown_path, "%s", cmd); > > +if (rc) > > +

Re: [Xen-devel] [PATCH-for-4.13 v2 0/2] libxl: fix assertion failure

2019-10-01 Thread Jürgen Groß
On 01.10.19 16:57, Paul Durrant wrote: This was originally a single patch, which is now patch #2 of this series. Paul Durrant (2): libxl: replace 'enabled' with 'unknown' in libxl_passthrough enumeration libxl: choose an appropriate default for passthrough...

Re: [Xen-devel] [PATCH 2/2] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest

2019-10-01 Thread Julien Grall
Hi, I am reviving the thread. I think we need a patch similar to this one for Xen 4.13. This is because generic are now used by Xen so they should be hidden from the hardware domain. Andrii, Oleksandr, can one of you look at it? Cheers, On 21/01/2019 17:04, Andrii Anisov wrote: From:

[Xen-devel] [PATCH] xen/xenbus: fix self-deadlock after killing user process

2019-10-01 Thread Juergen Gross
In case a user process using xenbus has open transactions and is killed e.g. via ctrl-C the following cleanup of the allocated resources might result in a deadlock due to trying to end a transaction in the xenbus worker thread: [ 2551.474706] INFO: task xenbus:37 blocked for more than 120

[Xen-devel] [PATCH-for-4.13 v2 0/2] libxl: fix assertion failure

2019-10-01 Thread Paul Durrant
This was originally a single patch, which is now patch #2 of this series. Paul Durrant (2): libxl: replace 'enabled' with 'unknown' in libxl_passthrough enumeration libxl: choose an appropriate default for passthrough... tools/libxl/libxl_create.c | 10 +++---

[Xen-devel] [PATCH-for-4.13 v2 2/2] libxl: choose an appropriate default for passthrough...

2019-10-01 Thread Paul Durrant
...if there is no IOMMU or it is globally disabled. Without this patch, the following assertion may be hit: xl: libxl_create.c:589: libxl__domain_make: Assertion `info->passthrough != LIBXL_PASSTHROUGH_UNKNOWN' failed. This is because libxl__domain_create_info_setdefault() currently only sets

[Xen-devel] [PATCH-for-4.13 v2 1/2] libxl: replace 'enabled' with 'unknown' in libxl_passthrough enumeration

2019-10-01 Thread Paul Durrant
This is mostly a cosmetic patch to avoid the default enumeration value being 'enabled'. The only non-cosmetic parts are in xl_parse.c where it now becomes necessary to explicitly parse the 'enabled' value for xl.cfg 'passthrough' option, and error on the value 'unknown', because there is no longer

Re: [Xen-devel] [PATCH v2 1/2] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_ARRAY

2019-10-01 Thread Jan Beulich
On 01.10.2019 16:32, Andrew Cooper wrote: > There are legitimate circumstance where array hardening is not wanted or > needed. Allow it to be turned off. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich with one more question (I'm sorry, I meant to ask on v1 but then forgot): > ---

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Mark Rutland
On Tue, Oct 01, 2019 at 03:39:41PM +0100, Julien Grall wrote: > On 01/10/2019 15:33, Mark Rutland wrote: > > On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote: > > > On 9/6/19 6:20 PM, Andrew Cooper wrote: > > > > On 06/09/2019 17:00, Arnd Bergmann wrote: > > > > > On Fri, Sep 6, 2019

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Julien Grall
On 01/10/2019 15:33, Mark Rutland wrote: Hi Julien, Hi Mark, On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote: On 9/6/19 6:20 PM, Andrew Cooper wrote: On 06/09/2019 17:00, Arnd Bergmann wrote: On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper wrote: On 06/09/2019 16:39, Arnd

Re: [Xen-devel] [PATCH v2 1/1] xen-netfront: do not use ~0U as error return value for xennet_fill_frags()

2019-10-01 Thread Jürgen Groß
On 01.10.19 15:56, Dongli Zhang wrote: xennet_fill_frags() uses ~0U as return value when the sk_buff is not able to cache extra fragments. This is incorrect because the return type of xennet_fill_frags() is RING_IDX and 0x is an expected value for ring buffer index. In the situation

Re: [Xen-devel] [PATCH v3] x86/HVM: p2m_ram_ro is incompatible with device pass-through

2019-10-01 Thread Jan Beulich
On 01.10.2019 16:15, Roger Pau Monné wrote: > On Tue, Oct 01, 2019 at 01:40:57PM +0200, Jan Beulich wrote: >> On 01.10.2019 13:30, Roger Pau Monné wrote: >>> On Tue, Oct 01, 2019 at 11:07:55AM +0200, Jan Beulich wrote: --- a/xen/drivers/passthrough/pci.c +++

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Mark Rutland
Hi Julien, On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote: > On 9/6/19 6:20 PM, Andrew Cooper wrote: > > On 06/09/2019 17:00, Arnd Bergmann wrote: > > > On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper > > > wrote: > > > > On 06/09/2019 16:39, Arnd Bergmann wrote: > > > > >

Re: [Xen-devel] [PATCH-for-4.13] x86/mm: don't needlessly veto migration

2019-10-01 Thread Paul Durrant
On Tue, 1 Oct 2019 at 15:24, Jan Beulich wrote: > > On 01.10.2019 15:29, Paul Durrant wrote: > > The changes in XAPI are not vast; the main complexity is in the device > > emulator (to provide information during the live phase of migration) > > but I still don't see why Citrix's choice of closed

[Xen-devel] [PATCH for-4.13 v2 0/2] xen/nospec: Add Kconfig options for speculative hardening

2019-10-01 Thread Andrew Cooper
The main purpose is patch 2. The "l1tf-barrier" work currently causes a perf hit and gains no safety, and is therefore unfit for inclusion into Xen 4.13 at this time. See individual patches for changes from v1. Andrew Cooper (2): xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_ARRAY

Re: [Xen-devel] [PATCH for-4.13 2/2] xen/nospec: Introduce CONFIG_SPECULATIVE_BRANCH_HARDEN and disable it

2019-10-01 Thread Jan Beulich
On 01.10.2019 14:51, Andrew Cooper wrote: > On 01/10/2019 13:21, Jan Beulich wrote: >> On 30.09.2019 20:24, Andrew Cooper wrote: >>> The code generation for barrier_nospec_true() is not correct. We are >>> taking a >>> perf it from the added fences, but not gaining any speculative safety. >> You

[Xen-devel] [linux-linus test] 142051: regressions - FAIL

2019-10-01 Thread osstest service owner
flight 142051 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/142051/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm 7 xen-boot fail REGR. vs. 133580

[Xen-devel] [PATCH v2 2/2] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_BRANCH and disable it

2019-10-01 Thread Andrew Cooper
The code generation for barrier_nospec_true() is not correct; the lfence instructions are generally too early in the instruction stream, resulting in a performance hit but no additional speculative safety. This is caused by inline assembly trying to fight the compiler optimiser, and the optimiser

[Xen-devel] [PATCH v2 1/2] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_ARRAY

2019-10-01 Thread Andrew Cooper
There are legitimate circumstance where array hardening is not wanted or needed. Allow it to be turned off. Signed-off-by: Andrew Cooper Release-acked-by: Juergen Gross --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Juergen Gross v2: * Rename to CONFIG_SPECULATIVE_HARDEN_ARRAY

Re: [Xen-devel] [PATCH-for-4.13] x86/mm: don't needlessly veto migration

2019-10-01 Thread Jan Beulich
On 01.10.2019 15:29, Paul Durrant wrote: > The changes in XAPI are not vast; the main complexity is in the device > emulator (to provide information during the live phase of migration) > but I still don't see why Citrix's choice of closed vs. open source > implementation of the emulator really has

Re: [Xen-devel] [PATCH v3] x86/HVM: p2m_ram_ro is incompatible with device pass-through

2019-10-01 Thread Roger Pau Monné
On Tue, Oct 01, 2019 at 01:40:57PM +0200, Jan Beulich wrote: > On 01.10.2019 13:30, Roger Pau Monné wrote: > > On Tue, Oct 01, 2019 at 11:07:55AM +0200, Jan Beulich wrote: > >> --- a/xen/arch/x86/hvm/dm.c > >> +++ b/xen/arch/x86/hvm/dm.c > >> @@ -255,16 +255,33 @@ static int set_mem_type(struct

[Xen-devel] [qemu-mainline test] 142062: regressions - FAIL

2019-10-01 Thread osstest service owner
flight 142062 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/142062/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-i386 11 guest-startfail REGR. vs. 140282

[Xen-devel] [PATCH v2 1/1] xen-netfront: do not use ~0U as error return value for xennet_fill_frags()

2019-10-01 Thread Dongli Zhang
xennet_fill_frags() uses ~0U as return value when the sk_buff is not able to cache extra fragments. This is incorrect because the return type of xennet_fill_frags() is RING_IDX and 0x is an expected value for ring buffer index. In the situation when the rsp_cons is approaching 0x,

Re: [Xen-devel] [PATCH v2 39/55] x86: switch root_pgt to mfn_t and use new APIs

2019-10-01 Thread Hongyan Xia
On 30/09/2019 11:33, Hongyan Xia wrote: From: Wei Liu This then requires moving declaration of root page table mfn into mm.h and modify setup_cpu_root_pgt to have a single exit path. We also need to force map_domain_page to use direct map when switching per-domain mappings. This is contrary

Re: [Xen-devel] [PATCH v2 22/55] x86_64/mm: switch to new APIs in paging_init

2019-10-01 Thread Hongyan Xia
On 01/10/2019 12:51, Wei Liu wrote: On Mon, Sep 30, 2019 at 11:33:14AM +0100, Hongyan Xia wrote: From: Wei Liu Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia --- Changed since v1: * use a global mapping for compat_idle_pg_table_l2, otherwise l2_ro_mpt will unmap it. Hmmm... I

  1   2   >