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

Re: [PATCH for-4.14 v2] x86/rtc: provide mediated access to RTC for PVH dom0



On 06.06.2020 01:43, Roman Shaposhnik wrote:
> On Fri, Jun 5, 2020 at 4:03 AM Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote:
>>
>> Mediated access to the RTC was provided for PVHv1 dom0 using the PV
>> code paths (guest_io_{write/read}), but those accesses where never
>> implemented for PVHv2 dom0. This patch provides such mediated accesses
>> to the RTC for PVH dom0, just like it's provided for a classic PV
>> dom0.
>>
>> Pull out some of the RTC logic from guest_io_{read/write} into
>> specific helpers that can be used by both PV and HVM guests. The
>> setup of the handlers for PVH is done in rtc_init, which is already
>> used to initialize the fully emulated RTC.
>>
>> Without this a Linux PVH dom0 will read garbage when trying to access
>> the RTC, and one vCPU will be constantly looping in
>> rtc_timer_do_work.
>>
>> Note that such issue doesn't happen on domUs because the ACPI
>> NO_CMOS_RTC flag is set in FADT, which prevents the OS from accessing
>> the RTC. Also the X86_EMU_RTC flag is not set for PVH dom0, as the
>> accesses are not emulated but rather forwarded to the physical
>> hardware.
>>
>> No functional change expected for classic PV dom0.
> 
> For the dense guys like me: what is the user-visible feature that is now being
> offered with this? Would really appreciate a pointer or two.

PV Dom0 has always been permitted direct access to the hardware RTC.
This change makes PVH Dom0 follow suit.

Jan



 


Rackspace

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