Re: [Xen-devel] [PATCH] x86/boot: Fix boot following c/s b6c2c7f48a

2018-01-12 Thread Jan Beulich
>>> On 12.01.18 at 01:05, wrote: > c/s b6c2c7f48a unfortunately broke booting on affected systems. Most of the > time, ioemul_handle_quirk() doesn't write a custom stub, and the redundant > call was depending on the seemingly-pointless writing of the default stub. > > Alter the ioemul_handle_qui

[Xen-devel] [xen-unstable test] 117790: regressions - FAIL

2018-01-12 Thread osstest service owner
flight 117790 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/117790/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-ws16-amd64 16 guest-localmigrate/x10 fail REGR. vs. 117311 Tests which

Re: [Xen-devel] [PATCH] xen/credit2: Drop unnecessary bit test

2018-01-12 Thread Dario Faggioli
On Thu, 2018-01-11 at 17:36 +, Andrew Cooper wrote: > It is generally worth doing a read to conditionally avoid a locked > RMW, > in the case that you expect the locked RMW to be unnecessary (i.e. > the > modification is already present). > > The same is not true for plain memory reads and wri

Re: [Xen-devel] [PATCH RFC v1 42/74] sched/null: skip vCPUs on the waitqueue that are blocked

2018-01-12 Thread Dario Faggioli
Hi! First of all, my filters somehow failed to highlight this for me, so sorry if I did not notice it earlier (and now, I need new filters anyway, as the email I'm using is different :-D). I'll have a look at the patch ASAP. On Mon, 2018-01-08 at 11:12 +, George Dunlap wrote: > On 01/08/2018

[Xen-devel] [PATCH] x86: Meltdown band-aid against malicious 64-bit PV guests

2018-01-12 Thread Jan Beulich
This is a very simplistic change limiting the amount of memory a running 64-bit PV guest has mapped (and hence available for attacking): Only the mappings of stack, IDT, and TSS are being cloned from the direct map into per-CPU page tables. Guest controlled parts of the page tables are being copied

Re: [Xen-devel] [PATCH RFC v1 42/74] sched/null: skip vCPUs on the waitqueue that are blocked

2018-01-12 Thread Dario Faggioli
On Thu, 2018-01-04 at 13:05 +, Wei Liu wrote: > From: Roger Pau Monne > > Avoid scheduling vCPUs that are blocked, there's no point in > assigning > them to a pCPU because they are not going to run anyway. > > Since blocked vCPUs are not assigned to pCPUs after this change, > force > a resch

Re: [Xen-devel] [PATCH RFC v1 42/74] sched/null: skip vCPUs on the waitqueue that are blocked

2018-01-12 Thread Roger Pau Monné
On Fri, Jan 12, 2018 at 10:54:03AM +0100, Dario Faggioli wrote: > Hi! > > First of all, my filters somehow failed to highlight this for me, so > sorry if I did not notice it earlier (and now, I need new filters > anyway, as the email I'm using is different :-D). > > I'll have a look at the patch

Re: [Xen-devel] [PATCH] x86/bitops: Introduce variable/constant pairs for __{set, clear, change}_bit()

2018-01-12 Thread Dario Faggioli
On Thu, 2018-01-11 at 16:34 +, Andrew Cooper wrote: > Just as with test_bit, the non-atomic set/clear/change helpers can be > better > optimised by the compiler in the case that the nr parameter is > constant, and > it often is. > > This results in a general replacement of `mov $imm, %reg; bt*

[Xen-devel] [distros-debian-jessie test] 74300: trouble: blocked/broken

2018-01-12 Thread Platform Team regression test user
flight 74300 distros-debian-jessie real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/74300/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-i38

[Xen-devel] [qemu-upstream-4.10-testing test] 117803: trouble: blocked/broken/fail/pass

2018-01-12 Thread osstest service owner
flight 117803 qemu-upstream-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/117803/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-

Re: [Xen-devel] [PATCH RFC v1 42/74] sched/null: skip vCPUs on the waitqueue that are blocked

2018-01-12 Thread Dario Faggioli
On Fri, 2018-01-12 at 10:45 +, Roger Pau Monné wrote: > On Fri, Jan 12, 2018 at 10:54:03AM +0100, Dario Faggioli wrote: > > > Err... yes. BTW, either there are a couple of typos in the above > > paragraph, or it's me that can't read it well. Anyway, just to be > > clear, if we have 4 pCPUs, and

Re: [Xen-devel] [PATCH RFC v1 42/74] sched/null: skip vCPUs on the waitqueue that are blocked

2018-01-12 Thread Roger Pau Monné
On Fri, Jan 12, 2018 at 12:16:47PM +0100, Dario Faggioli wrote: > On Fri, 2018-01-12 at 10:45 +, Roger Pau Monné wrote: > > On Fri, Jan 12, 2018 at 10:54:03AM +0100, Dario Faggioli wrote: > > > > > Err... yes. BTW, either there are a couple of typos in the above > > > paragraph, or it's me that

Re: [Xen-devel] [PATCH] x86/link: Don't merge .init.text and .init.data

2018-01-12 Thread Jan Beulich
>>> On 11.01.18 at 15:17, wrote: > c/s 1308f0170c merged .init.text and .init.data, because EFI might properly > write-protect r/o sections. > > However, this change makes xen-syms unusable for disassembly analysis. In > particular, searching for indirect branches as part of the SP2/Spectre > mi

Re: [Xen-devel] [PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-01-12 Thread Daniel Kiper
Hi Ard, On Thu, Jan 11, 2018 at 12:51:07PM +, Ard Biesheuvel wrote: > On 9 January 2018 at 14:22, Daniel Kiper wrote: > > Hi, > > > > Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel > > may not even know that it runs on secure boot enabled platform. > > Hi Daniel, > >

[Xen-devel] [PATCH v2 04/62] tools/libelf: fix elf notes check for PVH guest

2018-01-12 Thread Wei Liu
PVH only requires PHYS32_ENTRY to be set. Return immediately if that's the case. Also remove the printk in pvh_load_kernel. Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/dom0_build.c | 4 xen/common/libelf/libelf-dominfo.c | 9 - 2 files changed, 8 in

[Xen-devel] [PATCH v2 03/62] tools/libxc: remove extraneous newline in xc_dom_load_acpi

2018-01-12 Thread Wei Liu
Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper --- tools/libxc/xc_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c index b5f316a1dc..303cb971e8 100644 --- a/tools/libxc/xc_dom_core.c +++ b/tools/libxc/xc_dom_c

[Xen-devel] [PATCH v2 09/62] ACPICA: Make ACPI Power Management Timer (PM Timer) optional.

2018-01-12 Thread Wei Liu
From: Bob Moore PM Timer is now optional. This support is already in Windows8 and "SHOULD" come out in ACPI 5.0A (if all goes well). The change doesn't affect Xen directly, because it does not rely on the presence of the PM timer. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by

[Xen-devel] [PATCH v2 05/62] tools/libxc: Multi modules support

2018-01-12 Thread Wei Liu
From: Jonathan Ludlam Signed-off-by: Jonathan Ludlam Signed-off-by: Sergey Dyasli Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --- stubdom/grub/kexec.c | 7 +- tools/helpers/init-xenstore-domain.c | 4 +- tools/libxc/include/xc_dom.h | 48 ++- tool

[Xen-devel] [PATCH v2 06/62] xen/common: Widen the guest logging buffer slightly

2018-01-12 Thread Wei Liu
From: Andrew Cooper This reduces the amount of line wrapping from guests; Xen in particular likes to print lines longer than 80 characters. Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu --- xen/include/xen/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/inc

[Xen-devel] [PATCH v2 02/62] xen/x86: report domain id on cpuid

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Use the ECX register of the hypervisor leaf 5. The EAX register on this leaf is a flags field that can be used to notice the presence of the domain id in ECX. Note that this is only available to HVM guests. Signed-off-by: Roger Pau Monné --- Changes since v1: - Use leaf 5

[Xen-devel] [PATCH v2 01/62] x86/svm: Offer CPUID Faulting to AMD HVM guests as well

2018-01-12 Thread Wei Liu
From: Andrew Cooper CPUID Faulting can be virtulised for HVM guests without hardware support, meaning it can be offered to SVM guests. Signed-off-by: Andrew Cooper --- xen/arch/x86/hvm/svm/svm.c | 6 ++ xen/arch/x86/msr.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) di

[Xen-devel] [PATCH v2 00/62] Comet: Run PV in PVH container

2018-01-12 Thread Wei Liu
Hi all This is a patch series to run PV guest inside a PVH container. It should also support running under HVM mode but we've not extensively tested it. The future plan is for this to merge with the Vixen work Amazon did. The series can be found at: https://xenbits.xen.org/git-http/people/l

Re: [Xen-devel] [PATCH] x86/bitops: Introduce variable/constant pairs for __{set, clear, change}_bit()

2018-01-12 Thread Jan Beulich
>>> On 11.01.18 at 17:34, wrote: > Just as with test_bit, the non-atomic set/clear/change helpers can be better > optimised by the compiler in the case that the nr parameter is constant, and > it often is. > > This results in a general replacement of `mov $imm, %reg; bt* %reg, mem` with > the mor

[Xen-devel] [PATCH v2 08/62] x86/link: Introduce and use SECTION_ALIGN

2018-01-12 Thread Wei Liu
From: Andrew Cooper ... to reduce the quantity of #ifdef EFI. Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu --- CC: Jan Beulich --- xen/arch/x86/xen.lds.S | 50 +- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/xen/arch/x86

[Xen-devel] [PATCH v2 07/62] x86/time: Print a more helpful error when a platform timer can't be found

2018-01-12 Thread Wei Liu
From: Andrew Cooper Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu --- xen/arch/x86/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 2a879502a2..3b654d7b7d 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c

[Xen-devel] [PATCH v2 34/62] x86: don't swallow the first command line item in guest mode

2018-01-12 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/arch/x86/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 32ec741591..0c9b55ff71 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -632,8 +632,8 @@ static char * __init cm

[Xen-devel] [PATCH v2 38/62] x86/shim: Kconfig and command line options

2018-01-12 Thread Wei Liu
From: Andrew Cooper Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --- docs/misc/xen-command-line.markdown | 11 ++ xen/arch/x86/Kconfig| 22 +++ xen/arch/x86/pv/Makefile| 1 + xen/arch/x86/pv/shim.c | 39 ++

[Xen-devel] [PATCH v2 12/62] tools/ocaml: Extend domain_create() to take arch_domainconfig

2018-01-12 Thread Wei Liu
From: Jon Ludlam No longer passing NULL into xc_domain_create() allows for the creation of PVH guests. Signed-off-by: Jon Ludlam Signed-off-by: Andrew Cooper --- tools/ocaml/libs/xc/xenctrl.ml | 2 +- tools/ocaml/libs/xc/xenctrl.mli | 2 +- tools/ocaml/libs/xc/xenctrl_stubs.c | 22

[Xen-devel] [PATCH v2 47/62] xen/pvshim: forward evtchn ops between L0 Xen and L2 DomU

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Note that the unmask and the virq operations are handled by the shim itself, and that FIFO event channels are not exposed to the guest. Signed-off-by: Roger Pau Monné Signed-off-by: Anthony Liguori Signed-off-by: Sergey Dyasli --- Changes since v1: - Use find_first_set_

[Xen-devel] [PATCH v2 51/62] xen/pvshim: add shim_mem cmdline parameter

2018-01-12 Thread Wei Liu
From: Sergey Dyasli Signed-off-by: Sergey Dyasli --- docs/misc/xen-command-line.markdown | 16 + xen/arch/x86/dom0_build.c | 18 ++- xen/arch/x86/pv/shim.c | 46 + xen/include/asm-x86/pv/shim.h | 6 +

[Xen-devel] [PATCH v2 14/62] x86: Common cpuid faulting support

2018-01-12 Thread Wei Liu
From: Andrew Cooper With CPUID Faulting offered to SVM guests, move Xen's faulting code to being common rather than Intel specific. This is necessary for nested Xen (inc. pv-shim mode) to prevent PV guests from finding the outer HVM Xen leaves via native cpuid. Signed-off-by: Andrew Cooper ---

[Xen-devel] [PATCH v2 27/62] xen/pvshim: keep track of used PFN ranges

2018-01-12 Thread Wei Liu
Simple infrastructure to keep track of PFN space usage, so that we can use unpopulated PFNs to map special pages like shared info and grant table. As rangeset depends on malloc being ready so hypervisor_setup is introduced for things that can be initialised late in the process. Note that the PFN

[Xen-devel] [PATCH v2 24/62] x86/pvh: Retrieve memory map from Xen

2018-01-12 Thread Wei Liu
Signed-off-by: Wei Liu Signed-off-by: Andrew Cooper Signed-off-by: Roger Pau Monné --- v2: fixed clang build, dropped rb tag --- xen/arch/x86/e820.c | 3 +-- xen/arch/x86/guest/pvh-boot.c | 20 xen/arch/x86/guest/xen.c | 3 +++ xen/a

[Xen-devel] [PATCH v2 16/62] x86/link: Relocate program headers

2018-01-12 Thread Wei Liu
From: Andrew Cooper When the xen binary is loaded by libelf (in the future) we rely on the elf loader to load the binary accordingly. Specify the load address so that the resulting binary can make p_vaddr and p_paddr have different values. Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --

[Xen-devel] [PATCH v2 45/62] xen/pvshim: modify Dom0 builder in order to build a DomU

2018-01-12 Thread Wei Liu
From: Roger Pau Monne According to the PV ABI the initial virtual memory regions should contain the xenstore and console pages after the start_info. Also set the correct values in the start_info for DomU operation. Signed-off-by: Roger Pau Monné --- Changes since v1: - Modify the position of t

[Xen-devel] [PATCH v2 28/62] x86/guest: map shared_info page

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Use an unpopulated PFN in order to map it. Signed-off-by: Roger Pau Monne Signed-off-by: Wei Liu Signed-off-by: Andrew Cooper --- Changes since v1: - Use an unpopulated PFN to map the shared_info page. - Mask all event channels. - Report XENMEM_add_to_physmap error co

[Xen-devel] [PATCH v2 52/62] xen/pvshim: set max_pages to the value of tot_pages

2018-01-12 Thread Wei Liu
From: Roger Pau Monne So that the guest is not able to deplete the memory pool of the shim itself by trying to balloon up. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- xen/arch/x86/pv/shim.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/pv/shim.c b/xen/arc

[Xen-devel] [PATCH v2 35/62] x86/guest: setup event channel upcall vector

2018-01-12 Thread Wei Liu
From: Roger Pau Monne And a dummy event channel upcall handler. Note that with the current code the underlying Xen (L0) must support HVMOP_set_evtchn_upcall_vector or else event channel setup is going to fail. This limitation can be lifted by implementing more event channel interrupt injection m

[Xen-devel] [PATCH v2 61/62] xl: pvshim: Provide and document xl config

2018-01-12 Thread Wei Liu
From: Ian Jackson Signed-off-by: Ian Jackson Signed-off-by: Wei Liu --- v2: pvshim, not pvhshim works with type "pvh", not type "pv" pvshim_etc. options in config are not erroneously ignored --- docs/man/xl.cfg.pod.5.in | 35 +++ tools/xl/xl_parse.c

[Xen-devel] [PATCH v2 23/62] x86/shutdown: Support for using SCHEDOP_{shutdown, reboot}

2018-01-12 Thread Wei Liu
From: Andrew Cooper Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- v2: 1. Use sched_shutdown 2. Move header inclusion --- docs/misc/xen-command-line.markdown | 3 +++ xen/arch/x86/shutdown.c | 34 ++ xen/includ

[Xen-devel] [PATCH v2 21/62] x86/entry: Probe for Xen early during boot

2018-01-12 Thread Wei Liu
From: Andrew Cooper Signed-off-by: Andrew Cooper --- v2: Add __read_mostly. --- xen/arch/x86/guest/Makefile | 2 ++ xen/arch/x86/guest/xen.c| 75 + xen/arch/x86/setup.c| 2 ++ xen/include/asm-x86/guest.h | 1 + xen/include/a

[Xen-devel] [PATCH v2 46/62] xen/pvshim: set correct domid value

2018-01-12 Thread Wei Liu
From: Roger Pau Monne If domid is not provided by L0 set domid to 1 by default. Note that L0 not provinding the domid can cause trouble if the guest tries to use it's domid instead of DOMID_SELF when performing hypercalls that are forwarded to the L0 hypervisor. Since the domain created is no lo

[Xen-devel] [PATCH v2 60/62] libxl: pvshim: Introduce pvshim_extra

2018-01-12 Thread Wei Liu
From: Ian Jackson And move the debugging options from the default config into a doc comment in libxl_types.idl. Signed-off-by: Ian Jackson --- v2: pvshim, not pvhshim works with type "pvh", not type "pv" --- tools/libxl/libxl.h | 2 +- tools/libxl/libxl_create.c | 5 - tools

[Xen-devel] [PATCH v2 49/62] x86/pv-shim: shadow PV console's page for L2 DomU

2018-01-12 Thread Wei Liu
From: Sergey Dyasli Signed-off-by: Sergey Dyasli Signed-off-by: Wei Liu [remove notify_guest helper and directly use pv_shim_inject_evtchn] Signed-off-by: Roger Pau Monné Signed-off-by: Wei Liu --- Changes since v1: - Use pv_shim_inject_evtchn. --- xen/arch/x86/pv/shim.c | 31

[Xen-devel] [PATCH v2 53/62] xen/pvshim: support vCPU hotplug

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Signed-off-by: Roger Pau Monné --- Changes since v1: - Fix hotplug so that v->initialized is checked before attempting to bring up the physical CPU. - Fix ARM compilation. --- xen/arch/x86/pv/shim.c| 63 +++ xen/common/d

[Xen-devel] [PATCH v2 19/62] x86/entry: Early PVH boot code

2018-01-12 Thread Wei Liu
Signed-off-by: Wei Liu Signed-off-by: Andrew Cooper --- v2: 1. Fix comment. 2. Use cmpb $0. 3. Address comments on pvh-boot.c. 4. Haven't changed the pritnk modifiers to accommodate future changes. 5. Missing a prerequisite patch to relocate pvh_info to make __va work reliably. [BLOCKER]. ---

[Xen-devel] [PATCH v2 33/62] x86: read wallclock from Xen when running in pvh mode

2018-01-12 Thread Wei Liu
Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- xen/arch/x86/time.c | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 4cbd068d17..c90524de9c 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86

[Xen-devel] [PATCH v2 13/62] x86/fixmap: Modify fix_to_virt() to return a void pointer

2018-01-12 Thread Wei Liu
From: Andrew Cooper Almost all users of fix_to_virt() actually want a pointer. Include the cast within the definition, so the callers don't need to. Two users which need the integer value are switched to using __fix_to_virt() directly. A few users stay fully unchanged, due to GCC's void pointe

[Xen-devel] [PATCH v2 48/62] xen/pvshim: add grant table operations

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Signed-off-by: Roger Pau Monné Signed-off-by: Anthony Liguori Signed-off-by: Andrew Cooper --- Changes since v1: - Use __ of copy_to_guest. - Return EOPNOTSUPP for not implemented grant table hypercalls. - Forward user provided buffer in GNTTABOP_query_size. - Rewrite

[Xen-devel] [PATCH v2 32/62] x86: APIC timer calibration when running as a guest

2018-01-12 Thread Wei Liu
The timer calibration currently depends on PIT. Introduce a variant to wait for a tick's worth of time to elapse when running as a PVH guest. Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- xen/arch/x86/apic.c | 38 ++ 1 file changed, 30 insertions(+), 8

[Xen-devel] [PATCH v2 36/62] x86/guest: add PV console code

2018-01-12 Thread Wei Liu
From: Sergey Dyasli Signed-off-by: Sergey Dyasli Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --- xen/drivers/char/Makefile | 1 + xen/drivers/char/xen_pv_console.c | 205 ++ xen/include/asm-x86/fixmap.h | 1 + xen/include/as

[Xen-devel] [PATCH v2 57/62] xen/shim: crash instead of reboot in shim mode

2018-01-12 Thread Wei Liu
From: Roger Pau Monne All guest shutdown operations are forwarded to L0, so the only native calls to machine_restart happen from crash related paths inside the hypervisor, hence switch the reboot code to instead issue a crash shutdown. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich [ wei

[Xen-devel] [PATCH v2 29/62] xen/guest: fetch vCPU ID from Xen

2018-01-12 Thread Wei Liu
From: Roger Pau Monne If available. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich [ wei: fix non-shim build ] Signed-off-by: Wei Liu --- xen/arch/x86/guest/xen.c| 23 +++ xen/arch/x86/smpboot.c | 4 xen/include/asm-x86/guest/xen.h | 7 +++

[Xen-devel] [PATCH v2 54/62] xen/pvshim: memory hotplug

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Signed-off-by: Roger Pau Monné --- Changes since v1: - Add an order parameter to batch_memory_op. - Add a TODO item regarding high order memory chunks to pv_shim_online_memory. - Use page_list_splice. - Make sure the shim handlers are not called multiple times when

[Xen-devel] [PATCH v2 22/62] x86/guest: Hypercall support

2018-01-12 Thread Wei Liu
From: Andrew Cooper Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --- v2: append underscores to tmp. --- xen/arch/x86/guest/Makefile | 1 + xen/arch/x86/guest/hypercall_page.S | 79 ++ xen/arch/x86/guest/xen.c | 5 ++ xen/arch/x86/xe

[Xen-devel] [PATCH v2 10/62] xen/domctl: Return arch_config via getdomaininfo

2018-01-12 Thread Wei Liu
From: Andrew Cooper This allows toolstack software to distinguish HVM from PVH guests. Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- v2: bump domctl version number --- tools/libxc/include/xenctrl.h | 1 + tools/libxc/xc_domain.c | 1 + xen/arch/x86/do

[Xen-devel] [PATCH v2 42/62] sched/null: skip vCPUs on the waitqueue that are blocked

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Avoid scheduling vCPUs that are down, there's no point in assigning them to a pCPU because they are not going to run anyway. Since down vCPUs are not assigned to pCPUs after this change, force a rescheduling when a vCPU is brought up if it's on the waitqueue. Also when sch

[Xen-devel] [PATCH v2 41/62] xen/pvh: do not mark the low 1MB as IO mem

2018-01-12 Thread Wei Liu
From: Roger Pau Monne On PVH there's nothing special on the low 1MB. This is an optional patch that doesn't affect the functionality of the shim. Signed-off-by: Roger Pau Monné Signed-off-by: Andrew Cooper --- xen/arch/x86/mm.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[Xen-devel] [PATCH v2 17/62] x86: introduce ELFNOTE macro

2018-01-12 Thread Wei Liu
It is needed later for introducing PVH entry point. Signed-off-by: Wei Liu --- v2: 1. Specify section attribute and type. 2. Use p2align. 3. Align instructions. 4. Haven't used .L or turned it into assembly macro. --- xen/include/asm-x86/asm_defns.h | 12 1 file changed, 12 insertio

[Xen-devel] [PATCH v2 11/62] tools/ocaml: Expose arch_config in domaininfo

2018-01-12 Thread Wei Liu
From: Andrew Cooper Signed-off-by: Andrew Cooper --- tools/ocaml/libs/xc/xenctrl.ml | 29 + tools/ocaml/libs/xc/xenctrl.mli | 28 tools/ocaml/libs/xc/xenctrl_stubs.c | 26 -- 3 files changed, 81 insertions

[Xen-devel] [PATCH v2 25/62] xen/console: Introduce console=xen

2018-01-12 Thread Wei Liu
This specifies whether to use Xen specific console output. There are two variants: one is the hypervisor console, the other is the magic debug port 0xe9. Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --- xen/drivers/char/console.c| 46 +++ xen/i

[Xen-devel] [PATCH v2 37/62] x86/guest: use PV console for Xen/Dom0 I/O

2018-01-12 Thread Wei Liu
From: Sergey Dyasli Signed-off-by: Sergey Dyasli Signed-off-by: Wei Liu --- docs/misc/xen-command-line.markdown | 5 - xen/arch/x86/guest/xen.c| 3 +++ xen/drivers/char/console.c | 16 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/do

[Xen-devel] [PATCH v2 58/62] xen/shim: allow DomU to have as many vcpus as available

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Since the shim VCPUOP_{up/down} hypercall is wired to the plug/unplug of CPUs to the shim itself, start the shim DomU with only the BSP online, and let the guest bring up other CPUs as it needs them. Signed-off-by: Roger Pau Monné --- Changes since v1: - Fix single line c

[Xen-devel] [PATCH v2 50/62] xen/pvshim: add migration support

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Signed-off-by: Roger Pau Monné --- Changes since v1: - Use bitmap_zero instead of memset. - Don't drop the __init attribute of unshare_xen_page_with_guest, it's not needed for migration. - Remove BUG_ON to check correct mapping, map_domain_page cannot fail. - Redu

[Xen-devel] [PATCH v2 56/62] xen/pvshim: use default position for the m2p mappings

2018-01-12 Thread Wei Liu
From: Roger Pau Monne When running a 32bit kernel as Dom0 on a 64bit hypervisor the hypervisor will try to shrink the hypervisor hole to the minimum needed, and thus requires the Dom0 to use XENMEM_machphys_mapping in order to fetch the position of the start of the hypervisor virtual mappings. D

[Xen-devel] [PATCH v2 15/62] x86/Kconfig: Options for Xen and PVH support

2018-01-12 Thread Wei Liu
From: Andrew Cooper Introduce two options. One to detect whether the binary is running on Xen, the other enables PVH ABI support. The former will be useful to PV in HVM approach. Both will be used by PV in PVH approach. Signed-off-by: Andrew Cooper Signed-off-by: Wei Liu --- v2: Write commit

[Xen-devel] [PATCH v2 40/62] xen/x86: make VGA support selectable

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Through a Kconfig option. Enable it by default, and disable it for the PV-in-PVH shim. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Signed-off-by: Wei Liu --- tools/firmware/xen-dir/shim.config | 2 -- xen/arch/x86/Kconfig | 1 - xen/arch/x86/bo

[Xen-devel] [PATCH v2 20/62] x86/boot: Map more than the first 16MB

2018-01-12 Thread Wei Liu
From: Andrew Cooper TODO: Replace somehow (bootstrap_map() ?) Signed-off-by: Andrew Cooper --- xen/arch/x86/boot/x86_64.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S index cf47e019f5..42636cf334 100644 --- a/xen/

[Xen-devel] [PATCH v2 44/62] xen: mark xenstore/console pages as RAM

2018-01-12 Thread Wei Liu
From: Roger Pau Monne This si required so that later they can be shared with the guest if Xen is running in shim mode. Also prevent them from being used by Xen by marking them as bad pages in init_boot_pages. Signed-off-by: Roger Pau Monné Signed-off-by: Wei Liu --- Changes since v1: - Remov

[Xen-devel] [PATCH v2 26/62] xen: introduce rangeset_claim_range

2018-01-12 Thread Wei Liu
Reserve a hole in a rangeset. Signed-off-by: Roger Pau Monne Signed-off-by: Wei Liu --- Changes since v1: - Change function name. - Use a local variable instead of *s. - Add unlikely to the !prev case. - Move the function prototype position in the header file. --- xen/common/rangeset.c

[Xen-devel] [PATCH v2 55/62] xen/shim: modify shim_mem parameter behaviour

2018-01-12 Thread Wei Liu
From: Roger Pau Monne shim_mem will now account for both the memory used by the hypervisor loaded in memory and the free memory slack given to the shim for runtime usage. From experimental testing it seems like the total amount of MiB used by the shim (giving it ~1MB of free memory for runtime)

[Xen-devel] [PATCH v2 18/62] x86: produce a binary that can be booted as PVH

2018-01-12 Thread Wei Liu
Produce a binary that can be booted as PVH. It doesn't do much yet. Signed-off-by: Wei Liu Signed-off-by: Andrew Cooper --- v2: 1. Remove shim-y dependency. 2. Remove extraneous blank line. 3. Fix bugs in xen.lds.S. 4. Haven't split code into pvh.S because that will break later patches. ---

[Xen-devel] [PATCH v2 43/62] xen/pvshim: skip Dom0-only domain builder parts

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Do not allow access to any iomem or ioport by the shim, and also remove the check for Dom0 kernel support. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- xen/arch/x86/dom0_build.c| 4 xen/arch/x86/pv/dom0_build.c | 3 ++- 2 files changed, 6 insertions(

[Xen-devel] [PATCH v2 59/62] libxl: pvshim: Provide first-class config settings to enable shim mode

2018-01-12 Thread Wei Liu
From: Ian Jackson This is API-compatible because old callers are supposed to call libxl_*_init to initialise the struct; and the updated function clears these members. It is ABI-compatible because the new fields make this member of the guest type union larger but only within the existing size of

[Xen-devel] [PATCH v2 39/62] tools/firmware: Build and install xen-shim

2018-01-12 Thread Wei Liu
From: Andrew Cooper Link a minimum set of files to build the shim. The linkfarm rune can handle creation and deletion of files. Introduce build-shim and install-shim targets in xen/Makefile. We can do better by properly generate the dependency from the list of files but that's an improvement for

[Xen-devel] [PATCH v2 30/62] x86/guest: map per-cpu vcpu_info area.

2018-01-12 Thread Wei Liu
From: Roger Pau Monne Mapping the per-vcpu vcpu_info area is required in order to use more than XEN_LEGACY_MAX_VCPUS. Signed-off-by: Roger Pau Monné Signed-off-by: Wei Liu --- Changes since v1: - Make vcpu_info_mapped static. - Add a BUG_ON in case VCPUOP_register_vcpu_info fails. - Remove

[Xen-devel] [PATCH v2 62/62] xl: Default guest mode changed from PV to PVH with PV shim

2018-01-12 Thread Wei Liu
From: Ian Jackson If the config file specifies a type (or builder), it overrides this default. But if it doesn't, you now get a PV-in-PVH guest. Signed-off-by: Ian Jackson --- v2: New patch --- tools/xl/xl_parse.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --gi

[Xen-devel] [PATCH v2 31/62] x86: xen pv clock time source

2018-01-12 Thread Wei Liu
It is a variant of TSC clock source. Signed-off-by: Wei Liu Signed-off-by: Andrew Cooper Signed-off-by: Roger Pau Monné --- Changes since v1: - Use the mapped vcpu_info. --- xen/arch/x86/time.c | 89 + 1 file changed, 89 insertions(+) diff

[Xen-devel] Xen Security Advisory 254 (CVE-2017-5753, CVE-2017-5715, CVE-2017-5754) - Information leak via side effects of speculative execution

2018-01-12 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-5753,CVE-2017-5715,CVE-2017-5754 / XSA-254 version 5 Information leak via side effects of speculative execution UPDATES IN VERSION 5 PV-in-PVH/HVM shim a

[Xen-devel] [PATCH v3 4/6] tools: libxendevicemodel: Provide xendevicemodel_add_to_physmap

2018-01-12 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall Acked-by: Ian Jackson Reviewed-by: Paul Durrant --- Changed in v3: * Match width of size with updated hypervisor interface. * Match description with the one for the hypervisor interface. Changed in v2: * Make it operate on a range. tools/libs/devicemodel/Makefil

[Xen-devel] [PATCH v3 0/6] Add dmops to allow use of VGA with restricted QEMU

2018-01-12 Thread Ross Lagerwall
The recently added support for restricting QEMU prevents use of the VGA console. This series addresses that by adding a couple of new dmops. A corresponding patch for QEMU is needed to make use of the new dmops. Changes in v3: * Address Jan's comments - primarily adding a new patch to remove the

[Xen-devel] [PATCH v3 2/6] x86/hvm: Provide XEN_DMOP_add_to_physmap

2018-01-12 Thread Ross Lagerwall
Provide XEN_DMOP_add_to_physmap, a limited version of XENMEM_add_to_physmap to allow a deprivileged QEMU to move VRAM when a guest programs its BAR. It is equivalent to XENMEM_add_to_physmap with space == XENMAPSPACE_gmfn_range. Signed-off-by: Ross Lagerwall --- Changed in v3: * Renamed idx -> s

[Xen-devel] [PATCH v3 5/6] tools: libxendevicemodel: Provide xendevicemodel_pin_memory_cacheattr

2018-01-12 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall Acked-by: Ian Jackson Reviewed-by: Paul Durrant --- tools/libs/devicemodel/core.c | 19 +++ tools/libs/devicemodel/include/xendevicemodel.h | 14 ++ tools/libs/devicemodel/libxendevicemodel.map| 1 + 3 files change

[Xen-devel] [PATCH v3 1/6] xen/mm: Make xenmem_add_to_physmap global

2018-01-12 Thread Ross Lagerwall
Make it global in preparation to be called by a new dmop. Signed-off-by: Ross Lagerwall Reviewed-by: Paul Durrant Acked-by: Jan Beulich --- xen/common/memory.c | 5 ++--- xen/include/xen/mm.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/common/memory.c b/xen/com

[Xen-devel] [PATCH v3 6/6] x86/domctl: Remove XEN_DOMCTL_pin_mem_cacheattr

2018-01-12 Thread Ross Lagerwall
Remove the implementation of XEN_DOMCTL_pin_mem_cacheattr since it has been replaced by a dmop. Change xc_domain_pin_memory_cacheattr() so that it is only defined when XC_WANT_COMPAT_DEVICEMODEL_API is set and have it call the new dmop. Leave the definitions of XEN_DOMCTL_MEM_CACHEATTR_* since the

[Xen-devel] [PATCH v3 3/6] x86/hvm: Provide XEN_DMOP_pin_memory_cacheattr

2018-01-12 Thread Ross Lagerwall
Provide XEN_DMOP_pin_memory_cacheattr to allow a deprivileged QEMU to pin the caching type of RAM after moving the VRAM. It is equivalent to XEN_DOMCTL_pin_memory_cacheattr. Signed-off-by: Ross Lagerwall Reviewed-by: Paul Durrant Reviewed-by: Jan Beulich --- Changed in v2: * Check pad is 0.

[Xen-devel] vixen and vfb, missing vfb support in qemu

2018-01-12 Thread Olaf Hering
It seems the list of missing features of vixen does not cover the lack of framebuffer support. 'xl create -Vf PV.cfg' would show the guest console in the VNC window. With vixen this can not work because the vfb code triggers only for PV guests. Is that missing feature on anyones radar already? At

Re: [Xen-devel] [PATCH] xen/efi: Avoid EFI stub using absolute symbols

2018-01-12 Thread Jan Beulich
>>> On 09.01.18 at 20:43, wrote: > When I compiled the snippet on x86 and Arm, no relocation is available > for the pointers to string in the array in the final binary. Yet they > are available in the object. I can see them there in the binary I look at. I use my own tool for dumping, so the ou

[Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Wei Liu
Hi all, Two solutions are proposed to mitigate Meltdown. One is called Vixen and the other is called Comet. The long term goal is to merge the two implementations to one. Here I list the differences between the two implementations. Vixen Comet Boot

Re: [Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Jan Beulich
>>> On 12.01.18 at 14:24, wrote: > Here I list the differences between the two implementations. Thanks for the summary. > Vixen Comet > Boot mode HVMPVH + HVM > Kconfig options XEN_GUEST

Re: [Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Wei Liu
On Fri, Jan 12, 2018 at 06:57:09AM -0700, Jan Beulich wrote: > >>> On 12.01.18 at 14:24, wrote: > > Here I list the differences between the two implementations. > > Thanks for the summary. > > > Vixen Comet > > Boot mode HVM

Re: [Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Olaf Hering
On Fri, Jan 12, Wei Liu wrote: > Vixen Comet > Guest console Output onlyBi-directional With the proper patch input works for Vixen. Unless this item mean something else. Olaf signature.asc Description: PGP signature ___

Re: [Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Roger Pau Monné
On Fri, Jan 12, 2018 at 01:24:09PM +, Wei Liu wrote: > Hi all, > > Two solutions are proposed to mitigate Meltdown. One is called Vixen and the > other is called Comet. The long term goal is to merge the two implementations > to one. > > Here I list the differences between the two implementat

Re: [Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Wei Liu
On Fri, Jan 12, 2018 at 03:17:04PM +0100, Olaf Hering wrote: > On Fri, Jan 12, Wei Liu wrote: > > > Vixen Comet > > Guest console Output onlyBi-directional > > With the proper patch input works for Vixen. Unless this item

[Xen-devel] [xen-unstable-smoke test] 117924: tolerable all pass - PUSHED

2018-01-12 Thread osstest service owner
flight 117924 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/117924/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [Xen-devel] Rudolph: merging Vixen and Comet

2018-01-12 Thread Wei Liu
On Fri, Jan 12, 2018 at 02:18:33PM +, Roger Pau Monné wrote: > On Fri, Jan 12, 2018 at 01:24:09PM +, Wei Liu wrote: > > Hi all, > > > > Two solutions are proposed to mitigate Meltdown. One is called Vixen and the > > other is called Comet. The long term goal is to merge the two > > implem

[Xen-devel] [PATCH] fixup! libxl: pvshim: Provide first-class config settings to enable shim mode

2018-01-12 Thread Ian Jackson
Earlier versions of this patch have an erroneous hunk which will stop PV guests from working at all! Signed-off-by: Ian Jackson CC: Wei Liu --- tools/libxl/libxl_create.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 278ad6

[Xen-devel] [PATCH] fixup! libxl: pvshim: Provide first-class config settings to enable shim mode

2018-01-12 Thread Ian Jackson
Earlier versions of this patch have an erroneous hunk which will stop PV guests from working at all! Signed-off-by: Ian Jackson CC: Wei Liu --- tools/libxl/libxl_create.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 278ad6

[Xen-devel] [qemu-upstream-unstable test] 117814: tolerable FAIL - PUSHED

2018-01-12 Thread osstest service owner
flight 117814 qemu-upstream-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/117814/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemuu-debianhvm-amd64 16 guest-localmigrate/x10 fail in 117763 pass in 117814 te

Re: [Xen-devel] [PATCH] x86: Meltdown band-aid against malicious 64-bit PV guests

2018-01-12 Thread George Dunlap
On Fri, Jan 12, 2018 at 10:19 AM, Jan Beulich wrote: > This is a very simplistic change limiting the amount of memory a running > 64-bit PV guest has mapped (and hence available for attacking): Only the > mappings of stack, IDT, and TSS are being cloned from the direct map > into per-CPU page tabl

  1   2   >