[Xen-devel] [PATCH v6 12/12] xen: make grant table limits boot parameters dom0 only

2017-09-13 Thread Juergen Gross
The boot parameters gnttab_max_frames and gnttab_max_maptrack_frames are used for dom0 only now, as all other domains require a XEN_DOMCTL_set_gnttab_limits call now. So make that explicit by setting the boot values for dom0 only. Signed-off-by: Juergen Gross <jgr...@suse.com> --- xen/ar

[Xen-devel] [PATCH v6 09/12] xen: delay allocation of grant table sub structures

2017-09-13 Thread Juergen Gross
Delay the allocation of the grant table sub structures in order to allow modifying parameters needed for sizing of these structures at a per domain basis. Either do it from gnttab_grow_table() or just before the domain is started the first time. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v6 01/12] xen: correct gnttab_get_status_frames()

2017-09-13 Thread Juergen Gross
In gnttab_get_status_frames() all accesses to nr_status_frames should be done with the grant table lock held. While at it correct coding style: labels should be indented by one space. Signed-off-by: Juergen Gross <jgr...@suse.com> --- xen/common/grant_table.c | 15 ---

Re: [Xen-devel] [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality

2017-09-13 Thread Juergen Gross
On 13/09/17 15:50, Boris Ostrovsky wrote: > On 09/13/2017 09:38 AM, Juergen Gross wrote: >> On 13/09/17 15:22, Boris Ostrovsky wrote: >>> On 09/12/2017 02:18 PM, Juergen Gross wrote: >>>> On 12/09/17 18:21, Boris Ostrovsky wrote: >>>>> On 09/12/2017 1

Re: [Xen-devel] [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality

2017-09-13 Thread Juergen Gross
On 13/09/17 15:22, Boris Ostrovsky wrote: > On 09/12/2017 02:18 PM, Juergen Gross wrote: >> On 12/09/17 18:21, Boris Ostrovsky wrote: >>> On 09/12/2017 12:09 PM, Juergen Gross wrote: >>>> On 12/09/17 18:05, Boris Ostrovsky wrote: >>>>> On 09/12/2017 1

Re: [Xen-devel] USB passthrough with Xen on ARM

2017-09-13 Thread Juergen Gross
On 13/09/17 12:48, Julien Grall wrote: > > > On 09/13/2017 11:42 AM, Juergen Gross wrote: >> On 13/09/17 12:33, Roger Quadros wrote: >>> I resolved this issue by backporting the xen-hcd kernel patches to >>> v3.14 and running the v3.14 >>> kernel in

Re: [Xen-devel] USB passthrough with Xen on ARM

2017-09-13 Thread Juergen Gross
On 13/09/17 12:33, Roger Quadros wrote: > Hi, > > > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki > > On 12/09/17 18:28, Juergen Gross wrote: >> On 12/09/17 17:08, Julien Grall wrote:

Re: [Xen-devel] [PATCH v9 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

2017-09-13 Thread Juergen Gross
gt; Cc: xen-de...@lists.xenproject.org > Cc: boris.ostrov...@oracle.com > Cc: Juergen Gross <jgr...@suse.com> Regarding the changes below: Acked-by: Juergen Gross <jgr...@suse.com> Juergen > --- > arch/x86/xen/enlighten_pv.c | 1 + > 1 file changed, 1 insertion(+) > &

Re: [Xen-devel] [PATCH 4/4] xen: select grant interface version

2017-09-13 Thread Juergen Gross
On 12/09/17 20:54, Andrew Cooper wrote: > On 08/09/17 15:48, Juergen Gross wrote: >> static void gnttab_request_version(void) >> { >> -int rc; >> +long rc; >> struct gnttab_set_version gsv; >> >> -gsv.version = 1; >> +rc =

Re: [Xen-devel] [PATCH] build: propagate runstatedir

2017-09-13 Thread Juergen Gross
On 13/09/17 10:52, Wei Liu wrote: > Debian Stretch's autoconf has a new variable called runstatedir. Add > that to Paths.mk.in. > > Signed-off-by: Wei Liu You did think of https://lists.xen.org/archives/html/xen-devel/2017-02/msg01883.html I suppose? Juergen > --- >

Re: [Xen-devel] [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality

2017-09-12 Thread Juergen Gross
On 12/09/17 18:21, Boris Ostrovsky wrote: > On 09/12/2017 12:09 PM, Juergen Gross wrote: >> On 12/09/17 18:05, Boris Ostrovsky wrote: >>> On 09/12/2017 11:50 AM, Juergen Gross wrote: >>>> On 12/09/17 17:44, Boris Ostrovsky wrote: >>>>>

Re: [Xen-devel] [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality

2017-09-12 Thread Juergen Gross
On 12/09/17 18:05, Boris Ostrovsky wrote: > On 09/12/2017 11:50 AM, Juergen Gross wrote: >> On 12/09/17 17:44, Boris Ostrovsky wrote: >>> On 09/08/2017 10:48 AM, Juergen Gross wrote: >>>> As there is currently no user for sub-page grants or transient grants

Re: [Xen-devel] [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality

2017-09-12 Thread Juergen Gross
On 12/09/17 17:44, Boris Ostrovsky wrote: > On 09/08/2017 10:48 AM, Juergen Gross wrote: >> As there is currently no user for sub-page grants or transient grants >> remove that functionality. This at once makes it possible to switch >> from grant v2 to grant v1

Re: [Xen-devel] [PATCH 1/4] xen: re-introduce support for grant v2 interface

2017-09-12 Thread Juergen Gross
On 12/09/17 17:41, Boris Ostrovsky wrote: > >> +int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes, >> + unsigned long max_nr_gframes, >> + grant_status_t **__shared) >> +{ >> +grant_status_t *shared = *__shared; >> +unsigned

Re: [Xen-devel] USB passthrough with Xen on ARM

2017-09-12 Thread Juergen Gross
n Grall wrote: >>> Hi, >>> >>> On 12/09/17 11:00, Juergen Gross wrote: >>>> On 12/09/17 10:13, Roger Quadros wrote: >>>>> Hi, >>>>> >>>>> I'm running Xen v4.9 on DRA7 (OMAP5/ArmV7) with Linux kernel v3.14 >>

Re: [Xen-devel] USB passthrough with Xen on ARM

2017-09-12 Thread Juergen Gross
On 12/09/17 12:52, Roger Quadros wrote: > > > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki > > On 12/09/17 13:00, Juergen Gross wrote: >> On 12/09/17 10:13, Roger Quadros wrote: >>

Re: [Xen-devel] USB passthrough with Xen on ARM

2017-09-12 Thread Juergen Gross
On 12/09/17 10:13, Roger Quadros wrote: > Hi, > > I'm running Xen v4.9 on DRA7 (OMAP5/ArmV7) with Linux kernel v3.14 (yikes!!) > on dom0 and domU. > I'm struggling to get USB passthrough working using pvUSB. > > My domU config file contains >usb = 1 >usbctrl =

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-09-11 Thread Juergen Gross
On 11/09/17 19:01, George Dunlap wrote: > Add a machine-readable file to describe what features are in what > state of being 'supported', as well as information about how long this > release will be supported, and so on. > > The document should be formatted using "semantic newlines" [1], to make

Re: [Xen-devel] [PATCH v5 3/8] xen: delay allocation of grant table sub structures

2017-09-11 Thread Juergen Gross
On 11/09/17 13:02, Jan Beulich wrote: On 11.09.17 at 11:39, wrote: >> On 11/09/17 11:23, Jan Beulich wrote: >> On 11.09.17 at 11:03, wrote: On 08/09/17 17:28, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: > And if

Re: [Xen-devel] [PATCH v5 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-11 Thread Juergen Gross
On 11/09/17 13:14, Jan Beulich wrote: On 11.09.17 at 12:48, wrote: >> On 08/09/17 17:55, Jan Beulich wrote: >> On 08.09.17 at 08:56, wrote: --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -3667,6 +3667,32 @@ void

Re: [Xen-devel] [PATCH v5 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-11 Thread Juergen Gross
On 08/09/17 17:55, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -3667,6 +3667,32 @@ void grant_table_init_vcpu(struct vcpu *v) >> v->maptrack_tail = MAPTRACK_TAIL; >> } >> >> +int

Re: [Xen-devel] [PATCH v5 5/8] xen: double default grant frame limit for huge hosts

2017-09-11 Thread Juergen Gross
On 08/09/17 17:48, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -3824,8 +3824,15 @@ static int __init gnttab_usage_init(void) >> { >> BUILD_BUG_ON(DEFAULT_MAX_MAPTRACK_FRAMES <

Re: [Xen-devel] [PATCH v5 4/8] xen: make grant resource limits per domain

2017-09-11 Thread Juergen Gross
On 08/09/17 17:44, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: >> @@ -1843,6 +1838,14 @@ gnttab_setup_table( >> gt = d->grant_table; >> grant_write_lock(gt); >> >> +if ( unlikely(op.nr_frames > gt->max_grant_frames) ) >> +{ >> +

Re: [Xen-devel] [PATCH v5 3/8] xen: delay allocation of grant table sub structures

2017-09-11 Thread Juergen Gross
On 11/09/17 11:23, Jan Beulich wrote: On 11.09.17 at 11:03, wrote: >> On 08/09/17 17:28, Jan Beulich wrote: >> On 08.09.17 at 08:56, wrote: >>> And if you special case Dom0, >>> wouldn't it be better to (also) special case the hardware domain >>> (in

Re: [Xen-devel] [PATCH v5 3/8] xen: delay allocation of grant table sub structures

2017-09-11 Thread Juergen Gross
On 08/09/17 17:28, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: >> Delay the allocation of the grant table sub structures in order to >> allow modifying parameters needed for sizing of these structures at a >> per domain basis. Either do it from gnttab_setup_table() or

Re: [Xen-devel] [PATCH v5 2/8] xen: clean up grant_table.h

2017-09-11 Thread Juergen Gross
On 08/09/17 17:00, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -40,6 +40,44 @@ >> #include >> #include >> >> +/* Per-domain grant information. */ >> +struct grant_table { >> +/* >> +

[Xen-devel] [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality

2017-09-08 Thread Juergen Gross
-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/grant-table.c | 138 -- include/xen/grant_table.h | 25 - 2 files changed, 163 deletions(-) diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 65c4bdb0b463..02451a

[Xen-devel] [PATCH 4/4] xen: select grant interface version

2017-09-08 Thread Juergen Gross
Based on the maximum page number of the host select either grant v1 or grant v2. For testing purposes add a way to specify the grant interface version via a boot parameter. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/grant-table.c | 13 +++-- 1 file chang

[Xen-devel] [PATCH 3/4] xen: add grant interface version dependent constants to gnttab_ops

2017-09-08 Thread Juergen Gross
Instead of having multiple variables with constants like grant_table_version or grefs_per_grant_frame add those to struct gnttab_ops and access them just via the gnttab_interface pointer. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/grant-table.

[Xen-devel] [PATCH 1/4] xen: re-introduce support for grant v2 interface

2017-09-08 Thread Juergen Gross
s machines with more than 16TB of memory are expected to be more common in the near future support of grant v2 is mandatory in order to be able to run a Xen pv domain at any memory location. So re-add grant v2 support basically by reverting above commit. Signed-off-by: Juergen Gross <jg

[Xen-devel] [PATCH 0/4] xen: grant table interface v2 support

2017-09-08 Thread Juergen Gross
der to support migration to hosts which only support v1. V2 is selected only in case the host has memory frames populated above the 16TB border. Juergen Gross (4): xen: re-introduce support for grant v2 interface xen: limit grant v2 interface to the v1 functionality xen: add grant interf

Re: [Xen-devel] [PATCH v5 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c

2017-09-08 Thread Juergen Gross
On 08/09/17 16:49, Jan Beulich wrote: On 08.09.17 at 08:56, wrote: >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -4631,40 +4631,19 @@ int xenmem_add_to_physmap_one( >> { >> struct page_info *page = NULL; >> unsigned long gfn = 0; /* gcc ... */ >> -

[Xen-devel] [PATCH v5 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c

2017-09-08 Thread Juergen Gross
The x86 and arm versions of XENMAPSPACE_grant_table handling are nearly identical. Move the code into a function in grant_table.c and add an architecture dependant hook to handle the differences. Switch to mfn_t in order to be more type safe. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v5 2/8] xen: clean up grant_table.h

2017-09-08 Thread Juergen Gross
Many definitions can be moved from xen/grant_table.h to common/grant_table.c now, as they are no longer used in other sources. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Wei Liu <wei.l...@citrix.com&g

[Xen-devel] [PATCH v5 5/8] xen: double default grant frame limit for huge hosts

2017-09-08 Thread Juergen Gross
In case a system has memory above the 16TB boundary double the default grant frame number limit per domain. This ensures a pv domain can still establish the same number of grants even if it is required to use version 2 grants which need twice the space of v1 grants. Signed-off-by: Juergen Gross

[Xen-devel] [PATCH v5 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-08 Thread Juergen Gross
Add a domctl hypercall to set the domain's resource limits regarding grant tables. It is accepted only as long as neither gnttab_setup_table() has been called for the domain, nor the domain has started to run. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <

[Xen-devel] [PATCH v5 3/8] xen: delay allocation of grant table sub structures

2017-09-08 Thread Juergen Gross
Delay the allocation of the grant table sub structures in order to allow modifying parameters needed for sizing of these structures at a per domain basis. Either do it from gnttab_setup_table() or just before the domain is started the first time. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v5 4/8] xen: make grant resource limits per domain

2017-09-08 Thread Juergen Gross
. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- V3: - correct error message (Paul Durrant) --- xen/common/grant_table.c | 82 ++--

[Xen-devel] [PATCH v5 7/8] libxc: add libxc support for setting grant table resource limits

2017-09-08 Thread Juergen Gross
Add a new libxc function xc_domain_set_gnttbl_limits() setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Acked-by: Wei Liu <wei.

[Xen-devel] [PATCH v5 8/8] libxl: add libxl support for setting grant table resource limits

2017-09-08 Thread Juergen Gross
Add new domain config items for setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Acked-by: Wei Liu <wei.l...@citrix.com>

[Xen-devel] [PATCH v5 0/8] xen: better grant v2 support

2017-09-08 Thread Juergen Gross
) - patch 6: rename *gnttbl* to *gnttab* (Paul Durrant) Changes in V2: - add per-domain grant limits instead of different v1 and v2 limits - double default limit for huge hosts Juergen Gross (8): xen: move XENMAPSPACE_grant_table code into grant_table.c xen: clean up grant_table.h xen: delay

Re: [Xen-devel] [BUG] PV domU Arch Linux kernel 4.12 with CONFIG_INTEL_ATOMISP=y guest crashes

2017-09-07 Thread Juergen Gross
On 08/09/17 05:40, John Thomson wrote: > Hi, > I get a PV domU kernel crash booting Arch Linux 4.12. > > Not sure if this is more relevant to Xen, the Linux kernel or > distributions. > > Running xen-4.9.0 on Arch Linux x86_64 with kernel 4.12.10. > Booting UEFI -> grub2 -> linux -> reboot ->

Re: [Xen-devel] [PATCH v4 08/12] x86/hvm/ioreq: maintain an array of ioreq servers rather than a list

2017-09-07 Thread Juergen Gross
On 07/09/17 16:41, Roger Pau Monné wrote: > On Tue, Sep 05, 2017 at 12:37:12PM +0100, Paul Durrant wrote: >> A subsequent patch will remove the current implicit limitation on creation >> of ioreq servers which is due to the allocation of gfns for the ioreq >> structures and buffered ioreq ring. >>

[Xen-devel] [PATCH v4 4/8] xen: make grant resource limits per domain

2017-09-07 Thread Juergen Gross
. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- V3: - correct error message (Paul Durrant) --- xen/common/grant_table.c | 82 ++--

[Xen-devel] [PATCH v4 8/8] libxl: add libxl support for setting grant table resource limits

2017-09-07 Thread Juergen Gross
Add new domain config items for setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> --- V4: - rename configuration items to use max_ prefi

[Xen-devel] [PATCH v4 0/8] xen: better grant v2 support

2017-09-07 Thread Juergen Gross
instead of different v1 and v2 limits - double default limit for huge hosts Juergen Gross (8): xen: move XENMAPSPACE_grant_table code into grant_table.c xen: clean up grant_table.h xen: delay allocation of grant table sub structures xen: make grant resource limits per domain xen: double

[Xen-devel] [PATCH v4 2/8] xen: clean up grant_table.h

2017-09-07 Thread Juergen Gross
Many definitions can be moved from xen/grant_table.h to common/grant_table.c now, as they are no longer used in other sources. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Wei Liu <wei.l...@citrix.com&g

[Xen-devel] [PATCH v4 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c

2017-09-07 Thread Juergen Gross
The x86 and arm versions of XENMAPSPACE_grant_table handling are nearly identical. Move the code into a function in grant_table.c and add an architecture dependant hook to handle the differences. Switch to mfn_t in order to be more type safe. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v4 3/8] xen: delay allocation of grant table sub structures

2017-09-07 Thread Juergen Gross
Delay the allocation of the grant table sub structures in order to allow modifying parameters needed for sizing of these structures at a per domain basis. Either do it from gnttab_setup_table() or just before the domain is started the first time. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v4 7/8] libxc: add libxc support for setting grant table resource limits

2017-09-07 Thread Juergen Gross
Add a new libxc function xc_domain_set_gnttbl_limits() setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Acked-by: Wei Liu <wei.

[Xen-devel] [PATCH v4 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-07 Thread Juergen Gross
Add a domctl hypercall to set the domain's resource limits regarding grant tables. It is accepted only as long as neither gnttab_setup_table() has been called for the domain, nor the domain has started to run. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <

[Xen-devel] [PATCH v4 5/8] xen: double default grant frame limit for huge hosts

2017-09-07 Thread Juergen Gross
In case a system has memory above the 16TB boundary double the default grant frame number limit per domain. This ensures a pv domain can still establish the same number of grants even if it is required to use version 2 grants which need twice the space of v1 grants. Signed-off-by: Juergen Gross

Re: [Xen-devel] [PATCH v3 8/8] libxl: add libxl support for setting grant table resource limits

2017-09-07 Thread Juergen Gross
On 07/09/17 11:02, Wei Liu wrote: > On Wed, Sep 06, 2017 at 02:46:53PM +0200, Juergen Gross wrote: >> Add new domain config items for setting the limits for the maximum >> numbers of grant table frames and maptrack frames of a domain. >> >> Signed-off-by: Jue

Re: [Xen-devel] [PATCH v3 7/8] libxc: add libxc support for setting grant table resource limits

2017-09-07 Thread Juergen Gross
On 07/09/17 10:55, Wei Liu wrote: > On Wed, Sep 06, 2017 at 02:46:52PM +0200, Juergen Gross wrote: >> Add a new libxc function xc_domain_set_gnttbl_limits() setting the >> limits for the maximum numbers of grant table frames and maptrack >> frames of a domain. >> >

[Xen-devel] [PATCH v3 2/2] paravirt, xen: correct xen_nopvspin case

2017-09-06 Thread Juergen Gross
r to avoid this disable the virt_spin_lock_key. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 25a7c4302ce7..e8ab80ad7a6f 100644 --- a/arch/x86/xen/spinlock.c ++

[Xen-devel] [PATCH v3 0/2] guard virt_spin_lock() with a static key

2017-09-06 Thread Juergen Gross
metal behavior. V3: - remove test for hypervisor environment from virt_spin_lock(9 as suggested by Waiman Long V2: - use static key instead of making virt_spin_lock() a pvops function Juergen Gross (2): paravirt/locks: use new static key for controlling call of virt_spin_lock() paravirt

[Xen-devel] [PATCH v3 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

2017-09-06 Thread Juergen Gross
static key controlling whether virt_spin_lock() should be called or not. When running on bare metal set the new key to false. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/qspinlock.h | 11 ++- arch/x86/kernel/paravirt-spinlocks.c | 6 ++ arch/x86/

Re: [Xen-devel] [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

2017-09-06 Thread Juergen Gross
On 06/09/17 18:13, Waiman Long wrote: > On 09/06/2017 12:04 PM, Peter Zijlstra wrote: >> On Wed, Sep 06, 2017 at 11:49:49AM -0400, Waiman Long wrote: #define virt_spin_lock virt_spin_lock static inline bool virt_spin_lock(struct qspinlock *lock) { + if

[Xen-devel] [GIT PULL] xen: fixes and features for 4.14

2017-09-06 Thread Juergen Gross
of __WARN() Arvind Yadav (1): xen-platform: constify pci_device_id. Boris Ostrovsky (1): xen: Don't try to call xen_alloc_p2m_entry() on autotranslating guests Juergen Gross (4): xen: cleanup xen.h xen: remove tests for pvh mode in pure pv paths xen: remove unused

Re: [Xen-devel] [PATCH v3 3/8] xen: delay allocation of grant table sub structures

2017-09-06 Thread Juergen Gross
On 06/09/17 17:32, Wei Liu wrote: > On Wed, Sep 06, 2017 at 05:15:46PM +0200, Juergen Gross wrote: >>>> +grant_table_init(struct domain *d) >>>> +{ >>>> +struct grant_table *gt = d->grant_table; >>>> +unsigned int i, j; >>>

[Xen-devel] [PATCH v2 0/2] guard virt_spin_lock() with a static key

2017-09-06 Thread Juergen Gross
metal behavior. V2: - use static key instead of making virt_spin_lock() a pvops function Juergen Gross (2): paravirt/locks: use new static key for controlling call of virt_spin_lock() paravirt,xen: correct xen_nopvspin case arch/x86/include/asm/qspinlock.h | 11 +++ arch/x86

[Xen-devel] [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

2017-09-06 Thread Juergen Gross
static key controlling whether virt_spin_lock() should be called or not. When running on bare metal set the new key to false. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/qspinlock.h | 11 +++ arch/x86/kernel/paravirt-spinlocks.c | 6 ++ arch/x86/

[Xen-devel] [PATCH v2 2/2] paravirt, xen: correct xen_nopvspin case

2017-09-06 Thread Juergen Gross
r to avoid this disable the virt_spin_lock_key. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 25a7c4302ce7..e8ab80ad7a6f 100644 --- a/arch/x86/xen/spinlock.c ++

Re: [Xen-devel] [PATCH v3 3/8] xen: delay allocation of grant table sub structures

2017-09-06 Thread Juergen Gross
On 06/09/17 17:11, Wei Liu wrote: > On Wed, Sep 06, 2017 at 02:46:48PM +0200, Juergen Gross wrote: >> diff --git a/xen/common/domain.c b/xen/common/domain.c >> index 5aebcf265f..11eb1778a3 100644 >> --- a/xen/common/domain.c >> +++ b/xen/common/domain.c >>

[Xen-devel] [PATCH v3 8/8] libxl: add libxl support for setting grant table resource limits

2017-09-06 Thread Juergen Gross
Add new domain config items for setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/man/xl.cfg.pod.5.in| 15 +++ tools/libxl/libxl.h | 6 ++ tools/libxl/libxl

[Xen-devel] [PATCH v3 3/8] xen: delay allocation of grant table sub structures

2017-09-06 Thread Juergen Gross
Delay the allocation of the grant table sub structures in order to allow modifying parameters needed for sizing of these structures at a per domain basis. Either do it from gnttab_setup_table() or just before the domain is started the first time. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v3 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-06 Thread Juergen Gross
Add a domctl hypercall to set the domain's resource limits regarding grant tables. It is accepted only as long as neither gnttab_setup_table() has been called for the domain, nor the domain has started to run. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V3: - rename *gnttbl* to *

[Xen-devel] [PATCH v3 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c

2017-09-06 Thread Juergen Gross
The x86 and arm versions of XENMAPSPACE_grant_table handling are nearly identical. Move the code into a function in grant_table.c and add an architecture dependant hook to handle the differences. Switch to mfn_t in order to be more type safe. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v3 7/8] libxc: add libxc support for setting grant table resource limits

2017-09-06 Thread Juergen Gross
Add a new libxc function xc_domain_set_gnttbl_limits() setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> --- tools/libxc/include/xenctrl.h | 14 ++ tools/libxc/xc_domain.c

[Xen-devel] [PATCH v3 2/8] xen: clean up grant_table.h

2017-09-06 Thread Juergen Gross
Many definitions can be moved from xen/grant_table.h to common/grant_table.c now, as they are no longer used in other sources. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Wei Liu <wei.l...@citrix.com&g

[Xen-devel] [PATCH v3 0/8] xen: better grant v2 support

2017-09-06 Thread Juergen Gross
4: correct error message (Paul Durrant) - patch 6: rename *gnttbl* to *gnttab* (Paul Durrant) Changes in V2: - add per-domain grant limits instead of different v1 and v2 limits - double default limit for huge hosts Juergen Gross (8): xen: move XENMAPSPACE_grant_table code into grant_table.c

[Xen-devel] [PATCH v3 4/8] xen: make grant resource limits per domain

2017-09-06 Thread Juergen Gross
. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> --- V3: - correct error message (Paul Durrant) --- xen/common/grant_table.c | 82 ++-- 1 file changed, 45 insertions(+), 37 deletions(-) diff

[Xen-devel] [PATCH v3 5/8] xen: double default grant frame limit for huge hosts

2017-09-06 Thread Juergen Gross
In case a system has memory above the 16TB boundary double the default grant frame number limit per domain. This ensures a pv domain can still establish the same number of grants even if it is required to use version 2 grants which need twice the space of v1 grants. Signed-off-by: Juergen Gross

Re: [Xen-devel] [PATCH] xen-blkfront: emit KOBJ_OFFLINE uevent when detaching device

2017-09-06 Thread Juergen Gross
On 05/09/17 09:28, Vincent Legout wrote: > Hello, > > Sorry for such a long delay. I'm still interested in having this patch > merged. > > I've tried to make the patch more generic and move it to xenbus as > discussed during the Xen summit, but I'm not sure how or if it's > possible. Would doing

Re: [Xen-devel] [PATCH v2 2/8] xen: clean up grant_table.h

2017-09-06 Thread Juergen Gross
On 06/09/17 12:11, Wei Liu wrote: > On Wed, Sep 06, 2017 at 10:26:26AM +0200, Juergen Gross wrote: >> +struct grant_table { >> +/* >> + * Lock protecting updates to grant table state (version, active >> + * entry list, etc.) >> + */ &

Re: [Xen-devel] [PATCH v2 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-06 Thread Juergen Gross
On 06/09/17 11:17, Paul Durrant wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of >> Juergen Gross >> Sent: 06 September 2017 09:27 >> To: xen-devel@lists.xen.org >> Cc: Juergen Gross <jgr...@sus

Re: [Xen-devel] [PATCH v2 4/8] xen: make grant resource limits per domain

2017-09-06 Thread Juergen Gross
On 06/09/17 11:10, Paul Durrant wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of >> Juergen Gross >> Sent: 06 September 2017 09:26 >> To: xen-devel@lists.xen.org >> Cc: Juergen Gross <jgr...@sus

Re: [Xen-devel] [PATCH v2 3/8] xen: delay allocation of grant table sub structures

2017-09-06 Thread Juergen Gross
On 06/09/17 10:44, Paul Durrant wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of >> Juergen Gross >> Sent: 06 September 2017 09:26 >> To: xen-devel@lists.xen.org >> Cc: Juergen Gross <jgr...@sus

Re: [Xen-devel] [PATCH v2 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c

2017-09-06 Thread Juergen Gross
On 06/09/17 10:34, Paul Durrant wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of >> Juergen Gross >> Sent: 06 September 2017 09:26 >> To: xen-devel@lists.xen.org >> Cc: Juergen Gross <jgr...@sus

[Xen-devel] [PATCH v2 8/8] libxl: add libxl support for setting grant table resource limits

2017-09-06 Thread Juergen Gross
Add new domain config items for setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/man/xl.cfg.pod.5.in| 15 +++ tools/libxl/libxl.h | 6 ++ tools/libxl/libxl

[Xen-devel] [PATCH v2 3/8] xen: delay allocation of grant table sub structures

2017-09-06 Thread Juergen Gross
Delay the allocation of the grant table sub structures in order to allow modifying parameters needed for sizing of these structures at a per domain basis. Either do it from gnttab_setup_table() or just before the domain is started the first time. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v2 0/8] xen: better grant v2 support

2017-09-06 Thread Juergen Gross
regarding grant limits. Additionally the default limit of grant frames is doubled in case of hosts with memory above the 16TB border. Changes in V2: - add per-domain grant limits instead of different v1 and v2 limits - double default limit for huge hosts Juergen Gross (8): xen: move

[Xen-devel] [PATCH v2 6/8] xen: add new domctl hypercall to set grant table resource limits

2017-09-06 Thread Juergen Gross
Add a domctl hypercall to set the domain's resource limits regarding grant tables. It is accepted only as long as neither gnttab_setup_table() has been called for the domain, nor the domain has started to run. Signed-off-by: Juergen Gross <jgr...@suse.com> --- tools/flask/policy/modules/d

[Xen-devel] [PATCH v2 2/8] xen: clean up grant_table.h

2017-09-06 Thread Juergen Gross
Many definitions can be moved from xen/grant_table.h to common/grant_table.c now, as they are no longer used in other sources. Signed-off-by: Juergen Gross <jgr...@suse.com> --- xen/common/grant_table.c | 81 +++-- xen/include/xen/grant_table.

[Xen-devel] [PATCH v2 5/8] xen: double default grant frame limit for huge hosts

2017-09-06 Thread Juergen Gross
In case a system has memory above the 16TB boundary double the default grant frame number limit per domain. This ensures a pv domain can still establish the same number of grants even if it is required to use version 2 grants which need twice the space of v1 grants. Signed-off-by: Juergen Gross

[Xen-devel] [PATCH v2 7/8] libxc: add libxc support for setting grant table resource limits

2017-09-06 Thread Juergen Gross
Add a new libxc function xc_domain_set_gnttbl_limits() setting the limits for the maximum numbers of grant table frames and maptrack frames of a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> --- tools/libxc/include/xenctrl.h | 14 ++ tools/libxc/xc_domain.c

[Xen-devel] [PATCH v2 4/8] xen: make grant resource limits per domain

2017-09-06 Thread Juergen Gross
. Signed-off-by: Juergen Gross <jgr...@suse.com> --- xen/common/grant_table.c | 83 +++- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index b50c334f70..ae5f1262e8 100644 --- a/xen/

[Xen-devel] [PATCH v2 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c

2017-09-06 Thread Juergen Gross
-off-by: Juergen Gross <jgr...@suse.com> --- V2: - rebased to staging --- xen/arch/arm/mm.c | 36 -- xen/arch/x86/mm.c | 41 ++- xen/common/grant_table.c

Re: [Xen-devel] [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
On 05/09/17 16:31, Waiman Long wrote: > On 09/05/2017 10:24 AM, Waiman Long wrote: >> On 09/05/2017 10:18 AM, Juergen Gross wrote: >>> On 05/09/17 16:10, Waiman Long wrote: >>>> On 09/05/2017 09:24 AM, Juergen Gross wrote: >>>>> There are cases where a

Re: [Xen-devel] [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
On 05/09/17 16:10, Waiman Long wrote: > On 09/05/2017 09:24 AM, Juergen Gross wrote: >> There are cases where a guest tries to switch spinlocks to bare metal >> behavior (e.g. by setting "xen_nopvspin" boot parameter). Today this >> has the downside of falling bac

Re: [Xen-devel] [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
On 05/09/17 15:55, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 03:24:43PM +0200, Juergen Gross wrote: >> diff --git a/arch/x86/include/asm/qspinlock.h >> b/arch/x86/include/asm/qspinlock.h >> index 48a706f641f2..fbd98896385c 100644 >> --- a/arch/x86/include/asm/qs

[Xen-devel] [PATCH 4/4] paravirt,xen: correct xen_nopvspin case

2017-09-05 Thread Juergen Gross
d this set the virt_spin_lock pvops function to _paravirt_false() in case xen_nopvspin has been specified. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c in

[Xen-devel] [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
ent. Make virt_spin_lock() a paravirt operation in order to enable users to select an explicit behavior like bare metal. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt.h | 5 arch/x86/include/asm/paravirt_types.h | 1 + arch/x86/include/asm/qspin

[Xen-devel] [PATCH 1/4] paravirt: add generic _paravirt_false() function

2017-09-05 Thread Juergen Gross
Add a _paravirt_false() default function returning always false which can be used for cases where a boolean pvops replacement should just say "no". Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt_types.h | 2 ++ arch/x86/kernel/paravirt.

[Xen-devel] [PATCH 0/4] make virt_spin_lock() a pvops function

2017-09-05 Thread Juergen Gross
behavior. Juergen Gross (4): paravirt: add generic _paravirt_false() function paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal paravirt: add virt_spin_lock pvops function paravirt,xen: correct xen_nopvspin case arch/x86/include/asm/paravirt.h | 5 arch

[Xen-devel] [PATCH 2/4] paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal

2017-09-05 Thread Juergen Gross
Instead of special casing pv_lock_ops.vcpu_is_preempted when patching use _paravirt_false() on bare metal. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/kernel/paravirt-spinlocks.c | 14 +- arch/x86/kernel/paravirt_patch_32.c | 10 -- arch/x86/

[Xen-devel] [PATCH] x86/paravirt: remove no longer used paravirt functions

2017-09-04 Thread Juergen Gross
With removal of lguest some of the paravirt functions are no longer needed. Remove them. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/desc.h | 3 +-- arch/x86/include/asm/paravirt.h | 37 --- arch/x86/inclu

Re: [Xen-devel] [PATCH 1/1] x86/xen: fix section of xen_init_time_ops() in header

2017-09-04 Thread Juergen Gross
On 03/09/17 10:38, Nicolas Iooss wrote: > Commit d162809f85b4 ("xen/x86: Do not call xen_init_time_ops() until > shared_info is initialized") moved xen_init_time_ops() from __init to > __ref without updating xen-ops.h accordingly. Fix this. > > Fixes: d162809f85b4 ("xen/x86: Do not call

[Xen-devel] [PATCH v5] xen: get rid of paravirt op adjust_exception_frame

2017-08-31 Thread Juergen Gross
use the exception entry with prepended instructions, otherwise use the entry without the Xen specific code. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/entry/entry_64.S | 23 ++-- arch/x86/entry/entry_64_compat.S | 1 - arch/x86/include/asm/para

Re: [Xen-devel] linux-next: manual merge of the xen-tip tree with the tip tree

2017-08-31 Thread Juergen Gross
On 31/08/17 16:01, Boris Ostrovsky wrote: > On 08/31/2017 08:00 AM, Thomas Gleixner wrote: >> On Thu, 31 Aug 2017, Juergen Gross wrote: >>>> I've applied it on top of tip:x86/apic and fixed up the merge conflicts >>>> mindlessly. Patch below. >>>>

<    1   2   3   4   5   6   7   8   9   10   >