Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 23:16, wrote: > On 02/22/2018 10:44 AM, Jan Beulich wrote: > On 22.02.18 at 15:53, wrote: >>> On 22/02/18 13:44, Jan Beulich wrote: ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says that the function returns 0 for unrecognized MSRs, so {svm

Re: [Xen-devel] [PATCH 5/9] drm/xen-front: Implement handling of shared display buffers

2018-02-22 Thread Oleksandr Andrushchenko
On 02/23/2018 02:25 AM, Boris Ostrovsky wrote: On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: static int __init xen_drv_init(void) { + /* At the moment we only support case with XEN_PAGE_SIZE == PAGE_SIZE */ + BUILD_BUG_ON(XEN_PAGE_SIZE != PAGE_SIZE); Why BUILD_BUG_O

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-22 Thread Razvan Cojocaru
On 02/23/2018 09:29 AM, Razvan Cojocaru wrote: > Lacking PCID support in the emulation layer creates two different way of > handling the NOFLUSH being set: one is in hardware, and this happens for > everything except the introspection case, and one in the emulation layer > (this happens when an int

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-22 Thread Razvan Cojocaru
On 02/23/2018 06:53 AM, Tian, Kevin wrote: >> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] >> Sent: Friday, February 16, 2018 6:22 PM >> >> The emulation layers of Xen lack PCID support, and as we only offer >> PCID to HAP guests, all writes to CR3 are handled by hardware, >> except whe

Re: [Xen-devel] [PATCH 4/9] drm/xen-front: Implement Xen event channel handling

2018-02-22 Thread Oleksandr Andrushchenko
On 02/23/2018 01:50 AM, Boris Ostrovsky wrote: On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: + +static irqreturn_t evtchnl_interrupt_ctrl(int irq, void *dev_id) +{ + struct xen_drm_front_evtchnl *evtchnl = dev_id; + struct xen_drm_front_info *front_info = evtchnl->front_info

Re: [Xen-devel] [PATCH 3/9] drm/xen-front: Read driver configuration from Xen store

2018-02-22 Thread Oleksandr Andrushchenko
On 02/23/2018 01:20 AM, Boris Ostrovsky wrote: On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: + +static int cfg_connector(struct xen_drm_front_info *front_info, + struct xen_drm_front_cfg_connector *connector, + const char *path, int index) +{ + char *co

[Xen-devel] [libvirt test] 119874: tolerable all pass - PUSHED

2018-02-22 Thread osstest service owner
flight 119874 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/119874/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 119792 test-armhf-armhf-libvirt-raw 13 saveresto

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-22 Thread Oleksandr Andrushchenko
On 02/23/2018 12:23 AM, Boris Ostrovsky wrote: On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: +static struct xenbus_driver xen_driver = { + .ids = xen_drv_ids, + .probe = xen_drv_probe, + .remove = xen_drv_remove, + .otherend_changed = backend_on_changed, What do

Re: [Xen-devel] [PATCH v4 17/28] x86/vvtd: save and restore emulated VT-d

2018-02-22 Thread Chao Gao
On Mon, Feb 12, 2018 at 02:49:12PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:24PM +0800, Chao Gao wrote: >> Provide a save-restore pair to save/restore registers and non-register >> status. >> >> Signed-off-by: Chao Gao >> Signed-off-by: Lan Tianyu >> --- >> v3: >> - use one

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-22 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Tuesday, February 13, 2018 5:56 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 13 February 2018 06:56 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org > > Cc: Stefano Stabellini

Re: [Xen-devel] [PATCH v4 16/28] x86/vvtd: Add queued invalidation (QI) support

2018-02-22 Thread Chao Gao
On Mon, Feb 12, 2018 at 02:36:10PM +, Roger Pau Monné wrote: >On Fri, Nov 17, 2017 at 02:22:23PM +0800, Chao Gao wrote: >> Queued Invalidation Interface is an expanded invalidation interface with >> extended capabilities. Hardware implementations report support for queued >> invalidation interf

Re: [Xen-devel] [PATCH 6/7] x86: add iommu_op to query reserved ranges

2018-02-22 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Tuesday, February 13, 2018 5:25 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 13 February 2018 06:52 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org > > Cc: Stefano Stabellini

Re: [Xen-devel] [PATCH 5/7] public / x86: introduce __HYPERCALL_iommu_op

2018-02-22 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Tuesday, February 13, 2018 5:23 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 13 February 2018 06:43 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org > > Cc: Stefano Stabellini

Re: [Xen-devel] [PATCH RFC 00/10] x86 passthrough code cleanup

2018-02-22 Thread Tian, Kevin
> From: Wei Liu > Sent: Thursday, February 22, 2018 5:47 AM > > Hi all > > At some point I would like to make CONFIG_HVM and CONFIG_PV work. > The > passthrough code is one of the road blocks for that work. Can you elaborate the motivation of this change? why does someone want to disable HVM or

Re: [Xen-devel] [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-22 Thread Tian, Kevin
> From: Julien Grall [mailto:julien.gr...@arm.com] > Sent: Wednesday, February 21, 2018 10:03 PM > > Most of the users of page_to_mfn and mfn_to_page are either overriding > the macros to make them work with mfn_t or use mfn_x/_mfn because the > rest of the function use mfn_t. > > So make page_to

Re: [Xen-devel] [PATCH v4 10/16] xen/mm: Switch map_pages_to_xen to use MFN typesafe

2018-02-22 Thread Tian, Kevin
> From: Julien Grall [mailto:julien.gr...@arm.com] > Sent: Wednesday, February 21, 2018 10:03 PM > > The current prototype is slightly confusing because it takes a virtual > address and a physical frame (not address!). Switching to MFN will improve > safety and reduce the chance to mistakenly inve

Re: [Xen-devel] [PATCH v3 1/2] x86/hvm: introduce cr{0, 4}_host_mask to store trapped bits of CR accesses

2018-02-22 Thread Tian, Kevin
> From: Roger Pau Monne [mailto:roger@citrix.com] > Sent: Tuesday, February 20, 2018 4:57 PM > > At the moment this is currently set at VMC{S/B} creation and not changed, > but further patches are going to change the CR4 mask at runtime. > > Signed-off-by: Roger Pau Monné Reviewed-by: Kevin

Re: [Xen-devel] [PATCH v3 2/2] vmx/hap: optimize CR4 trapping

2018-02-22 Thread Tian, Kevin
> From: Roger Pau Monne [mailto:roger@citrix.com] > Sent: Tuesday, February 20, 2018 4:57 PM > > There a bunch of bits in CR4 that should be allowed to be set directly > by the guest without requiring Xen intervention, currently this is > already done by passing through guest writes into the C

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-22 Thread Tian, Kevin
> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] > Sent: Friday, February 16, 2018 6:22 PM > > The emulation layers of Xen lack PCID support, and as we only offer > PCID to HAP guests, all writes to CR3 are handled by hardware, > except when introspection is involved. Consequently, tryin

[Xen-devel] [xen-4.9-testing test] 119839: tolerable FAIL - PUSHED

2018-02-22 Thread osstest service owner
flight 119839 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/119839/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds16 guest-start/debian.repeat fail REGR. vs. 118683 test-amd64-i386-xl-qemuu

Re: [Xen-devel] [PATCH v2] VT-d: use two 32-bit writes to update DMAR fault address registers

2018-02-22 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, February 22, 2018 5:50 PM > > >>> On 22.02.18 at 10:44, wrote: > > On Wed, Oct 11, 2017 at 05:27:05AM -0600, Jan Beulich wrote: > >> >>> On 11.10.17 at 05:03, wrote: > >> > --- a/xen/drivers/passthrough/vtd/iommu.c > >> > +++ b/xen

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

2018-02-22 Thread osstest service owner
flight 119819 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/119819/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-xsm broken test-amd64-i386-libvirt 7 xen-boot

Re: [Xen-devel] [PATCH 5/9] drm/xen-front: Implement handling of shared display buffers

2018-02-22 Thread Boris Ostrovsky
On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: > > static int __init xen_drv_init(void) > { > + /* At the moment we only support case with XEN_PAGE_SIZE == PAGE_SIZE */ > + BUILD_BUG_ON(XEN_PAGE_SIZE != PAGE_SIZE); Why BUILD_BUG_ON? This should simply not load if page sizes ar

[Xen-devel] [PATCH] fuzz/x86_emulate: fix bounds for input size

2018-02-22 Thread Paul Semel
The minimum size for the input size was set to DATA_OFFSET + 1 which was meaning that we were requesting at least one character of the data array to be filled. This is not needed for the fuzzer to get working correctly. The maximum size for the input size was set to INPUT_SIZE, which is actually t

Re: [Xen-devel] [PATCH 4/9] drm/xen-front: Implement Xen event channel handling

2018-02-22 Thread Boris Ostrovsky
On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: > + > +static irqreturn_t evtchnl_interrupt_ctrl(int irq, void *dev_id) > +{ > + struct xen_drm_front_evtchnl *evtchnl = dev_id; > + struct xen_drm_front_info *front_info = evtchnl->front_info; > + struct xendispl_resp *resp; > +

Re: [Xen-devel] [PATCH 3/9] drm/xen-front: Read driver configuration from Xen store

2018-02-22 Thread Boris Ostrovsky
On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: > + > +static int cfg_connector(struct xen_drm_front_info *front_info, > + struct xen_drm_front_cfg_connector *connector, > + const char *path, int index) > +{ > + char *connector_path; > + > + connector_path = d

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-22 Thread Boris Ostrovsky
On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: > +static struct xenbus_driver xen_driver = { > + .ids = xen_drv_ids, > + .probe = xen_drv_probe, > + .remove = xen_drv_remove, > + .otherend_changed = backend_on_changed, What does "_on_" stand for? -boris __

Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Boris Ostrovsky
On 02/22/2018 10:44 AM, Jan Beulich wrote: On 22.02.18 at 15:53, wrote: >> On 22/02/18 13:44, Jan Beulich wrote: >>> ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says >>> that the function returns 0 for unrecognized MSRs, so >>> {svm,vmx}_msr_write_intercept() should not co

Re: [Xen-devel] [PATCH v2] hvm/svm: Implement CPUID events

2018-02-22 Thread Boris Ostrovsky
On 02/21/2018 05:18 AM, Alexandru Isaila wrote: > At this moment the CPUID events for the AMD architecture are not > forwarded to the monitor layer. > > This patch adds the CPUID event to the common capabilities and then > forwards the event to the monitor layer. > > --- > Changes since V1: >

Re: [Xen-devel] pvh+vcpus startup issue

2018-02-22 Thread xen
On 22/02/18 6:35 PM, Juergen Gross wrote: On 22/02/18 05:37, x...@randomwebstuff.com wrote: Hi.  I have a domU.  Its params file has: vcpus = 8.  It will start with pv, but not type="pvh".  It will not start (on pvh) with vcpus = 7 or 6 or 5.  It does start with vcpus = 4. I diffed the xl -v c

Re: [Xen-devel] AD bits in traditional PV mode

2018-02-22 Thread Andres Lagar Cavilla
Thanks for the clarification, Andrew. On Tue, Feb 20, 2018 at 5:20 PM, Andrew Cooper wrote: > On 21/02/2018 00:42, Andres Lagar Cavilla wrote: > > Hello everyone, > > > > I was thinking of the traditional Xen PV mode in which page table > > pages are write protected from guest meddling and PTE >

[Xen-devel] [PATCH] README: require Python 2.6 or newer

2018-02-22 Thread Doug Goldstein
Increase the minimum required Python to 2.6 or newer. Signed-off-by: Doug Goldstein --- CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deegan CC: Wei Liu --- Python 2.6 shipped Oct 1st 2008. It was included as t

Re: [Xen-devel] Excited for Xen Project in Outreachy

2018-02-22 Thread KANIKA SAINI
*Issue suggested by Simon* In Unikraft - whenever compiler flags are changed due to an addition of a library or something else according to the build rules, the make command doesn't force recompilation of those files affected by the flag change unless the files are altered too. The only way out is

Re: [Xen-devel] [PATCH] xen/pvcalls: fix null pointer dereference on map->sock

2018-02-22 Thread Juergen Gross
On 22/02/18 18:22, Colin King wrote: > From: Colin Ian King > > Currently if map is null then a potential null pointer deference > occurs when calling sock_release on map->sock. I believe the > actual intention was to call sock_release on sock instead. Fix > this. > > Fixes: 5db4d286a8ef ("xen/

Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-22 Thread Juergen Gross
On 22/02/18 19:55, Wei Liu wrote: > On Thu, Feb 22, 2018 at 06:53:28PM +, Wei Liu wrote: >> On Thu, Feb 22, 2018 at 07:44:22PM +0100, Juergen Gross wrote: >>> On 22/02/18 18:28, Wei Liu wrote: On Thu, Feb 22, 2018 at 02:53:35PM +0100, Juergen Gross wrote: > When creating a pthread in x

Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 06:53:28PM +, Wei Liu wrote: > On Thu, Feb 22, 2018 at 07:44:22PM +0100, Juergen Gross wrote: > > On 22/02/18 18:28, Wei Liu wrote: > > > On Thu, Feb 22, 2018 at 02:53:35PM +0100, Juergen Gross wrote: > > >> When creating a pthread in xs_watch() try to get the minimal ne

Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 07:44:22PM +0100, Juergen Gross wrote: > On 22/02/18 18:28, Wei Liu wrote: > > On Thu, Feb 22, 2018 at 02:53:35PM +0100, Juergen Gross wrote: > >> When creating a pthread in xs_watch() try to get the minimal needed > >> size of the thread from glibc instead of using a consta

Re: [Xen-devel] [RFC Patch v4 8/8] x86/hvm: bump the maximum number of vcpus to 512

2018-02-22 Thread Wei Liu
On Wed, Dec 06, 2017 at 03:50:14PM +0800, Chao Gao wrote: > Signed-off-by: Chao Gao > --- > xen/include/public/hvm/hvm_info_table.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/include/public/hvm/hvm_info_table.h > b/xen/include/public/hvm/hvm_info_table.h > inde

[Xen-devel] Xen Project Application | Outreachy

2018-02-22 Thread Pallavi
Hi, Lars. I'm Pallavi V G, a second year undergrad majoring in CS from India. I went through the community landing page of Xen Project and found this project that I would like to contribute on- Xen on ARM: create multiple guests from device tree. I have taken a course on C during my second semeste

Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-22 Thread Juergen Gross
On 22/02/18 18:28, Wei Liu wrote: > On Thu, Feb 22, 2018 at 02:53:35PM +0100, Juergen Gross wrote: >> When creating a pthread in xs_watch() try to get the minimal needed >> size of the thread from glibc instead of using a constant. This avoids >> problems when the library is used in programs with l

Re: [Xen-devel] [RFC Patch v4 4/8] hvmloader: boot cpu through broadcast

2018-02-22 Thread Wei Liu
On Wed, Dec 06, 2017 at 03:50:10PM +0800, Chao Gao wrote: > Intel SDM Extended XAPIC (X2APIC) -> "Initialization by System Software" > has the following description: > > "The ACPI interfaces for the x2APIC are described in Section 5.2, “ACPI System > Description Tables,” of the Advanced Configurat

Re: [Xen-devel] [RFC Patch v4 3/8] xl/acpi: unify the computation of lapic_id

2018-02-22 Thread Wei Liu
On Wed, Dec 06, 2017 at 03:50:09PM +0800, Chao Gao wrote: > There were two places where the lapic_id is computed, one in hvmloader and one > in libacpi. Unify them by defining LAPIC_ID in a header file and incluing it > in both places. > > To address compilation issue and make libacpi.h self-conta

Re: [Xen-devel] [xen-devel] [fuzz] [x86 emulator] Input size

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 01:39:01PM +0100, Paul Semel wrote: > Hello, > > > In the x86 instruction emulator fuzzer, when checking wether the input size > is correct, we are checking for this bounds : DATA_OFFSET < size < > INPUT_SIZE. > > > The fact is that INPUT_SIZE is actually the size of the

Re: [Xen-devel] RTDS with extra time issue

2018-02-22 Thread Dario Faggioli
On Tue, 2018-02-20 at 13:34 +0200, Andrii Anisov wrote: > Hello Dario, > Hi, > On 16.02.18 20:37, Dario Faggioli wrote: > > And in any case, is it, in its turn (I mean the > > workload running in DomR) a synthetic real-time load, or is it a > > real > > real-time application? > > Real-time domai

Re: [Xen-devel] [PATCH 5/5] xen/libxc: suppress direct access to Credit1's migration delay

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 05:30:28PM +, Wei Liu wrote: > On Thu, Feb 22, 2018 at 05:55:32PM +0100, Dario Faggioli wrote: > > Removes special purpose access to Credit1 vCPU > > migration delay parameter. > > > > This fixes a build breakage, occuring when Xen > > is configured with SCHED_CREDIT=n.

Re: [Xen-devel] [PATCH 3/5] tools: libxl/xl: allow to get/set Credit1's vcpu_migration_delay

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 05:55:17PM +0100, Dario Faggioli wrote: > Make it possible to get and set a (Credit1) scheduler's > vCPU migration delay via the SCHEDOP sysctl, from both > libxl and xl (no change needed in libxc). > > Signed-off-by: Dario Faggioli Acked-by: Wei Liu ___

Re: [Xen-devel] [PATCH 4/5] tools: xenpm: continue to support {set, get}-vcpu-migration-delay

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 05:55:25PM +0100, Dario Faggioli wrote: > Now that it is possible to get and set the migration > delay via the SCHEDOP sysctl, use that in xenpm, instead > of the special purpose libxc interface (which will be > removed in a following commit). > > The sysctl, however, requi

Re: [Xen-devel] [PATCH 5/5] xen/libxc: suppress direct access to Credit1's migration delay

2018-02-22 Thread Dario Faggioli
On Thu, 2018-02-22 at 17:30 +, Wei Liu wrote: > On Thu, Feb 22, 2018 at 05:55:32PM +0100, Dario Faggioli wrote: > > Removes special purpose access to Credit1 vCPU > > migration delay parameter. > > > > This fixes a build breakage, occuring when Xen > > is configured with SCHED_CREDIT=n. > > >

[Xen-devel] [linux-next test] 119805: regressions - FAIL

2018-02-22 Thread osstest service owner
flight 119805 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/119805/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-xsm 19 leak-check/check fail REGR. vs. 119687 test-armhf-armhf-xl-

Re: [Xen-devel] [PATCH 5/5] xen/libxc: suppress direct access to Credit1's migration delay

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 05:30:28PM +, Wei Liu wrote: > On Thu, Feb 22, 2018 at 05:55:32PM +0100, Dario Faggioli wrote: > > Removes special purpose access to Credit1 vCPU > > migration delay parameter. > > > > This fixes a build breakage, occuring when Xen > > is configured with SCHED_CREDIT=n.

Re: [Xen-devel] [PATCH 5/5] xen/libxc: suppress direct access to Credit1's migration delay

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 05:55:32PM +0100, Dario Faggioli wrote: > Removes special purpose access to Credit1 vCPU > migration delay parameter. > > This fixes a build breakage, occuring when Xen > is configured with SCHED_CREDIT=n. > > Signed-off-by: Dario Faggioli > --- > Ian Jackson > Wei Liu

Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 02:53:35PM +0100, Juergen Gross wrote: > When creating a pthread in xs_watch() try to get the minimal needed > size of the thread from glibc instead of using a constant. This avoids > problems when the library is used in programs with large per-thread > memory. > > Use dlsy

[Xen-devel] [PATCH] xen/pvcalls: fix null pointer dereference on map->sock

2018-02-22 Thread Colin King
From: Colin Ian King Currently if map is null then a potential null pointer deference occurs when calling sock_release on map->sock. I believe the actual intention was to call sock_release on sock instead. Fix this. Fixes: 5db4d286a8ef ("xen/pvcalls: implement connect command") Signed-off-by: C

Re: [Xen-devel] [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 04:55:10PM +, Julien Grall wrote: > Hi Wei, > > On 22/02/18 16:51, Wei Liu wrote: > > On Thu, Feb 22, 2018 at 04:40:04PM +, Julien Grall wrote: > > > Hi Wei, > > > > > > On 22/02/18 16:35, Wei Liu wrote: > > > > On Wed, Feb 21, 2018 at 02:02:51PM +, Julien Gral

[Xen-devel] [PATCH] grant: Release domain lock on 'map' path in cache_flush

2018-02-22 Thread George Dunlap
common/grant_table.c:cache_flush() grabs the rcu lock for the current domain, but only releases it on error paths. Note that this is not a security issue, as the preempt count is used exclusively for assertions at the moment. Signed-off-by: George Dunlap Reviewed-by: Jan Beulich --- CC: Ian Jac

Re: [Xen-devel] [PATCH] xen/tools: support Python 2 and Python 3

2018-02-22 Thread Andrew Cooper
On 22/02/18 16:47, Doug Goldstein wrote: > On 2/22/18 6:54 AM, Andrew Cooper wrote: >> On 22/02/18 05:52, Doug Goldstein wrote: >>> These changes should make it possible to support modern Pythons as well >>> as the oldest Python 2 still supported. >>> >>> Signed-off-by: Doug Goldstein >> To the ov

Re: [Xen-devel] [PATCH] xen/tools: support Python 2 and Python 3

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 10:47:27AM -0600, Doug Goldstein wrote: > On 2/22/18 6:54 AM, Andrew Cooper wrote: > > On 22/02/18 05:52, Doug Goldstein wrote: > >> These changes should make it possible to support modern Pythons as well > >> as the oldest Python 2 still supported. > >> > >> Signed-off-by:

Re: [Xen-devel] [PATCH v2] xen: append EXTRA_CFLAGS_XEN_CORE to CFLAGS

2018-02-22 Thread Wei Liu
On Wed, Feb 21, 2018 at 11:48:16PM -0600, Doug Goldstein wrote: > Allow a user to supply extra CFLAGS via the EXTRA_CFLAGS_XEN_CORE > environment variable for hypervisor builds. This is not a > configuration that is supported but is only aimed to help support > testing and troubleshooting when you

Re: [Xen-devel] [PATCH v2] xen: append EXTRA_CFLAGS_XEN_CORE to CFLAGS

2018-02-22 Thread Konrad Rzeszutek Wilk
On Wed, Feb 21, 2018 at 11:48:16PM -0600, Doug Goldstein wrote: > Allow a user to supply extra CFLAGS via the EXTRA_CFLAGS_XEN_CORE > environment variable for hypervisor builds. This is not a > configuration that is supported but is only aimed to help support > testing and troubleshooting when you

[Xen-devel] [PATCH 5/5] xen/libxc: suppress direct access to Credit1's migration delay

2018-02-22 Thread Dario Faggioli
Removes special purpose access to Credit1 vCPU migration delay parameter. This fixes a build breakage, occuring when Xen is configured with SCHED_CREDIT=n. Signed-off-by: Dario Faggioli --- Ian Jackson Wei Liu Andrew Cooper George Dunlap Jan Beulich Konrad Rzeszutek Wilk Stefano Stabellini

[Xen-devel] [PATCH 1/5] xen: sched/credit: convert scheduling parameter to s_time_t when set

2018-02-22 Thread Dario Faggioli
Basically, instead of converting integers to s_time_t at usage time (hot paths), do the convertion when the values are set (cold paths). This applies to the timeslice and the ratelimit parameters of Credit1. Note that, when changing the type of the fields of struct csched_private (from unsigned t

[Xen-devel] [PATCH 4/5] tools: xenpm: continue to support {set, get}-vcpu-migration-delay

2018-02-22 Thread Dario Faggioli
Now that it is possible to get and set the migration delay via the SCHEDOP sysctl, use that in xenpm, instead of the special purpose libxc interface (which will be removed in a following commit). The sysctl, however, requires a cpupool-id argument, for knowing on which scheduler it is operating on

[Xen-devel] [PATCH 2/5] xen: sched/credit1: make vcpu_migration_delay per-cpupool

2018-02-22 Thread Dario Faggioli
Right now, vCPU migration delay is controlled by the vcpu_migration_delay boot parameter. This means the same value will always be used for every instance of Credit1, in any cpupool that will be created. Also, in order to get and set such value, a special purpose libxc interface is defined, and us

[Xen-devel] [PATCH 3/5] tools: libxl/xl: allow to get/set Credit1's vcpu_migration_delay

2018-02-22 Thread Dario Faggioli
Make it possible to get and set a (Credit1) scheduler's vCPU migration delay via the SCHEDOP sysctl, from both libxl and xl (no change needed in libxc). Signed-off-by: Dario Faggioli --- Cc: Ian Jackson Cc: Wei Liu Cc: George Dunlap Cc: Andrew Cooper --- docs/man/xl.pod.1.in| 11 ++

Re: [Xen-devel] [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-02-22 Thread Julien Grall
Hi Wei, On 22/02/18 16:51, Wei Liu wrote: On Thu, Feb 22, 2018 at 04:40:04PM +, Julien Grall wrote: Hi Wei, On 22/02/18 16:35, Wei Liu wrote: On Wed, Feb 21, 2018 at 02:02:51PM +, Julien Grall wrote: The function populate_pt_range is used to populate in advance the page-table but it

[Xen-devel] [PATCH 0/5] xen/tools: sched: Credit1: improve handling of vCPU migration delay

2018-02-22 Thread Dario Faggioli
Hi, vCPU migration delay is a parameter of the Credit1 scheduler specifying for how long, after a vCPU stopped running on a particular pCPU, the cache(s) should be considered "hot" for the vCPU's working set. Basically, if less than the value set for such parameter (in microseconds) passed, the v

Re: [Xen-devel] [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-02-22 Thread Wei Liu
On Thu, Feb 22, 2018 at 04:40:04PM +, Julien Grall wrote: > Hi Wei, > > On 22/02/18 16:35, Wei Liu wrote: > > On Wed, Feb 21, 2018 at 02:02:51PM +, Julien Grall wrote: > > > The function populate_pt_range is used to populate in advance the > > > page-table but it will not do the actual map

Re: [Xen-devel] [PATCH] xen/tools: support Python 2 and Python 3

2018-02-22 Thread Doug Goldstein
On 2/22/18 6:54 AM, Andrew Cooper wrote: > On 22/02/18 05:52, Doug Goldstein wrote: >> These changes should make it possible to support modern Pythons as well >> as the oldest Python 2 still supported. >> >> Signed-off-by: Doug Goldstein > > To the overall effect, this is definitely a good thing.

Re: [Xen-devel] [PATCH v4 09/16] xen/pdx: Introduce helper to convert MFN <-> PDX

2018-02-22 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:52PM +, Julien Grall wrote: > This will avoid use of pfn_to_pdx(mfn_x(mfn)) over the code base. > > Signed-off-by: Julien Grall > Reviewed-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https:

Re: [Xen-devel] [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-02-22 Thread Julien Grall
Hi Wei, On 22/02/18 16:35, Wei Liu wrote: On Wed, Feb 21, 2018 at 02:02:51PM +, Julien Grall wrote: The function populate_pt_range is used to populate in advance the page-table but it will not do the actual mapping. So passing the MFN in parameter is pointless. Note that the only caller pas

Re: [Xen-devel] [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-02-22 Thread Wei Liu
On Wed, Feb 21, 2018 at 02:02:51PM +, Julien Grall wrote: > The function populate_pt_range is used to populate in advance the > page-table but it will not do the actual mapping. So passing the MFN in > parameter is pointless. Note that the only caller pass 0... > > At the same time replace 0 b

Re: [Xen-devel] [PATCH v3 12/17] xen/arm: vpsci: Remove parameter 'ver' from do_common_cpu

2018-02-22 Thread Julien Grall
On 21/02/18 16:37, Julien Grall wrote: On 21/02/18 16:27, Andre Przywara wrote: Hi, Hi, On 15/02/18 15:02, Julien Grall wrote: Currently, the behavior of do_common_cpu will slightly change depending on the PSCI version passed in parameter. Looking at the code, more the specific 0.2 beha

Re: [Xen-devel] [PATCH v3 10/17] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-22 Thread Julien Grall
Hi, On 21/02/18 17:35, Stefano Stabellini wrote: On Wed, 21 Feb 2018, Julien Grall wrote: Hi Stefano, On 21/02/2018 00:35, Stefano Stabellini wrote: On Thu, 15 Feb 2018, Julien Grall wrote: Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. Signed-off-by: Julien Grall ---

Re: [Xen-devel] [PATCH v3 10/17] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-22 Thread Julien Grall
On 21/02/18 16:07, Andre Przywara wrote: Hi, Hi Andre, On 15/02/18 15:02, Julien Grall wrote: Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. Signed-off-by: Julien Grall --- Changes in v3: - Add the missing call to smc #0. Changes in v2:

Re: [Xen-devel] [PATCH] xenstore: increase default thread stack size to 32k

2018-02-22 Thread Jim Fehlig
On 02/21/2018 10:18 PM, Juergen Gross wrote: On 21/02/18 23:13, Jim Fehlig wrote: On several Skylake machines I've observed xl segfaults when running create or destroy subcommands. Other subcommands may segfault too, but I've only looked at create and destroy which share a similar backtrace Thr

Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 15:53, wrote: > On 22/02/18 13:44, Jan Beulich wrote: >> ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says >> that the function returns 0 for unrecognized MSRs, so >> {svm,vmx}_msr_write_intercept() should not convert this into success. >> >> At the time it we

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

2018-02-22 Thread osstest service owner
flight 119797 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/119797/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 119692 test-amd64-amd64-xl-qemuu-win7-amd6

Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Andrew Cooper
On 22/02/18 15:00, Jan Beulich wrote: On 22.02.18 at 15:53, wrote: >> On 22/02/18 13:44, Jan Beulich wrote: >>> ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says >>> that the function returns 0 for unrecognized MSRs, so >>> {svm,vmx}_msr_write_intercept() should not convert

Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 15:53, wrote: > On 22/02/18 13:44, Jan Beulich wrote: >> ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says >> that the function returns 0 for unrecognized MSRs, so >> {svm,vmx}_msr_write_intercept() should not convert this into success. >> >> At the time it we

Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Andrew Cooper
On 22/02/18 13:44, Jan Beulich wrote: > ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says > that the function returns 0 for unrecognized MSRs, so > {svm,vmx}_msr_write_intercept() should not convert this into success. > > At the time it went in, commit 013e34f5a6 ("x86: handle pa

Re: [Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Boris Ostrovsky
On 02/22/2018 08:44 AM, Jan Beulich wrote: > ... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says > that the function returns 0 for unrecognized MSRs, so > {svm,vmx}_msr_write_intercept() should not convert this into success. > > At the time it went in, commit 013e34f5a6 ("x86: hand

Re: [Xen-devel] [PATCH v5 5/5] build/clang: add a check whether the assembler supports .skip with labels

2018-02-22 Thread Jan Beulich
>>> On 20.02.18 at 15:10, wrote: > Or else disable the integrated assembler for assembly files. This is > relevant for older clang versions which integrated assembler don't > support .skip with labels. > > Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich but pending the decision what to do

Re: [Xen-devel] [PATCH v5 4/5] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK

2018-02-22 Thread Jan Beulich
>>> On 20.02.18 at 15:10, wrote: > When indirect_thunk_asm.h is instantiated directly into assembly files > CONFIG_INDIRECT_THUNK might not be defined, and thus using .if against > it is wrong. > > Add a check to define CONFIG_INDIRECT_THUNK to 0 if not defined, so > that using .if CONFIG_INDIREC

Re: [Xen-devel] [PATCH v3 05/17] xen/arm64: Implement a fast path for handling SMCCC_ARCH_WORKAROUND_1

2018-02-22 Thread Julien Grall
On 21/02/18 14:27, Andre Przywara wrote: Hi, Hi Andre, On 15/02/18 15:02, Julien Grall wrote: The function SMCCC_ARCH_WORKAROUND_1 will be called by the guest for hardening the branch predictor. So we want the handling to be as fast as possible. As the mitigation is applied on every guest

[Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-22 Thread Juergen Gross
When creating a pthread in xs_watch() try to get the minimal needed size of the thread from glibc instead of using a constant. This avoids problems when the library is used in programs with large per-thread memory. Use dlsym() to get the pointer to __pthread_get_minstack() in order to avoid linkag

Re: [Xen-devel] [PATCH RFC v2] x86/domctl: Don't pause the whole domain if only getting vcpu state

2018-02-22 Thread Alexandru Stefan ISAILA
On Mi, 2018-02-21 at 18:24 +, George Dunlap wrote: > On Fri, Oct 6, 2017 at 11:02 AM, Alexandru Isaila > wrote: > > > > This patch adds the hvm_save_one_cpu_ctxt() function. > > It optimizes by only pausing the vcpu on all HVMSR_PER_VCPU save > > callbacks where only data for one VCPU is requi

[Xen-devel] [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding

2018-02-22 Thread Jan Beulich
... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says that the function returns 0 for unrecognized MSRs, so {svm,vmx}_msr_write_intercept() should not convert this into success. At the time it went in, commit 013e34f5a6 ("x86: handle paged gfn in wrmsr_hypervisor_regs") was probably

Re: [Xen-devel] [PATCH] build: Rename as-insn-check to as-insn-add

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 13:39, wrote: > On 02/22/2018 12:22 PM, Jan Beulich wrote: > On 22.02.18 at 12:41, wrote: >>> On 22/02/18 11:33, Jan Beulich wrote: >>> On 22.02.18 at 11:51, wrote: > as-insn-check mutates the passed-in flags. Rename it to as-insn-add, in > line > with cc

Re: [Xen-devel] [PATCH] xtf: fix cdefs.h conflict with __section

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 13:28, wrote: > On 22/02/18 12:24, Jan Beulich wrote: > On 22.02.18 at 13:03, wrote: >>> On FreeBSD the build fails with: >>> >>> /root/src/xtf/include/xtf/compiler.h:13:9: error: '__section' macro >>> redefined >>> [-Werror,-Wmacro-redefined] >>> #define __section(s

[Xen-devel] [seabios test] 119788: regressions - FAIL

2018-02-22 Thread osstest service owner
flight 119788 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/119788/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 17 guest-stop fail REGR. vs. 115539 Tests which did not suc

Re: [Xen-devel] [PATCH] xen/tools: support Python 2 and Python 3

2018-02-22 Thread Andrew Cooper
On 22/02/18 05:52, Doug Goldstein wrote: > These changes should make it possible to support modern Pythons as well > as the oldest Python 2 still supported. > > Signed-off-by: Doug Goldstein To the overall effect, this is definitely a good thing.  Some queries however... > --- > CC: Andrew Coope

Re: [Xen-devel] [PATCH] build: Rename as-insn-check to as-insn-add

2018-02-22 Thread George Dunlap
On 02/22/2018 12:22 PM, Jan Beulich wrote: On 22.02.18 at 12:41, wrote: >> On 22/02/18 11:33, Jan Beulich wrote: >> On 22.02.18 at 11:51, wrote: as-insn-check mutates the passed-in flags. Rename it to as-insn-add, in line with cc-option-add. Update all callers. >>> I'm

Re: [Xen-devel] [PATCH] xtf: fix cdefs.h conflict with __section

2018-02-22 Thread Andrew Cooper
On 22/02/18 12:24, Jan Beulich wrote: On 22.02.18 at 13:03, wrote: >> On FreeBSD the build fails with: >> >> /root/src/xtf/include/xtf/compiler.h:13:9: error: '__section' macro >> redefined >> [-Werror,-Wmacro-redefined] >> #define __section(s) __attribute__((__section__(s)))

Re: [Xen-devel] [PATCH] xenstore: increase default thread stack size to 32k

2018-02-22 Thread Juergen Gross
On 22/02/18 12:33, Ian Jackson wrote: > Juergen Gross writes ("Re: [Xen-devel] [PATCH] xenstore: increase default > thread stack size to 32k"): >> The main problem is that any thread local storage is taken from the >> stack without any interface being available for adjusting the _real_ >> stack si

Re: [Xen-devel] [PATCH] xtf: fix cdefs.h conflict with __section

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 13:03, wrote: > On FreeBSD the build fails with: > > /root/src/xtf/include/xtf/compiler.h:13:9: error: '__section' macro > redefined > [-Werror,-Wmacro-redefined] > #define __section(s) __attribute__((__section__(s))) > ^ > /usr/include/sys/cdefs.h:229:9

Re: [Xen-devel] [PATCH] build: Rename as-insn-check to as-insn-add

2018-02-22 Thread Jan Beulich
>>> On 22.02.18 at 12:41, wrote: > On 22/02/18 11:33, Jan Beulich wrote: > On 22.02.18 at 11:51, wrote: >>> as-insn-check mutates the passed-in flags. Rename it to as-insn-add, in >>> line >>> with cc-option-add. Update all callers. >> I'm not convinced - cc-option-add makes relatively cle

[Xen-devel] [xen-devel] [fuzz] [x86 emulator] Input size

2018-02-22 Thread Paul Semel
Hello, In the x86 instruction emulator fuzzer, when checking wether the input size is correct, we are checking for this bounds : DATA_OFFSET < size < INPUT_SIZE. The fact is that INPUT_SIZE is actually the size of the data buffer in the fuzz_corpus structure. This way, AFL is not able to ha

Re: [Xen-devel] [PATCH] xtf: fix cdefs.h conflict with __section

2018-02-22 Thread Andrew Cooper
On 22/02/18 12:03, Roger Pau Monne wrote: > On FreeBSD the build fails with: > > /root/src/xtf/include/xtf/compiler.h:13:9: error: '__section' macro redefined > [-Werror,-Wmacro-redefined] > #define __section(s) __attribute__((__section__(s))) > ^ > /usr/include/sys/cdefs.h:2

[Xen-devel] [PATCH] xtf: fix cdefs.h conflict with __section

2018-02-22 Thread Roger Pau Monne
On FreeBSD the build fails with: /root/src/xtf/include/xtf/compiler.h:13:9: error: '__section' macro redefined [-Werror,-Wmacro-redefined] #define __section(s) __attribute__((__section__(s))) ^ /usr/include/sys/cdefs.h:229:9: note: previous definition is here #define __secti

Re: [Xen-devel] [PATCH] xenstore: increase default thread stack size to 32k

2018-02-22 Thread Juergen Gross
On 22/02/18 12:35, Roger Pau Monné wrote: > On Thu, Feb 22, 2018 at 11:16:53AM +, Ian Jackson wrote: >> Jim Fehlig writes ("[PATCH] xenstore: increase default thread stack size to >> 32k"): >>> On several Skylake machines I've observed xl segfaults when running >>> create or destroy subcommand

  1   2   >