Re: [Xen-devel] [PATCH] x86/apicv: enhance posted-interrupt processing

2017-02-27 Thread Xuquan (Quan Xu)
On February 23, 2017 4:38 PM, Chao Gao wrote: >On Thu, Feb 23, 2017 at 11:55:15AM +, Xuquan (Quan Xu) wrote: >>On February 23, 2017 7:01 PM, Jan Beulich wrote: >> On 23.02.17 at 11:53, wrote: On February 23, 2017 5:59 PM, Jan Beulich wrote: On 23.02.17 at 10:28, wrote: >

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

2017-02-27 Thread osstest service owner
flight 106172 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/106172/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvh-intel 11 guest-start fail REGR. vs. 59254 test-armhf-armhf-xl

Re: [Xen-devel] [PATCH] x86/emul: Fix sarx emulation test

2017-02-27 Thread Jan Beulich
>>> Andrew Cooper 02/24/17 7:14 PM >>> >The emulation tests run `sarx %edx,(%ecx),%ebx` with 0xfedcba98 pointed at by >%ecx, and 0xff13 in %rdx. > >As the instruction uses a 32bit operand size, the expected result is >0xffdb in %rbx (rather than 0xffdb), due to normal >usua

Re: [Xen-devel] [PATCH v8 04/24] x86: refactor psr: implement CPU init and free flow.

2017-02-27 Thread Jan Beulich
>>> Wei Liu 02/26/17 6:41 PM >>> >On Wed, Feb 15, 2017 at 04:49:19PM +0800, Yi Sun wrote: >> +static void free_feature(struct psr_socket_info *info) >> +{ >> +struct feat_node *feat, *next; >> + >> +if ( !info ) >> +return; >> + >> +/* >> + * Free resources of features. But

[Xen-devel] [PATCH v9 2/8] xen/passthrough: Reject self-(de)assignment of devices

2017-02-27 Thread Chao Gao
That is to say, don't support a domain assigns a device to itself or detachs a device from itself. Signed-off-by: Chao Gao --- v9: - Newly added xen/drivers/passthrough/pci.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthro

[Xen-devel] [PATCH v9 0/8] VMX: Properly handle pi descriptor and per-cpu

2017-02-27 Thread Chao Gao
The current VT-d PI related code may operate incorrectly in the following scenarios: 1. When the last assigned device is dettached from the domain, all the PI related hooks are removed then, however, the vCPU can be blocked, switched to another pCPU, etc, all without the aware of PI. After the

[Xen-devel] [PATCH v9 4/8] VMX: Make sure PI is in proper state before install the hooks

2017-02-27 Thread Chao Gao
From: Feng Wu We may hit the last ASSERT() in vmx_vcpu_block in the current code, since vmx_vcpu_block() may get called before vmx_pi_switch_to() has been installed or executed. Here We use cmpxchg to update the NDST field, this can make sure we only update the NDST when vmx_pi_switch_to() has no

[Xen-devel] [PATCH v9 1/8] VMX: Permanently assign PI hook vmx_pi_switch_to()

2017-02-27 Thread Chao Gao
From: Feng Wu PI hook vmx_pi_switch_to() is needed even after any previously assigned device is detached from the domain. Since 'SN' bit is also used to control the CPU side PI and we change the state of SN bit in vmx_pi_switch_to() and vmx_pi_switch_from(), then evaluate this bit in vmx_deliver_

[Xen-devel] [PATCH v9 3/8] VMX: Properly handle pi when all the assigned devices are removed

2017-02-27 Thread Chao Gao
From: Feng Wu This patch handles some corner cases when the last assigned device is removed from the domain. In this case we should carefully handle pi descriptor and the per-cpu blocking list, to make sure: - all the PI descriptor are in the right state when next time a devices is assigned to th

[Xen-devel] [PATCH v9 7/8] VMX: Fixup PI descriptor when cpu is offline

2017-02-27 Thread Chao Gao
From: Feng Wu When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu Signed-off-by: Chao Gao Reviewed-by: Jan Beulich Acked-by: Kevin Tian --- v7: - Pass unsigned int to vmx_pi_desc_fixup() v6: - Careful

[Xen-devel] [PATCH v9 6/8] VT-d: Some cleanups

2017-02-27 Thread Chao Gao
From: Feng Wu Use type-safe structure assignment instead of memcpy() Use sizeof(*iremap_entry). Signed-off-by: Feng Wu Signed-off-by: Chao Gao Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Kevin Tian --- v9: - Delete several lines for patch [5/8] has been reworked. v7: - Remove a useless cl

[Xen-devel] [PATCH v9 5/8] VT-d: Introduce a new function update_irte_for_msi_common

2017-02-27 Thread Chao Gao
Both pi_update_irte() and msi_msg_to_remap_entry() update the content of IRTE; besides, the current msi_msg_to_remap_entry is buggy when the live IRTE is in posted format. This patch try to rework these two functions to make them clearer by moving their common part to the new function. Signed-off-

[Xen-devel] [PATCH v9 8/8] VT-d: Add copy_irte_{to, from}_irt for updating irte

2017-02-27 Thread Chao Gao
We used structure assignment to update irte which was not safe when a interrupt happend during update. It is better to update IRTE atomically through cmpxchg16b(). When cmpxchg16b is not supported, two 64-bit write operation can atomically update IRTE when only one the high dword or low dword is in

[Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Michal Hocko
From: Michal Hocko This knob has been added by 31bc3858ea3e ("memory-hotplug: add automatic onlining policy for the newly added memory") mainly to cover memory hotplug based balooning solutions currently implemented for HyperV and Xen. Both of them want to online the memory as soon after register

Re: [Xen-devel] [PATCH] x86/paging: Package up the log dirty function pointers

2017-02-27 Thread George Dunlap
On 16/02/17 17:13, Andrew Cooper wrote: > They depend soley on paging mode, so don't need to be repeated per domain, and > can live in .rodata. While making this change, drop the redundant log_dirty > from the function pointer names. > > Signed-off-by: Andrew Cooper Acked-by: George Dunlap So

Re: [Xen-devel] [PATCH] x86/mm: Swap mfn_valid() to use mfn_t

2017-02-27 Thread George Dunlap
On 16/02/17 20:07, Andrew Cooper wrote: > Replace one opencoded mfn_eq() and some coding style issues on altered lines. > Swap __mfn_valid() to being bool, although it can't be updated to take mfn_t > because of include dependencies. > > No functional change. > > Signed-off-by: Andrew Cooper Ac

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Michal Hocko writes: > From: Michal Hocko > > This knob has been added by 31bc3858ea3e ("memory-hotplug: add automatic > onlining policy for the newly added memory") mainly to cover memory > hotplug based balooning solutions currently implemented for HyperV > and Xen. Both of them want to online

Re: [Xen-devel] [PATCH 1/2] x86: fix memory leak in pvh_setup_acpi_madt

2017-02-27 Thread Roger Pau Monné
On Sun, Feb 26, 2017 at 03:49:31PM +, Wei Liu wrote: > Switch to use goto style error handling to avoid leaking madt. Thanks, I guess it's fine to don't leak memory here, but in any case this is doomed to fail, no further progress is going to be made if Dom0 build fails, hence that's why memor

Re: [Xen-devel] [PATCH 2/2] x86: fix memory leak in pvh_setup_acpi_xsdt

2017-02-27 Thread Roger Pau Monné
On Sun, Feb 26, 2017 at 03:49:32PM +, Wei Liu wrote: > Switch to use goto style error handling to avoid leaking xsdt. > > Coverity-ID: 1401535 > > Signed-off-by: Wei Liu Thanks! Same comments as the ones in the previous patch, and the first goto is not really needed. Reviewed-by: Roger Pau

Re: [Xen-devel] [PATCH 04/28] ARM: GICv3 ITS: allocate device and collection table

2017-02-27 Thread Andre Przywara
Hi Shanker, thanks for having a look. On 24/02/17 19:29, Shanker Donthineni wrote: > Hi Andre > > > On 02/16/2017 01:03 PM, Shanker Donthineni wrote: >> Hi Andre, >> >> >> On 01/30/2017 12:31 PM, Andre Przywara wrote: >>> Each ITS maps a pair of a DeviceID (usually the PCI b/d/f triplet) and >>>

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Michal Hocko
On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote: [...] > I don't have anything new to add to the discussion happened last week > but I'd like to summarize my arguments against this change: > > 1) This patch doesn't solve any issue. Configuration option is not an > issue by itself, it is an option

Re: [Xen-devel] Error in Xen while booting for salvator-X (M3 Board)

2017-02-27 Thread George John
Hi, Thanks for the reply, I am using Linux version 4.6. The memory nodes were already squashed. When I have used a different version of Xen, it booted to dom0. but still the crash occurs as shown in the log below. I have also noticed that for salvator x M3 board(r8a7796) the dtb file used was r8a7

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

2017-02-27 Thread osstest service owner
flight 106182 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/106182/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 6 xen-boot fail REGR. vs. 106141 test-armhf-armhf-

Re: [Xen-devel] Error in Xen while booting for salvator-X (M3 Board)

2017-02-27 Thread Oleksandr Tyshchenko
Hi. On Mon, Feb 27, 2017 at 12:29 PM, George John wrote: > Hi, > Thanks for the reply, > I am using Linux version 4.6. > The memory nodes were already squashed. When I have used a different version > of Xen, it booted to dom0. but still the crash occurs as shown in the log > below. > > I have als

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote: > [...] >> I don't have anything new to add to the discussion happened last week >> but I'd like to summarize my arguments against this change: >> >> 1) This patch doesn't solve any issue. Configuration option is not an >>

Re: [Xen-devel] Error in Xen while booting for salvator-X (M3 Board)

2017-02-27 Thread Andrii Anisov
Dear George, Actually r8a7796 and r8a7795 are different chips with different peripherals, so you should adjust your r8a7796-xxx.dtb. I'm not really sure what the problem is with XEN 4.6, but the crash point you are stepped in with 4.8 is commented as following /* * Currently, to e

[Xen-devel] [PATCH v2] x86/apicv: enhance posted-interrupt processing

2017-02-27 Thread Xuquan (Quan Xu)
>From 6b5f702927d832513d270a2bca4634b271f4df47 Mon Sep 17 00:00:00 2001 From: Quan Xu Date: Tue, 28 Feb 2017 02:48:29 +0800 Subject: [PATCH v2] x86/apicv: enhance posted-interrupt processing If guest is already in non-root mode, an posted interrupt will be directly delivered to guest (leaving sof

[Xen-devel] [distros-debian-sid test] 68617: regressions - trouble: blocked/broken/fail/pass

2017-02-27 Thread Platform Team regression test user
flight 68617 distros-debian-sid real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/68617/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-i386-sid-netboot-pygrub 9 debian-di-install fail REGR. vs. 68583 Regres

Re: [Xen-devel] Error in Xen while booting for salvator-X (M3 Board)

2017-02-27 Thread Oleksandr Andrushchenko
Hi, PFA the DTS I use for M3ULCB board On 02/27/2017 12:48 PM, Oleksandr Tyshchenko wrote: Hi. On Mon, Feb 27, 2017 at 12:29 PM, George John wrote: Hi, Thanks for the reply, I am using Linux version 4.6. The memory nodes were already squashed. When I have used a different version of Xen, it

Re: [Xen-devel] [PATCH v8 08/24] x86: refactor psr: set value: implement framework.

2017-02-27 Thread Jan Beulich
>>> Yi Sun 02/27/17 8:06 AM >>> >On 17-02-26 17:41:43, Wei Liu wrote: >> On Wed, Feb 15, 2017 at 04:49:23PM +0800, Yi Sun wrote: >> > +/* >> > + * Step 0: >> > + * old_cos means the COS ID current domain is using. By default, it >> > is 0. >> > + * >> > + * For every COS ID, t

Re: [Xen-devel] [PATCH v3 0/3] x86/vmx: fix for vmentry failure with TSX bits in LBR

2017-02-27 Thread Andrew Cooper
On 23/02/17 09:33, Sergey Dyasli wrote: > The first 2 patches is a general optimization which is nice to have > prior to the 3rd patch which contains the real fix. > > A similar bug was fixed in Linux's perf subsystem in Jun 2016: > > commit 19fc9ddd61e059cc45464bdf6e8fa304bb94080f > ("perf

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Heiko Carstens
On Mon, Feb 27, 2017 at 11:02:09AM +0100, Vitaly Kuznetsov wrote: > A couple of other thoughts: > 1) Having all newly added memory online ASAP is probably what people > want for all virtual machines. This is not true for s390. On s390 we have "standby" memory that a guest sees and potentially may

Re: [Xen-devel] [PATCH 0/2] Two PVH dom0 series fixes

2017-02-27 Thread Andrew Cooper
On 26/02/17 15:49, Wei Liu wrote: > Wei Liu (2): > x86: fix memory leak in pvh_setup_acpi_madt > x86: fix memory leak in pvh_setup_acpi_xsdt > > xen/arch/x86/domain_build.c | 37 ++--- > 1 file changed, 26 insertions(+), 11 deletions(-) > Reviewed and committed

Re: [Xen-devel] [PATCH 03/28] ARM: GICv3: allocate LPI pending and property table

2017-02-27 Thread Andre Przywara
Hi, "Yes, will fix" to everything not explicitly mentioned below. On 06/02/17 16:26, Julien Grall wrote: > Hi Andre, > > On 30/01/17 18:31, Andre Przywara wrote: >> The ARM GICv3 provides a new kind of interrupt called LPIs. >> The pending bits and the configuration data (priority, enable bits)

Re: [Xen-devel] [PATCH 02/28] ARM: GICv3 ITS: parse and store ITS subnodes from hardware DT

2017-02-27 Thread Andre Przywara
Hi, On 06/02/17 12:58, Julien Grall wrote: > Hi Andre, > > On 30/01/17 18:31, Andre Przywara wrote: >> Parse the DT GIC subnodes to find every ITS MSI controller the hardware >> offers. Store that information in a list to both propagate all of them >> later to Dom0, but also to be able to iterate

Re: [Xen-devel] [RFC PATCH v1 02/21] x86: NUMA: Refactor NUMA code

2017-02-27 Thread Vijay Kilari
Hi Jan, On Thu, Feb 9, 2017 at 9:41 PM, Jan Beulich wrote: On 09.02.17 at 16:56, wrote: >> From: Vijaya Kumar K >> >> Move common generic NUMA code to xen/common/numa.c from >> xen/arch/x86/numa.c. Also move generic code in header file >> xen/include/asm-x86/numa.h to xen/include/xen/numa.

Re: [Xen-devel] [PATCH v8 04/24] x86: refactor psr: implement CPU init and free flow.

2017-02-27 Thread Wei Liu
On Mon, Feb 27, 2017 at 02:42:31PM +0800, Yi Sun wrote: > On 17-02-26 17:41:08, Wei Liu wrote: > > On Wed, Feb 15, 2017 at 04:49:19PM +0800, Yi Sun wrote: > > > This patch implements the CPU init and free flow including L3 CAT > > > initialization and feature list free. > > > > > > Signed-off-by:

Re: [Xen-devel] [PATCH v8 09/24] x86: refactor psr: set value: assemble features value array.

2017-02-27 Thread Wei Liu
On Mon, Feb 27, 2017 at 03:11:35PM +0800, Yi Sun wrote: > On 17-02-26 17:43:04, Wei Liu wrote: > > On Wed, Feb 15, 2017 at 04:49:24PM +0800, Yi Sun wrote: > > [...] > > > > > > +static unsigned int l3_cat_get_cos_num(const struct feat_node *feat) > > > +{ > > > +return 1; > > > +} > > > + > >

[Xen-devel] [PATCH] x86/shadow: Fix build with CONFIG_SHADOW_PAGING=n following c/s 45ac805

2017-02-27 Thread Andrew Cooper
c/s 45ac805 "x86/paging: Package up the log dirty function pointers" neglected the case when CONFIG_SHADOW_PAGING is disabled. Make a similar adjustment to the none stubs. Spotted by a Travis RANDCONFIG run. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan --- xen/arch/x86/mm/

Re: [Xen-devel] [PATCH] x86/shadow: Fix build with CONFIG_SHADOW_PAGING=n following c/s 45ac805

2017-02-27 Thread Tim Deegan
At 11:47 + on 27 Feb (1488196049), Andrew Cooper wrote: > c/s 45ac805 "x86/paging: Package up the log dirty function pointers" neglected > the case when CONFIG_SHADOW_PAGING is disabled. Make a similar adjustment to > the none stubs. > > Spotted by a Travis RANDCONFIG run. > > Signed-off-by:

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Heiko Carstens writes: > On Mon, Feb 27, 2017 at 11:02:09AM +0100, Vitaly Kuznetsov wrote: >> A couple of other thoughts: >> 1) Having all newly added memory online ASAP is probably what people >> want for all virtual machines. Sorry, obviously missed 'x86' in the above statement. > > This is n

Re: [Xen-devel] Crash w/ bios="ovmf"

2017-02-27 Thread Wei Liu
On Wed, Feb 22, 2017 at 03:50:28PM -0500, Jason Dickens wrote: > I'm trying to find a solution to an immediate VM crash which occurs by > simply adding "bios='ovmf' to my configuration? > > I started with a standard Ubuntu install which contained Xen 4.6.0 and had > the crash. The VM works fine bo

[Xen-devel] [xen-4.4-testing test] 106183: regressions - FAIL

2017-02-27 Thread osstest service owner
flight 106183 xen-4.4-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/106183/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xend-qemut-winxpsp3 15 guest-localmigrate/x10 fail in 106051 REGR. vs. 105835

[Xen-devel] [PATCH] x86/PVHv2: fix dereference of native RSDP table mapping

2017-02-27 Thread Roger Pau Monne
Check that the RSDP is mapped before trying to access it. Spotted-by: Coverity Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/domain_build.c | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c

[Xen-devel] [PATCH] libs/devicemodel: free xencall handle in error path in _open()

2017-02-27 Thread Wei Liu
Change the allocation to use calloc to get zeroed structure. Free xencall handler in error path. Spotted by Coverity. Signed-off-by: Wei Liu --- tools/libs/devicemodel/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libs/devicemodel/core.c b/tools/libs/devicem

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

2017-02-27 Thread osstest service owner
flight 106196 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/106196/ 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 5 xen

Re: [Xen-devel] [PATCH 03/28] ARM: GICv3: allocate LPI pending and property table

2017-02-27 Thread Julien Grall
On 27/02/17 11:34, Andre Przywara wrote: Hi, Hi Andre, "Yes, will fix" to everything not explicitly mentioned below. On 06/02/17 16:26, Julien Grall wrote: Hi Andre, On 30/01/17 18:31, Andre Przywara wrote: The ARM GICv3 provides a new kind of interrupt called LPIs. The pending bits an

Re: [Xen-devel] [PATCH 02/28] ARM: GICv3 ITS: parse and store ITS subnodes from hardware DT

2017-02-27 Thread Julien Grall
On 27/02/17 11:43, Andre Przywara wrote: Hi, Hi Andre, On 06/02/17 12:58, Julien Grall wrote: Hi Andre, On 30/01/17 18:31, Andre Przywara wrote: Parse the DT GIC subnodes to find every ITS MSI controller the hardware offers. Store that information in a list to both propagate all of them la

Re: [Xen-devel] [PATCH] libs/devicemodel: free xencall handle in error path in _open()

2017-02-27 Thread Paul Durrant
> -Original Message- > From: Wei Liu [mailto:wei.l...@citrix.com] > Sent: 27 February 2017 12:20 > To: Xen-devel > Cc: Ian Jackson ; Paul Durrant > ; Wei Liu > Subject: [PATCH] libs/devicemodel: free xencall handle in error path in > _open() > > Change the allocation to use calloc to get

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Michal Hocko
On Mon 27-02-17 11:49:43, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote: > > [...] > >> I don't have anything new to add to the discussion happened last week > >> but I'd like to summarize my arguments against this change: > >> > >> 1) This

[Xen-devel] [xen-unstable bisection] complete test-amd64-i386-xl-qemut-debianhvm-amd64-xsm

2017-02-27 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-xl-qemut-debianhvm-amd64-xsm testid xen-boot Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu g

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Mon 27-02-17 11:49:43, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote: >> > [...] >> >> I don't have anything new to add to the discussion happened last week >> >> but I'd like to summarize my arguments against

Re: [Xen-devel] xen/arm: Hiding SMMUs from Dom0 when using ACPI on Xen

2017-02-27 Thread Vijay Kilari
Hi Julien, On Wed, Feb 22, 2017 at 7:40 PM, Julien Grall wrote: > Hello, > > There was few discussions recently about hiding SMMUs from DOM0 when using > ACPI. I thought it would be good to have a separate thread for this. > > When using ACPI, the SMMUs will be described in the IO Remapping Table

Re: [Xen-devel] [PATCH] x86/PVHv2: fix dereference of native RSDP table mapping

2017-02-27 Thread Andrew Cooper
On 27/02/17 12:14, Roger Pau Monne wrote: > Check that the RSDP is mapped before trying to access it. > > Spotted-by: Coverity > Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists

[Xen-devel] [PATCH 4/7] x86/hvm: Adjust hvm_nx_enabled() to match how Xen behaves

2017-02-27 Thread Andrew Cooper
On Intel hardware, EFER is not fully switched between host and guest contexts. In practice, this means that Xen's EFER.NX setting leaks into guest context, and influences the behaviour of the hardware pagewalker. When servicing a pagefault, Xen's model of guests behaviour should match hardware's b

[Xen-devel] [PATCH 0/7] Fixes to pagetable handling

2017-02-27 Thread Andrew Cooper
This series has been a long time in preparation (i.e. most of the 4.8 and 4.9 dev cycles). It started when I tried to make an XTF PoC for XSA-176, and stumbled upon the the _PAGE_PAGED aliasing issue (see patch 7) which caused by PoC to be descheduled waiting for (a non-existent) paging agent to r

[Xen-devel] [PATCH 2/7] x86/shadow: Try to correctly identify implicit supervisor accesses

2017-02-27 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: George Dunlap --- xen/arch/x86/mm/shadow/multi.c | 60 -- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c i

[Xen-devel] [PATCH 6/7] x86/pagewalk: Consistently use guest_walk_*() helpers for translation

2017-02-27 Thread Andrew Cooper
hap_p2m_ga_to_gfn() and sh_page_fault() currently use guest_l1e_get_gfn() to obtain the translation of a pagewalk. This is conceptually wrong (the semantics of gw.l1e is an internal detail), and will actually be wrong when PSE36 superpage support is fixed. Switch them to using guest_walk_to_gfn()

[Xen-devel] [PATCH 3/7] x86/pagewalk: Helpers for reserved bit handling

2017-02-27 Thread Andrew Cooper
Some bits are unconditionally reserved in pagetable entries, or reserved because of alignment restrictions. Other bits are reserved because of control register configuration. Introduce helpers which take an individual vcpu and guest pagetable entry, and calculates whether any reserved bits are se

[Xen-devel] [PATCH 1/7] x86/hvm: Correctly identify implicit supervisor accesses

2017-02-27 Thread Andrew Cooper
All actions which refer to the active ldt/gdt/idt or task register (e.g. loading a new segment selector) are known as implicit supervisor accesses, even when the access originates from user code. The distinction is necessary in the pagewalk when SMAP is enabled. Refer to Intel SDM Vol 3 "Access R

[Xen-devel] [PATCH 7/7] x86/pagewalk: Re-implement the pagetable walker

2017-02-27 Thread Andrew Cooper
The existing pagetable walker has complicated return semantics, which squeeze multiple pieces of information into single integer. This would be fine if the information didn't overlap, but it does. Specifically, _PAGE_INVALID_BITS for 3-level guests alias _PAGE_PAGED and _PAGE_SHARED. A guest whi

[Xen-devel] [PATCH 5/7] x86/shadow: Use the pagewalk reserved bits helpers

2017-02-27 Thread Andrew Cooper
The shadow logic should never create a shadow of a guest PTE which contains reserved bits from the guests point of view. Such a shadowed entry might not cause #PF[RSVD] when walked by hardware, thus won't behave architecturally from the guests point of view. Signed-off-by: Andrew Cooper --- CC:

Re: [Xen-devel] xen/arm: Hiding SMMUs from Dom0 when using ACPI on Xen

2017-02-27 Thread Julien Grall
On 27/02/17 13:23, Vijay Kilari wrote: Hi Julien, Hello Vijay, On Wed, Feb 22, 2017 at 7:40 PM, Julien Grall wrote: Hello, There was few discussions recently about hiding SMMUs from DOM0 when using ACPI. I thought it would be good to have a separate thread for this. When using ACPI, the

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

2017-02-27 Thread osstest service owner
flight 106199 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/106199/ 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 5 xen

Re: [Xen-devel] [PATCH 06/10] x86/cpuid: Handle leaf 0x6 in guest_cpuid()

2017-02-27 Thread Andrew Cooper
On 22/02/17 09:26, Jan Beulich wrote: On 22.02.17 at 10:12, wrote: >> On 22/02/17 08:23, Andrew Cooper wrote: >>> On 22/02/17 07:31, Jan Beulich wrote: >>> On 21.02.17 at 18:40, wrote: > On 21/02/17 17:25, Jan Beulich wrote: > On 20.02.17 at 12:00, wrote: >>> The PV MSR

Re: [Xen-devel] [RFC PATCH v1 02/21] x86: NUMA: Refactor NUMA code

2017-02-27 Thread Jan Beulich
>>> Vijay Kilari 02/27/17 12:43 PM >>> >On Thu, Feb 9, 2017 at 9:41 PM, Jan Beulich wrote: > On 09.02.17 at 16:56, wrote: >>> +struct node_data node_data[MAX_NUMNODES]; >>> + >>> +/* Mapping from pdx to node id */ >>> +int memnode_shift; >>> +unsigned long memnodemapsize; >>> +u8 *memnodemap

Re: [Xen-devel] [PATCH 08/10] x86/cpuid: Handle leaf 0xb in guest_cpuid()

2017-02-27 Thread Andrew Cooper
On 22/02/17 10:37, Jan Beulich wrote: On 22.02.17 at 11:22, wrote: >> On 22/02/17 09:16, Jan Beulich wrote: >> On 20.02.17 at 12:00, wrote: Leaf 0xb is reserved by AMD, and uniformly hidden from guests by the >> toolstack logic and hypervisor PV logic. The previous d

Re: [Xen-devel] [PATCH 10/10] x86/cpuid: Always enable faulting for the control domain

2017-02-27 Thread Andrew Cooper
On 22/02/17 10:10, Jan Beulich wrote: On 22.02.17 at 11:00, wrote: >> On 22/02/17 09:23, Jan Beulich wrote: >> On 20.02.17 at 12:00, wrote: The domain builder in libxc no longer depends on leaked CPUID information to properly construct HVM domains. Remove the control dom

Re: [Xen-devel] [RTDS Patch v2 for Xen4.8] xen: rtds: only tickle non-already tickled CPUs

2017-02-27 Thread Dario Faggioli
On Fri, 2017-02-24 at 15:54 -0600, Haoran Li wrote: > From: naroahlee > > Bug Analysis: > Just kill this line above. > When more than one idle VCPUs that have the same PCPU as their > previous running core invoke runq_tickle(), they will tickle the same > PCPU. The tickled PCPU will only pick at

Re: [Xen-devel] [PATCH RESEND RFC 1/8] mm: Separate free page chunk merging into its own routine

2017-02-27 Thread Andrew Cooper
On 27/02/17 00:37, Boris Ostrovsky wrote: > +static void merge_chunks(struct page_info *pg, unsigned int node, > + unsigned int zone, unsigned int order) > +{ > +ASSERT(spin_is_locked(&heap_lock)); > + > +/* Merge chunks as far as possible. */ > +while ( order <

Re: [Xen-devel] RFC/PATCH: xen: race during domain destruction [Re: [xen-4.7-testing test] 105948: regressions - FAIL]

2017-02-27 Thread Dario Faggioli
On Sun, 2017-02-26 at 16:53 +0100, Dario Faggioli wrote: > On Fri, 2017-02-24 at 17:14 +0100, Dario Faggioli wrote: > > On Wed, 2017-02-22 at 01:46 -0700, Jan Beulich wrote: > > > > > > However, comparing with the staging version of the file > > > (which is heavily different), the immediate code i

Re: [Xen-devel] [PATCH RESEND RFC 2/8] mm: Place unscrubbed pages at the end of pagelist

2017-02-27 Thread Andrew Cooper
On 27/02/17 00:37, Boris Ostrovsky wrote: > . so that it's easy to find pages that need to be scrubbed (those pages are > now marked with _PGC_need_scrub bit). > > Signed-off-by: Boris Ostrovsky > --- > xen/common/page_alloc.c | 97 +++-- > xen/include/a

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Michal Hocko
On Mon 27-02-17 12:25:10, Heiko Carstens wrote: > On Mon, Feb 27, 2017 at 11:02:09AM +0100, Vitaly Kuznetsov wrote: > > A couple of other thoughts: > > 1) Having all newly added memory online ASAP is probably what people > > want for all virtual machines. > > This is not true for s390. On s390 we

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

2017-02-27 Thread osstest service owner
flight 106187 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/106187/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ovmf-amd64 9 debian-hvm-install fail REGR. vs. 105963 test-amd64-i386-xl-qemuu-

Re: [Xen-devel] [PATCH RESEND RFC 2/8] mm: Place unscrubbed pages at the end of pagelist

2017-02-27 Thread Boris Ostrovsky
>> >> static void merge_chunks(struct page_info *pg, unsigned int node, >> - unsigned int zone, unsigned int order) >> + unsigned int zone, unsigned int order, >> + bool_t need_scrub) > Can't you calculate need_scrub from *

Re: [Xen-devel] [PATCH 08/29] xl: move some helper functions to xl_utils.c

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 08/29] xl: move some helper functions to xl_utils.c"): > Move some commonly used functions to a new file. Prepend "x" to > function names to stick to consistent naming scheme. The `xfoo' naming scheme is a reference to `xmalloc' et al, which conventionally crash the program

Re: [Xen-devel] [PATCH 05/29] xl: generate _paths.h

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 05/29] xl: generate _paths.h"): > It is included by xl.h. Previously it was using _paths.h from some other > place. We'd better generate one for xl as well. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.or

Re: [Xen-devel] [PATCH 01/29] xl: remove accidentally committed hunk from Makefile

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 01/29] xl: remove accidentally committed hunk from Makefile"): > It was never intended to be committed. Lucky the high level Makefile was > correct so it didn't cause us problem when building xl. Acked-by: Ian Jackson ___ Xen-d

Re: [Xen-devel] [PATCH 03/29] xl: remove inclusion of libxl_osdeps.h

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 03/29] xl: remove inclusion of libxl_osdeps.h"): > There is no reason for a client to include a private header from libxl. > Remove the inclusion and define _GNU_SOURCE for {v,}asprintf in > xl_cmdimpl.c. Acked-by: Ian Jackson _

Re: [Xen-devel] [PATCH 04/29] xl: use <> variant to include Xen tools library headers

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 04/29] xl: use <> variant to include Xen tools library headers"): > They should be treated like any other libraries installed on the build > host. Compiler options are set correctly to point to their locations. Acked-by: Ian Jackson __

Re: [Xen-devel] [PATCH 02/29] xl: update copyright information

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 02/29] xl: update copyright information"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 06/29] xl: remove trailing spaces in xl_cmdimpl.c

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 06/29] xl: remove trailing spaces in xl_cmdimpl.c"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 09/29] xl: split out tmem related code to xl_tmem.c

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 09/29] xl: split out tmem related code to xl_tmem.c"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 07/29] xl: lift a bunch of macros to xl_utils.h

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 07/29] xl: lift a bunch of macros to xl_utils.h"): > We're going to split xl_cmdimpl.c into multiple files. Lift the commonly > used macros to xl_utils.h. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org

Re: [Xen-devel] [PATCH 13/29] xl: split out vtpm related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 13/29] xl: split out vtpm related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 22/29] xl: split out psr related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 22/29] xl: split out psr related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 20/29] xl: split out cd related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 20/29] xl: split out cd related code"): > Signed-off-by: Wei Liu > --- > tools/xl/Makefile | 2 +- > tools/xl/xl_cd.c | 114 > ++ Would you mind calling this `libxl_cdrom.c' rather than `_cd' ? The latter makes me

Re: [Xen-devel] [PATCH 10/29] xl: split out xl_parse.[ch]

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 10/29] xl: split out xl_parse.[ch]"): > Some notable changes other than code movement: > 1. rename cpurange_parse to parse_cpurange; > 2. provide a function to return shutdown action name. Can you split that out so that I can review it separately from the code motion ? Tha

Re: [Xen-devel] [PATCH 17/29] xl: split out scheduler related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 17/29] xl: split out scheduler related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson BTW, for all of these code motion patches: it would be nice if the comment said `code motion only, apart from the obvious Makefile change' or something. Ian. _

Re: [Xen-devel] [PATCH 14/29] xl: split out block related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 14/29] xl: split out block related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 29/29] xl: merge xl_cmdimpl.c into xl.c

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 29/29] xl: merge xl_cmdimpl.c into xl.c"): > After splitting out all the meaty bits, xl_cmdimpl.c doesn't contain > much. Merge the rest into xl.c and delete the file. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@l

Re: [Xen-devel] [PATCH 25/29] xl: split out miscellaneous functions

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 25/29] xl: split out miscellaneous functions"): > A collections of functions that don't warrant their own files. > > Moving main_devd there requires lifting do_daemonize to xl_utils.c. Acked-by: Ian Jackson ___ Xen-devel mailin

Re: [Xen-devel] [PATCH 24/29] xl: split out vnc and console related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 24/29] xl: split out vnc and console related code"): > The new file also contains code for channel, which is just a console > in disguise. > > Replace the call to vncviewer() with libxl_vncviewer_exec() directly in > main_vncviewer. Again, please separate out the non-code-

Re: [Xen-devel] [PATCH 28/29] xl: split out migration related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 28/29] xl: split out migration related code"): > Include COLO / Remus code because they are built on top of the existing > migration protocol. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://list

Re: [Xen-devel] [PATCH 11/29] xl: split out cpupool related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 11/29] xl: split out cpupool related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 16/29] xl: split out usb related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 16/29] xl: split out usb related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 26/29] xl: split out vm lifecycle control functions

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 26/29] xl: split out vm lifecycle control functions"): > Including create, reboot, shutdown, pause, unpause and destroy. > > Lift a bunch of core data structures and function declarations to xl.h > because they are needed in both xl_cmdimpl.c and xl_vmcontrol.c. Acked-by:

Re: [Xen-devel] [PATCH 23/29] xl: split out functions to print out information

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 23/29] xl: split out functions to print out information"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 21/29] xl: split out memory related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 21/29] xl: split out memory related code"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 27/29] xl: split out save/restore related code

2017-02-27 Thread Ian Jackson
Wei Liu writes ("[PATCH 27/29] xl: split out save/restore related code"): > Add some function declarations to xl.h because they are now needed in > multiple files. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.x

  1   2   >