[Xen-devel] [PATCH V2 1/25] VIOMMU: Add vIOMMU helper functions to create, destroy and query capabilities

2017-08-17 Thread Lan Tianyu
This patch is to introduct an abstract layer for arch vIOMMU implementation to deal with requests from dom0. Arch vIOMMU code needs to provide callback to perform create, destroy and query capabilities operation. Signed-off-by: Lan Tianyu --- xen/arch/x86/Kconfig | 1 + xen/arch/x86/setup.

Re: [Xen-devel] [PATCH RESEND1 00/12] ALSA: vsnd: Add Xen para-virtualized frontend driver

2017-08-17 Thread Oleksandr Andrushchenko
Hello, On 08/18/2017 08:43 AM, Takashi Sakamoto wrote: On Aug 17 2017 19:05, Oleksandr Grytsov wrote: So, from the above we think that period elapsed event derived in the described ways may not improve latency and will complicate the system. So, for that reason we are thinking of the option 2)

Re: [Xen-devel] [PATCH V2 9/25] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-08-17 Thread Chao Gao
On Thu, Aug 17, 2017 at 01:28:21PM +0100, Wei Liu wrote: >On Thu, Aug 17, 2017 at 12:32:17PM +0100, Wei Liu wrote: >> On Wed, Aug 09, 2017 at 04:34:10PM -0400, Lan Tianyu wrote: >> > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c >> > index f54fd49..94c9196 100644 >> > --- a/tools/l

Re: [Xen-devel] [PATCH RESEND1 00/12] ALSA: vsnd: Add Xen para-virtualized frontend driver

2017-08-17 Thread Takashi Sakamoto
On Aug 17 2017 19:05, Oleksandr Grytsov wrote: So, from the above we think that period elapsed event derived in the described ways may not improve latency and will complicate the system. So, for that reason we are thinking of the option 2) (Positions of actual data transmission in any serial soun

[Xen-devel] [linux-3.18 test] 112675: trouble: blocked/broken/fail/pass

2017-08-17 Thread osstest service owner
flight 112675 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/112675/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 3 capture-logs broken REGR. vs. 112102

[Xen-devel] [libvirt test] 112677: tolerable trouble: blocked/broken/pass - PUSHED

2017-08-17 Thread osstest service owner
flight 112677 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/112677/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-libvirt-xsm 1 build-check(1) blocked n/a build-arm64-libvirt 1 build-check(1)

[Xen-devel] [xen-unstable test] 112674: regressions - trouble: blocked/broken/fail/pass

2017-08-17 Thread osstest service owner
flight 112674 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/112674/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 112655 Tests which

Re: [Xen-devel] [PATCH v1 07/13] x86: implement set value flow for MBA

2017-08-17 Thread Chao Peng
> +if ( feat->mba_info.linear ) > +{ > +unsigned int mod; > + > +if ( feat->mba_info.thrtl_max >= 100 ) > +return false; Can we do this check earlier, e.g. when it gets enumerated from CPUID? > + > +mod = *thrtl % (100 - feat->mba_info.thrtl_max); > + 

[Xen-devel] [linux-linus test] 112673: regressions - trouble: blocked/broken/fail/pass

2017-08-17 Thread osstest service owner
flight 112673 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/112673/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-examine 7 reboot fail REGR. vs. 110515 test-amd64-amd64-xl

Re: [Xen-devel] [PATCH V2 1/25] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-08-17 Thread Lan Tianyu
Hi Wei: Thanks for your review. On 2017年08月17日 19:18, Wei Liu wrote: > On Wed, Aug 09, 2017 at 04:34:02PM -0400, Lan Tianyu wrote: >> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h >> index ff39762..4b10f26 100644 >> --- a/xen/include/public/domctl.h >> +++ b/xen/in

Re: [Xen-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-17 Thread Michael S. Tsirkin
On Thu, Aug 17, 2017 at 05:23:46PM +0100, Anthony PERARD wrote: > This means that the function will be call and the property > acpi-pcihp-bsel will be set even if ACPI build is disable. > > To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be > set, but this was done only when

[Xen-devel] [xen-4.7-testing baseline-only test] 71987: regressions - trouble: blocked/broken/fail/pass

2017-08-17 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71987 xen-4.7-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71987/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-multivcpu 18 guest-local

[Xen-devel] [PATCH 10/12] xen-blkback: Fix indentation

2017-08-17 Thread Bart Van Assche
Avoid that smatch reports the following warning when building with C=2 CHECK="smatch -p=kernel": drivers/block/xen-blkback/blkback.c:710 xen_blkbk_unmap_prepare() warn: inconsistent indenting Signed-off-by: Bart Van Assche Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monn303251 Cc: xen-de...@lists

[Xen-devel] [PATCH 12/12] xen-blkfront: Avoid that gcc 7 warns about fall-through when building with W=1

2017-08-17 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monn303251 Cc: xen-de...@lists.xenproject.org --- drivers/block/xen-blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 98e34e4c62b

[Xen-devel] [PATCH 11/12] xen-blkback: Avoid that gcc 7 warns about fall-through when building with W=1

2017-08-17 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monn303251 Cc: xen-de...@lists.xenproject.org --- drivers/block/xen-blkback/blkback.c | 1 + drivers/block/xen-blkback/xenbus.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/xen-blkbac

[Xen-devel] [ovmf baseline-only test] 71988: all pass

2017-08-17 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71988 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71988/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d75b8ac278bc9f0159aa7eb9a92fd2cc87a18d8c baseline v

[Xen-devel] [PATCH 1/1] xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect

2017-08-17 Thread Annie Li
If there is inflight I/O in any non-last queue, blkback returns -EBUSY directly, and never stops thread of remaining queue and processs them. When removing vbd device with lots of disk I/O load, some queues with inflight I/O still have blkback thread running even though the corresponding vbd device

[Xen-devel] [linux-4.9 test] 112672: tolerable trouble: blocked/broken/fail/pass - PUSHED

2017-08-17 Thread osstest service owner
flight 112672 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/112672/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-libvirt-xsm 1 build-check(1) blocked n/a test-arm64-arm64-xl 1 build-check(

Re: [Xen-devel] [PATCH v3] hvmloader, libxl: use the correct ACPI settings depending on device model

2017-08-17 Thread Andrew Cooper
On 17/08/17 15:57, Igor Druzhinin wrote: > We need to choose ACPI tables and ACPI IO port location > properly depending on the device model version we are running. > Previously, this decision was made by BIOS type specific > code in hvmloader, e.g. always load QEMU traditional specific > tables if

[Xen-devel] [xen-4.8-testing baseline-only test] 71986: regressions - trouble: blocked/broken/fail/pass

2017-08-17 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71986 xen-4.8-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71986/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-midway 12 guest-start

Re: [Xen-devel] [PATCH v2] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Andrew Cooper
On 17/08/17 17:51, Boris Ostrovsky wrote: > @@ -1589,7 +1585,7 @@ const struct hvm_function_table * __init start_svm(void) > > svm_host_osvw_reset(); > > -if ( _svm_cpu_up(true) ) > +if ( svm_cpu_up_prepare(smp_processor_id()) || _svm_cpu_up(true) ) Both of these could pass 0 rath

Re: [Xen-devel] [PATCH] xen/events: events_fifo: Don't use {get, put}_cpu() in xen_evtchn_fifo_init()

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 12:14 PM, Julien Grall wrote: > When booting Linux as Xen guest with CONFIG_DEBUG_ATOMIC, the following > splat appears: > > [0.002323] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 > bytes) > [0.019717] ASID allocator initialised with 65536 entries > [0.02001

Re: [Xen-devel] Regression PCI passthrough from 4.5.5 to 4.6.0-rc1

2017-08-17 Thread Andreas Kinzler
On Tue, 15 Aug 2017 11:55:10 +0200, Roger Pau Monné wrote: Could you please try the patch below and paste the output you get on the Xen console? Output is in attached file. Does it help? Regards Andreas(XEN) MSIX ctrl write. Enabled: 0 Maskall: 0. Configured entries: (XEN) MSIX ctrl write. E

[Xen-devel] [xen-4.5-testing test] 112669: regressions - FAIL

2017-08-17 Thread osstest service owner
flight 112669 xen-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/112669/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-winxpsp3 16 guest-localmigrate/x10 fail REGR. vs. 110906 test-amd64-

Re: [Xen-devel] [RFC PATCH v2 07/22] ARM: vGIC: introduce priority setter/getter

2017-08-17 Thread Andre Przywara
Hi, On 11/08/17 15:10, Julien Grall wrote: > Hi Andre, > > On 21/07/17 20:59, Andre Przywara wrote: >> Since the GICs MMIO access always covers a number of IRQs at once, >> introduce wrapper functions which loop over those IRQs, take their >> locks and read or update the priority values. >> This

[Xen-devel] [PATCH v2 0/3] tools/libxc: use superpages

2017-08-17 Thread Olaf Hering
Using superpages on the receiving dom0 will avoid performance regressions. Olaf v2: split into individual commits Olaf Hering (3): tools/libxc: move SUPERPAGE macros to common header tools/libxc: add API for bitmap access for restore tools/libxc: use superpages during restore of HVM guest

[Xen-devel] [PATCH v2 3/3] tools/libxc: use superpages during restore of HVM guest

2017-08-17 Thread Olaf Hering
During creating of a HVM domU meminit_hvm() tries to map superpages. After save/restore or migration this mapping is lost, everything is allocated in single pages. This causes a performance degradition after migration. Add neccessary code to preallocate a superpage for the chunk of pfns that is re

[Xen-devel] [PATCH v2 1/3] tools/libxc: move SUPERPAGE macros to common header

2017-08-17 Thread Olaf Hering
The macros SUPERPAGE_2MB_SHIFT and SUPERPAGE_1GB_SHIFT will be used by other code in libxc. Move the macros to a header file. Signed-off-by: Olaf Hering --- tools/libxc/xc_dom_x86.c | 5 - tools/libxc/xc_private.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tool

[Xen-devel] [PATCH v2 2/3] tools/libxc: add API for bitmap access for restore

2017-08-17 Thread Olaf Hering
Extend API for managing bitmaps. Each bitmap is now represented by a generic struct xc_sr_bitmap. Switch the existing populated_pfns to this API. Signed-off-by: Olaf Hering --- tools/libxc/xc_sr_common.c | 41 +++ tools/libxc/xc_sr_common.h | 67

[Xen-devel] [PATCH v2] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Boris Ostrovsky
These routines are first called via CPU_UP_PREPARE notifier by the BSP and then by the booting ASP from vmx_cpu_up()/_svm_cpu_up(). Avoid the unnecessary second call. Signed-off-by: Boris Ostrovsky Reported-by: Andrew Cooper --- V2: * Call *cpu_up_prepare() on BSP from start_svm/vmx() xen/arc

[Xen-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-17 Thread Anthony PERARD
This means that the function will be call and the property acpi-pcihp-bsel will be set even if ACPI build is disable. To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be set, but this was done only when ACPI tables are built which is not needed for a Xen guest. The need for th

[Xen-devel] [PATCH for-2.10 v3 1/3] hw/acpi: Limit hotplug to root bus on legacy mode

2017-08-17 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- New patch in V3 --- hw/acpi/pcihp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index c420a388ea..9db3c2eaf2 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -273,7 +273,7 @@ static void pci_write(voi

[Xen-devel] [PATCH for-2.10 v3 3/3] Revert "ACPI: don't call acpi_pcihp_device_plug_cb on xen"

2017-08-17 Thread Anthony PERARD
This reverts commit 153eba4726dfa1bdfc31d1fe973b2a61b9035492. This patch prevents PCI passthrough hotplug on Xen. Even if the Xen tool stack prepares its own ACPI tables, we still rely on QEMU for hotplug ACPI notifications. The original issue is fixed by the two previous patch: hw/acpi: Disall

[Xen-devel] [PATCH for-2.10 v3 0/3] Fix hotplug of PCI passthrought device on Xen

2017-08-17 Thread Anthony PERARD
Adding PCI passthrough before the guest start works fine (broken in 2.9 but now fixed), but hotplug does not work anymore. Anthony PERARD (3): hw/acpi: Limit hotplug to root bus on legacy mode hw/acpi: Move acpi_set_pci_info to pcihp Revert "ACPI: don't call acpi_pcihp_device_plug_cb on xen"

[Xen-devel] [PATCH] xen/events: events_fifo: Don't use {get, put}_cpu() in xen_evtchn_fifo_init()

2017-08-17 Thread Julien Grall
When booting Linux as Xen guest with CONFIG_DEBUG_ATOMIC, the following splat appears: [0.002323] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes) [0.019717] ASID allocator initialised with 65536 entries [0.020019] xen:grant_table: Grant tables using version 1 layout [

[Xen-devel] [PATCH] xen/events: events_fifo: Don't use {get, put}_cpu() in xen_evtchn_fifo_init()

2017-08-17 Thread Julien Grall
When booting Linux as Xen guest with CONFIG_DEBUG_ATOMIC, the following splat appears: [0.002323] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes) [0.019717] ASID allocator initialised with 65536 entries [0.020019] xen:grant_table: Grant tables using version 1 layout [

[Xen-devel] [xen-unstable-smoke test] 112686: tolerable trouble: broken/pass - PUSHED

2017-08-17 Thread osstest service owner
flight 112686 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/112686/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a build-arm64-pvops 2 hos

Re: [Xen-devel] [PATCH for-2.10 v2 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-17 Thread Igor Mammedov
On Thu, 17 Aug 2017 15:23:27 +0100 Anthony PERARD wrote: > On Wed, Aug 16, 2017 at 11:10:46AM +0200, Igor Mammedov wrote: > > On Tue, 15 Aug 2017 22:24:08 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Aug 15, 2017 at 02:07:51PM +0200, Igor Mammedov wrote: > > > > On Tue, 15 Aug 20

Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Andrew Cooper
On 17/08/17 15:19, Boris Ostrovsky wrote: > diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c > index 0dc9442..3e7b9fc 100644 > --- a/xen/arch/x86/hvm/svm/svm.c > +++ b/xen/arch/x86/hvm/svm/svm.c > @@ -1538,7 +1538,7 @@ static int _svm_cpu_up(bool bsp) > return -EINVAL;

Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 10:59 AM, Jan Beulich wrote: On 17.08.17 at 16:19, wrote: >> --- a/xen/arch/x86/hvm/vmx/vmcs.c >> +++ b/xen/arch/x86/hvm/vmx/vmcs.c >> @@ -652,7 +652,7 @@ int vmx_cpu_up(void) >> >> INIT_LIST_HEAD(&this_cpu(active_vmcs_list)); >> >> -if ( (rc = vmx_cpu_up_prepare(cp

Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Jan Beulich
>>> On 17.08.17 at 16:19, wrote: > --- a/xen/arch/x86/hvm/vmx/vmcs.c > +++ b/xen/arch/x86/hvm/vmx/vmcs.c > @@ -652,7 +652,7 @@ int vmx_cpu_up(void) > > INIT_LIST_HEAD(&this_cpu(active_vmcs_list)); > > -if ( (rc = vmx_cpu_up_prepare(cpu)) != 0 ) > +if ( (cpu == 0) && (rc = vmx_cpu_

[Xen-devel] [PATCH v3] hvmloader, libxl: use the correct ACPI settings depending on device model

2017-08-17 Thread Igor Druzhinin
We need to choose ACPI tables and ACPI IO port location properly depending on the device model version we are running. Previously, this decision was made by BIOS type specific code in hvmloader, e.g. always load QEMU traditional specific tables if it's ROMBIOS and always load QEMU Xen specific tabl

Re: [Xen-devel] preparations for 4.8.2

2017-08-17 Thread Jan Beulich
>>> On 17.08.17 at 16:37, wrote: > it’s been a while. Did you want to pick this up at some point again? Yes, once Ian is back from vacation (and has sufficiently recovered from mail and other backlog). > I guess the check we have done so far is by now out-of-date. Yes, with the recent XSAs and

Re: [Xen-devel] [PATCH v4 06/31] x86: move pv_emul_is_mem_write to pv/emulate.c

2017-08-17 Thread Andrew Cooper
On 17/08/17 15:44, Wei Liu wrote: > Export it via pv/emulate.h. In the mean time it is required to > include pv/emulate.h in x86/mm.c. > > The said function will be used later by different emulation handlers > in later patches. > > Signed-off-by: Wei Liu Acked-by: Andrew Cooper ___

Re: [Xen-devel] [For 4.9] Updating https://wiki.xenproject.org/wiki/Xen_Project_Release_Features to reflect support status of new features

2017-08-17 Thread Lars Kurth
Julien, we are waiting for George to come back from holiday to post the proposal for review, after Ian and I had done the prep work This was then discussed at the summit, and there were a couple off-line responses on ARM support, etc. Lars On 17/08/2017, 15:48, "Julien Grall" wrote: Hi,

Re: [Xen-devel] [PATCH v4 04/31] x86/mm: lift PAGE_CACHE_ATTRS to page.h

2017-08-17 Thread Andrew Cooper
On 17/08/17 15:44, Wei Liu wrote: > Currently all the users are within x86/mm.c. But that will change once > we split PV specific mm code to another file. Lift that to page.h > along side _PAGE_* in preparation for later patches. > > No functional change. Add some spaces around "|" while moving. >

Re: [Xen-devel] [For 4.9] Updating https://wiki.xenproject.org/wiki/Xen_Project_Release_Features to reflect support status of new features

2017-08-17 Thread Julien Grall
Hi, I wanted to bump this thread. I saw that the page still contain "Note that we will add complete information related to Xen Project 4.9, in the week after the 4.9 release.". It looks like to me we added some features, but I am not sure if we added all of them. Cheers, On 27/06/17 09:53

[Xen-devel] [PATCH v4 14/31] x86/mm: move and rename guest_{, un}map_l1e

2017-08-17 Thread Wei Liu
Move them to pv/mm.c and rename them pv_{,un}map_guest_l1e. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 63 +++-- xen/arch/x86/pv/mm.c| 33 xen/include/asm-x86/pv/mm.h | 9 +++ 3 files changed, 57 insertio

[Xen-devel] [PATCH v4 12/31] x86/mm: split out readonly MMIO emulation code

2017-08-17 Thread Wei Liu
Move the code to pv/emul-mmio-op.c. Fix coding style issues while moving. Note that mmio_ro_emulated_write is needed by both PV and HVM, so it is left in x86/mm.c. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 129 xen/arch/x86/pv/Makefile |

[Xen-devel] [PATCH v4 20/31] x86/mm: move l4 table setup code

2017-08-17 Thread Wei Liu
Move two functions to pv/mm.c. Add prefix to init_guest_l4_table. Export them via pv/mm.h. Fix up call sites. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c| 69 +--- xen/arch/x86/pv/dom0_build.c | 3 +- xen/arch/x86/pv/domain.c | 3 +- xen

[Xen-devel] [PATCH v4 29/31] x86/mm: remove the now unused inclusion of pv/mm.h

2017-08-17 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 54256b6a11..c2a73f123f 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -127,8 +127,6 @@ #include #include -#include "pv/mm.h" - /* Mapping

[Xen-devel] [PATCH v4 10/31] x86/mm: move {un, }adjust_guest_* to pv/mm.h

2017-08-17 Thread Wei Liu
Those macros will soon be used in different files. They are PV specific so move them to pv/mm.h. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 47 - xen/include/asm-x86/pv/mm.h | 47 + 2 files chan

[Xen-devel] [PATCH v4 23/31] x86/mm: export more get/put page functions

2017-08-17 Thread Wei Liu
Export some of the get/put functions so that we can move PV mm code trunk by trunk. When moving code is done some of the functions might be made static again. Also fix coding style issues and use bool when appropriate. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c| 40 ++

[Xen-devel] [PATCH v4 26/31] x86/mm: move pv_{alloc, free}_page_type

2017-08-17 Thread Wei Liu
Move them and the helper functions to pv/mm.c. Use bool in the moved code where appropriate. Put BUG() in the stub because the callers will call BUG or BUG_ON anyway. Signed-off-by: Wei Liu --- v4: add BUG() in stubs --- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 492 --

[Xen-devel] [PATCH v4 28/31] x86/mm: move PV hypercalls to pv/mm-hypercalls.c

2017-08-17 Thread Wei Liu
Also move pv_new_guest_cr3 there so that we don't have to export mod_l1_entry. Fix coding style issues. Change v to curr and d to currd where appropriate. Signed-off-by: Wei Liu --- I can't convince git diff to produce sensible diff for donate_page and steal_page. Those functions aren't changed

[Xen-devel] [PATCH v4 30/31] x86/mm: use put_page_type_preemptible in put_page_from_l{2, 3}e

2017-08-17 Thread Wei Liu
No functional change. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index c2a73f123f..70559c687c 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1046,8 +1046,6 @@ int put_pag

[Xen-devel] [PATCH v4 25/31] x86/mm: move disallow_mask variable and macros

2017-08-17 Thread Wei Liu
They will be used by both common mm code and PV mm code in the next few patches. Note that they might be moved again later if they aren't needed by common mm code any more. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c| 19 +-- xen/include/asm-x86/mm.h | 19 +++

[Xen-devel] [PATCH v4 24/31] x86/mm: move and add pv_ prefix to create_pae_xen_mappings

2017-08-17 Thread Wei Liu
And export it via a local header because it is going to be used by several PV specific files. Take the chance to change its return type to bool. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c| 46 -- xen/arch/x86/pv/mm.c | 40 +++

[Xen-devel] [PATCH v4 11/31] x86/mm: split out writable pagetable emulation code

2017-08-17 Thread Wei Liu
Move the code to pv/emul-ptwr-op.c. Fix coding style issues while moving the code. Rename ptwr_emulated_read to pv_emul_ptwr_read and export it via pv/mm.h because it is needed by other emulation code. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 308 +

[Xen-devel] [PATCH v4 13/31] x86/mm: remove the unused inclusion of pv/emulate.h

2017-08-17 Thread Wei Liu
All emulation code is moved by now. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index a42720c8d1..dd8fa43ef3 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -127,8 +127,6 @@ #include #include

[Xen-devel] [PATCH v4 19/31] x86/mm: factor out pv_arch_init_memory

2017-08-17 Thread Wei Liu
Move the split l4 setup code into the new function. The new function is also going to contain other PV specific setup code in later patch. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 73 ++- 1 file changed, 40 insertions(+), 33 deletions(-)

[Xen-devel] [PATCH v4 21/31] x86/mm: add "pv_" prefix to new_guest_cr3

2017-08-17 Thread Wei Liu
Also take the chance to change d to currd. This function can't be moved yet. It can only be moved with other functions. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 19 ++- xen/arch/x86/pv/emul-priv-op.c | 3 ++- xen/include/asm-x86/mm.h | 1 - xen/include/

[Xen-devel] [PATCH v4 27/31] x86/mm: move and add pv_ prefix to invalidate_shadow_ldt

2017-08-17 Thread Wei Liu
Move the code to pv/mm.c and export it via pv/mm.h. Use bool for flush. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 44 xen/arch/x86/pv/mm.c| 35 +++ xen/include/asm-x86/pv/mm.h | 4 3 files c

[Xen-devel] [PATCH v4 17/31] x86/mm: move compat descriptor handling code

2017-08-17 Thread Wei Liu
Move them along side the non-compat variants. Signed-off-by: Wei Liu --- xen/arch/x86/pv/descriptor-tables.c | 40 xen/arch/x86/x86_64/compat/mm.c | 41 - 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a

[Xen-devel] [PATCH v4 15/31] x86/mm: split out PV grant table code

2017-08-17 Thread Wei Liu
Move the code to pv/grant_table.c. Fix some coding style issues while moving code. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 363 -- xen/arch/x86/pv/Makefile | 1 + xen/arch/x86/pv/grant_table.c | 398 +++

[Xen-devel] [PATCH v4 31/31] x86/mm: move {get, put}_page_from_l{2, 3, 4}e

2017-08-17 Thread Wei Liu
They are only used by PV code. Fix coding style issues while moving. Move declarations to PV specific header file. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 253 xen/arch/x86/pv/mm.c| 246 +++

[Xen-devel] [PATCH v4 18/31] x86/mm: move and rename map_ldt_shadow_page

2017-08-17 Thread Wei Liu
Take the chance to change v to curr and d to currd in code. Also change the return type to bool. Fix up all the call sites. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 43 - xen/arch/x86/pv/descriptor-tables.c | 42 +++

[Xen-devel] [PATCH v4 22/31] x86: add pv_ prefix to {alloc, free}_page_type

2017-08-17 Thread Wei Liu
They are only useful for PV guests. Also change preemptible to bool. Signed-off-by: Wei Liu --- xen/arch/x86/domain.c| 2 +- xen/arch/x86/mm.c| 12 ++-- xen/include/asm-x86/mm.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/domain.c b

[Xen-devel] [PATCH v4 16/31] x86/mm: split out descriptor table code

2017-08-17 Thread Wei Liu
Move the code to pv/descriptor-tables.c. Add "pv_" prefix to {set,destroy}_gdt. Fix up call sites. Move the declarations to new header file. Fix coding style issues while moving code. Signed-off-by: Wei Liu --- xen/arch/x86/domain.c | 11 ++- xen/arch/x86/mm.c |

[Xen-devel] [PATCH v4 03/31] x86/mm: split HVM grant table code to hvm/grant_table.c

2017-08-17 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/arch/x86/hvm/Makefile | 1 + xen/arch/x86/hvm/grant_table.c | 89 ++ xen/arch/x86/mm.c | 53 - 3 files changed, 90 insertions(+), 53 deletions(-) create mode 100644 xen/arch/x86/hvm/

[Xen-devel] [PATCH v4 02/31] x86/mm: carve out replace_grant_pv_mapping

2017-08-17 Thread Wei Liu
And at once make it an inline function. Add declarations of replace_grant_{hvm,pv}_mapping to respective header files. The code movement will be done later. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 9 +++-- xen/include/asm-x86/grant_table.h | 10 -- xe

[Xen-devel] [PATCH v4 06/31] x86: move pv_emul_is_mem_write to pv/emulate.c

2017-08-17 Thread Wei Liu
Export it via pv/emulate.h. In the mean time it is required to include pv/emulate.h in x86/mm.c. The said function will be used later by different emulation handlers in later patches. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 9 ++--- xen/arch/x86/pv/emulate.c | 7 +++ xen

[Xen-devel] [PATCH v4 00/31] x86: refactor mm.c

2017-08-17 Thread Wei Liu
This series is basically all patches in v3 rebased on top of staging, since the security issues blocking v3 are now published. I also added BUG() in pv_{alloc,free}_page_type stubs. The last patch to move the code comment is dropped for now. The code can be found at: https://xenbits.xen.org/

[Xen-devel] [PATCH v4 09/31] x86/mm: rename and move update_intpte

2017-08-17 Thread Wei Liu
That function is only used by PV guests supporting code, add pv_ prefix. Export it via pv/mm.h. Move UPDATE_ENTRY as well. Signed-off-by: Wei Liu --- Now it is no longer an inline function, but I don't think that matters much. --- xen/arch/x86/mm.c | 65 ---

[Xen-devel] [PATCH v4 07/31] x86/mm: move and rename guest_get_eff{, kern}_l1e

2017-08-17 Thread Wei Liu
Move them to pv/mm.c and rename them to pv_get_guest_eff_{,kern}_l1e. Export them via pv/mm.h. They will be used later in emulation handlers. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 38 +++-- xen/arch/x86/pv/Makefile| 1 + xen/arch/x86/pv/mm.c|

[Xen-devel] [PATCH v4 05/31] x86/mm: document the return values from get_page_from_l*e

2017-08-17 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 24 1 file changed, 24 insertions(+) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 64dd520044..5983a56811 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -869,6 +869,12 @@ static int print_mmio_emul_rang

[Xen-devel] [PATCH v4 08/31] x86/mm: export get_page_from_mfn

2017-08-17 Thread Wei Liu
It will be used by different files later, so export it via asm-x86/mm.h. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c| 2 +- xen/include/asm-x86/mm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 7eb80ecaa3..d25d314673 10

[Xen-devel] [PATCH v4 04/31] x86/mm: lift PAGE_CACHE_ATTRS to page.h

2017-08-17 Thread Wei Liu
Currently all the users are within x86/mm.c. But that will change once we split PV specific mm code to another file. Lift that to page.h along side _PAGE_* in preparation for later patches. No functional change. Add some spaces around "|" while moving. Signed-off-by: Wei Liu --- xen/arch/x86/mm

[Xen-devel] [PATCH v4 01/31] x86/mm: carve out create_grant_pv_mapping

2017-08-17 Thread Wei Liu
And at once make create_grant_host_mapping an inline function. This requires making create_grant_{hvm,pv}_mapping non-static. Provide {hvm,pv}/grant_table.h. Include the headers where necessary. The two functions create_grant_{hvm,pv}_mapping will be moved later in a dedicated patch with all the

Re: [Xen-devel] preparations for 4.8.2

2017-08-17 Thread Lars Kurth
Jan, it’s been a while. Did you want to pick this up at some point again? I guess the check we have done so far is by now out-of-date. Not sure whether anyone tagged anything It would also be a good opportunity for you guys to test run my script (Wei ran it and it worked fine, but he didn’t comb

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

2017-08-17 Thread osstest service owner
flight 112671 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/112671/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d75b8ac278bc9f0159aa7eb9a92fd2cc87a18d8c baseline version: ovmf af0364f01e8cac95afad0

[Xen-devel] Xen Security Advisory 226 (CVE-2017-12135) - multiple problems with transitive grants

2017-08-17 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-12135 / XSA-226 version 6 multiple problems with transitive grants UPDATES IN VERSION 6 Patches actually addressing the issue have become

Re: [Xen-devel] [PATCH for-2.10 v2 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-17 Thread Anthony PERARD
On Wed, Aug 16, 2017 at 11:10:46AM +0200, Igor Mammedov wrote: > On Tue, 15 Aug 2017 22:24:08 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Aug 15, 2017 at 02:07:51PM +0200, Igor Mammedov wrote: > > > On Tue, 15 Aug 2017 12:15:48 +0100 > > > Anthony PERARD wrote: > > > > > > > To do PCI p

[Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Boris Ostrovsky
These routines are first called via CPU_UP_PREPARE notifier by the BSP and then by the booting ASP from vmx_cpu_up()/_svm_cpu_up(). Avoid the unnecessary second call. Signed-off-by: Boris Ostrovsky Reported-by: Andrew Cooper --- xen/arch/x86/hvm/svm/svm.c | 2 +- xen/arch/x86/hvm/vmx/vmcs.c |

Re: [Xen-devel] [kernel-hardening] Re: x86: PIE support and option to extend KASLR randomization

2017-08-17 Thread Boris Lukashev
On Thu, Aug 17, 2017 at 4:09 AM, Ingo Molnar wrote: > > * Thomas Garnier wrote: > >> > > -model=small/medium assume you are on the low 32-bit. It generates >> > > instructions where the virtual addresses have the high 32-bit to be zero. >> > >> > How are these assumptions hardcoded by GCC? Most o

Re: [Xen-devel] x86: PIE support and option to extend KASLR randomization

2017-08-17 Thread Thomas Garnier
On Thu, Aug 17, 2017 at 1:09 AM, Ingo Molnar wrote: > > > * Thomas Garnier wrote: > > > > > -model=small/medium assume you are on the low 32-bit. It generates > > > > instructions where the virtual addresses have the high 32-bit to be > > > > zero. > > > > > > How are these assumptions hardcoded

Re: [Xen-devel] "MMIO emulation failed" from booting OVMF on Xen v4.9.0

2017-08-17 Thread Alexey G
On Thu, 17 Aug 2017 11:56:06 +0100 Andrew Cooper wrote: > On 17/08/17 09:49, Jan Beulich wrote: > On 16.08.17 at 20:47, wrote: > >> Hey, > >> > >> As per Andrew [Cooper]'s suggestion, writing here instead of #xen on > >> Freenode. > >> > >> I'm trying out Xen (4.9.0) with OVMF (r21243.38

[Xen-devel] [xen-4.7-testing test] 112667: tolerable trouble: blocked/broken/fail/pass - PUSHED

2017-08-17 Thread osstest service owner
flight 112667 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/112667/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-xtf-amd64-amd64-2 47 xtf/test-hvm64-lbr-tsx-vmentry fail in 112650 pass in 112667 test-armhf-armhf-xl-

Re: [Xen-devel] [PATCHES v8 8/8] mm: Make sure pages are scrubbed

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 06:27 AM, Julien Grall wrote: > Hi Boris, > > On 16/08/17 19:33, Boris Ostrovsky wrote: >> +static void check_one_page(struct page_info *pg) >> +{ >> +#ifdef CONFIG_SCRUB_DEBUG >> +mfn_t mfn = _mfn(page_to_mfn(pg)); >> +const uint64_t *ptr; >> +unsigned int i; >> + >> +

Re: [Xen-devel] [PATCH] xen: fix build failure related to removing adjust_exception_frame

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 05:03 AM, Juergen Gross wrote: > A kernel configured with XEN_PV but without KVM_GUEST will fail to > build since the patch removing the adjust_exception_frame paravirt > op. > > Fix this failure. > > Reported-by: Sander Eikelenboom > Signed-off-by: Juergen Gross > --- > arch/x86/x

[Xen-devel] [xen-unstable-smoke test] 112680: tolerable trouble: broken/pass - PUSHED

2017-08-17 Thread osstest service owner
flight 112680 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/112680/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a build-arm64-pvops 2 hos

[Xen-devel] [linux-next test] 112662: regressions - trouble: blocked/broken/fail/pass

2017-08-17 Thread osstest service owner
flight 112662 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/112662/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-debianhvm-amd64 7 xen-boot fail REGR. vs. 112653 test-amd64-i386-qemu

Re: [Xen-devel] [PATCH v2 3/6] xen: RCU/x86/ARM: discount CPUs that were idle when grace period started.

2017-08-17 Thread Tim Deegan
Hi, This looks good to me. I have one question: At 18:45 +0200 on 16 Aug (1502909149), Dario Faggioli wrote: > @@ -474,7 +484,41 @@ static struct notifier_block cpu_nfb = { > void __init rcu_init(void) > { > void *cpu = (void *)(long)smp_processor_id(); > + > +cpumask_setall(&rcu_ctrl

Re: [Xen-devel] [PATCH 4/7] arm: smccc: handle SMCs according to SMCCC

2017-08-17 Thread Jan Beulich
>>> On 17.08.17 at 14:35, wrote: > On Thu, Aug 17, 2017 at 01:45:54AM -0600, Jan Beulich wrote: >> >>> On 16.08.17 at 23:41, wrote: >> > On Wed, Aug 09, 2017 at 05:58:19AM -0600, Jan Beulich wrote: >> >> > On 08/08/17 21:08, Volodymyr Babchuk wrote: >> >> >> +#ifndef __XEN_PUBLIC_ARCH_ARM_SMC_H__

Re: [Xen-devel] [PATCH 4/7] arm: smccc: handle SMCs according to SMCCC

2017-08-17 Thread Julien Grall
Hi, On 17/08/17 13:35, Volodymyr Babchuk wrote: I wrote this small test program: #include struct test { int a[2]; }; int main (int argc, char* argv[]) { printf("%d\n", ((struct test){{1,2}}).a[0]); return 0; } It is compiles with gcc --std=c89 without warnings. Thi

Re: [Xen-devel] [PATCH XTF] Fuzzing the hypervisor

2017-08-17 Thread Wei Liu
On Thu, Aug 17, 2017 at 12:21:49PM +0200, Felix Schmoll wrote: > Changes based on commit 8956f82ce1321b89deda6895d58e5788d2198477 > --- > include/xen/xen.h | 1 + > include/xtf/hypercall.h| 8 +- > tests/mk_hcall/.main.c.swo | Bin 0 -> 12288 bytes This should not be included. __

Re: [Xen-devel] [PATCH 4/7] arm: smccc: handle SMCs according to SMCCC

2017-08-17 Thread Volodymyr Babchuk
Hi Jan, On Thu, Aug 17, 2017 at 01:45:54AM -0600, Jan Beulich wrote: > >>> On 16.08.17 at 23:41, wrote: > > Hello Jan, > > > > On Wed, Aug 09, 2017 at 05:58:19AM -0600, Jan Beulich wrote: > > > >> > >> > On 08/08/17 21:08, Volodymyr Babchuk wrote: > >> >> +#ifndef __XEN_PUBLIC_ARCH_ARM_SMC_H__

Re: [Xen-devel] [PATCH V2 9/25] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-08-17 Thread Wei Liu
On Thu, Aug 17, 2017 at 12:32:17PM +0100, Wei Liu wrote: > On Wed, Aug 09, 2017 at 04:34:10PM -0400, Lan Tianyu wrote: > > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > > index f54fd49..94c9196 100644 > > --- a/tools/libxl/libxl_dom.c > > +++ b/tools/libxl/libxl_dom.c > > @@ -106

[Xen-devel] [distros-debian-wheezy test] 71985: tolerable trouble: broken/pass

2017-08-17 Thread Platform Team regression test user
flight 71985 distros-debian-wheezy real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71985/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: build-arm64 2 hosts-allocate broken like 71959 build-arm64-pvops

[Xen-devel] [xen-4.6-testing baseline-only test] 71984: regressions - FAIL

2017-08-17 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71984 xen-4.6-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71984/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-421 xtf/test-hvm32-

  1   2   >