From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH 4/5] x86/PV: remove the emulated PIT Date: Thu, 14 Jan 2016 15:03:04 +0100 Message-ID: <5697AA98.5050305@citrix.com> References: <1452688338-70075-1-git-send-email-roger.pau@citrix.com> <1452688338-70075-5-git-send-email-roger.pau@citrix.com> <56968B1802000078000C66BC@prv-mh.provo.novell.com> <56975B96.8050607@citrix.com> <5697745102000078000C6979@prv-mh.provo.novell.com> <56977F9C.6000309@citrix.com> <5697A4BA02000078000C6B78@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aJiUZ-0008UU-Ax for xen-devel@lists.xenproject.org; Thu, 14 Jan 2016 14:03:11 +0000 In-Reply-To: <5697A4BA02000078000C6B78@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org El 14/01/16 a les 13.38, Jan Beulich ha escrit: >>>> On 14.01.16 at 11:59, wrote: >> El 14/01/16 a les 10.11, Jan Beulich ha escrit: >>>>>> On 14.01.16 at 09:25, wrote: >>>> El 13/01/16 a les 17.36, Jan Beulich ha escrit: >>>>>>>> On 13.01.16 at 13:32, wrote: >>>>>> The HVMlite series removed the initialization of the emulated PIT for PV >>>>>> guests, but the handler was still reachable, which means a PV guests can >>>>>> crash Xen if it pokes at IO ports 0x42, 0x43 or 0x61. Completely remove the >>>>>> PV PIT handler and move the PIT initialization to HVM guests only. >>>>> >>>>> As said on IRC - this is needed for Dom0 to be able to drive the >>>>> PC speaker. You'll need to provide a fix for the suppressed >>>>> initialization instead, at least for Dom0. (As an aside, your patch >>>>> orphans hwdom_pit_access().) >>>> >>>> Thanks for the clarification. AFAICT I can leave the usage of >>>> hwdom_pit_access for Dom0, and completely remove PIT access for DomU, is >>>> that right? >>> >>> I don't think so - see the explanation Tim gave on IRC. Afaict the >>> mention of BIOS here isn't related to a virtual BIOS, but to that >>> of a passed through graphics card. >> >> I'm sorry but I still don't fully understand why that's needed, and it >> arises a couple of questions. First of all, the only reference that I >> can find about BIOS and i8254 usage is regarding VGA BIOS POST [0], >> where they mention that the VGA POST method might make use of the i8254. >> >> This seems reasonable, but I still don't understand why we provide an >> emulated i8254 to DomUs. They don't have access to the low 1MB, which is >> where the VGA BIOS resides, so there's no way they can call into the VGA >> POST at all. > > All of this arrangement predates me, but see the original change > introducing this: "Provide PV guests with emulated PIT", which > suggests this wasn't just for Dom0. I'm hesitant to accept removal > of code when we don't know exactly by whom and for what purpose > it might be used. When I enabled Dom0 speaker control, I > intentionally retained the original code for DomU purposes. What about we do the following: enable the PIT for PV(H) guests (DomU/Dom0), and completely remove it for HVMlite guests for the moment? We might consider enabling it for HVMlite, but the plan is that this could be done on a per-domain basis using the flags in the xen_arch_domainconfig struct. Roger.