From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754396AbcJZKmQ (ORCPT ); Wed, 26 Oct 2016 06:42:16 -0400 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:21040 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbcJZKmP (ORCPT ); Wed, 26 Oct 2016 06:42:15 -0400 X-IronPort-AV: E=Sophos;i="5.31,550,1473120000"; d="scan'208";a="33752009" Date: Wed, 26 Oct 2016 12:42:05 +0200 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Boris Ostrovsky CC: , , , Subject: Re: [PATCH 5/8] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC Message-ID: <20161026104205.vjemyddm6bus3kem@mac> References: <1476468318-24422-1-git-send-email-boris.ostrovsky@oracle.com> <1476468318-24422-6-git-send-email-boris.ostrovsky@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1476468318-24422-6-git-send-email-boris.ostrovsky@oracle.com> User-Agent: NeoMutt/20161003 (1.7.0) X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) X-DLP: AMS1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 14, 2016 at 02:05:15PM -0400, Boris Ostrovsky wrote: > Make sure they don't use these devices since they are not emulated > for unprivileged PVH guest. > > Also don't initialize hypercall page for them in init_hvm_pv_info() > since this has already been done. > > Signed-off-by: Boris Ostrovsky > --- > arch/x86/xen/enlighten.c | 24 +++++++++++++++++------- > 1 file changed, 17 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index d38d568..6c1a330 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1803,10 +1803,21 @@ static void __init init_hvm_pv_info(void) > minor = eax & 0xffff; > printk(KERN_INFO "Xen version %d.%d.\n", major, minor); > > - cpuid(base + 2, &pages, &msr, &ecx, &edx); > + xen_domain_type = XEN_HVM_DOMAIN; > > - pfn = __pa(hypercall_page); > - wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32)); > + /* PVH set up hypercall page earlier in xen_prepare_pvh() */ > + if (xen_pvh_domain()) { > + pv_info.name = "Xen PVH"; > +#ifdef CONFIG_ACPI > + /* No PIC or IOAPIC */ Shouldn't this be fetched from the MADT ACPI table if ACPI is available (rsdp_paddr != 0 in start_info)? Roger.