Re: [Xen-devel] [PATCH][tip] x86/paravirt: Make the virt_spin_lock_key setup after jump_label_init()

2017-10-29 Thread Juergen Gross
On 28/10/17 12:55, Borislav Petkov wrote: > On Fri, Oct 27, 2017 at 07:25:04PM +0200, Juergen Gross wrote: >>>> This is assuming CPU 0 is the boot cpu. I think you want >>>> boot_cpu_data.cpu_index here or whatever is used on xen to identify the >>>>

Re: [Xen-devel] [BUG] xen_gntdev - gntdev_vma_find_special_page - unable to handle kernel paging request

2017-10-28 Thread Juergen Gross
On 28/10/17 09:34, Arthur Borsboom wrote: > Hi Juergen, > > I have noticed that a patch has been developed an awaits the upcoming > Linux kernel 4.14, maybe 4.15. > In the mean time the server keeps crashing about every 2 days. > > Do you know a workaround I can apply? Depends on why this

[Xen-devel] [PATCH v2] xen: support 52 bit physical addresses in pv guests

2017-10-27 Thread Juergen Gross
reading/writing a MFN from/to a pte don't use the kernel's PTE_PFN_MASK but a new XEN_PTE_MFN_MASK allowing full 40 bit wide MFNs. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V2: - use __sme_clr() to clear any SME bit from MFN (Boris Ostrovsky) --- arch/x86/include/asm/xen/page.

Re: [Xen-devel] [PATCH][tip] x86/paravirt: Make the virt_spin_lock_key setup after jump_label_init()

2017-10-27 Thread Juergen Gross
l result in a WARN(). > > Move the native_pv_lock_init() into xx_smp_prepare_cpus(). Make the > setup later to avoid the WARN(). > > Reported-by: Juergen Gross <jgr...@suse.com> > Suggested-by: Juergen Gross <jgr...@suse.com> > Signed-off-by: Dou Liyang <douly.f...@cn.fuji

Re: [Xen-devel] [PATCH][tip] x86/paravirt: Make the virt_spin_lock_key setup after jump_label_init()

2017-10-27 Thread Juergen Gross
Use new static key for controlling >>> call of virt_spin_lock()") >>> >>> set the static virt_spin_lock_key to a value before jump_label_init() >>> has been called, which will result in a WARN(). >>> >>> Move the native_pv_lock_init() into

Re: [Xen-devel] [PATCH] tools/xenstored: Check number of strings passed to do_control()

2017-10-27 Thread Juergen Gross
ejecting all non-dom0 requests with > an EACCES). > > Testing: reproduced with the following command: > python -c 'print 16*"\x00"' | nc -U $XENSTORED_RUNDIR/socket > > Signed-off-by: Pawel Wieczorkiewicz <wipa...@amazon.de> > Reviewed-by: Martin Pohlack <mpohl

Re: [Xen-devel] [PATCH v3 1/1] xen/time: do not decrease steal time after live migration on xen

2017-10-27 Thread Juergen Gross
On 27/10/17 09:40, Dongli Zhang wrote: > Hi Juergen, > > On 10/27/2017 03:31 PM, Juergen Gross wrote: >> On 27/10/17 09:16, Dongli Zhang wrote: >>> Hi Boris, >>> >>> On 10/25/2017 11:12 PM, Boris Ostrovsky wrote: >>>> On 10/25/2017 02:45 AM

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

2017-10-27 Thread Juergen Gross
/xen/p2m.c| 2 +- drivers/xen/gntdev.c | 2 +- drivers/xen/xen-balloon.c | 19 +-- 4 files changed, 15 insertions(+), 9 deletions(-) Juergen Gross (3): xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap() xen: fix booting ballooned down hvm

Re: [Xen-devel] [PATCH v3 1/1] xen/time: do not decrease steal time after live migration on xen

2017-10-27 Thread Juergen Gross
On 27/10/17 09:16, Dongli Zhang wrote: > Hi Boris, > > On 10/25/2017 11:12 PM, Boris Ostrovsky wrote: >> On 10/25/2017 02:45 AM, Dongli Zhang wrote: >>> After guest live migration on xen, steal time in /proc/stat >>> (cpustat[CPUTIME_STEAL]) might decrease because steal returned by >>>

[Xen-devel] [PATCH v2] xen: fix booting ballooned down hvm guest

2017-10-26 Thread Juergen Gross
ot;xen/balloon: don't online new memory initially") Reported-by: Simon Gaiser <h...@ipsumj.de> Suggested-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/xen-balloon.c | 19 +-- 1 file changed,

Re: [Xen-devel] [PATCH v2] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-10-26 Thread Juergen Gross
On 24/10/17 12:09, Andrew Cooper wrote: > On 23/10/17 11:20, Juergen Gross wrote: >> On 06/10/17 15:30, Julien Grall wrote: >>> Hi, >>> >>> On 27/09/17 15:36, Wei Liu wrote: >>>> On Tue, Sep 26, 2017 at 02:02:56PM +0200, Juergen Gross wrote: >&g

[Xen-devel] [PATCH] xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap()

2017-10-25 Thread Juergen Gross
a little bit earlier. Cc: <sta...@vger.kernel.org> Reported-by: Arthur Borsboom <arthurborsb...@gmail.com> Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/gntdev.c b/drivers/

Re: [Xen-devel] [BUG] xen_gntdev - gntdev_vma_find_special_page - unable to handle kernel paging request

2017-10-25 Thread Juergen Gross
On 25/10/17 13:17, Arthur Borsboom wrote: > Since about a month, possibly due to software updates, after a couple of > days running several VMs, one of the VM guests crashes and the VM host > is not stable anymore. I need to shutdown all the remaining VM guests > (if possible) and reboot the

Re: [Xen-devel] [PATCH 10/13] x86/alternative: Support indirect call replacement

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Add alternative patching support for replacing an instruction with an > indirect call. This will be needed for the paravirt alternatives. > > Signed-off-by: Josh Poimboeuf > --- > arch/x86/kernel/alternative.c | 22

Re: [Xen-devel] [PATCH 09/13] x86/asm: Convert ALTERNATIVE*() assembler macros to preprocessor macros

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > The ALTERNATIVE() and ALTERNATIVE_2() macros are GNU assembler macros, > which makes them quite inflexible for future changes. Convert them to > preprocessor macros. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Revie

Re: [Xen-devel] [PATCH 08/13] x86/paravirt: Clean up paravirt_types.h

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Make paravirt_types.h more understandable: > > - Use more consistent and logical naming > - Simplify interfaces > - Put related macros together > - Improve whitespace > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com&g

Re: [Xen-devel] [PATCH 07/13] x86/paravirt: Simplify ____PVOP_CALL()

2017-10-25 Thread Juergen Gross
t;jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 06/13] x86/paravirt: Clean up paravirt-asm.h

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Some cleanup to make the code easier to read and understand: > > - Use the common "PV_" prefix > - Simplify the PV_SITE macro interface > - Improve whitespace > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com

Re: [Xen-devel] [PATCH 05/13] x86/paravirt: Move paravirt asm macros to paravirt-asm.h

2017-10-25 Thread Juergen Gross
hat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 04/13] x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntax

2017-10-25 Thread Juergen Gross
sm syntax so the NATIVE_* macros can be shared more > broadly. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros

2017-10-25 Thread Juergen Gross
'%' characters instead of one when specifying > a register name. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Mind adding another patch to merge the now nearly identical paravirt_patch_32.c and paravirt_patch_64.c either

Re: [Xen-devel] [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Some of the paravirt '*_CLOBBERS' macros refer to output constraints > instead of clobbers, which makes the code extra confusing. Rename the > output constraint related macros to '*_OUTPUTS'. > > Signed-off-by: Josh Poimboeuf I'm

Re: [Xen-devel] [PATCH for-4.10 v2 0/5] tools/dombuilder: Fixes and improvements to grant handling

2017-10-25 Thread Juergen Gross
On 24/10/17 18:06, Julien Grall wrote: > Hi, > > I think this is 4.10 material (particularly patch #5). Juergen, would it > be possible get the some feedback on this series? Patch 5: Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen > > Cheers, > > On 12/10

Re: [Xen-devel] [PATCH] xen: fix booting ballooned down hvm guest

2017-10-24 Thread Juergen Gross
On 24/10/17 16:59, HW42 wrote: > Juergen Gross: >> On 24/10/17 16:56, Boris Ostrovsky wrote: >>> On 10/24/2017 10:41 AM, Juergen Gross wrote: >>>> On 24/10/17 16:33, Boris Ostrovsky wrote: >>>>> On 10/24/2017 04:10 AM, Juergen Gross wrote: >>&

Re: [Xen-devel] [PATCH] xen: fix booting ballooned down hvm guest

2017-10-24 Thread Juergen Gross
On 24/10/17 16:56, Boris Ostrovsky wrote: > On 10/24/2017 10:41 AM, Juergen Gross wrote: >> On 24/10/17 16:33, Boris Ostrovsky wrote: >>> On 10/24/2017 04:10 AM, Juergen Gross wrote: >>>> Commit 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don

Re: [Xen-devel] [PATCH] xen: fix booting ballooned down hvm guest

2017-10-24 Thread Juergen Gross
On 24/10/17 16:33, Boris Ostrovsky wrote: > On 10/24/2017 04:10 AM, Juergen Gross wrote: >> Commit 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don't >> online new memory initially") introduced a regression when booting a >> HVM domain with me

Re: [Xen-devel] [PATCH 01/13] x86/paravirt: remove wbinvd() paravirt interface

2017-10-24 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Since lguest was removed, only the native version of wbinvd() is used. > The paravirt interface is no longer needed. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr..

[Xen-devel] [PATCH] xen: fix booting ballooned down hvm guest

2017-10-24 Thread Juergen Gross
ot;xen/balloon: don't online new memory initially") Suggested-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/xen-balloon.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/d

Re: [Xen-devel] [PATCH v3] xen/balloon: don't online new memory initially

2017-10-24 Thread Juergen Gross
On 03/10/17 23:33, Boris Ostrovsky wrote: > On 10/02/2017 05:37 PM, HW42 wrote: >> Juergen Gross: >>> When setting up the Xenstore watch for the memory target size the new >>> watch will fire at once. Don't try to reach the configured target size >>>

Re: [Xen-devel] [PATCH v2] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-10-23 Thread Juergen Gross
On 06/10/17 15:30, Julien Grall wrote: > Hi, > > On 27/09/17 15:36, Wei Liu wrote: >> On Tue, Sep 26, 2017 at 02:02:56PM +0200, Juergen Gross wrote: >>> Long ago domains to be saved were limited to 1TB size due to the >>> migration stream v1 limitations which us

[Xen-devel] [GIT PULL] xen: fix for 4.14-rc6

2017-10-20 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.14c-rc6-tag xen: fix for 4.14-rc6 It contains a fix for the Xen pv network drivers (frontend and backend) avoiding the network connection to become unusable due to an illegal MTU.

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

2017-10-13 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.14c-rc5-tag xen: fixes for 4.14 rc5 It contains a minor fix correcting the cpu hotplug name for Xen guests. Thanks. Juergen arch/x86/xen/enlighten.c | 4 ++-- 1 file changed, 2

Re: [Xen-devel] [PATCH] MAINTAINERS: update entries to new email address.

2017-10-06 Thread Juergen Gross
<raist...@linux.it> Acked-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] Xen PVH support in grub2

2017-09-29 Thread Juergen Gross
On 29/09/17 17:24, Roger Pau Monné wrote: > On Fri, Sep 29, 2017 at 02:46:53PM +0000, Juergen Gross wrote: >> I'm thinking about to add support for Xen PVH guests to grub2. >> >> Basically I see two options how to do it: >> >> a) add PVH support to curre

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

2017-09-29 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.14c-rc3-tag xen: fixes for 4.14-rc3 It contains 3 fixes: - avoid a warning when compiling with clang - consider read-only bits in xen-pciback when writing to a BAR - fix a boot

[Xen-devel] Xen PVH support in grub2

2017-09-29 Thread Juergen Gross
I'm thinking about to add support for Xen PVH guests to grub2. Basically I see two options how to do it: a) add PVH support to current grub.xen (both, 32- and 64-bit), in order to use the same grub binary for either pv-domains or pvh-domains b) create a new variant grub.xenpvh capable only

Re: [Xen-devel] [PATCH v3 1/2] xen/gnttab: Clean up goto tangle in grant_table_init()

2017-09-29 Thread Juergen Gross
.w...@oracle.com> > CC: Stefano Stabellini <sstabell...@kernel.org> > CC: Tim Deegan <t...@xen.org> > CC: Wei Liu <wei.l...@citrix.com> > CC: Juergen Gross <jgr...@suse.com> > --- > xen/common/grant_table.c | 39 +++---

[Xen-devel] [PATCH v2] xen: fail gnttab_grow_table() in case of missing allocations

2017-09-29 Thread Juergen Gross
-by: Juergen Gross <jgr...@suse.com> --- V2: - use gprintk() instead of gdprintk() (Roger Pau Monne) - let gnttab_grow_table() return an error code (Andrew Cooper) --- xen/common/grant_table.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/

Re: [Xen-devel] [PATCH] xen: fail gnttab_grow_table() in case of missing allocations

2017-09-29 Thread Juergen Gross
On 29/09/17 11:22, Andrew Cooper wrote: > On 29/09/17 10:02, Juergen Gross wrote: >> On 29/09/17 10:55, Roger Pau Monné wrote: >>> On Fri, Sep 29, 2017 at 05:39:22AM +0000, Juergen Gross wrote: >>>> In case gnttab_grow_table() is being called without grant_table_

Re: [Xen-devel] [PATCH] xen: fail gnttab_grow_table() in case of missing allocations

2017-09-29 Thread Juergen Gross
On 29/09/17 10:55, Roger Pau Monné wrote: > On Fri, Sep 29, 2017 at 05:39:22AM +0000, Juergen Gross wrote: >> In case gnttab_grow_table() is being called without grant_table_init() >> having been called for the domain, e.g. in case of a toolstack error, >> fail the functio

[Xen-devel] [PATCH] xen: fail gnttab_grow_table() in case of missing allocations

2017-09-28 Thread Juergen Gross
In case gnttab_grow_table() is being called without grant_table_init() having been called for the domain, e.g. in case of a toolstack error, fail the function instead of crashing the system. Signed-off-by: Juergen Gross <jgr...@suse.com> --- xen/common/grant_table.c | 6 +- 1 file chan

Re: [Xen-devel] Linux kernel tmem regression v4.1 -> v4.4

2017-09-28 Thread Juergen Gross
On 28/09/17 15:31, Juergen Gross wrote: > On 28/09/17 10:42, James Dingwall wrote: >> Hi, >> >> I am trying to migrate my domU instances from v4.1.44 to v4.4.88 and it >> seems that whether or not e820_host = 1 in the domU configuration is the >> cause of the foll

Re: [Xen-devel] [PATCH v11 0/3] xen: better grant v2 support

2017-09-28 Thread Juergen Gross
On 28/09/17 21:02, Andrew Cooper wrote: > On 28/09/17 11:02, Juergen Gross wrote: >> Currently Linux has no support for grant v2 as this would reduce the >> maximum number of active grants by a factor of 2 compared to v1, >> because the number of possible grants are limited

Re: [Xen-devel] [PATCH v10 07/11] xen: delay allocation of grant table sub structures

2017-09-28 Thread Juergen Gross
On 28/09/17 20:56, Andrew Cooper wrote: > On 25/09/17 11:00, Juergen Gross 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. Allocate the structures and

Re: [Xen-devel] Linux kernel tmem regression v4.1 -> v4.4

2017-09-28 Thread Juergen Gross
On 28/09/17 10:42, James Dingwall wrote: > Hi, > > I am trying to migrate my domU instances from v4.1.44 to v4.4.88 and it > seems that whether or not e820_host = 1 in the domU configuration is the > cause of the following stack trace.  Please note I have #define MC_DEBUG > 1 in

[Xen-devel] [PATCH v11 2/3] xen: add new Xen cpuid node for max address width info

2017-09-28 Thread Juergen Gross
containing the maximum physical address width. The maximum frame width needs to take memory hotplug into account. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- V11: - return max. subleaf number in EAX (Andrew Cooper) - use flsl() instead of

[Xen-devel] [PATCH v11 3/3] xen: add some comments in include/public/arch-x86/cpuid.h

2017-09-28 Thread Juergen Gross
Leaf 4 of the Xen-specific CPUID leaves isn't mentioned at all in include/public/arch-x86/cpuid.h, the comments for leaf 5 don't tell anything about the sub-leaf semantics. Add comments to clarify the interface. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Jan Beulich

[Xen-devel] [PATCH v11 1/3] xen: make grant resource limits per domain

2017-09-28 Thread Juergen Gross
. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> [non-ARM parts] --- V11: - add comment in include/asm-arm/grant_table.h (Julien Grall) V10: - lower INITIAL_NR_GRANT_FRAMES value to 1 - removed no longer needed variables (Jan Beulich) - stream li

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

2017-09-28 Thread Juergen Gross
tch 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 (3): xen: make grant resource limits per domain xen: add new Xen cpuid node for max address width info xen:

Re: [Xen-devel] [PATCH v10 10/11] xen: add new Xen cpuid node for max address width info

2017-09-28 Thread Juergen Gross
On 28/09/17 11:40, Jan Beulich wrote: On 28.09.17 at 11:04, wrote: >> On 28/09/17 10:59, Jan Beulich wrote: >> On 25.09.17 at 12:00, wrote: --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -930,6 +930,13 @@ void

Re: [Xen-devel] [PATCH v10 10/11] xen: add new Xen cpuid node for max address width info

2017-09-28 Thread Juergen Gross
On 28/09/17 10:59, Jan Beulich wrote: On 25.09.17 at 12:00, wrote: >> --- a/xen/arch/x86/traps.c >> +++ b/xen/arch/x86/traps.c >> @@ -930,6 +930,13 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, >> uint32_t leaf, >> res->b = v->vcpu_id; >> break; >>

Re: [Xen-devel] Only 1 CPU was detected

2017-09-28 Thread Juergen Gross
On 28/09/17 09:22, Hongjiang Zhang wrote: > See the attachment. > >> -Original Message----- >> From: Juergen Gross [mailto:jgr...@suse.com] >> Sent: Thursday, September 28, 2017 2:13 PM >> To: Hongjiang Zhang <honz...@microsoft.com>; xen- >> de...

Re: [Xen-devel] [PATCH v10 09/11] xen: make grant resource limits per domain

2017-09-28 Thread Juergen Gross
On 28/09/17 02:26, Julien Grall wrote: > Hi Juergen, > > On 09/25/2017 11:00 AM, Juergen Gross wrote: >> diff --git a/xen/include/asm-arm/grant_table.h >> b/xen/include/asm-arm/grant_table.h >> index 30db2d1616..bcdeada9ca 100644 >> --- a/xen/include/asm-arm/grant

Re: [Xen-devel] Only 1 CPU was detected

2017-09-28 Thread Juergen Gross
On 28/09/17 07:12, Hongjiang Zhang wrote: > Hi all, > >   > > I install Xen 4.8 on Ubuntu 17.04 (kernel is updated to 4.12). But I > found only 1 CPU was detected. > >   > > I thought it is caused by some BIOS settings, so I enabled x2APIC in > BIOS, unfortunately, Linux hangs during booting

Re: [Xen-devel] [PATCH v2] Call xen_cleanhighmap() with 4MB aligned for page tables mapping

2017-09-27 Thread Juergen Gross
On 27/09/17 16:48, Boris Ostrovsky wrote: > On 09/27/2017 10:33 AM, Juergen Gross wrote: >> On 27/09/17 15:38, Boris Ostrovsky wrote: >>> On 09/27/2017 05:43 AM, Juergen Gross wrote: >>>> On 27/09/17 11:41, Zhenzhong Duan wrote: >>>>> When bootup

Re: [Xen-devel] [PATCH v2] Call xen_cleanhighmap() with 4MB aligned for page tables mapping

2017-09-27 Thread Juergen Gross
On 27/09/17 15:38, Boris Ostrovsky wrote: > On 09/27/2017 05:43 AM, Juergen Gross wrote: >> On 27/09/17 11:41, Zhenzhong Duan wrote: >>> When bootup a PVM guest with large memory(Ex.240GB), XEN provided initial >>> mapping overlaps with kernel module virtual space. When

Re: [Xen-devel] [PATCH v4 2/3] x86/xen/time: setup vcpu 0 time info page

2017-09-27 Thread Juergen Gross
e xen headers are also updated to include the new hypercall for > registering the secondary vcpu_time_info struct. > > Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ X

Re: [Xen-devel] [PATCH v3 2/3] x86/xen/time: setup vcpu 0 time info page

2017-09-27 Thread Juergen Gross
On 27/09/17 14:00, Joao Martins wrote: > In order to support pvclock vdso on xen we need to setup the time > info page for vcpu 0 and register the page with Xen using the > VCPUOP_register_vcpu_time_memory_area hypercall. This hypercall > will also forcefully update the pvti which will set some of

Re: [Xen-devel] [PATCH v2] Call xen_cleanhighmap() with 4MB aligned for page tables mapping

2017-09-27 Thread Juergen Gross
in DEBUG mode is also removed. > > -v2: add comment about XEN alignment from Juergen. > > References: > https://lists.xen.org/archives/html/xen-devel/2012-07/msg01562.html > Signed-off-by: Zhenzhong Duan <zhenzhong.d...@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] Call xen_cleanhighmap() with 4MB aligned for page tables mapping

2017-09-27 Thread Juergen Gross
On 27/09/17 05:03, Zhenzhong Duan wrote: > When bootup a PVM guest with large memory(Ex.240GB), XEN provided initial > mapping overlaps with kernel module virtual space. When mapping in this space > is cleared by xen_cleanhighmap(), in certain case there could be an 2MB > mapping > left. This is

[Xen-devel] [PATCH v2] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-09-26 Thread Juergen Gross
to the situation where a 32 bit toolstack would have to handle such a large domain (in case the sending side is 64 bit) the same test should be added for restoring a domain. Signed-off-by: Juergen Gross <jgr...@suse.com> --- I know we have code freeze. Nevertheless I'd like to request an exception a

Re: [Xen-devel] [PATCH v2 2/3] x86/xen/time: setup vcpu 0 time info page

2017-09-26 Thread Juergen Gross
On 26/09/17 11:57, Joao Martins wrote: > On 09/26/2017 10:32 AM, Juergen Gross wrote: >> On 22/09/17 18:25, Joao Martins wrote: > [snip] >>> +static void xen_setup_vsyscall_time_info(void) >>> +{ >>> + struct vcpu_register_time_memory_area t; >&g

Re: [Xen-devel] [PATCH v2 2/3] x86/xen/time: setup vcpu 0 time info page

2017-09-26 Thread Juergen Gross
On 22/09/17 18:25, Joao Martins wrote: > In order to support pvclock vdso on xen we need to setup the time > info page for vcpu 0 and register the page with Xen using the > VCPUOP_register_vcpu_time_memory_area hypercall. This hypercall > will also forcefully update the pvti which will set some of

Re: [Xen-devel] [PATCH] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-09-26 Thread Juergen Gross
On 26/09/17 09:41, Andrew Cooper wrote: > On 26/09/2017 08:33, Juergen Gross wrote: >> Long ago domains to be saved were limited to 1TB size due to the >> migration stream v1 limitations which used a 32 bit value for the >> PFN and the frame type (4 bits) leaving onl

Re: [Xen-devel] [PATCH] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-09-26 Thread Juergen Gross
On 26/09/17 09:41, Andrew Cooper wrote: > On 26/09/2017 08:33, Juergen Gross wrote: >> Long ago domains to be saved were limited to 1TB size due to the >> migration stream v1 limitations which used a 32 bit value for the >> PFN and the frame type (4 bits) leaving onl

[Xen-devel] [PATCH] libxc: remove stale error check for domain size in xc_sr_save_x86_hvm.c

2017-09-26 Thread Juergen Gross
(or migrating) domains larger than 1 TB. Remove the related test in xc_sr_save_x86_hvm.c Signed-off-by: Juergen Gross <jgr...@suse.com> --- I know we have code freeze. Nevertheless I'd like to request an exception and get this into 4.10, as the impact of the patch is very local and of lo

Re: [Xen-devel] [PATCH] xen-pciback: relax BAR sizing write value check

2017-09-26 Thread Juergen Gross
gt; > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

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

2017-09-25 Thread Juergen Gross
Ping? On 06/09/17 19:36, Juergen Gross wrote: > With virt_spin_lock() being guarded by a static key the bare metal case > can be optimized by patching the call away completely. In case a kernel > running as a guest it can decide whether to use paravitualized > spinlocks, the curr

Re: [Xen-devel] [PATCH v10 10/11] xen: add new Xen cpuid node for max address width info

2017-09-25 Thread Juergen Gross
On 25/09/17 13:55, Andrew Cooper wrote: > On 25/09/17 11:00, Juergen Gross wrote: >> On very large hosts a pv-guest needs to know whether it will have to >> handle frame numbers larger than 32 bits in order to select the >> appropriate grant interface version. >> >

[Xen-devel] [PATCH v10 06/11] libxl: add libxl support for setting grant table resource limits

2017-09-25 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> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- V6: - made set_gnttab_limits hypercall mandatory, tak

[Xen-devel] [PATCH v10 01/11] xen: add function for obtaining highest possible memory address

2017-09-25 Thread Juergen Gross
to xen_sysctl_physinfo in order to enable dom0 to do a proper sizing of grant frame limits of guests. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- V10: - avoid holes in xen_sysctl_physinfo, use uint64_aligned_t (Jan Beulich) V9: -

[Xen-devel] [PATCH v10 09/11] xen: make grant resource limits per domain

2017-09-25 Thread Juergen Gross
. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V10: - lower INITIAL_NR_GRANT_FRAMES value to 1 - removed no longer needed variables (Jan Beulich) - stream lined messages (Jan Beulich) - corrected setting of gnttab_size on ARM V9: - add caps for per-domain limits (Jan Beulich) - some error me

[Xen-devel] [PATCH v10 02/11] libxc: add libxc support for setting grant table resource limits

2017-09-25 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.l...@ci

[Xen-devel] [PATCH v10 03/11] tools: set grant limits for xenstore stubdom

2017-09-25 Thread Juergen Gross
). Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Wei Liu <wei.l...@citrix.com> --- tools/helpers/init-xenstore-domain.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c index 8a41ee7d3a

[Xen-devel] [PATCH v10 11/11] xen: add some comments in include/public/arch-x86/cpuid.h

2017-09-25 Thread Juergen Gross
Leaf 4 of the Xen-specific CPUID leaves isn't mentioned at all in include/public/arch-x86/cpuid.h, the comments for leaf 5 don't tell anything about the sub-leaf semantics. Add comments to clarify the interface. Signed-off-by: Juergen Gross <jgr...@suse.com> --- xen/include/public/ar

[Xen-devel] [PATCH v10 00/11] xen: better grant v2 support

2017-09-25 Thread Juergen Gross
h 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 (11): xen: add function for obtaining highest possible memory addr

[Xen-devel] [PATCH v10 04/11] libxl: add max possible mfn to libxl_physinfo

2017-09-25 Thread Juergen Gross
Add the maximum possible mfn of the host to the libxl_physinfo data structure. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 1 + tools/libxl/libxl.h | 9 + tools/libxl/libxl_types.

[Xen-devel] [PATCH v10 05/11] xl: add global grant limit config items

2017-09-25 Thread Juergen Gross
-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- V7: - don't use xc_maximum_ram_page() but max_possible_mfn from physinfo --- docs/man/xl.conf.pod.5 | 12 tools/xl/xl.c | 15 +++ tools/xl/xl.h | 2

[Xen-devel] [PATCH v10 07/11] xen: delay allocation of grant table sub structures

2017-09-25 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. Allocate the structures and the table frames only from grant_table_init(). Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by

[Xen-devel] [PATCH v10 10/11] xen: add new Xen cpuid node for max address width info

2017-09-25 Thread Juergen Gross
containing the maximum physical address width. The maximum frame width needs to take memory hotplug into account. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V10: - correct comment in cpuid.h (Jan Beulich) V9: - make leaf pv-only (Jan Beulich) - use hex value for mask (Jan Beulich) - guest a

[Xen-devel] [PATCH v10 08/11] xen/arm: move arch specific grant table bits into grant_table.c

2017-09-25 Thread Juergen Gross
Instead of attaching the ARM specific grant table data to the domain structure add it to struct grant_table. Add the needed arch functions to the asm-*/grant_table.h includes. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Acked-by:

Re: [Xen-devel] [PATCH v9 09/10] xen: make grant resource limits per domain

2017-09-22 Thread Juergen Gross
On 22/09/17 17:15, Jan Beulich wrote: On 22.09.17 at 13:41, wrote: >> Instead of using the same global resource limits of grant tables (max. >> number of grant frames, max. number of maptrack frames) for all domains >> make these limits per domain. Set those per-domain

Re: [Xen-devel] [PATCH v9 10/10] xen: add new Xen cpuid node for max address width info

2017-09-22 Thread Juergen Gross
On 22/09/17 16:47, Jan Beulich wrote: On 22.09.17 at 13:41, wrote: >> --- a/xen/arch/x86/traps.c >> +++ b/xen/arch/x86/traps.c >> @@ -929,6 +929,13 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, >> uint32_t leaf, >> res->b = v->vcpu_id; >> break; >>

Re: [Xen-devel] [PATCH v9 07/10] xen: delay allocation of grant table sub structures

2017-09-22 Thread Juergen Gross
On 22/09/17 16:43, Jan Beulich wrote: On 22.09.17 at 13:41, 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. Allocate the structures and the table frames

[Xen-devel] [GIT PULL] xen: Fixes for rc2

2017-09-22 Thread Juergen Gross
/xen/xenbus/xenbus_client.c | 130 +++-- include/xen/arm/page.h | 10 --- 3 files changed, 68 insertions(+), 74 deletions(-) Arnd Bergmann (1): xen: x86: mark xen_find_pt_base as __init Juergen Gross (1): xen: don't compile pv-specific parts

[Xen-devel] [PATCH v2 0/2] xen: fix gnttab handling with old dom0 kernels

2017-09-22 Thread Juergen Gross
Juergen Gross (2): xen: add a global indicator for grant copy being available xen: dont try setting max grants multiple times hw/block/xen_disk.c | 34 ++ hw/xen/xen_backend.c | 11 +++ include/hw/xen/xen_backend.h | 1 + 3 files changed

[Xen-devel] [PATCH v2 1/2] xen: add a global indicator for grant copy being available

2017-09-22 Thread Juergen Gross
for the availability of grant copy in xen_be_init() opening the gnttab device just for that purpose and closing it again afterwards. Advertise the availability via a global flag and use that flag in the qdisk backend. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Anthony PERARD <an

[Xen-devel] [PATCH v2 2/2] xen: dont try setting max grants multiple times

2017-09-22 Thread Juergen Gross
of letting the generic backend code open the gnttab device do it in blk_connect() and close it again in blk_disconnect. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V2: - always call blk_disconnect() from blk_free() in order to have the gnttab device node closed (Anthony Perard) -

Re: [Xen-devel] [PATCH 2/2] xen: dont try setting max grants multiple times

2017-09-22 Thread Juergen Gross
On 20/09/17 17:00, Anthony PERARD wrote: > On Tue, Sep 19, 2017 at 01:50:55PM +0200, Juergen Gross wrote: >> Trying to call xengnttab_set_max_grants() with the same file handle >> might fail on some kernels, as this operation is allowed only once. >> >> This is a pr

Re: [Xen-devel] [PATCH 1/2] xen: add a global indicator for grant copy being available

2017-09-22 Thread Juergen Gross
On 20/09/17 16:53, Anthony PERARD wrote: > On Tue, Sep 19, 2017 at 01:50:54PM +0200, Juergen Gross wrote: >> The Xen qdisk backend needs to test whether grant copy operations is >> available in the kernel. Unfortunately this collides with using >> xengnttab_set_max_gra

[Xen-devel] [PATCH v9 10/10] xen: add new Xen cpuid node for max address width info

2017-09-22 Thread Juergen Gross
containing the maximum physical address width. The maximum frame width needs to take memory hotplug into account. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V9: - make leaf pv-only (Jan Beulich) - use hex value for mask (Jan Beulich) - guest address width -> machine address width (Ja

[Xen-devel] [PATCH v9 02/10] libxc: add libxc support for setting grant table resource limits

2017-09-22 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.l...@ci

[Xen-devel] [PATCH v9 04/10] libxl: add max possible mfn to libxl_physinfo

2017-09-22 Thread Juergen Gross
Add the maximum possible mfn of the host to the libxl_physinfo data structure. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 1 + tools/libxl/libxl.h | 9 + tools/libxl/libxl_types.

[Xen-devel] [PATCH v9 01/10] xen: add function for obtaining highest possible memory address

2017-09-22 Thread Juergen Gross
to xen_sysctl_physinfo in order to enable dom0 to do a proper sizing of grant frame limits of guests. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V9: - merge patch with following one (Jan Beulich) - bump sysctl interface version (Julien Grall) - drop thin common shim of get_upper_mfn_bound(

[Xen-devel] [PATCH v9 08/10] xen/arm: move arch specific grant table bits into grant_table.c

2017-09-22 Thread Juergen Gross
Instead of attaching the ARM specific grant table data to the domain structure add it to struct grant_table. Add the needed arch functions to the asm-*/grant_table.h includes. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> Acked-by:

[Xen-devel] [PATCH v9 09/10] xen: make grant resource limits per domain

2017-09-22 Thread Juergen Gross
not be exceeded by a per-domain value. The default of max_grant_frames is set to the maximum default xl will use. While updating the semantics of the boot parameters remove the documentation of the no longer existing gnttab_max_nr_frames. Signed-off-by: Juergen Gross <jgr...@suse.com>

[Xen-devel] [PATCH v9 03/10] tools: set grant limits for xenstore stubdom

2017-09-22 Thread Juergen Gross
). Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Wei Liu <wei.l...@citrix.com> --- tools/helpers/init-xenstore-domain.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c index 8a41ee7d3a

[Xen-devel] [PATCH v9 05/10] xl: add global grant limit config items

2017-09-22 Thread Juergen Gross
-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- V7: - don't use xc_maximum_ram_page() but max_possible_mfn from physinfo --- docs/man/xl.conf.pod.5 | 12 tools/xl/xl.c | 15 +++ tools/xl/xl.h | 2

[Xen-devel] [PATCH v9 06/10] libxl: add libxl support for setting grant table resource limits

2017-09-22 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> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- V6: - made set_gnttab_limits hypercall mandatory, tak

[Xen-devel] [PATCH v9 07/10] xen: delay allocation of grant table sub structures

2017-09-22 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. Allocate the structures and the table frames only from grant_table_set_limits() (dom0: from grant_table_create()). Signed-off-by: Juergen

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