Re: [Xen-devel] [PATCH RFC v1 56/74] xen/pvshim: add grant table operations

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 19:34, wrote: > On Mon, Jan 08, 2018 at 10:19:39AM -0700, Jan Beulich wrote: >> >>> On 04.01.18 at 14:06, wrote: >> > +{ >> > +struct gnttab_query_size op; >> > +int rc; >> > + >> > +if (

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

2018-01-09 Thread Juergen Gross
On 10/01/18 04:58, Peter wrote: > On 2018-01-09 15:04, Stefano Stabellini wrote: >> On Sun, 7 Jan 2018, 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

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Juergen Gross
On 09/01/18 23:11, Hans van Kranenburg wrote: > On 01/09/2018 07:22 PM, Rich Persaud wrote: On Jan 9, 2018, at 12:56, Stefano Stabellini wrote: On Tue, 9 Jan 2018, Doug Goldstein wrote: On 1/9/18 11:33 AM, Jan Beulich wrote: On 09.01.18

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread pedro
On 2018-01-10 11:11, Hans van Kranenburg wrote: Since the primary audience for security fixes are production deployments of Xen where customer assets are at risk, is there an estimate for the percentage/size of Xen deployments where PVH (not only Xen 4.10) has already been deployed for

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

2018-01-09 Thread Sarah Newman
On 01/09/2018 09:07 PM, Anthony Liguori wrote: > On Tue, Jan 9, 2018 at 8:46 PM, Sarah Newman wrote: >> vixen-upstream-v2 hangs for us after dumping the e820 map. We're able to >> build and run vixen-upstream-v1. > > Can give me more details about your guest config? I'm happy

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

2018-01-09 Thread Anthony Liguori
On Tue, Jan 9, 2018 at 8:46 PM, Sarah Newman wrote: > vixen-upstream-v2 hangs for us after dumping the e820 map. We're able to > build and run vixen-upstream-v1. Can give me more details about your guest config? I'm happy to take a look and debug. > My company needs serial

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

2018-01-09 Thread osstest service owner
flight 117732 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/117732/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 117335

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

2018-01-09 Thread Peter
On 2018-01-09 15:04, Stefano Stabellini wrote: On Sun, 7 Jan 2018, 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 >>

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

2018-01-09 Thread Chao Gao
On Tue, Jan 09, 2018 at 11:47:54PM +, Andrew Cooper wrote: >On 08/01/18 04:01, Chao Gao wrote: >> 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: >>

Re: [Xen-devel] [PATCH 2/2] xen/gntdev: Fix partial gntdev_mmap() cleanup

2018-01-09 Thread Boris Ostrovsky
On 01/09/2018 07:10 AM, Ross Lagerwall wrote: When cleaning up after a partially successful gntdev_mmap(), unmap the successfully mapped grant pages otherwise Xen will kill the domain if in debug mode (Attempt to implicitly unmap a granted PTE) or Linux will kill the process and emit "BUG: Bad

Re: [Xen-devel] [PATCH 1/2] xen/gntdev: Fix off-by-one error when unmapping with holes

2018-01-09 Thread Boris Ostrovsky
On 01/09/2018 07:10 AM, Ross Lagerwall wrote: If the requested range has a hole, the calculation of the number of pages to unmap is off by one. Fix it. Signed-off-by: Ross Lagerwall Reviewed-by: Boris Ostrovsky

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

2018-01-09 Thread Chao Gao
On Tue, Jan 09, 2018 at 12:18:13PM -0500, Daniel De Graaf wrote: >On 01/09/2018 04:06 AM, Chao Gao wrote: >> On Mon, Jan 08, 2018 at 01:14:44PM -0500, Daniel De Graaf wrote: >> > On 01/07/2018 11:01 PM, Chao Gao wrote: >> > > Define interface, structures and hypercalls for toolstack to build >> >

[Xen-devel] [qemu-upstream-unstable test] 117731: trouble: broken/fail/pass

2018-01-09 Thread osstest service owner
flight 117731 qemu-upstream-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/117731/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-amd64-pvgrub broken

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

2018-01-09 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 v3 09/24] vixen: modify the e820 table to advertise HVM special pages as RAM

2018-01-09 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 v3 16/24] vixen: pass grant table operations through to the outer Xen

2018-01-09 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 v3 13/24] vixen: Use SCHEDOP_shutdown to shutdown the machine

2018-01-09 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

[Xen-devel] [PATCH v3 24/24] xen/pvshim: memory hotplug

2018-01-09 Thread Anthony Liguori
From: Roger Pau Monne Signed-off-by: Roger Pau Monné Signed-off-by: Anthony Liguori --- v2 -> v3 - adapted for Vixen --- xen/arch/x86/guest/vixen.c| 110 ++ xen/common/memory.c

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

2018-01-09 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 v3 22/24] vixen: dom0 builder support

2018-01-09 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 v3 07/24] vixen: introduce is_vixen() to allow altering behavior

2018-01-09 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 v3 03/24] x86/guest: Hypercall support

2018-01-09 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 ++

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

2018-01-09 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 v3 21/24] vixen: provide Xencons implementation

2018-01-09 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 v3 14/24] vixen: forward VCPUOP_register_runstate_memory_area to outer Xen

2018-01-09 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 v3 12/24] vixen: paravirtualization TSC frequency calculation

2018-01-09 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 v3 23/24] vixen: use default position for the m2p mappings

2018-01-09 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

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

2018-01-09 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 v3 15/24] vixen: pass through version hypercalls to parent Xen

2018-01-09 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 v3 02/24] x86/entry: Probe for Xen early during boot

2018-01-09 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 v3 05/24] char: optionally redirect {, g}printk output to QEMU debug log

2018-01-09 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 v3 06/24] console: do not print banner if below info log threshold

2018-01-09 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 v3 08/24] vixen: allow dom0 to be created with a domid != 0

2018-01-09 Thread Anthony Liguori
From: Anthony Liguori Some older guests special case domid=0 instead of checking the shared info flags so in order to get PV drivers loaded properly, we need to make the guest always appear with a domid != 0. While the Vixen domain is the hardware domain, we don't want it

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

2018-01-09 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

[Xen-devel] [PATCH v3 00/24] Vixen: A PV-in-HVM shim

2018-01-09 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 v3 01/24] ---- x86/Kconfig: Options for Xen and PVH support

2018-01-09 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 v3 04/24] x86: Don't use potentially incorrect CPUID values for topology information

2018-01-09 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

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

2018-01-09 Thread Andrew Cooper
On 08/01/18 04:01, Chao Gao wrote: > 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

Re: [Xen-devel] [PATCH FAIRLY-RFC 00/44] x86: Prerequisite work for a Xen KAISER solution

2018-01-09 Thread Stefano Stabellini
On Fri, 5 Jan 2018, Juergen Gross wrote: > On 04/01/18 21:21, Andrew Cooper wrote: > > This work was developed as an SP3 mitigation, but shelved when it became > > clear > > that it wasn't viable to get done in the timeframe. > > > > To protect against SP3 attacks, most mappings needs to be

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

2018-01-09 Thread Martin Cerveny
Hello. On Tue, 9 Jan 2018, Jan Beulich wrote: On 08.01.18 at 17:07, wrote: On Mon, 8 Jan 2018, Jan Beulich wrote: On 07.01.18 at 13:34, wrote: (XEN) [ Xen-4.10.0-vgpu x86_64 debug=n Not tainted ] The -vgpu tag makes me wonder whether you

[Xen-devel] [qemu-upstream-4.10-testing test] 117730: regressions - FAIL

2018-01-09 Thread osstest service owner
flight 117730 qemu-upstream-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/117730/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 16 guest-start/debian.repeat fail REGR. vs. 117345

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Hans van Kranenburg
On 01/09/2018 07:22 PM, Rich Persaud wrote: >>> On Jan 9, 2018, at 12:56, Stefano Stabellini wrote: >>> >>> On Tue, 9 Jan 2018, Doug Goldstein wrote: >>> On 1/9/18 11:33 AM, Jan Beulich wrote: >>> On 09.01.18 at 18:23, wrote: > On Tue, Jan

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Matt Wilson
On Tue, Jan 09, 2018 at 05:58:46PM +, Wei Liu wrote: > > Ian has been busy writing the sidecar script and Roger and I have been > working on cleaning up the branch. We want to post a new version as > soon as possible (tomorrow or even tonight). Ian, Let me know if you need any help with

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Anthony Liguori
On Tue, Jan 9, 2018 at 11:43 AM, Wei Liu wrote: > On Mon, Jan 08, 2018 at 05:45:32PM +, Ian Jackson wrote: >> AIUI we have a series for pv-in-pvh shim which is nearing completion >> in the sense that it will have been well-tested (especially the >> hypervisor parts) and

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

2018-01-09 Thread Julien Grall
Hi Jan, On 01/02/2018 04:35 PM, Jan Beulich wrote: On 21.12.17 at 15:55, wrote: The EFI image should be relocatable. At the moment, all the stub is relocatable but one place. Do you really mean relocatable here? Based on ... Hmm yes position independent. On

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Wei Liu
On Mon, Jan 08, 2018 at 05:45:32PM +, Ian Jackson wrote: > AIUI we have a series for pv-in-pvh shim which is nearing completion > in the sense that it will have been well-tested (especially the > hypervisor parts) and has good functionality. (Wei is handling the > assembly of this series.) >

[Xen-devel] [xen-unstable test] 117727: FAIL

2018-01-09 Thread osstest service owner
flight 117727 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/117727/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt broken in 117696 Tests

Re: [Xen-devel] [PATCH RFC 4/4] xen: use per-vcpu TSS and stacks for pv domains

2018-01-09 Thread Andrew Cooper
(sorry for the top-post. I'm on my phone) I can see you are using ltr, but I don't see anywhere where where you are changing the content on the TSS, or the top-of-stack content. It is very complicated to safely switch IST stacks when you might be taking interrupts. ~Andrew

[Xen-devel] [linux-linus bisection] complete test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm

2018-01-09 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm testid xen-boot Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu

Re: [Xen-devel] [PATCH RFC v1 56/74] xen/pvshim: add grant table operations

2018-01-09 Thread Roger Pau Monné
On Mon, Jan 08, 2018 at 10:19:39AM -0700, Jan Beulich wrote: > >>> On 04.01.18 at 14:06, wrote: > > @@ -30,11 +31,17 @@ > > #include > > #include > > > > +#include > > Interesting: The event channel patch gave me the impression that > it is not intended to deal with

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Rich Persaud
>> On Jan 9, 2018, at 12:56, Stefano Stabellini wrote: >> >> On Tue, 9 Jan 2018, Doug Goldstein wrote: >> On 1/9/18 11:33 AM, Jan Beulich wrote: >> On 09.01.18 at 18:23, wrote: On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Doug Goldstein
On 1/8/18 11:45 AM, Ian Jackson wrote: > But this is not a usual situation. This time, we don't have the time > to wait. > > Opinions ? I'm going to follow up with a top post with my feelings and from info on various parts of the thread. We have 2 versions of PV shim, the Citrix version and

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Wei Liu
On Tue, Jan 09, 2018 at 11:59:01AM -0600, Doug Goldstein wrote: > On 1/9/18 5:50 AM, Wei Liu wrote: > > > > We haven't tested booting the series I posted in HVM mode, but off the > > top of my head it should work in HVM mode as well -- the multiboot path > > is left intact. > > > > Can we

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Wei Liu
On Tue, Jan 09, 2018 at 09:23:03AM -0800, Anthony Liguori wrote: > On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini > wrote: > > On Tue, 9 Jan 2018, George Dunlap wrote: > >> On Mon, Jan 8, 2018 at 9:01 PM, Rich Persaud wrote: > >> > On a similarly

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Doug Goldstein
On 1/9/18 5:50 AM, Wei Liu wrote: > > We haven't tested booting the series I posted in HVM mode, but off the > top of my head it should work in HVM mode as well -- the multiboot path > is left intact. > Can we actually do this before committing to this series? I've seen a number of "this should

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Stefano Stabellini
On Tue, 9 Jan 2018, Doug Goldstein wrote: > On 1/9/18 11:33 AM, Jan Beulich wrote: > On 09.01.18 at 18:23, wrote: > >> On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini > >> wrote: > >>> On Tue, 9 Jan 2018, George Dunlap wrote: > On Mon,

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Doug Goldstein
On 1/8/18 3:44 PM, Anthony Liguori wrote: > > It's not particularly hard to plumb through I think but if you are > using PCI passthrough for PV, then you really shouldn't worry about > Spectre/Meltdown. That PV guest can already read all of physical > memory (since no IOMMU is used) and they can

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Doug Goldstein
On 1/9/18 11:33 AM, Jan Beulich wrote: On 09.01.18 at 18:23, wrote: >> On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini >> wrote: >>> On Tue, 9 Jan 2018, George Dunlap wrote: On Mon, Jan 8, 2018 at 9:01 PM, Rich Persaud

Re: [Xen-devel] [PATCH RFC v1 55/74] xen/pvshim: forward evtchn ops between L0 Xen and L2 DomU

2018-01-09 Thread Anthony Liguori
On Mon, Jan 8, 2018 at 8:05 AM, Jan Beulich wrote: On 04.01.18 at 14:06, wrote: >> 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

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Anthony Liguori
On Tue, Jan 9, 2018 at 9:33 AM, Jan Beulich wrote: On 09.01.18 at 18:23, wrote: >> On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini >> wrote: >>> On Tue, 9 Jan 2018, George Dunlap wrote: On Mon, Jan 8, 2018 at 9:01

Re: [Xen-devel] [PATCH RFC v1 55/74] xen/pvshim: forward evtchn ops between L0 Xen and L2 DomU

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 17:45, wrote: > On Tue, Jan 09, 2018 at 01:00:10AM -0700, Jan Beulich wrote: >> >>> On 08.01.18 at 17:22, wrote: >> > On Mon, Jan 08, 2018 at 09:05:40AM -0700, Jan Beulich wrote: >> >> >>> On 04.01.18 at 14:06,

Re: [Xen-devel] [PATCH RFC 4/4] xen: use per-vcpu TSS and stacks for pv domains

2018-01-09 Thread Juergen Gross
On 09/01/18 18:01, Andrew Cooper wrote: > On 09/01/18 14:27, Juergen Gross wrote: >> Instead of using the TSS and stacks of the physical processor allocate >> them per vcpu, map them in the per domain area, and use those. >> >> Signed-off-by: Juergen Gross > > I don't see

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 18:23, wrote: > On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini > wrote: >> On Tue, 9 Jan 2018, George Dunlap wrote: >>> On Mon, Jan 8, 2018 at 9:01 PM, Rich Persaud wrote: >>> > On a similarly pragmatic

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Anthony Liguori
On Tue, Jan 9, 2018 at 8:52 AM, Stefano Stabellini wrote: > On Tue, 9 Jan 2018, George Dunlap wrote: >> On Mon, Jan 8, 2018 at 9:01 PM, Rich Persaud wrote: >> > On a similarly pragmatic note: would a variation of Anthony's vixen patch >> > series be

Re: [Xen-devel] Linux 4.15-rc6 + xen-unstable: BUG: unable to handle kernel NULL pointer dereference at (null), [ 0.000000] IP: zero_resv_unavail+0x8e/0xe1

2018-01-09 Thread Sander Eikelenboom
On 09/01/18 17:38, Boris Ostrovsky wrote: > On 01/09/2018 11:31 AM, Sander Eikelenboom wrote: >> On 09/01/18 17:16, Pavel Tatashin wrote: >>> Hi Juergen, >>> >>> Do you have this patch applied: >>> >>> https://github.com/torvalds/linux/commit/e8c24773d6b2cd9bc8b36bd6e60beff599be14be >> Seems this

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

2018-01-09 Thread Daniel De Graaf
On 01/09/2018 04:06 AM, Chao Gao wrote: On Mon, Jan 08, 2018 at 01:14:44PM -0500, Daniel De Graaf wrote: On 01/07/2018 11:01 PM, Chao Gao wrote: Define interface, structures and hypercalls for toolstack to build cpu topology and for guest that will retrieve it [1]. Two subop hypercalls

Re: [Xen-devel] [PATCH RFC v1 21/74] x86/entry: Early PVH boot code

2018-01-09 Thread Wei Liu
On Tue, Jan 09, 2018 at 09:41:51AM -0700, Jan Beulich wrote: > >>> On 09.01.18 at 16:45, wrote: > > On Fri, Jan 05, 2018 at 06:32:56AM -0700, Jan Beulich wrote: > >> > +pvh_mbi.mods_count = pvh_info->nr_modules; > >> > +pvh_mbi.mods_addr = __pa(pvh_mbi_mods); > >> > +

Re: [Xen-devel] [PATCH RFC 4/4] xen: use per-vcpu TSS and stacks for pv domains

2018-01-09 Thread Andrew Cooper
On 09/01/18 14:27, Juergen Gross wrote: > Instead of using the TSS and stacks of the physical processor allocate > them per vcpu, map them in the per domain area, and use those. > > Signed-off-by: Juergen Gross I don't see anything here which updates the fields in the TSS across

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Stefano Stabellini
On Tue, 9 Jan 2018, George Dunlap wrote: > On Mon, Jan 8, 2018 at 9:01 PM, Rich Persaud wrote: > > On a similarly pragmatic note: would a variation of Anthony's vixen patch > > series be suitable for pre-PVH Xen 4.6 - 4.9? These versions are currently > > documented as

Re: [Xen-devel] [PATCH RFC v1 55/74] xen/pvshim: forward evtchn ops between L0 Xen and L2 DomU

2018-01-09 Thread Roger Pau Monné
On Tue, Jan 09, 2018 at 01:00:10AM -0700, Jan Beulich wrote: > >>> On 08.01.18 at 17:22, wrote: > > On Mon, Jan 08, 2018 at 09:05:40AM -0700, Jan Beulich wrote: > >> >>> On 04.01.18 at 14:06, wrote: > >> > +unsigned long evtchn = > >> >

[Xen-devel] [PATCH] x86/ioemul: Account for ioemul_handle_quirk() in stub length check

2018-01-09 Thread Andrew Cooper
The opcode potentially written into ctxt->io_emul_stub[] in the case that ioemul_handle_quirk() is overriding the default logic isnt accounted for in the build-time check that the stubs are large enough. Introduce IOEMUL_QUIRK_STUB_BYTES and use for both the main and quirk stub cases. As a slim

Re: [Xen-devel] [PATCH RFC v1 21/74] x86/entry: Early PVH boot code

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 16:45, wrote: > On Fri, Jan 05, 2018 at 06:32:56AM -0700, Jan Beulich wrote: >> > +pvh_mbi.mods_count = pvh_info->nr_modules; >> > +pvh_mbi.mods_addr = __pa(pvh_mbi_mods); >> > + >> > +mod = pvh_mbi_mods; >> > +entry =

Re: [Xen-devel] Linux 4.15-rc6 + xen-unstable: BUG: unable to handle kernel NULL pointer dereference at (null), [ 0.000000] IP: zero_resv_unavail+0x8e/0xe1

2018-01-09 Thread Boris Ostrovsky
On 01/09/2018 11:31 AM, Sander Eikelenboom wrote: > On 09/01/18 17:16, Pavel Tatashin wrote: >> Hi Juergen, >> >> Do you have this patch applied: >> >> https://github.com/torvalds/linux/commit/e8c24773d6b2cd9bc8b36bd6e60beff599be14be > Seems this hasn't made it to Linus yet ? > > I will give it a

Re: [Xen-devel] Linux 4.15-rc6 + xen-unstable: BUG: unable to handle kernel NULL pointer dereference at (null), [ 0.000000] IP: zero_resv_unavail+0x8e/0xe1

2018-01-09 Thread Sander Eikelenboom
On 09/01/18 17:16, Pavel Tatashin wrote: > Hi Juergen, > > Do you have this patch applied: > > https://github.com/torvalds/linux/commit/e8c24773d6b2cd9bc8b36bd6e60beff599be14be Seems this hasn't made it to Linus yet ? I will give it a test and report back, thanks ! > > Thank you, > Pavel >

Re: [Xen-devel] [PATCH RFC v1 21/74] x86/entry: Early PVH boot code

2018-01-09 Thread Wei Liu
On Fri, Jan 05, 2018 at 06:32:56AM -0700, Jan Beulich wrote: > > +module_t *mod; > > +unsigned int i; > > + > > +ASSERT(pvh_info->magic == XEN_HVM_START_MAGIC_VALUE); > > + > > +/* > > + * Turn hvm_start_info into mbi. Luckily all modules are placed under > > 4GB > > + *

Re: [Xen-devel] [PATCH RFC v1 54/74] xen/pvshim: set correct domid value

2018-01-09 Thread Roger Pau Monné
On Mon, Jan 08, 2018 at 07:17:16AM -0700, Jan Beulich wrote: > >>> On 04.01.18 at 14:06, wrote: > > @@ -576,11 +578,11 @@ static void noinline init_done(void) > > > > system_state = SYS_STATE_active; > > > > +domain_unpause_by_systemcontroller(dom0); > > + > >

Re: [Xen-devel] [PATCH RFC v1 57/74] x86/pv-shim: shadow PV console's page for L2 DomU

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 16:43, wrote: > On Tue, 2018-01-09 at 02:13 -0700, Jan Beulich wrote: >> > > > On 04.01.18 at 14:06, wrote: >> > +size_t consoled_guest_rx(void) >> > +{ >> > +size_t recv = 0, idx = 0; >> > +XENCONS_RING_IDX cons, prod; >>

Re: [Xen-devel] [PATCH RFC v1 53/74] xen/pvshim: modify Dom0 builder in order to build a DomU

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 17:09, wrote: > On Mon, Jan 08, 2018 at 07:06:14AM -0700, Jan Beulich wrote: >> >>> On 04.01.18 at 14:06, wrote: >> > From: Roger Pau Monne >> > --- a/xen/arch/x86/pv/dom0_build.c >> > +++

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

2018-01-09 Thread Jan Beulich
>>> On 08.01.18 at 17:07, wrote: > On Mon, 8 Jan 2018, Jan Beulich wrote: > On 07.01.18 at 13:34, wrote: >>> (XEN) [ Xen-4.10.0-vgpu x86_64 debug=n Not tainted ] >> >> The -vgpu tag makes me wonder whether you have any patches in >> your tree

Re: [Xen-devel] Linux 4.15-rc6 + xen-unstable: BUG: unable to handle kernel NULL pointer dereference at (null), [ 0.000000] IP: zero_resv_unavail+0x8e/0xe1

2018-01-09 Thread Pavel Tatashin
Hi Juergen, Do you have this patch applied: https://github.com/torvalds/linux/commit/e8c24773d6b2cd9bc8b36bd6e60beff599be14be Thank you, Pavel On 01/09/2018 11:10 AM, Juergen Gross wrote: On 09/01/18 16:29, Sander Eikelenboom wrote: Since it's already rc7: "Give me a subtle ping, Vasili.

Re: [Xen-devel] Linux 4.15-rc6 + xen-unstable: BUG: unable to handle kernel NULL pointer dereference at (null), [ 0.000000] IP: zero_resv_unavail+0x8e/0xe1

2018-01-09 Thread Juergen Gross
On 09/01/18 16:29, Sander Eikelenboom wrote: > Since it's already rc7: > "Give me a subtle ping, Vasili. One subtle ping only, please." I like that film :-) Pavel, can you please comment? Do you have an idea how to repair the issue or should we revert your patch in 4.15? Juergen > > On

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

2018-01-09 Thread Chao Gao
On Mon, Jan 08, 2018 at 01:14:44PM -0500, Daniel De Graaf wrote: >On 01/07/2018 11:01 PM, Chao Gao wrote: >> 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: >>

Re: [Xen-devel] [PATCH RFC v1 53/74] xen/pvshim: modify Dom0 builder in order to build a DomU

2018-01-09 Thread Roger Pau Monné
On Mon, Jan 08, 2018 at 07:06:14AM -0700, Jan Beulich wrote: > >>> On 04.01.18 at 14:06, wrote: > > From: Roger Pau Monne > > --- a/xen/arch/x86/pv/dom0_build.c > > +++ b/xen/arch/x86/pv/dom0_build.c > > @@ -31,9 +31,8 @@ > > #define L3_PROT

Re: [Xen-devel] [PATCH RFC v1 57/74] x86/pv-shim: shadow PV console's page for L2 DomU

2018-01-09 Thread Sergey Dyasli
On Tue, 2018-01-09 at 02:13 -0700, Jan Beulich wrote: > > > > On 04.01.18 at 14:06, wrote: > > +size_t consoled_guest_rx(void) > > +{ > > +size_t recv = 0, idx = 0; > > +XENCONS_RING_IDX cons, prod; > > + > > +if ( !cons_ring ) > > +return 0; > > + > > +

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Anthony Liguori
On Tue, Jan 9, 2018 at 2:49 AM, Ian Jackson wrote: > Andrew Cooper writes ("Re: Radical proposal: ship not-fully-tidied shim as > 4.10.1"): >> Does this sound fair? > > Everything is on fire. Your proposal seems much less radical than > mine. I doubt it will produce

Re: [Xen-devel] [PATCH RFC v1 32/74] x86: don't swallow the first command line item in pvh mode

2018-01-09 Thread Roger Pau Monné
On Thu, Jan 04, 2018 at 01:05:43PM +, Wei Liu wrote: > Instead, special case GRUB1 rather assuming that all bootloaders except GRUB2 > need a parameter stripping. The FreeBSD loader also prepends "xen.gz" (or the Xen kernel filename) to the command line. Hence this change will break it.

Re: [Xen-devel] [PATCH v6.5 20/26] x86: Protect unaware domains from meddling hyperthreads

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 15:21, wrote: > On 04/01/18 09:59, Jan Beulich wrote: > On 04.01.18 at 01:15, wrote: >>> Signed-off-by: Andrew Cooper >> Fundamentally (as before) >> Reviewed-by: Jan Beulich

[Xen-devel] [PATCH RFC 2/4] xen/x86: add helper for stack guard

2018-01-09 Thread Juergen Gross
Instead of open coding the calculation of the stack guard page multiple times add a helper to do the calculation. Signed-off-by: Juergen Gross --- xen/arch/x86/mm.c| 8 ++-- xen/include/asm-x86/mm.h | 6 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff

[Xen-devel] [PATCH RFC 4/4] xen: use per-vcpu TSS and stacks for pv domains

2018-01-09 Thread Juergen Gross
Instead of using the TSS and stacks of the physical processor allocate them per vcpu, map them in the per domain area, and use those. Signed-off-by: Juergen Gross --- xen/arch/x86/domain.c| 45 +++ xen/arch/x86/pv/domain.c | 72

[Xen-devel] [PATCH RFC 1/4] xen/x86: use dedicated function for tss initialization

2018-01-09 Thread Juergen Gross
Carve out the TSS initialization from load_system_tables(). Signed-off-by: Juergen Gross --- xen/arch/x86/cpu/common.c| 56 xen/include/asm-x86/system.h | 1 + 2 files changed, 32 insertions(+), 25 deletions(-) diff --git

[Xen-devel] [PATCH 4/4] efi: Rename efi_get_secureboot() to __efi_get_secureboot() and make it static

2018-01-09 Thread Daniel Kiper
This may help compiler to do some function call optimization. This is rather cosmetic. If you like this patch apply. If you do not you may ignore it. Signed-off-by: Daniel Kiper --- arch/x86/xen/efi.c |2 +-

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

2018-01-09 Thread Daniel Kiper
Hi, Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel may not even know that it runs on secure boot enabled platform. Daniel arch/x86/xen/Makefile |4 +++- arch/x86/xen/efi.c | 14 +

[Xen-devel] [PATCH 1/4] efi/stub: Extract efi_get_secureboot() to separate file

2018-01-09 Thread Daniel Kiper
We have to call efi_get_secureboot() from early Xen dom0 boot code to properly initialize boot_params.secure_boot. Sadly it lives in the EFI stub. Hence, it is not readily reachable from the kernel proper. So, move efi_get_secureboot() to separate file which can be included from the core kernel

Re: [Xen-devel] [PATCH v6.5 20/26] x86: Protect unaware domains from meddling hyperthreads

2018-01-09 Thread Andrew Cooper
On 04/01/18 09:59, Jan Beulich wrote: On 04.01.18 at 01:15, wrote: >> Signed-off-by: Andrew Cooper > Fundamentally (as before) > Reviewed-by: Jan Beulich > However: > >> --- a/xen/arch/x86/domain.c >> +++

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Roger Pau Monné
On Tue, Jan 09, 2018 at 06:08:53AM -0800, Anthony Liguori wrote: > On Jan 9, 2018 2:59 AM, "Ian Jackson" wrote: > > George Dunlap writes ("Re: Radical proposal: ship not-fully-tidied shim as > 4.10.1"): > > On 01/09/2018 10:53 AM, Ian Jackson wrote: > > > And as my

Re: [Xen-devel] Radical proposal: ship not-fully-tidied shim as 4.10.1

2018-01-09 Thread Anthony Liguori
On Jan 9, 2018 2:59 AM, "Ian Jackson" wrote: George Dunlap writes ("Re: Radical proposal: ship not-fully-tidied shim as 4.10.1"): > On 01/09/2018 10:53 AM, Ian Jackson wrote: > > And as my other mail suggests, I don't think we should allow this work > > to be blocked

Re: [Xen-devel] [PATCH v6.5 19/26] x86/hvm: Permit guests direct access to MSR_{SPEC_CTRL, PRED_CMD}

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 14:34, wrote: > On 09/01/18 13:28, Jan Beulich wrote: > On 09.01.18 at 13:03, wrote: >>> On 04/01/18 09:52, Jan Beulich wrote: > --- a/xen/arch/x86/msr.c > +++ b/xen/arch/x86/msr.c > @@ -132,7 +132,8 @@ int

Re: [Xen-devel] [PATCH RFC v1 20/74] x86: produce a binary that can be booted as PVH

2018-01-09 Thread Wei Liu
On Mon, Jan 08, 2018 at 09:42:54AM -0700, Jan Beulich wrote: > >>> On 08.01.18 at 16:59, wrote: > > On Fri, Jan 05, 2018 at 04:39:33AM -0700, Jan Beulich wrote: > >> >>> On 04.01.18 at 14:05, wrote: > >> > --- a/xen/arch/x86/Makefile > >> > +++

Re: [Xen-devel] [PATCH v6.5 19/26] x86/hvm: Permit guests direct access to MSR_{SPEC_CTRL, PRED_CMD}

2018-01-09 Thread Andrew Cooper
On 09/01/18 13:28, Jan Beulich wrote: On 09.01.18 at 13:03, wrote: >> On 04/01/18 09:52, Jan Beulich wrote: --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -132,7 +132,8 @@ int guest_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val)

Re: [Xen-devel] [PATCH RFC v1 52/74] xen: mark xenstore/console pages as RAM and add them to dom_io

2018-01-09 Thread Jan Beulich
>>> On 09.01.18 at 12:26, wrote: > On Tue, Jan 09, 2018 at 04:03:25AM -0700, Jan Beulich wrote: >> >>> On 09.01.18 at 10:25, wrote: >> > On Mon, Jan 08, 2018 at 06:49:21AM -0700, Jan Beulich wrote: >> >> >>> On 04.01.18 at 14:06,

  1   2   >