[Xen-devel] [PATCH] x86/xen: make xen_reservation_lock static

2018-09-04 Thread Juergen Gross
tip.git f030aade9165 ("x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c") missed to make xen_reservation_lock static. Signed-off-by: Juergen Gross --- arch/x86/xen/mmu_pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/mmu_pv.c

[Xen-devel] Change kernel with kexec on Xen

2018-09-04 Thread xxtx...@163.com
When I use kexec to change the kernel on Xen, it always appears an error “could not get memory layout”? Why? Does it support to boot without bios on Xen with kexec? 发自我的 iPhone ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

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

2018-09-04 Thread osstest service owner
flight 127256 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/127256/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 10 debian-hvm-install fail REGR. vs. 125898

Re: [Xen-devel] [PATCH v6 01/14] iommu: introduce the concept of BFN...

2018-09-04 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, September 4, 2018 5:08 PM > > >>> On 04.09.18 at 10:49, wrote: > >> -Original Message- > >> From: Jan Beulich [mailto:jbeul...@suse.com] > >> Sent: 04 September 2018 09:47 > >> To: Kevin Tian > >> Cc: Suravee Suthikulpanit

Re: [Xen-devel] Problems booting 32-bit PV; just me or more widespread?

2018-09-04 Thread Boris Ostrovsky
On 09/02/2018 08:32 PM, Andy Smith wrote: > > This one should work though as it's their netboot installer: > > > http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-i386/current/images/netboot/xen/ > > When I do xl create with this one (direct kernel boot), I get this > crash in the

Re: [Xen-devel] [PATCH] xen-swiotlb: use actually allocated size on check physical contiguous

2018-09-04 Thread Andrew Cooper
On 05/09/18 00:14, Dongli Zhang wrote: > Below module would help people reproduce the issue to understand the symptom: > > https://github.com/finallyjustice/patchset/blob/master/xen-swiotlb-panic.c > > In addition, on the xen hypervisor side, the memory_exchange() in xen > hypervisor > does not

Re: [Xen-devel] [PATCH] xen-swiotlb: use actually allocated size on check physical contiguous

2018-09-04 Thread Dongli Zhang
Below module would help people reproduce the issue to understand the symptom: https://github.com/finallyjustice/patchset/blob/master/xen-swiotlb-panic.c In addition, on the xen hypervisor side, the memory_exchange() in xen hypervisor does not check if the the pfn of input mfn belong to the same

[Xen-devel] [xen-unstable test] 127266: tolerable FAIL - PUSHED

2018-09-04 Thread osstest service owner
flight 127266 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/127266/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 17 guest-stopfail like 127232 test-armhf-armhf-libvirt 14

Re: [Xen-devel] [PATCH v2] x86/altp2m: Allow setting the #VE info page for an arbitrary VCPU

2018-09-04 Thread Razvan Cojocaru
On 9/4/18 11:40 PM, Tamas K Lengyel wrote: > On Mon, Sep 3, 2018 at 10:59 PM Adrian Pop wrote: >> >> In a classic HVI + Xen setup, the introspection engine would monitor >> legacy guest page-tables by marking them read-only inside the EPT; this >> way any modification explicitly made by the guest

Re: [Xen-devel] [PATCH v2] x86/altp2m: Allow setting the #VE info page for an arbitrary VCPU

2018-09-04 Thread Tamas K Lengyel
On Mon, Sep 3, 2018 at 10:59 PM Adrian Pop wrote: > > In a classic HVI + Xen setup, the introspection engine would monitor > legacy guest page-tables by marking them read-only inside the EPT; this > way any modification explicitly made by the guest or implicitly made by > the CPU page walker

Re: [Xen-devel] [PATCH v2] x86/hvm: re-work viridian APIC assist code

2018-09-04 Thread David Woodhouse
On Mon, 2018-09-03 at 10:12 +, Paul Durrant wrote: > > I believe APIC assist is intended for fully synthetic interrupts. Hm, if by 'fully synthetic interrupts' you mean vlapic_virtual_intr_delivery_enabled(), then no I think APIC assist doesn't get used in that case at all. > Is it

Re: [Xen-devel] [PATCH 1/3] [not-for-unstable] xen/arm: vgic-v3: Delay the initialization of the domain information

2018-09-04 Thread Andrew Cooper
On 04/09/18 20:35, Julien Grall wrote: > Hi, > > On 09/04/2018 08:21 PM, Julien Grall wrote: >> A follow-up patch will require to know the number of vCPUs when >> initializating the vGICv3 domain structure. However this information is >> not available at domain creation. This is only known once >>

Re: [Xen-devel] [PATCH v2 04/13] optee: add OP-TEE mediator skeleton

2018-09-04 Thread Julien Grall
On 09/03/2018 06:55 PM, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, On 03.09.18 20:38, Julien Grall wrote: Hi Volodymyr, On 03/09/18 17:54, Volodymyr Babchuk wrote: Add very basic OP-TEE mediator. It can probe for OP-TEE presence, tell it about domain creation/destuction and

Re: [Xen-devel] [PATCH 10/13] block: remove bvec_to_phys

2018-09-04 Thread Geert Uytterhoeven
On Tue, Sep 4, 2018 at 9:23 PM Christoph Hellwig wrote: > We only use it in biovec_phys_mergeable and a m68k paravirt driver, > so just opencode it there. Also remove the pointless unsigned long cast > for the offset in the opencoded instances. > > Signed-off-by: Christoph Hellwig Reviewed-by:

Re: [Xen-devel] [PATCH 1/3] [not-for-unstable] xen/arm: vgic-v3: Delay the initialization of the domain information

2018-09-04 Thread Julien Grall
Hi, On 09/04/2018 08:21 PM, Julien Grall wrote: A follow-up patch will require to know the number of vCPUs when initializating the vGICv3 domain structure. However this information is not available at domain creation. This is only known once XEN_DOMCTL_max_vpus is called for that domain. In

[Xen-devel] [PATCH 3/3] xen/arm: vgic-v3-its: Make vgic_v3_its_free_domain idempotent

2018-09-04 Thread Julien Grall
vgic_v3_its_free_domain may be called before vgic_v3_its_init_domain if the vGIC was failing to initalize itself. This means the list would be unitialized and result in a crash. Thankfully, we only allow ITS for the hardware domain. So the crash is not a security issue. Fix it by checking whether

[Xen-devel] [PATCH 2/3] xen/arm: vgic-v3: Don't create empty re-distributor regions

2018-09-04 Thread Julien Grall
At the moment, Xen is assuming the hardware domain will have the same number of re-distributor regions as the host. However, as the number of CPUs or the stride (e.g on GICv4) may be different we end up exposing regions which does not contain any re-distributors. When booting, Linux will go

[Xen-devel] [PATCH 1/3] [not-for-unstable] xen/arm: vgic-v3: Delay the initialization of the domain information

2018-09-04 Thread Julien Grall
A follow-up patch will require to know the number of vCPUs when initializating the vGICv3 domain structure. However this information is not available at domain creation. This is only known once XEN_DOMCTL_max_vpus is called for that domain. In order to get the max vCPUs around, delay the domain

[Xen-devel] [PATCH 0/3] xen/arm: vgic-v3: Bug fixes

2018-09-04 Thread Julien Grall
Hi all, The first 2 patches of the series are meant to address Dom0 boot failure when on GICv4 platforms as well as when the number of vCPUs is not equal to the numbers of pCPUs. They should be backported up Xen 4.8. Patch #3 should address failure when failing to create guest. ITS is still

[Xen-devel] [PATCH 02/13] xen: remove the xen_biovec_phys_mergeable export

2018-09-04 Thread Christoph Hellwig
BIOVEC_PHYS_MERGEABLE is only called from core block code. Signed-off-by: Christoph Hellwig --- drivers/xen/biomerge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c index 55ed80c3a17c..399c4e30f723 100644 --- a/drivers/xen/biomerge.c +++

[Xen-devel] [PATCH 12/13] block: don't include bug.h from bio.h

2018-09-04 Thread Christoph Hellwig
No need to pull in the BUG() defintion. Signed-off-by: Christoph Hellwig --- include/linux/bio.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index 3af2fea686a9..85f2e56ecdb8 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -21,7

[Xen-devel] [PATCH 05/13] block: move req_gap_{back, front}_merge to blk-merge.c

2018-09-04 Thread Christoph Hellwig
Keep it close to the actual users instead of exposing the function to all drivers. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 65 +++ include/linux/blkdev.h | 69 -- 2 files changed, 65 insertions(+),

[Xen-devel] [PATCH 10/13] block: remove bvec_to_phys

2018-09-04 Thread Christoph Hellwig
We only use it in biovec_phys_mergeable and a m68k paravirt driver, so just opencode it there. Also remove the pointless unsigned long cast for the offset in the opencoded instances. Signed-off-by: Christoph Hellwig --- arch/m68k/emu/nfblock.c | 2 +- block/blk.h | 4 ++--

[Xen-devel] clean up physical merging helpers

2018-09-04 Thread Christoph Hellwig
Hi Jens, this series moves various helpers related to merging based on physical addresses from the public headers into block/, moves the Xen special case from arch hooks into common code, cleans up the code a bit, and removes not nessecary includes from the block headers.

[Xen-devel] [PATCH 08/13] block: add a missing BIOVEC_SEG_BOUNDARY check in bio_add_pc_page

2018-09-04 Thread Christoph Hellwig
The actual recaculation of segments in __blk_recalc_rq_segments will do this check, so there is no point in forcing it if we know it won't succeed. Signed-off-by: Christoph Hellwig --- block/bio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bio.c b/block/bio.c

[Xen-devel] [PATCH 09/13] block: merge BIOVEC_SEG_BOUNDARY into biovec_phys_mergeable

2018-09-04 Thread Christoph Hellwig
These two checks should always be performed together, so merge them into a single helper. Signed-off-by: Christoph Hellwig --- block/bio.c | 4 +--- block/blk-integrity.c | 12 ++-- block/blk-merge.c | 29 + block/blk.h | 12

[Xen-devel] [PATCH 01/13] arm: remove the unused BIOVEC_MERGEABLE define

2018-09-04 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/io.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 2cfbc531f63b..6774553dc214 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -459,13 +459,6

[Xen-devel] [PATCH 04/13] block: move integrity_req_gap_{back, front}_merge to blk.h

2018-09-04 Thread Christoph Hellwig
No need to expose these to drivers. Signed-off-by: Christoph Hellwig --- block/blk.h| 35 +-- include/linux/blkdev.h | 31 --- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/block/blk.h b/block/blk.h index

[Xen-devel] [PATCH 07/13] block: simplify BIOVEC_PHYS_MERGEABLE

2018-09-04 Thread Christoph Hellwig
Turn the macro into an inline, move it to blk.h and take the Xen check into the core code instead of delegating it to architectures. Also rename the function to biovec_phys_mergeable as there is no need to shout. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/io.h | 4

[Xen-devel] [PATCH 03/13] xen: provide a prototype for xen_biovec_phys_mergeable in xen.h

2018-09-04 Thread Christoph Hellwig
Having multiple externs in arch headers is not a good way to provide a common interface. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/io.h | 3 --- arch/arm64/include/asm/io.h | 3 --- arch/x86/include/asm/io.h | 5 - include/xen/xen.h | 4 4 files changed, 4

[Xen-devel] [PATCH 06/13] block: move req_gap_back_merge to blk.h

2018-09-04 Thread Christoph Hellwig
No need to expose these helpers outside the block layer. Signed-off-by: Christoph Hellwig --- block/blk.h| 19 +++ include/linux/blkdev.h | 19 --- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/block/blk.h b/block/blk.h index

[Xen-devel] [PATCH 11/13] block: don't include io.h from bio.h

2018-09-04 Thread Christoph Hellwig
Now that we don't need an override for BIOVEC_PHYS_MERGEABLE there is no need to drag this header in. Signed-off-by: Christoph Hellwig --- include/linux/bio.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index fcb5f5618ed4..3af2fea686a9 100644

[Xen-devel] [PATCH 13/13] xen: don't include from and

2018-09-04 Thread Christoph Hellwig
Nothing Xen specific in these headers, which get included from a lot of code in the kernel. So prune the includes and move them to the Xen-specific files that actually use them instead. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/io.h | 1 - arch/arm64/include/asm/io.h

Re: [Xen-devel] [PATCH] xen-swiotlb: use actually allocated size on check physical contiguous

2018-09-04 Thread Greg KH
On Tue, Sep 04, 2018 at 11:16:58AM -0700, Joe Jin wrote: > xen_swiotlb_{alloc,free}_coherent() actually allocate/free size by order > but used the required size to check if address is physical contiguous, > if first pages are physical contiguous also passed > range_straddles_page_boundary() check,

[Xen-devel] Rats nest with domain pirq initialisation

2018-09-04 Thread Andrew Cooper
On 13/08/18 11:01, Andrew Cooper wrote: > This is in preparation to set up d->max_cpus and d->vcpu[] in domain_create(), > and allow later parts of domain construction to have access to the values. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Stefano Stabellini > CC: Julien

[Xen-devel] [xtf test] 127269: all pass - PUSHED

2018-09-04 Thread osstest service owner
flight 127269 xtf real [real] http://logs.test-lab.xenproject.org/osstest/logs/127269/ Perfect :-) All tests in this flight passed as required version targeted for testing: xtf 089f9be25f4bb445f68241ba05ab4e17786e21a7 baseline version: xtf

[Xen-devel] [PATCH] xen-swiotlb: use actually allocated size on check physical contiguous

2018-09-04 Thread Joe Jin
xen_swiotlb_{alloc,free}_coherent() actually allocate/free size by order but used the required size to check if address is physical contiguous, if first pages are physical contiguous also passed range_straddles_page_boundary() check, but others were not it will lead kernel panic. Signed-off-by:

Re: [Xen-devel] [PATCH] libxl: create control/sysrq xenstore node

2018-09-04 Thread Vitaly Kuznetsov
;> >> xenstore trace confirms: >> >> IN 0x24bd9a0 20180904 04:36:32 WRITE (control/sysrq ) >> OUT 0x24bd9a0 20180904 04:36:32 ERROR (EACCES ) >> >> The problem seems to be in the fact that we don't pre-create control/sysrq >> xenstore node and li

[Xen-devel] [PATCH v2] xen:arm: Populate arm64 image header

2018-09-04 Thread Amit Singh Tomar
This patch adds image size and flags to XEN image header. It uses those fields according to the updated Linux kernel image definition. With this patch bootloader can now place XEN image anywhere in system RAM at 2MB aligned address without to worry about relocation. For instance, it fixes the XEN

Re: [Xen-devel] [PATCH v3 07/16] x86/p2m/pod: make it build with !CONFIG_HVM

2018-09-04 Thread Julien Grall
Hi Wei, On 09/04/2018 05:15 PM, Wei Liu wrote: Populate-on-demand is HVM only. Provide a bunch of stubs for common p2m code and guard one invocation of guest_physmap_mark_populate_on_demand with is_hvm_domain. Put relevant fields in p2m_domain and code which touches those fields under

Re: [Xen-devel] incompatible changes in staging break qemu

2018-09-04 Thread Andrew Cooper
On 04/09/18 18:01, Anthony PERARD wrote: > On Wed, Aug 29, 2018 at 02:22:05PM +0200, Olaf Hering wrote: >> On Mon, Aug 27, Olaf Hering wrote: >> >>> Since about two weeks, no released qemu can be built against >>> xen.git#staging. The error looks like that: >>>

Re: [Xen-devel] [PATCH v3 11/16] x86/mm: put HVM only code under CONFIG_HVM

2018-09-04 Thread Razvan Cojocaru
On 9/4/18 7:15 PM, Wei Liu wrote: > Going through the code, HAP, EPT, PoD and ALTP2M depend on HVM code. > Put these components under CONFIG_HVM. This further requires putting > one of the vm event under CONFIG_HVM. > > Altp2m requires a bit more attention because its code is embedded in >

Re: [Xen-devel] [PATCH v3 07/16] x86/p2m/pod: make it build with !CONFIG_HVM

2018-09-04 Thread Razvan Cojocaru
On 9/4/18 8:08 PM, Razvan Cojocaru wrote: > On 9/4/18 7:15 PM, Wei Liu wrote: >> Populate-on-demand is HVM only. >> >> Provide a bunch of stubs for common p2m code and guard one invocation >> of guest_physmap_mark_populate_on_demand with is_hvm_domain. >> >> Put relevant fields in p2m_domain and

Re: [Xen-devel] [PATCH v3 07/16] x86/p2m/pod: make it build with !CONFIG_HVM

2018-09-04 Thread Razvan Cojocaru
On 9/4/18 7:15 PM, Wei Liu wrote: > Populate-on-demand is HVM only. > > Provide a bunch of stubs for common p2m code and guard one invocation > of guest_physmap_mark_populate_on_demand with is_hvm_domain. > > Put relevant fields in p2m_domain and code which touches those fields > under

Re: [Xen-devel] incompatible changes in staging break qemu

2018-09-04 Thread Anthony PERARD
On Wed, Aug 29, 2018 at 02:22:05PM +0200, Olaf Hering wrote: > On Mon, Aug 27, Olaf Hering wrote: > > > Since about two weeks, no released qemu can be built against > > xen.git#staging. The error looks like that: > > qemu-20180825T130857.235c82acca/include/hw/xen/xen_common.h:677:5: error: > >

Re: [Xen-devel] [PATCH] libxl: create control/sysrq xenstore node

2018-09-04 Thread Wei Liu
> > IN 0x24bd9a0 20180904 04:36:32 WRITE (control/sysrq ) > OUT 0x24bd9a0 20180904 04:36:32 ERROR (EACCES ) > > The problem seems to be in the fact that we don't pre-create control/sysrq > xenstore node and libxl_send_sysrq() doing libxl__xs_printf() creates it as > read-on

Re: [Xen-devel] [PATCH v3 03/16] x86: XENMEM_resource_ioreq_server is HVM only

2018-09-04 Thread Wei Liu
On Tue, Sep 04, 2018 at 05:15:20PM +0100, Wei Liu wrote: > Put the entire case branch under CONFIG_HVM. > > Nonetheless check HVM before trying to get ioreq server. The wording here is confusing. It should have been written as: Lift the check from hvm_get_ioreq_server_frame into its caller.

Re: [Xen-devel] [PATCH v3 04/16] x86: monitor.o is currently HVM only

2018-09-04 Thread Razvan Cojocaru
On 9/4/18 7:15 PM, Wei Liu wrote: > There has been plan to make PV work, but it is not yet there. Provide > stubs to make it build with !CONFIG_HVM. > > Signed-off-by: Wei Liu Acked-by: Razvan Cojocaru Thanks, Razvan ___ Xen-devel mailing list

[Xen-devel] [PATCH v3 15/16] x86/pvshim: disable HVM for PV shim

2018-09-04 Thread Wei Liu
Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monné --- tools/firmware/xen-dir/shim.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware/xen-dir/shim.config b/tools/firmware/xen-dir/shim.config index 21d7075bb4..de53dfe376 100644 ---

[Xen-devel] [PATCH v3 14/16] x86: expose CONFIG_HVM

2018-09-04 Thread Wei Liu
Signed-off-by: Wei Liu --- v3: longer text v2: use tab to indent Haven't added a dependency on PV_SHIM_EXCLUSIVE because agreement is not yet reached. --- xen/arch/x86/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index

[Xen-devel] [PATCH v3 12/16] x86/mm: put paging_update_nestedmode under CONFIG_HVM

2018-09-04 Thread Wei Liu
Nested HVM is not enabled when !CONFIG_HVM. Signed-off-by: Wei Liu --- xen/arch/x86/mm/paging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index dcee496eb0..7f460bd321 100644 --- a/xen/arch/x86/mm/paging.c +++

[Xen-devel] [PATCH v3 13/16] xen: connect guest creation with CONFIG_{HVM, PV}

2018-09-04 Thread Wei Liu
Signed-off-by: Wei Liu Acked-by: Jan Beulich --- xen/common/domain.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index 78c450e4b4..1f95bd169c 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -318,9 +318,24 @@ struct

Re: [Xen-devel] [PATCH 0/2] MMIO emulation fixes

2018-09-04 Thread Andrew Cooper
On 04/09/18 17:11, Juergen Gross wrote: > On 16/08/18 13:27, Jan Beulich wrote: > On 16.08.18 at 12:56, wrote: >>> On 16/08/18 11:29, Jan Beulich wrote: Following some further discussion with Andrew, he looks to be convinced that the issue is to be fixed in the balloon driver,

Re: [Xen-devel] [PATCH v3 03/16] x86: XENMEM_resource_ioreq_server is HVM only

2018-09-04 Thread Paul Durrant
> -Original Message- > From: Wei Liu [mailto:wei.l...@citrix.com] > Sent: 04 September 2018 17:15 > To: xen-devel@lists.xenproject.org > Cc: Wei Liu ; Paul Durrant ; > Jan Beulich ; Andrew Cooper > > Subject: [PATCH v3 03/16] x86: XENMEM_resource_ioreq_server is HVM > only > > Put the

[Xen-devel] [PATCH v3 00/16] Make CONFIG_HVM work

2018-09-04 Thread Wei Liu
This series goes through x86 code to make CONFIG_HVM work. With this series, it is possible to build Xen with PV support only. Running `xl info` on a host with PV only Xen: root@lcy2-dt108:~# xl info host : lcy2-dt108 release: 4.17.0-0.bpo.1-amd64 version

[Xen-devel] [PATCH v3 06/16] libxl: don't set PoD target for PV guests

2018-09-04 Thread Wei Liu
Previously PoD target was unconditionally set for both PV and HVM guests, but in fact PoD has always been an HVM (now PVH as well) only feature. Signed-off-by: Wei Liu --- tools/libxl/libxl_mem.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git

[Xen-devel] [PATCH v3 03/16] x86: XENMEM_resource_ioreq_server is HVM only

2018-09-04 Thread Wei Liu
Put the entire case branch under CONFIG_HVM. Nonetheless check HVM before trying to get ioreq server. Signed-off-by: Wei Liu --- v3: 1. put an assert in hvm_get_ioreq_server_frame 2. remove redundant assignment of rc v2: put entire case branch under CONFIG_HVM --- xen/arch/x86/hvm/ioreq.c | 5

[Xen-devel] [PATCH v3 01/16] x86: change name of parameter for various invlpg functions

2018-09-04 Thread Wei Liu
They all incorrectly named a parameter virtual address while it should have been linear address. Requested-by: Andrew Cooper Signed-off-by: Wei Liu Acked-by: Jan Beulich Reviewed-by: Kevin Tian Acked-by: Boris Ostrovsky --- xen/arch/x86/hvm/svm/svm.c | 14 +++---

[Xen-devel] [PATCH v3 09/16] x86: provide stubs, declarations and macros in hvm.h

2018-09-04 Thread Wei Liu
Make sure hvm_enabled evaluate to false then provide necessary things to make xen build when !CONFIG_HVM. Signed-off-by: Wei Liu --- v3: rewritten --- xen/include/asm-x86/hvm/hvm.h | 97 +++ 1 file changed, 97 insertions(+) diff --git

[Xen-devel] [PATCH v3 02/16] x86: introduce and use a set of internal emulation flags

2018-09-04 Thread Wei Liu
Use these flags in has_* tests and emulation_flags_ok. Not using raw flags directly enabling DCE to kick in for has_* tests while at the same time making sure emulation_flags_ok won't go out of sync. Signed-off-by: Wei Liu --- v3: new --- xen/arch/x86/domain.c| 13 ++

[Xen-devel] [PATCH v3 08/16] x86/hvm: rearrange content of hvm.h

2018-09-04 Thread Wei Liu
Move enum and function declarations to first half of the file. Static inline functions and macros, which reference HVM specific fields directly are grouped together in second half of the file. The movement is needed because in a later patch the second half is going to be enclosed in CONFIG_HVM.

[Xen-devel] [PATCH v3 07/16] x86/p2m/pod: make it build with !CONFIG_HVM

2018-09-04 Thread Wei Liu
Populate-on-demand is HVM only. Provide a bunch of stubs for common p2m code and guard one invocation of guest_physmap_mark_populate_on_demand with is_hvm_domain. Put relevant fields in p2m_domain and code which touches those fields under CONFIG_HVM. Signed-off-by: Wei Liu --- v3: Put pod

[Xen-devel] [PATCH v3 04/16] x86: monitor.o is currently HVM only

2018-09-04 Thread Wei Liu
There has been plan to make PV work, but it is not yet there. Provide stubs to make it build with !CONFIG_HVM. Signed-off-by: Wei Liu --- v3: 1. return EOPNOUTSUPP instead of 0 2. fix style issue --- xen/arch/x86/Makefile | 2 +- xen/include/asm-x86/monitor.h | 13 + 2

[Xen-devel] [PATCH v3 05/16] x86: PIT emulation is common to both PV and HVM

2018-09-04 Thread Wei Liu
Move the file to x86 common code and change its name to emul-i8254.c. Put HVM only code under CONFIG_HVM or is_hvm_domain. Signed-off-by: Wei Liu --- v3: remove some CONFIG_HVMs, rely on DCE v2: move the whole file. --- xen/arch/x86/Makefile | 1 +

Re: [Xen-devel] [PATCH 0/2] MMIO emulation fixes

2018-09-04 Thread Juergen Gross
On 16/08/18 13:27, Jan Beulich wrote: On 16.08.18 at 12:56, wrote: >> On 16/08/18 11:29, Jan Beulich wrote: >>> Following some further discussion with Andrew, he looks to be >>> convinced that the issue is to be fixed in the balloon driver, >>> which so far (intentionally afaict) does not

Re: [Xen-devel] Xen Dom0 boot failure on platform that supports ARM GICv4

2018-09-04 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Julien Grall [mailto:julien.gr...@arm.com] > Sent: 04 September 2018 12:22 > To: Shameerali Kolothum Thodi ; > xen-de...@lists.xen.org > Cc: sstabell...@kernel.org; Linuxarm ; Andre > Przywara > Subject: Re: Xen Dom0 boot failure on platform that supports

[Xen-devel] [distros-debian-snapshot test] 75164: regressions - FAIL

2018-09-04 Thread Platform Team regression test user
flight 75164 distros-debian-snapshot real [real] http://osstest.xensource.com/osstest/logs/75164/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-i386-daily-netboot-pygrub 11 guest-start fail REGR. vs. 75133 Tests which did

[Xen-devel] [RFC PATCH tip] x86/xen: xen_reservation_lock can be static

2018-09-04 Thread kbuild test robot
Fixes: f030aade9165 ("x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c") Signed-off-by: kbuild test robot --- mmu_pv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index bf30fa0..7ada9e4 100644 ---

[Xen-devel] [tip:x86/paravirt 2/15] arch/x86/xen/mmu_pv.c:105:1: sparse: symbol 'xen_reservation_lock' was not declared. Should it be static?

2018-09-04 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/paravirt head: 495310e4f2dd857c4d5a62806a04cb8ba53855c1 commit: f030aade9165080f3539fb86fc2ce9ffc391813c [2/15] x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c reproduce: # apt-get install sparse

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

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

[Xen-devel] [ovmf baseline-only test] 75163: tolerable FAIL

2018-09-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75163 ovmf real [real] http://osstest.xensource.com/osstest/logs/75163/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-ovmf-amd64 10 debian-hvm-install fail like 75160

[Xen-devel] [xen-unstable test] 127232: tolerable FAIL - PUSHED

2018-09-04 Thread osstest service owner
flight 127232 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/127232/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 17 guest-stopfail like 126854 test-armhf-armhf-libvirt 14

Re: [Xen-devel] [PATCH v2 01/23] x86: change name of parameter for various invlpg functions

2018-09-04 Thread Boris Ostrovsky
On 09/03/2018 09:46 AM, Wei Liu wrote: On Sun, Aug 26, 2018 at 01:19:34PM +0100, Wei Liu wrote: They all incorrectly named a parameter virtual address while it should have been linear address. Requested-by: Andrew Cooper Signed-off-by: Wei Liu Is there more comment on this? These being

Re: [Xen-devel] [PATCH v6 05/14] public / x86: introduce __HYPERCALL_iommu_op

2018-09-04 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 04 September 2018 13:55 > To: Paul Durrant > Cc: Andrew Cooper ; George Dunlap > ; Ian Jackson ; Wei Liu > ; Stefano Stabellini ; xen- > devel ; Konrad Rzeszutek Wilk > ; Tim (Xen.org) > Subject: RE: [PATCH v6

[Xen-devel] [seabios baseline-only test] 75162: tolerable FAIL

2018-09-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75162 seabios real [real] http://osstest.xensource.com/osstest/logs/75162/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemuu-win10-i386 10 windows-install fail like 75114

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

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

Re: [Xen-devel] [PATCH v6 05/14] public / x86: introduce __HYPERCALL_iommu_op

2018-09-04 Thread Jan Beulich
>>> On 04.09.18 at 14:23, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 04 September 2018 12:50 >> >> >>> On 23.08.18 at 11:47, wrote: >> > +int compat_one_iommu_op(compat_iommu_op_buf_t *buf) >> > +{ >> > +compat_iommu_op_t cmp; >> > +xen_iommu_op_t nat; >> > +int

Re: [Xen-devel] [Bug 198497] handle_mm_fault / xen_pmd_val / radix_tree_lookup_slot Null pointer

2018-09-04 Thread Jason Andryuk
On Mon, Apr 23, 2018 at 4:17 AM Juergen Gross wrote: > On 20/04/18 17:20, Jason Andryuk wrote: > > Adding xen-devel and the Linux Xen maintainers. > > > > Summary: Some Xen users (and maybe others) are hitting a BUG in > > __radix_tree_lookup() under do_swap_page() - example backtrace is > >

Re: [Xen-devel] [PATCH 1/5] xen/domain: Prepare data for is_{pv, hvm}_domain() as early as possible

2018-09-04 Thread Jan Beulich
>>> On 04.09.18 at 14:17, wrote: > On 03/09/18 17:03, Jan Beulich wrote: >>> --- a/xen/common/domain.c >>> +++ b/xen/common/domain.c >>> @@ -272,8 +272,12 @@ struct domain *domain_create(domid_t domid, >>> if ( (d = alloc_domain_struct()) == NULL ) >>> return ERR_PTR(-ENOMEM); >>>

Re: [Xen-devel] [PATCH v2 6/6] x86emul: generalize vector length handling for AVX512/EVEX

2018-09-04 Thread Jan Beulich
>>> On 04.09.18 at 13:02, wrote: > On 29/08/18 15:25, Jan Beulich wrote: >> @@ -2818,6 +2818,9 @@ x86_decode( >> >> opcode |= b | MASK_INSR(vex.pfx, X86EMUL_OPC_PFX_MASK); >> >> +if ( !evex.mbs ) > > This use of mbs is very confusing to read. How about: > >

Re: [Xen-devel] [PATCH v2 5/6] x86emul: correct EVEX decoding

2018-09-04 Thread Jan Beulich
>>> On 04.09.18 at 12:48, wrote: > On 29/08/18 15:25, Jan Beulich wrote: >> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >> @@ -650,7 +650,7 @@ union evex { >> uint8_t w:1; >> uint8_t opmsk:3; >> uint8_t RX:1; >> -

Re: [Xen-devel] [PATCH v6 05/14] public / x86: introduce __HYPERCALL_iommu_op

2018-09-04 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 04 September 2018 12:50 > To: Paul Durrant > Cc: Andrew Cooper ; Wei Liu > ; George Dunlap ; Ian > Jackson ; Stefano Stabellini > ; xen-devel ; > Konrad Rzeszutek Wilk ; Tim (Xen.org) > > Subject: Re: [PATCH v6

Re: [Xen-devel] [PATCH 1/5] xen/domain: Prepare data for is_{pv, hvm}_domain() as early as possible

2018-09-04 Thread Andrew Cooper
On 03/09/18 17:03, Jan Beulich wrote: >> --- a/xen/common/domain.c >> +++ b/xen/common/domain.c >> @@ -272,8 +272,12 @@ struct domain *domain_create(domid_t domid, >> if ( (d = alloc_domain_struct()) == NULL ) >> return ERR_PTR(-ENOMEM); >> >> +/* Sort out our idea of

Re: [Xen-devel] [PATCH v6 05/14] public / x86: introduce __HYPERCALL_iommu_op

2018-09-04 Thread Jan Beulich
>>> On 23.08.18 at 11:47, wrote: > --- /dev/null > +++ b/xen/common/iommu_op.c > @@ -0,0 +1,184 @@ > +/** > + * x86/iommu_op.c Oops? > +int do_one_iommu_op(xen_iommu_op_buf_t *buf) > +{ > +xen_iommu_op_t op; > +

[Xen-devel] [PATCH] libxl: create control/sysrq xenstore node

2018-09-04 Thread Vitaly Kuznetsov
'xl sysrq' command doesn't work with modern Linux guests with the following message in guest's log: xen:manage: sysrq_handler: Error -13 writing sysrq in control/sysrq xenstore trace confirms: IN 0x24bd9a0 20180904 04:36:32 WRITE (control/sysrq ) OUT 0x24bd9a0 20180904 04:36:32 ERROR (EACCES

Re: [Xen-devel] Xen Dom0 boot failure on platform that supports ARM GICv4

2018-09-04 Thread Julien Grall
On 09/03/2018 07:37 PM, Shameerali Kolothum Thodi wrote: > > >> -Original Message- >> From: Julien Grall [mailto:julien.gr...@arm.com] >> Sent: 03 September 2018 18:14 >> To: Shameerali Kolothum Thodi ; >> xen-de...@lists.xen.org >> Cc: sstabell...@kernel.org; Linuxarm ; Andre >>

Re: [Xen-devel] [PATCH v2 6/6] x86emul: generalize vector length handling for AVX512/EVEX

2018-09-04 Thread Andrew Cooper
On 29/08/18 15:25, Jan Beulich wrote: > @@ -2818,6 +2818,9 @@ x86_decode( > > opcode |= b | MASK_INSR(vex.pfx, X86EMUL_OPC_PFX_MASK); > > +if ( !evex.mbs ) This use of mbs is very confusing to read.  How about: #define evex_encoded evex.mbs which at least

Re: [Xen-devel] [PATCH v2 5/6] x86emul: correct EVEX decoding

2018-09-04 Thread Andrew Cooper
On 29/08/18 15:25, Jan Beulich wrote: > Fix an inverted pair of checks, drop an incorrect instance of #UD > raising for non-64-bit mode, and add further generic checks. > > Note: Other than SDM Vol 2 rev 067 states, EVEX.V' is _not_ ignored > outside of 64-bit mode when the field does not

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

2018-09-04 Thread osstest service owner
flight 127252 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/127252/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhvm-i386 10 debian-hvm-install fail REGR. vs. 127212

Re: [Xen-devel] [PATCH v6 04/14] iommu: don't domain_crash() inside iommu_map/unmap_page()

2018-09-04 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 04 September 2018 11:38 > To: Paul Durrant > Cc: Julien Grall ; Andrew Cooper > ; Wei Liu ; George > Dunlap ; Ian Jackson ; > Jun Nakajima ; Kevin Tian > ; Stefano Stabellini ; xen- > devel ; Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH v6 04/14] iommu: don't domain_crash() inside iommu_map/unmap_page()

2018-09-04 Thread Jan Beulich
>>> On 23.08.18 at 11:47, wrote: > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -1154,6 +1154,7 @@ map_grant_ref( > } > if ( err ) > { > +domu_crash(ld); > double_gt_unlock(lgt, rgt); You crash the domain with both locks

Re: [Xen-devel] [PATCH v6 03/14] iommu: push use of type-safe BFN and MFN into iommu_ops

2018-09-04 Thread Jan Beulich
>>> On 23.08.18 at 11:47, wrote: > This patch modifies the methods in struct iommu_ops to use type-safe BFN > and MFN. This follows on from the prior patch that modified the functions > exported in xen/iommu.h. > > Signed-off-by: Paul Durrant > Reviewed-by: Wei Liu > Reviewed-by: Kevin Tian

Re: [Xen-devel] [PATCH v6 02/14] iommu: make use of type-safe BFN and MFN in exported functions

2018-09-04 Thread Jan Beulich
>>> On 23.08.18 at 11:46, wrote: > This patch modifies the declaration of the entry points to the IOMMU > sub-system to use bfn_t and mfn_t in place of unsigned long. A subsequent > patch will similarly modify the methods in the iommu_ops structure. > > Signed-off-by: Paul Durrant >

Re: [Xen-devel] [PATCH v4] x86/hvm: remove default ioreq server (again)

2018-09-04 Thread Jan Beulich
>>> On 03.09.18 at 18:46, wrote: > My recent patch [1] to qemu-xen-traditional removes the last use of the > 'default' ioreq server in Xen. (This is a catch-all ioreq server that is > used if no explicitly registered I/O range is targetted). > > This patch can be applied once that patch is

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

2018-09-04 Thread Andrew Cooper
On 04/09/18 10:58, Jan Beulich wrote: > The generated header files are what needs to spell out dependencies on > other (real) headers in the main Makefile here, not the intermediate > (helper) .o files produced through testcase.mk. > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper

Re: [Xen-devel] [PATCH v2 1/2] x86/HVM: drop hvm_fetch_from_guest_linear()

2018-09-04 Thread Jan Beulich
>>> On 03.09.18 at 17:43, wrote: > It can easily be expressed through hvm_copy_from_guest_linear(), and in > two cases this even simplifies callers. > > Suggested-by: Paul Durrant > Signed-off-by: Jan Beulich > Reviewed-by: Andrew Cooper > --- > v2: Make sure this compiles standalone.

[Xen-devel] [PATCH] x86emul: fix test harness dependencies

2018-09-04 Thread Jan Beulich
The generated header files are what needs to spell out dependencies on other (real) headers in the main Makefile here, not the intermediate (helper) .o files produced through testcase.mk. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile

Re: [Xen-devel] [PATCH v2 2/2] xen: fill topology info for all present cpus

2018-09-04 Thread Julien Grall
Hi, On 09/04/2018 09:49 AM, Jan Beulich wrote: On 04.09.18 at 09:38, wrote: On 03/09/18 15:41, Jan Beulich wrote: On 31.08.18 at 17:22, wrote: The topology information obtainable via XEN_SYSCTL_cputopoinfo is filled rather weird: the size of the array is derived from the highest online cpu

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

2018-09-04 Thread osstest service owner
flight 127221 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/127221/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 10 debian-hvm-install fail REGR. vs. 125898

Re: [Xen-devel] [PATCH v6 01/14] iommu: introduce the concept of BFN...

2018-09-04 Thread Jan Beulich
>>> On 04.09.18 at 10:49, wrote: >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 04 September 2018 09:47 >> To: Kevin Tian >> Cc: Suravee Suthikulpanit ; Julien Grall >> ; Paul Durrant ; Stefano >> Stabellini ; xen-devel > de...@lists.xenproject.org> >>

  1   2   >