|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 02/11] xen/hvmlite: Bootstrap HVMlite guest
On 02/03/2016 01:55 PM, Luis R. Rodriguez wrote: I saw no considerations for the recommendations I had made last on your v1: https://lkml.kernel.org/r/CAB=NE6XPA0YzbnM8=rspkKai6d3GkXXO00Gr0VZUYoyzNy6thw@xxxxxxxxxxxxxx Of importance: 1) Using pv_info.paravirt_enabled = 1 is wrong unless you mean to say this is for legacy x86: Your patch #3 keeps on setting pv_info.paravirt_enabled = 1 and as discussed this is wrong. It will be renamed to x86_legacy_free() to align with what folks are pushing for a BIOS flag to annotate if a system requires legacy x86 stuff. This also means re-thinking all use cases and ensuring subarch is used then instead when the goal was to avoid Xen from entering that code. Today Xen does not use this but with my work it does and it helps clean and brush up a lot of these checks with future prospects to even help unify entry points. As I said earlier, I am not sure I understand what subarch buys us for HVMlite guests. As for using paravirt_enabled -- this is really only used to differentiate HVM from HVMlite and I think (although I'd need to check) is only needed by Xen-specific code in a couple of places. So if/when it is removed we will switch to something else. Since your work is WIP I decided to keep using it until it's clear what other options may be available. In this particular case we don't need any information about hypervisor until init_hypervisor_platform(). Which calls?If you are referring to xen_prepare_hvmlite/hvmlite_bootparams then these are needed to prepare boot_params. And we should not enter startup_32() without them ready. 3) Dead code concerns and unifying entry points: Addressing the semantics for the gray areas I am highlighting are critical for ensuring one does not run code or even exposes code as a available for the type of run time system booted, some folks call this "dead code". This is critical for Linux distributions which need to rely on the flexibility of having one kernel work for different use cases. The resolution to this problem was pvops but pvops has shortcoming for dead code, it didn't address the problem likely as it was not considered serious. It also didn't address the issue of different hypervisors wanting different entry points and that this fact alone also contributes to more dead code concerns, case in point the regressions introduced by cr4 shadow and the latest one is Kasan which to this day breaks Xen! Dead code topics are not easy to grasp, its why I've started on my own crusade to talk to people and write about it [0], and as of late propose some changes to avoid these in a clean way without extending pvops. Adding yet another entry point will not help here *specially* if we do not take semantics seriously over the different hypervisors and hypervisor types. [0] http://www.do-not-panic.com/2015/12/avoiding-dead-code-pvops-not-silver-bullet.html [1] http://www.do-not-panic.com/2015/12/xen-and-x86-linux-zero-page.html I don't understand what this has to do with HVMlite guests. My recommendation then: We add new hypervisor type to close the semantic gap for hypervisor types, and much like subarch enable also a subarch_data to let you pass and use your hvmlite_start_info. This would not only help with the semantics but also help avoid yet-another-entry point and force us to provide a well define structure for considering code that should not run by pegging it as required or supported for different early x86 code stubs. As I said before, I don't see how we can avoid having another entry point without making Xen change its load procedure. Which is highly unlikely to happen. I had hinted perhaps we might be able to piggy back on top of the ELF loader protocol as well, and since that's standard do wonder if that could instead be extended to help unify a mechanism for different OSes instead of making this just a solution for Linux. Code review below. On Mon, Feb 01, 2016 at 10:38:48AM -0500, Boris Ostrovsky wrote: I wonder whether __initdata would be a good attribute. We only need this early in the boot. And xen_hvmlite is gone now so we don't need to worry about it. -boris _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |