Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Roger Pau =?iso-8859-1?Q?Monn=E9?= Newsgroups: linux.kernel Subject: Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC Date: Thu, 02 Feb 2017 16:50:02 +0100 Message-ID: References: X-Original-To: Boris Ostrovsky X-Ironport-Av: E=Sophos;i="5.33,325,1477958400"; d="scan'208";a="39996501" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: NeoMutt/20170128 (1.7.2) X-Clientproxiedby: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 22 Organization: linux.* mail to news gateway X-Original-Cc: , , X-Original-Date: Thu, 2 Feb 2017 15:35:15 +0000 X-Original-Message-ID: <20170202153515.a3hznbofx4u4b3az@dhcp-3-221.uk.xensource.com> X-Original-References: <1485459692-23961-1-git-send-email-boris.ostrovsky@oracle.com> <1485459692-23961-6-git-send-email-boris.ostrovsky@oracle.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1572482 On Thu, Jan 26, 2017 at 02:41:28PM -0500, Boris Ostrovsky wrote: > Make sure they don't use these devices since they are not emulated > for unprivileged PVH guest. This description seems weird for what it's actually done. AFAICT you are not really preventing the guest from using the PIC or the IO APIC, because this is fetched from the MADT table (or should be fetched from there in any case). See below for the RTC... [...] > @@ -1892,6 +1900,9 @@ static void __init xen_hvm_guest_init(void) > > init_hvm_pv_info(); > > + if (xen_pvh_domain()) > + x86_platform.legacy.rtc = 0; Can't you fetch that from the FADT boot flags field? (See "5.2.9.3 IA-PC Boot Architecture Flags" in ACPI 6.1 spec). Roger.