[Xen-devel] 4.8.5 too [Re: Xen 4.11.1 panic]

2018-12-19 Thread Manuel Bouyer
On Tue, Dec 18, 2018 at 11:19:04PM +0100, Manuel Bouyer wrote: > 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): I get the same panic on 4.8.5. Also, I didn't mention it but there's no problems w

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

2018-12-19 Thread Oleksandr Andrushchenko
On 12/18/18 9:20 PM, Noralf Trønnes wrote: 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

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

2018-12-19 Thread Roger Pau Monné
On Tue, Dec 18, 2018 at 10:43:37PM +0800, Chao Gao 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 is

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

2018-12-19 Thread Roger Pau Monné
On Tue, Dec 18, 2018 at 10:43:38PM +0800, Chao Gao wrote: > 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_mas

Re: [Xen-devel] [PATCH v5 3/4] iommu: elide flushing for higher order map/unmap operations

2018-12-19 Thread Paul Durrant
Julien, ping? > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 17 December 2018 09:23 > To: xen-devel@lists.xenproject.org > Cc: Paul Durrant ; Stefano Stabellini > ; Julien Grall ; Andrew > Cooper ; George Dunlap > ; Ian Jackson ; Konrad > Rzeszutek Wilk

Re: [Xen-devel] [PATCH v5 2/4] iommu: rename wrapper functions

2018-12-19 Thread Paul Durrant
Julien, ping? > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 17 December 2018 09:23 > To: xen-devel@lists.xenproject.org > Cc: Paul Durrant ; Andrew Cooper > ; Wei Liu ; Roger Pau > Monne ; George Dunlap ; > Ian Jackson ; Julien Grall ; > Konrad Rzeszute

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-19 Thread Roger Pau Monné
On Tue, Dec 18, 2018 at 11:29:16PM +0800, Dongli Zhang wrote: > > > 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 +08

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

2018-12-19 Thread osstest service owner
flight 131416 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/131416/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pygrub 7 xen-boot fail REGR. vs. 125898 test-amd64-amd64-pa

[Xen-devel] [xen-unstable-coverity test] 131438: all pass - PUSHED

2018-12-19 Thread osstest service owner
flight 131438 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/131438/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen f60658c6ae47e74792e6cc48ea2effac8bb52826 baseline version: xen a9c9

Re: [Xen-devel] [PATCH] gic:vgic: avoid excessive conversions

2018-12-19 Thread Andrii Anisov
Andre, Could you please comment on the patch and below. On 20.11.18 13:09, Andrii Anisov wrote: Hello Andre, I'm going to change "gic_raise_guest_irq()" function interface. Could you please comment my understanding of vgic-v3-its.c code below? So that I could fix it alongside the function i

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

2018-12-19 Thread George Dunlap
On 12/18/18 4:05 PM, Roger Pau Monne wrote: > No functional change. > > Signed-off-by: Roger Pau Monné Reviewed-by: George Dunlap ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2018-12-19 Thread George Dunlap
On 12/18/18 4:05 PM, Roger Pau Monne wrote: > And rename to have only one prefix underscore where applicable. > > No functional change. > > Signed-off-by: Roger Pau Monné Reviewed-by: George Dunlap ___ Xen-devel mailing list Xen-devel@lists.xenproje

Re: [Xen-devel] Xen 4.11.1 panic

2018-12-19 Thread Jan Beulich
>>> On 18.12.18 at 23:19, wrote: > I tried updating my NetBSD dom0 to 4.11.1 (from 4.11.0 with security patches), Hmm, the issue stems from the XSA-273 changes, so did you perhaps mean "with some security patches", and you didn't have those ones applied? > and on a 32bits PV domU shutdown I get

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

2018-12-19 Thread Oleksandr Andrushchenko
Sorry for top-posting. Well, from the logs I see that those failures come before PV DRM even creates any shared buffers which could be the problem: when you see (XEN) p2m.c:1456: d2v1: gvirt_to_maddr failed va=0x80001df5205f flags=0x1 par=0x809 (XEN) p2m.c:1456: d2v3: gvirt_to_maddr faile

[Xen-devel] [linux-3.18 test] 131420: regressions - FAIL

2018-12-19 Thread osstest service owner
flight 131420 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131420/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-examine 8 reboot fail REGR. vs. 128858 test-amd64-i386-xl-r

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

2018-12-19 Thread George Dunlap
On 12/18/18 4:05 PM, Roger Pau Monne wrote: > 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

Re: [Xen-devel] Xen 4.11.1 panic

2018-12-19 Thread Manuel Bouyer
On Wed, Dec 19, 2018 at 04:05:57AM -0700, Jan Beulich wrote: > >>> On 18.12.18 at 23:19, wrote: > > I tried updating my NetBSD dom0 to 4.11.1 (from 4.11.0 with security > > patches), > > Hmm, the issue stems from the XSA-273 changes, so did you perhaps > mean "with some security patches", and yo

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

2018-12-19 Thread Andrew Cooper
On 18/12/2018 15:22, Jan Beulich wrote: 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 Be

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

2018-12-19 Thread Thomas Huth
On 2018-12-18 19:33, Markus Armbruster wrote: > 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

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

2018-12-19 Thread Roger Pau Monné
On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: > On 12/18/18 4:05 PM, Roger Pau Monne wrote: > > 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 hyp

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

2018-12-19 Thread Andrew Cooper
On 19/12/2018 12:10, Roger Pau Monné wrote: > Hypercalls AFAIK have a single target (or subject) domain, so even if > there's a stubdomain relation I'm not sure I see why that would > require this kind of locking, any domain can perform hypercalls > against a single subject domain, and the hypervis

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

2018-12-19 Thread George Dunlap
On 12/19/18 12:10 PM, Roger Pau Monné wrote: > On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: >> On 12/18/18 4:05 PM, Roger Pau Monne wrote: >>> paging_log_dirty_op function takes mm locks from a subject domain and >>> then attempts to perform copy to operations against the caller >

Re: [Xen-devel] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s

2018-12-19 Thread Anthony PERARD
On Mon, Dec 17, 2018 at 01:30:09PM +, Paul Durrant wrote: > +static char *xen_block_blockdev_add(const char *id, QDict *qdict, > +Error **errp) > +{ > +const char *driver = qdict_get_try_str(qdict, "driver"); > +BlockdevOptions *options = NULL; > +

Re: [Xen-devel] [PATCH v6 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-19 Thread Anthony PERARD
On Mon, Dec 17, 2018 at 01:30:08PM +, Paul Durrant wrote: > ...that maintains compatibility with existing Xen toolstacks. > > Xen toolstacks instantiate PV backends by simply writing information into > xenstore and expecting a backend implementation to be watching for this. > > This patch add

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

2018-12-19 Thread Andrew Cooper
On 19/12/2018 12:38, George Dunlap wrote: > On 12/19/18 12:10 PM, Roger Pau Monné wrote: >> On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: >>> On 12/18/18 4:05 PM, Roger Pau Monne wrote: paging_log_dirty_op function takes mm locks from a subject domain and then attempts to

Re: [Xen-devel] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s

2018-12-19 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 19 December 2018 12:39 > To: Paul Durrant > Cc: qemu-de...@nongnu.org; qemu-bl...@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf ; Max Reitz > ; Stefano Stabellini > Subject: Re: [PATCH v6 16

Re: [Xen-devel] Xen 4.11.1 panic

2018-12-19 Thread Jan Beulich
>>> On 19.12.18 at 12:55, wrote: > On Wed, Dec 19, 2018 at 04:05:57AM -0700, Jan Beulich wrote: >> In any event, both Andrew and I must have overlooked the one >> crucial place due to which the assertion is indeed wrong from >> put_page_from_l2e(): >> >> int rc = _put_page_type(pg, false,

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

2018-12-19 Thread Jan Beulich
>>> On 19.12.18 at 13:02, wrote: > On 18/12/2018 15:22, Jan Beulich wrote: > 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 condi

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

2018-12-19 Thread Julien Grall
Hi Stefano, On 18/12/2018 22:36, Stefano Stabellini wrote: 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): +

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

2018-12-19 Thread Gerd Hoffmann
Hi, > > > +    mapping = xen_obj->base.filp->f_mapping; > > > +    mapping_set_gfp_mask(mapping, GFP_USER | __GFP_DMA32); > > Let's see if I understand what you're doing: > > > > Here you say that the pages should be DMA accessible for devices that can > > only see 4GB. > > Yes, your understa

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

2018-12-19 Thread Dongli Zhang
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 initialization of each blkback queue. If the blkfront is malicious and the 'r

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

2018-12-19 Thread Oleksandr Andrushchenko
On 12/19/18 3:14 PM, Gerd Hoffmann wrote: Hi, +    mapping = xen_obj->base.filp->f_mapping; +    mapping_set_gfp_mask(mapping, GFP_USER | __GFP_DMA32); Let's see if I understand what you're doing: Here you say that the pages should be DMA accessible for devices that can only see 4GB. Yes,

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

2018-12-19 Thread Julien Grall
(+Juergen) On 18/12/2018 21:11, Volodymyr Babchuk wrote: From: Volodymyr Babchuk Hello all, Hi Volodymyr, Sorry for late submussion. I was busy with other projects. Thank you for posting a new version of the series. I am afraid neither Stefano nor I will have time to review the series by

Re: [Xen-devel] Xen 4.11.1 panic

2018-12-19 Thread Manuel Bouyer
On Wed, Dec 19, 2018 at 05:54:42AM -0700, Jan Beulich wrote: > >>> On 19.12.18 at 12:55, wrote: > > On Wed, Dec 19, 2018 at 04:05:57AM -0700, Jan Beulich wrote: > >> In any event, both Andrew and I must have overlooked the one > >> crucial place due to which the assertion is indeed wrong from > >>

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

2018-12-19 Thread Julien Grall
Hi Stefano, On 18/12/2018 23:32, Stefano Stabellini wrote: 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: https:/

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

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

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

2018-12-19 Thread Julien Grall
Hi Stefano, On 18/12/2018 23:32, Stefano Stabellini wrote: +/* These calls are safe and always allowed. */ +case EEMI_FID(PM_GET_TRUSTZONE_VERSION): +case EEMI_FID(PM_GET_API_VERSION): Regardless the discussion about PM_GET_API_VERSION behavior: Acked-by: Julien Grall I am stil

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

2018-12-19 Thread George Dunlap
On 12/19/18 12:42 PM, Andrew Cooper wrote: > On 19/12/2018 12:38, George Dunlap wrote: >> On 12/19/18 12:10 PM, Roger Pau Monné wrote: >>> On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: On 12/18/18 4:05 PM, Roger Pau Monne wrote: > paging_log_dirty_op function takes mm lock

Re: [Xen-devel] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s

2018-12-19 Thread Anthony PERARD
On Wed, Dec 19, 2018 at 12:43:24PM +, Paul Durrant wrote: > > Kevin seems to say that this could be done without the _flat_confused > > version. The flat_confused version seems to be useful just because > > the key "cache.direct" is used earlier, and because everything in qdict > > is a string.

Re: [Xen-devel] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s

2018-12-19 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 19 December 2018 14:01 > To: Paul Durrant > Cc: qemu-de...@nongnu.org; qemu-bl...@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf ; Max Reitz > ; Stefano Stabellini > Subject: Re: [PATCH v6 16

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

2018-12-19 Thread Andrew Cooper
On 19/12/2018 13:55, George Dunlap wrote: > On 12/19/18 12:42 PM, Andrew Cooper wrote: >> On 19/12/2018 12:38, George Dunlap wrote: >>> On 12/19/18 12:10 PM, Roger Pau Monné wrote: On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: > On 12/18/18 4:05 PM, Roger Pau Monne wrote:

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

2018-12-19 Thread Gerd Hoffmann
Hi, > > Sure this actually helps? It's below 4G in guest physical address > > space, so it can be backed by pages which are actually above 4G in host > > physical address space ... > > Yes, you are right here. This is why I wrote about the IOMMU > and other conditions. E.g. you can have a devi

[Xen-devel] [PATCH v7 00/49] x86emul: remaining AVX512 support

2018-12-19 Thread Jan Beulich
01: rename evex.br to evex.brs 02: support AVX512{F,BW} shift/rotate insns 03: support AVX512{F,BW,DQ} extract insns 04: support AVX512{F,BW,DQ} insert insns 05: basic AVX512F testing 06: support AVX512{F,BW,DQ} integer broadcast insns 07: basic AVX512VL testing 08: support AVX512{F,BW} zero- and s

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

2018-12-19 Thread Jan Beulich
>>> On 19.12.18 at 13:38, wrote: > On 12/19/18 12:10 PM, Roger Pau Monné wrote: >> On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: >>> On 12/18/18 4:05 PM, Roger Pau Monne wrote: paging_log_dirty_op function takes mm locks from a subject domain and then attempts to perform

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

2018-12-19 Thread Jan Beulich
>>> On 19.12.18 at 15:07, wrote: > On 19/12/2018 13:55, George Dunlap wrote: >> Yes, if someone uses XSM to bypass the IS_PRIV() functionality to give >> one domain access over another, then the lock checking will trigger. > > Noone should be able to trigger assertions in the hypervisor by simply

Re: [Xen-devel] [PATCH v7 00/49] x86emul: remaining AVX512 support

2018-12-19 Thread Jan Beulich
>>> On 19.12.18 at 15:17, wrote: > 01: rename evex.br to evex.brs > 02: support AVX512{F,BW} shift/rotate insns > 03: support AVX512{F,BW,DQ} extract insns > 04: support AVX512{F,BW,DQ} insert insns > 05: basic AVX512F testing > 06: support AVX512{F,BW,DQ} integer broadcast insns > 07: basic AVX51

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

2018-12-19 Thread Roger Pau Monné
On Wed, Dec 19, 2018 at 12:17:51PM +, Andrew Cooper wrote: > On 19/12/2018 12:10, Roger Pau Monné wrote: > > Hypercalls AFAIK have a single target (or subject) domain, so even if > > there's a stubdomain relation I'm not sure I see why that would > > require this kind of locking, any domain can

[Xen-devel] [PATCH v7 01/49] x86emul: rename evex.br to evex.brs

2018-12-19 Thread Jan Beulich
This is to better reflect that it's an abbreviation for "broadcast, rounding, or SAE" rather than just "broadcast". Take the opportunity and also add SDM naming comments to both union vex and union evex. Requested-by: Andrew Cooper Signed-off-by: Jan Beulich --- v7: New. --- a/xen/arch/x86/x86

[Xen-devel] [PATCH v7 02/49] x86emul: support AVX512{F, BW} shift/rotate insns

2018-12-19 Thread Jan Beulich
Note that simd_packed_fp for the opcode space 0f38 major opcodes 14 and 15 is not really correct, but sufficient for the purposes here. Further adjustments may later be needed for the down conversion unsigned saturating VPMOV* insns, first and foremost for the different Disp8 scaling those ones use

[Xen-devel] [PATCH v7 03/49] x86emul: support AVX512{F, BW, DQ} extract insns

2018-12-19 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v7: Re-base. v4: Make use of d8s_dq64. v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -212,6 +212,7 @@ static const struct test avx512f_all[] = }; static const struct test avx512f_128[] = { +INSN(extractps

[Xen-devel] [PATCH v7 04/49] x86emul: support AVX512{F, BW, DQ} insert insns

2018-12-19 Thread Jan Beulich
Also correct the comment of the AVX form of VINSERTPS. Signed-off-by: Jan Beulich --- v7: Re-base. v6: Don't refuse to emulate VINSERTPS without AVX512VL. v4: Make use of d8s_dq64. v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -213,6 +213,7 @

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

2018-12-19 Thread George Dunlap
On 12/19/18 2:30 PM, Jan Beulich wrote: On 19.12.18 at 13:38, wrote: >> On 12/19/18 12:10 PM, Roger Pau Monné wrote: >>> On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: On 12/18/18 4:05 PM, Roger Pau Monne wrote: > paging_log_dirty_op function takes mm locks from a sub

[Xen-devel] [PATCH v7 05/49] x86emul: basic AVX512F testing

2018-12-19 Thread Jan Beulich
Test various of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Fix formatting in simd.h. v5: Add VSQRT* tests. v4: Make eq() also work for 4- and 8-byte integer element sizes. v3: New. --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makef

[Xen-devel] [PATCH v7 06/49] x86emul: support AVX512{F, BW, DQ} integer broadcast insns

2018-12-19 Thread Jan Beulich
Note that the pbroadcastw table entry in evex-disp8.c is slightly different from what one would expect, due to it requiring EVEX.W to be zero. Signed-off-by: Jan Beulich --- v7: Use dummy output in invoke_stub(). Re-base. v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86

[Xen-devel] [PATCH v7 07/49] x86emul: basic AVX512VL testing

2018-12-19 Thread Jan Beulich
Test the 128- and 256-bit variants of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Don't enable AVX512VL for scalar tests, nor for S/G ones with index wider than data. Re-base over changes earlier in the series. v4: Move OVR() additions into __AVX512VL__ c

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

2018-12-19 Thread Roger Pau Monné
On Wed, Dec 19, 2018 at 12:38:50PM +, George Dunlap wrote: > On 12/19/18 12:10 PM, Roger Pau Monné wrote: > > On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: > >> On 12/18/18 4:05 PM, Roger Pau Monne wrote: > >>> paging_log_dirty_op function takes mm locks from a subject domain a

[Xen-devel] [PATCH v7 09/49] x86emul: support AVX512{F, BW} down conversion moves

2018-12-19 Thread Jan Beulich
Note that the vpmov{,s,us}{d,q}w table entries in evex-disp8.c are slightly different from what one would expect, due to them requiring EVEX.W to be zero. Signed-off-by: Jan Beulich --- v7: ea.type == OP_* -> ea.type != OP_*. Re-base over change in previous patch. Re-base. v5: Also adjust x86

[Xen-devel] [PATCH v7 08/49] x86emul: support AVX512{F, BW} zero- and sign-extending moves

2018-12-19 Thread Jan Beulich
Note that the testing in simd.c doesn't really follow the ISA extension pattern - to fit the scheme, extensions from byte and word granular vectors can (currently) sensibly only happen in the AVX512BW case (and hence respective abstraction macros will be added there rather than here). Signed-off-b

[Xen-devel] [PATCH v7 10/49] x86emul: support AVX512{F, BW} integer unpack insns

2018-12-19 Thread Jan Beulich
There's once again one extra twobyte_table[] entry which gets its Disp8 shift value set right away without getting support implemented just yet, again to avoid needlessly splitting groups of entries. Signed-off-by: Jan Beulich --- v6: Re-base over changes earlier in the series. v4: Move OVR() add

[Xen-devel] [PATCH v7 11/49] x86emul: support AVX512{F, BW, _VBMI} full permute insns

2018-12-19 Thread Jan Beulich
Take the liberty and also correct the (public interface) name of the AVX512_VBMI feature flag, on the assumption that no external consumer has actually been using that flag so far. Furthermore make it have AVX512BW instead of AVX512F as a prerequisite, for requiring full 64-bit mask registers (the

[Xen-devel] [PATCH v7 12/49] x86emul: support AVX512{F, BW} integer shuffle insns

2018-12-19 Thread Jan Beulich
Also include vshuff{32x4,64x2} as being very similar to vshufi{32x4,64x2}. Signed-off-by: Jan Beulich --- v7: Disable fault suppression for VPSHUF{D,{H,L}W}. Re-base. v6: Re-base over changes earlier in the series. v5: Re-base over changes earlier in the series. v4: Move OVR() addition into __AVX

[Xen-devel] [PATCH v7 13/49] x86emul: support AVX512{BW, DQ} mask move insns

2018-12-19 Thread Jan Beulich
Entries to the tables in evex-disp8.c are added despite these insns not allowing for memory operands, with the goal of the tables giving a complete picture of the supported EVEX-encoded insns in the end. Signed-off-by: Jan Beulich --- v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/to

[Xen-devel] [PATCH v7 14/49] x86emul: basic AVX512BW testing

2018-12-19 Thread Jan Beulich
Test various of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Re-base over changes earlier in the series. v4: Add __AVX512VL__ conditional around majority of OVR() additions. Correct eq() for 1- and 2-byte cases. v3: New. --- a/tools/tests/x86_emulator/Mak

[Xen-devel] [PATCH v7 15/49] x86emul: basic AVX512DQ testing

2018-12-19 Thread Jan Beulich
Test various of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Re-base. v5: Re-base over changes earlier in the series. v4: Wrap OVR(pmullq) in __AVX512VL__ conditional. v3: New. --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@

[Xen-devel] [PATCH v7 16/49] x86emul: support AVX512F move high/low insns

2018-12-19 Thread Jan Beulich
No explicit test harness additions other than the overrides, as the compiler already makes use of the insns. Signed-off-by: Jan Beulich --- v7: Re-base. v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -253,6 +253,16 @@ static const struct test

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

2018-12-19 Thread George Dunlap
On 12/19/18 2:40 PM, Roger Pau Monné wrote: > On Wed, Dec 19, 2018 at 12:38:50PM +, George Dunlap wrote: >> On 12/19/18 12:10 PM, Roger Pau Monné wrote: >>> On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: On 12/18/18 4:05 PM, Roger Pau Monne wrote: > paging_log_dirty_op

[Xen-devel] [PATCH v7 17/49] x86emul: support AVX512F move duplicate insns

2018-12-19 Thread Jan Beulich
Judging from insn prefixes, these are scalar insns, but their (memory) operands are vector ones (with the exception of 128-bit VMOVDDUP). For this some adjustments to disp8scale calculation code are needed. No explicit test harness additions other than the overrides, as the compiler already makes

[Xen-devel] [PATCH v7 18/49] x86emul: support AVX512{F, BW, _VBMI} permute insns

2018-12-19 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v7: Re-base. v5: Re-base over changes earlier in the series. v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -178,6 +178,10 @@ static const struct test avx512f_all[] = INSN(pcmpu,66, 0f3a, 1e,vl,

[Xen-devel] [PATCH v7 19/49] x86emul: support AVX512BW pack insns

2018-12-19 Thread Jan Beulich
No further test harness additions - what is there is good enough for these rather "regular" insns. Signed-off-by: Jan Beulich --- v7: Re-base. v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -306,6 +306,10 @@ static const struct test avx512bw_a

[Xen-devel] [PATCH v7 20/49] x86emul: support AVX512F floating-point conversion insns

2018-12-19 Thread Jan Beulich
VCVTPS2PD, sharing its main opcode with others, needs a "manual" override of disp8scale. The simd_size change for twobyte_table[0x5a] is benign to pre-existing code, but allows decode_disp8scale() to work as is here. Also correct the comment on an AVX counterpart. Signed-off-by: Jan Beulich ---

[Xen-devel] [PATCH v7 21/49] x86emul: support AVX512F legacy-equivalent packed int/FP conversion insns

2018-12-19 Thread Jan Beulich
... including the two AVX512DQ forms which shared encodings, just with EVEX.W set there. VCVTDQ2PD, sharing its main opcode with others, needs a "manual" override of disp8scale. The simd_size changes for the twobyte_table[] entries are benign to pre-existing code, but allow decode_disp8scale() to

[Xen-devel] [PATCH v7 22/49] x86emul: support AVX512F legacy-equivalent scalar int/FP conversion insns

2018-12-19 Thread Jan Beulich
VCVT{,T}S{S,D}2SI use EVEX.W for their destination (register) rather than their (possibly memory) source operand size and hence need a "manual" override of disp8scale. While the SDM claims that EVEX.L'L needs to be zero for the 32-bit forms of VCVT{,U}SI2SD (exception type E10NF), observations on

[Xen-devel] [PATCH v7 24/49] x86emul: support AVX512{F, DQ} uint-to-FP conversion insns

2018-12-19 Thread Jan Beulich
Some "manual" overrides of disp8scale are needed here again. In particular code ends up simpler when using d8s_dq64 in the twobyte_table[] entry. Test harness additions will be done once the reverse conversions are also available. Signed-off-by: Jan Beulich --- v7: Re-base. v4: New. --- a/tools

[Xen-devel] [PATCH v7 25/49] x86emul: support AVX512{F, DQ} FP-to-uint conversion insns

2018-12-19 Thread Jan Beulich
Along the lines of prior patches, VCVT{,T}PS2UQQ as well as VCVT{,T}S{S,D}2USI need "manual" overrides of disp8scale. The twobyte_table[] entries get altered, with their prior values now put in place in x86_decode_twobyte(). Signed-off-by: Jan Beulich --- v7: Re-base. v4: New. --- a/tools/tests

[Xen-devel] [PATCH v7 23/49] x86emul: support AVX512DQ packed quad-int/FP conversion insns

2018-12-19 Thread Jan Beulich
VCVT{,T}PS2QQ, sharing their main opcodes with others, once again need "manual" overrides of disp8scale. While not directly related here, also add a scalar variant of to_wint() to the test harness. Signed-off-by: Jan Beulich --- v7: Re-base. v6: Workaround for gcc 7 quirk. v5: Re-base over chang

[Xen-devel] [PATCH v7 26/49] x86emul: support remaining AVX512F legacy-equivalent insns

2018-12-19 Thread Jan Beulich
Plus their AVX512BW counterparts. Take the opportunity and also eliminate a pair of open coded instances of scalar_1op(). Signed-off-by: Jan Beulich --- v7: Re-base. v6: Re-base over changes earlier in the series. v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulat

[Xen-devel] [PATCH v7 27/49] x86emul: support remaining AVX512BW legacy-equivalent insns

2018-12-19 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -354,6 +354,7 @@ static const struct test avx512bw_all[] INSN(paddusb, 66, 0f, dc,vl,b, vl), INSN(paddusw, 66, 0f, dd,vl,w, vl),

[Xen-devel] [PATCH v7 28/49] x86emul: support AVX512{F, ER} reciprocal insns

2018-12-19 Thread Jan Beulich
Also include the only other AVX512ER insn pair, VEXP2P{D,S}. Note that despite the replacement of the SHA insns' table slots there's no need to special case their decoding: Their insn-specific code already sets op_bytes (as was required due to simd_other), and TwoOp is of no relevance for legacy e

[Xen-devel] [PATCH v7 29/49] x86emul: support AVX512F floating point manipulation insns

2018-12-19 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v7: Fix vector length check for scalar insns. ea.type == OP_* -> ea.type != OP_*. Re-base. v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -140,6 +140,8 @@ static const struct test avx512f_all[] = INSN(cvt

[Xen-devel] [PATCH v7 30/49] x86emul: support AVX512DQ floating point manipulation insns

2018-12-19 Thread Jan Beulich
This completes support of AVX512DQ in the insn emulator. Signed-off-by: Jan Beulich --- v7: Fix vector length check for scalar insns. Re-base. v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -457,11 +457,17 @@ static const struct test avx512dq_

[Xen-devel] [PATCH v7 31/49] x86emul: support AVX512{F, _VBMI2} compress/expand insns

2018-12-19 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v7: Re-base. v6: Re-base. Add tests for the byte/word forms. v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -109,6 +109,7 @@ static const struct test avx512f_all[] = INSN_FP(cmp, 0f, c2), INS

[Xen-devel] [PATCH v7 32/49] x86emul: support remaining misc AVX512{F, BW} insns

2018-12-19 Thread Jan Beulich
This completes support of AVX512BW in the insn emulator, and leaves just the scatter/gather ones open in the AVX512F set. Signed-off-by: Jan Beulich --- v5: New. --- TBD: The *blendm* inline functions don't reliably produce the intended insns, as the respective moves are about as good a fit

[Xen-devel] [PATCH v7 33/49] x86emul: support AVX512F gather insns

2018-12-19 Thread Jan Beulich
This requires getting modrm_reg and sib_index set correctly in the EVEX case, to account for the high 16 [XYZ]MM registers. Extend the adjustments to modrm_rm as well, such that x86_insn_modrm() would correctly report register numbers (this was a latent issue only as we don't currently have callers

[Xen-devel] [PATCH v7 34/49] x86emul: add high register S/G test cases

2018-12-19 Thread Jan Beulich
In order to verify that in particular the index register decoding works correctly in the S/G emulation paths, add dedicated (64-bit only) cases disallowing the compiler to use the lower registers. Other than in the generic SIMD case, where occasional uses of %xmm or %ymm registers in generated code

[Xen-devel] [PATCH v7 35/49] x86emul: support AVX512F scatter insns

2018-12-19 Thread Jan Beulich
This completes support of AVX512F in the insn emulator. Note that in the test harness there's a little bit of trickery needed to get around the not fully consistent naming of AVX512VL gather and scatter built-ins. To suppress expansion of the "di" and "si" tokens they get constructed by token conc

[Xen-devel] [PATCH v7 36/49] x86emul: support AVX512PF insns

2018-12-19 Thread Jan Beulich
Some adjustments are necessary to the EVEX Disp8 scaling test code to account for the zero byte reads/writes. I have to admit though that I'm not fully convinced the SDM describes the faulting behavior correctly: Other prefetch insns, including the Xeon Phi Coprocessor S/G ones, don't produce #GP/#

[Xen-devel] [PATCH v7 37/49] x86emul: support AVX512CD insns

2018-12-19 Thread Jan Beulich
Since the insns here and in particular their memory access patterns follow the usual scheme I didn't think it was necessary to add contrived tests specifically for them, beyond the Disp8 scaling ones. Signed-off-by: Jan Beulich --- v6: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools

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

2018-12-19 Thread Roger Pau Monné
On Wed, Dec 19, 2018 at 02:46:55PM +, George Dunlap wrote: > On 12/19/18 2:40 PM, Roger Pau Monné wrote: > > On Wed, Dec 19, 2018 at 12:38:50PM +, George Dunlap wrote: > >> On 12/19/18 12:10 PM, Roger Pau Monné wrote: > >>> On Wed, Dec 19, 2018 at 11:40:14AM +, George Dunlap wrote: > >>

[Xen-devel] [PATCH v7 38/49] x86emul: complete support of AVX512_VBMI insns

2018-12-19 Thread Jan Beulich
Also add testing of ones support for which was added before. Sadly gcc's command line option naming is not in line with Intel's naming of the feature, which makes it necessary to mis-name things in the test harness. Since the only new insn here and in particular its memory access pattern follows t

[Xen-devel] [PATCH v7 39/49] x86emul: support of AVX512* population count insns

2018-12-19 Thread Jan Beulich
Plus the only other AVX512_BITALG one. As in a few cases before, since the insns here and in particular their memory access patterns follow the usual scheme, I didn't think it was necessary to add a contrived test specifically for them, beyond the Disp8 scaling one. Signed-off-by: Jan Beulich --

[Xen-devel] [PATCH v7 40/49] x86emul: support of AVX512_IFMA insns

2018-12-19 Thread Jan Beulich
Once again take the liberty and also correct the (public interface) name of the AVX512_IFMA feature flag to match the SDM, on the assumption that no external consumer has actually been using that flag so far. As in a few cases before, since the insns here and in particular their memory access patt

[Xen-devel] [PATCH v7 42/49] x86emul: support remaining AVX512_VBMI2 insns

2018-12-19 Thread Jan Beulich
As in a few cases before, since the insns here and in particular their memory access patterns follow the usual scheme, I didn't think it was necessary to add a contrived test specifically for them, beyond the Disp8 scaling one. Signed-off-by: Jan Beulich --- v7: Re-base over change earlier in the

[Xen-devel] [PATCH v7 42/49] x86emul: support AVX512_4FMAPS insns

2018-12-19 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v7: Re-base. v6: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -538,6 +538,13 @@ static const struct test avx512pf_512[] INSNX(scatterpf1q, 66, 0f38, c7, 6, vl, sd, el), }; +static const struct test avx512_4f

Re: [Xen-devel] [PATCH] libxl: Documentation about the domain configuration on disk

2018-12-19 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH] libxl: Documentation about the domain configuration on disk"): > I think there is already a race, and `xl destroy` can leak QEMU. I've > called `xl create` with a sleep before spawn_local_dm, and during the > sleep, I call `xl destroy` with a sleep after it had

[Xen-devel] [PATCH v7 44/49] x86emul: support AVX512_VNNI insns

2018-12-19 Thread Jan Beulich
As in a few cases before, since the insns here and in particular their memory access patterns follow the usual scheme, I didn't think it was necessary to add a contrived test specifically for them, beyond the Disp8 scaling one. Signed-off-by: Jan Beulich --- v7: New. --- a/tools/tests/x86_emulat

[Xen-devel] [PATCH v7 43/49] x86emul: support AVX512_4VNNIW insns

2018-12-19 Thread Jan Beulich
As in a few cases before, since the insns here and in particular their memory access patterns follow the AVX512_4FMAPS scheme, I didn't think it was necessary to add contrived tests specifically for them, beyond the Disp8 scaling ones. Signed-off-by: Jan Beulich --- v7: Re-base. v6: New. --- a/t

[Xen-devel] [PATCH v7 45/49] x86emul: support VPCLMULQDQ insns

2018-12-19 Thread Jan Beulich
As to the feature dependency adjustment, while strictly speaking AVX is a sufficient prereq (to have YMM registers), 256-bit vectors of integers have got fully introduced with AVX2 only. Sadly gcc can't be used as a reference here: They don't provide any AVX512-independent built-in at all. Along t

[Xen-devel] [PATCH v7 47/49] x86emul: support GFNI insns

2018-12-19 Thread Jan Beulich
Note that the ISA extensions document revision 035 is ambiguous regarding fault suppression for VGF2P8MULB: Text says it's supported, while the exception specification listed is E4NF. Given the wording here and for the other two insns I'm inclined to trust the text more than the exception reference

[Xen-devel] [PATCH v7 46/49] x86emul: support VAES insns

2018-12-19 Thread Jan Beulich
As to the feature dependency adjustment, just like for VPCLMULQDQ while strictly speaking AVX is a sufficient prereq (to have YMM registers), 256-bit vectors of integers have got fully introduced with AVX2 only. Along the lines of AESNI, since the insns here and in particular their memory access p

[Xen-devel] [PATCH v7 48/49] x86emul: restore ordering within main switch statement

2018-12-19 Thread Jan Beulich
Incremental additions and/or mistakes have lead to some code blocks sitting in "unexpected" places. Re-sort the case blocks (opcode space; major opcode; 66/F3/F2 prefix; legacy/VEX/EVEX encoding). As an exception the opcode space 0x0f EVEX-encoded VPEXTRW is left at its current place, to keep it c

  1   2   >