From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v2 3/3] paravirt: rename paravirt_enabled to paravirt_legacy Date: Sat, 6 Feb 2016 23:04:37 +0100 Message-ID: <20160206220437.GA4435@pd.tnic> References: <1454733014-15237-1-git-send-email-mcgrof@kernel.org> <1454733014-15237-4-git-send-email-mcgrof@kernel.org> <20160206085930.GF25240@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Andy Lutomirski Cc: "Luis R. Rodriguez" , "Luis R. Rodriguez" , cocci@systeme.lip6.fr, Boris Ostrovsky , Juergen Gross , mcb30@ipxe.org, Thomas Gleixner , Andrey Ryabinin , Joerg Roedel , Robert Moore , Mauro Carvalho Chehab , "Rafael J. Wysocki" , Xen Devel , "H. Peter Anvin" , Rusty Russell , Jan Beulich , Lv Zheng , "linux-kernel@vger.kernel.org" , long.wanglong@huawei.com, Fengguang Wu , qiuxishi@huawei.com, Andrey Ryabinin , Konrad Rzeszutek Wilk , david.e.bo List-Id: xen-devel@lists.xenproject.org On Sat, Feb 06, 2016 at 12:05:32PM -0800, Andy Lutomirski wrote: > int __init microcode_init(void) > { > [...] > if (paravirt_enabled() || dis_ucode_ldr) > return -EINVAL; > > This is also asking "are we the natively booted kernel?" This is > plausibly useful for real. (Borislav, is this actually necessary?) There was some breakage on 32-bit pvops with that. > Seems to me there should be a function is_native_root_kernel() or > similar. Obviously it could have false positives and code will have > to deal with that. (This also could be entirely wrong. What code is > responsible for CPU microcode updates on Xen? For all I know, dom0 is > *supposed* to apply microcode updates, in which case that check really > should be deleted. So there are two aspects: - the guest loading the microcode driver. Xen should behave like qemu+kvm does: emulate the MSR accesses the microcode loader does. - microcode application on Xen: we've had this before. The hypervisor should do that (if it doesn't do so already). So yes, that paravirt_enabled() thing should go away. Even more so if we have CPUID leaf 0x4... reserved for hypervisors. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.