Re: [Xen-devel] [PATCH 05/22] mini-os: add boot code for HVMlite support

2016-08-23 Thread Juergen Gross
On 23/08/16 22:51, Samuel Thibault wrote: > Hello, > > It looks good, there is just: > > Juergen Gross, on Tue 23 Aug 2016 17:15:51 +0200, wrote: >> +.macro PTES prot, addr, incr, idx, end > > Please document what prot, addr, incr, idx, end represent precisely. Okay. > >> +

Re: [Xen-devel] [PATCH 06/22] mini-os: setup hypercall page for HVMlite

2016-08-23 Thread Juergen Gross
On 23/08/16 23:03, Samuel Thibault wrote: > hello, > > Juergen Gross, on Tue 23 Aug 2016 17:15:52 +0200, wrote: >> When running in HVMlite mode we need to setup the hypercall page by >> ourself. >> >> Signed-off-by: Juergen Gross >> --- >> >> +#else /* ifdef __x86_64__ */ >>

Re: [Xen-devel] [PATCH 20/22] mini-os: print start of day messages depending on domain type

2016-08-23 Thread Juergen Gross
On 24/08/16 00:51, Samuel Thibault wrote: > Juergen Gross, on Tue 23 Aug 2016 17:16:06 +0200, wrote: >> +printk("Xen Minimal OS (hvm)!\n"); >> +printk(" start_info: %p(VA)\n", si); >> +printk(" shared_inf: %p(VA)\n", HYPERVISOR_shared_info); >> +printk(" modlist:

[Xen-devel] [linux-3.18 baseline-only test] 67586: regressions - FAIL

2016-08-23 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 67586 linux-3.18 real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67586/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qcow221 leak-check/check

Re: [Xen-devel] [PATCH v4 04/16] generic-sections: add section core helpers

2016-08-23 Thread Nicholas Piggin
On Tue, 23 Aug 2016 19:33:06 +0200 "Luis R. Rodriguez" wrote: > On Tue, Aug 23, 2016 at 11:26:33AM +1000, Nicholas Piggin wrote: > > On Fri, 19 Aug 2016 14:34:02 -0700 > > mcg...@kernel.org wrote: > > > +/** > > > + * DOC: Standard ELF section use in Linux > > > + * > > > +

[Xen-devel] [PATCH v4 1/9] livepatch: Clear .bss when payload is reverted

2016-08-23 Thread Konrad Rzeszutek Wilk
So that when we apply the patch again the .bss is cleared. Otherwise we may find some variables containing old values. The payloads may contain various .bss - especially if -fdata-sections is used which can create .bss. sections. Signed-off-by: Konrad Rzeszutek Wilk ---

[Xen-devel] [PATCH v4 6/9] livepatch: Add parsing for the symbol+0x

2016-08-23 Thread Konrad Rzeszutek Wilk
in case we want to patch at specific offsets inside a function. (for example if we want to do NOP patching). Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall Cc: Stefano Stabellini

[Xen-devel] [PATCH v4 3/9] version/livepatch: Move xen_build_id_check to version.h

2016-08-23 Thread Konrad Rzeszutek Wilk
It makes more sense for it to be there. However that means the version.h has now a dependency on as the Elf_Note is a macro. The elfstructs.h has a dependency on types.h as well so we need that. We cannot put that #include in elfstructs.h as that file is used by tools and they do not have such

[Xen-devel] [PATCH v4 8/9] symbols: Generate an xen-sym.map

2016-08-23 Thread Konrad Rzeszutek Wilk
You could construct _most_ of the names of the functions by doing 'nm --defined' but unfortunatly you do not get the prefix that is added on in Xen . For example: $ cat xen-syms.symbols |grep do_domain_pause 0x82d080104920 t domain.c#do_domain_pause $ nm --defined xen-syms|grep

[Xen-devel] [PATCH v4] Livepatch fixes and features for v4.8.

2016-08-23 Thread Konrad Rzeszutek Wilk
Hey! Since v3: [https://lists.xen.org/archives/html/xen-devel/2016-08/msg01825.html] - Acked on reviews v2, v1: - Left over fixes and features that didn't get quite done in 4.7 Included are: - Bug-fixes - Parsing of symbol names encoded as: symbol+0x - NOP patching - Generating an symbol

[Xen-devel] [PATCH v4 7/9] livepatch: NOP if func->new_[addr] is zero.

2016-08-23 Thread Konrad Rzeszutek Wilk
The NOP functionality will NOP any of the code at the 'old_addr' or at 'name' if the 'new_addr' is zero. The purpose of this is to NOP out calls, such as: e8 <4-bytes-offset> (5 byte insn), or on ARM a 4 byte insn for branching. But on x86 we could NOP instructions that are much shorter or

[Xen-devel] [PATCH v4 2/9] livepatch: Deal with payloads without any .text

2016-08-23 Thread Konrad Rzeszutek Wilk
It is possible. Especially if the only thing they do is NOP functions - in which case there is only .livepatch.funcs sections. Reviewed-by: Jan Beulich Reviewed-by: Ross Lagerwall Signed-off-by: Konrad Rzeszutek Wilk ---

[Xen-devel] [PATCH v4 5/9] livepatch: Move code from prepare_payload to own routine

2016-08-23 Thread Konrad Rzeszutek Wilk
Specifically the code that is looking up f->old_addr - which can be in its own routine instead of having it part of prepare_payload. No functional change. Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Ross Lagerwall v3: First submission. v4:

[Xen-devel] [PATCH v4 9/9] livepach: Add .livepatch.hooks functions and test-case

2016-08-23 Thread Konrad Rzeszutek Wilk
From: Ross Lagerwall Add hook functions which run during patch apply and patch revert. Hook functions are used by livepatch payloads to manipulate data structures during patching, etc. One use case is the XSA91. As Martin mentions it: "If we have shadow variables, we

[Xen-devel] [PATCH v4 4/9] version: Print build-id at bootup.

2016-08-23 Thread Konrad Rzeszutek Wilk
Livepatch expected at some point to be able to print the build-id during bootup, which it did not. The reason is that xen_build_init and livepatch_init are both __initcall type routines. This meant that when livepatch_init called xen_build_id, it would return -ENODATA as build_id_len was not

[Xen-devel] [ovmf baseline-only test] 67585: all pass

2016-08-23 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 67585 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67585/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 93e59f76fe502100a66e971acfbc1c58c63f564d baseline

[Xen-devel] [linux-4.1 baseline-only test] 67584: regressions - FAIL

2016-08-23 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 67584 linux-4.1 real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67584/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-qemut-rhel6hvm-intel 9

Re: [Xen-devel] [PATCH -next] xen-netback: using kfree_rcu() to simplify the code

2016-08-23 Thread David Miller
From: Wei Yongjun Date: Mon, 22 Aug 2016 23:01:29 + > From: Wei Yongjun > > The callback function of call_rcu() just calls a kfree(), so we > can use kfree_rcu() instead of call_rcu() + callback function. > > Signed-off-by: Wei Yongjun

Re: [Xen-devel] [Minios-devel] [PATCH 17/22] mini-os: add get_cmdline() function

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:03 +0200, wrote: > The command line parameters are passed in start_info structure for pv, > but via hvm_start_info for HVMlite. Add a generic function to fill a > local cmdline variable with the command line string. > > Signed-off-by: Juergen Gross

Re: [Xen-devel] [PATCH 22/22] mini-os: support idle for HVMlite

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:08 +0200, wrote: > Instead of calling HYPERVISOR_sched_op(SCHEDOP_block, 0) we need to use > the "hlt" instruction with interrupts enabled to switch to idle when > running as HVMlite domain. > > This requires to setup a new timer in the timer handler as

Re: [Xen-devel] [PATCH 21/22] mini-os: get physical memory map

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:07 +0200, wrote: > On HVMlite we have to look at the physical memory map to know which > memory frames are usable. > > In order to make life easier we define a dummy memory map for other > domain types (pv and arm) which has just one entry with a maximum >

Re: [Xen-devel] [PATCH 20/22] mini-os: print start of day messages depending on domain type

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:06 +0200, wrote: > +printk("Xen Minimal OS (hvm)!\n"); > +printk(" start_info: %p(VA)\n", si); > +printk(" shared_inf: %p(VA)\n", HYPERVISOR_shared_info); > +printk(" modlist: 0x%lx(PA)\n", (unsigned long)si->modlist_paddr); It would

Re: [Xen-devel] [PATCH 19/22] mini-os: remove using start_info in architecture independent code

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:05 +0200, wrote: > The start_info structure should be used only in case of CONFIG_PARAVIRT > defined. Remove it from being used in other places. Especially the > usage as parameter for applications linked to the kernel is no good > idea. > > Signed-off-by:

Re: [Xen-devel] [PATCH 18/22] mini-os: map shared info page for HVMlite

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:04 +0200, wrote: > Add a service function to map the shared info page on a > non-paravirtualized system. The code is already existing on ARM side, > just move it to hypervisor.c. > > Signed-off-by: Juergen Gross Reviewed-by: Samuel

Re: [Xen-devel] [PATCH 16/22] mini-os: setup xenbus interface parameters

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:02 +0200, wrote: > In order to support HVMlite we need to get the ring page and event > channel from the hypervisor via hypercalls. Move the already existing > get_xenbus() function from arm specific coding to xenbus/xenbus.c and > provide a similar

Re: [Xen-devel] [PATCH 15/22] mini-os: setup console interface parameters

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:01 +0200, wrote: > In order to support HVMlite we need to get the ring page and event > channel from the hypervisor via hypercalls. Move the already existing > get_console() function from arm specific coding to > console/xencons_ring.c and provide a similar

Re: [Xen-devel] [PATCH 14/22] mini-os: add map_frame_virt() function

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:16:00 +0200, wrote: > Add a function map_frame_virt() to map a given frame and return its > virtual address. > > On arm we just use the frame physical address, while on x86 we take a > page from the virtual kernel area. For this purpose make this area >

Re: [Xen-devel] [PATCH 12/22] mini-os: add x86 native page table handling

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:58 +0200, wrote: > For support of HVMlite don't use mmu_update hypercalls, but write the > page table entries directly. > > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault > --- > arch/x86/mm.c

Re: [Xen-devel] [PATCH 11/22] mini-os: add static page tables for virtual kernel area for HVMlite

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:57 +0200, wrote: > In HVMlite mode we need the virtual kernel area for mapping of the > console and xenbus ring pages as especially on 32 bit architecture > their pfns might be above the supported maximum memory size. > > Add the page tables needed for

Re: [Xen-devel] [PATCH 10/22] mini-os: make p2m related code depend on CONFIG_PARAVIRT

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:56 +0200, wrote: > All handling related to p2m is needed for paravirtualized environment > only. So put all functions operating on p2m list in #ifdef > CONFIG_PARAVIRT sections. Add a paravirt.h header defining dummy > functions for non-paravirtualized

Re: [Xen-devel] [PATCH 09/22] mini-os: support HVMlite traps

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:55 +0200, wrote: > Trap handling in HVMlite domain is different from pv one. > > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault > --- > arch/x86/traps.c | 2 -- > arch/x86/x86_32.S | 19

Re: [Xen-devel] [PATCH 08/22] mini-os: initialize trap handling for HVMlite

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:54 +0200, wrote: > Trap handling for HVMlite domains requires an initialized IDT. > > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault > --- > arch/x86/setup.c | 15 -- > arch/x86/traps.c

Re: [Xen-devel] [PATCH 07/22] mini-os: support hvm_op hypercall

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:53 +0200, wrote: > Support the HYPERVISOR_hvm_op() hypercall which is needed for HVMlite. > Add convenience functions hvm_get_parameter() and hvm_set_parameter(). > > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault

Re: [Xen-devel] [PATCH v05 54/72] include/uapi/xen/privcmd.h: fix compilation in userspace

2016-08-23 Thread Stefano Stabellini
On Tue, 23 Aug 2016, Mikko Rapeli wrote: > On Tue, Aug 23, 2016 at 11:13:52AM -0700, Stefano Stabellini wrote: > > On Tue, 23 Aug 2016, Russell King - ARM Linux wrote: > > > On Mon, Aug 22, 2016 at 08:33:11PM +0200, Mikko Rapeli wrote: > > > > xen/interface/xen.h is not exported from kernel

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

2016-08-23 Thread osstest service owner
flight 100601 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/100601/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4962fcfa7d265824f01f74d782d5ed841ec8a72f baseline version: ovmf

Re: [Xen-devel] [PATCH 06/22] mini-os: setup hypercall page for HVMlite

2016-08-23 Thread Samuel Thibault
hello, Juergen Gross, on Tue 23 Aug 2016 17:15:52 +0200, wrote: > When running in HVMlite mode we need to setup the hypercall page by > ourself. > > Signed-off-by: Juergen Gross > --- > > +#else /* ifdef __x86_64__ */ > +#error "Unsupported architecture" > +#endif > + >

Re: [Xen-devel] [PATCH 05/22] mini-os: add boot code for HVMlite support

2016-08-23 Thread Samuel Thibault
Hello, It looks good, there is just: Juergen Gross, on Tue 23 Aug 2016 17:15:51 +0200, wrote: > +.macro PTES prot, addr, incr, idx, end Please document what prot, addr, incr, idx, end represent precisely. > +.ifgt \end-\idx-32 > +PTES \prot, \addr, \incr, \idx,

Re: [Xen-devel] [PATCH v05 54/72] include/uapi/xen/privcmd.h: fix compilation in userspace

2016-08-23 Thread Mikko Rapeli
On Tue, Aug 23, 2016 at 11:13:52AM -0700, Stefano Stabellini wrote: > On Tue, 23 Aug 2016, Russell King - ARM Linux wrote: > > On Mon, Aug 22, 2016 at 08:33:11PM +0200, Mikko Rapeli wrote: > > > xen/interface/xen.h is not exported from kernel headers so remove the > > > dependency and provide

Re: [Xen-devel] [PATCH v8 05/13] libxl: Load guest BIOS from file

2016-08-23 Thread Doug Goldstein
On 8/18/16 10:13 AM, Wei Liu wrote: > > +if (info->device_model_version == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { > +if (info->u.hvm.system_firmware) { > +bios_filename = info->u.hvm.system_firmware; > +} else { > +switch (info->u.hvm.bios) { > +

Re: [Xen-devel] [PATCH 03/22] mini-os: add CONFIG_PARAVIRT

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:49 +0200, wrote: > Add a new config macro CONFIG_PARAVIRT which defaults to be defined on > x86. This is the first step for supporting a HVMlite Mini-OS. > > Doing this via CONFIG_PARAVIRT instead of something like CONFIG_HVMLITE > was chosen as the arm

Re: [Xen-devel] [PATCH 13/22] mini-os: correct wrong calculation of alloc bitmap size

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:59 +0200, wrote: > When remapping the page allocator's bitmap for the ballooning support > the calculation of the needed size is wrong. This doesn't really > matter today as nothing is allocated after that bitmap, but it should > be corrected nevertheless.

Re: [Xen-devel] [PATCH 04/22] mini-os: make some memory management related macros usable from assembler

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:50 +0200, wrote: > Especially page table entry definitions are currently not usable from > assembler sources on x86 as the constants are defined with ULL suffix. > Change this by adding the suffix only when the header is included from > a C source. > > Hide

Re: [Xen-devel] [PATCH 02/22] mini-os: make dump_regs() work in early boot

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:48 +0200, wrote: > dump_regs() will result in page fault in early boot as there is no > current thread pointer. Handle this case. > > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault > --- >

Re: [Xen-devel] [PATCH 01/22] mini-os: resync xen headers

2016-08-23 Thread Samuel Thibault
Juergen Gross, on Tue 23 Aug 2016 17:15:47 +0200, wrote: > Use the latest Xen headers. > > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault > --- > include/xen/arch-x86/hvm/start_info.h | 98 > +++ >

Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-08-23 Thread Vitaly Kuznetsov
David Vrabel writes: > On 22/08/16 16:42, Vitaly Kuznetsov wrote: >> >> I see two ways to fix the issue: >> - Change the 'wire' protocol between netfront and netback to start keeping >> the original SKB structure. We'll have to add a flag indicating the fact >> that

[Xen-devel] [linux-3.18 test] 100597: tolerable FAIL - PUSHED

2016-08-23 Thread osstest service owner
flight 100597 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/100597/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-xsm 15 guest-start/debian.repeat fail in 100588 pass in 100597

Re: [Xen-devel] [PATCH v05 54/72] include/uapi/xen/privcmd.h: fix compilation in userspace

2016-08-23 Thread Stefano Stabellini
On Tue, 23 Aug 2016, Russell King - ARM Linux wrote: > On Mon, Aug 22, 2016 at 08:33:11PM +0200, Mikko Rapeli wrote: > > xen/interface/xen.h is not exported from kernel headers so remove the > > dependency and provide needed defines for domid_t and xen_pfn_t if they > > are not already defined by

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

2016-08-23 Thread osstest service owner
flight 100598 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/100598/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 93e59f76fe502100a66e971acfbc1c58c63f564d baseline version: ovmf

Re: [Xen-devel] [PATCH v4 04/16] generic-sections: add section core helpers

2016-08-23 Thread Luis R. Rodriguez
On Tue, Aug 23, 2016 at 11:26:33AM +1000, Nicholas Piggin wrote: > On Fri, 19 Aug 2016 14:34:02 -0700 > mcg...@kernel.org wrote: > > +/** > > + * DOC: Standard ELF section use in Linux > > + * > > + * Linux makes use of the standard ELF sections, this sections documents > > + * these. > > + */ > >

[Xen-devel] [qemu-mainline baseline-only test] 67583: tolerable FAIL

2016-08-23 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 67583 qemu-mainline real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67583/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-qemuu-nested-intel 16

[Xen-devel] [PATCH 1/3] x86/levelling: Restrict non-architectural OSXSAVE handling to emulated CPUID

2016-08-23 Thread Andrew Cooper
There is no need to extend the workaround to the faulted CPUID view, as Linux's dependence on the workaround is stricly via the emulated view. This causes a guest kernel faulted CPUID to observe architectural behaviour with respect to its CR4.OSXSAVE setting. Signed-off-by: Andrew Cooper

[Xen-devel] [PATCH 3/3] x86/levelling: Provide architectural OSXSAVE handling to masked native CPUID

2016-08-23 Thread Andrew Cooper
Contrary to c/s b2507fe7 "x86/domctl: Update PV domain cpumasks when setting cpuid policy", Intel CPUID masks are applied after fast forwarding hardware state, rather than before. (All behaviour in this regard appears completely undocumented by both Intel and AMD). Therefore, a set bit in the

[Xen-devel] [PATCH 2/3] x86/levelling: Pass a vcpu rather than a domain to ctxt_switch_levelling()

2016-08-23 Thread Andrew Cooper
A subsequent change needs to special-case OSXSAVE handling, which is per-vcpu rather than per-domain. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/cpu/amd.c | 3 ++- xen/arch/x86/cpu/common.c

[Xen-devel] [linux-4.1 test] 100594: tolerable FAIL - PUSHED

2016-08-23 Thread osstest service owner
flight 100594 linux-4.1 real [real] http://logs.test-lab.xenproject.org/osstest/logs/100594/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm 9 debian-hvm-install fail in 100587 pass in 100594

Re: [Xen-devel] [PATCH v4 14/16] kprobes: move kprobe declarations to asm-generic/kprobes.h

2016-08-23 Thread Luis R. Rodriguez
On Tue, Aug 23, 2016 at 12:11:40AM +0900, Masami Hiramatsu wrote: > On Fri, 19 Aug 2016 14:34:12 -0700 > mcg...@kernel.org wrote: > > > From: "Luis R. Rodriguez" > > > > Often all is needed is these small helpers, instead of compiler.h > > or a full kprobes.h. This is

[Xen-devel] [PATCH 13/22] mini-os: correct wrong calculation of alloc bitmap size

2016-08-23 Thread Juergen Gross
When remapping the page allocator's bitmap for the ballooning support the calculation of the needed size is wrong. This doesn't really matter today as nothing is allocated after that bitmap, but it should be corrected nevertheless. Signed-off-by: Juergen Gross --- balloon.c | 4

[Xen-devel] [PATCH 11/22] mini-os: add static page tables for virtual kernel area for HVMlite

2016-08-23 Thread Juergen Gross
In HVMlite mode we need the virtual kernel area for mapping of the console and xenbus ring pages as especially on 32 bit architecture their pfns might be above the supported maximum memory size. Add the page tables needed for doing the mapping. Signed-off-by: Juergen Gross ---

[Xen-devel] [PATCH 07/22] mini-os: support hvm_op hypercall

2016-08-23 Thread Juergen Gross
Support the HYPERVISOR_hvm_op() hypercall which is needed for HVMlite. Add convenience functions hvm_get_parameter() and hvm_set_parameter(). Signed-off-by: Juergen Gross --- arch/arm/setup.c | 15 --- hypervisor.c | 27

[Xen-devel] [PATCH 14/22] mini-os: add map_frame_virt() function

2016-08-23 Thread Juergen Gross
Add a function map_frame_virt() to map a given frame and return its virtual address. On arm we just use the frame physical address, while on x86 we take a page from the virtual kernel area. For this purpose make this area available even in case of undefined CONFIG_BALLOON. Signed-off-by: Juergen

[Xen-devel] [PATCH 10/22] mini-os: make p2m related code depend on CONFIG_PARAVIRT

2016-08-23 Thread Juergen Gross
All handling related to p2m is needed for paravirtualized environment only. So put all functions operating on p2m list in #ifdef CONFIG_PARAVIRT sections. Add a paravirt.h header defining dummy functions for non-paravirtualized environments. Instead of using references to start_info use dedicated

[Xen-devel] [PATCH 21/22] mini-os: get physical memory map

2016-08-23 Thread Juergen Gross
On HVMlite we have to look at the physical memory map to know which memory frames are usable. In order to make life easier we define a dummy memory map for other domain types (pv and arm) which has just one entry with a maximum memory size. Signed-off-by: Juergen Gross ---

[Xen-devel] [PATCH 15/22] mini-os: setup console interface parameters

2016-08-23 Thread Juergen Gross
In order to support HVMlite we need to get the ring page and event channel from the hypervisor via hypercalls. Move the already existing get_console() function from arm specific coding to console/xencons_ring.c and provide a similar paravirtualized function. Signed-off-by: Juergen Gross

[Xen-devel] [PATCH 03/22] mini-os: add CONFIG_PARAVIRT

2016-08-23 Thread Juergen Gross
Add a new config macro CONFIG_PARAVIRT which defaults to be defined on x86. This is the first step for supporting a HVMlite Mini-OS. Doing this via CONFIG_PARAVIRT instead of something like CONFIG_HVMLITE was chosen as the arm port can then drop some dummy routines needed for para-virtualization

[Xen-devel] [PATCH 16/22] mini-os: setup xenbus interface parameters

2016-08-23 Thread Juergen Gross
In order to support HVMlite we need to get the ring page and event channel from the hypervisor via hypercalls. Move the already existing get_xenbus() function from arm specific coding to xenbus/xenbus.c and provide a similar paravirtualized function. Signed-off-by: Juergen Gross

[Xen-devel] [PATCH 04/22] mini-os: make some memory management related macros usable from assembler

2016-08-23 Thread Juergen Gross
Especially page table entry definitions are currently not usable from assembler sources on x86 as the constants are defined with ULL suffix. Change this by adding the suffix only when the header is included from a C source. Hide some C prototypes when in assembler environment. Signed-off-by:

[Xen-devel] [PATCH 01/22] mini-os: resync xen headers

2016-08-23 Thread Juergen Gross
Use the latest Xen headers. Signed-off-by: Juergen Gross --- include/xen/arch-x86/hvm/start_info.h | 98 +++ include/xen/elfnote.h | 12 - 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644

[Xen-devel] [PATCH 22/22] mini-os: support idle for HVMlite

2016-08-23 Thread Juergen Gross
Instead of calling HYPERVISOR_sched_op(SCHEDOP_block, 0) we need to use the "hlt" instruction with interrupts enabled to switch to idle when running as HVMlite domain. This requires to setup a new timer in the timer handler as there is no guarantee the original timer event we are waiting for

[Xen-devel] [PATCH 12/22] mini-os: add x86 native page table handling

2016-08-23 Thread Juergen Gross
For support of HVMlite don't use mmu_update hypercalls, but write the page table entries directly. Signed-off-by: Juergen Gross --- arch/x86/mm.c | 147 +- arch/x86/traps.c | 10 include/x86/arch_mm.h | 4 ++

[Xen-devel] [PATCH 17/22] mini-os: add get_cmdline() function

2016-08-23 Thread Juergen Gross
The command line parameters are passed in start_info structure for pv, but via hvm_start_info for HVMlite. Add a generic function to fill a local cmdline variable with the command line string. Signed-off-by: Juergen Gross --- arch/x86/setup.c | 20 ++--

[Xen-devel] [PATCH 06/22] mini-os: setup hypercall page for HVMlite

2016-08-23 Thread Juergen Gross
When running in HVMlite mode we need to setup the hypercall page by ourself. Signed-off-by: Juergen Gross --- arch/x86/events.c | 4 ++-- arch/x86/setup.c | 26 ++ include/x86/os.h | 22 +- 3 files changed, 45 insertions(+), 7

[Xen-devel] [PATCH 00/22] mini-os: support HVMlite mode

2016-08-23 Thread Juergen Gross
This patch series adds HVMlite support for Mini-OS. Setting CONFIG_PARAVIRT to "n" (default is "y") will build mini-os as a HVMlite domain on x86. Both 32- and 64-bit builds are supported. Tested with plain Mini-OS configuration to work in 32- and 64-bit mode either paravirtualized or as HVM

[Xen-devel] [PATCH 19/22] mini-os: remove using start_info in architecture independent code

2016-08-23 Thread Juergen Gross
The start_info structure should be used only in case of CONFIG_PARAVIRT defined. Remove it from being used in other places. Especially the usage as parameter for applications linked to the kernel is no good idea. Signed-off-by: Juergen Gross --- arch/arm/setup.c | 8

[Xen-devel] [PATCH 18/22] mini-os: map shared info page for HVMlite

2016-08-23 Thread Juergen Gross
Add a service function to map the shared info page on a non-paravirtualized system. The code is already existing on ARM side, just move it to hypervisor.c. Signed-off-by: Juergen Gross --- arch/arm/arm32.S | 4 ++-- arch/arm/setup.c | 11 +-- arch/x86/setup.c

[Xen-devel] [PATCH 08/22] mini-os: initialize trap handling for HVMlite

2016-08-23 Thread Juergen Gross
Trap handling for HVMlite domains requires an initialized IDT. Signed-off-by: Juergen Gross --- arch/x86/setup.c | 15 -- arch/x86/traps.c | 88 +++ arch/x86/x86_64.S | 4 +++ include/x86/os.h | 1 + 4 files

[Xen-devel] [PATCH 02/22] mini-os: make dump_regs() work in early boot

2016-08-23 Thread Juergen Gross
dump_regs() will result in page fault in early boot as there is no current thread pointer. Handle this case. Signed-off-by: Juergen Gross --- arch/x86/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/traps.c b/arch/x86/traps.c index

[Xen-devel] [PATCH 09/22] mini-os: support HVMlite traps

2016-08-23 Thread Juergen Gross
Trap handling in HVMlite domain is different from pv one. Signed-off-by: Juergen Gross --- arch/x86/traps.c | 2 -- arch/x86/x86_32.S | 19 ++-- arch/x86/x86_64.S | 22 +- include/x86/os.h | 67

[Xen-devel] [PATCH 20/22] mini-os: print start of day messages depending on domain type

2016-08-23 Thread Juergen Gross
Select what to print in arch_init() depending on the domain type. Signed-off-by: Juergen Gross --- arch/x86/setup.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/arch/x86/setup.c b/arch/x86/setup.c index

[Xen-devel] [PATCH 05/22] mini-os: add boot code for HVMlite support

2016-08-23 Thread Juergen Gross
A HVMlite domain is always starting in 32 bit mode. Add the appropriate boot code to arch/x86 for the non-paravirtualized case. For this boot code to become active we need to suppress the pv related elfnotes and add an appropriate elfnote for HVMlite. As the HVMlite boot code is more or less the

[Xen-devel] [xen-unstable test] 100592: tolerable FAIL

2016-08-23 Thread osstest service owner
flight 100592 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/100592/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-rtds 6 xen-boot fail in 100585 pass in 100592 test-armhf-armhf-xl-arndale 6

[Xen-devel] [distros-debian-snapshot test] 67581: tolerable FAIL

2016-08-23 Thread Platform Team regression test user
flight 67581 distros-debian-snapshot real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67581/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-armhf-daily-netboot-pygrub 9 debian-di-install fail like 67540

[Xen-devel] [libvirt test] 100593: tolerable FAIL - PUSHED

2016-08-23 Thread osstest service owner
flight 100593 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/100593/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt-xsm 12 migrate-support-checkfail never pass test-amd64-i386-libvirt-xsm 12

[Xen-devel] [xen-unstable baseline-only test] 67580: tolerable FAIL

2016-08-23 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 67580 xen-unstable real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67580/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): build-amd64-rumpuserxen 6 xen-build

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

2016-08-23 Thread osstest service owner
flight 100589 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/100589/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 16 guest-stop fail like 100581 test-amd64-amd64-xl-rtds

[Xen-devel] [ovmf baseline-only test] 67582: all pass

2016-08-23 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 67582 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/67582/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 90fadfc00ad773441aeb97718cd9c2e3dc7d2f71 baseline

Re: [Xen-devel] [PATCH v05 54/72] include/uapi/xen/privcmd.h: fix compilation in userspace

2016-08-23 Thread Russell King - ARM Linux
On Mon, Aug 22, 2016 at 08:33:11PM +0200, Mikko Rapeli wrote: > xen/interface/xen.h is not exported from kernel headers so remove the > dependency and provide needed defines for domid_t and xen_pfn_t if they > are not already defined by some other e.g. Xen specific headers. I'm confused. How did

Re: [Xen-devel] [PATCH v2] x86/PV: don't wrongly hide/expose CPUID.OSXSAVE from/to user mode

2016-08-23 Thread Jan Beulich
>>> On 23.08.16 at 11:48, wrote: > On 23/08/16 10:41, Jan Beulich wrote: > On 23.08.16 at 11:24, wrote: >>> On 23/08/16 10:00, Jan Beulich wrote: >>> On 22.08.16 at 19:30, wrote: > On 19/08/16 19:07,

Re: [Xen-devel] [PATCH v2] x86/PV: don't wrongly hide/expose CPUID.OSXSAVE from/to user mode

2016-08-23 Thread Andrew Cooper
On 23/08/16 10:41, Jan Beulich wrote: On 23.08.16 at 11:24, wrote: >> On 23/08/16 10:00, Jan Beulich wrote: >> On 22.08.16 at 19:30, wrote: On 19/08/16 19:07, Andrew Cooper wrote: > On 19/08/16 18:09, Andrew Cooper wrote:

Re: [Xen-devel] [PATCH v2] x86/PV: don't wrongly hide/expose CPUID.OSXSAVE from/to user mode

2016-08-23 Thread Jan Beulich
>>> On 23.08.16 at 11:24, wrote: > On 23/08/16 10:00, Jan Beulich wrote: > On 22.08.16 at 19:30, wrote: >>> On 19/08/16 19:07, Andrew Cooper wrote: On 19/08/16 18:09, Andrew Cooper wrote: > On 19/08/16 13:53, Jan Beulich wrote:

Re: [Xen-devel] [PATCH 0/2] Fix issue with {OVMF,SEABIOS}_PATH

2016-08-23 Thread Andrew Cooper
On 22/08/16 16:05, Wei Liu wrote: > They shouldn't be available when the respective BIOS is disabled at build > time. > > This should fix the issus that causes xtf fail to launch hvm guests. > > Wei Liu (2): > tools: only define {OVMF,SEABIOS}_PATH when they are enabled > libxl: only return

Re: [Xen-devel] [PATCH v2] x86/PV: don't wrongly hide/expose CPUID.OSXSAVE from/to user mode

2016-08-23 Thread Andrew Cooper
On 23/08/16 10:00, Jan Beulich wrote: On 22.08.16 at 19:30, wrote: >> On 19/08/16 19:07, Andrew Cooper wrote: >>> On 19/08/16 18:09, Andrew Cooper wrote: On 19/08/16 13:53, Jan Beulich wrote: > User mode code generally cannot be expected to invoke the

Re: [Xen-devel] [PATCH v2] x86/PV: don't wrongly hide/expose CPUID.OSXSAVE from/to user mode

2016-08-23 Thread Jan Beulich
>>> On 22.08.16 at 19:30, wrote: > On 19/08/16 19:07, Andrew Cooper wrote: >> On 19/08/16 18:09, Andrew Cooper wrote: >>> On 19/08/16 13:53, Jan Beulich wrote: User mode code generally cannot be expected to invoke the PV-enabled CPUID Xen supports, and prior

Re: [Xen-devel] [PATCHv2 2/2] xen/privcmd: add ioctls for locking/unlocking hypercall buffers

2016-08-23 Thread Andrew Cooper
On 23/08/16 09:46, Jan Beulich wrote: On 22.08.16 at 19:24, wrote: >> On 04/08/16 17:02, Jan Beulich wrote: >> On 04.08.16 at 17:16, wrote: Using mlock() for hypercall buffers is not sufficient since mlocked pages are still

Re: [Xen-devel] [PATCHv2 2/2] xen/privcmd: add ioctls for locking/unlocking hypercall buffers

2016-08-23 Thread Jan Beulich
>>> On 22.08.16 at 19:24, wrote: > On 04/08/16 17:02, Jan Beulich wrote: > On 04.08.16 at 17:16, wrote: >>> Using mlock() for hypercall buffers is not sufficient since mlocked >>> pages are still subject to compaction and page migration.

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

2016-08-23 Thread osstest service owner
flight 100590 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/100590/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 90fadfc00ad773441aeb97718cd9c2e3dc7d2f71 baseline version: ovmf

[Xen-devel] [linux-3.18 test] 100588: regressions - FAIL

2016-08-23 Thread osstest service owner
flight 100588 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/100588/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-xsm 15 guest-start/debian.repeat fail REGR. vs. 100385 Regressions which