Re: [Xen-devel] [PATCH v2] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 15:36, wrote: > The following errors are generated when compiling Xen with clang 6: > > In file included from x86_64/asm-offsets.c:9: > In file included from /root/src/xen/xen/include/xen/sched.h:8: > In file included from /root/src/xen/xen/include/xen/shared.h:6: > In file inc

Re: [Xen-devel] [Xen EFI] Impossible to limit the dom0 memory

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 18:43, wrote: >> Yet you'll need to provide the kernel messages > > I attached a console log "xen-console-log.txt". > > Here, Xen crash even without the "dom0_mem=1G,max:1G" option : Xen doesn't crash at all. It's the Dom0 kernel which panics, but the log doesn't tell me why

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

2018-01-23 Thread osstest service owner
flight 118283 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/118283/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64-xsm 16 guest-localmigrate/x10 fail REGR. vs. 118250 Test

Re: [Xen-devel] Xen fails to boot inside QEMU on x86, no VMX:

2018-01-23 Thread Jan Beulich
>>> On 24.01.18 at 01:47, wrote: > On Tue, 23 Jan 2018, Jan Beulich wrote: >> >>> On 23.01.18 at 01:41, wrote: >> > On 23/01/2018 00:38, Stefano Stabellini wrote: >> >> On Tue, 23 Jan 2018, Andrew Cooper wrote: >> >>> On 22/01/2018 23:48, Stefano Stabellini wrote: >> Hi all, >> >>

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 18:33, wrote: > Well at very least there should be something in the boot scrool that > says, "Enabling Xen Pagetable protection (XPTI) for PV guests" or > something. (That goes for the current round of XPTI as well really.) And indeed I have this on my list of follow-up things

[Xen-devel] [PATCH AUTOSEL for 4.14 098/100] x86/xen: Support early interrupts in xen pv guests

2018-01-23 Thread Sasha Levin
From: Juergen Gross [ Upstream commit 42b3a4cb5609de757f5445fcad18945ba9239a07 ] Add early interrupt handlers activated by idt_setup_early_handler() to the handlers supported by Xen pv guests. This will allow for early WARN() calls not crashing the guest. Suggested-by: Andy Lutomirski Signed-o

[Xen-devel] pvscsi is not supported by xl command

2018-01-23 Thread Dongli Zhang
Hi Juergen, Would you please let me know if pvscsi is still supported by the most recent xen, as 'vscsi' is not supported in domU config file and scsi-attach/scsi-detach are not supported by xl command. Are scsi-attach/scsi-detach still on the roadmap and will be added to xl in the future, or thi

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

2018-01-23 Thread osstest service owner
flight 118281 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/118281/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-debianhvm-amd64 16 guest-localmigrate/x10 fail REGR. vs. 118174 test-a

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2018-01-23 Thread Boris Ostrovsky
On 01/18/2018 05:33 AM, Wei Liu wrote: > On Thu, Jan 18, 2018 at 11:31:32AM +0100, Juergen Gross wrote: >> Wei, >> >> On 01/12/17 15:14, Juergen Gross wrote: >>> Instead of locating the RSDP table below 1MB put it just below 4GB >>> like the rest of the ACPI tables in case of PVH guests. This will

Re: [Xen-devel] [PATCH v2 3/3] drop "domain_" prefix from struct domain's dirty CPU mask

2018-01-23 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, January 23, 2018 6:17 PM > > It being a field of struct domain is sufficient to recognize its > purpose. > > Signed-off-by: Jan Beulich > Reviewed-by: Wei Liu > Reviewed-by: George Dunlap > Reviewed-by: Andrew Cooper > --- > v2:

Re: [Xen-devel] Xen fails to boot inside QEMU on x86, no VMX:

2018-01-23 Thread Stefano Stabellini
On Tue, 23 Jan 2018, Jan Beulich wrote: > >>> On 23.01.18 at 01:41, wrote: > > On 23/01/2018 00:38, Stefano Stabellini wrote: > >> On Tue, 23 Jan 2018, Andrew Cooper wrote: > >>> On 22/01/2018 23:48, Stefano Stabellini wrote: > Hi all, > > Running Xen inside QEMU x86 without KVM acc

[Xen-devel] [linux-4.1 test] 118279: regressions - FAIL

2018-01-23 Thread osstest service owner
flight 118279 linux-4.1 real [real] http://logs.test-lab.xenproject.org/osstest/logs/118279/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64 15 guest-saverestore.2 fail REGR. vs. 117197 Tests which d

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

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

Re: [Xen-devel] [PATCH v9 06/11] x86/entry: Organise the use of MSR_SPEC_CTRL at each entry/exit point

2018-01-23 Thread Andrew Cooper
On 23/01/18 02:19, Boris Ostrovsky wrote: > > > On 01/22/2018 07:17 PM, Andrew Cooper wrote: >> On 22/01/2018 22:27, Boris Ostrovsky wrote: >>> On 01/19/2018 08:36 AM, Andrew Cooper wrote: On 19/01/18 11:43, Jan Beulich wrote: >> @@ -99,6 +106,10 @@ UNLIKELY_END(realmode) >>   .Lv

Re: [Xen-devel] [PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-01-23 Thread Ard Biesheuvel
On 12 January 2018 at 11:24, Daniel Kiper wrote: > Hi Ard, > > On Thu, Jan 11, 2018 at 12:51:07PM +, Ard Biesheuvel wrote: >> On 9 January 2018 at 14:22, Daniel Kiper wrote: >> > Hi, >> > >> > Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel >> > may not even know that

[Xen-devel] [examine test] 118286: tolerable ALL FAIL

2018-01-23 Thread osstest service owner
flight 118286 examine real [real] http://logs.test-lab.xenproject.org/osstest/logs/118286/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: examine-laxton1 2 hosts-allocatebroken blocked in 116480 examine-pinot02 hosts-all

[Xen-devel] [seabios test] 118280: regressions - FAIL

2018-01-23 Thread osstest service owner
flight 118280 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/118280/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 17 guest-stop fail REGR. vs. 115539 Tests which did not suc

Re: [Xen-devel] I only see one CPU core on Xen when booted via grub

2018-01-23 Thread Daniel Kiper
On Tue, Jan 23, 2018 at 01:03:04PM +0100, msd+xen-de...@msd.im wrote: > >I need at least GRUB2 version, Xen version > > ``` > # apt-cache policy grub2-common > grub2-common: > Installé : 2.02~beta3-5 > Candidat : 2.02~beta3-5 > Table de version : > *** 2.02~beta3-5 500 > 500 http://de

Re: [Xen-devel] [PATCH v4 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-23 Thread Wei Liu
On Tue, Jan 23, 2018 at 10:16:45AM -0700, Jan Beulich wrote: > >>> Wei Liu 01/23/18 4:44 PM >>> > On Tue, Jan 23, 2018 at 03:22:46PM +, Ross Lagerwall wrote: > >> --- a/xen/include/public/domctl.h > >> +++ b/xen/include/public/domctl.h > >> @@ -38,7 +38,7 @@ > >> #include "hvm/save.h" > >> #

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

2018-01-23 Thread osstest service owner
flight 118278 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/118278/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 118237 test-armhf-armhf-libvirt 14 saveresto

Re: [Xen-devel] [Xen EFI] Impossible to limit the dom0 memory

2018-01-23 Thread msd+xen-de...@msd.im
Yet you'll need to provide the kernel messages I attached a console log "xen-console-log.txt". Here, Xen crash even without the "dom0_mem=1G,max:1G" option : ``` # cat /boot/efi/EFI/xen/xen.cfg [global] default=xen [xen] options=loglvl=all com1=115200,8n1 console=com1,vga kernel=vmlinuz root=

Re: [Xen-devel] [PATCH v4] kexec-tools: Perform run-time linking of libxenctrl.so

2018-01-23 Thread Eric DeVolder
Daniel, I've implemented your feedback and posted the following: [PATCH v1] kexec-tools: Tweak run-time handling of libxenctrl.so Regards, eric On 01/18/2018 05:55 AM, Daniel Kiper wrote: On Wed, Jan 17, 2018 at 10:39:01AM -0600, Eric DeVolder wrote: When kexec is utilized in a Xen environmen

Re: [Xen-devel] [PATCH] x86: slightly reduce Meltdown band-aid overhead

2018-01-23 Thread George Dunlap
On 01/18/2018 03:39 PM, Jan Beulich wrote: > I'm not sure why I didn't do this right away: By avoiding to make any > of the cloned directmap PTEs global, there's no need to fiddle with > CR4.PGE on any of the entry paths. Only the exit paths need to flush > global mappings. > > The reduced flushin

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread George Dunlap
On 01/23/2018 04:56 PM, Juergen Gross wrote: > On 23/01/18 17:45, George Dunlap wrote: >> On 01/22/2018 06:39 PM, Andrew Cooper wrote: >>> Juergen: you're now adding a LTR into the context switch path which >>> tends to be very slow.  I.e. As currently presented, this series >>> necessarily has a h

Re: [Xen-devel] [PATCH v4 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-23 Thread Jan Beulich
>>> Wei Liu 01/23/18 4:44 PM >>> On Tue, Jan 23, 2018 at 03:22:46PM +, Ross Lagerwall wrote: >> --- a/xen/include/public/domctl.h >> +++ b/xen/include/public/domctl.h >> @@ -38,7 +38,7 @@ >> #include "hvm/save.h" >> #include "memory.h" >> >> -#define XEN_DOMCTL_INTERFACE_VERSION 0x000f

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread Juergen Gross
On 23/01/18 17:45, George Dunlap wrote: > On 01/22/2018 06:39 PM, Andrew Cooper wrote: >> Juergen: you're now adding a LTR into the context switch path which >> tends to be very slow.  I.e. As currently presented, this series >> necessarily has a higher runtime overhead than Jan's XPTI. > > So her

Re: [Xen-devel] [RFC v4 3/8] xen/linux_compat: Add a Linux compat header

2018-01-23 Thread Roger Pau Monné
On Mon, Dec 18, 2017 at 08:16:58PM -0700, Sameer Goel wrote: > For porting files directly from Linux it is useful to have a function mapping > definitions from Linux to Xen. This file adds common API functions and > other defines that are needed for porting arm SMMU drivers. It would be good that

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread George Dunlap
On 01/22/2018 06:39 PM, Andrew Cooper wrote: > On 22/01/18 16:51, Jan Beulich wrote: > On 22.01.18 at 16:00, wrote: >>> On 22/01/18 15:48, Jan Beulich wrote: >>> On 22.01.18 at 15:38, wrote: > On 22/01/18 15:22, Jan Beulich wrote: > On 22.01.18 at 15:18, wrote: >>> On 22/

Re: [Xen-devel] [RFC v4 3/8] xen/linux_compat: Add a Linux compat header

2018-01-23 Thread Wei Liu
On Mon, Dec 18, 2017 at 08:16:58PM -0700, Sameer Goel wrote: > For porting files directly from Linux it is useful to have a function mapping > definitions from Linux to Xen. This file adds common API functions and > other defines that are needed for porting arm SMMU drivers. > > Signed-off-by: Sam

Re: [Xen-devel] [RFC v4 1/8] Port WARN_ON_ONCE() from Linux

2018-01-23 Thread Wei Liu
On Mon, Dec 18, 2017 at 08:16:56PM -0700, Sameer Goel wrote: > Port WARN_ON_ONCE macro from Linux. > > Signed-off-by: Sameer Goel > --- > xen/include/xen/lib.h | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h > index ed00ae1379.

Re: [Xen-devel] [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740

2018-01-23 Thread Ross Lagerwall
On 01/22/2018 12:29 PM, Jan Beulich wrote: On 19.01.18 at 17:57, wrote: --- a/xen/arch/x86/shutdown.c +++ b/xen/arch/x86/shutdown.c @@ -511,6 +511,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"), },

Re: [Xen-devel] [PATCH v5] x86: relocate pvh_info

2018-01-23 Thread Wei Liu
On Tue, Jan 23, 2018 at 03:18:22PM +, Andrew Cooper wrote: > On 23/01/18 15:13, Wei Liu wrote: > > @@ -226,14 +259,27 @@ static multiboot_info_t *mbi2_reloc(u32 mbi_in) > > return mbi_out; > > } > > > > -multiboot_info_t __stdcall *reloc(u32 mb_magic, u32 mbi_in, u32 trampoline) > > +vo

Re: [Xen-devel] [PATCH v4 1/6] xen/mm: Make xenmem_add_to_physmap global

2018-01-23 Thread Wei Liu
On Tue, Jan 23, 2018 at 03:22:41PM +, Ross Lagerwall wrote: > Make it global in preparation to be called by a new dmop. > > Signed-off-by: Ross Lagerwall > Reviewed-by: Paul Durrant > Acked-by: Jan Beulich Acked-by: Wei Liu ___ Xen-devel mailin

Re: [Xen-devel] [PATCH v4 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-23 Thread Wei Liu
On Tue, Jan 23, 2018 at 03:47:52PM +, Ross Lagerwall wrote: > On 01/23/2018 03:44 PM, Wei Liu wrote: > > On Tue, Jan 23, 2018 at 03:22:46PM +, Ross Lagerwall wrote: > > > Remove the implementation of XEN_DOMCTL_pin_mem_cacheattr since it has > > > been replaced by a dmop. Change xc_domain_p

Re: [Xen-devel] [PATCH v4 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-23 Thread Ross Lagerwall
On 01/23/2018 03:44 PM, Wei Liu wrote: On Tue, Jan 23, 2018 at 03:22:46PM +, Ross Lagerwall wrote: Remove the implementation of XEN_DOMCTL_pin_mem_cacheattr since it has been replaced by a dmop. Change xc_domain_pin_memory_cacheattr() so that it is only defined when XC_WANT_COMPAT_DEVICEMODE

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

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

Re: [Xen-devel] [PATCH v4 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-23 Thread Wei Liu
On Tue, Jan 23, 2018 at 03:22:46PM +, Ross Lagerwall wrote: > Remove the implementation of XEN_DOMCTL_pin_mem_cacheattr since it has > been replaced by a dmop. Change xc_domain_pin_memory_cacheattr() so > that it is only defined when XC_WANT_COMPAT_DEVICEMODEL_API is set and > have it call the

Re: [Xen-devel] [RFC v4 8/8] drivers/passthrough/arm: Refactor code for arm smmu drivers

2018-01-23 Thread Julien Grall
Hi Sameer, On 19/12/17 03:17, Sameer Goel wrote: Pull common defines for SMMU drivers in a local header. I was expected to see this patch before SMMUv3 is added. But I am ok with that too. However, if you want to do some renaming this should be done separately. So it will be easier to know

Re: [Xen-devel] [RFC v4 7/8] xen/smmu: Add a new config define for legacy SMMU

2018-01-23 Thread Julien Grall
Hi Sameer, On 19/12/17 03:17, Sameer Goel wrote: Add a new config item to control compilation for legacy arm SMMU. Signed-off-by: Sameer Goel --- xen/drivers/passthrough/arm/Kconfig | 6 ++ xen/drivers/passthrough/arm/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) d

[Xen-devel] [PATCH v4 2/6] x86/hvm: Provide XEN_DMOP_relocate_memory

2018-01-23 Thread Ross Lagerwall
Provide XEN_DMOP_relocate_memory, a limited version of XENMEM_add_to_physmap to allow a deprivileged QEMU to move VRAM when a guest programs its BAR. It is equivalent to XENMEM_add_to_physmap with space == XENMAPSPACE_gmfn_range. Signed-off-by: Ross Lagerwall Reviewed-by: Paul Durrant --- Chang

[Xen-devel] [PATCH v4 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-23 Thread Ross Lagerwall
Remove the implementation of XEN_DOMCTL_pin_mem_cacheattr since it has been replaced by a dmop. Change xc_domain_pin_memory_cacheattr() so that it is only defined when XC_WANT_COMPAT_DEVICEMODEL_API is set and have it call the new dmop. Leave the definitions of XEN_DOMCTL_MEM_CACHEATTR_* since the

[Xen-devel] [PATCH v4 4/6] tools: libxendevicemodel: Provide xendevicemodel_relocate_memory

2018-01-23 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall Acked-by: Ian Jackson Reviewed-by: Paul Durrant --- Changed in v4: * Rename add_to_physmap to relocate_memory to match hypervisor interface. Changed in v3: * Match width of size with updated hypervisor interface. * Match description with the one for the hypervis

[Xen-devel] [PATCH v4 0/6] Add dmops to allow use of VGA with restricted QEMU

2018-01-23 Thread Ross Lagerwall
The recently added support for restricting QEMU prevents use of the VGA console. This series addresses that by adding a couple of new dmops. A corresponding patch for QEMU is needed to make use of the new dmops. Changes in v4: * Rename add_to_physmap -> relocate_memory. * Use continutation instead

[Xen-devel] [PATCH v4 5/6] tools: libxendevicemodel: Provide xendevicemodel_pin_memory_cacheattr

2018-01-23 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall Acked-by: Ian Jackson Reviewed-by: Paul Durrant --- tools/libs/devicemodel/core.c | 19 +++ tools/libs/devicemodel/include/xendevicemodel.h | 14 ++ tools/libs/devicemodel/libxendevicemodel.map| 1 + 3 files change

[Xen-devel] [PATCH v4 3/6] x86/hvm: Provide XEN_DMOP_pin_memory_cacheattr

2018-01-23 Thread Ross Lagerwall
Provide XEN_DMOP_pin_memory_cacheattr to allow a deprivileged QEMU to pin the caching type of RAM after moving the VRAM. It is equivalent to XEN_DOMCTL_pin_memory_cacheattr. Signed-off-by: Ross Lagerwall Reviewed-by: Paul Durrant Reviewed-by: Jan Beulich --- Changed in v2: * Check pad is 0.

[Xen-devel] [PATCH v4 1/6] xen/mm: Make xenmem_add_to_physmap global

2018-01-23 Thread Ross Lagerwall
Make it global in preparation to be called by a new dmop. Signed-off-by: Ross Lagerwall Reviewed-by: Paul Durrant Acked-by: Jan Beulich --- xen/common/memory.c | 5 ++--- xen/include/xen/mm.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/common/memory.c b/xen/com

Re: [Xen-devel] [PATCH v5] x86: relocate pvh_info

2018-01-23 Thread Andrew Cooper
On 23/01/18 15:13, Wei Liu wrote: > @@ -226,14 +259,27 @@ static multiboot_info_t *mbi2_reloc(u32 mbi_in) > return mbi_out; > } > > -multiboot_info_t __stdcall *reloc(u32 mb_magic, u32 mbi_in, u32 trampoline) > +void __stdcall *reloc(u32 magic, u32 in, u32 trampoline) As an final observati

Re: [Xen-devel] [PATCH v2] libxc: don't fail domain creation when unpacking initrd fails

2018-01-23 Thread Wei Liu
On Mon, Dec 04, 2017 at 05:46:41AM -0700, Jan Beulich wrote: > At least Linux kernels have been able to work with gzip-ed initrd for > quite some time; initrd compressed with other methods aren't even being > attempted to unpack. Furthermore the unzip-ing routine used here isn't > capable of dealin

Re: [Xen-devel] [RFC v4 6/8] xen/iommu: smmu-v3: Add Xen specific code to enable the ported driver

2018-01-23 Thread Julien Grall
Hi Sameer, On 19/12/17 03:17, Sameer Goel wrote: This driver follows an approach similar to smmu driver. The intent here is to reuse as much Linux code as possible. - Glue code has been introduced to bridge the API calls. - Called Linux functions from the Xen IOMMU function calls. - Xen modifica

[Xen-devel] [PATCH v5] x86: relocate pvh_info

2018-01-23 Thread Wei Liu
Modify early boot code to relocate pvh info as well, so that we can be sure __va in __start_xen works. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Roger Pau Monné v5: Include kconfig.h. Use IS_ENABLED. Adjust code. --- xen/arch/x86/boot/Makefile | 3 ++- xen/arch/x86/bo

[Xen-devel] [PATCH v8 10/11] vpci: add a priority parameter to the vPCI register initializer

2018-01-23 Thread Roger Pau Monne
This is needed for MSI-X, since MSI-X will need to be initialized before parsing the BARs, so that the header BAR handlers are aware of the MSI-X related holes and make sure they are not mapped in order for the trap handlers to work properly. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulic

[Xen-devel] [PATCH v8 07/11] vpci/bars: add handlers to map the BARs

2018-01-23 Thread Roger Pau Monne
Introduce a set of handlers that trap accesses to the PCI BARs and the command register, in order to snoop BAR sizing and BAR relocation. The command handler is used to detect changes to bit 2 (response to memory space accesses), and maps/unmaps the BARs of the device into the guest p2m. A rangese

[Xen-devel] [PATCH v8 09/11] vpci/msi: add MSI handlers

2018-01-23 Thread Roger Pau Monne
Add handlers for the MSI control, address, data and mask fields in order to detect accesses to them and setup the interrupts as requested by the guest. Note that the pending register is not trapped, and the guest can freely read/write to it. Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durra

[Xen-devel] [PATCH v8 02/11] x86/mmcfg: add handlers for the PVH Dom0 MMCFG areas

2018-01-23 Thread Roger Pau Monne
Introduce a set of handlers for the accesses to the MMCFG areas. Those areas are setup based on the contents of the hardware MMCFG tables, and the list of handled MMCFG areas is stored inside of the hvm_domain struct. The read/writes are forwarded to the generic vpci handlers once the address is d

[Xen-devel] [PATCH v8 01/11] vpci: introduce basic handlers to trap accesses to the PCI config space

2018-01-23 Thread Roger Pau Monne
This functionality is going to reside in vpci.c (and the corresponding vpci.h header), and should be arch-agnostic. The handlers introduced in this patch setup the basic functionality required in order to trap accesses to the PCI config space, and allow decoding the address and finding the correspo

[Xen-devel] [PATCH v8 04/11] pci: split code to size BARs from pci_add_device

2018-01-23 Thread Roger Pau Monne
So that it can be called from outside in order to get the size of regular PCI BARs. This will be required in order to map the BARs from PCI devices into PVH Dom0 p2m. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich --- Changes since v7: - Do not return error from pci_size_mem_bar in order to

[Xen-devel] [PATCH v8 11/11] vpci/msix: add MSI-X handlers

2018-01-23 Thread Roger Pau Monne
Add handlers for accesses to the MSI-X message control field on the PCI configuration space, and traps for accesses to the memory region that contains the MSI-X table and PBA. This traps detect attempts from the guest to configure MSI-X interrupts and properly sets them up. Note that accesses to t

[Xen-devel] [PATCH v8 08/11] x86/pt: mask MSI vectors on unbind

2018-01-23 Thread Roger Pau Monne
When a MSI device with per-vector masking capabilities is detected or added to Xen all the vectors are masked when initializing it. This implies that the first time the interrupt is bound to a domain it's masked. This however only applies to the first time the interrupt is bound because neither th

[Xen-devel] [PATCH v8 03/11] x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0

2018-01-23 Thread Roger Pau Monne
So that MMCFG regions not present in the MCFG ACPI table can be added at run time by the hardware domain. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v7: - Add newline in hvm_physdev_op for non-fallthrough case. Changes sinc

[Xen-devel] [PATCH v8 06/11] xen: introduce rangeset_consume_ranges

2018-01-23 Thread Roger Pau Monne
This function allows to iterate over a rangeset while removing the processed regions. This will be used in order to split processing of large memory areas when mapping them into the guest p2m. Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu --- Cc: George Dunlap Cc: Ian Jackson Cc: Jan Be

[Xen-devel] [PATCH v8 00/11] vpci: PCI config space emulation

2018-01-23 Thread Roger Pau Monne
Hello, The following series contain an implementation of handlers for the PCI configuration space inside of Xen. This allows Xen to detect accesses to the PCI configuration space and react accordingly. Why is this needed? IMHO, there are two main points of doing all this emulation inside of Xen,

[Xen-devel] [PATCH v8 05/11] pci: add support to size ROM BARs to pci_size_mem_bar

2018-01-23 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Cc: Jan Beulich --- Changes since v6: - Remove the rom local variable. Changes since v5: - Use the flags field. - Introduce a mask local variable. - Simplify return. Changes since v4: - New in this version. --- xen/drivers/passt

Re: [Xen-devel] PVH backports to 4.9 and 4.8

2018-01-23 Thread Simon Gaiser
George Dunlap: > On 01/23/2018 04:06 AM, Simon Gaiser wrote: >> George Dunlap: >>> Part of our solution to XSA-254 SP3 (aka "Meltdown") is to backport >>> the PVH mode from 4.10 to 4.9 and 4.8. This will first allow people >>> able to run PVH kernels to switch their PV guests directly to PVH >>> g

[Xen-devel] [PATCH v2] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Roger Pau Monne
The following errors are generated when compiling Xen with clang 6: In file included from x86_64/asm-offsets.c:9: In file included from /root/src/xen/xen/include/xen/sched.h:8: In file included from /root/src/xen/xen/include/xen/shared.h:6: In file included from /root/src/xen/xen/include/compat/ar

Re: [Xen-devel] [PATCH v2 3/3] drop "domain_" prefix from struct domain's dirty CPU mask

2018-01-23 Thread Boris Ostrovsky
On 01/23/2018 05:16 AM, Jan Beulich wrote: > It being a field of struct domain is sufficient to recognize its > purpose. > > Signed-off-by: Jan Beulich > Reviewed-by: Wei Liu > Reviewed-by: George Dunlap > Reviewed-by: Andrew Cooper > --- > v2: White space changes (consolidate split line statem

Re: [Xen-devel] [PATCH] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 14:54, wrote: > On Tue, Jan 23, 2018 at 06:34:44AM -0700, Jan Beulich wrote: >> >>> On 23.01.18 at 13:38, wrote: >> > Fix this by using pragma push/pop in order to store the current pragma >> > value in the compiler stack and later restoring it. >> >> For Linux this is fine al

Re: [Xen-devel] [PATCH] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Roger Pau Monné
On Tue, Jan 23, 2018 at 06:34:44AM -0700, Jan Beulich wrote: > >>> On 23.01.18 at 13:38, wrote: > > Fix this by using pragma push/pop in order to store the current pragma > > value in the compiler stack and later restoring it. > > For Linux this is fine all the way back to gcc 4.1 afaict, but wha

[Xen-devel] [PATCH] x86: avoid insn patching on fully async entry paths

2018-01-23 Thread Jan Beulich
As long as our patching logic isn't safe against concurrently occurring NMI or #MC we should avoid patching those paths. For sanity's sake also avoid this on the #DF entry path. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -698,7 +698,7 @@ ENT

Re: [Xen-devel] [Xen EFI] Impossible to limit the dom0 memory

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 12:18, wrote: > As explained on the Xen_EFI wiki page, I have added a line "options=" > into my file "/boot/efi/EFI/xen/xen.cfg" : > > ``` > # cat /boot/efi/EFI/xen/xen.cfg : > [global] > default=xen > > [xen] > options=dom0_mem=1G,max:1G > kernel=vmlinuz root=/dev/md2 ro roo

Re: [Xen-devel] [PATCH] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 13:38, wrote: > Fix this by using pragma push/pop in order to store the current pragma > value in the compiler stack and later restoring it. For Linux this is fine all the way back to gcc 4.1 afaict, but what about other OSes using gcc? In 4.1, only config/linux.h and a few spe

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread Juergen Gross
On 23/01/18 12:45, Andrew Cooper wrote: > On 23/01/18 10:10, Juergen Gross wrote: >> On 23/01/18 10:31, Jan Beulich wrote: >> On 23.01.18 at 10:24, wrote: On 23/01/18 09:53, Jan Beulich wrote: On 23.01.18 at 07:34, wrote: >> On 22/01/18 19:39, Andrew Cooper wrote: >>> On

Re: [Xen-devel] [PATCH v4 3/4] x86emul: Support vaes insns

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 13:56, wrote: > I did below TEMP patch, please help me check whther this patch meet your > requirements, many thanks! Looks reasonable at the first glance, provided you add a proper fall-through annotation to the new fall-through. Jan ___

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread Dario Faggioli
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey, Hi! On Mon, 2018-01-22 at 18:39 +, Andrew Cooper wrote: > > > > On 22.01.18 at 15:38, wrote: > > > I'm quite sure the performance will be much better as it doesn't > > > require > > > per physical cpu L4 page tables, but just a shadow L4 t

Re: [Xen-devel] [PATCH v2] libxc: don't fail domain creation when unpacking initrd fails

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 11:55, wrote: > On Mon, Dec 04, 2017 at 05:46:41AM -0700, Jan Beulich wrote: >> At least Linux kernels have been able to work with gzip-ed initrd for >> quite some time; initrd compressed with other methods aren't even being >> attempted to unpack. Furthermore the unzip-ing rout

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

2018-01-23 Thread osstest service owner
flight 118276 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/118276/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 118250 Tests which

Re: [Xen-devel] [PATCH v4] x86: relocate pvh_info

2018-01-23 Thread Jan Beulich
>>> On 23.01.18 at 12:44, wrote: > On Tue, Jan 23, 2018 at 02:14:51AM -0700, Jan Beulich wrote: >> >>> On 22.01.18 at 19:31, wrote: >> > On Mon, Jan 22, 2018 at 06:19:43PM +, Andrew Cooper wrote: >> >> On 22/01/18 18:17, Wei Liu wrote: >> >> > So you want reloc.o to contain pvh_info_reloc unc

Re: [Xen-devel] [PATCH v4 3/4] x86emul: Support vaes insns

2018-01-23 Thread Yang Zhong
On Thu, Jan 18, 2018 at 07:13:21AM -0700, Jan Beulich wrote: > >>> On 03.01.18 at 09:26, wrote: > > The previous aes insns only support legacy and AVX128. > > Icelake added AVX256 support. > > Same remark here as for the pclmulqdq patch. > > > Signed-off-by: Yang Zhong > > --- > > Please provi

[Xen-devel] [PATCH] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Roger Pau Monne
The following errors are generated when compiling Xen with clang 6: In file included from x86_64/asm-offsets.c:9: In file included from /root/src/xen/xen/include/xen/sched.h:8: In file included from /root/src/xen/xen/include/xen/shared.h:6: In file included from /root/src/xen/xen/include/compat/ar

Re: [Xen-devel] [RFC v4 2/8] xen/bitops: Rename LOG_2 to ilog2

2018-01-23 Thread Julien Grall
Hi Roger, On 23/01/18 12:10, Roger Pau Monné wrote: On Tue, Jan 23, 2018 at 11:44:30AM +, Julien Grall wrote: Hi Roger, On 23/01/18 11:39, Roger Pau Monné wrote: On Mon, Dec 18, 2017 at 08:16:57PM -0700, Sameer Goel wrote: diff --git a/xen/include/xen/bitops.h b/xen/include/xen/bitops.h

Re: [Xen-devel] [RFC v4 2/8] xen/bitops: Rename LOG_2 to ilog2

2018-01-23 Thread Roger Pau Monné
On Tue, Jan 23, 2018 at 11:44:30AM +, Julien Grall wrote: > Hi Roger, > > On 23/01/18 11:39, Roger Pau Monné wrote: > > On Mon, Dec 18, 2017 at 08:16:57PM -0700, Sameer Goel wrote: > > > diff --git a/xen/include/xen/bitops.h b/xen/include/xen/bitops.h > > > index e2019b02a3..a103e49089 100644

Re: [Xen-devel] [RFC v2] xen/arm: Suspend to RAM Support in Xen for ARM

2018-01-23 Thread Edgar E. Iglesias
On Tue, Jan 23, 2018 at 01:52:50PM +0200, Oleksandr Tyshchenko wrote: > Hi Mirela, > > Just some remarks regarding the scope of work: > > +In addition, the following have to be implemented: > +* Suspend/resume vCPU (triggered by vSYSTEM_SUSPEND call) > +* Suspend/resume Xen (triggered by vSYSTEM_

Re: [Xen-devel] [RFC v2] xen/arm: Suspend to RAM Support in Xen for ARM

2018-01-23 Thread Oleksandr Tyshchenko
Hi Mirela, Just some remarks regarding the scope of work: +In addition, the following have to be implemented: +* Suspend/resume vCPU (triggered by vSYSTEM_SUSPEND call) +* Suspend/resume Xen (triggered by vSYSTEM_SUSPEND called by Dom0), including: + * Disable wathdog on suspend, enable it

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread Andrew Cooper
On 23/01/18 10:10, Juergen Gross wrote: > On 23/01/18 10:31, Jan Beulich wrote: > On 23.01.18 at 10:24, wrote: >>> On 23/01/18 09:53, Jan Beulich wrote: >>> On 23.01.18 at 07:34, wrote: > On 22/01/18 19:39, Andrew Cooper wrote: >> One of my concerns is that this patch series moves

Re: [Xen-devel] [RFC v4 2/8] xen/bitops: Rename LOG_2 to ilog2

2018-01-23 Thread Julien Grall
Hi Roger, On 23/01/18 11:39, Roger Pau Monné wrote: On Mon, Dec 18, 2017 at 08:16:57PM -0700, Sameer Goel wrote: diff --git a/xen/include/xen/bitops.h b/xen/include/xen/bitops.h index e2019b02a3..a103e49089 100644 --- a/xen/include/xen/bitops.h +++ b/xen/include/xen/bitops.h @@ -223,7 +223,7 @@

Re: [Xen-devel] [PATCH v4] x86: relocate pvh_info

2018-01-23 Thread Wei Liu
On Tue, Jan 23, 2018 at 02:14:51AM -0700, Jan Beulich wrote: > >>> On 22.01.18 at 19:31, wrote: > > On Mon, Jan 22, 2018 at 06:19:43PM +, Andrew Cooper wrote: > >> On 22/01/18 18:17, Wei Liu wrote: > >> > So you want reloc.o to contain pvh_info_reloc unconditionally? > >> > > >> > Fundamentall

Re: [Xen-devel] [RFC v4 4/8] passthrough/arm: Modify SMMU driver to use generic device definition

2018-01-23 Thread Julien Grall
Hi Sameer, On 19/12/17 03:16, Sameer Goel wrote: Modify the SMMU code to use generic device instead of dt_device_node for functions that can be used for ACPI based systems too. Signed-off-by: Sameer Goel Acked-by: Julien Grall Cheers, --- xen/drivers/passthrough/arm/smmu.c | 12 ++-

Re: [Xen-devel] [RFC v4 2/8] xen/bitops: Rename LOG_2 to ilog2

2018-01-23 Thread Roger Pau Monné
On Mon, Dec 18, 2017 at 08:16:57PM -0700, Sameer Goel wrote: > diff --git a/xen/include/xen/bitops.h b/xen/include/xen/bitops.h > index e2019b02a3..a103e49089 100644 > --- a/xen/include/xen/bitops.h > +++ b/xen/include/xen/bitops.h > @@ -223,7 +223,7 @@ static inline __u32 ror32(__u32 word, unsigne

Re: [Xen-devel] [RFC v4 2/8] xen/bitops: Rename LOG_2 to ilog2

2018-01-23 Thread Julien Grall
Hi Sameer, On 19/12/17 03:16, Sameer Goel wrote: Changing the name of the macro from LOG_2 to ilog2.This makes the function name similar to its Linux counterpart. Since, this is not used in mutiple places, so the code churn is minimal. s/mutiple/multiple/ This change helps in porting unchan

Re: [Xen-devel] [RFC v4 1/8] Port WARN_ON_ONCE() from Linux

2018-01-23 Thread Julien Grall
Hi Sameer, On 19/12/17 03:16, Sameer Goel wrote: Port WARN_ON_ONCE macro from Linux. Signed-off-by: Sameer Goel --- xen/include/xen/lib.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index ed00ae1379..83206c0848 100644 --- a/

Re: [Xen-devel] I only see one CPU core on Xen when booted via grub

2018-01-23 Thread Daniel Kiper
On Tue, Jan 23, 2018 at 03:09:19AM -0700, Jan Beulich wrote: > >>> On 23.01.18 at 10:39, wrote: > >> ... your report is very likely duplicating earlier ones where the > >> ACPI root point cannot be found without it being properly > >> propagated through by grub from EFI to Xen. Iirc the only > >>

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

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

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread Andrew Cooper
On 23/01/18 08:36, Jan Beulich wrote: On 22.01.18 at 20:02, wrote: >> On 22/01/18 18:48, George Dunlap wrote: >>> On 01/22/2018 06:39 PM, Andrew Cooper wrote: Jan: As to the things not covered by the current XPTI, hiding most of the .text section is important to prevent fingerprinti

[Xen-devel] [Xen EFI] Impossible to limit the dom0 memory

2018-01-23 Thread msd+xen-de...@msd.im
Hi, I have configured Xen to boot directly from EFI (with `efibootmgr`). As explained on the Xen_EFI wiki page, I have added a line "options=" into my file "/boot/efi/EFI/xen/xen.cfg" : ``` # cat /boot/efi/EFI/xen/xen.cfg : [global] default=xen [xen] options=dom0_mem=1G,max:1G kernel=vmlinuz

Re: [Xen-devel] [PATCH v2 for-next 3/9] gcov: rename sysctl and functions

2018-01-23 Thread Ian Jackson
Jan Beulich writes ("Re: [Xen-devel] [PATCH v2 for-next 3/9] gcov: rename sysctl and functions"): > On 09.11.17 at 12:13, wrote: > > Change gcov to cov (for internal interfaces) or coverage (for the > > public ones). ... > Btw., I still have this (and subsequent patches in the series) on my > lis

Re: [Xen-devel] [PATCH RFC v2 00/12] xen/x86: use per-vcpu stacks for 64 bit pv domains

2018-01-23 Thread George Dunlap
On 01/22/2018 07:02 PM, Andrew Cooper wrote: > On 22/01/18 18:48, George Dunlap wrote: >> On 01/22/2018 06:39 PM, Andrew Cooper wrote: >>> On 22/01/18 16:51, Jan Beulich wrote: >>> On 22.01.18 at 16:00, wrote: > On 22/01/18 15:48, Jan Beulich wrote: > On 22.01.18 at 15:38, wrote:

Re: [Xen-devel] [PATCH v2 1/3] replace vCPU's dirty CPU mask by numeric ID

2018-01-23 Thread Julien Grall
Hi Jan, On 23/01/18 10:12, Jan Beulich wrote: At most one bit can be set in the masks, so especially on larger systems it's quite a bit of unnecessary memory and processing overhead to track the information as a mask. Store the numeric ID of the respective CPU instead, or VCPU_CPU_CLEAN if no di

Re: [Xen-devel] [PATCH v2 3/3] drop "domain_" prefix from struct domain's dirty CPU mask

2018-01-23 Thread Julien Grall
Hi Jan, On 23/01/18 10:16, Jan Beulich wrote: It being a field of struct domain is sufficient to recognize its purpose. Signed-off-by: Jan Beulich Reviewed-by: Wei Liu Reviewed-by: George Dunlap Reviewed-by: Andrew Cooper Acked-by: Julien Grall Cheers, --- v2: White space changes (cons

Re: [Xen-devel] [PATCH v2] libxc: don't fail domain creation when unpacking initrd fails

2018-01-23 Thread Roger Pau Monné
On Mon, Dec 04, 2017 at 05:46:41AM -0700, Jan Beulich wrote: > At least Linux kernels have been able to work with gzip-ed initrd for > quite some time; initrd compressed with other methods aren't even being > attempted to unpack. Furthermore the unzip-ing routine used here isn't > capable of dealin

Re: [Xen-devel] PVH backports to 4.9 and 4.8

2018-01-23 Thread George Dunlap
On 01/23/2018 04:06 AM, Simon Gaiser wrote: > George Dunlap: >> Part of our solution to XSA-254 SP3 (aka "Meltdown") is to backport >> the PVH mode from 4.10 to 4.9 and 4.8. This will first allow people >> able to run PVH kernels to switch their PV guests directly to PVH >> guests; and second, eve

Re: [Xen-devel] [PATCH v7 for-next 12/12] vpci/msix: add MSI-X handlers

2018-01-23 Thread Roger Pau Monné
On Wed, Dec 20, 2017 at 09:13:34AM -0700, Jan Beulich wrote: > >>> On 18.10.17 at 13:40, wrote: > > +if ( new_enabled && !new_masked && (!msix->enabled || msix->masked) ) > > +{ > > +for ( i = 0; i < msix->max_entries; i++ ) > > +{ > > +if ( msix->entries[i].mas

  1   2   >