Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Boris Ostrovsky
On 01/27/2016 02:00 PM, Luis R. Rodriguez wrote: On Wed, Jan 27, 2016 at 10:48 AM, Luis R. Rodriguez wrote: Worth mentioning here also is hpa's clarification on when subarch type PC (0) should be used: [it should be used if the hardware is] "enumerable using standard PC

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Borislav Petkov
On Wed, Jan 27, 2016 at 02:50:36PM +, David Vrabel wrote: > Surely the interesting comparison here is how is (early) microcode > loading disabled in KVM guests? It isn't - kvm simply ignores the write to the microcode application MSRs MSR_AMD64_PATCH_LOADER and MSR_IA32_UCODE_REV,

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Konrad Rzeszutek Wilk
On Wed, Jan 27, 2016 at 10:17:56AM -0500, Boris Ostrovsky wrote: > On 01/27/2016 10:09 AM, David Vrabel wrote: > >On 27/01/16 15:06, Boris Ostrovsky wrote: > >>On 01/27/2016 09:50 AM, David Vrabel wrote: > >>>On 27/01/16 14:42, Konrad Rzeszutek Wilk wrote: > On Tue, Jan 26, 2016 at 08:54:56PM

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Boris Ostrovsky
On 01/27/2016 10:29 AM, Konrad Rzeszutek Wilk wrote: On Wed, Jan 27, 2016 at 10:17:56AM -0500, Boris Ostrovsky wrote: On 01/27/2016 10:09 AM, David Vrabel wrote: On 27/01/16 15:06, Boris Ostrovsky wrote: On 01/27/2016 09:50 AM, David Vrabel wrote: On 27/01/16 14:42, Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Luis R. Rodriguez
Bleh moving forward please use mcg...@kernel.org, that will be sent to my employer and my personal address. More below. On Wed, Jan 27, 2016 at 8:15 AM, Boris Ostrovsky wrote: > On 01/27/2016 10:29 AM, Konrad Rzeszutek Wilk wrote: >> On Wed, Jan 27, 2016 at 10:17:56AM

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Luis R. Rodriguez
On Wed, Jan 27, 2016 at 10:48 AM, Luis R. Rodriguez wrote: > > Worth mentioning here also is hpa's clarification on when subarch type > PC (0) should be used: [it should be used if the hardware is] > "enumerable using standard PC mechanisms (PCI, ACPI) and doesn't need > a

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread David Vrabel
On 27/01/16 14:42, Konrad Rzeszutek Wilk wrote: > On Tue, Jan 26, 2016 at 08:54:56PM -0800, Luis R. Rodriguez wrote: >> On Jan 26, 2016 6:16 PM, "Luis R. Rodriguez" wrote: >>> >>> On Tue, Jan 26, 2016 at 4:04 PM, Luis R. Rodriguez >> wrote: You go:

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Konrad Rzeszutek Wilk
On Tue, Jan 26, 2016 at 08:54:56PM -0800, Luis R. Rodriguez wrote: > On Jan 26, 2016 6:16 PM, "Luis R. Rodriguez" wrote: > > > > On Tue, Jan 26, 2016 at 4:04 PM, Luis R. Rodriguez > wrote: > > > You go: > > > > > > hvmlite_start_xen() --> > > > HVM stub

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Boris Ostrovsky
On 01/27/2016 09:50 AM, David Vrabel wrote: On 27/01/16 14:42, Konrad Rzeszutek Wilk wrote: On Tue, Jan 26, 2016 at 08:54:56PM -0800, Luis R. Rodriguez wrote: On Jan 26, 2016 6:16 PM, "Luis R. Rodriguez" wrote: On Tue, Jan 26, 2016 at 4:04 PM, Luis R. Rodriguez

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread Boris Ostrovsky
On 01/27/2016 10:09 AM, David Vrabel wrote: On 27/01/16 15:06, Boris Ostrovsky wrote: On 01/27/2016 09:50 AM, David Vrabel wrote: On 27/01/16 14:42, Konrad Rzeszutek Wilk wrote: On Tue, Jan 26, 2016 at 08:54:56PM -0800, Luis R. Rodriguez wrote: On Jan 26, 2016 6:16 PM, "Luis R. Rodriguez"

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-27 Thread David Vrabel
On 27/01/16 15:06, Boris Ostrovsky wrote: > On 01/27/2016 09:50 AM, David Vrabel wrote: >> On 27/01/16 14:42, Konrad Rzeszutek Wilk wrote: >>> On Tue, Jan 26, 2016 at 08:54:56PM -0800, Luis R. Rodriguez wrote: On Jan 26, 2016 6:16 PM, "Luis R. Rodriguez" wrote: > On Tue,

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Jan 26, 2016 6:16 PM, "Luis R. Rodriguez" wrote: > > On Tue, Jan 26, 2016 at 4:04 PM, Luis R. Rodriguez wrote: > > You go: > > > > hvmlite_start_xen() --> > > HVM stub > > startup_64() | (startup_32() > > Hrm, does HVMlite work well with

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Mon, Jan 25, 2016 at 05:28:08PM -0500, Boris Ostrovsky wrote: > On 01/25/2016 04:21 PM, H. Peter Anvin wrote: > >On 01/25/16 13:12, Luis R. Rodriguez wrote: > >>>Perhaps, but someone would still have to set hardware_subarch. And > >>>it's hvmlite_bootparams() that does it. > >>No, Xen would do

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Andy Lutomirski
On Tue, Jan 26, 2016 at 10:34 AM, Luis R. Rodriguez wrote: > On Mon, Jan 25, 2016 at 05:28:08PM -0500, Boris Ostrovsky wrote: >> On 01/25/2016 04:21 PM, H. Peter Anvin wrote: >> >On 01/25/16 13:12, Luis R. Rodriguez wrote: >> >>>Perhaps, but someone would still have to set

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Boris Ostrovsky
On 01/26/2016 01:46 PM, Andy Lutomirski wrote: On Tue, Jan 26, 2016 at 10:34 AM, Luis R. Rodriguez wrote: On Mon, Jan 25, 2016 at 05:28:08PM -0500, Boris Ostrovsky wrote: On 01/25/2016 04:21 PM, H. Peter Anvin wrote: On 01/25/16 13:12, Luis R. Rodriguez wrote: Perhaps, but

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Tue, Jan 26, 2016 at 11:00 AM, Boris Ostrovsky wrote: > On 01/26/2016 01:46 PM, Andy Lutomirski wrote: >> >> On Tue, Jan 26, 2016 at 10:34 AM, Luis R. Rodriguez >> wrote: >>> >>> On Mon, Jan 25, 2016 at 05:28:08PM -0500, Boris Ostrovsky wrote:

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Mon, Jan 25, 2016 at 05:55:02PM -0500, Boris Ostrovsky wrote: > On 01/25/2016 05:19 PM, Luis R. Rodriguez wrote: > >On Sat, Jan 23, 2016 at 02:49:36PM +, Andrew Cooper wrote: > > > > > >>it causes inappropriate linkage between the > >>toolstack and the version of Linux wishing to be booted.

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Boris Ostrovsky
On 01/26/2016 03:30 PM, Luis R. Rodriguez wrote: What I'm proposing? 1) Lets see if we can put a proactive stop-gap to issues such as the cr4 shadow bug and Kasan bugs from creeping in. This should not only help PV but perhaps HVMLite. If you'd like to help with that refer to this thread:

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Tue, Jan 26, 2016 at 04:51:38PM -0500, Boris Ostrovsky wrote: > On 01/26/2016 03:30 PM, Luis R. Rodriguez wrote: > hvmlite_start() is a 32-bit entry point [...] > > >4) hardware_subarch, hardware_subarch_data and future prospects > > > >Your patch relies on a *new* Linux entry point. Sure, we

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Tue, Jan 26, 2016 at 4:04 PM, Luis R. Rodriguez wrote: > You go: > > hvmlite_start_xen() --> > HVM stub > startup_64() | (startup_32() Hrm, does HVMlite work well with load_ucode_bsp(), note the patches to rebrand pv_enabled() to pv_legacy() or whatever, this

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Boris Ostrovsky
On 01/22/2016 07:30 PM, Andrew Cooper wrote: On 22/01/2016 23:32, Luis R. Rodriguez wrote: On Fri, Jan 22, 2016 at 04:35:50PM -0500, Boris Ostrovsky wrote: + /* +* See Documentation/x86/boot.txt. +* +* Version 2.12 supports Xen entry point but we will use default

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Boris Ostrovsky
On 01/22/2016 06:32 PM, Luis R. Rodriguez wrote: On Fri, Jan 22, 2016 at 04:35:50PM -0500, Boris Ostrovsky wrote: +/* + * This routine (and those that it might call) should not use + * anything that lives in .bss since that segment will be cleared later + */ +void __init

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread H. Peter Anvin
On 01/25/16 13:12, Luis R. Rodriguez wrote: >> >> Perhaps, but someone would still have to set hardware_subarch. And >> it's hvmlite_bootparams() that does it. > > No, Xen would do it as well, essentially all of hvmlite_bootparams() could be > done in Xen. > Or a stub code. -hpa

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Luis R. Rodriguez
On Mon, Jan 25, 2016 at 11:08:47AM -0500, Boris Ostrovsky wrote: > On 01/22/2016 06:32 PM, Luis R. Rodriguez wrote: > >On Fri, Jan 22, 2016 at 04:35:50PM -0500, Boris Ostrovsky wrote: > > > >>+/* > >>+ * This routine (and those that it might call) should not use > >>+ * anything that lives in .bss

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Luis R. Rodriguez
On Sat, Jan 23, 2016 at 02:49:36PM +, Andrew Cooper wrote: > On 23/01/2016 00:55, Luis R. Rodriguez wrote: > > On Fri, Jan 22, 2016 at 4:30 PM, Andrew Cooper > > wrote: > >> the DMLite boot > >> protocol is OS agnostic, and will be staying that way. > > What's the

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Boris Ostrovsky
On 01/25/2016 05:19 PM, Luis R. Rodriguez wrote: On Sat, Jan 23, 2016 at 02:49:36PM +, Andrew Cooper wrote: it causes inappropriate linkage between the toolstack and the version of Linux wishing to be booted. There are ways to do it in such a way that it does not create dependency issues

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Boris Ostrovsky
On 01/25/2016 04:21 PM, H. Peter Anvin wrote: On 01/25/16 13:12, Luis R. Rodriguez wrote: Perhaps, but someone would still have to set hardware_subarch. And it's hvmlite_bootparams() that does it. No, Xen would do it as well, essentially all of hvmlite_bootparams() could be done in Xen. Or a

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Roger Pau Monné
El 23/01/16 a les 17.12, Konrad Rzeszutek Wilk ha escrit: > On January 23, 2016 11:01:06 AM EST, "H. Peter Anvin" wrote: >> On January 23, 2016 7:34:33 AM PST, Konrad Rzeszutek Wilk >> wrote: >>> However, this stub belongs in Linux, not in the Xen

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-23 Thread Konrad Rzeszutek Wilk
>However, this stub belongs in Linux, not in the Xen toolstack. That >way, when the Linux boot protocol is modified, both sides can be >updated >accordingly. I would add that this idea is borrowed from the EFI stub code that Linux has which also constructs the boot parameter structure when

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-23 Thread H. Peter Anvin
On January 23, 2016 7:34:33 AM PST, Konrad Rzeszutek Wilk wrote: > >>However, this stub belongs in Linux, not in the Xen toolstack. That >>way, when the Linux boot protocol is modified, both sides can be >>updated >>accordingly. > >I would add that this idea is borrowed

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-23 Thread Andrew Cooper
On 23/01/2016 00:55, Luis R. Rodriguez wrote: > On Fri, Jan 22, 2016 at 4:30 PM, Andrew Cooper > wrote: >> the DMLite boot >> protocol is OS agnostic, and will be staying that way. > What's the DMLite boot protocol? It is a statement of the initial state of a DMLite

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-23 Thread H. Peter Anvin
On January 23, 2016 8:12:23 AM PST, Konrad Rzeszutek Wilk wrote: >On January 23, 2016 11:01:06 AM EST, "H. Peter Anvin" >wrote: >>On January 23, 2016 7:34:33 AM PST, Konrad Rzeszutek Wilk >> wrote: >>> However, this stub

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-23 Thread Konrad Rzeszutek Wilk
On January 23, 2016 11:01:06 AM EST, "H. Peter Anvin" wrote: >On January 23, 2016 7:34:33 AM PST, Konrad Rzeszutek Wilk > wrote: >> >>>However, this stub belongs in Linux, not in the Xen toolstack. That >>>way, when the Linux boot protocol is modified,

[Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-22 Thread Boris Ostrovsky
Start HVMlite guest XEN_ELFNOTE_PHYS32_ENTRY address. Setup hypercall page, initialize boot_params, enable early page tables. Signed-off-by: Boris Ostrovsky --- arch/x86/xen/Makefile |1 + arch/x86/xen/enlighten.c | 91 +-

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-22 Thread Luis R. Rodriguez
On Fri, Jan 22, 2016 at 04:35:50PM -0500, Boris Ostrovsky wrote: > Start HVMlite guest XEN_ELFNOTE_PHYS32_ENTRY address. Setup hypercall > page, initialize boot_params, enable early page tables. > > Signed-off-by: Boris Ostrovsky > --- > arch/x86/xen/Makefile |

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-22 Thread Luis R. Rodriguez
On Fri, Jan 22, 2016 at 4:30 PM, Andrew Cooper wrote: > I would have though the correct way to do direct Linux support would be > to have a very small init stub which constructs an appropriate zero > page, and lets the native entry point get on with things. As hpa

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-22 Thread Andrew Cooper
On 22/01/2016 23:32, Luis R. Rodriguez wrote: > On Fri, Jan 22, 2016 at 04:35:50PM -0500, Boris Ostrovsky wrote: >> +/* >> + * See Documentation/x86/boot.txt. >> + * >> + * Version 2.12 supports Xen entry point but we will use default x86/PC >> + * environment (i.e.

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-22 Thread Luis R. Rodriguez
On Fri, Jan 22, 2016 at 4:30 PM, Andrew Cooper wrote: > the DMLite boot > protocol is OS agnostic, and will be staying that way. What's the DMLite boot protocol? Is that the protocol that is defined by Xen to boot Xen guests and dom0? Is this well documented somewhere?