[Xen-devel] [OSSTEST PATCH 01/15] mg-repro-setup: Use new syntax for cs-adjust-flight

2017-06-21 Thread Ian Jackson
In 497b2c6c933d "Rework runvar-build-set new value handling" we fixed bugs in cs-adjust-flight which would make mg-repro-setup's attempt to adjust build jobs sometimes not match at all, but we also changed the syntax for specifying just a new flight. I forgot to update the one in-tree user of

[Xen-devel] [OSSTEST PATCH 13/15] Debian: Pass sylog server details to debian-installer

2017-06-21 Thread Ian Jackson
This logs the installer output, even during a failed install. Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 5 + 1 file changed, 5 insertions(+) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 8ba48bf..845027a 100644 --- a/Osstest/Debian.pm +++

[Xen-devel] [OSSTEST PATCH 07/15] sg-run-job: examination: Style improvement

2017-06-21 Thread Ian Jackson
This is going to make things a bit clearer. Whitespace change only. Signed-off-by: Ian Jackson --- sg-run-job | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sg-run-job b/sg-run-job index cfbc34b..dc5fdc2 100755 --- a/sg-run-job +++

[Xen-devel] [OSSTEST PATCH 11/15] sg-run-job: Make catching-otherwise honour $ok

2017-06-21 Thread Ian Jackson
This is more regular and abolishes a number of explicit $ok tests in run-job. Of the call sites: * "catching-otherwise blocked check-not-blocked" near the top of run-job is soon after $ok is set, so NFC. * The other call sites in run-job all test $ok explicitly, so NFC. * The one call site

[Xen-devel] [OSSTEST PATCH 05/15] sg-run-job: Support scripts which need to be told when to quit

2017-06-21 Thread Ian Jackson
We give them a pipe on stdin, whose writing end we close when we want to reap them. Signed-off-by: Ian Jackson --- sg-run-job | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sg-run-job b/sg-run-job index b820642..8acb902 100755

[Xen-devel] [OSSTEST PATCH 03/15] ts-syslog-server: New test script

2017-06-21 Thread Ian Jackson
This is a "complete implementation of the UDP syslog protocol". In fact, the UDP syslog protocol is trivial: the UDP packets contain newline-terminated unix text strings. We can simply chomp them and log them (along with the sending address and port). This script is designed to be run with the

[Xen-devel] [OSSTEST PATCH 04/15] sg-run-job: Document run-ts and spawn-ts argument syntaxes

2017-06-21 Thread Ian Jackson
Signed-off-by: Ian Jackson --- v2: More accurate explanation of ! in IFFAIL; and mention $ok. --- sg-run-job | 97 ++ 1 file changed, 97 insertions(+) diff --git a/sg-run-job b/sg-run-job index

[Xen-devel] [OSSTEST PATCH v2 00/15] capture some syslog output

2017-06-21 Thread Ian Jackson
I discovered that the previous version of this series didn't work because in host examination jobs it started the syslog server before host allocation. This is a bug. It's detected, in a roundabout way, by sg-report-flight: sg-report-flight requires that the testid rows in its output can be

[Xen-devel] [OSSTEST PATCH 08/15] sg-run-job: examination: Run host install in prep

2017-06-21 Thread Ian Jackson
We want to run this in prep, so that we can start the syslogd after this. Signed-off-by: Ian Jackson --- sg-run-job | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sg-run-job b/sg-run-job index dc5fdc2..ea3ea41 100755 --- a/sg-run-job +++

[Xen-devel] [OSSTEST PATCH 02/15] TestSupport: Provide controller_ipaddr

2017-06-21 Thread Ian Jackson
Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ce9ffaa..8f8013e 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm

Re: [Xen-devel] [PATCH v4 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 04:58 PM, Wei Liu wrote: > On Mon, Jun 19, 2017 at 03:24:38PM +0300, Petre Pircalabu wrote: >> Add support for filtering out the write_ctrlreg monitor events if they >> are generated only by changing certains bits. >> A new parameter (bitmask) was added to the

Re: [Xen-devel] [PATCH v4 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-21 Thread Tamas K Lengyel
On Wed, Jun 21, 2017 at 7:58 AM, Wei Liu wrote: > On Mon, Jun 19, 2017 at 03:24:38PM +0300, Petre Pircalabu wrote: >> Add support for filtering out the write_ctrlreg monitor events if they >> are generated only by changing certains bits. >> A new parameter (bitmask) was added

Re: [Xen-devel] [PATCH v4 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-21 Thread Wei Liu
On Mon, Jun 19, 2017 at 03:24:38PM +0300, Petre Pircalabu wrote: > Add support for filtering out the write_ctrlreg monitor events if they > are generated only by changing certains bits. > A new parameter (bitmask) was added to the xc_monitor_write_ctrlreg > function in order to mask the event

Re: [Xen-devel] [PATCH v7 07/36] x86/mm: Don't use phys_to_virt in ioremap() if SME is active

2017-06-21 Thread Tom Lendacky
On 6/21/2017 2:37 AM, Thomas Gleixner wrote: On Fri, 16 Jun 2017, Tom Lendacky wrote: Currently there is a check if the address being mapped is in the ISA range (is_ISA_range()), and if it is then phys_to_virt() is used to perform the mapping. When SME is active, however, this will result in

Re: [Xen-devel] [PATCH v7 07/36] x86/mm: Don't use phys_to_virt in ioremap() if SME is active

2017-06-21 Thread Tom Lendacky
On 6/20/2017 3:55 PM, Thomas Gleixner wrote: On Fri, 16 Jun 2017, Tom Lendacky wrote: Currently there is a check if the address being mapped is in the ISA range (is_ISA_range()), and if it is then phys_to_virt() is used to perform the mapping. When SME is active, however, this will result in

Re: [Xen-devel] [PATCH v2 12/16] xen/arm: p2m: Rename p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage

2017-06-21 Thread Julien Grall
Hi Andrew, On 20/06/17 09:14, Andrew Cooper wrote: On 19/06/2017 17:57, Julien Grall wrote: The helpers p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage are not specific to the stage-2 translation tables. They can also work on any LPAE translation tables. So rename then to lpae_* and use

Re: [Xen-devel] [PATCH v3 3/9] xen/mm: move modify_identity_mmio to global file and drop __init

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 15:10, wrote: > On Wed, Jun 21, 2017 at 06:51:32AM -0600, Jan Beulich wrote: >> Otoh >> to prevent hangs we simply call process_pending_softirqs() >> every once in a while in a few other cases, so maybe doing that >> would already suffice here. > > That's

Re: [Xen-devel] [PATCH] ARM: SMMUv2: Add compatible match entry for cavium smmuv2

2017-06-21 Thread Julien Grall
Hi Manish, On 21/06/17 02:06, Manish Jaggi wrote: This patch adds cavium,smmu-v2 compatible match entry in smmu driver Signed-off-by: Manish Jaggi --- xen/drivers/passthrough/arm/smmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/passthrough/arm/smmu.c

Re: [Xen-devel] [PATCH v7 06/36] x86/mm: Add Secure Memory Encryption (SME) support

2017-06-21 Thread Tom Lendacky
On 6/20/2017 3:49 PM, Thomas Gleixner wrote: On Fri, 16 Jun 2017, Tom Lendacky wrote: +config ARCH_HAS_MEM_ENCRYPT + def_bool y + depends on X86 That one is silly. The config switch is in the x86 KConfig file, so X86 is on. If you intended to move this to some generic place

Re: [Xen-devel] [PATCH 0/4] ARM: ACPI: ITS: Add ITS Support for ACPI hardware domain

2017-06-21 Thread Julien Grall
Hi Manish, On 21/06/17 02:01, Manish Jaggi wrote: This patch series adds the support of ITS for ACPI hardware domain. It is tested on staging branch with has ITS v12 patchset by Andre. I have tried to incorporate the review comments on the RFC v1/v2 patch. The single patch in RFC is now split

Re: [Xen-devel] [PATCH v3 3/9] xen/mm: move modify_identity_mmio to global file and drop __init

2017-06-21 Thread Roger Pau Monne
On Wed, Jun 21, 2017 at 06:51:32AM -0600, Jan Beulich wrote: > >>> On 21.06.17 at 14:43, wrote: > > On Wed, Jun 21, 2017 at 05:57:19AM -0600, Jan Beulich wrote: > >> >>> On 21.06.17 at 13:11, wrote: > >> > On Fri, May 19, 2017 at 07:35:39AM -0600, Jan

[Xen-devel] [PATCH v3 2/2][XTF] extend FPU exception tests

2017-06-21 Thread Jan Beulich
Also test #MF and #XM handling. Signed-off-by: Jan Beulich --- v3: New. --- /dev/null +++ b/arch/x86/include/arch/simd.h @@ -0,0 +1,32 @@ +#ifndef XTF_X86_SIMD_H +#define XTF_X86_SIMD_H + +#define X86_MXCSR_IE 0x0001 +#define X86_MXCSR_DE 0x0002 +#define

[Xen-devel] [PATCH v3 1/2][XTF] add FPU/SIMD register state test

2017-06-21 Thread Jan Beulich
Add tests to verify that - FPU insns leave correct (guest) values in FIP/FDP/FOP/FCS/FDS (at the example for FSTPS), - FPU insns writing memory don't update FPU register state when the write faults (at the example of FISTPS), - VCVTPS2PH (once implemented in the emulator) doesn't update MXCSR

[Xen-devel] [ovmf test] 110905: all pass - PUSHED

2017-06-21 Thread osstest service owner
flight 110905 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/110905/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf ed960a1d11eb9cd78f2fd86694f885ded4674168 baseline version: ovmf

Re: [Xen-devel] [PATCH v2] docs: improve ARM passthrough doc

2017-06-21 Thread Julien Grall
Hi Stefano. On 21/06/17 00:04, Stefano Stabellini wrote: Add a warning: use passthrough with care. Add a pointer to the gic device tree bindings. Add an explanation on how to calculate irq numbers from device tree. Add a brief explanation of the reg property and a pointer to the xl docs for a

[Xen-devel] [PATCH v3 0/2][XTF] FPU test improvements

2017-06-21 Thread Jan Beulich
1: add FPU/SIMD register state test 2: extend FPU exception tests Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] xen: Replace ASSERT(0) with ASSERT_UNREACHABLE()

2017-06-21 Thread Julien Grall
Hi Andrew, On 21/06/17 13:40, Andrew Cooper wrote: No functional change, but the result is more informative both in the code and error messages if the assertions do get hit. Signed-off-by: Andrew Cooper For ARM bits: Reviewed-by: Julien Grall

[Xen-devel] [PATCH v2 0/3] xen-disk: performance improvements

2017-06-21 Thread Paul Durrant
Paul Durrant (3): xen-disk: only advertize feature-persistent if grant copy is not available xen-disk: add support for multi-page shared rings xen-disk: use an IOThread per instance hw/block/trace-events | 7 ++ hw/block/xen_disk.c | 228

[Xen-devel] [PATCH v2 2/3] xen-disk: add support for multi-page shared rings

2017-06-21 Thread Paul Durrant
The blkif protocol has had provision for negotiation of multi-page shared rings for some time now and many guest OS have support in their frontend drivers. This patch makes the necessary modifications to xen-disk support a shared ring up to order 4 (i.e. 16 pages). Signed-off-by: Paul Durrant

[Xen-devel] [PATCH v2 3/3] xen-disk: use an IOThread per instance

2017-06-21 Thread Paul Durrant
This patch allocates an IOThread object for each xen_disk instance and sets the AIO context appropriately on connect. This allows processing of I/O to proceed in parallel. The patch also adds tracepoints into xen_disk to make it possible to follow the state transtions of an instance in the log.

[Xen-devel] [PATCH v2 1/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-21 Thread Paul Durrant
If grant copy is available then it will always be used in preference to persistent maps. In this case feature-persistent should not be advertized to the frontend, otherwise it may needlessly copy data into persistently granted buffers. Signed-off-by: Paul Durrant --- Cc:

Re: [Xen-devel] [PATCH v3 3/9] xen/mm: move modify_identity_mmio to global file and drop __init

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 14:43, wrote: > On Wed, Jun 21, 2017 at 05:57:19AM -0600, Jan Beulich wrote: >> >>> On 21.06.17 at 13:11, wrote: >> > On Fri, May 19, 2017 at 07:35:39AM -0600, Jan Beulich wrote: >> >> >>> On 27.04.17 at 16:35,

Re: [Xen-devel] [PATCH] xen: Replace ASSERT(0) with ASSERT_UNREACHABLE()

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 14:40, wrote: > No functional change, but the result is more informative both in the code and > error messages if the assertions do get hit. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

[Xen-devel] [PATCH] x86emul: correct CF output of SHLD/SHRD

2017-06-21 Thread Jan Beulich
CF reflects the last bit shifted out, i.e. can't possibly be derived from the result value. Signed-off-by: Jan Beulich --- This will only apply cleanly on top of https://lists.xenproject.org/archives/html/xen-devel/2017-06/msg02137.html ---

Re: [Xen-devel] [PATCH v3 3/9] xen/mm: move modify_identity_mmio to global file and drop __init

2017-06-21 Thread Roger Pau Monne
On Wed, Jun 21, 2017 at 05:57:19AM -0600, Jan Beulich wrote: > >>> On 21.06.17 at 13:11, wrote: > > On Fri, May 19, 2017 at 07:35:39AM -0600, Jan Beulich wrote: > >> >>> On 27.04.17 at 16:35, wrote: > >> > +int modify_mmio(struct domain *d, gfn_t gfn,

[Xen-devel] [PATCH] xen: Replace ASSERT(0) with ASSERT_UNREACHABLE()

2017-06-21 Thread Andrew Cooper
No functional change, but the result is more informative both in the code and error messages if the assertions do get hit. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini

Re: [Xen-devel] [PATCH 09/11] gnttab: avoid spurious maptrack handle allocation failures

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 14:02, wrote: > On 21/06/17 10:37, Jan Beulich wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -397,7 +397,7 @@ get_maptrack_handle( >> struct vcpu *curr = current; >> unsigned int i, head;

Re: [Xen-devel] [PATCH 10/11] gnttab: limit mapkind()'s iteration count

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:38, Jan Beulich wrote: > There's no need for the function to observe increases of the maptrack > table (which can occur as the maptrack lock isn't being held) - actual > population of maptrack entries is excluded while we're here (by way of > holding the respective grant table lock

[Xen-devel] [PATCH 17/17] x86/HVM: eliminate custom #MF/#XM handling

2017-06-21 Thread Jan Beulich
Use the generic stub exception handling instead. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/x86_emulate.c +++ b/tools/tests/x86_emulator/x86_emulate.c @@ -134,8 +134,6 @@ int emul_test_read_xcr( } int emul_test_get_fpu( -void (*exception_callback)(void

[Xen-devel] [PATCH 16/17] x86emul: make all FPU emulation use the stub

2017-06-21 Thread Jan Beulich
While this means quite some reduction of (source) code, the main purpose is to no longer have exceptions raised from other than stubs. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1261,28 +1261,25 @@

[Xen-devel] [PATCH 15/17] x86emul: adjust_bnd() should check XCR0

2017-06-21 Thread Jan Beulich
Experimentally MPX instructions have been confirmed to behave as NOPs unless both related XCR0 bits are set to 1. By implication branches then also don't clear BNDn. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++

[Xen-devel] [PATCH 14/17] x86emul: abstract out XCRn accesses

2017-06-21 Thread Jan Beulich
Use hooks, just like done for other special purpose registers. This includes moving XCR0 checks from hvmemul_get_fpu() to the emulator itself as well as adding support for XGETBV emulation. For now fuzzer reads will obtain the real values (minus the fuzzing of the hook pointer itself).

[Xen-devel] [PATCH 13/17] x86emul: re-order checks in test harness

2017-06-21 Thread Jan Beulich
On older systems printing the "n/a" messages (resulting from the compiler not being new enough to deal with some of the test code) isn't very useful: If both CPU and compiler are too old for a certain test, we can as well omit those messages, as those tests wouldn't be run even if the compiler did

[Xen-devel] [PATCH 12/17] x86emul: support 3DNow! insns

2017-06-21 Thread Jan Beulich
Yes, recent AMD CPUs don't support them anymore, but I think we should nevertheless cope. Signed-off-by: Jan Beulich --- a/.gitignore +++ b/.gitignore @@ -223,7 +223,7 @@ tools/security/xensec_tool tools/tests/x86_emulator/*.bin tools/tests/x86_emulator/*.tmp

[Xen-devel] [PATCH 11/17] x86emul: support XOP insns

2017-06-21 Thread Jan Beulich
Signed-off-by: Jan Beulich --- a/.gitignore +++ b/.gitignore @@ -230,7 +230,7 @@ tools/tests/x86_emulator/sse*.[ch] tools/tests/x86_emulator/test_x86_emulator tools/tests/x86_emulator/x86_emulate +tools/tests/x86_emulator/xop*.[ch] tools/tests/xen-access/xen-access

[Xen-devel] [PATCH 10/17] x86emul: add tables for XOP 08 and 09 extension spaces

2017-06-21 Thread Jan Beulich
Convert the few existing opcodes so far supported. Also adjust two vex_* case labels to better be ext_* (the values are identical). Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -458,6 +458,20 @@

[Xen-devel] [PATCH 09/17] x86emul: support AVX2 gather insns

2017-06-21 Thread Jan Beulich
Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@ -13,7 +13,8 @@ run: $(TARGET) SIMD := sse sse2 sse4 avx avx2 FMA := fma4 fma -TESTCASES := blowfish $(SIMD) $(FMA) +SG := avx2-sg +TESTCASES := blowfish $(SIMD)

[Xen-devel] [PATCH 08/17] x86emul: fold/eliminate some local variables

2017-06-21 Thread Jan Beulich
Make i switch-wide (at once makeing it unsigned, as it should have been) and introduce n (for immediate use in enter and aam/aad handling). Eliminate on-stack arrays in pusha/popa handling. Use ea.val insatead of a custom variable in bound handling. No (intended) functional change.

Re: [Xen-devel] [PATCH 09/11] gnttab: avoid spurious maptrack handle allocation failures

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:37, Jan Beulich wrote: > When no memory is available in the hypervisor, rather than immediately > failing the request try to steal a handle from another vCPU. "request, try" > > Reported-by: George Dunlap > Signed-off-by: Jan Beulich

[Xen-devel] [PATCH 07/17] x86emul: support most remaining AVX2 insns

2017-06-21 Thread Jan Beulich
I.e. those not being equivalents of SSEn ones, but with the exception of the various gather operations. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@ -11,9 +11,9 @@ all: $(TARGET) run: $(TARGET)

[Xen-devel] [PATCH 06/17] x86emul: support FMA insns

2017-06-21 Thread Jan Beulich
Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@ -12,7 +12,7 @@ run: $(TARGET) ./$(TARGET) SIMD := sse sse2 sse4 avx -FMA := fma4 +FMA := fma4 fma TESTCASES := blowfish $(SIMD) sse2-avx sse4-avx $(FMA)

[Xen-devel] [PATCH 05/17] x86emul: support FMA4 insns

2017-06-21 Thread Jan Beulich
Signed-off-by: Jan Beulich --- a/.gitignore +++ b/.gitignore @@ -226,7 +226,7 @@ tools/tests/x86_emulator/asm tools/tests/x86_emulator/avx*.[ch] tools/tests/x86_emulator/blowfish.h +tools/tests/x86_emulator/fma*.[ch] tools/tests/x86_emulator/sse*.[ch]

[Xen-devel] [PATCH 04/17] x86emul: support F16C insns

2017-06-21 Thread Jan Beulich
Note that this avoids emulating the behavior of VCVTPS2PH found on at least some Intel CPUs, which update MXCSR even when the memory write faults. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/test_x86_emulator.c +++ b/tools/tests/x86_emulator/test_x86_emulator.c

[Xen-devel] [PATCH 03/17] x86emul: build SIMD tests with -Os

2017-06-21 Thread Jan Beulich
Namely in the context of putting together subsequent patches I've noticed that together with the touch() macro using -Os further increases the chances of the compiler using memory operands for the instructions we actually care to test. Signed-off-by: Jan Beulich ---

[Xen-devel] [PATCH 02/17] x86emul: re-order cases of main switch statement

2017-06-21 Thread Jan Beulich
Re-store intended numerical ordering, which has become "violated" mostly by incremental additions where moving around bigger chunks did not seem advisable. One exception though at the very top of the switch(): Keeping the arithmetic ops together seems preferable over entirely strict ordering.

[Xen-devel] [PATCH 01/17] x86emul: support remaining AVX insns

2017-06-21 Thread Jan Beulich
I.e. those not being equivalents of SSEn ones. There's one necessary change to generic code: Faulting behavior of VMASKMOVP{S,D} requires us to do partial reads/writes. Signed-off-by: Jan Beulich --- a/.gitignore +++ b/.gitignore @@ -224,7 +224,7 @@

Re: [Xen-devel] [PATCH v3 3/9] xen/mm: move modify_identity_mmio to global file and drop __init

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 13:11, wrote: > On Fri, May 19, 2017 at 07:35:39AM -0600, Jan Beulich wrote: >> >>> On 27.04.17 at 16:35, wrote: >> > And also allow it to do non-identity mappings by adding a new parameter. >> > This >> > function will be needed in

Re: [Xen-devel] [PATCH 07/11] x86: fold identical error paths in xenmem_add_to_physmap_one()

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:36, Jan Beulich wrote: > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper I think this function is another one which could benefit from explicitly counting the number of references it collects, as per XSA-224. > > ---

Re: [Xen-devel] [PATCH] x86/mmuext: don't allow copying/clearing non-RAM pages

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 12:51, wrote: > On 21/06/17 11:10, Jan Beulich wrote: >> The two operations really aren't meant for anything else. >> >> Signed-off-by: Jan Beulich > > Reviewed-by: Andrew Cooper , however... > >> >>

Re: [Xen-devel] [PATCH 05/11] evtchn: convert evtchn_port_is_*() to plain bool

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:34, Jan Beulich wrote: > ... at once reducing overall source size by combining some statements > and constifying a few pointers. > > Signed-off-by: Jan Beulich Ah - I was planning to do precisely this. I'm glad I hadn't started yet. Reviewed-by: Andrew Cooper

Re: [Xen-devel] [PATCH 04/11] domctl: restrict DOMCTL_set_target to HVM domains

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:33, Jan Beulich wrote: > Both the XSA-217 fix and > lists.xenproject.org/archives/html/xen-devel/2017-04/msg02945.html > make this assumption, so let's enforce it. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper , although...

Re: [Xen-devel] [PATCH 03/11] make steal_page() return a proper error value

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:32, Jan Beulich wrote: > ... and use it where suitable (the tmem caller doesn't propagate an > error code). While it doesn't matter as much, also make donate_page() > follow suit on x86 (on ARM it already returns -ENOSYS). > > Also move their declarations to common code and add

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

2017-06-21 Thread osstest service owner
flight 110924 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/110924/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen d8f1b48fd665d7aad1711de2f073540d07d2d041 baseline version: xen

[Xen-devel] [xen-4.6-testing test] 110899: regressions - FAIL

2017-06-21 Thread osstest service owner
flight 110899 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110899/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-3 45 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 110386

Re: [Xen-devel] [PATCH 02/11] gnttab: remove redundant xenheap check from gnttab_transfer()

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:31, Jan Beulich wrote: > The message isn't very useful, and the check is being done by > steal_page() anyway. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-21 Thread Andrew Cooper
On 21/06/17 10:30, Jan Beulich wrote: > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 00/17] x86: emulator enhancements

2017-06-21 Thread Jan Beulich
01: support remaining AVX insns 02: re-order cases of main switch statement 03: build SIMD tests with -Os 04: support F16C insns 05: support FMA4 insns 06: support FMA insns 07: support most remaining AVX2 insns 08: fold/eliminate some local variables 09: support AVX2 gather insns 10: add tables

Re: [Xen-devel] [PATCH RFC] Implement hypercall for tracing of program counters

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 09:20:20AM +0200, Felix Schmoll wrote: > This commit makes the changes to the hypervisor, the build system as > well as libxc necessary in order to facilitate tracing of program counters. > > A discussion of the design can be found in the mailing list: >

Re: [Xen-devel] [PATCH v3 3/9] xen/mm: move modify_identity_mmio to global file and drop __init

2017-06-21 Thread Roger Pau Monne
On Fri, May 19, 2017 at 07:35:39AM -0600, Jan Beulich wrote: > >>> On 27.04.17 at 16:35, wrote: > > And also allow it to do non-identity mappings by adding a new parameter. > > This > > function will be needed in other parts apart from PVH Dom0 build. While > > there > >

Re: [Xen-devel] [Qemu-devel] [PATCH 1/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Roger Pau Monne > Sent: 21 June 2017 11:51 > To: Paul Durrant > Cc: Stefano Stabellini ; Kevin Wolf > ; qemu-bl...@nongnu.org; qemu-de...@nongnu.org; > Max Reitz ; Anthony

Re: [Xen-devel] [PATCH] x86/mmuext: don't allow copying/clearing non-RAM pages

2017-06-21 Thread Andrew Cooper
On 21/06/17 11:10, Jan Beulich wrote: > The two operations really aren't meant for anything else. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper , however... > > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -3229,6 +3229,7 @@

Re: [Xen-devel] [PATCH v7 25/36] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-21 Thread Borislav Petkov
On Fri, Jun 16, 2017 at 01:54:36PM -0500, Tom Lendacky wrote: > Add warnings to let the user know when bounce buffers are being used for > DMA when SME is active. Since the bounce buffers are not in encrypted > memory, these notifications are to allow the user to determine some > appropriate

Re: [Xen-devel] [Qemu-devel] [PATCH 1/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-21 Thread Roger Pau Monne
On Wed, Jun 21, 2017 at 11:40:00AM +0100, Paul Durrant wrote: > > -Original Message- > > From: Qemu-devel [mailto:qemu-devel- > > bounces+paul.durrant=citrix@nongnu.org] On Behalf Of Paul Durrant > > Sent: 21 June 2017 10:36 > > To: Roger Pau Monne ; Stefano

[Xen-devel] [PATCH v2] VT-d: fix VF of RC integrated endpoint matched to wrong VT-d unit

2017-06-21 Thread Chao Gao
The problem is a VF of RC integrated PF (e.g. PF's BDF is 00:02.0), we would wrongly use 00:00.0 to search VT-d unit. To search VT-d unit for a VF, the BDF of the PF is used. And If the PF is an Extended Function, the BDF of one traditional function is used. The following line (from

Re: [Xen-devel] [PATCH 2/3] xen-disk: add support for multi-page shared rings

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 20 June 2017 23:51 > To: Paul Durrant > Cc: xen-de...@lists.xenproject.org; qemu-de...@nongnu.org; qemu- > bl...@nongnu.org; Stefano Stabellini ;

Re: [Xen-devel] [Qemu-devel] [PATCH 1/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Qemu-devel [mailto:qemu-devel- > bounces+paul.durrant=citrix@nongnu.org] On Behalf Of Paul Durrant > Sent: 21 June 2017 10:36 > To: Roger Pau Monne ; Stefano Stabellini > > Cc: Kevin Wolf ;

Re: [Xen-devel] Notes on stubdoms and latency on ARM

2017-06-21 Thread Julien Grall
On 20/06/17 17:23, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, On 20 June 2017 at 03:45, Julien Grall wrote: On 19 June 2017 at 10:54, Stefano Stabellini wrote: But given the conversation so far, it seems likely that that is mainly

Re: [Xen-devel] [PATCH] x86/mm: consolidate setting of TLB flush time stamps

2017-06-21 Thread Andrew Cooper
On 21/06/17 11:11, Jan Beulich wrote: > Move code and comment into a helper function instead of repeating it in > multiple places. > > Signed-off-by: Jan Beulich Reivewed-by: Andrew Cooper ___ Xen-devel

Re: [Xen-devel] [PATCH] x86/mm: drop redundant domain parameter from get_page_from_gfn_p2m()

2017-06-21 Thread Andrew Cooper
On 21/06/17 11:12, Jan Beulich wrote: > It can always be read from the passed p2m. Take the opportunity and > also rename the function, making the "p2m" suffix a prefix, to match > other p2m functions, and convert the "gfn" parameter's type. > > Signed-off-by: Jan Beulich

[Xen-devel] [PATCH 1/2] x86/p2m: simplify p2m_next_level()

2017-06-21 Thread Jan Beulich
Calculate entry PFN and flags just once, making the respective variables (and also pg) function wide. Take the opportunity and also make the induction variable unsigned. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/p2m-pt.c +++ b/xen/arch/x86/mm/p2m-pt.c @@ -195,7 +195,9

[Xen-devel] [PATCH 2/2] x86/p2m: make p2m_alloc_ptp() return an MFN

2017-06-21 Thread Jan Beulich
None of the callers really needs the struct page_info pointer. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -569,7 +569,7 @@ int p2m_set_entry(struct p2m_domain *p2m return rc; } -struct page_info *p2m_alloc_ptp(struct

[Xen-devel] [qemu-mainline test] 110901: regressions - FAIL

2017-06-21 Thread osstest service owner
flight 110901 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/110901/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 16 guest-start.2fail REGR. vs. 110478 Regressions

Re: [Xen-devel] [PATCH 06/14 v4] xen/arm: vpl011: Add a new domctl API to initialize vpl011

2017-06-21 Thread Bhupinder Thakur
Hi Julien, On 20 June 2017 at 16:46, Julien Grall wrote: > On 06/19/2017 02:11 PM, Bhupinder Thakur wrote: >> >> Hi Wei, > > > Hi Bhupinder, > > >> On 19 June 2017 at 17:17, Wei Liu wrote: >>> >>> On Mon, Jun 19, 2017 at 12:01:32PM +0100, Julien Grall

[Xen-devel] [PATCH 0/2] x86/p2m: some code simplification

2017-06-21 Thread Jan Beulich
1: simplify p2m_next_level() 2: make p2m_alloc_ptp() return an MFN Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH] x86/mm: drop redundant domain parameter from get_page_from_gfn_p2m()

2017-06-21 Thread Jan Beulich
It can always be read from the passed p2m. Take the opportunity and also rename the function, making the "p2m" suffix a prefix, to match other p2m functions, and convert the "gfn" parameter's type. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/hap/guest_walk.c +++

[Xen-devel] [PATCH] x86/mm: consolidate setting of TLB flush time stamps

2017-06-21 Thread Jan Beulich
Move code and comment into a helper function instead of repeating it in multiple places. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -602,6 +602,20 @@ static inline void guest_get_eff_kern_l1 TOGGLE_MODE(); } +static inline void

Re: [Xen-devel] [PATCH v2 1/3] libxl: add PV display device driver interface

2017-06-21 Thread Oleksandr Grytsov
On Tue, Jun 20, 2017 at 4:54 PM, Wei Liu wrote: > On Thu, May 25, 2017 at 03:17:29PM +0300, Oleksandr Grytsov wrote: >> From: Oleksandr Grytsov >> Hi Wei, Thank you for your reply. > I'm sorry, patch like this is impossible to review because:

[Xen-devel] [PATCH] x86/mmuext: don't allow copying/clearing non-RAM pages

2017-06-21 Thread Jan Beulich
The two operations really aren't meant for anything else. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3229,6 +3229,7 @@ long do_mmuext_op( switch ( op.cmd ) { struct page_info *page; +p2m_type_t

[Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-21 Thread Jan Beulich
So far callers of the libxc interface passed in a domain ID which was then ignored in the hypervisor. Instead, make the hypervisor honor it (accepting DOMID_INVALID to obtain original behavior), allowing to query whether a device is assigned to a particular domain. Ignore the passed in domain ID

Re: [Xen-devel] Fwd: VM Live Migration with Local Storage

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of > Konrad Rzeszutek Wilk > Sent: 20 June 2017 18:57 > To: Bruno Alvisio > Cc: xen-devel@lists.xen.org > Subject: Re: [Xen-devel] Fwd: VM Live Migration with Local Storage >

Re: [Xen-devel] [PATCH v7 24/36] x86, swiotlb: Add memory encryption support

2017-06-21 Thread Borislav Petkov
On Fri, Jun 16, 2017 at 01:54:24PM -0500, Tom Lendacky wrote: > Since DMA addresses will effectively look like 48-bit addresses when the > memory encryption mask is set, SWIOTLB is needed if the DMA mask of the > device performing the DMA does not support 48-bits. SWIOTLB will be > initialized to

Re: [Xen-devel] [PATCH v7 23/36] x86, realmode: Decrypt trampoline area if memory encryption is active

2017-06-21 Thread Borislav Petkov
On Fri, Jun 16, 2017 at 01:54:12PM -0500, Tom Lendacky wrote: > When Secure Memory Encryption is enabled, the trampoline area must not > be encrypted. A CPU running in real mode will not be able to decrypt > memory that has been encrypted because it will not be able to use addresses > with the

Re: [Xen-devel] [PATCH net] xen-netback: correctly schedule rate-limited queues

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Wei Liu [mailto:wei.l...@citrix.com] > Sent: 21 June 2017 10:21 > To: net...@vger.kernel.org > Cc: Xen-devel ; Paul Durrant > ; David Miller ; jean- > lo...@dupond.be; Wei Liu

[Xen-devel] [PATCH 11/11] gnttab: drop useless locking

2017-06-21 Thread Jan Beulich
Holding any lock while accessing the maptrack entry fields is pointless, as these entries are protected by their associated active entry lock (which is being acquired later, before re-validating the fields read without holding the lock). Signed-off-by: Jan Beulich ---

[Xen-devel] [PATCH 10/11] gnttab: limit mapkind()'s iteration count

2017-06-21 Thread Jan Beulich
There's no need for the function to observe increases of the maptrack table (which can occur as the maptrack lock isn't being held) - actual population of maptrack entries is excluded while we're here (by way of holding the respective grant table lock for writing, while code populating entries

[Xen-devel] [PATCH 09/11] gnttab: avoid spurious maptrack handle allocation failures

2017-06-21 Thread Jan Beulich
When no memory is available in the hypervisor, rather than immediately failing the request try to steal a handle from another vCPU. Reported-by: George Dunlap Signed-off-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c

[Xen-devel] [PATCH 08/11] gnttab: remove host map in the event of a grant_map failure

2017-06-21 Thread Jan Beulich
From: George Dunlap The current code appropriately removes the reference and type counts on failure, but leaves the mapping set up. As the only path which can trigger this is failure from IOMMU manipulation, and as unprivileged domains are being crashed in that case,

[Xen-devel] [PATCH 07/11] x86: fold identical error paths in xenmem_add_to_physmap_one()

2017-06-21 Thread Jan Beulich
Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4899,11 +4899,8 @@ int xenmem_add_to_physmap_one( if ( !paging_mode_translate(d) || (mfn == 0) ) { -if ( page ) -put_page(page); -if ( space ==

Re: [Xen-devel] [PATCH 1/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Roger Pau Monne > Sent: 21 June 2017 10:18 > To: Stefano Stabellini > Cc: Paul Durrant ; xen-de...@lists.xenproject.org; > qemu-de...@nongnu.org; qemu-bl...@nongnu.org; Anthony Perard >

[Xen-devel] [PATCH 06/11] ARM: simplify page type handling

2017-06-21 Thread Jan Beulich
There's no need to have anything here on ARM other than the distinction between writable and non-writable pages (and even that could likely be eliminated, but with a more intrusive change). Limit type to a single bit and drop pinned and validated flags altogether. Signed-off-by: Jan Beulich

<    1   2   3   >