[Xen-devel] [PATCH v4 4/6] xen/rcu: fix rcu_lock_domain()

2020-03-10 Thread Juergen Gross
rcu_lock_domain() misuses the domain structure as rcu lock, which is working only as long as rcu_read_lock() isn't evaluating the lock. Fix that by adding a rcu lock to struct domain and use that for rcu_lock_domain(). Signed-off-by: Juergen Gross --- xen/common/domain.c| 1 + xen/inclu

[Xen-devel] [PATCH v4 5/6] xen/rcu: add assertions to debug build

2020-03-10 Thread Juergen Gross
Xen's RCU implementation relies on no softirq handling taking place while being in a RCU critical section. Add ASSERT()s in debug builds in order to catch any violations. For that purpose modify rcu_read_[un]lock() to use a dedicated percpu counter instead of preempt_[en|dis]able() as this enables

[Xen-devel] [PATCH v4 2/6] xen/rcu: don't use stop_machine_run() for rcu_barrier()

2020-03-10 Thread Juergen Gross
Today rcu_barrier() is calling stop_machine_run() to synchronize all physical cpus in order to ensure all pending rcu calls have finished when returning. As stop_machine_run() is using tasklets this requires scheduling of idle vcpus on all cpus imposing the need to call rcu_barrier() on idle cpus

[Xen-devel] [PATCH v4 0/6] xen/rcu: let rcu work better with core scheduling

2020-03-10 Thread Juergen Gross
Today the RCU handling in Xen is affecting scheduling in several ways. It is raising sched softirqs without any real need and it requires tasklets for rcu_barrier(), which interacts badly with core scheduling. This small series repairs those issues. Additionally some ASSERT()s are added for verif

[Xen-devel] [PATCH v4 6/6] xen/rcu: add per-lock counter in debug builds

2020-03-10 Thread Juergen Gross
Add a lock specific counter to rcu read locks in debug builds. This allows to test for matching lock/unlock calls. Signed-off-by: Juergen Gross --- xen/include/xen/rcupdate.h | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/xen/incl

[Xen-devel] [PATCH v4 1/6] xen/rcu: use rcu softirq for forcing quiescent state

2020-03-10 Thread Juergen Gross
As rcu callbacks are processed in __do_softirq() there is no need to use the scheduling softirq for forcing quiescent state. Any other softirq would do the job and the scheduling one is the most expensive. So use the already existing rcu softirq for that purpose. For telling apart why the rcu soft

[Xen-devel] [PATCH v4 3/6] xen: add process_pending_softirqs_norcu() for keyhandlers

2020-03-10 Thread Juergen Gross
Some keyhandlers are calling process_pending_softirqs() while holding a rcu_read_lock(). This is wrong, as process_pending_softirqs() might activate rcu calls which should not happen inside a rcu_read_lock(). For that purpose add process_pending_softirqs_norcu() which will not do any rcu activity

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

2020-03-10 Thread osstest service owner
flight 148288 linux-4.19 real [real] http://logs.test-lab.xenproject.org/osstest/logs/148288/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 broken test-amd64-amd64-xl-multivcpu

Re: [Xen-devel] [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Vladimir Sementsov-Ogievskiy
09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does co

[Xen-devel] [PATCH v3] xen/sched: fix cpu offlining with core scheduling

2020-03-10 Thread Juergen Gross
Offlining a cpu with core scheduling active can result in a hanging system. Reason is the scheduling resource and unit of the to be removed cpus needs to be split in order to remove the cpu from its cpupool and move it to the idle scheduler. In case one of the involved cpus happens to have received

Re: [Xen-devel] [PATCH] xen/sched: fix onlining cpu with core scheduling active

2020-03-10 Thread Jürgen Groß
On 03.03.20 17:04, Jürgen Groß wrote: On 03.03.20 14:31, Jan Beulich wrote: On 03.03.2020 13:27, Juergen Gross wrote: --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -616,7 +616,8 @@ static int cpupool_cpu_add(unsigned int cpu)   get_sched_res(cpu)->cpupool = NULL;

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 11:09 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; Paul Durrant ; > Kevin Tian > > Subject: [PATCH v3] IOMMU: make DMA containment of quarantined devices > optional > > Containing still in flight DMA was intro

[Xen-devel] [PATCH v2] xen/sched: fix onlining cpu with core scheduling active

2020-03-10 Thread Juergen Gross
When onlining a cpu cpupool_cpu_add() checks whether all siblings of the new cpu are free in order to decide whether to add it to cpupool0. In case the added cpu is not the last sibling to be onlined this test is wrong as it only checks for all online siblings to be free. The test should include th

Re: [Xen-devel] [PATCH v2 2/5] IOMMU: iommu_intpost is x86/HVM-only

2020-03-10 Thread Jan Beulich
On 10.03.2020 02:13, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Monday, March 9, 2020 6:43 PM >> >> --- a/xen/drivers/passthrough/x86/iommu.c >> +++ b/xen/drivers/passthrough/x86/iommu.c >> @@ -29,6 +29,16 @@ struct iommu_ops __read_mostly iommu_ops >> >> enum iommu_intremap __read_mostly i

Re: [Xen-devel] [PATCH] xen/sched: fix onlining cpu with core scheduling active

2020-03-10 Thread Jan Beulich
On 10.03.2020 09:16, Jürgen Groß wrote: > On 03.03.20 17:04, Jürgen Groß wrote: >> On 03.03.20 14:31, Jan Beulich wrote: >>> On 03.03.2020 13:27, Juergen Gross wrote: --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -616,7 +616,8 @@ static int cpupool_cpu_add(unsi

Re: [Xen-devel] [PATCH v5 2/4] x86/HVM: implement memory read caching for insn emulation

2020-03-10 Thread Jan Beulich
On 10.03.2020 03:39, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Tuesday, March 3, 2020 6:17 PM >> >> Emulation requiring device model assistance uses a form of instruction >> re-execution, assuming that the second (and any further) pass takes >> exactly the same path. This is a valid assumpt

Re: [Xen-devel] [PATCH v4 1/3] x86/hypervisor: pass flags to hypervisor_flush_tlb

2020-03-10 Thread Jan Beulich
On 09.03.2020 18:25, Wei Liu wrote: > On Mon, Mar 09, 2020 at 05:38:12PM +0100, Jan Beulich wrote: >> On 19.02.2020 12:44, Wei Liu wrote: >>> --- a/xen/include/asm-x86/flushtlb.h >>> +++ b/xen/include/asm-x86/flushtlb.h >>> @@ -123,6 +123,9 @@ void switch_cr3_cr4(unsigned long cr3, unsigned long >

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Jan Beulich
On 10.03.2020 09:58, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 09 March 2020 11:09 >> >> @@ -1276,11 +1276,15 @@ boolean (e.g. `iommu=no`) can override t >> will prevent Xen from booting if IOMMUs aren't discovered and enabled >> successfully. >> >>

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Jan Beulich
On 10.03.2020 04:43, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Monday, March 9, 2020 7:09 PM >> >> I'm happy to take better suggestions to replace the "full" command line >> option and Kconfig prompt tokens. I don't think though that "fault" and >> "write-fault" are really suitable there. >

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Jan Beulich
On 10.03.2020 06:30, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Monday, March 9, 2020 7:09 PM >> >> Containing still in flight DMA was introduced to work around certain >> devices / systems hanging hard upon hitting a "not-present" IOMMU fault. >> Passing through (such) devices (on such syst

[Xen-devel] [linux-4.14 test] 148294: regressions - trouble: broken/fail/pass

2020-03-10 Thread osstest service owner
flight 148294 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/148294/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-multivcpu broken test-amd64-amd64-libvirt-qemuu-debianhvm-a

Re: [Xen-devel] [PATCH v2 1/5] IOMMU: iommu_intremap is x86-only

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 10:43 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Konrad Wilk > ; George Dunlap > ; Andrew Cooper ; Ian > Jackson > ; Paul Durrant > Subject: [PATCH v2 1/5] IOMM

Re: [Xen-devel] [PATCH v2 3/5] IOMMU: iommu_igfx is x86-only

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 10:44 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Konrad Wilk > ; George Dunlap > ; Andrew Cooper ; Ian > Jackson > ; Paul Durrant > Subject: [PATCH v2 3/5] IOMM

Re: [Xen-devel] [PATCH v2 4/5] IOMMU: iommu_qinval is x86-only

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 10:44 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Konrad Wilk > ; George Dunlap > ; Andrew Cooper ; Ian > Jackson > ; Paul Durrant > Subject: [PATCH v2 4/5] IOMM

Re: [Xen-devel] [PATCH v2 5/5] IOMMU: iommu_snoop is x86-only

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 10:45 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Konrad Wilk > ; George Dunlap > ; Andrew Cooper ; Ian > Jackson > ; Paul Durrant > Subject: [PATCH v2 5/5] IOMM

Re: [Xen-devel] [PATCH v2 2/5] IOMMU: iommu_intpost is x86/HVM-only

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 10:43 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Konrad Wilk > ; George Dunlap > ; Andrew Cooper ; Ian > Jackson > ; Paul Durrant > Subject: [PATCH v2 2/5] IOMM

Re: [Xen-devel] [PATCH v2 2/5] IOMMU: iommu_intpost is x86/HVM-only

2020-03-10 Thread Jan Beulich
On 10.03.2020 11:54, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 09 March 2020 10:43 >> >> @@ -486,8 +480,10 @@ int __init iommu_setup(void) >> panic("Couldn't enable %s and iommu=required/force\n", >>!iommu_enabled ? "IOMMU" : "Interrup

Re: [Xen-devel] [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread Jan Beulich
On 09.03.2020 18:47, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 09 March 2020 16:29 >> >> On 06.03.2020 17:02, p...@xen.org wrote: >>> --- a/xen/arch/x86/irq.c >>> +++ b/xen/arch/x86/irq.c >>> @@ -1680,9 +1680,23 @@ static irq_guest_action_t *__pirq_guest_unbin

[Xen-devel] [OSSTEST PATCH 2/3] ts-memdisk-try-append: Notice when job arch retrieval fails

2020-03-10 Thread Ian Jackson
We currently have a bug where this fails, producing this output: + arch= + case "$arch" in + echo 'Arch not supported for memdisk tests' Arch not supported for memdisk tests + exit 0 It should fail in this case. CC: Roger Pau Monné Signed-off-by: Ian Jackson --- ts-memdisk-try-append | 4 ++

[Xen-devel] [OSSTEST PATCH 1/3] ts-memdisk-try-append: Add missing -I

2020-03-10 Thread Ian Jackson
This only worked in production by accident (most of the production stuff edits PERLLIB earlier in the invocation sequence). CC: Roger Pau Monné Signed-off-by: Ian Jackson --- ts-memdisk-try-append | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-memdisk-try-append b/ts-mem

[Xen-devel] [OSSTEST PATCH 3/3] ts-memdisk-try-append: Call selecthost

2020-03-10 Thread Ian Jackson
In 7f49abaa0ff91d6dc1592ea80f10211c52fb03c4 arch replumbing: Replace many $r{arch} with $[g]ho->{Arch} I accidentally broke this, by not spotting that the perl fragment did not call selecthost and has no $ho. Fix this as follows: * Pass all of the -try-append arguments to the perl rune. * In

Re: [Xen-devel] [OSSTEST PATCH 1/3] ts-memdisk-try-append: Add missing -I

2020-03-10 Thread Roger Pau Monné
On Tue, Mar 10, 2020 at 12:08:00PM +, Ian Jackson wrote: > This only worked in production by accident (most of the production > stuff edits PERLLIB earlier in the invocation sequence). > > CC: Roger Pau Monné > Signed-off-by: Ian Jackson Thanks! All patches LGTM, feel free to add my Acked-b

Re: [Xen-devel] [PATCH v2 2/5] IOMMU: iommu_intpost is x86/HVM-only

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 11:02 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; 'Kevin Tian' ; > 'Stefano Stabellini' > ; 'Julien Grall' ; 'Wei Liu' > ; 'Konrad Wilk' > ; 'George Dunlap' ; > 'Andrew Cooper' > ; 'Ian Jackson' > Subject: Re:

Re: [Xen-devel] [PATCH] xen/xenbus: remove unused xenbus_map_ring()

2020-03-10 Thread Boris Ostrovsky
On 3/9/20 11:54 AM, Juergen Gross wrote: > xenbus_map_ring() is used nowhere in the tree, remove it. > xenbus_unmap_ring() is used only locally, so make it static and move it > up. > > Signed-off-by: Juergen Gross > Reviewed-by: Boris Ostrovsky Applied to for-linus-5.6b

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 10:27 > To: Tian, Kevin ; Paul Durrant > Cc: xen-devel@lists.xenproject.org; Andrew Cooper > Subject: Re: [PATCH v3] IOMMU: make DMA containment of quarantined devices > optional > > On 10.03.2020 04:43, Tian, Kevin wrote:

Re: [Xen-devel] [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 11:23 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; 'Varad Gautam' ; 'Julien > Grall' ; > 'Roger Pau Monné' ; 'Andrew Cooper' > > Subject: Re: [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for > shared

[Xen-devel] [PATCH v5] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread paul
From: Varad Gautam XEN_DOMCTL_destroydomain creates a continuation if domain_kill -ERESTARTS. In that scenario, it is possible to receive multiple __pirq_guest_unbind calls for the same pirq from domain_kill, if the pirq has not yet been removed from the domain's pirq_tree, as: domain_kill()

[Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Jason Andryuk
Replace the perl locking check with stat(1). Stat is able to fstat stdin (file descriptor 0) when passed '-' as an argument. This is now used to check $_lockfd. stat(1) support for '-' was introduced to coreutils in 2009. After A releases its lock, script B will return from flock and execute st

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 13:04 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; Paul Durrant ; > Andrew Cooper > ; Wei Liu ; Roger Pau Monné > > Subject: Re: [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM > > On 09.03.2020 11:

Re: [Xen-devel] [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread Jan Beulich
On 10.03.2020 13:36, Paul Durrant wrote: > Ok, I'll convert back to a BUG(). Wait a little - I think I have an alternative proposal. Just want to at least smoke test it before sending out. Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org h

Re: [Xen-devel] [PATCH v4 1/3] x86/hypervisor: pass flags to hypervisor_flush_tlb

2020-03-10 Thread Wei Liu
On Tue, Mar 10, 2020 at 10:58:09AM +0100, Jan Beulich wrote: > On 09.03.2020 18:25, Wei Liu wrote: > > On Mon, Mar 09, 2020 at 05:38:12PM +0100, Jan Beulich wrote: > >> On 19.02.2020 12:44, Wei Liu wrote: > >>> --- a/xen/include/asm-x86/flushtlb.h > >>> +++ b/xen/include/asm-x86/flushtlb.h > >>> @@

[Xen-devel] [PATCH OSSTEST v2 2/2] make-flight: add dom0 PVH test

2020-03-10 Thread Roger Pau Monne
Add a dom0 PVH test, the test to be run is launching a PV guest (test-debian). Note the PVH dom0 tests are only enabled for Xen >= 4.13. The runvar difference is: +test-amd64-amd64-dom0pvh-xl-amd all_host_di_version 2020-02-10 +test-amd64-amd64-dom0pvh-xl-intel all_host_di_version 2020-02-10 +t

Re: [Xen-devel] [PATCH v2 2/5] IOMMU: iommu_intpost is x86/HVM-only

2020-03-10 Thread Jan Beulich
On 10.03.2020 13:20, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 10 March 2020 11:02 >> To: p...@xen.org >> Cc: xen-devel@lists.xenproject.org; 'Kevin Tian' ; >> 'Stefano Stabellini' >> ; 'Julien Grall' ; 'Wei Liu' >> ; 'Konrad Wilk' >> ; 'George Dunlap' ; >>

[Xen-devel] [PATCH OSSTEST v2 1/2] examine: detect IOMMU availability and add it as a hostflag

2020-03-10 Thread Roger Pau Monne
Introduce a new test to check for iommu availability and add it as a hostflag if found. Signed-off-by: Roger Pau Monné --- Osstest/HostDB/Executive.pm | 19 +++ Osstest/HostDB/Static.pm| 6 ++ Osstest/TestSupport.pm | 16 ++-- sg-run-job

Re: [Xen-devel] [PATCH v5] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread Jan Beulich
On 10.03.2020 13:43, p...@xen.org wrote: > v5: > - BUG_ON(!shareable) rather than ASSERT(shareable) > - Drop ASSERT on nr_guests Why drop, rather than move ... > --- a/xen/arch/x86/irq.c > +++ b/xen/arch/x86/irq.c > @@ -1680,9 +1680,22 @@ static irq_guest_action_t *__pirq_guest_unbind( > >

Re: [Xen-devel] [PATCH v5] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 13:57 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; Varad Gautam ; Julien > Grall ; Roger > Pau Monné ; Andrew Cooper > Subject: Re: [PATCH v5] x86: irq: Do not BUG_ON multiple unbind calls for > shared pirqs > >

Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Wei Liu
On Tue, Mar 10, 2020 at 09:29:04AM -0400, Jason Andryuk wrote: > Replace the perl locking check with stat(1). Stat is able to fstat > stdin (file descriptor 0) when passed '-' as an argument. This is now > used to check $_lockfd. stat(1) support for '-' was introduced to > coreutils in 2009. >

Re: [Xen-devel] [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-03-10 Thread Jan Beulich
On 09.03.2020 18:47, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 09 March 2020 16:29 >> To: p...@xen.org >> Cc: xen-devel@lists.xenproject.org; Varad Gautam ; Julien >> Grall ; Roger >> Pau Monné ; Andrew Cooper >> Subject: Re: [PATCH v4] x86: irq: Do not BUG_

[Xen-devel] [PATCH v2] memaccess: reduce include dependencies

2020-03-10 Thread Jan Beulich
The common header doesn't itself need to include public/vm_event.h nor public/memory.h. Drop their inclusion. This requires using the non- typedef names in two prototypes and an inline function; by not changing the callers and function definitions at the same time it'll remain certain that the buil

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Jan Beulich
On 10.03.2020 14:32, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 09 March 2020 13:04 >> To: p...@xen.org >> Cc: xen-devel@lists.xenproject.org; Paul Durrant ; >> Andrew Cooper >> ; Wei Liu ; Roger Pau Monné >> >> Subject: Re: [PATCH v5 3/6] x86 / pv: do not t

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 14:59 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; 'Paul Durrant' ; > 'Andrew Cooper' > ; 'Wei Liu' ; 'Roger Pau Monné' > > Subject: Re: [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM > > On 10.03.

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Jan Beulich
On 10.03.2020 13:30, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 10 March 2020 10:27 >> To: Tian, Kevin ; Paul Durrant >> Cc: xen-devel@lists.xenproject.org; Andrew Cooper >> Subject: Re: [PATCH v3] IOMMU: make DMA containment of quarantined devices >> option

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Jan Beulich
On 10.03.2020 16:05, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 10 March 2020 14:59 >> >> In reply to patch 6 I did suggest to >> have a separate list, but without taking these pages off >> d->page_list, > > How would that work without adding an extra page_lis

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:05 > To: p...@xen.org > Cc: 'Tian, Kevin' ; xen-devel@lists.xenproject.org; > 'Andrew Cooper' > > Subject: Re: [PATCH v3] IOMMU: make DMA containment of quarantined devices > optional > > On 10.03.2020 13:30, Paul Durran

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:13 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; 'Paul Durrant' ; > 'Andrew Cooper' > ; 'Wei Liu' ; 'Roger Pau Monné' > > Subject: Re: [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM > > On 10.03.

Re: [Xen-devel] [PATCH v2] memaccess: reduce include dependencies

2020-03-10 Thread Tamas K Lengyel
On Tue, Mar 10, 2020 at 8:42 AM Jan Beulich wrote: > > The common header doesn't itself need to include public/vm_event.h nor > public/memory.h. Drop their inclusion. This requires using the non- > typedef names in two prototypes and an inline function; by not changing > the callers and function d

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Jan Beulich
On 10.03.2020 16:16, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 10 March 2020 15:13 >> To: p...@xen.org >> Cc: xen-devel@lists.xenproject.org; 'Paul Durrant' ; >> 'Andrew Cooper' >> ; 'Wei Liu' ; 'Roger Pau Monné' >> >> Subject: Re: [PATCH v5 3/6] x86 / pv:

Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Ian Jackson
Jason Andryuk writes ("[PATCH] scripts: Use stat to check lock claim"): > Replace the perl locking check with stat(1). Stat is able to fstat > stdin (file descriptor 0) when passed '-' as an argument. This is now > used to check $_lockfd. stat(1) support for '-' was introduced to > coreutils in

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Jan Beulich
On 10.03.2020 16:13, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 10 March 2020 15:05 >> To: p...@xen.org >> Cc: 'Tian, Kevin' ; xen-devel@lists.xenproject.org; >> 'Andrew Cooper' >> >> Subject: Re: [PATCH v3] IOMMU: make DMA containment of quarantined devices

[Xen-devel] [PATCH v2 0/9] x86: reduce include dependencies

2020-03-10 Thread Jan Beulich
In a number of cases I've noticed the x86 emulator, which is quite slow to build especially with not very new gcc, to re-build when having changed headers which I wouldn't have expected to be included there in the first place. Hence I've gone through the dependencies of that object file and tried t

Re: [Xen-devel] [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 09.03.2020 12:56, Markus Armbruster wrote: >> Suggest >> >> scripts: Coccinelle script to use auto-propagated errp >> >> or >> >> scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() >> >> Vladimir Sementsov-Ogievskiy writes: >> >>> Script adds

[Xen-devel] [PATCH v2 1/9] x86/HVM: reduce domain.h include dependencies

2020-03-10 Thread Jan Beulich
Drop #include-s not needed by the header itself. Put the ones needed into whichever other files actually need them. Signed-off-by: Jan Beulich --- v2: Also make things build with XSM=y. --- a/xen/arch/x86/cpu/mcheck/vmce.c +++ b/xen/arch/x86/cpu/mcheck/vmce.c @@ -28,6 +28,7 @@ #include #inclu

[Xen-devel] [PATCH v2 2/9] x86/HVM: reduce vcpu.h include dependencies

2020-03-10 Thread Jan Beulich
Drop #include-s not needed by the header itself. Put the ones needed into whichever other files actually need them. Signed-off-by: Jan Beulich --- v2: Re-base over changes to previous patch. --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -7,6 +7,7 @@ #include #include #include +#

[Xen-devel] [PATCH v2 3/9] x86/HVM: reduce vpt.h include dependencies

2020-03-10 Thread Jan Beulich
Drop #include-s not needed by the header itself. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vpt.h +++ b/xen/include/asm-x86/hvm/vpt.h @@ -19,16 +19,9 @@ #ifndef __ASM_X86_HVM_VPT_H__ #define __ASM_X86_HVM_VPT_H__ -#include -#include -#include -#include -#include #include

[Xen-devel] [PATCH v2 5/9] x86/HVM: reduce vioapic.h include dependencies

2020-03-10 Thread Jan Beulich
Drop an #include not needed by the header itself. While verifying the header (now) builds standalone, I noticed an omission in a public header which gets taken care of here as well. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vioapic.h +++ b/xen/include/asm-x86/hvm/vioapic.h @@ -25,

[Xen-devel] [PATCH v2 4/9] x86/HVM: reduce vpic.h include dependencies

2020-03-10 Thread Jan Beulich
Drop an #include not needed by the header itself. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vpic.h +++ b/xen/include/asm-x86/hvm/vpic.h @@ -27,7 +27,8 @@ #ifndef __ASM_X86_HVM_VPIC_H__ #define __ASM_X86_HVM_VPIC_H__ -#include +struct domain; +struct vcpu; void vpic_irq_pos

[Xen-devel] [PATCH v2 6/9] x86/HVM: reduce vlapic.h include dependencies

2020-03-10 Thread Jan Beulich
Drop #include-s not needed by the header itself. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vlapic.h +++ b/xen/include/asm-x86/hvm/vlapic.h @@ -21,8 +21,6 @@ #define __ASM_X86_HVM_VLAPIC_H__ #include -#include -#include #include #define vcpu_vlapic(x) (&(x)->arch.hvm.

[Xen-devel] [PATCH v2 7/9] x86/HVM: reduce io.h include dependencies

2020-03-10 Thread Jan Beulich
Drop #include-s not needed by the header itself as well as one include of the header which isn't needed. Put the one needed into the file actually requiring it. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/io.h +++ b/xen/include/asm-x86/hvm/io.h @@ -19,12 +19,8 @@ #ifndef __ASM_X86_

Re: [Xen-devel] [PATCH OSSTEST v2 1/2] examine: detect IOMMU availability and add it as a hostflag

2020-03-10 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST v2 1/2] examine: detect IOMMU availability and add it as a hostflag"): > Introduce a new test to check for iommu availability and add it as a > hostflag if found. Thanks. > +sub set_flag($$$) { Firstly, can you break this new code out into its own patch ?

[Xen-devel] [PATCH v2 8/9] x86/HVM: reduce hvm.h include dependencies

2020-03-10 Thread Jan Beulich
Drop #include-s not needed by the header itself, and add smaller scope ones instead. Put the ones needed into whichever other files actually need them. Signed-off-by: Jan Beulich --- v2: Also make things build with PV_SHIM_EXCLUSIVE=y. --- a/xen/include/asm-x86/hvm/emulate.h +++ b/xen/include/as

[Xen-devel] [PATCH v2 9/9] x86: reduce mce.h include dependencies

2020-03-10 Thread Jan Beulich
Drop the public header #include as not needed by the header itself. Add one that was missing, and move all inside the inclusion guard. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/mce.h +++ b/xen/include/asm-x86/mce.h @@ -1,8 +1,9 @@ -#include -#include #ifndef _XEN_X86_MCE_H #define

Re: [Xen-devel] [PATCH OSSTEST v2 2/2] make-flight: add dom0 PVH test

2020-03-10 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST v2 2/2] make-flight: add dom0 PVH test"): > Add a dom0 PVH test, the test to be run is launching a PV guest > (test-debian). Note the PVH dom0 tests are only enabled for Xen >= > 4.13. > > The runvar difference is: Are you sure this is still true ? It doe

Re: [Xen-devel] [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:33 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; 'Paul Durrant' ; > 'Andrew Cooper' > ; 'Wei Liu' ; 'Roger Pau Monné' > > Subject: Re: [PATCH v5 3/6] x86 / pv: do not treat PGC_extra pages as RAM > > On 10.03.

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:44 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; 'Tian, Kevin' ; > 'Andrew Cooper' > > Subject: Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of > quarantined devices optional > > On 10.03.2020 16:13,

Re: [Xen-devel] [PATCH v2 2/9] x86/HVM: reduce vcpu.h include dependencies

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:49 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; Wei Liu ; Roger > Pau Monné > ; Paul Durrant > Subject: [PATCH v2 2/9] x86/HVM: reduce vcpu.h include dependencies > > Drop #include-s not needed by the header

Re: [Xen-devel] [PATCH v2 1/9] x86/HVM: reduce domain.h include dependencies

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:48 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; Wei Liu ; Roger > Pau Monné > ; Paul Durrant ; Daniel de Graaf > ; Tamas K > Lengyel ; Petre Pircalabu ; > Alexandru Isaila > > Subject: [PATCH v2 1/9] x86/HV

Re: [Xen-devel] [PATCH v2 8/9] x86/HVM: reduce hvm.h include dependencies

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 10 March 2020 15:52 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; Wei Liu ; Roger > Pau Monné > ; Paul Durrant ; Kevin Tian > ; Jun Nakajima > > Subject: [PATCH v2 8/9] x86/HVM: reduce hvm.h include dependencies > > Drop #in

[Xen-devel] [linux-next test] 148298: trouble: broken/fail/pass

2020-03-10 Thread osstest service owner
flight 148298 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/148298/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 broken test-amd64-amd

Re: [Xen-devel] [PATCH v4 2/6] xen/rcu: don't use stop_machine_run() for rcu_barrier()

2020-03-10 Thread Jan Beulich
On 10.03.2020 08:28, Juergen Gross wrote: > @@ -143,51 +143,75 @@ static int qhimark = 1; > static int qlowmark = 100; > static int rsinterval = 1000; > > -struct rcu_barrier_data { > -struct rcu_head head; > -atomic_t *cpu_count; > -}; > +/* > + * rcu_barrier() handling: > + * cpu_

Re: [Xen-devel] [PATCH v5 5/6] mm: add 'is_special_page' inline function...

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 13:28 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; Paul Durrant ; Tamas > K Lengyel > ; Andrew Cooper ; Wei Liu > ; Roger Pau > Monné ; George Dunlap ; Ian > Jackson > ; Julien Grall ; Konrad Rzeszutek > Wilk >

Re: [Xen-devel] [PATCH v4 2/6] xen/rcu: don't use stop_machine_run() for rcu_barrier()

2020-03-10 Thread Jürgen Groß
On 10.03.20 17:29, Jan Beulich wrote: On 10.03.2020 08:28, Juergen Gross wrote: @@ -143,51 +143,75 @@ static int qhimark = 1; static int qlowmark = 100; static int rsinterval = 1000; -struct rcu_barrier_data { -struct rcu_head head; -atomic_t *cpu_count; -}; +/* + * rcu_barri

Re: [Xen-devel] [PATCH v4 2/6] xen/rcu: don't use stop_machine_run() for rcu_barrier()

2020-03-10 Thread Jan Beulich
On 10.03.2020 17:34, Jürgen Groß wrote: > On 10.03.20 17:29, Jan Beulich wrote: >> On 10.03.2020 08:28, Juergen Gross wrote: >>> +void rcu_barrier(void) >>> { >>> -atomic_t cpu_count = ATOMIC_INIT(0); >>> -return stop_machine_run(rcu_barrier_action, &cpu_count, NR_CPUS); >>> +unsigned

Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of quarantined devices optional

2020-03-10 Thread Jan Beulich
On 10.03.2020 17:05, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 10 March 2020 15:44 >> To: p...@xen.org >> Cc: xen-devel@lists.xenproject.org; 'Tian, Kevin' ; >> 'Andrew Cooper' >> >> Subject: Re: [Xen-devel] [PATCH v3] IOMMU: make DMA containment of >> quar

[Xen-devel] Xen Security Advisory 315 v1 (CVE-2020-0551) - Load Value Injection (LVI) speculative side channel

2020-03-10 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2020-0551 / XSA-315 Load Value Injection (LVI) speculative side channel ISSUE DESCRIPTION = This is very closely related to the Microarchitectural Data Sampling vulnerabilities from

Re: [Xen-devel] [PATCH v4 3/6] xen: add process_pending_softirqs_norcu() for keyhandlers

2020-03-10 Thread Jan Beulich
On 10.03.2020 08:28, Juergen Gross wrote: > --- a/xen/common/softirq.c > +++ b/xen/common/softirq.c > @@ -25,7 +25,7 @@ static softirq_handler softirq_handlers[NR_SOFTIRQS]; > static DEFINE_PER_CPU(cpumask_t, batch_mask); > static DEFINE_PER_CPU(unsigned int, batching); > > -static void __do_so

[Xen-devel] Note concerning CVE-2020-0550 Snoop-assisted L1D sampling

2020-03-10 Thread Andrew Cooper
Snoop-assisted L1D Sampling is a speculative side channel where an attacker can read the contents of a dirty cache line when the cache line is read by another CPU. For the exact cycle where a Snoop Response is being constructed for a dirty cache line, a faulting/assisting load may be forwarded dat

Re: [Xen-devel] [XEN PATCH v3 13/23] xen/build: include include/config/auto.conf in main Makefile

2020-03-10 Thread Anthony PERARD
On Wed, Mar 04, 2020 at 03:29:55PM +0100, Jan Beulich wrote: > On 26.02.2020 12:33, Anthony PERARD wrote: > > --- a/xen/Makefile > > +++ b/xen/Makefile > > @@ -49,7 +49,71 @@ default: build > > .PHONY: dist > > dist: install > > > > -build install:: include/config/auto.conf > > + > > +ifeq ($(r

Re: [Xen-devel] [PATCH v5 6/6] domain: use PGC_extra domheap page for shared_info

2020-03-10 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 09 March 2020 15:56 > To: p...@xen.org > Cc: xen-devel@lists.xenproject.org; Paul Durrant ; > Stefano Stabellini > ; Julien Grall ; Volodymyr Babchuk > ; Andrew Cooper ; > George Dunlap > ; Ian Jackson ; Konrad > Rzeszutek Wilk > ; Wei Li

Re: [Xen-devel] [XEN PATCH v3 14/23] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)

2020-03-10 Thread Anthony PERARD
On Wed, Mar 04, 2020 at 03:42:36PM +0100, Jan Beulich wrote: > On 26.02.2020 12:33, Anthony PERARD wrote: > > --- a/xen/scripts/Kbuild.include > > +++ b/xen/scripts/Kbuild.include > > @@ -10,7 +10,7 @@ DEPS_INCLUDE = $(addsuffix .d2, $(basename $(wildcard > > $(DEPS > > # as-insn: Check wheth

[Xen-devel] [PATCH v6 0/5] remove one more shared xenheap page: shared_info

2020-03-10 Thread paul
From: Paul Durrant Paul Durrant (5): domain: introduce alloc/free_shared_info() helpers... mm: keep PGC_extra pages on a separate list x86 / ioreq: use a MEMF_no_refcount allocation for server pages... mm: add 'is_special_page' inline function... domain: use PGC_extra domheap page for s

[Xen-devel] [PATCH v6 5/5] domain: use PGC_extra domheap page for shared_info

2020-03-10 Thread paul
From: Paul Durrant Currently shared_info is a shared xenheap page but shared xenheap pages complicate future plans for live-update of Xen so it is desirable to, where possible, not use them [1]. This patch therefore converts shared_info into a PGC_extra domheap page. This does entail freeing shar

[Xen-devel] [PATCH v6 2/5] mm: keep PGC_extra pages on a separate list

2020-03-10 Thread paul
From: Paul Durrant This patch adds a new page_list_head into struct domain to hold PGC_extra pages. This avoids them getting confused with 'normal' domheap pages where the domain's page_list is walked. A new dump loop is also added to dump_pageframe_info() to unconditionally dump the 'extra page

[Xen-devel] [PATCH v6 3/5] x86 / ioreq: use a MEMF_no_refcount allocation for server pages...

2020-03-10 Thread paul
From: Paul Durrant ... now that it is safe to assign them. This avoids relying on libxl (or whatever toolstack is in use) setting max_pages up with sufficient 'slop' to allow all necessary ioreq server pages to be allocated. Signed-off-by: Paul Durrant Reviewed-by: Jan Beulich --- Cc: Andrew

[Xen-devel] [PATCH v6 4/5] mm: add 'is_special_page' inline function...

2020-03-10 Thread paul
From: Paul Durrant ... to cover xenheap and PGC_extra pages. PGC_extra pages are intended to hold data structures that are associated with a domain and may be mapped by that domain. They should not be treated as 'normal' guest pages (i.e. RAM or page tables). Hence, in many cases where code curr

[Xen-devel] [PATCH v6 1/5] domain: introduce alloc/free_shared_info() helpers...

2020-03-10 Thread paul
From: Paul Durrant ... and save the MFN. This patch modifies the 'shared_info' field of struct domain to be a structure comprising an MFN and a virtual address. Allocations are still done from xenheap, so the virtual address still equates to virt_to_mfn() called on the MFN but subsequent patch w

Re: [Xen-devel] [XEN PATCH v3 14/23] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)

2020-03-10 Thread Anthony PERARD
On Thu, Feb 27, 2020 at 11:22:38AM +0100, Roger Pau Monné wrote: > On Wed, Feb 26, 2020 at 11:33:46AM +, Anthony PERARD wrote: > > From: Anthony PERARD > > > > In a later patch ("xen/build: have the root Makefile generates the > > CFLAGS), we want to generate the CFLAGS in xen/Makefile, then

[Xen-devel] [xen-unstable-smoke test] 148381: regressions - FAIL

2020-03-10 Thread osstest service owner
flight 148381 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/148381/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 16 guest-start/debian.repeat fail REGR. vs. 148323 Tests which

[Xen-devel] [PATCH v4] x86/cpu: Sync any remaining RCU callbacks before CPU up/down

2020-03-10 Thread Igor Druzhinin
During CPU down operation RCU callbacks are scheduled to finish off some actions later as soon as CPU is fully dead (the same applies to CPU up operation in case error path is taken). If in the same grace period another CPU up operation is performed on the same CPU, RCU callback will be called late

[Xen-devel] [ovmf bisection] complete build-amd64-xsm

2020-03-10 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-amd64-xsm testid xen-build Tree: ovmf https://github.com/tianocore/edk2.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: seabios git://xenbits.xen.org/osstest/seabios.git Tree: xe

Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Jason Andryuk
On Tue, Mar 10, 2020 at 11:43 AM Ian Jackson wrote: > > Jason Andryuk writes ("[PATCH] scripts: Use stat to check lock claim"): > > Replace the perl locking check with stat(1). Stat is able to fstat > > stdin (file descriptor 0) when passed '-' as an argument. This is now > > used to check $_loc

  1   2   >