Re: [Xen-devel] [PATCH 22/22] vixen: dom0 builder support

2018-01-07 Thread Roger Pau Monné
On Sat, Jan 06, 2018 at 02:54:37PM -0800, Anthony Liguori wrote: > From: Anthony Liguori > > The dom0 builder requires a number of modifications in order to be > able to launch unprivileged guests. The console and store pages > must be mapped in a specific location within

[Xen-devel] [xen-unstable-coverity test] 117698: all pass - PUSHED

2018-01-07 Thread osstest service owner
flight 117698 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/117698/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen 2d1c82261d966735e82e5971eddb63ba3c565a37 baseline version: xen

Re: [Xen-devel] [PATCH 09/22] vixen: modify the e820 table to advertise HVM special pages as RAM

2018-01-07 Thread Roger Pau Monné
On Sat, Jan 06, 2018 at 02:54:24PM -0800, Anthony Liguori wrote: > diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c > index a56f875..935901b 100644 > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -122,6 +122,7 @@ > #include > #include > #include > +#include > > #include >

Re: [Xen-devel] [PATCH 10/22] vixen: do not permit access to physical IRQs if in Vixen mode

2018-01-07 Thread Roger Pau Monné
On Sat, Jan 06, 2018 at 02:54:25PM -0800, Anthony Liguori wrote: > From: Anthony Liguori > > Our intention is for the Vixen guest to be deprivileged so we need > to avoid permitting access to each IRQ even though it is technically > the hardware domain. I'm still not sure I

[Xen-devel] [libvirt test] 117662: tolerable all pass - PUSHED

2018-01-07 Thread osstest service owner
flight 117662 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/117662/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 117589 test-armhf-armhf-libvirt-raw 13

Re: [Xen-devel] [PATCH 17/22] vixen: setup infrastructure to receive event channel notifications

2018-01-07 Thread Roger Pau Monné
On Sat, Jan 06, 2018 at 02:54:32PM -0800, Anthony Liguori wrote: > From: Anthony Liguori > > This patch registers an interrupt handler using either an INTx > interrupt from the platform PCI device, CALLBACK_IRQ vector > delivery, or evtchn_upcall_vector depending on what the

[Xen-devel] [BUG] unable to shutdown (page fault in mwait_idle()/do_dbs_timer()/__find_next_bit()) (fwd)

2018-01-07 Thread Martin Cerveny
Hello. I cannot shutdown XEN4.10.0 (probability 10%) with crash during "Preparing system for ACPI S5 state." @xen-users recomends to bugreport. - dom0 - 4.13.9-300.fc27.x86_64 - hw - supermicro/X9DR3-F/CPU E5-2620 Known problem ? How to fix it ? Thanks, Martin

Re: [Xen-devel] Xen Project Spectre/Meltdown FAQ

2018-01-07 Thread Marek Marczykowski-Górecki
On Fri, Jan 05, 2018 at 07:05:56PM +, Andrew Cooper wrote: > On 05/01/18 18:16, Rich Persaud wrote: > >> On Jan 5, 2018, at 06:35, Lars Kurth >> > wrote: > >> Linux’s KPTI series is designed to address SP3 only.  For Xen guests, > >>

[Xen-devel] [PATCH v2 17/23] vixen: setup infrastructure to receive event channel notifications

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori This patch registers an interrupt handler using either an INTx interrupt from the platform PCI device, CALLBACK_IRQ vector delivery, or evtchn_upcall_vector depending on what the parent hypervisor supports. The event channel polling code comes from

[Xen-devel] [PATCH v2 20/23] vixen: event channel passthrough support

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori For Vixen, we do not want to pass through all event channel operations as HVM guests do not have nearly as many event channel interactions as PV and on older versions of Xen, there is no reliable way to wake up an event channel on VCPU != 0 leading to a

[Xen-devel] [PATCH v2 23/23] vixen: use default position for the m2p mappings

2018-01-07 Thread Anthony Liguori
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

Re: [Xen-devel] [PATCH 09/22] vixen: modify the e820 table to advertise HVM special pages as RAM

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:16 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:24PM -0800, Anthony Liguori wrote: >> diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c >> index a56f875..935901b 100644 >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@

Re: [Xen-devel] [PATCH 16/22] vixen: pass grant table operations through to the outer Xen

2018-01-07 Thread Andrew Cooper
On 07/01/2018 15:42, Anthony Liguori wrote: > On Sun, Jan 7, 2018 at 12:36 AM, Roger Pau Monné wrote: >> On Sat, Jan 06, 2018 at 02:54:31PM -0800, Anthony Liguori wrote: >>> static long >>> +vixen_gnttab_setup_table( >>> +XEN_GUEST_HANDLE_PARAM(gnttab_setup_table_t)

[Xen-devel] [linux-3.18 test] 117676: trouble: blocked/broken/fail/pass

2018-01-07 Thread osstest service owner
flight 117676 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/117676/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm broken

Re: [Xen-devel] [PATCH 16/22] vixen: pass grant table operations through to the outer Xen

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 9:09 AM, Anthony Liguori wrote: > On Sun, Jan 7, 2018 at 8:45 AM, Andrew Cooper > wrote: >> On 07/01/2018 15:42, Anthony Liguori wrote: >>> On Sun, Jan 7, 2018 at 12:36 AM, Roger Pau Monné >>>

[Xen-devel] [PATCH v2 22/23] vixen: dom0 builder support

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori The dom0 builder requires a number of modifications in order to be able to launch unprivileged guests. The console and store pages must be mapped in a specific location within the guest's initial page table. We also have to setup the start info to be

[Xen-devel] [PATCH v2 00/23] Vixen: A PV-in-HVM shim

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori CVE-2017-5754 is problematic for paravirtualized x86 domUs because it appears to be very difficult to isolate the hypervisor's page tables from PV domUs while maintaining ABI compatibility. Instead of trying to make a KPTI-like approach work for Xen

[Xen-devel] [PATCH v2 04/23] x86: Don't use potentially incorrect CPUID values for topology information

2018-01-07 Thread Anthony Liguori
From: Jan H. Schönherr Intel says for CPUID leaf 0Bh: "Software must not use EBX[15:0] to enumerate processor topology of the system. This value in this field (EBX[15:0]) is only intended for display/diagnostic purposes. The actual number of logical processors

[Xen-devel] [PATCH v2 15/23] vixen: pass through version hypercalls to parent Xen

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori This is necessary to trigger event channel upcalls but it is also useful to passthrough the full version information such that the guest believes it is running on the parent Xen. Signed-off-by: Matt Wilson Signed-off-by: Anthony

[Xen-devel] [PATCH v2 09/23] vixen: modify the e820 table to advertise HVM special pages as RAM

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori In order to be able to assign the Xenstore page into the Vixen guest, we need struct page_info's to exist. We do this by modifying the e820 table early in boot and then using the badpages handling to prevent these pages from being added to the xenheap.

[Xen-devel] [PATCH v2 07/23] vixen: introduce is_vixen() to allow altering behavior

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori Vixen (Virtualized Xen) is a paravirtual mode of Xen where paravirtual I/O is passed through from the parent hypervisor all the way through the dom0 guest. The dom0 guest is also deprivileged and renumbered to give the appearance that it is running as

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

2018-01-07 Thread Anthony Liguori
From: Andrew Cooper Signed-off-by: Andrew Cooper --- v1 -> v2 - ARM stubs --- xen/arch/x86/Makefile | 1 + xen/arch/x86/guest/Makefile | 1 + xen/arch/x86/guest/xen.c| 75 +

[Xen-devel] [PATCH v2 11/23] vixen: early initialization of Vixen including shared_info mapping

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori We split initialization of Vixen into two parts. The first part just detects the presence of an HVM hypervisor so that we can figure out whether to modify the e820 table. The later initialization is used to actually map the shared_info structure from

[Xen-devel] [PATCH v2 14/23] vixen: forward VCPUOP_register_runstate_memory_area to outer Xen

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori This allows for proper accounting of steal time within the guest. Signed-off-by: Anthony Liguori --- xen/common/domain.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index

[Xen-devel] [PATCH v2 19/23] vixen: Fix Vixen adaptation of send_global_virq()

2018-01-07 Thread Anthony Liguori
From: Jan H. Schönherr The function originally did the following unconditionally: send_guest_global_virq(global_virq_handlers[virq] ?: hardware_domain, virq); The new variant should reflect the non-Vixen case correctly. Signed-off-by: Jan H. Schönherr

[Xen-devel] [PATCH v2 06/23] console: do not print banner if below info log threshold

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori Only print the banner if the log threshold is at least info. For Vixen guests, we want the console output to be exactly what the PV guest would show on it's own. That means the inner Xen banner can potentially break automation that assumes a specific

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

2018-01-07 Thread Anthony Liguori
From: Andrew Cooper Signed-off-by: Andrew Cooper --- xen/arch/x86/Kconfig | 17 + 1 file changed, 17 insertions(+) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 7c45829..07530bf 100644 ---

[Xen-devel] [PATCH v2 12/23] vixen: paravirtualization TSC frequency calculation

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori Otherwise when time sharing a physical CPU, the calculation can be bogus resulting in time drift for the guest due to improper frequency within pvclock. Signed-off-by: Anthony Liguori --- xen/arch/x86/guest/vixen.c| 22

[Xen-devel] [PATCH v2 18/23] vixen: Introduce ECS_PROXY for event channel proxying

2018-01-07 Thread Anthony Liguori
From: Jan H. Schönherr Previously, we would keep proxied event channels as ECS_INTERDOMAIN channel around. This works for most things, but has the problem that EVTCHNOP_status is broken, and that EVTCHNOP_close does not mark an event channel as free. Introduce a separate

[Xen-devel] [PATCH v2 16/23] vixen: pass grant table operations through to the outer Xen

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori The grant table is a region of guest memory that contains GMFNs which in PV are MFNs but are PFNs in HVM. Since a Vixen guest MFN is an HVM PFN, we can pass this table directly through to the outer Xen which cuts down considerably on overhead. We do

[Xen-devel] [PATCH v2 10/23] vixen: do not permit access to physical IRQs if in Vixen mode

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori Our intention is for the Vixen guest to be deprivileged so we need to avoid permitting access to each IRQ even though it is technically the hardware domain. Signed-off-by: Anthony Liguori --- xen/arch/x86/irq.c | 3 ++- 1 file

Re: [Xen-devel] [PATCH 00/22] Vixen: A PV-in-HVM shim

2018-01-07 Thread Anthony Liguori
I sent a v2 out with most of the changes discussed in this thread. The only things missing are getting rid of hardware_domain and ECS_RESERVED vs. ECS_PROXY. Regards, Anthony Liguori On Sat, Jan 6, 2018 at 4:05 PM, Anthony Liguori wrote: > On Sat, Jan 6, 2018 at 3:50 PM,

[Xen-devel] [PATCH v2 05/23] char: optionally redirect {, g}printk output to QEMU debug log

2018-01-07 Thread Anthony Liguori
From: Matt Wilson When using Vixen, it is helpful to get the Xen messages in a separate channel than the console output. Add an option to output to the QEMU backdoor logging port. Signed-off-by: Matt Wilson --- v1 -> v2 - #ifdef for !x86_64 ---

[Xen-devel] [PATCH v2 03/23] x86/guest: Hypercall support

2018-01-07 Thread Anthony Liguori
From: Andrew Cooper Signed-off-by: Andrew Cooper --- xen/arch/x86/guest/Makefile | 1 + xen/arch/x86/guest/hypercall_page.S | 79 ++ xen/arch/x86/guest/xen.c | 5 ++

Re: [Xen-devel] [PATCH 10/22] vixen: do not permit access to physical IRQs if in Vixen mode

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:18 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:25PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> Our intention is for the Vixen guest to be deprivileged so we need >> to avoid permitting access to

Re: [Xen-devel] [PATCH 16/22] vixen: pass grant table operations through to the outer Xen

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 8:45 AM, Andrew Cooper wrote: > On 07/01/2018 15:42, Anthony Liguori wrote: >> On Sun, Jan 7, 2018 at 12:36 AM, Roger Pau Monné >> wrote: >>> On Sat, Jan 06, 2018 at 02:54:31PM -0800, Anthony Liguori wrote: static

Re: [Xen-devel] [PATCH 11/22] vixen: early initialization of Vixen including shared_info mapping

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:23 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:26PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> We split initialization of Vixen into two parts. The first part >> just detects the presence of an

Re: [Xen-devel] [PATCH 15/22] vixen: pass through version hypercalls to parent Xen

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:31 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:30PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> This is necessary to trigger event channel upcalls but it is also > > I'm lost here, what does

Re: [Xen-devel] [PATCH 22/22] vixen: dom0 builder support

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 1:02 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:37PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> The dom0 builder requires a number of modifications in order to be >> able to launch unprivileged

[Xen-devel] [seabios test] 117678: regressions - trouble: broken/fail/pass

2018-01-07 Thread osstest service owner
flight 117678 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/117678/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-debianhvm-amd64-xsmbroken test-amd64-amd64-qemuu-nested-amd

[Xen-devel] [PATCH v2 21/23] vixen: provide Xencons implementation

2018-01-07 Thread Anthony Liguori
From: Anthony Liguori Our initial approach exposed the console ring directly to guests which worked well except for the fact that very old versions of Xen did not support console ring for HVM guests. It also proved to be complicated from a management tool perspective since

[Xen-devel] [PATCH v2 13/23] vixen: Use SCHEDOP_shutdown to shutdown the machine

2018-01-07 Thread Anthony Liguori
From: Jan H. Schönherr While the hwdom_shutdown() is able to reboot the system, it fails to properly power it off. With SCHEDOP_shutdown, we delegate the problem. Signed-off-by: Jan H. Schönherr --- xen/common/domain.c | 14 ++ 1 file

Re: [Xen-devel] [PATCH 16/22] vixen: pass grant table operations through to the outer Xen

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:36 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:31PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> The grant table is a region of guest memory that contains GMFNs >> which in PV are MFNs but are

Re: [Xen-devel] [PATCH 15/22] vixen: pass through version hypercalls to parent Xen

2018-01-07 Thread Andrew Cooper
On 07/01/2018 15:40, Anthony Liguori wrote: > On Sun, Jan 7, 2018 at 12:31 AM, Roger Pau Monné wrote: >> On Sat, Jan 06, 2018 at 02:54:30PM -0800, Anthony Liguori wrote: >>> From: Anthony Liguori >>> >>> This is necessary to trigger event channel

Re: [Xen-devel] Xen Project Spectre/Meltdown FAQ

2018-01-07 Thread Andrew Cooper
On 07/01/2018 15:00, Marek Marczykowski-Górecki wrote: > On Fri, Jan 05, 2018 at 07:05:56PM +, Andrew Cooper wrote: >> On 05/01/18 18:16, Rich Persaud wrote: On Jan 5, 2018, at 06:35, Lars Kurth > wrote: Linux’s KPTI

Re: [Xen-devel] [PATCH 17/22] vixen: setup infrastructure to receive event channel notifications

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:42 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:32PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> This patch registers an interrupt handler using either an INTx >> interrupt from the platform PCI

Re: [Xen-devel] [PATCH 18/22] vixen: Introduce ECS_PROXY for event channel proxying

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 12:44 AM, Roger Pau Monné wrote: > On Sat, Jan 06, 2018 at 02:54:33PM -0800, Anthony Liguori wrote: >> From: Jan H. Schönherr >> >> Previously, we would keep proxied event channels as ECS_INTERDOMAIN >> channel around. This works

[Xen-devel] [xen-4.7-testing test] 117674: trouble: blocked/broken/fail/pass

2018-01-07 Thread osstest service owner
flight 117674 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/117674/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm broken

Re: [Xen-devel] [PATCH v2 09/23] vixen: modify the e820 table to advertise HVM special pages as RAM

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 4:18 PM, Konrad Rzeszutek Wilk wrote: > On Sun, Jan 07, 2018 at 12:28:25PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori > > ..snip. >> diff --git a/xen/arch/x86/guest/vixen.c b/xen/arch/x86/guest/vixen.c >> index

Re: [Xen-devel] [BUG] kernel bug encountered at drivers/net/xen-netback/netback.c:430!

2018-01-07 Thread 'Christoph Moench-Tegeder'
## Paul Durrant (paul.durr...@citrix.com): > > I could try a new kernel (KPTI, yay!) with that "mildly suspicious" commit > > cc8737a5fe9051b7fa052b08c57ddb9f539c389a reverted on the weekend and > > report back (just to rule that out - like you, I don't really believe > > that this is the cause).

Re: [Xen-devel] [PATCH v2 09/23] vixen: modify the e820 table to advertise HVM special pages as RAM

2018-01-07 Thread Konrad Rzeszutek Wilk
On Sun, Jan 07, 2018 at 12:28:25PM -0800, Anthony Liguori wrote: > From: Anthony Liguori ..snip. > diff --git a/xen/arch/x86/guest/vixen.c b/xen/arch/x86/guest/vixen.c > index c0a81dd..cacbe69 100644 > --- a/xen/arch/x86/guest/vixen.c > +++ b/xen/arch/x86/guest/vixen.c > @@

[Xen-devel] debian bugs: kaiser patch break pvh v1

2018-01-07 Thread Hans van Kranenburg
Hi, At debian, we have reports of users that were apparently using PVH v1 with Xen 4.8 and Linux 4.9. After the debian kernel team included the meltdown patches, PVH v1 breaks: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886591 So, my questions are: 1. Should we just gently tell the

[Xen-devel] [xen-4.9-testing test] 117680: regressions - trouble: broken/fail/pass

2018-01-07 Thread osstest service owner
flight 117680 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/117680/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qcow2broken test-amd64-amd64-pair

Re: [Xen-devel] [PATCH v2 15/23] vixen: pass through version hypercalls to parent Xen

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 4:27 PM, Konrad Rzeszutek Wilk wrote: > On Sun, Jan 07, 2018 at 12:28:31PM -0800, Anthony Liguori wrote: >> From: Anthony Liguori >> >> This is necessary to trigger event channel upcalls but it is also >> useful to passthrough

Re: [Xen-devel] [PATCH v2 13/23] vixen: Use SCHEDOP_shutdown to shutdown the machine

2018-01-07 Thread Anthony Liguori
On Sun, Jan 7, 2018 at 4:22 PM, Konrad Rzeszutek Wilk wrote: > On Sun, Jan 07, 2018 at 12:28:29PM -0800, Anthony Liguori wrote: >> From: Jan H. Schönherr >> >> While the hwdom_shutdown() is able to reboot the system, it fails to >> properly power it

Re: [Xen-devel] [PATCH v2 15/23] vixen: pass through version hypercalls to parent Xen

2018-01-07 Thread Konrad Rzeszutek Wilk
On Sun, Jan 07, 2018 at 12:28:31PM -0800, Anthony Liguori wrote: > From: Anthony Liguori > > This is necessary to trigger event channel upcalls but it is also > useful to passthrough the full version information such that the > guest believes it is running on the parent Xen.

[Xen-devel] [xen-4.10-testing test] 117683: trouble: broken/fail/pass

2018-01-07 Thread osstest service owner
flight 117683 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/117683/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pygrub broken

Re: [Xen-devel] [PATCH v2 13/23] vixen: Use SCHEDOP_shutdown to shutdown the machine

2018-01-07 Thread Konrad Rzeszutek Wilk
On Sun, Jan 07, 2018 at 12:28:29PM -0800, Anthony Liguori wrote: > From: Jan H. Schönherr > > While the hwdom_shutdown() is able to reboot the system, it fails to > properly power it off. With SCHEDOP_shutdown, we delegate the problem. > > Signed-off-by: Jan H. Schönherr

Re: [Xen-devel] [PATCH v2 15/23] vixen: pass through version hypercalls to parent Xen

2018-01-07 Thread Konrad Rzeszutek Wilk
> >> integer_param("vixen_domid", vixen_domid); > >> +boolean_param("vixen_ptver", vixen_ptver); > > > > Would it make sense to have a custom parameter function that would > > be called 'vixen' and have all of those in it? > > Can you give an example? I'm not sure what you mean. Andrew's bti=

Re: [Xen-devel] [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths

2018-01-07 Thread Juergen Gross
On 06/01/18 06:55, HW42 wrote: > Juergen Gross: >> Remove the last tests for XENFEAT_auto_translated_physmap in pure >> PV-domain specific paths. PVH V1 is gone and the feature will always >> be "false" in PV guests. > [...] >> diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c >> index

[Xen-devel] [RFC PATCH 1/8] x86/domctl: introduce a pair of hypercall to set and get cpu topology

2018-01-07 Thread Chao Gao
Define interface, structures and hypercalls for toolstack to build cpu topology and for guest that will retrieve it [1]. Two subop hypercalls introduced by this patch: XEN_DOMCTL_set_cpu_topology to define cpu topology information per domain and XENMEM_get_cpu_topology to retrieve cpu topology

[Xen-devel] [RFC PATCH 4/8] libxl: calculate and set vcpu topology

2018-01-07 Thread Chao Gao
Before creating vCPUs, assign an unique APIC_ID to each vCPU according the number of vcpu, the number of core/thread in one socket/core and guest's numa configuration. Refer to SDM "PROGRAMMING CONSIDERATIONS FOR HARDWARE MULTI-THREADING CAPABLE PROCESSORS" for more information about how software

[Xen-devel] [RFC PATCH 2/8] x86/vlapic: use apic_id array to set initial (x2)APIC ID

2018-01-07 Thread Chao Gao
It removes the fixed mapping between vcpu_id and apic_id. Signed-off-by: Chao Gao --- xen/arch/x86/cpuid.c | 7 +-- xen/arch/x86/hvm/vlapic.c| 10 +- xen/include/asm-x86/hvm/domain.h | 3 +++ 3 files changed, 13 insertions(+), 7 deletions(-)

[Xen-devel] [RFC PATCH 6/8] hvmloader: get CPU topology information from hypervisor

2018-01-07 Thread Chao Gao
The previous relationship between APIC_ID and vcpu_id won't hold. The APIC_ID array got from hypervisor is used to boot APs. Signed-off-by: Chao Gao --- tools/firmware/hvmloader/Makefile| 2 +- tools/firmware/hvmloader/hvmloader.c | 8 +

[Xen-devel] [RFC PATCH 0/8] Add guest CPU topology support

2018-01-07 Thread Chao Gao
This series of patches add guest CPU topology support for hvm. CPU topology here means the number of sockets, the number of cores in each socket and the number of threads in each core. Currently, guest CPU topology cannot be specified except the number of sockets through virtual numa. For Intel

[Xen-devel] [RFC PATCH 3/8] xl/parse: introduce cpu_topology to guest config

2018-01-07 Thread Chao Gao
Signed-off-by: Chao Gao --- docs/man/xl.cfg.pod.5.in| 21 + tools/libxl/libxl_types.idl | 7 +++ tools/xl/xl_parse.c | 19 +++ 3 files changed, 47 insertions(+) diff --git a/docs/man/xl.cfg.pod.5.in

[Xen-devel] [RFC PATCH 8/8] x86/cpuid: emulate extended topology enumeration leaf

2018-01-07 Thread Chao Gao
This patch sets policy for guest's CPUID.0xb. eax return value can be infered from the number of core/thread in one socket/core. ebx cannot be zero otherwise it means CPUID.0xb isn't supported. edx is the x2apic id of each vcpu, which would be adjusted in Xen according the context. ecx[7:0]

[Xen-devel] [RFC PATCH 5/8] xen/mem: handle XENMEM_get_cpu_topology in compat_memory_op

2018-01-07 Thread Chao Gao
hvmloader needs to get cpu topology to build ACPI and boot APs. Signed-off-by: Chao Gao --- xen/common/compat/memory.c | 21 + xen/include/xlat.lst | 1 + 2 files changed, 22 insertions(+) diff --git a/xen/common/compat/memory.c

[Xen-devel] [RFC PATCH 7/8] libacpi: build madt/srat according cpu topology

2018-01-07 Thread Chao Gao
Callers pass an APIC_ID array to libacpi and libacpi will use this array to fill the APIC_ID field of MADT and SRAT. Signed-off-by: Chao Gao --- tools/firmware/hvmloader/util.c | 8 ++-- tools/libacpi/build.c | 4 ++-- tools/libacpi/libacpi.h | 5 -

Re: [Xen-devel] [PATCH v2] x86: xen: remove the use of VLAIS

2018-01-07 Thread Juergen Gross
On 06/01/18 22:39, Nick Desaulniers wrote: > Variable Length Arrays In Structs (VLAIS) is not supported by Clang, and > frowned upon by others. > > https://lkml.org/lkml/2013/9/23/500 > > Here, the VLAIS was used because the size of the bitmap returned from > xen_mc_entry() depended on possibly

Re: [Xen-devel] debian bugs: kaiser patch break pvh v1

2018-01-07 Thread Juergen Gross
On 08/01/18 01:40, Hans van Kranenburg wrote: > Hi, > > At debian, we have reports of users that were apparently using PVH v1 > with Xen 4.8 and Linux 4.9. After the debian kernel team included the > meltdown patches, PVH v1 breaks: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886591 >

Re: [Xen-devel] [PATCH 11/22] vixen: early initialization of Vixen including shared_info mapping

2018-01-07 Thread Roger Pau Monné
On Sat, Jan 06, 2018 at 02:54:26PM -0800, Anthony Liguori wrote: > From: Anthony Liguori > > We split initialization of Vixen into two parts. The first part > just detects the presence of an HVM hypervisor so that we can > figure out whether to modify the e820 table. > >

Re: [Xen-devel] [PATCH 18/22] vixen: Introduce ECS_PROXY for event channel proxying

2018-01-07 Thread Roger Pau Monné
On Sat, Jan 06, 2018 at 02:54:33PM -0800, Anthony Liguori wrote: > From: Jan H. Schönherr > > Previously, we would keep proxied event channels as ECS_INTERDOMAIN > channel around. This works for most things, but has the problem > that EVTCHNOP_status is broken, and that