Re: [Xen-devel] [PATCH 1/7] Port WARN_ON_ONCE() from Linux

2018-02-09 Thread Roger Pau Monné
On Thu, Feb 08, 2018 at 08:10:49PM -0700, Sameer Goel wrote: > diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h > index 1d9771340c..697212a061 100644 > --- a/xen/include/xen/lib.h > +++ b/xen/include/xen/lib.h > @@ -11,6 +11,19 @@ > #define BUG_ON(p) do { if (unlikely(p)) BUG(); }

Re: [Xen-devel] [PATCH v2 1/4] asm-x86/monitor: Enable svm monitor events

2018-02-09 Thread George Dunlap
On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila wrote: > This commit separates the svm caps from the vmx caps. I can see how the patch relates to the description here, but it's not immediately clear how it relates to the title. A good "template" to start with for any

Re: [Xen-devel] [PATCH 6/7] drivers/passthrough/arm: Refactor code for arm smmu drivers

2018-02-09 Thread Roger Pau Monné
On Thu, Feb 08, 2018 at 08:10:54PM -0700, Sameer Goel wrote: > Pull common defines for SMMU drives in a local header. > > Signed-off-by: Sameer Goel > --- > xen/drivers/passthrough/arm/arm_smmu.h | 125 > + >

Re: [Xen-devel] [PATCH 6/7] drivers/passthrough/arm: Refactor code for arm smmu drivers

2018-02-09 Thread Julien Grall
Hi, On 02/09/2018 10:43 AM, Roger Pau Monné wrote: +unsigned int type; +}; + +#define resource_size(res) ((res)->size) + +#define platform_device device + +#define IORESOURCE_MEM 0 +#define IORESOURCE_IRQ 1 + +/* Stub out DMA domain related functions */ +#define iommu_get_dma_cookie(dom) 0

Re: [Xen-devel] [PATCH v2 1/4] asm-x86/monitor: Enable svm monitor events

2018-02-09 Thread George Dunlap
On Fri, Feb 9, 2018 at 10:28 AM, George Dunlap wrote: > On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila > wrote: >> This commit separates the svm caps from the vmx caps. > > I can see how the patch relates to the description here, but it's not >

Re: [Xen-devel] libxl - avoid calling block script

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 02:02:42AM +0100, Marek Marczykowski-Górecki wrote: > Hi, > > I'd like to avoid calling block script to speed up domain startup a > little (there may be multiple disks, all already being block devices). > Right now I have restored setting physical-device xenstore entry in

Re: [Xen-devel] libxl - avoid calling block script

2018-02-09 Thread Roger Pau Monné
Really adding Ian and Wei. On Fri, Feb 09, 2018 at 10:55:24AM +, Roger Pau Monné wrote: > On Fri, Feb 09, 2018 at 02:02:42AM +0100, Marek Marczykowski-Górecki wrote: > > Hi, > > > > I'd like to avoid calling block script to speed up domain startup a > > little (there may be multiple disks,

Re: [Xen-devel] [PATCH 1/2] make xen ocaml safe-strings compliant

2018-02-09 Thread Dario Faggioli
On Fri, 2018-02-09 at 09:20 +, Christian Lindig wrote: > > On 8. Feb 2018, at 18:24, Wei Liu wrote: > > > > Christian, do you have any idea when you can look into fixing the > > safe-string patch? > > Sorry, I can’t make a promise because of my other obligations. I do >

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

2018-02-09 Thread osstest service owner
flight 118670 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/118670/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 118630 test-armhf-armhf-libvirt 14

Re: [Xen-devel] [PATCH v2 2/4] hvm/svm: Enable Breakpoint events

2018-02-09 Thread George Dunlap
On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila wrote: > This commit enables the breakpoint events for svm. s/enable/implement/; -George ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH v2 3/4] hvm/svm: Enable MSR events

2018-02-09 Thread George Dunlap
On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila wrote: > This commit enables MSR events for svm. I'd probably say 'implement' here as well. Also, you don't need to repeat the title in the commit message. If there's nothing more to put into the commit message than is

Re: [Xen-devel] [PATCH 1/7] Port WARN_ON_ONCE() from Linux

2018-02-09 Thread Julien Grall
Hi, On 02/09/2018 10:29 AM, Roger Pau Monné wrote: On Thu, Feb 08, 2018 at 08:10:49PM -0700, Sameer Goel wrote: diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 1d9771340c..697212a061 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -11,6 +11,19 @@ #define

Re: [Xen-devel] [PATCH 1/7] Port WARN_ON_ONCE() from Linux

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 10:45:25AM +, Julien Grall wrote: > Hi, > > On 02/09/2018 10:29 AM, Roger Pau Monné wrote: > > On Thu, Feb 08, 2018 at 08:10:49PM -0700, Sameer Goel wrote: > > > diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h > > > index 1d9771340c..697212a061 100644 > > >

[Xen-devel] [PATCH V4] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-09 Thread Razvan Cojocaru
The emulation layers of Xen lack PCID support, and as we only offer PCID to HAP guests, all writes to CR3 are handled by hardware, except when introspection is involved. Consequently, trying to set CR3 when the noflush bit is set in hvm_set_cr3() leads to domain crashes. The workaround is to clear

Re: [Xen-devel] [PATCH 6/7] drivers/passthrough/arm: Refactor code for arm smmu drivers

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 10:51:01AM +, Julien Grall wrote: > Hi, > > On 02/09/2018 10:43 AM, Roger Pau Monné wrote: > > > +unsigned int type; > > > +}; > > > + > > > +#define resource_size(res) ((res)->size) > > > + > > > +#define platform_device device > > > + > > > +#define

Re: [Xen-devel] [PATCH v2 3/4] hvm/svm: Enable MSR events

2018-02-09 Thread Alexandru Stefan ISAILA
On Vi, 2018-02-09 at 10:37 +, George Dunlap wrote: > On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila > wrote: > > > > This commit enables MSR events for svm. > I'd probably say 'implement' here as well. > > Also, you don't need to repeat the title in the commit

Re: [Xen-devel] [PATCH] x86/hvm/dmop: Only copy what is needed to/from the guest

2018-02-09 Thread Paul Durrant
> -Original Message- > From: Ross Lagerwall [mailto:ross.lagerw...@citrix.com] > Sent: 09 February 2018 15:49 > To: Paul Durrant ; xen-de...@lists.xen.org > Cc: Jan Beulich ; Andrew Cooper > > Subject: Re: [PATCH]

Re: [Xen-devel] [PATCH v4 02/28] VIOMMU: Add vIOMMU framework and vIOMMU domctl

2018-02-09 Thread Chao Gao
On Fri, Feb 09, 2018 at 02:33:57PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:09PM +0800, Chao Gao wrote: >> From: Lan Tianyu >> >> This patch is to introduce an abstract layer for arch vIOMMU implementation >> and vIOMMU domctl to deal with requests from

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Marek Marczykowski-Górecki
On Fri, Feb 09, 2018 at 03:33:40PM +, Roger Pau Monné wrote: > I'm sorry, I'm a little foggy today. Does this mean the call to > libxl__xs_path_cleanup is simply not needed in > libxl__initiate_device_generic_remove? It is, it's an alternative to setting be/state=XenbusStateClosing, when

Re: [Xen-devel] [PATCH v2 15/15] xen/arm: psci: Prefix with static any functions not exported

2018-02-09 Thread Volodymyr Babchuk
On 08.02.18 21:22, Julien Grall wrote: A bunch of PSCI functions are not prefixed with static despite no one is using them outside the file and the prototype is not available in psci.h. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk

Re: [Xen-devel] [PATCH v2 14/15] xen/arm: psci: Consolidate PSCI version print

2018-02-09 Thread Volodymyr Babchuk
On 08.02.18 21:22, Julien Grall wrote: Xen is printing the same way the PSCI version for 0.1, 0.2 and later. The only different is the former is hardcoded. Furthermore PSCI is now used for other things than SMP bring up. So only print the PSCI version in psci_init. Signed-off-by: Julien

Re: [Xen-devel] [PATCH v2 4/4] hvm/svm: Enable CR events

2018-02-09 Thread George Dunlap
On Fri, Feb 9, 2018 at 1:10 PM, Alexandru Stefan ISAILA wrote: > On Jo, 2018-02-08 at 11:06 -0700, Tamas K Lengyel wrote: >> On Thu, Feb 8, 2018 at 8:25 AM, Alexandru Isaila >> wrote: >> > >> > This commit enables controlregister events for svm.

Re: [Xen-devel] [PATCH v2 09/15] xen/arm: psci: Detect SMCCC version

2018-02-09 Thread Volodymyr Babchuk
Julien, On 08.02.18 21:21, Julien Grall wrote: PSCI 1.0 and later allows the SMCCC version to be (indirectly) probed via PSCI_FEATURES. If the PSCI_FEATURES does not exist (PSCI 0.2 or earlier) and the function return an error, then we considered SMCCC 1.0 is implemented. Signed-off-by:

[Xen-devel] [RFC PATCH 33/49] ARM: new VGIC: Add PRIORITY registers handlers

2018-02-09 Thread Andre Przywara
The priority register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. There is a corner case when we change the priority of a pending interrupt which we don't handle at the moment.

[Xen-devel] [RFC PATCH 42/49] ARM: new VGIC: provide system register emulation stub

2018-02-09 Thread Andre Przywara
The Xen arch code traps system registers writes from the guest and will relay anything GIC related to the VGIC. Since this affects only GICv3 (which we don't yet emulate), provide a stub implementation of vgic_emulate() for now. Signed-off-by: Andre Przywara ---

[Xen-devel] [RFC PATCH 41/49] ARM: new VGIC: dump virtual IRQ info

2018-02-09 Thread Andre Przywara
When we dump guest state on the Xen console, we also print the state of IRQs that are on a VCPU. Add the code to dump the state of an IRQ handled by the new VGIC. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic.c | 13 + 1 file changed, 13

[Xen-devel] [RFC PATCH 44/49] ARM: new VGIC: vgic-init: register VGIC

2018-02-09 Thread Andre Przywara
This patch implements the function which is called by Xen when it wants to register the virtual GIC. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic-init.c | 62 +++ xen/arch/arm/vgic/vgic.h | 3 +++ 2 files

[Xen-devel] [RFC PATCH 47/49] ARM: new VGIC: Add vgic_v2_enable

2018-02-09 Thread Andre Przywara
Enable the VGIC operation by properly initialising the registers in the hypervisor GIC interface. This is based on Linux commit f7b6985cc3d0, written by Eric Auger. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic-v2.c | 13 +

[Xen-devel] [RFC PATCH 43/49] ARM: new VGIC: Add preliminary stub implementations

2018-02-09 Thread Andre Przywara
The Xen core code requires an interrupt controller emulation to implement arch_move_irqs(), to move the affinity of an hardware mapped virtual IRQ to another core. In the moment we don't implement this physical-follow-virtual regime in our new VGIC, so just provide an empty stub implementation to

[Xen-devel] [RFC PATCH 38/49] ARM: new VGIC: handle hardware mapped IRQs

2018-02-09 Thread Andre Przywara
The VGIC supports virtual IRQs to be connected to a hardware IRQ, so when a guest EOIs the virtual interrupt, it affects the state of that corresponding interrupt on the hardware side at the same time. Implement the interface that the Xen arch/core code expects to connect the virtual and the

[Xen-devel] [RFC PATCH 34/49] ARM: new VGIC: Add CONFIG registers handlers

2018-02-09 Thread Andre Przywara
The config register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. This is based on Linux commit 79717e4ac09c, written by Andre Przywara. Signed-off-by: Andre Przywara

[Xen-devel] [RFC PATCH 31/49] ARM: new VGIC: Add PENDING registers handlers

2018-02-09 Thread Andre Przywara
The pending register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. For level triggered interrupts the real line level is unaffected by this write, so we keep this state separate and

[Xen-devel] [RFC PATCH 49/49] ARM: VGIC: wire new VGIC(-v2) files into Xen build system

2018-02-09 Thread Andre Przywara
Now that we have both the old VGIC prepared to cope with a sibling and the code for the new VGIC in place, lets add a Kconfig option to enable the new code and wire it into the Xen build system. This will add a compile time option to use either the "old" or the "new" VGIC. In the moment this is

Re: [Xen-devel] [PATCH] x86/hvm/dmop: Only copy what is needed to/from the guest

2018-02-09 Thread Andrew Cooper
On 09/02/18 15:42, Paul Durrant wrote: >> -Original Message- >> From: Ross Lagerwall [mailto:ross.lagerw...@citrix.com] >> Sent: 09 February 2018 15:34 >> To: xen-de...@lists.xen.org >> Cc: Ross Lagerwall ; Jan Beulich >> ; Andrew Cooper

Re: [Xen-devel] [PATCH v2 08/15] xen/arm: smccc: Add macros SMCCC_VERSION, SMCCC_VERSION_{MINOR, MAJOR}

2018-02-09 Thread Volodymyr Babchuk
On 08.02.18 21:21, Julien Grall wrote: Add macros SMCCC_VERSION, SMCCC_VERSION_{MINOR, MAJOR} to easily convert between a 32-bit value and a version number. The encoding is based on 2.2.2 in "Firmware interfaces for mitigation CVE-2017-5715" (ARM DEN 0070A). Also re-use them to define

Re: [Xen-devel] [PATCH v4 03/28] VIOMMU: Add irq request callback to deal with irq remapping

2018-02-09 Thread Chao Gao
On Fri, Feb 09, 2018 at 03:02:03PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:10PM +0800, Chao Gao wrote: >> From: Lan Tianyu >> >> This patch is to add irq request callback for platform implementation >> to deal with irq remapping request. >> >>

Re: [Xen-devel] [PATCH v2 4/4] hvm/svm: Enable CR events

2018-02-09 Thread Tamas K Lengyel
On Thu, Feb 8, 2018 at 8:25 AM, Alexandru Isaila wrote: > This commit enables controlregister events for svm. > > Signed-off-by: Alexandru Isaila Acked-by: Tamas K Lengyel > --- > xen/arch/x86/hvm/svm/svm.c| 11

Re: [Xen-devel] [PATCH v2 4/4] hvm/svm: Enable CR events

2018-02-09 Thread Tamas K Lengyel
On Fri, Feb 9, 2018 at 6:10 AM, Alexandru Stefan ISAILA wrote: > On Jo, 2018-02-08 at 11:06 -0700, Tamas K Lengyel wrote: >> On Thu, Feb 8, 2018 at 8:25 AM, Alexandru Isaila >> wrote: >> > >> > This commit enables controlregister events for svm.

Re: [Xen-devel] Xen ARM community call Tuesday 13th February 5PM UTC

2018-02-09 Thread Mirela Simonovic
Hi, The proposed time works for me too. We would like to show you a demo, i. e. Xen suspend/resume in action on Xilinx's Zynq US+ MPSoC. I would need ~10 minutes for that. However, I need to screen share, so would it be possible to setup a call with the screen-sharing capability? Thanks, Mirela

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

2018-02-09 Thread Sameer Goel
On 1/23/2018 9:51 AM, Roger Pau Monné wrote: > 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

Re: [Xen-devel] [PATCH 6/7] drivers/passthrough/arm: Refactor code for arm smmu drivers

2018-02-09 Thread Sameer Goel
On 2/9/2018 3:51 AM, Julien Grall wrote: > >> >>> diff --git a/xen/drivers/passthrough/arm/smmu.c >>> b/xen/drivers/passthrough/arm/smmu.c >>> index ad956d5b8d..4c04391e21 100644 >>> --- a/xen/drivers/passthrough/arm/smmu.c >>> +++ b/xen/drivers/passthrough/arm/smmu.c >>> @@ -41,6 +41,7 @@ >>>  

Re: [Xen-devel] [GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Juergen Gross
On 09/02/18 19:48, Linus Torvalds wrote: > On Fri, Feb 9, 2018 at 6:28 AM, Juergen Gross wrote: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git >> for-linus-4.16-rc1-tag > > So I've pulled this, but the back-merges *really* annoy me. > > Seriously, DON'T DO

Re: [Xen-devel] [PATCH] xen/arm: Park CPUs with a MIDR different from the boot CPU.

2018-02-09 Thread Julien Grall
On 02/09/2018 07:02 PM, Stefano Stabellini wrote: On Fri, 9 Feb 2018, Julien Grall wrote: Hi, On 02/08/2018 11:49 PM, Stefano Stabellini wrote: On Thu, 1 Feb 2018, Julien Grall wrote: On 1 February 2018 at 19:37, Stefano Stabellini wrote: On Tue, 30 Jan 2018,

Re: [Xen-devel] [PATCH] xen/arm: Park CPUs with a MIDR different from the boot CPU.

2018-02-09 Thread Julien Grall
Hi, On 02/09/2018 07:10 PM, Stefano Stabellini wrote: On Fri, 9 Feb 2018, Julien Grall wrote: On 02/09/2018 07:02 PM, Stefano Stabellini wrote: On Fri, 9 Feb 2018, Julien Grall wrote: Hi, On 02/08/2018 11:49 PM, Stefano Stabellini wrote: On Thu, 1 Feb 2018, Julien Grall wrote: On 1

Re: [Xen-devel] [RFC PATCH 08/49] ARM: VGIC: move max_vcpus VGIC limit to struct arch_domain

2018-02-09 Thread Julien Grall
Hi, On 02/09/2018 02:38 PM, Andre Przywara wrote: The VGIC model used for a domain (GICv2 or GICv3) determines the maximum number of VCPUs for that guest, as GICv2 can only handle 8 processors. In the moment we carry this per-VGIC-model limit in the vgic_ops, alongside the model specific

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

2018-02-09 Thread osstest service owner
flight 118672 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/118672/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm 7 xen-boot fail REGR. vs. 118324

Re: [Xen-devel] [PATCH] xen/arm: Park CPUs with a MIDR different from the boot CPU.

2018-02-09 Thread Stefano Stabellini
On Fri, 9 Feb 2018, Julien Grall wrote: > Hi, > > On 02/08/2018 11:49 PM, Stefano Stabellini wrote: > > On Thu, 1 Feb 2018, Julien Grall wrote: > > > On 1 February 2018 at 19:37, Stefano Stabellini > > > wrote: > > > > On Tue, 30 Jan 2018, Julien Grall wrote: > > > > >

Re: [Xen-devel] [RFC PATCH 07/49] ARM: VGIC: move gic_remove_from_lr_pending() prototype

2018-02-09 Thread Julien Grall
Hi, On 02/09/2018 02:38 PM, Andre Przywara wrote: The prototype for gic_remove_from_lr_pending() is the last function in gic.h which references a VGIC data structure. Move it over to vgic.h, so that we can remove the inclusion of vgic.h from gic.h. We add it to asm/domain.h instead, where it is

Re: [Xen-devel] [RFC PATCH 01/49] tools: ARM: vGICv3: avoid inserting optional DT properties

2018-02-09 Thread Julien Grall
Hi, AFAICT, patch #1-#6 were sent separately and were reviewed. I will skip them for now, but please address the comments on the next version. Cheers, On 02/09/2018 02:38 PM, Andre Przywara wrote: When creating a GICv3 devicetree node, we currently insert the redistributor-stride and

Re: [Xen-devel] [PATCH v4 08/28] x86/vvtd: Add MMIO handler for VVTD

2018-02-09 Thread Roger Pau Monné
On Sat, Feb 10, 2018 at 01:21:09AM +0800, Chao Gao wrote: > On Fri, Feb 09, 2018 at 04:39:15PM +, Roger Pau Monné wrote: > >On Fri, Nov 17, 2017 at 02:22:15PM +0800, Chao Gao wrote: > >> This patch adds VVTD MMIO handler to deal with MMIO access. > >> > >> Signed-off-by: Chao Gao

Re: [Xen-devel] RTDS with extra time issue

2018-02-09 Thread Meng Xu
On Fri, Feb 9, 2018 at 10:56 AM, Andrii Anisov wrote: > Hello Meng Xu, > > > On 09.02.18 17:36, Meng Xu wrote: >> >> Another way to check if there is interference from services in domR is >> to set period = budget for the domR's VCPUs. > > Could you please explain how

Re: [Xen-devel] Xen ARM community call Tuesday 13th February 5PM UTC

2018-02-09 Thread Artem Mygaiev
Hi Juilen Time works for us. Do you think it is worth to discuss certification & AGL stuff? Best regards, -- Artem Mygaiev From: Mirela Simonovic Sent: Friday, February 9, 2018 7:53:28 PM To: Edgar Iglesias Cc: Julien Grall; Stefano

Re: [Xen-devel] RTDS with extra time issue

2018-02-09 Thread Andrii Anisov
Thank you, I'll take a look. On 09.02.18 19:53, Meng Xu wrote: Sure! It's attached. Meng -- *Andrii Anisov* ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Xen ARM community call Tuesday 13th February 5PM UTC

2018-02-09 Thread Stefano Stabellini
Hi Mirela, We can use my conferencing details this time, so that we can do screen sharing easily: Join the call: https://www.uberconference.com/stefano-stabellini Optional dial in number: 669-999-0613 No PIN needed I'll also reply to the first email from Julien in this thread with the

Re: [Xen-devel] [GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Linus Torvalds
On Fri, Feb 9, 2018 at 6:28 AM, Juergen Gross wrote: > > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-4.16-rc1-tag So I've pulled this, but the back-merges *really* annoy me. Seriously, DON'T DO MERGES IF YOU CANNOT EVEN BE BOTHERED TO WRITE A REASON

Re: [Xen-devel] [PATCH v4 11/28] x86/vvtd: Process interrupt remapping request

2018-02-09 Thread Roger Pau Monné
On Fri, Nov 17, 2017 at 02:22:18PM +0800, Chao Gao wrote: > When a remapping interrupt request arrives, remapping hardware computes the > interrupt_index per the algorithm described in VTD spec > "Interrupt Remapping Table", interprets the IRTE and generates a remapped > interrupt request. > >

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

2018-02-09 Thread Sameer Goel
On 1/23/2018 8:18 AM, Julien Grall wrote: > Hi Sameer, > > On 19/12/17 03:17, Sameer Goel wrote: >> +    if (!dtprop) >> +    return -EINVAL; >> + >> +    if (!dtprop->value) >> +    return -ENODATA; >> +    } >> + >> +    return ret; >> +} >> + >> +/* >> + * Xen: Helpers

Re: [Xen-devel] [PATCH] xen/arm: Park CPUs with a MIDR different from the boot CPU.

2018-02-09 Thread Stefano Stabellini
On Fri, 9 Feb 2018, Julien Grall wrote: > On 02/09/2018 07:02 PM, Stefano Stabellini wrote: > > On Fri, 9 Feb 2018, Julien Grall wrote: > > > Hi, > > > > > > On 02/08/2018 11:49 PM, Stefano Stabellini wrote: > > > > On Thu, 1 Feb 2018, Julien Grall wrote: > > > > > On 1 February 2018 at 19:37,

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

2018-02-09 Thread Julien Grall
Hi, I am slightly confused. I receive your answer on this e-mail after you resend a version. So were the comments on RFC v4 was addressed? On 02/09/2018 05:56 PM, Sameer Goel wrote:     /* Request interrupt lines */   irq = smmu->evtq.q.irq; @@ -2316,9 +2782,13 @@ static int

[Xen-devel] [xen-4.9-testing test] 118683: regressions - FAIL

2018-02-09 Thread osstest service owner
flight 118683 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/118683/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-xsm 5 host-ping-check-native fail REGR. vs. 118524

Re: [Xen-devel] [GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Linus Torvalds
On Fri, Feb 9, 2018 at 10:59 AM, Juergen Gross wrote: > > Do you want me to setup the patches for pulling again? No, I've pulled, I just don't want to see these unexplained merges again. Preferably I don't want to see back-merges at all, but when I do see them, I want to see an

Re: [Xen-devel] [PATCH v4 05/28] VIOMMU: Introduce callback of checking irq remapping mode

2018-02-09 Thread Roger Pau Monné
On Fri, Nov 17, 2017 at 02:22:12PM +0800, Chao Gao wrote: > From: Lan Tianyu > > This patch is to add callback for vIOAPIC and vMSI to check whether interrupt > remapping is enabled. Same as with the previous patches, not adding the actual code in check_irq_remapping makes

Re: [Xen-devel] [PATCH v4 01/28] Xen/doc: Add Xen virtual IOMMU doc

2018-02-09 Thread Chao Gao
On Fri, Feb 09, 2018 at 12:54:11PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:08PM +0800, Chao Gao wrote: >> From: Lan Tianyu >> >> This patch is to add Xen virtual IOMMU doc to introduce motivation, >> framework, vIOMMU hypercall and xl configuration. >>

Re: [Xen-devel] [PATCH v2 1/4] asm-x86/monitor: Enable svm monitor events

2018-02-09 Thread Tamas K Lengyel
On Fri, Feb 9, 2018 at 3:28 AM, George Dunlap wrote: > On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila > wrote: >> This commit separates the svm caps from the vmx caps. > > I can see how the patch relates to the description here, but it's not >

Re: [Xen-devel] [PATCH] [v2] xen: hypercall: fix out-of-bounds memcpy

2018-02-09 Thread Dan Williams
On Fri, Feb 9, 2018 at 6:21 AM, Arnd Bergmann wrote: > On Fri, Feb 9, 2018 at 3:13 PM, David Laight wrote: >> From: Arnd Bergmann >>> Sent: 09 February 2018 12:58 >> ... >>> However, aside from this driver, I wonder if we should be worried about >>>

Re: [Xen-devel] [PATCH v4 05/28] VIOMMU: Introduce callback of checking irq remapping mode

2018-02-09 Thread Chao Gao
On Fri, Feb 09, 2018 at 03:11:25PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:12PM +0800, Chao Gao wrote: >> From: Lan Tianyu >> >> This patch is to add callback for vIOAPIC and vMSI to check whether interrupt >> remapping is enabled. > >Same as with the

Re: [Xen-devel] [PATCH v4 07/28] x86/hvm: Introduce a emulated VTD for HVM

2018-02-09 Thread Chao Gao
On Fri, Feb 09, 2018 at 04:27:54PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:14PM +0800, Chao Gao wrote: >> This patch adds create/destroy function for the emulated VTD >> and adapts it to the common VIOMMU abstraction. >> >> As the Makefile is changed here, put all files in

Re: [Xen-devel] [PATCH] xen/arm: Park CPUs with a MIDR different from the boot CPU.

2018-02-09 Thread Julien Grall
Hi, On 02/08/2018 11:49 PM, Stefano Stabellini wrote: On Thu, 1 Feb 2018, Julien Grall wrote: On 1 February 2018 at 19:37, Stefano Stabellini wrote: On Tue, 30 Jan 2018, Julien Grall wrote: Xen does not properly support big.LITTLE platform. All vCPUs of a guest will

Re: [Xen-devel] [PATCH v4 06/28] vtd: clean-up and preparation for vvtd

2018-02-09 Thread Roger Pau Monné
On Fri, Nov 17, 2017 at 02:22:13PM +0800, Chao Gao wrote: > This patch contains following changes: > - align register definitions > - use MASK_EXTR to define some macros about extended capabilies > rather than open-coding the masks > - define fields of FECTL and FESTS as uint32_t rather than u64

Re: [Xen-devel] RTDS with extra time issue

2018-02-09 Thread Dario Faggioli
On Fri, 2018-02-09 at 17:03 +0200, Andrii Anisov wrote: > > If DomR is not able to get its share, then we have an issue/bug in > > the > > scheduler. If it does, then the scheduler is doing its job, and the > > issue may be somewhere else (e.g., something inside the guest may > > eat > > some of

Re: [Xen-devel] RTDS with extra time issue

2018-02-09 Thread Andrii Anisov
Hello Meng Xu, Thank you for your explanation. On 09.02.18 17:34, Meng Xu wrote: To make sure no deadline miss of a task on a VCPU, we must guarantee: 1) The VCPU gets its configured time, which is shown in your following emails that it does; 2) When the VCPU ​gets its configured time, the

Re: [Xen-devel] [PATCH v2 02/15] xen/arm: vpsci: Add support for PSCI 1.1

2018-02-09 Thread Julien Grall
On 02/09/2018 04:07 PM, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, On 08.02.18 21:21, Julien Grall wrote: At the moment, Xen provides virtual PSCI interface compliant with 0.1 and 0.2. Since them, the specification has been updated and the latest version is 1.1 (see ARM DEN 0022D).

Re: [Xen-devel] [PATCH v4 08/28] x86/vvtd: Add MMIO handler for VVTD

2018-02-09 Thread Roger Pau Monné
On Fri, Nov 17, 2017 at 02:22:15PM +0800, Chao Gao wrote: > This patch adds VVTD MMIO handler to deal with MMIO access. > > Signed-off-by: Chao Gao > Signed-off-by: Lan Tianyu > --- > v4: > - only trap the register emulated in vvtd_in_range(). >

Re: [Xen-devel] [PATCH v4 04/28] VIOMMU: Add get irq info callback to convert irq remapping request

2018-02-09 Thread Chao Gao
On Fri, Feb 09, 2018 at 03:06:07PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:11PM +0800, Chao Gao wrote: >> From: Lan Tianyu >> >> This patch is to add get_irq_info callback for platform implementation >> to convert irq remapping request to irq info (E,G

[Xen-devel] [RFC PATCH 40/49] ARM: new VGIC: Handle virtual IRQ allocation/reservation

2018-02-09 Thread Andre Przywara
To find an unused virtual IRQ number Xen uses a scheme to track used virtual IRQs. Implement this interface in the new VGIC to make the Xen core/arch code happy. This is actually somewhat VGIC agnostic, so is mostly a copy of the code from the old VGIC. But it has to live in the VGIC files, so we

[Xen-devel] [RFC PATCH 22/49] ARM: new VGIC: Implement virtual IRQ injection

2018-02-09 Thread Andre Przywara
Provide a vgic_queue_irq_unlock() function which decides whether a given IRQ needs to be queued to a VCPU's ap_list. This should be called whenever an IRQ becomes pending or enabled, either as a result of a hardware IRQ injection, from devices emulated by Xen (like the architected timer) or from

[Xen-devel] [RFC PATCH 11/49] ARM: VGIC: reorder prototypes in vgic.h

2018-02-09 Thread Andre Przywara
Currently vgic.h both contains prototypes used by Xen arch code outside of the actual VGIC (for instance vgic_vcpu_inject_irq()), and prototypes for functions used by the VGIC internally. Group them to later allow an easy split with one #ifdef. Signed-off-by: Andre Przywara

[Xen-devel] [RFC PATCH 39/49] ARM: new VGIC: Add event channel IRQ handling

2018-02-09 Thread Andre Przywara
The Xen core/arch code relies on two abstracted functions to inject an event channel IRQ and to query its pending state. Implement those to query the state of the new VGIC implementation. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic.c | 20

[Xen-devel] [RFC PATCH 48/49] ARM: allocate two pages for struct vcpu

2018-02-09 Thread Andre Przywara
At the moment we allocate exactly one page for struct vcpu on ARM, also have a check in place to prevent it growing beyond 4KB. As the struct includes the state of all 32 private (per-VCPU) interrupts, we are at 3840 bytes on arm64 at the moment already. Growing the per-IRQ VGIC structure even

[Xen-devel] [RFC PATCH 26/49] ARM: new VGIC: Implement vgic_vcpu_pending_irq

2018-02-09 Thread Andre Przywara
Tell Xen whether a particular VCPU has an IRQ that needs handling in the guest. This is used to decide whether a VCPU is runnable. This is based on Linux commit 90eee56c5f90, written by Eric Auger. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic.c | 32

[Xen-devel] [RFC PATCH 36/49] ARM: new VGIC: Add SGIR register handler

2018-02-09 Thread Andre Przywara
Triggering an IPI via this register is v2 specific, so the implementation lives entirely in vgic-mmio-v2.c. This is based on Linux commit 55cc01fb9004, written by Andre Przywara. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic-mmio-v2.c | 47

[Xen-devel] [RFC PATCH 28/49] ARM: new VGIC: Add GICv2 MMIO handling framework

2018-02-09 Thread Andre Przywara
Create vgic-mmio-v2.c to describe GICv2 emulation specific handlers using the initializer macros provided by the VGIC MMIO framework. Provide a function to register the GICv2 distributor registers to the Xen MMIO framework. The actual handler functions are still stubs in this patch. This is based

[Xen-devel] [RFC PATCH 24/49] ARM: new VGIC: Add IRQ sync/flush framework

2018-02-09 Thread Andre Przywara
Implement the framework for syncing IRQs between our emulation and the list registers, which represent the guest's view of IRQs. This is done in kvm_vgic_flush_hwstate and kvm_vgic_sync_hwstate, which gets called on guest entry and exit. The code talking to the actual GICv2/v3 hardware is added in

[Xen-devel] [RFC PATCH 20/49] ARM: new VGIC: Add data structure definitions

2018-02-09 Thread Andre Przywara
Add a new header file for the new and improved GIC implementation. The big change is that we now have a struct vgic_irq per IRQ instead of spreading all the information over various bitmaps in the ranks. We include this new header conditionally from within the old header file for the time being

[Xen-devel] [RFC PATCH 45/49] ARM: new VGIC: vgic-init: implement vgic_init

2018-02-09 Thread Andre Przywara
This patch allocates and initializes the data structures used to model the vgic distributor and virtual cpu interfaces. At that stage the number of IRQs and number of virtual CPUs is frozen. This is based on Linux commit ad275b8bb1e6, written by Eric Auger. Signed-off-by: Andre Przywara

[Xen-devel] [RFC PATCH 30/49] ARM: new VGIC: Add ENABLE registers handlers

2018-02-09 Thread Andre Przywara
As the enable register handlers are shared between the v2 and v3 emulation, their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic-mmio-v2.c | 4 +-

[Xen-devel] [RFC PATCH 23/49] ARM: new VGIC: Add IRQ sorting

2018-02-09 Thread Andre Przywara
Adds the sorting function to cover the case where you have more IRQs to consider than you have LRs. We consider their priorities. This pulls in Linux' list_sort.c , which is a merge sort implementation for linked lists. This is based on Linux commit 8e4447457965, written by Christoffer Dall.

[Xen-devel] [RFC PATCH 01/49] tools: ARM: vGICv3: avoid inserting optional DT properties

2018-02-09 Thread Andre Przywara
When creating a GICv3 devicetree node, we currently insert the redistributor-stride and #redistributor-regions properties, with fixed values which are actually the architected ones. But those properties are optional and only needed to cover for broken platforms, where the values differ from the

[Xen-devel] [RFC PATCH 46/49] ARM: new VGIC: vgic-init: implement map_resources

2018-02-09 Thread Andre Przywara
map_resources is the last initialization step needed before the first VCPU is run. At that stage the code stores the MMIO base addresses used. Also it registers the respective register frames with the MMIO framework. This is based on Linux commit cbae53e663ea, written by Eric Auger.

[Xen-devel] [RFC PATCH 27/49] ARM: new VGIC: Add MMIO handling framework

2018-02-09 Thread Andre Przywara
Add an MMIO handling framework to the VGIC emulation: Each register is described by its offset, size (or number of bits per IRQ, if applicable) and the read/write handler functions. We provide initialization macros to describe each GIC register later easily. Separate dispatch functions for read

[Xen-devel] [RFC PATCH 15/49] ARM: GIC: Allow tweaking the active state of an IRQ

2018-02-09 Thread Andre Przywara
When playing around with hardware mapped, level triggered virtual IRQs, there is the need to explicitly set the active state of an interrupt at some point in time. To prepare the GIC for that, we introduce a set_active_state() function to let the VGIC manipulate the state of an associated hardware

[Xen-devel] [RFC PATCH 13/49] ARM: VGIC: Add hypervisor base address to vgic_v2_setup_hw()

2018-02-09 Thread Andre Przywara
The new VGIC will need to know the hypervisor base address at some point, which is private to the hardware facing part of the VGIC so far. Add a parameter to vgic_v2_setup_hw() to pass this address on, so a VGIC implementation can make use of it. The current VGIC ignores this new parameter. TODO:

[Xen-devel] [RFC PATCH 04/49] ARM: GICv3: simplify GICv3 redistributor stride handling

2018-02-09 Thread Andre Przywara
Instead of hard coding the architected redistributor stride into the code, lets use a clear #define to the two values for GICv3 and GICv4 and clarify the algorithm to determine the needed stride value. Signed-off-by: Andre Przywara --- xen/arch/arm/gic-v3.c

[Xen-devel] [xen-4.10-testing test] 118673: regressions - trouble: blocked/broken/fail/pass

2018-02-09 Thread osstest service owner
flight 118673 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/118673/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken test-amd64-amd64-libvirt-xsm

Re: [Xen-devel] [PATCH v2 03/15] xen/arm: vsmc: Implement SMCCC 1.1

2018-02-09 Thread Julien Grall
On 02/09/2018 04:08 PM, Volodymyr Babchuk wrote: Hi, Hi Volodymyr, Thank you for the review. I have noticed that your e-mail client seem to mess up with the e-mail sent sometimes (see below). You may want to configure it to avoid that. Cheers, On 08.02.18 21:21, Julien Grall wrote:

Re: [Xen-devel] [PATCH v2 02/15] xen/arm: vpsci: Add support for PSCI 1.1

2018-02-09 Thread Volodymyr Babchuk
On 09.02.18 18:13, Julien Grall wrote: On 02/09/2018 04:07 PM, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, On 08.02.18 21:21, Julien Grall wrote: At the moment, Xen provides virtual PSCI interface compliant with 0.1 and 0.2. Since them, the specification has been updated and the

Re: [Xen-devel] [PATCH v2 07/15] xen/arm64: Print a per-CPU message with the BP hardening method used

2018-02-09 Thread Volodymyr Babchuk
On 08.02.18 21:21, Julien Grall wrote: This will make easier to know whether BP hardening has been enabled for a CPU and which method is used. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk --- Changes in v2: -

Re: [Xen-devel] [PATCH v4 09/28] x86/vvtd: Set Interrupt Remapping Table Pointer through GCMD

2018-02-09 Thread Roger Pau Monné
On Fri, Nov 17, 2017 at 02:22:16PM +0800, Chao Gao wrote: > Software sets SIRTP field of GCMD to set/update the interrupt remapping > table pointer used by hardware. The interrupt remapping table pointer is > specified through the Interrupt Remapping Table Address (IRTA_REG) > register. > > This

Re: [Xen-devel] [PATCH v4 02/28] VIOMMU: Add vIOMMU framework and vIOMMU domctl

2018-02-09 Thread Roger Pau Monné
On Fri, Nov 17, 2017 at 02:22:09PM +0800, Chao Gao wrote: > From: Lan Tianyu > > This patch is to introduce an abstract layer for arch vIOMMU implementation > and vIOMMU domctl to deal with requests from tool stack. Arch vIOMMU code > needs to > provide callback. vIOMMU

Re: [Xen-devel] RTDS with extra time issue

2018-02-09 Thread Andrii Anisov
Hello Dario, On 09.02.18 15:18, Dario Faggioli wrote: Ok, so you're giving: - 40% CPU time to Domain-0 - 50% CPU time to DomR - 40% CPU time to DomA - 40% CPU time to DomD total utilization is 170%. As far as I've understood you have 4 CPUs, right? If yes, there *should* be no problems. (Well,

  1   2   >