Re: [Xen-devel] [PATCH v2 for-4.12] arm/p2m: call iommu iotlb flush if iommu exists and enabled

2019-01-23 Thread Juergen Gross
On 23/01/2019 13:50, Andrii Anisov wrote: > From: Andrii Anisov > > Taking decision by `need_iommu_pt_sync()` make us never kicking > `iommu_iotlb_flush()` for IOMMUs which do share P2M with CPU. > So check `has_iommu_pt()` instead. > > Signed-off-by: Andrii Anisov Rele

Re: [Xen-devel] [PATCH for-4.12 0/3] x86/pvh: Misc fixes and cleanup

2019-01-23 Thread Juergen Gross
letions(-) > For the series: Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 1/2] x86: respect memory size limiting via mem= parameter

2019-01-23 Thread Juergen Gross
On 23/01/2019 15:35, William Kucharski wrote: > > >> On Jan 22, 2019, at 1:06 AM, Juergen Gross wrote: >> >> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c >> index b9a667d36c55..7fc2a87110a3 100644 >> --- a/mm/memory_hotplug.c >> +++ b/mm/me

Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Juergen Gross
On 18/12/2018 09:19, YueHaibing wrote: > Fix smatch warning: > > arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: > buffer overflow 'early_idt_handler_array' 32 <= 32 > > Fixes: 42b3a4cb5609 ("x86/xen: Support early interrupts in xen pv guests") > Signed-off-by: YueHaibing > --- >

[Xen-devel] [PATCH] xen/netfront: tolerate frags with no data

2018-12-18 Thread Juergen Gross
...@vger.kernel.org Tested-by: Dietmar Hahn Signed-off-by: Juergen Gross --- drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index f17f602e6171..5b97cc946d70 100644 --- a/drivers/net/xen-netfront.c +++ b

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

2018-12-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.21-rc1-tag xen: features and fixes for 4.21 It contains the following changes: - a series to enable KVM guests to be booted by qemu via the Xen PVH boot entry for speeding up

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-12-22 Thread Juergen Gross
On 06/12/2018 12:46, Greg KH wrote: > On Thu, Dec 06, 2018 at 12:31:15PM +0100, Juergen Gross wrote: >> On 06/12/2018 12:13, Greg KH wrote: >>> On Thu, Nov 29, 2018 at 02:35:17PM +0100, Juergen Gross wrote: >>>> On 29/11/2018 14:26, Kirill A. Shutemov wrote: >&

[Xen-devel] Xen 4.12 Development Update

2018-12-17 Thread Juergen Gross
it2 scheduler the default - George Dunlap * Grub2: Support PVH guest boot - Juergen Gross Juergen Gross ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] arm: xl vcpu-pin leads to oom-killer slashing processes

2018-12-13 Thread Juergen Gross
On 12/13/18 3:13 PM, Andrii Anisov wrote: Hello All, OK, I've discovered a mechanism of the issue. It is  because of `d->max_pages = ~0U;` in a `construct_dom0()`. When I do vcpu-pin, libxl updates memory nodes in xenstore for Dom0. Then kernel watch sees those changes and trying to set new

[Xen-devel] [PATCH] xen/x86: fix paging_max_paddr_bits()

2018-11-27 Thread Juergen Gross
paging_max_paddr_bits() has an invalid use of IS_ENABLED(): instead of IS_ENABLED(CONFIG_BIGMEM) it is using IS_ENABLED(BIGMEM). Fix that. Signed-off-by: Juergen Gross --- xen/include/asm-x86/paging.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-x86

Re: [Xen-devel] [PATCH v5 11/20] xen: setup hypercall page for PVH

2018-11-28 Thread Juergen Gross
On 28/11/2018 12:28, Daniel Kiper wrote: > On Tue, Nov 27, 2018 at 09:31:10PM +0100, Daniel Kiper wrote: >> On Wed, Nov 21, 2018 at 03:28:46PM +0100, Juergen Gross wrote: >>> Add the needed code to setup the hypercall page for calling into the >>> Xen

Re: [Xen-devel] Xen 4.12 Development Update

2018-11-28 Thread Juergen Gross
Sorry, this one is missing some updates. Will resend soon. Juergen On 28/11/2018 11:15, Juergen Gross wrote: > This email only tracks big items for xen.git tree. Please reply for items you > would like to see in 4.12 so that people have an idea what is going on and > prioritise ac

[Xen-devel] Xen 4.12 Development Update

2018-11-28 Thread Juergen Gross
deprivilege (v4) - George Dunlap * Improve late microcode loading (v4) - Chao Gao * dom0less (boot multiple domains from device tree) (v4) - Stefano Stabellini == Grub2 == * Support PVH guest boot (v5) - Juergen Gross == Completed == * guest resource mapping - Paul Durrant

[Xen-devel] [PATCH] xen/vmx: remove stale prototypes

2018-11-28 Thread Juergen Gross
Some prototypes in include/asm-x86/hvm/vmx/vmx.h have no related implementation. Remove them. Signed-off-by: Juergen Gross --- xen/include/asm-x86/hvm/vmx/vmx.h | 4 1 file changed, 4 deletions(-) diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h index

[Xen-devel] Xen 4.12 Development Update

2018-11-28 Thread Juergen Gross
Gross == Completed == * guest resource mapping - Paul Durrant * PV-only hypervisor - Wei Liu * HVM-only hypervisor - Wei Liu * Make credit2 scheduler the default - George Dunlap Juergen Gross ___ Xen-devel mailing list Xen-devel

Re: [Xen-devel] [PATCH v5 01/20] xen: add some xen headers

2018-11-28 Thread Juergen Gross
On 28/11/2018 12:31, Daniel Kiper wrote: > On Wed, Nov 21, 2018 at 03:28:36PM +0100, Juergen Gross wrote: >> In order to support grub2 in Xen PVH environment some additional Xen >> headers are needed as grub2 will be started in PVH mode requiring to >> use several HVM hype

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-11-29 Thread Juergen Gross
On 29/11/2018 02:22, Hans van Kranenburg wrote: > Hi, > > As also seen at: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914951 > > Attached there are two serial console output logs. One is starting with > Xen 4.11 (from debian unstable) as dom0, and the other one without Xen. > > [

Re: [Xen-devel] [PATCH v2] always clear the X2APIC_ENABLE bit for PV guest

2018-12-04 Thread Juergen Gross
> always clear the X2APIC_ENABLE bit. > > Signed-off-by: Talons Lee > > --- > CC: Igor Druzhinin > CC: Sergey Dyasli > CC: Andrew Cooper > CC: Juergen Gross > > v2: > don't use fake cpuid to cheat xen_read_msr_safe(), just always clear > the EXIT bit. > --- &g

[Xen-devel] [PATCH] tools/libxl: fix boot of HVM domain with Xenstore-stubdom

2018-12-04 Thread Juergen Gross
grant table"). Signed-off-by: Juergen Gross --- tools/libxl/libxl_dom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 598af71562..6160991af3 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1289,6 +128

[Xen-devel] [PATCH v7 17/20] xen: use elfnote defines instead of plain numbers

2018-12-07 Thread Juergen Gross
In order to avoid using plain integers for the ELF notes use the available Xen include instead. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- util/grub-mkimagexx.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git

[Xen-devel] [PATCH v7 18/20] xen_pvh: support building a standalone image

2018-12-07 Thread Juergen Gross
Support mkimage for xen_pvh. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: some style adjustments (Daniel Kiper) use defines for elf-notes (Daniel Kiper) V5: move elf-note define usage into new patch (Daniel Kiper) I didn't replace the 4096 by a PAGE_SIZE macro

[Xen-devel] [PATCH v7 16/20] grub-module-verifier: Ignore all_video for xenpvh

2018-12-07 Thread Juergen Gross
Signed-off-by: Juergen Gross --- util/grub-module-verifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c index 03ba1ab43..97cb9 100644 --- a/util/grub-module-verifier.c +++ b/util/grub-module-verifier.c @@ -129,6 +129,7

Re: [Xen-devel] [PATCH v8 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH

2018-12-07 Thread Juergen Gross
On 07/12/2018 14:41, Paolo Bonzini wrote: > On 07/12/18 07:02, Juergen Gross wrote: >> On 06/12/2018 23:11, Paolo Bonzini wrote: >>> On 06/12/18 07:04, Maran Wilson wrote: >>>> +config PVH >>>> + bool "Support for running PVH guests" >>&g

Re: [Xen-devel] [PATCH v8 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH

2018-12-07 Thread Juergen Gross
On 07/12/2018 14:52, Paolo Bonzini wrote: > On 07/12/18 14:50, Juergen Gross wrote: >> The PVH boot entry is in the same bzImage binary as the normal one. >> Its just another entry, similar to the Xen PV boot entry. So the binary >> arch/x86/boot/bzimage can be booted eit

[Xen-devel] [PATCH v7 03/20] xen: carve out grant tab initialization into dedicated function

2018-12-07 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message

[Xen-devel] [PATCH v7 04/20] xen: prepare common code for Xen PVH support

2018-12-07 Thread Juergen Gross
of struct grub_e820_mmap_entry from grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order to make it usable from xen_pvh code. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: GRUB_MACHINE_XENPVH -> GRUB_MACHINE_XEN_PVH (Daniel Kiper) split include/grub/i386

[Xen-devel] [PATCH v7 02/20] loader/linux: support passing rsdp address via boot params

2018-12-07 Thread Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) V5

[Xen-devel] [PATCH v7 01/20] xen: add some xen headers

2018-12-07 Thread Juergen Gross
. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message (Daniel Kiper) --- include/xen/hvm/hvm_op.h | 296 +++ include/xen/hvm/params.h | 284 ++ include/xen/hvm/start_info.h | 98 +++ include/xen/memory.h | 665

[Xen-devel] [PATCH v7 05/20] xen: add some dummy headers for PVH mode

2018-12-07 Thread Juergen Gross
in order to avoid the definition of grub_bios_interrupt(). xen_pvh/memory.h needs to include coreboot/memory.h (like some other /memory.h do as well) as this contains just the needed stubs. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: updated commit message (Daniel Kiper) xenpvh

Re: [Xen-devel] [PATCH v6.1 09/20] xen: add basic hooks for PVH in current code

2018-12-07 Thread Juergen Gross
On 07/12/2018 12:50, Daniel Kiper wrote: > On Fri, Dec 07, 2018 at 08:35:26AM +0100, Juergen Gross wrote: >> Add the hooks to current code needed for Xen PVH. They will be filled >> with code later when the related functionality is being added. >> >> loader/i386/linux

[Xen-devel] [PATCH v7 11/20] xen: setup hypercall page for PVH

2018-12-07 Thread Juergen Gross
Add the needed code to setup the hypercall page for calling into the Xen hypervisor. Import the XEN_HVM_DEBUGCONS_IOPORT define from Xen unstable into include/xen/arch-x86/xen.h Signed-off-by: Juergen Gross Reviewed-by: Roger Pau Monné --- V3: grub_xen_early_halt->grub_xen_panic (Roger

[Xen-devel] [PATCH v7 00/20] xen: add pvh guest support

2018-12-07 Thread Juergen Gross
nts (see individual patches) Hans van Kranenburg (1): grub-module-verifier: Ignore all_video for xenpvh Juergen Gross (19): xen: add some xen headers loader/linux: support passing rsdp address via boot params xen: carve out grant tab initialization into dedicated function xen: prepare com

[Xen-devel] [PATCH v7 19/20] xen_pvh: support grub-install for xen_pvh

2018-12-07 Thread Juergen Gross
Add xen_pvh support to grub-install. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/include/grub/util/install.h b/include

[Xen-devel] [PATCH v7 06/20] xen: rearrange xen/init.c to prepare it for Xen PVH mode

2018-12-07 Thread Juergen Gross
Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN as it will not be used when running as PVH. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- grub-core/kern/xen/init.c | 60

[Xen-devel] [PATCH v7 09/20] xen: add basic hooks for PVH in current code

2018-12-07 Thread Juergen Gross
header for some i386 platforms (efi, coreboot, ieee1275, xen) and for x86_64 efi. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: xenpvh->xen_pvh (Daniel Kiper) adjust copyright date (Roger Pau Monné) V5: update commit message (Daniel Kiper) move including xen/

[Xen-devel] [PATCH v7 07/20] xen: modify grub_xen_ptr2mfn() for xen-pvh

2018-12-07 Thread Juergen Gross
grub_xen_ptr2mfn() returns the machine frame number for a given pointer value. For Xen-PVH guests this is just the PFN. Add the PVH specific variant. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- grub-core/kern/xen/init.c | 2 ++ 1 file changed, 2

[Xen-devel] [PATCH v7 10/20] xen: add PVH boot entry code

2018-12-07 Thread Juergen Gross
Add the code for the Xen PVH mode boot entry. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: clear %fs and %gs, too (Daniel Kiper) use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) V5: reorder clearing segment regs (Daniel Kiper) --- grub-core/kern/i386

[Xen-devel] [PATCH v7 20/20] xen_pvh: add support to configure

2018-12-07 Thread Juergen Gross
Support platform i386/xen_pvh in configure. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5e63c4af3..81a19afd5 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,7

[Xen-devel] [PATCH v7 14/20] xen: init memory regions for PVH

2018-12-07 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross Reviewed-by: Daniel

[Xen-devel] [PATCH v7 15/20] xen_pvh: add build runes for grub-core

2018-12-07 Thread Juergen Gross
Add the modifications to the build system needed to build a xen_pvh grub. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: sorted some filenames (Daniel Kiper) V4: add bus/pci.c to xen_pvh --- gentpl.py | 4 ++-- grub-core/Makefile.am | 12

[Xen-devel] [PATCH v7 08/20] xen: add PVH specific defines to offset.h

2018-12-07 Thread Juergen Gross
include/grub/offsets.h needs some defines for Xen PVH mode. Add them. While at it line up the values in the surrounding lines to start at the same column. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: XENPVH->XEN_PVH (Daniel Kiper) --- include/grub/offsets.h |

[Xen-devel] [PATCH v7 13/20] xen: setup Xen specific data for PVH

2018-12-07 Thread Juergen Gross
there again. Set the RSDP address for the guest from the start_info page passed as boot parameter. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper Reviewed-by: Roger Pau Monné --- V4: write back memory map to Xen (Roger Pau Monné) V5: add comment (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c

[Xen-devel] [PATCH v7 12/20] xen: get memory map from hypervisor for PVH

2018-12-07 Thread Juergen Gross
Retrieve the memory map from the hypervisor and normalize it to contain no overlapping entries and to be sorted by address. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: use grub_e820_mmap_entry instead of own struct (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 94

Re: [Xen-devel] [PATCH] xen-blkfront: use old rinfo after enomem during migration

2018-12-03 Thread Juergen Gross
On 04/12/2018 02:14, Dongli Zhang wrote: > Hi Boris, > > On 12/04/2018 12:07 AM, Boris Ostrovsky wrote: >> On 12/2/18 3:31 PM, Manjunath Patil wrote: >>> On 11/30/2018 2:33 PM, Boris Ostrovsky wrote: >>> On 11/30/18 4:49 PM, Manjunath Patil wrote: > Thank you Boris for your comments. I

Re: [Xen-devel] [PATCH 0/7] docs: Fix support matrix release notes link

2018-12-03 Thread Juergen Gross
SUPPORT.md: Turn release notes link into a proper link. > > SUPPORT.md| 4 ++- > docs/parse-support-md | 79 > ++- > 2 files changed, 62 insertions(+), 21 deletions(-) For the series: Acked-by: Juergen Gross Juergen ___

Re: [Xen-devel] PVH Whitelist Results / Windows Dom0

2018-12-03 Thread Juergen Gross
On 01/12/2018 17:21, Rian Quinn wrote: > We finally have a Linux PVH guest up and running (using an > initramfs right now). I have posted a quick status update video on > YouTube that shows our progress of getting a Windows Dom0 working (which > is one of the many goals of our research).   >

Re: [Xen-devel] [PATCH v1] restore the fake x2apic value for cpuid

2018-12-03 Thread Juergen Gross
On 03/12/2018 12:15, Xin Li (Talons) wrote: > Hi Juergen, > thanks for your comments. > >Are you suggesting to call apic_is_x2apic_enabled() in __x2apic_disable()? >but I think that's exact what changed due to the fake xen_cpuid value. >Doing so will probably still see the EXTD

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

2018-12-02 Thread Juergen Gross
(-) Igor Druzhinin (1): Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" Juergen Gross (2): x86/xen: cleanup includes in arch/x86/xen/spinlock.c xen/x86: add diagnostic printout to xen_mc_flush() in case of error Pan Bian (1): pvcalls-front: fixes incor

Re: [Xen-devel] [PATCH -next] xen/pvcalls: remove set but not used variable 'bedata'

2018-12-02 Thread Juergen Gross
; drivers/xen/pvcalls-front.c: In function 'pvcalls_front_recvmsg': > drivers/xen/pvcalls-front.c:603:25: warning: > variable 'bedata' set but not used [-Wunused-but-set-variable] > > It never used since introduction. > > Signed-off-by: YueHaibing

Re: [Xen-devel] [PATCH v1] restore the fake x2apic value for cpuid

2018-12-02 Thread Juergen Gross
gt; disable x2apic in __x2apic_disable(). So restore the fake x2apic value. > > Signed-off-by: Talons Lee Wouldn't it be easier to use just rdmsr_safe() in __x2apic_disable() instead? Juergen > > --- > CC: Igor Druzhinin > CC: Sergey Dyasli > CC: Andrew Cooper > C

Re: [Xen-devel] [PATCH v1] restore the fake x2apic value for cpuid

2018-12-02 Thread Juergen Gross
On 03/12/2018 08:00, Juergen Gross wrote: > On 22/11/2018 08:18, Xin Li wrote: >> From: Talons Lee >> >> Commit e657fcc clears cpu x2apic capability bit instead of using fake >> cpuid value. However, with cpuid x2apic bit on, xen_read_msr_safe() will >> no

Re: [Xen-devel] [PATCH 1/4] xen/arm: gic: Ensure we have an ISB between ack and do_IRQ()

2018-12-03 Thread Juergen Gross
On 03/12/2018 14:46, Andre Przywara wrote: > On 30/11/2018 19:52, Andrii Anisov wrote: >> Hello Andre, >> >> Please see my comments below: >> >> On 23.11.18 14:18, Andre Przywara wrote: >>> Fundamentally there is a semantic difference between edge and level >>> triggered IRQs: When the guest has

Re: [Xen-devel] Legacy PIC (x86) support (RTC) in dom0 with Linux 4.12 and newer is broken for some hardware.

2018-12-05 Thread Juergen Gross
On 05/12/2018 17:40, Jennifer Herbert wrote: > CC: Juergen Gross > > On 04/12/18 17:24, Jennifer Herbert wrote: >> Since Linux 4.12, there has been a >> commita1e23a42f1bdc00e32fc4869caef12e4e6272f26 >> >> “rtc: cmos: Do not assume irq 8 for rtc when there are

[Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Juergen Gross
t memory size in percent. is a percentage of host memory plus an offset. So being 1G+25% on a 256G host would result in 65G. Signed-off-by: Juergen Gross --- docs/misc/xen-command-line.markdown | 19 +-- xen/arch/x86/dom0_build.c | 106 +++- 2 file

[Xen-devel] [PATCH v2 3/3] xen: add CONFIG item for default dom0 memory size

2018-12-06 Thread Juergen Gross
parameters. Signed-off-by: Juergen Gross --- xen/arch/arm/domain_build.c | 7 +++ xen/arch/x86/dom0_build.c | 6 ++ xen/common/Kconfig | 13 + 3 files changed, 26 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index b0ec3f0b72

[Xen-devel] [PATCH v2 0/3] xen/x86: support setting dom0_mem depending on host size

2018-12-06 Thread Juergen Gross
- rewritten patch 2 according to remarks by Jan Beulich - changed patch 3 to allow config item on arm, too Juergen Gross (3): xen: introduce parse_size_and_unit_or_int xen/x86: add dom0 memory sizing variants xen: add CONFIG item for default dom0 memory size docs/misc/xen-command-line.markdown

[Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Juergen Gross
Introduce parse_size_and_unit_or_int() similar to parse_size_and_unit() but not defaulting to kbytes in case the parameter is a number followed by a specified character. Signed-off-by: Juergen Gross --- xen/common/lib.c | 11 +-- xen/include/xen/lib.h | 2 ++ 2 files changed, 11

Re: [Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Juergen Gross
e size value (e.g. 1G). >> >> Modify that to: >> >> dom0_mem= List of ( min: | max: | ) >> : | [+]% >> : integer value < 100 >> >> With the following semantics: >> >> % specifies a fraction of host memory size in percent. >> is a

Re: [Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Juergen Gross
On 06/12/2018 10:50, Jan Beulich wrote: On 06.12.18 at 09:06, wrote: >> @@ -477,7 +478,8 @@ unsigned long long parse_size_and_unit(const char *s, >> const char **ps) >> s1++; >> break; >> default: >> -ret <<= 10; /* default to kB */ >> +if ( *s1 && *s1

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-12-06 Thread Juergen Gross
On 06/12/2018 12:13, Greg KH wrote: > On Thu, Nov 29, 2018 at 02:35:17PM +0100, Juergen Gross wrote: >> On 29/11/2018 14:26, Kirill A. Shutemov wrote: >>> On Thu, Nov 29, 2018 at 09:41:25AM +0000, Juergen Gross wrote: >>>> On 29/11/2018 02:22, Hans

Re: [Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Juergen Gross
On 06/12/2018 11:15, Jan Beulich wrote: On 06.12.18 at 11:01, wrote: >> On 06/12/2018 10:50, Jan Beulich wrote: >> On 06.12.18 at 09:06, wrote: @@ -477,7 +478,8 @@ unsigned long long parse_size_and_unit(const char *s, >> const char **ps) s1++; break;

Re: [Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Juergen Gross
ist of ( min: | max: | ) >>>> : | [+]% >>>> : integer value < 100 >>>> >>>> With the following semantics: >>>> >>>> % specifies a fraction of host memory size in percent. >>>> is a percentage of host memory plu

[Xen-devel] [PATCH] pvusb: set max grants only in initialise

2018-12-06 Thread Juergen Gross
Don't call xen_be_set_max_grant_refs() in usbback_alloc(), as the gnttabdev pointer won't be initialised yet. The call can easily be moved to usbback_connect(). Signed-off-by: Juergen Gross --- hw/usb/xen-usb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw

Re: [Xen-devel] [PATCH v8 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH

2018-12-06 Thread Juergen Gross
On 06/12/2018 23:11, Paolo Bonzini wrote: > On 06/12/18 07:04, Maran Wilson wrote: >> +config PVH >> +bool "Support for running PVH guests" >> +---help--- >> + This option enables the PVH entry point for guest virtual machines >> + as specified in the x86/HVM direct boot ABI. >>

[Xen-devel] [PATCH v6.1 09/20] xen: add basic hooks for PVH in current code

2018-12-06 Thread Juergen Gross
header for some i386 platforms (efi, coreboot, ieee1275, xen). Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: xenpvh->xen_pvh (Daniel Kiper) adjust copyright date (Roger Pau Monné) V5: update commit message (Daniel Kiper) move including xen/hvm/start_info.h to the sour

[Xen-devel] [PATCH v3 2/3] xen/x86: add dom0 memory sizing variants

2018-12-10 Thread Juergen Gross
t memory size in percent. is a percentage of host memory plus an offset. So being 1G+25% on a 256G host would result in 65G. Signed-off-by: Juergen Gross --- docs/misc/xen-command-line.markdown | 19 -- xen/arch/x86/dom0_build.c | 112 +++- 2 file

[Xen-devel] [PATCH v3 0/3] xen/x86: support setting dom0_mem depending on host size

2018-12-10 Thread Juergen Gross
to allow config item on arm, too Juergen Gross (3): xen: modify parse_size_and_unit() to support percentage xen/x86: add dom0 memory sizing variants xen: add CONFIG item for default dom0 memory size docs/misc/xen-command-line.markdown | 19 -- xen/arch/arm/domain_build.c | 7

[Xen-devel] [PATCH v3 3/3] xen: add CONFIG item for default dom0 memory size

2018-12-10 Thread Juergen Gross
parameters. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- xen/arch/arm/domain_build.c | 7 +++ xen/arch/x86/dom0_build.c | 6 ++ xen/common/Kconfig | 13 + 3 files changed, 26 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm

[Xen-devel] [PATCH v3 1/3] xen: modify parse_size_and_unit() to support percentage

2018-12-10 Thread Juergen Gross
Modify parse_size_and_unit() to support a value followed by a '%' character. In this case ps is required to be non-NULL to ensure the caller can detect that case. The returned value will be the integer value s was pointing to and *ps will point to the '%' character. Signed-off-by: Juergen Gross

Re: [Xen-devel] [PATCH v3 2/3] xen/x86: add dom0 memory sizing variants

2018-12-10 Thread Juergen Gross
e size value (e.g. 1G). >> >> Modify that to: >> >> dom0_mem= List of ( min: | max: | ) >> : | [+]% >> : integer value < 100 >> >> With the following semantics: >> >> % specifies a fraction of host memory size in percent. >> is a p

Re: [Xen-devel] Xen 4.12 Development Update

2018-11-29 Thread Juergen Gross
On 29/11/2018 21:16, Volodymyr Babchuk wrote: > Hello Jurgen, > > I just want to clarify > >> !!! Last posting date for patches touching ARM code is only 2 days away !!! > >> * TEE mediator (and OP-TEE) support in XEN (v2) >> - Volodymyr Babchuk > I'm currently working on v3 of this series.

Re: [Xen-devel] [PATCH 1/3] xen: Introduce shared buffer helpers for page directory...

2018-11-29 Thread Juergen Gross
On 29/11/2018 12:22, Oleksandr Andrushchenko wrote: > ping > > On 11/22/18 12:02 PM, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> based frontends. Currently the frontends which implement >> similar code for sharing big buffers between frontend and >> backend are

Re: [Xen-devel] [ARM] gvirt_to_maddr fails when DomU is created

2018-11-29 Thread Juergen Gross
On 29/11/2018 10:39, Jan Beulich wrote: On 28.11.18 at 01:05, wrote: >> update_runstate_area() using a virtual address is a complete misfeature, >> and the sooner we can replace it, the better. It's history is with x86 >> PV guests, where the early ABIs were designed in terms of Linux's >>

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-11-29 Thread Juergen Gross
On 29/11/2018 14:26, Kirill A. Shutemov wrote: > On Thu, Nov 29, 2018 at 09:41:25AM +0000, Juergen Gross wrote: >> On 29/11/2018 02:22, Hans van Kranenburg wrote: >>> Hi, >>> >>> As also seen at: >>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-11-29 Thread Juergen Gross
On 29/11/2018 15:32, Kirill A. Shutemov wrote: > On Thu, Nov 29, 2018 at 02:24:47PM +, Kirill A. Shutemov wrote: >> On Thu, Nov 29, 2018 at 01:35:17PM +, Juergen Gross wrote: >>> On 29/11/2018 14:26, Kirill A. Shutemov wrote: >>>> On Thu, Nov 29, 2018 at 0

Re: [Xen-devel] [PATCH v3] pvcalls-front: Avoid __get_free_pages(GFP_KERNEL) under spinlock

2018-11-30 Thread Juergen Gross
outside the lock and passing the allocated data to > create_active(). > v3: Use the matching deallocators i.e., free_page() > and free_pages(), respectively. > > Suggested-by: Juergen Gross > Signed-off-by: Wen Yang > CC: Julia Lawall > CC: Bori

Re: [Xen-devel] [PATCH] pvcalls-front: fixes incorrect error handling

2018-11-29 Thread Juergen Gross
On 22/11/2018 03:07, Pan Bian wrote: > kfree() is incorrectly used to release the pages allocated by > __get_free_page() and __get_free_pages(). Use the matching deallocators > i.e., free_page() and free_pages(), respectively. > > Signed-off-by: Pan Bian Pushed to xen/tip.git for-linus-4.20a

Re: [Xen-devel] [PATCH] xen: xlate_mmu: add missing header to fix 'W=1' warning

2018-11-29 Thread Juergen Gross
On 27/11/2018 15:23, Srikanth Boddepalli wrote: > Add a missing header otherwise compiler warns about missed prototype: > > drivers/xen/xlate_mmu.c:183:5: warning: no previous prototype for > 'xen_xlate_unmap_gfn_range?' [-Wmissing-prototypes] > int xen_xlate_unmap_gfn_range(struct

Re: [Xen-devel] [PATCH] Revert "xen/balloon: Mark unallocated host memory as UNUSABLE"

2018-11-29 Thread Juergen Gross
On 27/11/2018 21:58, Igor Druzhinin wrote: > This reverts commit b3cf8528bb21febb650a7ecbf080d0647be40b9f. > > That commit unintentionally broke Xen balloon memory hotplug with > "hotplug_unpopulated" set to 1. As long as "System RAM" resource > got assigned under a new "Unusable memory" resource

Re: [Xen-devel] [PATCH] pvcalls-front: Use GFP_ATOMIC under spin_lock

2018-11-29 Thread Juergen Gross
On 29/11/2018 13:01, Wen Yang wrote: > The problem is that we call this with a spin lock held. > The call tree is: > pvcalls_front_accept() holds bedata->socket_lock. > -> create_active() > -> __get_free_pages() uses GFP_KERNEL > > The create_active() function is only called from

Re: [Xen-devel] [PATCH v1] mm/memory_hotplug: drop "online" parameter from add_memory_resource()

2018-11-23 Thread Juergen Gross
directly use that instead internally. > > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: Andrew Morton > Cc: Dan Williams > Cc: Oscar Salvador > Cc: Pavel Tatashin > Cc: Michal Hocko > Cc: David Hildenbrand > Cc: Joonsoo Kim

[Xen-devel] [PATCH] xen/x86: add diagnostic printout to xen_mc_flush() in case of error

2018-11-23 Thread Juergen Gross
. without information which caller produced the failing element). Move the printing out of the switch statement in order to have the same information for a single call. Signed-off-by: Juergen Gross --- arch/x86/xen/multicalls.c | 35 --- 1 file changed, 20 insertions

[Xen-devel] [PATCH] xen: only clobber multicall elements without error

2018-11-23 Thread Juergen Gross
In debug builds the hypervisor will deliberately clobber processed elements of the multicall structure. In order to ease diagnostic data printout in the affected guest only clobber elements which didn't return an error. Signed-off-by: Juergen Gross --- xen/common/multicall.c | 1 + 1 file

Re: [Xen-devel] [PATCH] xen: only clobber multicall elements without error

2018-11-23 Thread Juergen Gross
On 23/11/2018 14:28, Andrew Cooper wrote: > On 23/11/2018 13:25, Juergen Gross wrote: >> In debug builds the hypervisor will deliberately clobber processed >> elements of the multicall structure. In order to ease diagnostic data >> printout in the affected guest only clobber

Re: [Xen-devel] [PATCH v2 4/8] xen/balloon: mark inflated pages PG_offline

2018-11-23 Thread Juergen Gross
On 22/11/2018 11:06, David Hildenbrand wrote: > Mark inflated and never onlined pages PG_offline, to tell the world that > the content is stale and should not be dumped. > > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: Andrew Morton > Cc: Matt

Re: [Xen-devel] [PATCH 2/3] drm/xen-front: Use Xen common shared buffer implementation

2018-11-23 Thread Juergen Gross
On 22/11/2018 15:33, Daniel Vetter wrote: > On Thu, Nov 22, 2018 at 12:02:29PM +0200, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> Use page directory based shared buffer implementation >> now available as common code for Xen frontend drivers. >> >> Signed-off-by:

[Xen-devel] [PATCH 2/2] x86/acpi, x86/boot: Take RSDP address from boot params if available

2018-11-19 Thread Juergen Gross
In case the RSDP address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Signed-off-by: Juergen Gross --- arch/x86/include/uapi/asm/bootparam.h | 3 ++- arch/x86/kernel/acpi/boot.c | 2 +- 2 files

[Xen-devel] [PATCH 0/2] Move RSDP address out of setup_header

2018-11-19 Thread Juergen Gross
linux 4.20 with a corky boot protocol. Juergen Gross (2): x86/boot: revert commit ae7e1238e68f2a (Add ACPI RSDP address to setup_header) x86/acpi, x86/boot: Take RSDP address from boot params if available Documentation/x86/boot.txt| 32 +--- arch/x86

[Xen-devel] [PATCH 1/2] x86/boot: revert commit ae7e1238e68f2a (Add ACPI RSDP address to setup_header)

2018-11-19 Thread Juergen Gross
x86/boot: Take RSDP address for boot params if available") just remove the setup_header reference in order to replace it by a boot_params in a followup patch. Signed-off-by: Juergen Gross --- Documentation/x86/boot.txt| 32 +--- arch/x86/boot/header.S

[Xen-devel] [PATCH 1/2] x86/boot: revert commit ae7e1238e68f2a (Add ACPI RSDP address to setup_header)

2018-11-19 Thread Juergen Gross
x86/boot: Take RSDP address for boot params if available") just remove the setup_header reference in order to replace it by a boot_params in a followup patch. Signed-off-by: Juergen Gross --- Documentation/x86/boot.txt| 32 +--- arch/x86/boot/header.S

[Xen-devel] [PATCH 0/2] Move RSDP address out of setup_header

2018-11-19 Thread Juergen Gross
Instead of passing the RSDP address for Xen PVH guests from grub2 to the kernel in setup_header move it into the non-legacy part of the boot_params structure. This patch series should be applied rather sooner than later in order to avoid shipping linux 4.20 with a corky boot protocol. Juergen

[Xen-devel] [PATCH 2/2] x86/acpi, x86/boot: Take RSDP address from boot params if available

2018-11-19 Thread Juergen Gross
In case the RSDP address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Signed-off-by: Juergen Gross --- arch/x86/include/uapi/asm/bootparam.h | 3 ++- arch/x86/kernel/acpi/boot.c | 2 +- 2 files

Re: [Xen-devel] [PATCH v4 11/19] xen: get memory map from hypervisor for PVH

2018-11-21 Thread Juergen Gross
On 15/11/2018 10:36, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:30PM +0100, Juergen Gross wrote: >> Retrieve the memory map from the hypervisor and normalize it to contain >> no overlapping entries and to be sorted by address. >> >> Signed-off-by: Juerg

Re: [Xen-devel] [PATCH v4 12/19] xen: add PCI MMIO areas to memory map

2018-11-21 Thread Juergen Gross
On 14/11/2018 13:48, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:31PM +0100, Juergen Gross wrote: >> Add possible PCI space MMIO areas as "Reserved" to the memory map in >> order to avoid using those areas for special Xen pages later. > > TBH, I'm not sur

Re: [Xen-devel] [PATCH v3] tools: set Dom0 UUID if requested

2018-11-20 Thread Juergen Gross
On 20/11/2018 19:09, Wei Liu wrote: > Introduce XEN_DOM0_UUID in Xen's global configuration file. Make > xen-init-dom0 accept an extra argument for UUID. > > Signed-off-by: Wei Liu Reviewed-by: Juergen Gross Juergen ___ Xen-devel mail

Re: [Xen-devel] [PATCH v4 13/19] xen: setup Xen specific data for PVH

2018-11-21 Thread Juergen Gross
On 15/11/2018 11:03, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:32PM +0100, Juergen Gross wrote: >> Initialize the needed Xen specific data. This is: >> >> - the Xen start of day page containing the console and Xenstore ring >> page PFN and event c

[Xen-devel] [PATCH v5 03/20] xen: carve out grant tab initialization into dedicated function

2018-11-21 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message

[Xen-devel] [PATCH v5 14/20] xen: init memory regions for PVH

2018-11-21 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross Reviewed-by: Daniel

[Xen-devel] [PATCH v5 17/20] xen: use elfnote defines instead of plain numbers

2018-11-21 Thread Juergen Gross
In order to avoid using plain integers for the ELF notes use the available Xen include instead. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- util/grub-mkimagexx.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git

Re: [Xen-devel] [PATCH v4 10/19] xen: setup hypercall page for PVH

2018-11-21 Thread Juergen Gross
On 20/11/2018 10:27, Juergen Gross wrote: > On 09/11/2018 19:12, Daniel Kiper wrote: >> On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote:>>> + >>> + asm volatile ("wrmsr" : : "c" (msr), "a" (pfn), "d" (0) : &quo

<    9   10   11   12   13   14   15   16   17   18   >