[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/5] x86/PV: remove the emulated PIT



El 14/01/16 a les 10.11, Jan Beulich ha escrit:
>>>> On 14.01.16 at 09:25, <roger.pau@xxxxxxxxxx> wrote:
>> El 13/01/16 a les 17.36, Jan Beulich ha escrit:
>>>>>> On 13.01.16 at 13:32, <roger.pau@xxxxxxxxxx> 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.

Also, allowing a VGA BIOS access to the i8254 used by the OS seems like
asking for trouble, so that same paper [0] describes that they provide
an emulated i8254 for the VGA BIOS to use (because they run the VGA BIOS
code inside x86emu), in order to prevent it from messing with the OS
setup. I have to admit that greatly depends on whether the OS makes use
of the i8254 or not.

Anyway, I would be in favour of adding an emulated i8254 to the hardware
domain (and let it make use of the PC speaker), but I don't see any
reason to provide it to DomUs.

Roger.

[0] https://2008.asiabsdcon.org/papers/P9A-paper.pdf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.