Re: [Xen-devel] [PATCH 13/25] argo: implement the register op

2018-12-21 Thread Christopher Clark
On Thu, Dec 20, 2018 at 11:28 PM Jan Beulich wrote: > > >>> On 21.12.18 at 02:25, wrote: > > On Thu, Dec 20, 2018 at 12:29 AM Jan Beulich wrote: > >> > >> >>> On 20.12.18 at 06:29, wrote: > >> > On Wed, Dec 12, 2018 at 1:48 AM Jan Beulich wrote: > >> >> > >> >> > +static int > >> >> > +argo_fi

Re: [Xen-devel] [PATCH 13/25] argo: implement the register op

2018-12-21 Thread Jan Beulich
>>> On 21.12.18 at 09:16, wrote: > On Thu, Dec 20, 2018 at 11:28 PM Jan Beulich wrote: >> >> >>> On 21.12.18 at 02:25, wrote: >> > On Thu, Dec 20, 2018 at 12:29 AM Jan Beulich wrote: >> >> >> >> >>> On 20.12.18 at 06:29, wrote: >> >> > On Wed, Dec 12, 2018 at 1:48 AM Jan Beulich wrote: >> >>

Re: [Xen-devel] [PATCH for-4.12 v2 1/8] xen/page_alloc: Move get_pg_owner()/put_pg_owner() from x86 to common code

2018-12-21 Thread Jan Beulich
>>> On 20.12.18 at 20:23, wrote: > From: Benjamin Sanda > > get_pg_owner() and put_pg_owner() will be necessary in a follow-up > commit to support xentrace on Arm. So move the helper to common code. > > Signed-off-by: Benjamin Sanda > [julien: Rework commit title / turn put_pg_owner to a macro

Re: [Xen-devel] [PATCH] drm/xen-front: Make shmem backed display buffer coherent

2018-12-21 Thread Oleksandr Andrushchenko
On 12/20/18 8:38 PM, Christoph Hellwig wrote: On Thu, Dec 20, 2018 at 07:35:15PM +0100, Daniel Vetter wrote: Err, with streaming DMA buffer sharing is trivial. The coherent DMA allocator is what causes all kinds of horrible hacks that can't actually work on various platforms. Hm, I thought the

Re: [Xen-devel] [PATCH for-4.12 v2 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Jan Beulich
>>> On 20.12.18 at 20:23, wrote: > No functional change intended. > > Only reasonable clean-ups are done in this patch. The rest will use _gfn > for the time being. > > Signed-off-by: Julien Grall Acked-by: Jan Beulich ___ Xen-devel mailing list

[Xen-devel] [linux-4.19 test] 131447: regressions - FAIL

2018-12-21 Thread osstest service owner
flight 131447 linux-4.19 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131447/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-shadow7 xen-boot fail REGR. vs. 129313 test-amd64-amd64-pai

Re: [Xen-devel] [PATCH v4 0/2] misc safety certification fixes

2018-12-21 Thread Jan Beulich
>>> On 20.12.18 at 18:26, wrote: > On 11/12/18 11:06 PM, Stefano Stabellini wrote: > Discussing with Stefano today, he is aiming to get this series for Xen > 4.12. I will be away until the x86/common code freeze. > > I agree with him that I will waive my ack if it gets reviewed by any > committ

[Xen-devel] [PATCH v2 0/3] x86/mm-locks: add a bias to control domain lock levels

2018-12-21 Thread Roger Pau Monne
Hello, The following series attempts to fix a mm lock level issue that prevents using paging_log_dirty_op from a paging Dom0 (like a PVH Dom0). The discussion that lead to this series can be found at: https://lists.xenproject.org/archives/html/xen-devel/2018-12/msg01197.html Roger Pau Monne (3):

[Xen-devel] [PATCH v2 2/3] x86/mm-locks: convert some macros to inline functions

2018-12-21 Thread Roger Pau Monne
And rename to have only one prefix underscore where applicable. No functional change. Signed-off-by: Roger Pau Monné Reviewed-by: George Dunlap --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/mm/mm-locks.h | 96 -- 1

[Xen-devel] [PATCH v2 1/3] x86/mm-locks: remove trailing whitespace

2018-12-21 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné Reviewed-by: George Dunlap --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/mm/mm-locks.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/mm/m

[Xen-devel] [PATCH v2 3/3] x86/mm-locks: apply a bias to lock levels for control domain

2018-12-21 Thread Roger Pau Monne
paging_log_dirty_op function takes mm locks from a subject domain and then attempts to perform copy to operations against the caller domain in order to copy the result of the hypercall into the caller provided buffer. This works fine when the caller is a non-paging domain, but triggers a lock orde

[Xen-devel] [xen-unstable-smoke test] 131486: tolerable all pass - PUSHED

2018-12-21 Thread osstest service owner
flight 131486 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/131486/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH v2 0/3] x86/mm-locks: add a bias to control domain lock levels

2018-12-21 Thread Jan Beulich
>>> On 21.12.18 at 10:41, wrote: > Hello, > > The following series attempts to fix a mm lock level issue that prevents > using paging_log_dirty_op from a paging Dom0 (like a PVH Dom0). The > discussion that lead to this series can be found at: > > https://lists.xenproject.org/archives/html/xen-d

[Xen-devel] [ovmf test] 131470: regressions - FAIL

2018-12-21 Thread osstest service owner
flight 131470 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/131470/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i3866 xen-buildfail REGR. vs. 129475 build-i386-xsm

Re: [Xen-devel] [PATCH 03/15] x86/cpu/vpmu: Add Hygon Dhyana support for vPMU

2018-12-21 Thread Pu Wen
On 2018/12/20 22:25, Boris Ostrovsky wrote: ... >> diff --git a/xen/arch/x86/cpu/vpmu_amd.c b/xen/arch/x86/cpu/vpmu_amd.c >> index 5efc39b..e9f0a5c 100644 >> --- a/xen/arch/x86/cpu/vpmu_amd.c >> +++ b/xen/arch/x86/cpu/vpmu_amd.c >> @@ -554,6 +554,8 @@ int __init amd_vpmu_init(void) >> case 0x

Re: [Xen-devel] [PATCH v4 1/3] xen/pt: fix some pass-thru devices don't work across reboot

2018-12-21 Thread Jan Beulich
>>> On 20.12.18 at 16:29, wrote: > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -1514,6 +1514,55 @@ static int assign_device(struct domain *d, u16 seg, u8 > bus, u8 devfn, u32 flag) > return rc; > } > > +/* > + * Unmap established mappings between domain'

Re: [Xen-devel] [PATCH v4 3/3] xen/pt: initialize 'warned' field of arch_msix properly

2018-12-21 Thread Jan Beulich
>>> On 20.12.18 at 16:29, wrote: > --- a/xen/include/asm-x86/msi.h > +++ b/xen/include/asm-x86/msi.h > @@ -252,5 +252,10 @@ void guest_mask_msi_irq(struct irq_desc *, bool mask); > void ack_nonmaskable_msi_irq(struct irq_desc *); > void end_nonmaskable_msi_irq(struct irq_desc *, u8 vector); > v

Re: [Xen-devel] [PATCH 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2018-12-21 Thread Andrew Cooper
On 20/12/2018 13:12, Pu Wen wrote: > diff --git a/xen/arch/x86/cpu/hygon.c b/xen/arch/x86/cpu/hygon.c > new file mode 100644 > index 000..0728b4a > --- /dev/null > +++ b/xen/arch/x86/cpu/hygon.c > @@ -0,0 +1,296 @@ > +#include > +#include > +#include > +#include > + > +#include "cpu.h" > +

Re: [Xen-devel] [PATCH v4 1/3] xen/pt: fix some pass-thru devices don't work across reboot

2018-12-21 Thread Roger Pau Monné
On Fri, Dec 21, 2018 at 03:13:50AM -0700, Jan Beulich wrote: > But then again I'm still not fully convinced that a hypervisor > change is the right course of action here in the first place. It > would be better if the hypervisor had to just verify that all > IRQ mappings are gone, or else fail the

Re: [Xen-devel] [PATCH v4 1/3] xen/pt: fix some pass-thru devices don't work across reboot

2018-12-21 Thread Jan Beulich
>>> On 21.12.18 at 11:26, wrote: > On Fri, Dec 21, 2018 at 03:13:50AM -0700, Jan Beulich wrote: >> But then again I'm still not fully convinced that a hypervisor >> change is the right course of action here in the first place. It >> would be better if the hypervisor had to just verify that all >>

Re: [Xen-devel] [PATCH v4 0/2] misc safety certification fixes

2018-12-21 Thread Julien Grall
Hi, On 21/12/2018 09:27, Jan Beulich wrote: On 20.12.18 at 18:26, wrote: On 11/12/18 11:06 PM, Stefano Stabellini wrote: Discussing with Stefano today, he is aiming to get this series for Xen 4.12. I will be away until the x86/common code freeze. I agree with him that I will waive my ack if i

Re: [Xen-devel] [PATCH v4 3/3] xen/pt: initialize 'warned' field of arch_msix properly

2018-12-21 Thread Roger Pau Monné
On Fri, Dec 21, 2018 at 03:17:30AM -0700, Jan Beulich wrote: > >>> On 20.12.18 at 16:29, wrote: > > --- a/xen/include/asm-x86/msi.h > > +++ b/xen/include/asm-x86/msi.h > > @@ -252,5 +252,10 @@ void guest_mask_msi_irq(struct irq_desc *, bool mask); > > void ack_nonmaskable_msi_irq(struct irq_desc

Re: [Xen-devel] [PATCH for-4.12 v2 2/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn

2018-12-21 Thread Julien Grall
Hi Stefano, On 20/12/2018 22:56, Stefano Stabellini wrote: On Thu, 20 Dec 2018, Julien Grall wrote: In a follow-up patches, we will need to handle get_page_from_gfn ^ remove a I have removed the "es" from "patches" and keep the "a" instead. Aside from that: Reviewed-by: Stefano Sta

[Xen-devel] [linux-4.4 test] 131448: tolerable FAIL - PUSHED

2018-12-21 Thread osstest service owner
flight 131448 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131448/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-xl 16 guest-start/debian.repeatfail like 131384 test-amd64-amd64-xl-qemuu-dmrestrict-am

Re: [Xen-devel] [PATCH for-4.12 v2 4/8] xen/arm: Add support for read-only foreign mappings

2018-12-21 Thread Julien Grall
Hi, On 20/12/2018 23:35, Stefano Stabellini wrote: On Thu, 20 Dec 2018, Julien Grall wrote: (Sorry for the formatting) On Thu, 20 Dec 2018 at 23:08, Stefano Stabellini wrote: On Thu, 20 Dec 2018, Julien Grall wrote: > Current, foreign mappings can only be read-write. A follow-up

Re: [Xen-devel] [PATCH for-4.12 v2 1/8] xen/page_alloc: Move get_pg_owner()/put_pg_owner() from x86 to common code

2018-12-21 Thread Julien Grall
Hi, On 20/12/2018 22:59, Andrew Cooper wrote: On 20/12/2018 22:53, Stefano Stabellini wrote: diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 2c6509e3a0..edb93b8ada 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2509,6 +2510,43 @@ static __init int

Re: [Xen-devel] [PATCH for-4.12 v2 4/8] xen/arm: Add support for read-only foreign mappings

2018-12-21 Thread Julien Grall
Hi, On 20/12/2018 19:23, Julien Grall wrote: Current, foreign mappings can only be read-write. A follow-up patch will extend foreign mapping for Xen backend memory (via XEN_DOMID), some of that memory should only be read accessible for the mapping domain. Introduce a new p2m_type to cater read-

Re: [Xen-devel] [PATCH] x86/vtx: Improvements to ept= command line handling

2018-12-21 Thread Jan Beulich
>>> On 20.12.18 at 18:16, wrote: > Switch parse_ept_param() to use the parse_boolean() infrastructure for more > consistency with related command line parameters. Rename opt_pml_enabled to > opt_ept_pml for consistency with opt_ept_ad, and switch it to being bool > > Drop the comment leading com

Re: [Xen-devel] [PATCH] x86/vtx: Improvements to ept= command line handling

2018-12-21 Thread Andrew Cooper
On 21/12/2018 11:13, Jan Beulich wrote: On 20.12.18 at 18:16, wrote: >> Switch parse_ept_param() to use the parse_boolean() infrastructure for more >> consistency with related command line parameters. Rename opt_pml_enabled to >> opt_ept_pml for consistency with opt_ept_ad, and switch it to

Re: [Xen-devel] [PATCH] x86/vtx: Improvements to ept= command line handling

2018-12-21 Thread Jan Beulich
>>> On 21.12.18 at 12:15, wrote: > On 21/12/2018 11:13, Jan Beulich wrote: > On 20.12.18 at 18:16, wrote: >>> +By default, Xen will use A/D tracking when available in hardware, >>> except >>> +on Avoton processors affected by erratum AVR41. Explicitly choosing >>> +`ad=0` will d

Re: [Xen-devel] [PATCH v4 1/3] xen/pt: fix some pass-thru devices don't work across reboot

2018-12-21 Thread Roger Pau Monné
On Fri, Dec 21, 2018 at 03:32:47AM -0700, Jan Beulich wrote: > >>> On 21.12.18 at 11:26, wrote: > > On Fri, Dec 21, 2018 at 03:13:50AM -0700, Jan Beulich wrote: > >> But then again I'm still not fully convinced that a hypervisor > >> change is the right course of action here in the first place. It

Re: [Xen-devel] [PATCH] x86/vtx: Improvements to ept= command line handling

2018-12-21 Thread Andrew Cooper
On 21/12/2018 11:27, Jan Beulich wrote: On 21.12.18 at 12:15, wrote: >> On 21/12/2018 11:13, Jan Beulich wrote: >> On 20.12.18 at 18:16, wrote: +By default, Xen will use A/D tracking when available in hardware, except +on Avoton processors affected by erratum AVR4

[Xen-devel] [qemu-mainline test] 131454: tolerable FAIL - PUSHED

2018-12-21 Thread osstest service owner
flight 131454 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/131454/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 17 guest-stopfail like 131435 test-armhf-armhf-libvirt 14 sav

Re: [Xen-devel] [PATCH for-4.12 v2 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Julien Grall
Hi Stefano, On 20/12/2018 23:25, Stefano Stabellini wrote: On Thu, 20 Dec 2018, Julien Grall wrote: No functional change intended. Only reasonable clean-ups are done in this patch. The rest will use _gfn for the time being. Signed-off-by: Julien Grall I don't have the bandwidth to review t

Re: [Xen-devel] [PATCH 1/2] xen/dom0: Improve documentation for dom0= and dom0-iommu=

2018-12-21 Thread Roger Pau Monné
On Thu, Dec 20, 2018 at 11:40:51PM +, Andrew Cooper wrote: > Update to the latest metadata style, and expand each of the clauses with more > information, including applicable CONFIG_* options. > > Drop the redundant comment beside parse_dom0_param(), to avoid it getting out > of sync with the

Re: [Xen-devel] [PATCH 1/2] xen/dom0: Improve documentation for dom0= and dom0-iommu=

2018-12-21 Thread Jan Beulich
>>> On 21.12.18 at 00:40, wrote: > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -636,55 +636,76 @@ trace feature is only enabled in debugging builds of > Xen. > > Specify the bit width of the DMA heap. > > -### dom0 (x86) > -> `= List of [ pvh |

Re: [Xen-devel] [PATCH 2/2] xen/dom0: Add a dom0-iommu=none option

2018-12-21 Thread Jan Beulich
>>> On 21.12.18 at 00:40, wrote: > @@ -271,6 +272,26 @@ int parse_boolean(const char *name, const char *s, const > char *e) > return -1; > } > > +int cmdline_strcmp(const char *frag, const char *name) __init ? > +{ > +while ( 1 ) > +{ > +int res = (*frag - *name); > + >

Re: [Xen-devel] [PATCH v2 11/18] argo: implement the register op

2018-12-21 Thread Julien Grall
Hi Christopher, On 21/12/2018 01:17, Christopher Clark wrote: On Thu, Dec 20, 2018 at 3:20 AM Julien Grall wrote: Hi Christopher, On 12/20/18 6:39 AM, Christopher Clark wrote: Used by a domain to register a region of memory for receiving messages from either a specified other domain, or, if

Re: [Xen-devel] [PATCH 2/2] xen/dom0: Add a dom0-iommu=none option

2018-12-21 Thread Roger Pau Monné
On Thu, Dec 20, 2018 at 11:40:52PM +, Andrew Cooper wrote: > For development purposes, it is very convenient to boot Xen as a PVH guest, > with an XTF PV or PVH "dom0". The edit-compile-go cycle is a matter of > seconds, and you can resonably insert printk() debugging in places which which > w

Re: [Xen-devel] [PATCH 1/2] xen/dom0: Improve documentation for dom0= and dom0-iommu=

2018-12-21 Thread Andrew Cooper
On 21/12/2018 12:08, Jan Beulich wrote: On 21.12.18 at 00:40, wrote: >> --- a/docs/misc/xen-command-line.markdown >> +++ b/docs/misc/xen-command-line.markdown >> @@ -636,55 +636,76 @@ trace feature is only enabled in debugging builds of >> Xen. >> >> Specify the bit width of the DMA heap.

Re: [Xen-devel] [PATCH 2/2] xen/dom0: Add a dom0-iommu=none option

2018-12-21 Thread Andrew Cooper
On 21/12/2018 12:13, Jan Beulich wrote: On 21.12.18 at 00:40, wrote: >> @@ -271,6 +272,26 @@ int parse_boolean(const char *name, const char *s, >> const char *e) >> return -1; >> } >> >> +int cmdline_strcmp(const char *frag, const char *name) > __init ? I think there are some runtim

Re: [Xen-devel] [PATCH 2/2] xen/dom0: Add a dom0-iommu=none option

2018-12-21 Thread Andrew Cooper
On 21/12/2018 12:44, Roger Pau Monné wrote: > On Thu, Dec 20, 2018 at 11:40:52PM +, Andrew Cooper wrote: >> For development purposes, it is very convenient to boot Xen as a PVH guest, >> with an XTF PV or PVH "dom0". The edit-compile-go cycle is a matter of >> seconds, and you can resonably in

Re: [Xen-devel] PROBLEM: Xen paging-request boot failure since 4.19.5

2018-12-21 Thread Ken Pizzini
On Thu, Dec 20, 2018 at 11:12:40AM -0500, Boris Ostrovsky wrote: > This is addressed by https://lkml.org/lkml/2018/12/11/266 but has not > been merged yet. Confirmed: applying the patch in that posting to my Gentoo sys-kernel/gentoo-sources-4.19.10 tree results in a working system for me. Thanks,

Re: [Xen-devel] [PATCH 1/2] xen/dom0: Improve documentation for dom0= and dom0-iommu=

2018-12-21 Thread Andrew Cooper
On 21/12/2018 12:08, Roger Pau Monné wrote: > On Thu, Dec 20, 2018 at 11:40:51PM +, Andrew Cooper wrote: >> Update to the latest metadata style, and expand each of the clauses with more >> information, including applicable CONFIG_* options. >> >> Drop the redundant comment beside parse_dom0_par

Re: [Xen-devel] [PATCH for-4.12 v2 2/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn

2018-12-21 Thread Andrew Cooper
On 20/12/2018 19:23, Julien Grall wrote: > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c > index 2b5e43f50a..cd34149d13 100644 > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -406,6 +406,38 @@ mfn_t p2m_lookup(struct domain *d, gfn_t gfn, p2m_type_t > *t) > return mfn; > }

[Xen-devel] [xen-unstable-smoke test] 131491: tolerable all pass - PUSHED

2018-12-21 Thread osstest service owner
flight 131491 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/131491/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH 03/15] x86/cpu/vpmu: Add Hygon Dhyana support for vPMU

2018-12-21 Thread Boris Ostrovsky
On 12/21/18 5:02 AM, Pu Wen wrote: > On 2018/12/20 22:25, Boris Ostrovsky wrote: > ... >>> diff --git a/xen/arch/x86/cpu/vpmu_amd.c b/xen/arch/x86/cpu/vpmu_amd.c >>> index 5efc39b..e9f0a5c 100644 >>> --- a/xen/arch/x86/cpu/vpmu_amd.c >>> +++ b/xen/arch/x86/cpu/vpmu_amd.c >>> @@ -554,6 +554,8 @@ int

Re: [Xen-devel] [PATCH for-4.12 v2 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Boris Ostrovsky
On 12/20/18 2:23 PM, Julien Grall wrote: > No functional change intended. > > Only reasonable clean-ups are done in this patch. The rest will use _gfn > for the time being. > > Signed-off-by: Julien Grall SVM bits: Reviewed-by: Boris Ostrovsky ___

[Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2018-12-21 Thread Andrew Cooper
All of this code lives inside CONFIG_PV which means gfn == mfn, and the fill_ro_mpt() calls clearly show that the value is used untranslated. Change cr3_gfn to a suitably typed cr3_mfn, and replace get_page_from_gfn() with a straight mfn_to_page/get_page sequence, to avoid the implication that tra

Re: [Xen-devel] [PATCH for-4.12 v2 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Andrew Cooper
On 20/12/2018 19:23, Julien Grall wrote: > diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c > index 32dc4253ff..b462a8513b 100644 > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -827,7 +827,7 @@ int arch_set_info_guest( > unsigned long flags; > bool compat; > #

Re: [Xen-devel] [PATCH] x86emul: fix test harness and fuzzer build dependencies

2018-12-21 Thread Ian Jackson
Jan Beulich writes ("Re: [Xen-devel] [PATCH] x86emul: fix test harness and fuzzer build dependencies"): > On 20.12.18 at 17:05, wrote: >> On 20.12.18 at 16:23, wrote: > >> Ie, it is there to satisfy the requirement I mention above, that the > >> dependency directory is built first. > > > > Whic

Re: [Xen-devel] [PATCH v7 01/14] libxl: Enhance libxl__sendmsg_fds to deal with EINTR and EWOULDBLOCK

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 01/14] libxl: Enhance libxl__sendmsg_fds to deal with EINTR and EWOULDBLOCK"): > This patch change the behavior of libxl__sendmsg_fds to retry sendmsg on > EINTR error. > > This patch also allow a caller of libxl__sendmsg_fds to deal with > EWOULDBLOCK. The funct

Re: [Xen-devel] [PATCH v7 02/14] libxl_qmp: Separate QMP message generation from qmp_send_prepare

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 02/14] libxl_qmp: Separate QMP message generation from qmp_send_prepare"): > .. to be able to re-use qmp_prepare_cmd with libxl__ev_qmp. > > This patch also add the QMP end of command '\r\n' into the generated > string as every caller will needs this. > > There

Re: [Xen-devel] [PATCH v7 04/14] libxl: Add wrapper around libxl__json_object_to_json JSON

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 04/14] libxl: Add wrapper around libxl__json_object_to_json JSON"): > That wrapper is going to be used to safely log a json_object, as > libxl__json_object_to_json return NULL on error. In the error case, > JSON() will return an invalid json string. Acked-by: Ian

Re: [Xen-devel] [PATCH for-4.12 1/8] xen/arm: Only set necessary flags when initializing HCR_EL2

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: Only {A,F,I}MO are necessary to receive interrupts until a guest vCPU is loaded. The rest have no effect on Xen and it is better to avoid setting them. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 8 ++-- 1 file changed, 6 insertions(+)

Re: [Xen-devel] [PATCH for-4.12 2/8] xen/arm: p2m: Provide an helper to generate the VTTBR

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: A follow-up patch will need to generate the VTTBR in a few places. Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Andrii Anisov -- Sincerely, Andrii Anisov. ___

Re: [Xen-devel] [PATCH for-4.12 3/8] xen/arm: p2m: Introduce an helper to allocate the root page-table

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: A follow-up patch will require to allocate the root page-table without having a domain in hand. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov -- Sincerely, Andrii Anisov. ___ Xen-devel mailing lis

Re: [Xen-devel] [PATCH for-4.12 5/8] xen/arm: p2m: Only use isb() when it is necessary

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: The EL1 translation regime is out-of-context when running at EL2. This means the processor cannot speculate memory accesses using the registers associated to that regime. An isb() is only need if Xen is going to use the translation regime before returning

Re: [Xen-devel] [PATCH for-4.12 5/8] xen/arm: p2m: Only use isb() when it is necessary

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: if ( *last_vcpu_ran != INVALID_VCPU_ID && *last_vcpu_ran != n->vcpu_id ) +{ flush_tlb_local(); +} BTW, missed mentioning that curly braces above are odd by coding style. -- Sincerely, Andrii Anisov. _

Re: [Xen-devel] [PATCH for-4.12 7/8] xen/arm: p2m: Clean-up headers included and order them alphabetically

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: A lot of the headers are not necessary, so remove them. At the same time, re-order them alphabetically. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov -- Sincerely, Andrii Anisov. ___ Xen-devel mai

Re: [Xen-devel] [PATCH for-4.12 8/8] DO NOT APPLY Allow testing the new AT speculate workaround code

2018-12-21 Thread Andrii Anisov
I guess this one should not be here. -- Sincerely, Andrii Anisov. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH for-4.12 8/8] DO NOT APPLY Allow testing the new AT speculate workaround code

2018-12-21 Thread Andrew Cooper
On 21/12/2018 14:44, Andrii Anisov wrote: > I guess this one should not be here. Posting patches like this can be useful for people trying to test the series. As such, it is worth posting, but the DO NOT APPLY hint is there for people to realise that is isn't for inclusion generally. ~Andrew __

Re: [Xen-devel] [PATCH for-4.12 5/8] xen/arm: p2m: Only use isb() when it is necessary

2018-12-21 Thread Julien Grall
On 21/12/2018 14:43, Andrii Anisov wrote: On 28.11.18 18:49, Julien Grall wrote:   if ( *last_vcpu_ran != INVALID_VCPU_ID && *last_vcpu_ran != n->vcpu_id ) +    {   flush_tlb_local(); +    } BTW, missed mentioning that curly braces above are odd by coding style. It is not odd

Re: [Xen-devel] [PATCH for-4.12 8/8] DO NOT APPLY Allow testing the new AT speculate workaround code

2018-12-21 Thread Andrii Anisov
On 21.12.18 16:47, Andrew Cooper wrote: On 21/12/2018 14:44, Andrii Anisov wrote: I guess this one should not be here. Posting patches like this can be useful for people trying to test the series. As such, it is worth posting, but the DO NOT APPLY hint is there for people to realise that is

Re: [Xen-devel] [PATCH for-4.12 4/8] xen/arm: domain_build: Don't switch to the guest P2M when copying data

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: Until recently, kernel/initrd/dtb were loaded using guest VA and therefore requiring to restore temporarily the P2M. This reworked in a series of commits (up to 9292086 "xen/arm: domain_build: Use copy_to_guest_phys_flush_dcache in dtb_load") to use a gues

Re: [Xen-devel] [PATCH v4 1/3] xen/pt: fix some pass-thru devices don't work across reboot

2018-12-21 Thread Chao Gao
On Fri, Dec 21, 2018 at 03:13:50AM -0700, Jan Beulich wrote: On 20.12.18 at 16:29, wrote: >> --- a/xen/drivers/passthrough/pci.c >> +++ b/xen/drivers/passthrough/pci.c >> @@ -1514,6 +1514,55 @@ static int assign_device(struct domain *d, u16 seg, >> u8 bus, u8 devfn, u32 flag) >> return

Re: [Xen-devel] [PATCH for-4.12 7/8] xen/arm: p2m: Clean-up headers included and order them alphabetically

2018-12-21 Thread Andrii Anisov
I've missed that this patch is already merged within a different series. Also "[Xen-devel] [PATCH for-4.12 6/8] xen/arm: Implement workaround for Cortex-A76 erratum 1165522" should be rebased. On 21.12.18 16:44, Andrii Anisov wrote: On 28.11.18 18:49, Julien Grall wrote: A lot of the headers

Re: [Xen-devel] [PATCH v7 06/14] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 06/14] libxl_qmp: Implementation of libxl__ev_qmp_*"): > This patch implement the API libxl__ev_qmp documented in the previous > patch, "libxl: Design of an async API to issue QMP commands to QEMU". > > Since this API is to interact with QEMU via the QMP protocol

Re: [Xen-devel] [PATCH for-4.12 6/8] xen/arm: Implement workaround for Cortex-A76 erratum 1165522

2018-12-21 Thread Andrii Anisov
On 28.11.18 18:49, Julien Grall wrote: Early version of Cortex-A76 can end-up with corrupt TLBs if they speculate an AT instruction while the S1/S2 system registers are in an inconsistent state. This can happen during guest context switch and when invalidating the TLBs for other than the curre

Re: [Xen-devel] [PATCH 2/2] xen/dom0: Add a dom0-iommu=none option

2018-12-21 Thread Roger Pau Monné
On Fri, Dec 21, 2018 at 01:01:22PM +, Andrew Cooper wrote: > On 21/12/2018 12:44, Roger Pau Monné wrote: > > On Thu, Dec 20, 2018 at 11:40:52PM +, Andrew Cooper wrote: > >> For development purposes, it is very convenient to boot Xen as a PVH guest, > >> with an XTF PV or PVH "dom0". The ed

Re: [Xen-devel] [PATCH v7 07/14] libxl_exec: Add libxl__spawn_initiate_failure

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 07/14] libxl_exec: Add libxl__spawn_initiate_failure"): > This function can be used by user of libxl__spawn_* when they setup a > notification other than xenstore. The parent can already report success > via libxl__spawn_initiate_detach(), this new function can be

Re: [Xen-devel] [PATCH v7 06/14] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-12-21 Thread Ian Jackson
Ian Jackson writes ("Re: [PATCH v7 06/14] libxl_qmp: Implementation of libxl__ev_qmp_*"): > I have only fairly minor comments now. The biggest one remaining is > about the use of EGC_GC which I think probably wants to become > STATE_AO_GC throughout. See below... I realise that I should state e

Re: [Xen-devel] [PATCH v7 08/14] libxl: Add init/dispose of for libxl__domain_build_state

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 08/14] libxl: Add init/dispose of for libxl__domain_build_state"): > These two new functions libxl__domain_build_state_{init,dispose} should > be called every time a new libxl__domain_build_state comes to existance. > > There seems to be two of them, one with the

Re: [Xen-devel] [PATCH v7 09/14] libxl_dm: Pre-open QMP socket for QEMU

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 09/14] libxl_dm: Pre-open QMP socket for QEMU"): > This patch moves the creation of the QMP unix socket from QEMU to libxl. > But libxl doesn't rely on this yet. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-de

Re: [Xen-devel] [PATCH v7 11/14] libxl: QEMU startup sync based on QMP

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 11/14] libxl: QEMU startup sync based on QMP"): > This is only activated when dm_restrict=1, as explained in a previous > patch "libxl_dm: Pre-open QMP socket for QEMU" > > Signed-off-by: Anthony PERARD > Reviewed-by: Roger Pau Monné Acked-by: Ian Jackson __

Re: [Xen-devel] [PATCH v7 12/14] libxl_qmp: Store advertised QEMU version in libxl__ev_qmp

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 12/14] libxl_qmp: Store advertised QEMU version in libxl__ev_qmp"): > This will be used in a later patch. Acked-by: Ian Jackson > +o = libxl__json_map_get("QMP", resp, JSON_MAP); > +o = libxl__json_map_get("version", o, JSON_MAP); > +o =

Re: [Xen-devel] [PATCH 1/2] xen/dom0: Improve documentation for dom0= and dom0-iommu=

2018-12-21 Thread Roger Pau Monné
On Fri, Dec 21, 2018 at 01:13:25PM +, Andrew Cooper wrote: > On 21/12/2018 12:08, Roger Pau Monné wrote: > > On Thu, Dec 20, 2018 at 11:40:51PM +, Andrew Cooper wrote: > >> Update to the latest metadata style, and expand each of the clauses with > >> more > >> information, including applic

Re: [Xen-devel] [PATCH v7 13/14] libxl: Change libxl__domain_suspend_device_model() to be async

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 13/14] libxl: Change libxl__domain_suspend_device_model() to be async"): > This create an extra step for the two call sites of the function. > > libxl__domain_suspend_device_model() in this patch gets an extra error > variable (there is ret and rc), but ret goes

Re: [Xen-devel] [PATCH v7 00/14] libxl: Enable save/restore/migration of a restricted QEMU + libxl__ev_qmp_*

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 00/14] libxl: Enable save/restore/migration of a restricted QEMU + libxl__ev_qmp_*"): > Patch series available in this git branch: > https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git > br.libxl-ev-qmp-v Thanks. Sorry for being so slow to review t

Re: [Xen-devel] [PATCH v7 14/14] libxl: Re-implement domain_suspend_device_model using libxl__ev_qmp

2018-12-21 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v7 14/14] libxl: Re-implement domain_suspend_device_model using libxl__ev_qmp"): > The re-implementation is done because we want to be able to send the > file description that QEMU can use to save its state. When QEMU is > restricted, it would not be able to write to

Re: [Xen-devel] [PATCH for-4.12 v2 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Julien Grall
Hi Andrew, On 21/12/2018 14:14, Andrew Cooper wrote: On 20/12/2018 19:23, Julien Grall wrote: diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 32dc4253ff..b462a8513b 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -827,7 +827,7 @@ int arch_set_info_guest(

Re: [Xen-devel] [PATCH 03/15] x86/cpu/vpmu: Add Hygon Dhyana support for vPMU

2018-12-21 Thread Pu Wen
On 2018/12/21 21:34, Boris Ostrovsky wrote: > On 12/21/18 5:02 AM, Pu Wen wrote: >> On 2018/12/20 22:25, Boris Ostrovsky wrote: >> ... diff --git a/xen/arch/x86/cpu/vpmu_amd.c b/xen/arch/x86/cpu/vpmu_amd.c index 5efc39b..e9f0a5c 100644 --- a/xen/arch/x86/cpu/vpmu_amd.c +++ b/xen

[Xen-devel] [PATCH for-4.12 v3 4/8] xen/arm: Make get_page_from_gfn working with DOMID_XEN

2018-12-21 Thread Julien Grall
DOMID_XEN is used to share pages beloging to the hypervisor (e.g trace buffers). Unlike other domains, DOMID_XEN is a non-auto translated domain and therefore does not have a P2M. This patch adds a special case for DOMID_XEN in get_page_from_gfn. We may want to provide "non-auto translated helpers

[Xen-devel] [PATCH for-4.12 v3 7/8] xenalyze: Build for Both ARM and x86 Platforms

2018-12-21 Thread Julien Grall
From: Benjamin Sanda Modified to provide building of the xenalyze binary for both ARM and x86 platforms. The xenalyze binary is now built as part of the BIN list for both platforms. Signed-off-by: Benjamin Sanda Signed-off-by: Julien Grall Acked-by: Wei Liu Acked-by: Stefano Stabellini ---

[Xen-devel] [PATCH for-4.12 v3 1/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn

2018-12-21 Thread Julien Grall
In a follow-up patch, we will need to handle get_page_from_gfn differently for DOMID_XEN. To keep the code simple move the current content in a new separate helper p2m_get_page_from_gfn. Note the new helper is not anymore a static inline function as the helper is quite complex. Finally, take the

[Xen-devel] [PATCH for-4.12 v3 0/8] xen/arm: Add xentrace support

2018-12-21 Thread Julien Grall
Hi all, This patch series is a rework of the series sent by Benjamin Sanda in April 2016 [1]. It finally adds support for xentrace/xenanalyze on Arm. Cheers, [1] https://lists.xenproject.org/archives/html/xen-devel/2016-04/msg00464.html *** BLURB HERE *** Benjamin Sanda (2): xen/arm: Initial

[Xen-devel] [PATCH for-4.12 v3 3/8] xen/arm: Add support for read-only foreign mappings

2018-12-21 Thread Julien Grall
Currently, foreign mappings can only be read-write. A follow-up patch will extend foreign mapping for Xen backend memory (via XEN_DOMID), some of that memory should only be read accessible for the mapping domain. Introduce a new p2m_type to cater read-only foreign mappings. For now, the decision b

[Xen-devel] [PATCH for-4.12 v3 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Julien Grall
No functional change intended. Only reasonable clean-ups are done in this patch. The rest will use _gfn for the time being. Signed-off-by: Julien Grall Acked-by: Jan Beulich --- Changes in v3: - Add Jan's acked-by Changes in v2: - Remove >> PAGE_SHIFT in svm code

[Xen-devel] [PATCH for-4.12 v3 2/8] xen/arm: Rename p2m_map_foreign to p2m_map_foreign_rw

2018-12-21 Thread Julien Grall
A follow-up patch will introduce another type of foreign mapping. Rename the type to make clear it is only used for read-write mapping. No functional changes intended. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov Acked-by: Stefano Stabellini --- Changes in v3 - Add Stefa

[Xen-devel] [PATCH for-4.12 v3 6/8] xen/arm: Initialize trace buffer

2018-12-21 Thread Julien Grall
From: Benjamin Sanda Now that we allow a privileged domain to map tracing buffer, initialize them so a user can effectively trace Xen. Signed-off-by: Benjamin Sanda [julien: rework commit message] Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov Acked-by: Stefano Stabellini --- Ch

[Xen-devel] [PATCH for-4.12 v3 5/8] xen/arm: Allow a privileged domain to map foreign page from DOMID_XEN

2018-12-21 Thread Julien Grall
For auto-translated domain, the only way to map a page to itself is the using the foreign map API. The current code does not allow mapping page from special page (such as DOMID_XEN). As xentrace buffers are shared using DOMID_XEN, it is not possible to use tracing for Arm. This could be solved by

Re: [Xen-devel] [PATCH for-4.12 v3 7/8] xenalyze: Build for Both ARM and x86 Platforms

2018-12-21 Thread Julien Grall
Hi, On 21/12/2018 16:26, Julien Grall wrote: From: Benjamin Sanda Modified to provide building of the xenalyze binary for both ARM and x86 platforms. The xenalyze binary is now built as part of the BIN list for both platforms. Signed-off-by: Benjamin Sanda Signed-off-by: Julien Grall Acked-

Re: [Xen-devel] [PATCH for-4.12 v3 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Julien Grall
On 21/12/2018 16:26, Julien Grall wrote: No functional change intended. Only reasonable clean-ups are done in this patch. The rest will use _gfn for the time being. Signed-off-by: Julien Grall Acked-by: Jan Beulich Please ignore this patch. I need to rebase it on Andrew's patch. Cheers,

Re: [Xen-devel] [PATCH for-4.12 v2 8/8] xen: Switch parameter in get_page_from_gfn to use typesafe gfn

2018-12-21 Thread Andrew Cooper
On 21/12/2018 16:21, Julien Grall wrote: >>> diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h >>> index 3304921991..1efbc071c5 100644 >>> --- a/xen/include/asm-x86/p2m.h >>> +++ b/xen/include/asm-x86/p2m.h >>> @@ -491,18 +491,21 @@ struct page_info *p2m_get_page_from_gfn(struct >>

[Xen-devel] [PATCH v3 02/11] libxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)

2018-12-21 Thread George Dunlap
QEMU_USER_BASE allows a user to specify the UID to use when running the devicemodel for a specific domain number. Unfortunately, this is not really practical: It requires nearly 32,000 entries in /etc/passwd. QEMU_USER_RANGE_BASE is much more practical. Remove support for QEMU_USER_BASE. Signed

[Xen-devel] [PATCH v3 07/11] libxl: Make killing of device model asynchronous

2018-12-21 Thread George Dunlap
Or at least, give it an asynchronous interface so that we can make it actually asynchronous in subsequent patches. Create state structures and callback function signatures. Add the state structure to libxl__destroy_domid_state. Break libxl__destroy_domid down into two functions. No functional c

[Xen-devel] [PATCH v3 04/11] dm_depriv: Describe expected usage of device_model_user parameter

2018-12-21 Thread George Dunlap
A number of subsequent patches rely on as-yet undefined behavior for what the `device_model_user` parameter does. Rather than implement it incorrectly (or randomly), or remove the feature, describe an expected usage for the feature. Further patches will make decisions based on this expected usage

[Xen-devel] [PATCH v3 09/11] libxl: Kill QEMU with "reaper" ruid

2018-12-21 Thread George Dunlap
Using kill(-1) to killing an untrusted dm process with the real uid equal to the dm_uid isn't guaranteed to succeed: the process in question may be able to kill the reaper process after the setresuid() and before the kill(). Instead, set the real uid to the QEMU user for domain 0 (QEMU_USER_RANGE_

[Xen-devel] [PATCH v3 11/11] dm_depriv: Mark `UID cleanup` as completed

2018-12-21 Thread George Dunlap
Signed-off-by: George Dunlap --- CC: Ian Jackson CC: Wei Liu --- docs/designs/qemu-deprivilege.md | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/designs/qemu-deprivilege.md b/docs/designs/qemu-deprivilege.md index f7444a434d..81a5f5c0

[Xen-devel] [PATCH v3 06/11] libxl: Move qmp cleanup into devicemodel destroy function

2018-12-21 Thread George Dunlap
Removing the qmp connection is logically part of the device model destruction; having the caller destroy it is a mild layering violation. Move libxl__qmp_cleanup() into libxl__destroy_device_model(). This will make it easier when we make devicemodel destruction asynchronous. Signed-off-by: Georg

  1   2   >