Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Juergen Gross
On 18/12/2018 09:19, YueHaibing wrote: > Fix smatch warning: > > arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: > buffer overflow 'early_idt_handler_array' 32 <= 32 > > Fixes: 42b3a4cb5609 ("x86/xen: Support early interrupts in xen pv guests") > Signed-off-by: YueHaibing > --- >

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

2018-12-18 Thread osstest service owner
flight 131384 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131384/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-multivcpu 16 guest-start/debian.repeat fail in 131324 pass in 131384 test-armhf-armhf-xl

[Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread YueHaibing
Fix smatch warning: arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: buffer overflow 'early_idt_handler_array' 32 <= 32 Fixes: 42b3a4cb5609 ("x86/xen: Support early interrupts in xen pv guests") Signed-off-by: YueHaibing --- arch/x86/xen/enlighten_pv.c | 2 +- 1 file changed, 1

Re: [Xen-devel] [PATCH v2 2/3] drm/xen-front: Use Xen common shared buffer implementation

2018-12-18 Thread Oleksandr Andrushchenko
On 12/17/18 5:26 PM, Boris Ostrovsky wrote: On 12/17/18 10:03 AM, Oleksandr Andrushchenko wrote: On 12/17/18 4:52 PM, Boris Ostrovsky wrote: On 12/17/18 5:19 AM, Oleksandr Andrushchenko wrote: Hello, Juergen, Boris! As this DRM part of the series is the only one which needs ack/nack (and it

Re: [Xen-devel] MSR load lists on Harpertown

2018-12-18 Thread Andrew Cooper
On 18/12/2018 02:17, Tian, Kevin wrote: >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: Monday, December 17, 2018 10:21 PM >> >> On 17/12/2018 13:09, Andrew Cooper wrote: >>> On 17/12/2018 02:39, Tian, Kevin wrote: >>> After some investigation, it turns out that after

Re: [Xen-devel] MSR load lists on Harpertown

2018-12-18 Thread Jan Beulich
>>> On 18.12.18 at 10:56, wrote: > On 18/12/2018 02:17, Tian, Kevin wrote: >>> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >>> Sent: Monday, December 17, 2018 10:21 PM >>> >>> On 17/12/2018 13:09, Andrew Cooper wrote: On 17/12/2018 02:39, Tian, Kevin wrote: After some

Re: [Xen-devel] [PATCH] x86emul: fix 3-operand IMUL

2018-12-18 Thread Razvan Cojocaru
On 12/18/18 1:29 PM, Jan Beulich wrote: > While commit 75066cd4ea ("x86emul: fix {,i}mul and {,i}div") indeed did > as its title says, it broke the 3-operand form by uniformly using AL/AX/ > EAX/RAX as second source operand. Fix this and add tests covering both > cases. > > Reported-by: Andrei

Re: [Xen-devel] [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront

2018-12-18 Thread Roger Pau Monné
On Tue, Dec 18, 2018 at 08:55:38AM +0800, Dongli Zhang wrote: > The xenstore 'ring-page-order' is used globally for each blkback queue and > therefore should be read from xenstore only once. However, it is obtained > in read_per_ring_refs() which might be called multiple times during the >

Re: [Xen-devel] [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront

2018-12-18 Thread Dongli Zhang
Hi Roger, On 12/18/2018 05:33 PM, Roger Pau Monné wrote: > On Tue, Dec 18, 2018 at 08:55:38AM +0800, Dongli Zhang wrote: >> The xenstore 'ring-page-order' is used globally for each blkback queue and >> therefore should be read from xenstore only once. However, it is obtained >> in

Re: [Xen-devel] [PATCH] x86emul: fix 3-operand IMUL

2018-12-18 Thread Andrew Cooper
On 18/12/2018 11:29, Jan Beulich wrote: > While commit 75066cd4ea ("x86emul: fix {,i}mul and {,i}div") indeed did > as its title says, it broke the 3-operand form by uniformly using AL/AX/ > EAX/RAX as second source operand. Fix this and add tests covering both > cases. > > Reported-by: Andrei

Re: [Xen-devel] [PATCH for-4.12 v2 2/2] xen/arm: Stop relocating Xen

2018-12-18 Thread Julien Grall
On 12/18/18 12:09 PM, Andrii Anisov wrote: Hello Julien, Hi, On 17.12.18 19:34, Andrii Anisov wrote: I see something like following as a quick WA (not even build tested): diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d2c63a8..bf72ba9 100644 ---

Re: [Xen-devel] [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront

2018-12-18 Thread Roger Pau Monné
On Tue, Dec 18, 2018 at 10:33:00AM +0100, Roger Pau Monné wrote: > On Tue, Dec 18, 2018 at 08:55:38AM +0800, Dongli Zhang wrote: > > + for (i = 0; i < nr_grefs; i++) { > > + char ring_ref_name[RINGREF_NAME_LEN]; > > + > > + snprintf(ring_ref_name, RINGREF_NAME_LEN,

Re: [Xen-devel] [PATCH for-4.12 v2 2/2] xen/arm: Stop relocating Xen

2018-12-18 Thread Andrii Anisov
Hello Julien, On 17.12.18 19:34, Andrii Anisov wrote: I see something like following as a quick WA (not even build tested): diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d2c63a8..bf72ba9 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c

Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread YueHaibing
On 2018/12/18 16:31, Juergen Gross wrote: > On 18/12/2018 09:19, YueHaibing wrote: >> Fix smatch warning: >> >> arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: >> buffer overflow 'early_idt_handler_array' 32 <= 32 >> >> Fixes: 42b3a4cb5609 ("x86/xen: Support early interrupts in xen pv

Re: [Xen-devel] MSR load lists on Harpertown

2018-12-18 Thread Andrew Cooper
On 18/12/2018 11:37, Jan Beulich wrote: On 18.12.18 at 10:56, wrote: >> On 18/12/2018 02:17, Tian, Kevin wrote: From: Andrew Cooper [mailto:andrew.coop...@citrix.com] Sent: Monday, December 17, 2018 10:21 PM On 17/12/2018 13:09, Andrew Cooper wrote: > On 17/12/2018

[Xen-devel] [linux-4.14 test] 131385: regressions - FAIL

2018-12-18 Thread osstest service owner
flight 131385 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131385/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt 17 guest-start.2fail REGR. vs. 131318 Tests which did not

Re: [Xen-devel] [PATCH v2 08/10] libxl: Kill QEMU by uid when possible

2018-12-18 Thread Ian Jackson
George Dunlap writes ("Re: [PATCH v2 08/10] libxl: Kill QEMU by uid when possible"): > On 12/12/18 4:17 PM, Ian Jackson wrote: > > I am tempted to suggest replacing each call > > PROPAGATE_RC; > > with > > ACCUMULATE_RC(ddms); > > and put the definition in libxl_internal.h for use elsewhere.

Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Andrew Cooper
On 18/12/2018 10:42, YueHaibing wrote: > On 2018/12/18 16:31, Juergen Gross wrote: >> On 18/12/2018 09:19, YueHaibing wrote: >>> Fix smatch warning: >>> >>> arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: >>> buffer overflow 'early_idt_handler_array' 32 <= 32 >>> >>> Fixes: 42b3a4cb5609

[Xen-devel] [PATCH] x86emul: fix 3-operand IMUL

2018-12-18 Thread Jan Beulich
While commit 75066cd4ea ("x86emul: fix {,i}mul and {,i}div") indeed did as its title says, it broke the 3-operand form by uniformly using AL/AX/ EAX/RAX as second source operand. Fix this and add tests covering both cases. Reported-by: Andrei Lutas Signed-off-by: Jan Beulich ---

[Xen-devel] [PATCH for-4.12 v3] xen/arm: Stop relocating Xen

2018-12-18 Thread Julien Grall
At the moment, Xen is relocated towards the end of the memory. While this has the advantage to free space in low memory, the code is not compliant with the break-before-make because it requires to switch between two sets of page-table. This is not entirely trivial to fix as it would require us to

Re: [Xen-devel] [PATCH] x86emul: permit SAE for V{,U}COMIS{S,D}

2018-12-18 Thread Andrew Cooper
On 10/12/2018 13:56, Jan Beulich wrote: On 10.12.18 at 14:20, wrote: >> On 10/12/2018 11:32, Jan Beulich wrote: >>> The avx512_vlen_check() invocation needs to be conditional. >>> >>> Signed-off-by: Jan Beulich >> I'm not sure if I've asked before, but do LIG instructions really #UD >> for

Re: [Xen-devel] [PATCH] x86emul: permit SAE for V{,U}COMIS{S,D}

2018-12-18 Thread Jan Beulich
>>> On 18.12.18 at 15:28, wrote: > On 10/12/2018 13:56, Jan Beulich wrote: > On 10.12.18 at 14:20, wrote: >>> On 10/12/2018 11:32, Jan Beulich wrote: The avx512_vlen_check() invocation needs to be conditional. Signed-off-by: Jan Beulich >>> I'm not sure if I've asked before,

Re: [Xen-devel] [PATCH 00/41] scsi: Mark expected switch fall-throughs

2018-12-18 Thread Gustavo A. R. Silva
Hi Martin, Friendly ping: Only 8 out the 41 patches in this series have been applied so far. I wonder if you could apply the rest of this series, except: [PATCH 02/41] scsi: NCR5380: Mark expected switch fall-through (I'll send a v2 of this patch) Thanks -- Gustavo On 11/27/18 10:18 PM,

Re: [Xen-devel] [PATCH v2] x86emul: fix vector-length check for AVX512F scalar fused-multiply-add insns

2018-12-18 Thread Andrew Cooper
On 11/12/2018 08:48, Jan Beulich wrote: > The check needs to happen whenever EVEX.b (SDM nomenclature) is clear, > not just in the memory operand case. > > Signed-off-by: Jan Beulich > --- > v2: Clarify naming (to address apparent disconnect between description > and code change). Thanks -

Re: [Xen-devel] [PATCH v2] x86emul: avoid triggering assertions with VME/PVI early #GP check

2018-12-18 Thread Andrew Cooper
On 11/12/2018 08:47, Jan Beulich wrote: > In commit efe9cba66c ("x86emul: VME and PVI modes require a #GP(0) check > first thing") I neglected the fact that the retire flags get zapped only > in x86_decode(), which hasn't been invoked yet at the point of the #GP(0) > check added. Move output state

Re: [Xen-devel] [PATCH] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Jan Beulich
>>> On 14.12.18 at 18:17, wrote: > Allow altp2m users to disable #VE/VMFUNC alone. Currently it is > only possible to disable this functionality when we disable altp2m > completely; #VE/VMFUNC can only be enabled once per altp2m session. > > In addition to making things complete, disabling #VE

[Xen-devel] [PATCH v3 2/2] libxl: don't reset device when it is accessible by the guest

2018-12-18 Thread Chao Gao
When I destroyed a guest with 'xl destroy', I found the warning in msi_set_mask_bit() in Xen was triggered. After adding "WARN_ON(1)" to that place, I got the call trace below: (XEN) Xen call trace: (XEN)[] msi.c#msi_set_mask_bit+0x1da/0x29b (XEN)[] guest_mask_msi_irq+0x1c/0x1e (XEN)

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

2018-12-18 Thread Chao Gao
I find some pass-thru devices don't work any more across guest reboot. Assigning it to another domain also meets the same issue. And the only way to make it work again is un-binding and binding it to pciback. Someone reported this issue one year ago [1]. If the device's driver doesn't disable

[Xen-devel] [PATCH V2] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
Allow altp2m users to disable #VE/VMFUNC alone. Currently it is only possible to disable this functionality when we disable altp2m completely; #VE/VMFUNC can only be enabled once per altp2m session. In addition to making things complete, disabling #VE is also a workaround for CFW116 ("When

[Xen-devel] [PATCH] xen/netfront: tolerate frags with no data

2018-12-18 Thread Juergen Gross
At least old Xen net backends seem to send frags with no real data sometimes. In case such a fragment happens to occur with the frag limit already reached the frontend will BUG currently even if this situation is easily recoverable. Modify the BUG_ON() condition accordingly. Cc:

[Xen-devel] [PATCH V3] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
Allow altp2m users to disable #VE/VMFUNC alone. Currently it is only possible to disable this functionality when we disable altp2m completely; #VE/VMFUNC can only be enabled once per altp2m session. In addition to making things complete, disabling #VE is also a workaround for CFW116 ("When

Re: [Xen-devel] [PATCH v2 6/5] tools/docs: Remove PVRDTSCP remnants

2018-12-18 Thread Ian Jackson
Andrew Cooper writes ("[Xen-devel] [PATCH v2 6/5] tools/docs: Remove PVRDTSCP remnants"): > PVRDTSCP is believed-unused, and its implementation has adverse consequences > on unrelated functionality in the hypervisor. As a result, support has been > removed. Acked-by: Ian Jackson

Re: [Xen-devel] [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront

2018-12-18 Thread Dongli Zhang
On 12/18/2018 11:13 PM, Roger Pau Monné wrote: > On Tue, Dec 18, 2018 at 07:31:59PM +0800, Dongli Zhang wrote: >> Hi Roger, >> >> On 12/18/2018 05:33 PM, Roger Pau Monné wrote: >>> On Tue, Dec 18, 2018 at 08:55:38AM +0800, Dongli Zhang wrote: The xenstore 'ring-page-order' is used globally

Re: [Xen-devel] [PATCH] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
On 12/18/18 4:10 PM, Jan Beulich wrote: On 14.12.18 at 18:17, wrote: >> Allow altp2m users to disable #VE/VMFUNC alone. Currently it is >> only possible to disable this functionality when we disable altp2m >> completely; #VE/VMFUNC can only be enabled once per altp2m session. >> >> In

Re: [Xen-devel] [PATCH] x86emul: work around SandyBridge errata

2018-12-18 Thread Andrew Cooper
On 11/12/2018 08:50, Jan Beulich wrote: > There are a number of exception condition related errata on SandyBridge > CPUs, some of which are unexpected #UD (others, of no interest here, are > lack of mandated exceptions, or exceptions of unexpected type). Annotate > the one workaround we already

Re: [Xen-devel] [PATCH V2] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
On 12/18/18 4:54 PM, Razvan Cojocaru wrote: > Allow altp2m users to disable #VE/VMFUNC alone. Currently it is > only possible to disable this functionality when we disable altp2m > completely; #VE/VMFUNC can only be enabled once per altp2m session. > > In addition to making things complete,

Re: [Xen-devel] [PATCH for-4.12 v3] xen/arm: Stop relocating Xen

2018-12-18 Thread Andrii Anisov
On 18.12.18 15:07, Julien Grall wrote: At the moment, Xen is relocated towards the end of the memory. While this has the advantage to free space in low memory, the code is not compliant with the break-before-make because it requires to switch between two sets of page-table. This is not

Re: [Xen-devel] [PATCH v2 05/10] libxl: Do root checks once in libxl__domain_get_device_model_uid

2018-12-18 Thread Ian Jackson
George Dunlap writes ("Re: [PATCH v2 05/10] libxl: Do root checks once in libxl__domain_get_device_model_uid"): > On Dec 12, 2018, at 3:45 PM, Ian Jackson wrote: > >> +/* > >> + * If dm_restrict isn't set, and we don't have a specified user, don't > >> + * bother setting a `-runas`

Re: [Xen-devel] [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront

2018-12-18 Thread Roger Pau Monné
On Tue, Dec 18, 2018 at 07:31:59PM +0800, Dongli Zhang wrote: > Hi Roger, > > On 12/18/2018 05:33 PM, Roger Pau Monné wrote: > > On Tue, Dec 18, 2018 at 08:55:38AM +0800, Dongli Zhang wrote: > >> The xenstore 'ring-page-order' is used globally for each blkback queue and > >> therefore should be

Re: [Xen-devel] [PATCH v7 3/6] xen/arm: zynqmp: introduce zynqmp specific defines

2018-12-18 Thread Julien Grall
Hi Stefano, On 12/17/18 10:10 PM, Stefano Stabellini wrote: From: "Edgar E. Iglesias" From: Edgar E. Iglesias Introduce zynqmp specific defines for the firmware calls. See EEMI: https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf The error codes are described,

[Xen-devel] [QEMU PATCH] block: Remove blk_attach_dev_legacy() / legacy_dev code

2018-12-18 Thread Thomas Huth
The last user of blk_attach_dev_legacy() is the code in xen_disk.c. It passes a pointer to a XenBlkDev as second parameter. XenBlkDev is derived from XenDevice which in turn is derived from DeviceState since commit 3a6c9172ac5951e ("xen: create qdev for each backend device"). Thus the code can

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

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

Re: [Xen-devel] [PATCH for-4.12 v3 3/5] xen/arm: p2m: Add support for preemption in p2m_cache_flush_range

2018-12-18 Thread Julien Grall
Hi Stefano, On 12/14/18 9:27 PM, Stefano Stabellini wrote: On Fri, 14 Dec 2018, Julien Grall wrote: diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 17e2523fc1..5639e4b64c 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1524,13 +1524,17 @@ int

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

2018-12-18 Thread Jan Beulich
>>> On 18.12.18 at 15:43, wrote: > I find some pass-thru devices don't work any more across guest > reboot. Assigning it to another domain also meets the same issue. And > the only way to make it work again is un-binding and binding it to > pciback. Someone reported this issue one year ago [1]. >

Re: [Xen-devel] [PATCH v7 6/6] xen/zynqmp: add IPI calls virtualization

2018-12-18 Thread Julien Grall
Hi Stefano, On 12/17/18 10:10 PM, Stefano Stabellini wrote: ZynqMP IPI mailbox calls are a small set of EEMI sister calls, often used in conjunction with EEMI related functionalities. Unfortunately they are not part of the EEMI spec, or any other public spec, but the implementation is upstream

Re: [Xen-devel] [PATCH v7 5/6] xen/arm: zynqmp: Remove blacklist of ZynqMP's PM node

2018-12-18 Thread Julien Grall
Hi Stefano, On 12/17/18 10:10 PM, Stefano Stabellini wrote: From: "Edgar E. Iglesias" From: Edgar E. Iglesias Stop blacklisting ZynqMP's power management node. It is now possible since we allow the hardware domain to issue HVC/SMC calls to firmware. Signed-off-by: Edgar E. Iglesias

Re: [Xen-devel] [PATCH v7 4/6] xen/arm: zynqmp: implement zynqmp_eemi

2018-12-18 Thread Julien Grall
Hi Stefano, On 12/17/18 10:10 PM, Stefano Stabellini wrote: +/* These calls are safe and always allowed. */ +case EEMI_FID(ZYNQMP_SIP_SVC_CALL_COUNT): +case EEMI_FID(ZYNQMP_SIP_SVC_UID): +case EEMI_FID(ZYNQMP_SIP_SVC_VERSION): I am a bit surprised that you implement those one

Re: [Xen-devel] [PATCH v2 2/3] drm/xen-front: Use Xen common shared buffer implementation

2018-12-18 Thread Noralf Trønnes
Den 30.11.2018 08.42, skrev Oleksandr Andrushchenko: From: Oleksandr Andrushchenko Use page directory based shared buffer implementation now available as common code for Xen frontend drivers. Remove flushing of shared buffer on page flip as this workaround needs a proper fix. Signed-off-by:

Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Boris Ostrovsky
On 12/18/18 6:28 AM, Andrew Cooper wrote: > On 18/12/2018 10:42, YueHaibing wrote: >> On 2018/12/18 16:31, Juergen Gross wrote: >>> On 18/12/2018 09:19, YueHaibing wrote: Fix smatch warning: arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: buffer overflow

Re: [Xen-devel] [PATCH v7 2/6] xen/arm: zynqmp: Forward plaform specific firmware calls

2018-12-18 Thread Julien Grall
Hi Stefano, On 12/17/18 10:10 PM, Stefano Stabellini wrote: diff --git a/xen/arch/arm/platforms/xilinx-zynqmp.c b/xen/arch/arm/platforms/xilinx-zynqmp.c index d8ceded..8bc7a9f 100644 --- a/xen/arch/arm/platforms/xilinx-zynqmp.c +++ b/xen/arch/arm/platforms/xilinx-zynqmp.c @@ -18,6 +18,8 @@

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

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

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

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

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

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

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

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

Re: [Xen-devel] [PATCH v7 4/6] xen/arm: zynqmp: implement zynqmp_eemi

2018-12-18 Thread Julien Grall
Hi, On 12/17/18 10:10 PM, Stefano Stabellini wrote: +/* These calls are safe and always allowed. */ +case EEMI_FID(ZYNQMP_SIP_SVC_CALL_COUNT): +case EEMI_FID(ZYNQMP_SIP_SVC_UID): +case EEMI_FID(ZYNQMP_SIP_SVC_VERSION): +case EEMI_FID(PM_GET_TRUSTZONE_VERSION): +case

[Xen-devel] [linux-4.9 test] 131386: regressions - FAIL

2018-12-18 Thread osstest service owner
flight 131386 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131386/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm 10 debian-hvm-install fail REGR. vs. 131317

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

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

Re: [Xen-devel] [PATCH for-4.12 v3 4/5] xen/arm: Implement Set/Way operations

2018-12-18 Thread Julien Grall
Hi Andrew, On 12/14/18 9:31 PM, Andrew Cooper wrote: On 14/12/2018 03:58, Julien Grall wrote: Set/Way operations are used to perform maintenance on a given cache. At the moment, Set/Way operations are not trapped and therefore a guest OS will directly act on the local cache. However, a vCPU

[Xen-devel] [PATCH for-4.12 v4 2/4] xen/arm: vsysreg: Add wrapper to handle sysreg access trapped by HCR_EL2.TVM

2018-12-18 Thread Julien Grall
A follow-up patch will require to emulate some accesses to system registers trapped by HCR_EL2.TVM. When set, all NS EL1 writes to the virtual memory control registers will be trapped to the hypervisor. This patch adds the infrastructure to passthrough the access to the host registers. Note that

[Xen-devel] [PATCH for-4.12 v4 4/4] xen/arm: Track page accessed between batch of Set/Way operations

2018-12-18 Thread Julien Grall
At the moment, the implementation of Set/Way operations will go through all the entries of the guest P2M and flush them. However, this is very expensive and may render unusable a guest OS using them. For instance, Linux 32-bit will use Set/Way operations during secondary CPU bring-up. As the

[Xen-devel] [PATCH for-4.12 v4 0/4] xen/arm: Implement Set/Way operations

2018-12-18 Thread Julien Grall
Hi all, This is version 3 of the series to implement set/way. For more details see patch #3. Cheers, Julien Grall (4): xen/arm: vcpreg: Add wrappers to handle co-proc access trapped by HCR_EL2.TVM xen/arm: vsysreg: Add wrapper to handle sysreg access trapped by HCR_EL2.TVM

[Xen-devel] [PATCH for-4.12 v4 3/4] xen/arm: Implement Set/Way operations

2018-12-18 Thread Julien Grall
Set/Way operations are used to perform maintenance on a given cache. At the moment, Set/Way operations are not trapped and therefore a guest OS will directly act on the local cache. However, a vCPU may migrate to another pCPU in the middle of the processor. This will result to have cache with

[Xen-devel] [PATCH for-4.12 v4 1/4] xen/arm: vcpreg: Add wrappers to handle co-proc access trapped by HCR_EL2.TVM

2018-12-18 Thread Julien Grall
A follow-up patch will require to emulate some accesses to some co-processors registers trapped by HCR_EL2.TVM. When set, all NS EL1 writes to the virtual memory control registers will be trapped to the hypervisor. This patch adds the infrastructure to passthrough the access to host registers.

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

2018-12-18 Thread osstest service owner
flight 131392 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/131392/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-raw 13 saverestore-support-checkfail like 131364 test-armhf-armhf-libvirt 14

Re: [Xen-devel] [PATCH v2 2/3] drm/xen-front: Use Xen common shared buffer implementation

2018-12-18 Thread Boris Ostrovsky
On 12/18/18 11:15 AM, Noralf Trønnes wrote: > > Den 30.11.2018 08.42, skrev Oleksandr Andrushchenko: >> From: Oleksandr Andrushchenko >> >> Use page directory based shared buffer implementation >> now available as common code for Xen frontend drivers. >> >> Remove flushing of shared buffer on

Re: [Xen-devel] [Qemu-devel] [QEMU PATCH] block: Remove blk_attach_dev_legacy() / legacy_dev code

2018-12-18 Thread Markus Armbruster
Thomas Huth writes: > The last user of blk_attach_dev_legacy() is the code in xen_disk.c. > It passes a pointer to a XenBlkDev as second parameter. XenBlkDev > is derived from XenDevice which in turn is derived from DeviceState > since commit 3a6c9172ac5951e ("xen: create qdev for each backend

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

2018-12-18 Thread Noralf Trønnes
Den 27.11.2018 11.32, skrev Oleksandr Andrushchenko: From: Oleksandr Andrushchenko When GEM backing storage is allocated with drm_gem_get_pages the backing pages may be cached, thus making it possible that the backend sees only partial content of the buffer which may lead to screen artifacts.

Re: [Xen-devel] [PATCH v2 2/3] drm/xen-front: Use Xen common shared buffer implementation

2018-12-18 Thread Oleksandr Andrushchenko
On 12/18/18 20:31, Boris Ostrovsky wrote: On 12/18/18 11:15 AM, Noralf Trønnes wrote: Den 30.11.2018 08.42, skrev Oleksandr Andrushchenko: From: Oleksandr Andrushchenko Use page directory based shared buffer implementation now available as common code for Xen frontend drivers. Remove

[Xen-devel] [PATCH v3 01/11] arm: add generic TEE mediator framework

2018-12-18 Thread Volodymyr Babchuk
This patch adds basic framework for TEE mediators. Guests can't talk to TEE directly, we need some entity that will intercept request and decide what to do with them. "TEE mediator" is a such entity. This is how it works: user can build XEN with multiple TEE mediators (see the next patches, where

[Xen-devel] [PATCH v3 03/11] arm: tee: add OP-TEE header files

2018-12-18 Thread Volodymyr Babchuk
This header files describe protocol between OP-TEE and OP-TEE client driver in Linux. They are needed for upcoming OP-TEE mediator, which is added in the next patch. Reason to add those headers in separate patch is to ease up review. Those files were taken from linux tree (drivers/tee/optee/) and

[Xen-devel] [PATCH v3 10/11] xl: add "tee" option for xl.cfg

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This boolean option controls if TEE access is enabled for the domain. If access is enabled, xl will set appropriate flag in architecture configuration to ask hypervisor to enable TEE support. Signed-off-by: Volodymyr Babchuk --- Changes from v2: - Use arch.tee_enabled

[Xen-devel] [PATCH v3 07/11] optee: add support for RPC SHM buffers

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk OP-TEE usually uses the same idea with command buffers (see previous commit) to issue RPC requests. Problem is that initially it has no buffer, where it can write request. So the first RPC request it makes is special: it requests NW to allocate shared buffer for other RPC

[Xen-devel] [PATCH v3 06/11] optee: add std call handling

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk The main way to communicate with OP-TEE is to issue standard SMCCC call. "Standard" is a SMCCC term and it means that call can be interrupted and OP-TEE can return control to NW before completing the call. In contrast with fast calls, where arguments and return values

[Xen-devel] [PATCH v3 02/11] arm: add tee_enabled flag to xen_arch_domainconfig

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This flag enables TEE support for a domain. Signed-off-by: Volodymyr Babchuk --- xen/arch/arm/domain.c | 4 xen/arch/arm/domctl.c | 1 + xen/include/public/arch-arm.h | 3 +++ 3 files changed, 8 insertions(+) diff --git a/xen/arch/arm/domain.c

[Xen-devel] [PATCH v3 09/11] optee: add support for RPC commands

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk OP-TEE can issue multiple RPC requests. We are interested mostly in request that asks NW to allocate/free shared memory for OP-TEE needs, because mediator need to do address translation in the same way as it was done for shared buffers registered by NW. As mediator now

[Xen-devel] [PATCH v3 00/11] TEE mediator (and OP-TEE) support in XEN

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Hello all, Sorry for late submussion. I was busy with other projects. Global changes from v2: - Use domain flags insted of domctl interface to enable optee for guests - Remove patch "libxc: add xc_dom_tee_enable(...) function" because of previous change -

[Xen-devel] [PATCH v3 11/11] libxl: arm: create optee firmware node in DT if tee=1

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk If TEE support is enabled with "tee=1" option in xl.cfg, then we need to inform guest about available TEE. Currently only OP-TEE is supported, so we'll create DT node in a way that is expected by optee driver in linux. Signed-off-by: Volodymyr Babchuk ---

[Xen-devel] [PATCH v3 05/11] optee: add fast calls handling

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Some fast SMCCC calls to OP-TEE should be handled in a special way. Capabilities exchange should be filtered out, so only caps known to mediator are used. Also mediator disables static SHM memory capability, because it can't share OP-TEE memory with a domain. Only domain

[Xen-devel] [PATCH v3 04/11] optee: add OP-TEE mediator skeleton

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Add very basic OP-TEE mediator. It can probe for OP-TEE presence, tell it about domain creation/destruction and forward all known calls. This is all what is needed for Dom0 to work with OP-TEE as long as Dom0 shares 1:1 mapped pages with OP-TEE. Any attempt to call

[Xen-devel] [PATCH v3 08/11] optee: add support for arbitrary shared memory

2018-12-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Shared memory is widely used by NW to communicate with TAs in OP-TEE. NW can share part of own memory with TA or OP-TEE core, by registering it OP-TEE, or by providing a temporal reference. Anyways, information about such memory buffers are sent to OP-TEE as a list of

Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Dan Carpenter
On Tue, Dec 18, 2018 at 12:35:34PM -0500, Boris Ostrovsky wrote: > On 12/18/18 6:28 AM, Andrew Cooper wrote: > > On 18/12/2018 10:42, YueHaibing wrote: > >> On 2018/12/18 16:31, Juergen Gross wrote: > >>> On 18/12/2018 09:19, YueHaibing wrote: > Fix smatch warning: > >

Re: [Xen-devel] [PATCH for-4.12 v4 3/4] xen/arm: Implement Set/Way operations

2018-12-18 Thread Stefano Stabellini
On Tue, 18 Dec 2018, Julien Grall wrote: > Set/Way operations are used to perform maintenance on a given cache. > At the moment, Set/Way operations are not trapped and therefore a guest > OS will directly act on the local cache. However, a vCPU may migrate to > another pCPU in the middle of the

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

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

Re: [Xen-devel] [PATCH v7 3/6] xen/arm: zynqmp: introduce zynqmp specific defines

2018-12-18 Thread Stefano Stabellini
On Tue, 18 Dec 2018, Julien Grall wrote: > Hi Stefano, > > On 12/17/18 10:10 PM, Stefano Stabellini wrote: > > From: "Edgar E. Iglesias" > > > > From: Edgar E. Iglesias > > > > Introduce zynqmp specific defines for the firmware calls. > > See EEMI: > >

Re: [Xen-devel] [PATCH for-4.12 v3] xen/arm: Stop relocating Xen

2018-12-18 Thread Stefano Stabellini
On Tue, 18 Dec 2018, Stefano Stabellini wrote: > On Tue, 18 Dec 2018, Julien Grall wrote: > > At the moment, Xen is relocated towards the end of the memory. While > > this has the advantage to free space in low memory, the code is not > > compliant with the break-before-make because it requires to

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

2018-12-18 Thread Chao Gao
On Tue, Dec 18, 2018 at 08:53:46AM -0700, Jan Beulich wrote: On 18.12.18 at 15:43, wrote: >> I find some pass-thru devices don't work any more across guest >> reboot. Assigning it to another domain also meets the same issue. And >> the only way to make it work again is un-binding and binding

Re: [Xen-devel] [PATCH] xen/netfront: tolerate frags with no data

2018-12-18 Thread Juergen Gross
On 19/12/2018 07:00, David Miller wrote: > From: Juergen Gross > Date: Tue, 18 Dec 2018 16:06:19 +0100 > >> At least old Xen net backends seem to send frags with no real data >> sometimes. In case such a fragment happens to occur with the frag limit >> already reached the frontend will BUG

Re: [Xen-devel] [PATCH v7 4/6] xen/arm: zynqmp: implement zynqmp_eemi

2018-12-18 Thread Stefano Stabellini
On Tue, 18 Dec 2018, Julien Grall wrote: > Hi, > > On 12/17/18 10:10 PM, Stefano Stabellini wrote: > > +/* These calls are safe and always allowed. */ > > +case EEMI_FID(ZYNQMP_SIP_SVC_CALL_COUNT): > > +case EEMI_FID(ZYNQMP_SIP_SVC_UID): > > +case

Re: [Xen-devel] [PATCH 00/41] scsi: Mark expected switch fall-throughs

2018-12-18 Thread Gustavo A. R. Silva
On 12/18/18 9:45 PM, Martin K. Petersen wrote: If you haven't received feedback on a patch you should poke the relevant driver maintainer. Got it. Will do so. Thanks -- Gustavo ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH for-4.12 v4 0/4] xen/arm: Implement Set/Way operations

2018-12-18 Thread Stefano Stabellini
I committed the series On Tue, 18 Dec 2018, Julien Grall wrote: > Hi all, > > This is version 3 of the series to implement set/way. For more details see > patch #3. > > Cheers, > > Julien Grall (4): > xen/arm: vcpreg: Add wrappers to handle co-proc access trapped by > HCR_EL2.TVM >

Re: [Xen-devel] [PATCH v7 4/6] xen/arm: zynqmp: implement zynqmp_eemi

2018-12-18 Thread Stefano Stabellini
On Tue, 18 Dec 2018, Julien Grall wrote: > Hi Stefano, > > On 12/17/18 10:10 PM, Stefano Stabellini wrote: > > +/* These calls are safe and always allowed. */ > > +case EEMI_FID(ZYNQMP_SIP_SVC_CALL_COUNT): > > +case EEMI_FID(ZYNQMP_SIP_SVC_UID): > > +case

Re: [Xen-devel] [PATCH for-4.12 v3] xen/arm: Stop relocating Xen

2018-12-18 Thread Stefano Stabellini
On Tue, 18 Dec 2018, Julien Grall wrote: > At the moment, Xen is relocated towards the end of the memory. While > this has the advantage to free space in low memory, the code is not > compliant with the break-before-make because it requires to switch > between two sets of page-table. This is not

[Xen-devel] Xen 4.11.1 panic

2018-12-18 Thread Manuel Bouyer
Hello, I tried updating my NetBSD dom0 to 4.11.1 (from 4.11.0 with security patches), and on a 32bits PV domU shutdown I get (100% reproductible): (XEN) Assertion 'preemptible' failed at mm.c:2493 (XEN) [ Xen-4.11.1nb0 x86_64 debug=y Tainted: C ]

Re: [Xen-devel] [XEN][ARM64] PV DRM failing to convert virtual to physical address

2018-12-18 Thread Vikram K
Hello Oleksandr, Please find the attached log file. Could please provide some pointers on how test DomU display. On Tue, Dec 18, 2018 at 12:06 PM Oleksandr Andrushchenko wrote: Hello, Vikram! > * We are using 64 bit arm platform. > * Linux 4.20 Kernel in DomU with PV DRM front-end drivers.

Re: [Xen-devel] [PATCH] xen/netfront: tolerate frags with no data

2018-12-18 Thread David Miller
From: Juergen Gross Date: Tue, 18 Dec 2018 16:06:19 +0100 > At least old Xen net backends seem to send frags with no real data > sometimes. In case such a fragment happens to occur with the frag limit > already reached the frontend will BUG currently even if this situation > is easily

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

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

[Xen-devel] [PATCH v8 2/6] xen/arm: zynqmp: Forward plaform specific firmware calls

2018-12-18 Thread Stefano Stabellini
From: "Edgar E. Iglesias" Introduce zynqmp_eemi: a function responsible for implementing access controls over the firmware calls. Only calls that are allowed are forwarded to the firmware. Signed-off-by: Edgar E. Iglesias Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- Changes

[Xen-devel] [PATCH v8 4/6] xen/arm: zynqmp: implement zynqmp_eemi

2018-12-18 Thread Stefano Stabellini
From: "Edgar E. Iglesias" zynqmp_eemi uses the defined functions and structs to decide whether to make a call to the firmware, or to simply return a predefined value. Signed-off-by: Edgar E. Iglesias Signed-off-by: Stefano Stabellini --- Changes in v8: - remove redundant ZYNQMP_SIP_SVC_*

[Xen-devel] [PATCH v8 3/6] xen/arm: zynqmp: introduce zynqmp specific defines

2018-12-18 Thread Stefano Stabellini
From: "Edgar E. Iglesias" Introduce zynqmp specific defines for the firmware calls. See EEMI: https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf The error codes are described, under XIlPM Error Codes:

[Xen-devel] [linux-next test] 131387: regressions - FAIL

2018-12-18 Thread osstest service owner
flight 131387 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/131387/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow 7 xen-boot fail REGR. vs. 131276

  1   2   >