Re: [Xen-devel] RFE: Detect NUMA misconfigurations and prevent machine freezes

2018-08-28 Thread Juergen Gross
On 29/08/18 07:33, Steven Haigh wrote: > When playing with NUMA support recently, I noticed a host would always hang > when trying to create a cpupool for the second NUMA node in the system. > > I was using the following commands: > # xl cpupool-create name=\"Pool-1\" sched=\"credit2\ > # xl

[Xen-devel] RFE: Detect NUMA misconfigurations and prevent machine freezes

2018-08-28 Thread Steven Haigh
When playing with NUMA support recently, I noticed a host would always hang when trying to create a cpupool for the second NUMA node in the system. I was using the following commands: # xl cpupool-create name=\"Pool-1\" sched=\"credit2\ # xl cpupool-cpu-remove Pool-0 node:1 # xl cpupool-cpu-add

[Xen-devel] [xen-4.7-testing test] 126810: regressions - FAIL

2018-08-28 Thread osstest service owner
flight 126810 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/126810/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-pair 22 guest-migrate/src_host/dst_host fail REGR. vs. 125057

[Xen-devel] [linux-linus bisection] complete test-amd64-amd64-xl-shadow

2018-08-28 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-xl-shadow testid guest-start Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu

[Xen-devel] [PATCH] xen/arm: fix SMMU driver build

2018-08-28 Thread Stefano Stabellini
Add missing "CONFIG_" Signed-off-by: Stefano Stabellini --- xen/drivers/passthrough/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/arm/Makefile b/xen/drivers/passthrough/arm/Makefile index 0156431..b3efcfd 100644 ---

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

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

Re: [Xen-devel] [PATCH v2] SVM: limit GIF=0 region

2018-08-28 Thread Andrew Cooper
On 15/08/18 07:09, Jan Beulich wrote: > Use EFLAGS.IF for all ordinary purposes; there's in particular no need > to unduly defer NMI/#MC. Clear/set GIF solely around VMRUN itself. This > has the additional advantage that svm_stgi_label now indeed marks the > only place where GIF gets set. > > A

[Xen-devel] [libvirt test] 126816: regressions - FAIL

2018-08-28 Thread osstest service owner
flight 126816 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/126816/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 123814 build-amd64-libvirt

[Xen-devel] [qemu-mainline baseline-only test] 75134: regressions - FAIL

2018-08-28 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75134 qemu-mainline real [real] http://osstest.xensource.com/osstest/logs/75134/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 10 debian-install

Re: [Xen-devel] [PATCH v2] SVM: limit GIF=0 region

2018-08-28 Thread Boris Ostrovsky
On 08/15/2018 02:09 AM, Jan Beulich wrote: > Use EFLAGS.IF for all ordinary purposes; there's in particular no need > to unduly defer NMI/#MC. Clear/set GIF solely around VMRUN itself. This > has the additional advantage that svm_stgi_label now indeed marks the > only place where GIF gets set. > >

Re: [Xen-devel] [PATCH] x86/xen: remove redundant variable save_pud

2018-08-28 Thread Boris Ostrovsky
On 08/28/2018 12:10 PM, Colin King wrote: > From: Colin Ian King > > Variable save_pud is being assigned but is never used hence it is > redundant and can be removed. > > Cleans up clang warning: > variable 'save_pud' set but not used [-Wunused-but-set-variable] > > Signed-off-by: Colin Ian King

Re: [Xen-devel] [PATCH V2] xen: export device state to sysfs

2018-08-28 Thread Boris Ostrovsky
On 08/28/2018 01:14 PM, Joe Jin wrote: > On 8/28/18 9:53 AM, Boris Ostrovsky wrote: >> On 08/28/2018 10:56 AM, Joe Jin wrote: >>> Export device state to sysfs to allow for easier get device state. >>> >>> Signed-off-by: Joe Jin >>> Cc: Boris Ostrovsky >>> Cc: Juergen Gross >>> Cc: Konrad

[Xen-devel] [linux-3.18 bisection] complete test-amd64-i386-qemuu-rhel6hvm-intel

2018-08-28 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-qemuu-rhel6hvm-intel testid redhat-install Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu

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

2018-08-28 Thread osstest service owner
flight 126781 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/126781/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-qemuu-rhel6hvm-amd broken test-amd64-i386-qemuu-rhel6hvm-amd

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

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

Re: [Xen-devel] [PATCH 4/7] x86/hvm: Rename v->arch.hvm_vcpu to v->arch.hvm

2018-08-28 Thread Razvan Cojocaru
On 8/28/18 8:39 PM, Andrew Cooper wrote: > The trailing _vcpu suffix is redundant, but adds to code volume. Drop it. > > Reflow lines as appropriate, and switch to using the new XFREE/etc wrappers > where applicable. > > No functional change. > > Signed-off-by: Andrew Cooper Acked-by: Razvan

Re: [Xen-devel] [PATCH 3/7] xen/hvm: Rename d->arch.hvm_domain to d->arch.hvm

2018-08-28 Thread Razvan Cojocaru
On 8/28/18 8:39 PM, Andrew Cooper wrote: > The trailing _domain suffix is redundant, but adds to code volume. Drop it. > > Reflow lines as appropriate, and switch to using the new XFREE/etc wrappers > where applicable. > > No functional change. > > Signed-off-by: Andrew Cooper Acked-by:

[Xen-devel] [distros-debian-snapshot test] 75133: regressions - FAIL

2018-08-28 Thread Platform Team regression test user
flight 75133 distros-debian-snapshot real [real] http://osstest.xensource.com/osstest/logs/75133/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-amd64-daily-netboot-pygrub 10 debian-di-install fail REGR. vs. 75099 Tests

[Xen-devel] [PATCH] x86/hvm: Fix mapping corner case during task switching.

2018-08-28 Thread Andrew Cooper
hvm_map_entry() can fail for a number of reasons, including for a misaligned LDT/GDT access which crosses a 4K boundary. Architecturally speaking, this should be fixed, but Long Mode doesn't support task switches, and no 32bit OS is going to misalign its LDT/GDT base, which is why this task isn't

[Xen-devel] [PATCH] x86/mm: Drop {HAP,SHADOW}_ERROR() wrappers

2018-08-28 Thread Andrew Cooper
Unlike the PRINTK/DEBUG wrappers, these go straight out to the console, rather than ending up in the debugtrace buffer. A number of these users are followed by domain_crash(), and future changes will want to combine the printk() into the domain_crash() call. Expand these wrappers in place, using

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-28 Thread Andrew Cooper
On 17/08/18 13:45, Jan Beulich wrote: On 15.08.18 at 19:57, wrote: >> --- a/xen/arch/x86/Rules.mk >> +++ b/xen/arch/x86/Rules.mk >> @@ -29,6 +29,10 @@ $(call as-option-add,CFLAGS,CC,"invpcid >> (%rax)$$(comma)%rax",-DHAVE_AS_INVPCID) >> $(call as-option-add,CFLAGS,CC,\ >> ".if ((1 >

[Xen-devel] [PATCH 2/7] x86/pv: Rename v->arch.pv_vcpu to v->arch.pv

2018-08-28 Thread Andrew Cooper
The trailing _vcpu suffix is redundant, but adds to code volume. Drop it. Reflow lines as appropriate, and switch to using the new XFREE/etc wrappers where applicable. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné ---

[Xen-devel] [PATCH 0/7] x86: Structure naming and consistency improvements

2018-08-28 Thread Andrew Cooper
This series started by trying to address the bug in patch 7, and ballooned somewhat. It is semi RFC because I expect there might be some objection in principle to a series this invasive, but I can't find any less invasive way of making the changes. In particular, we can't use #define's to stage

[Xen-devel] [PATCH 6/7] x86/svm: Rename arch_svm_struct to svm_vcpu

2018-08-28 Thread Andrew Cooper
The suffix and prefix are redundant, and the name is curiously odd. Rename it to svm_vcpu to be consistent with all the other similar structures. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Boris Ostrovsky CC: Suravee

[Xen-devel] [PATCH 1/7] x86/pv: Rename d->arch.pv_domain to d->arch.pv

2018-08-28 Thread Andrew Cooper
The trailing _domain suffix is redundant, but adds to code volume. Drop it. Reflow lines as appropriate, and switch to using the new XFREE/etc wrappers where applicable. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Tim Deegan

[Xen-devel] [PATCH 5/7] x86/vtx: Rename arch_vmx_struct to vmx_vcpu

2018-08-28 Thread Andrew Cooper
The suffix and prefix are redundant, and the name is curiously odd. Rename it to vmx_vcpu to be consistent with all the other similar structures. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Jun Nakajima CC: Kevin Tian Some of

Re: [Xen-devel] [PATCH v7 8/8] xen/arm: add xen,dmabuf nodes

2018-08-28 Thread Julien Grall
Hi, On 11/08/18 01:00, Stefano Stabellini wrote: Add a "xen-dmabuf" device node for every shared region, compatible "xen,dmabuf". Each of these nodes refers to the corresponding reserved-memory node using a phandle. These device nodes can be used to bind drivers that export the region to

[Xen-devel] [xen-4.9-testing test] 126792: regressions - FAIL

2018-08-28 Thread osstest service owner
flight 126792 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/126792/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-ws16-amd64 17 guest-stopfail REGR. vs. 124248

Re: [Xen-devel] [PATCH v7 7/8] xen/arm: export shared memory regions as reserved-memory on device tree

2018-08-28 Thread Julien Grall
Hi, On 11/08/18 01:00, Stefano Stabellini wrote: Shared memory regions need to be advertised to the guest. Fortunately, a device tree binding for special memory regions already exist: reserved-memory. Add a reserved-memory node for each shared memory region, for both masters and slaves.

Re: [Xen-devel] [PATCH v7 2/8] libxl: introduce a new structure to represent static shared memory regions

2018-08-28 Thread Julien Grall
Hi, On 11/08/18 01:00, Stefano Stabellini wrote: From: Zhongze Liu Author: Zhongze Liu Add a new structure to the IDL family to represent static shared memory regions as proposed in the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). And deleted

Re: [Xen-devel] [PATCH V2] xen: export device state to sysfs

2018-08-28 Thread Joe Jin
On 8/28/18 9:53 AM, Boris Ostrovsky wrote: > On 08/28/2018 10:56 AM, Joe Jin wrote: >> Export device state to sysfs to allow for easier get device state. >> >> Signed-off-by: Joe Jin >> Cc: Boris Ostrovsky >> Cc: Juergen Gross >> Cc: Konrad Rzeszutek Wilk >> --- >>

Re: [Xen-devel] [PATCH v7 1/8] xen: xsm: flask: introduce XENMAPSPACE_gmfn_share for memory sharing

2018-08-28 Thread Julien Grall
Hi Stefano, As Jan said on the previous version, the CC list is too short. All the REST should be included for public interface change. Please have a look at scripts/add_maintainers.pl, it will do the job for you... On 11/08/18 01:00, Stefano Stabellini wrote: From: Zhongze Liu Author:

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

2018-08-28 Thread osstest service owner
flight 126824 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/126824/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf f965b772fcc4bdc5f207998126d93d80c085d5f5 baseline version: ovmf

Re: [Xen-devel] [PATCH V2] xen: export device state to sysfs

2018-08-28 Thread Boris Ostrovsky
On 08/28/2018 10:56 AM, Joe Jin wrote: > Export device state to sysfs to allow for easier get device state. > > Signed-off-by: Joe Jin > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Konrad Rzeszutek Wilk > --- > Documentation/ABI/stable/sysfs-bus-xen-backend | 9 + >

[Xen-devel] [ovmf baseline-only test] 75132: tolerable FAIL

2018-08-28 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75132 ovmf real [real] http://osstest.xensource.com/osstest/logs/75132/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-ovmf-amd64 10 debian-hvm-install fail like 75130

Re: [Xen-devel] [PATCH 2/2] tools/libxl: Switch Arm guest type to PVH

2018-08-28 Thread Wei Liu
On Thu, Aug 23, 2018 at 09:58:57AM +0200, Roger Pau Monné wrote: [...] > > > What I wanted to do here is resetting the union to 0 so you don't get data > > mangled by the pv fields. > > Another possible option I think would be to mark those fields as > deprecated in the IDL, and

Re: [Xen-devel] [PATCH v2 00/10] arm: add one kconfig option per platform

2018-08-28 Thread Julien Grall
Hi, On 24/08/18 20:38, Stefano Stabellini wrote: On Fri, 24 Aug 2018, Julien Grall wrote: On 24/08/18 00:33, Stefano Stabellini wrote: Hi all, Hi, This patch series introduces one kconfig option for each remaing platform under platforms/. Each kconfig option enables the required drivers

Re: [Xen-devel] [PATCH v3 5/6] xen/arm: zynqmp: implement zynqmp_eemi

2018-08-28 Thread Julien Grall
Hi Stefano, On 11/08/18 01:01, Stefano Stabellini wrote: From: "Edgar E. Iglesias" From: Edgar E. Iglesias zynqmp_eemi uses the defined functions and structs to decide whether to make a call to the firmware, or to simply return a predefined value. Signed-off-by: Edgar E. Iglesias

[Xen-devel] [PATCH] x86/xen: remove redundant variable save_pud

2018-08-28 Thread Colin King
From: Colin Ian King Variable save_pud is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'save_pud' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- arch/x86/xen/mmu_pv.c | 2 -- 1 file changed, 2

Re: [Xen-devel] [PATCH] x86/mm: Drop preemptible signal through {get, put}_page_type*()

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 17:35, wrote: > @@ -627,10 +626,10 @@ static int get_page_and_type_from_mfn( > unlikely(!get_page_from_mfn(mfn, d)) ) > return -EINVAL; > > -rc = _get_page_type(page, type, preemptible); > +rc = _get_page_type(page, type); > > if (

Re: [Xen-devel] [PATCH v3 4/6] xen/arm: zynqmp: eemi access control

2018-08-28 Thread Julien Grall
Hi Stefano, On 11/08/18 01:01, Stefano Stabellini wrote: From: "Edgar E. Iglesias" From: Edgar E. Iglesias Introduce data structs to implement basic access controls. Introduce the following three functions: domain_has_node_access: check access to the node domain_has_reset_access: check

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Julien Grall
On 28/08/18 16:50, Volodymyr Babchuk wrote: Hi Julien, Hi, On 28.08.18 18:27, Julien Grall wrote: Hi Volodymyr, On 28/08/18 16:10, Volodymyr Babchuk wrote: On 28.08.18 17:43, Julien Grall wrote: [...] I have looked at cpus_have_const_cap() and haven't found good way to optimize

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Volodymyr Babchuk
Hi Julien, On 28.08.18 18:27, Julien Grall wrote: Hi Volodymyr, On 28/08/18 16:10, Volodymyr Babchuk wrote: On 28.08.18 17:43, Julien Grall wrote: [...] I have looked at cpus_have_const_cap() and haven't found good way to optimize it with the current infrastructure in Xen. Feel free to

Re: [Xen-devel] [PATCH v17 03/13] x86/hvm: Introduce hvm_save_cpu_ctxt_one func

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 17:33, wrote: > On 8/22/18 5:02 PM, Alexandru Isaila wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -787,119 +787,126 @@ static int hvm_load_tsc_adjust(struct domain *d, >> hvm_domain_context_t *h) >> HVM_REGISTER_SAVE_RESTORE(TSC_ADJUST,

[Xen-devel] [PATCH] x86/mm: Drop preemptible signal through {get, put}_page_type*()

2018-08-28 Thread Andrew Cooper
After XSA-273, handling of L2 pagetables must strictly be preemptible, meaning that all page types are now strictly preemptible (>= L2) or not (L1, SEGDESC). Simplify the code by removing the preemptible booleans, which has an unexpectedly large change to _get_page_type(). add/remove: 0/0

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

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

Re: [Xen-devel] [PATCH v17 03/13] x86/hvm: Introduce hvm_save_cpu_ctxt_one func

2018-08-28 Thread Razvan Cojocaru
On 8/22/18 5:02 PM, Alexandru Isaila wrote: > This is used to save data from a single instance. > > Signed-off-by: Alexandru Isaila > Reviewed-by: Jan Beulich > > --- > Changes since V14: > - Move all free fields to the initializer > - Add blank line to before the return > -

Re: [Xen-devel] [PATCH v17 12/13] x86/hvm: Remove redundant save functions

2018-08-28 Thread Jan Beulich
>>> On 22.08.18 at 16:02, wrote: @@ -148,6 +145,9 @@ int hvm_save_one(struct domain *d, unsigned int typecode, unsigned int instance, > !hvm_sr_handlers[typecode].save ) > return -EINVAL; > > +if ( hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU && > +instance

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Julien Grall
Hi Volodymyr, On 28/08/18 16:10, Volodymyr Babchuk wrote: On 28.08.18 17:43, Julien Grall wrote: [...] I have looked at cpus_have_const_cap() and haven't found good way to optimize it with the current infrastructure in Xen. Feel free to suggest improvement. Another thing: maybe it is

Re: [Xen-devel] [PATCH v7 6/6] x86/iommu: add map-reserved dom0-iommu option to map reserved memory ranges

2018-08-28 Thread Jan Beulich
>>> On 22.08.18 at 09:52, wrote: > Several people have reported hardware issues (malfunctioning USB > controllers) due to iommu page faults on Intel hardware. Those faults > are caused by missing RMRR (VTd) entries in the ACPI tables. Those can > be worked around on VTd hardware by manually

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 09:04:24AM -0600, Jan Beulich wrote: > >>> On 28.08.18 at 16:58, wrote: > > On Tue, Aug 28, 2018 at 03:51:51PM +0100, Andrew Cooper wrote: > >> On 28/08/18 15:48, Wei Liu wrote: > >> > On Tue, Aug 28, 2018 at 08:36:37AM -0600, Jan Beulich wrote: > >> > On 28.08.18 at

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Volodymyr Babchuk
On 28.08.18 17:43, Julien Grall wrote: [...] I have looked at cpus_have_const_cap() and haven't found good way to optimize it with the current infrastructure in Xen. Feel free to suggest improvement. Another thing: maybe it is worth to branch to 1.0 code and leave 1.1 in a straight path

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 16:58, wrote: > On Tue, Aug 28, 2018 at 03:51:51PM +0100, Andrew Cooper wrote: >> On 28/08/18 15:48, Wei Liu wrote: >> > On Tue, Aug 28, 2018 at 08:36:37AM -0600, Jan Beulich wrote: >> > On 28.08.18 at 15:19, wrote: >> >>> On Tue, Aug 28, 2018 at 05:44:51AM -0600, Jan

[Xen-devel] [PATCH 3/3] xen-netback: handle page straddling in xenvif_set_hash_mapping()

2018-08-28 Thread Jan Beulich
There's no guarantee that the mapping array doesn't cross a page boundary. Use a second grant copy operation if necessary. Signed-off-by: Jan Beulich --- drivers/net/xen-netback/hash.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) ---

[Xen-devel] [PATCH 2/3] xen-netback: validate queue numbers in xenvif_set_hash_mapping()

2018-08-28 Thread Jan Beulich
Checking them before the grant copy means nothing as to the validity of the incoming request. As we shouldn't make the new data live before having validated it, introduce a second instance of the mapping array. Signed-off-by: Jan Beulich --- drivers/net/xen-netback/common.h|3 ++-

[Xen-devel] [PATCH 1/3] xen-netback: fix input validation in xenvif_set_hash_mapping()

2018-08-28 Thread Jan Beulich
Both len and off are frontend specified values, so we need to make sure there's no overflow when adding the two for the bounds check. We also want to avoid undefined behavior and hence use off to index into ->hash.mapping[] only after bounds checking. This at the same time allows to take care of

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 03:51:51PM +0100, Andrew Cooper wrote: > On 28/08/18 15:48, Wei Liu wrote: > > On Tue, Aug 28, 2018 at 08:36:37AM -0600, Jan Beulich wrote: > > On 28.08.18 at 15:19, wrote: > >>> On Tue, Aug 28, 2018 at 05:44:51AM -0600, Jan Beulich wrote: > >>> On 26.08.18 at

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 03:48:07PM +0100, Wei Liu wrote: > On Tue, Aug 28, 2018 at 08:36:37AM -0600, Jan Beulich wrote: > > >>> On 28.08.18 at 15:19, wrote: > > > On Tue, Aug 28, 2018 at 05:44:51AM -0600, Jan Beulich wrote: > > >> >>> On 26.08.18 at 14:19, wrote: > > >> > Move the file to x86

[Xen-devel] [PATCH V2] xen: export device state to sysfs

2018-08-28 Thread Joe Jin
Export device state to sysfs to allow for easier get device state. Signed-off-by: Joe Jin Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Konrad Rzeszutek Wilk --- Documentation/ABI/stable/sysfs-bus-xen-backend | 9 + drivers/xen/xenbus/xenbus_probe.c | 9 + 2 files

[Xen-devel] [PATCH 0/3] xen-netback: hash mapping hanling adjustments

2018-08-28 Thread Jan Beulich
First and foremost the fix for XSA-270. On top of that further changes which looked desirable to me while investigating that XSA. 1: fix input validation in xenvif_set_hash_mapping() 2: validate queue numbers in xenvif_set_hash_mapping() 3: handle page straddling in xenvif_set_hash_mapping()

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Andrew Cooper
On 28/08/18 15:48, Wei Liu wrote: > On Tue, Aug 28, 2018 at 08:36:37AM -0600, Jan Beulich wrote: > On 28.08.18 at 15:19, wrote: >>> On Tue, Aug 28, 2018 at 05:44:51AM -0600, Jan Beulich wrote: >>> On 26.08.18 at 14:19, wrote: > Move the file to x86 common code and change its name to

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 08:36:37AM -0600, Jan Beulich wrote: > >>> On 28.08.18 at 15:19, wrote: > > On Tue, Aug 28, 2018 at 05:44:51AM -0600, Jan Beulich wrote: > >> >>> On 26.08.18 at 14:19, wrote: > >> > Move the file to x86 common code and change its name to emul-i8254.c. > >> > > >> > Put

Re: [Xen-devel] [PATCH v2 3/6] xen/arm: add RCAR2 kconfig

2018-08-28 Thread Julien Grall
(Switching to my Arm e-mail) Hi, On 24/08/18 20:31, Stefano Stabellini wrote: On Fri, 24 Aug 2018, Julien Grall wrote: Hi, On 24/08/18 00:33, Stefano Stabellini wrote: Add a kconfig option for Renesas Rcar2 platforms. Signed-off-by: Stefano Stabellini Reviewed-by: Andrii Anisov CC:

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Julien Grall
On 28/08/18 15:40, Volodymyr Babchuk wrote: Hi Julien, On 28.08.18 17:05, Julien Grall wrote: Hi Volodymyr, On 27/08/18 17:50, Volodymyr Babchuk wrote: On 27.08.18 18:29, Julien Grall wrote: On 27/08/2018 15:15, Volodymyr Babchuk wrote: On 24.08.18 19:58, Julien Grall wrote:

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Volodymyr Babchuk
Hi Julien, On 28.08.18 17:05, Julien Grall wrote: Hi Volodymyr, On 27/08/18 17:50, Volodymyr Babchuk wrote: On 27.08.18 18:29, Julien Grall wrote: On 27/08/2018 15:15, Volodymyr Babchuk wrote: On 24.08.18 19:58, Julien Grall wrote: Signed-off-by: Julien Grall This is indeed increasing the

Re: [Xen-devel] [PATCH] xenforeignmemory: fix fd leakage in error path

2018-08-28 Thread Andrew Cooper
On 28/08/18 15:19, Wei Liu wrote: > b49ef5d3 (xenforeignmemory: work around bug in older privcmd) added an > error path but forgot to close fd there. Spotted by Coverity. > > Reported-by: Andrew Cooper > Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper

[Xen-devel] [PATCH] xenforeignmemory: fix fd leakage in error path

2018-08-28 Thread Wei Liu
b49ef5d3 (xenforeignmemory: work around bug in older privcmd) added an error path but forgot to close fd there. Reported-by: Andrew Cooper Signed-off-by: Wei Liu --- Cc: Ian Jackson --- tools/libs/foreignmemory/linux.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [Xen-devel] [PATCH] xenforeignmemory: work around bug in older privcmd

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 03:12:32PM +0100, Andrew Cooper wrote: > On 24/08/18 13:16, Paul Durrant wrote: > > diff --git a/tools/libs/foreignmemory/linux.c > > b/tools/libs/foreignmemory/linux.c > > index 3686cf41e0..0368aa09f4 100644 > > --- a/tools/libs/foreignmemory/linux.c > > +++

Re: [Xen-devel] [PATCH] xenforeignmemory: work around bug in older privcmd

2018-08-28 Thread Andrew Cooper
On 24/08/18 13:16, Paul Durrant wrote: > diff --git a/tools/libs/foreignmemory/linux.c > b/tools/libs/foreignmemory/linux.c > index 3686cf41e0..0368aa09f4 100644 > --- a/tools/libs/foreignmemory/linux.c > +++ b/tools/libs/foreignmemory/linux.c > @@ -53,6 +53,23 @@ int

Re: [Xen-devel] [PATCH v2] rombios: remove packed attribute for pushad_regs_t

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 15:56, wrote: > The structure already has explicitly padding. > > Removing the attribute silences a clang 6 warning: > > tcgbios.c:1519:34: error: taking address of packed member 'u' of class or > structure 'pushad_regs_t' may result in an unaligned pointer value >

Re: [Xen-devel] [PATCH 5/6] xen/arm: smccc: Add wrapper to automatically select the calling convention

2018-08-28 Thread Julien Grall
Hi Volodymyr, On 27/08/18 17:50, Volodymyr Babchuk wrote: On 27.08.18 18:29, Julien Grall wrote: On 27/08/2018 15:15, Volodymyr Babchuk wrote: On 24.08.18 19:58, Julien Grall wrote: Signed-off-by: Julien Grall This is indeed increasing the size of the function, but with a better

[Xen-devel] [PATCH v2] rombios: remove packed attribute for pushad_regs_t

2018-08-28 Thread Wei Liu
The structure already has explicitly padding. Removing the attribute silences a clang 6 warning: tcgbios.c:1519:34: error: taking address of packed member 'u' of class or structure 'pushad_regs_t' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]

[Xen-devel] [qemu-mainline test] 126780: tolerable FAIL - PUSHED

2018-08-28 Thread osstest service owner
flight 126780 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/126780/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 17 guest-stopfail like 126639

Re: [Xen-devel] [PATCH v2 21/23] x86: expose CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 14:14, wrote: > On 28/08/18 12:50, Jan Beulich wrote: > On 26.08.18 at 14:19, wrote: >>> --- a/xen/arch/x86/Kconfig >>> +++ b/xen/arch/x86/Kconfig >>> @@ -60,6 +60,12 @@ config PV_LINEAR_PT >>> >>> config HVM >>> def_bool y >>> + prompt "HVM / PVH support" >>> +

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 05:44:51AM -0600, Jan Beulich wrote: > >>> On 26.08.18 at 14:19, wrote: > > Move the file to x86 common code and change its name to emul-i8254.c. > > > > Put HVM only code under CONFIG_HVM or is_hvm_domain. > > > > Signed-off-by: Wei Liu > > --- > > v2: move the whole

Re: [Xen-devel] [PATCH v2 20/23] xen: connect guest creation with CONFIG_{HVM, PV}

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 05:47:13AM -0600, Jan Beulich wrote: > >>> On 26.08.18 at 14:19, wrote: > > Signed-off-by: Wei Liu > > Acked-by: Jan Beulich > provided the ARM side issue pointed out by Julien is going to > be taken care of (presumably by a patch inserted earlier in the > series). The

Re: [Xen-devel] [PATCH 4/6] VMX: correct PDPTE load checks

2018-08-28 Thread Andrew Cooper
On 19/07/18 11:49, Jan Beulich wrote: > Checking the low 5 bits of CR3 is not the job of vmx_load_pdptrs(). > Instead it should #GP upon bad PDPTE values, rather than causing a VM > entry failure. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++

[Xen-devel] [xen-unstable-smoke test] 126846: trouble: broken/pass

2018-08-28 Thread osstest service owner
flight 126846 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/126846/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl broken

Re: [Xen-devel] [PATCH v2 21/23] x86: expose CONFIG_HVM

2018-08-28 Thread Andrew Cooper
On 28/08/18 12:50, Jan Beulich wrote: On 26.08.18 at 14:19, wrote: >> --- a/xen/arch/x86/Kconfig >> +++ b/xen/arch/x86/Kconfig >> @@ -60,6 +60,12 @@ config PV_LINEAR_PT >> >> config HVM >> def_bool y >> +prompt "HVM / PVH support" >> +---help--- >> + Interfaces to

[Xen-devel] [xen-unstable test] 126778: regressions - FAIL

2018-08-28 Thread osstest service owner
flight 126778 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/126778/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm 16 guest-localmigrate/x10 fail REGR. vs. 126683

[Xen-devel] Ping: [PATCH 4/6] VMX: correct PDPTE load checks

2018-08-28 Thread Jan Beulich
>>> On 19.07.18 at 12:49, wrote: > Checking the low 5 bits of CR3 is not the job of vmx_load_pdptrs(). > Instead it should #GP upon bad PDPTE values, rather than causing a VM > entry failure. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c

Re: [Xen-devel] [PATCH v2 23/23] xen: decouple HVM and IOMMU capabilities

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > HVM and IOMMU are two distinct hardware features, yet they were > bundled together in sysctl and xl's output. > > Decouple them on sysctl level. On toolstack level we still need to > maintain a sensible semantics for `xl info`. Massage the information >

Re: [Xen-devel] [PATCH v2 21/23] x86: expose CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > --- a/xen/arch/x86/Kconfig > +++ b/xen/arch/x86/Kconfig > @@ -60,6 +60,12 @@ config PV_LINEAR_PT > > config HVM > def_bool y > + prompt "HVM / PVH support" > + ---help--- > + Interfaces to support HVM and PVH guests. > + > + If

Re: [Xen-devel] [PATCH v2 20/23] xen: connect guest creation with CONFIG_{HVM, PV}

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > Signed-off-by: Wei Liu Acked-by: Jan Beulich provided the ARM side issue pointed out by Julien is going to be taken care of (presumably by a patch inserted earlier in the series). Jan ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > Move the file to x86 common code and change its name to emul-i8254.c. > > Put HVM only code under CONFIG_HVM or is_hvm_domain. > > Signed-off-by: Wei Liu > --- > v2: move the whole file. > --- > xen/arch/x86/Makefile | 1 +- > xen/arch/x86/emul-i8254.c

Re: [Xen-devel] [PATCH v2 16/23] x86/p2m/pod: make it build with !CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 12:54, wrote: > On Tue, Aug 28, 2018 at 04:47:53AM -0600, Jan Beulich wrote: >> >>> On 26.08.18 at 14:19, wrote: >> > +static inline int p2m_pod_set_mem_target(struct domain *d, unsigned long >> > target) >> > +{ >> > +return 0; >> > +} >> >> This one, at the very least,

Re: [Xen-devel] [PATCH v1 2/6] arm: add generic TEE mediator framework

2018-08-28 Thread Julien Grall
On 27/08/18 20:09, Volodymyr Babchuk wrote: Hi Julien, Hi, On 22.08.18 20:03, Julien Grall wrote: [...]   if ( is_hardware_domain(d) && (rc = domain_vuart_init(d)) )   goto fail; +    /* Notify TEE that new domain was created */ +    tee_domain_create(d); My concern about

Re: [Xen-devel] [PATCH v2 02/23] xen: is_hvm_{domain, vcpu} should evaluate to false when !CONFIG_HVM

2018-08-28 Thread Julien Grall
Hi, On 28/08/18 09:41, Wei Liu wrote: On Mon, Aug 27, 2018 at 08:24:03AM -0600, Jan Beulich wrote: On 26.08.18 at 14:19, wrote: Turn them into static inline functions which evaluate to false when CONFIG_HVM is not set. ARM won't be broken because ARM guests are set to PV type in the

Re: [Xen-devel] [PATCH v2 20/23] xen: connect guest creation with CONFIG_{HVM, PV}

2018-08-28 Thread Julien Grall
Hi Wei, On 26/08/18 13:19, Wei Liu wrote: Signed-off-by: Wei Liu This patch is going to break Arm until we switched to PVH in the toolstack. Cheers, --- xen/common/domain.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c

Re: [Xen-devel] [PATCH v2 16/23] x86/p2m/pod: make it build with !CONFIG_HVM

2018-08-28 Thread Wei Liu
On Tue, Aug 28, 2018 at 04:47:53AM -0600, Jan Beulich wrote: > >>> On 26.08.18 at 14:19, wrote: > > +static inline int p2m_pod_set_mem_target(struct domain *d, unsigned long > > target) > > +{ > > +return 0; > > +} > > This one, at the very least, should not be needed: The case block > in

Re: [Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 12:41, wrote: > On Mon, Aug 27, 2018 at 10:03:11AM +0100, Wei Liu wrote: >> > +#ifdef CONFIG_HVM >> > #define hap_enabled(d) ((d)->arch.hvm_domain.hap_enabled) >> > +#else >> > +#define hap_enabled(d) false >> > +#endif >> >> Hmm... I thought I had rewritten this to be a

Re: [Xen-devel] [PATCH v2 18/23] x86/domctl: XEN_DOMCTL_debug_op is HVM only

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > Signed-off-by: Wei Liu Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 17/23] x86/mm: put paging_update_nestedmode under CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > --- a/xen/arch/x86/mm/paging.c > +++ b/xen/arch/x86/mm/paging.c > @@ -919,6 +919,7 @@ const struct paging_mode *paging_get_mode(struct vcpu *v) > return paging_get_nestedmode(v); > } > > +#ifdef CONFIG_HVM > void paging_update_nestedmode(struct vcpu *v)

Re: [Xen-devel] [PATCH v2 16/23] x86/p2m/pod: make it build with !CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 26.08.18 at 14:19, wrote: > +static inline int p2m_pod_set_mem_target(struct domain *d, unsigned long > target) > +{ > +return 0; > +} This one, at the very least, should not be needed: The case block in arch_memory_op() containing the only call should altogether be framed by #ifdef

Re: [Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM

2018-08-28 Thread Wei Liu
On Mon, Aug 27, 2018 at 10:01:31AM -0600, Jan Beulich wrote: > >>> On 26.08.18 at 14:19, wrote: > > --- a/xen/arch/x86/mm/Makefile > > +++ b/xen/arch/x86/mm/Makefile > > @@ -1,9 +1,10 @@ > > subdir-y += shadow > > -subdir-y += hap > > +subdir-$(CONFIG_HVM) += hap > > > > obj-y += paging.o > >

Re: [Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM

2018-08-28 Thread Wei Liu
On Mon, Aug 27, 2018 at 10:03:11AM +0100, Wei Liu wrote: > > +#ifdef CONFIG_HVM > > #define hap_enabled(d) ((d)->arch.hvm_domain.hap_enabled) > > +#else > > +#define hap_enabled(d) false > > +#endif > > Hmm... I thought I had rewritten this to be a static inline function. > > I will try to

[Xen-devel] [linux-linus bisection] complete test-amd64-i386-freebsd10-i386

2018-08-28 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-freebsd10-i386 testid guest-start Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu

Re: [Xen-devel] QEMU build in -unstable broken on FreeBSD

2018-08-28 Thread Anthony PERARD
On Fri, Aug 24, 2018 at 07:17:33PM +0200, Roger Pau Monné wrote: > The current QEMU build in -unstable is broken on FreeBSD due to some > pvrdma issues. Those issues have already been fixed upstream by > commits: > > 72221d03b85fcfba27a47a2af08ee59150550ced >

Re: [Xen-devel] [PATCH v2 14/23] x86/mm: put nested p2m code under CONFIG_HVM

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 10:40, wrote: > On Mon, Aug 27, 2018 at 09:56:24AM -0600, Jan Beulich wrote: >> >>> On 26.08.18 at 14:19, wrote: >> > --- a/xen/arch/x86/domain.c >> > +++ b/xen/arch/x86/domain.c >> > @@ -1689,7 +1689,8 @@ void context_switch(struct vcpu *prev, struct vcpu >> > *next) >> >

Re: [Xen-devel] [PATCH v2 06/23] x86: don't call vpci function in physdev_op when !CONFIG_HAS_VPCI

2018-08-28 Thread Jan Beulich
>>> On 28.08.18 at 10:45, wrote: > On Mon, Aug 27, 2018 at 08:29:20AM -0600, Jan Beulich wrote: >> >>> On 26.08.18 at 14:19, wrote: >> > --- a/xen/arch/x86/physdev.c >> > +++ b/xen/arch/x86/physdev.c >> > @@ -557,6 +557,7 @@ ret_t do_physdev_op(int cmd, >> > XEN_GUEST_HANDLE_PARAM(void) arg) >>

  1   2   >