From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC v2] ARM VM System Specification Date: Tue, 10 Jun 2014 21:18:34 +0200 Message-ID: <53975A0A.8090802@redhat.com> References: <20140328184517.GA27219@cbox> <53973AA8.9020301@codeaurora.org> <539754E5.3030408@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Christoffer Dall , "cross-distro@lists.linaro.org" , Ian Campbell , kvm-devel , Michael Casadevall , "marc.zyngier@arm.com" , Rob Herring , "xen-devel@lists.xen.org" , Stefano Stabellini , Grant Likely , "kvmarm@lists.cs.columbia.edu" , arm-mail-list To: Peter Maydell , Christopher Covington Return-path: Received: from mail-wi0-f170.google.com ([209.85.212.170]:37992 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbaFJTSk (ORCPT ); Tue, 10 Jun 2014 15:18:40 -0400 Received: by mail-wi0-f170.google.com with SMTP id cc10so2219944wib.1 for ; Tue, 10 Jun 2014 12:18:38 -0700 (PDT) In-Reply-To: <539754E5.3030408@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 10/06/2014 20:56, Paolo Bonzini ha scritto: > Il 10/06/2014 20:08, Peter Maydell ha scritto: >> On 10 June 2014 18:04, Christopher Covington wrote: >>> On 06/10/2014 10:42 AM, Peter Maydell wrote: >>>> I just noticed that this doesn't mandate that the platform >>>> provides an RTC. As I understand it, the UEFI spec mandates >>>> that there's an RTC (could somebody more familiar with UEFI >>>> than me confirm/deny that?) so we should probably put one here. >>> >>> Pardon my ignorance, but what exactly disqualifies Generic Timer >>> implementations from being used as Real Time Clocks? >> >> So my naive view was that an RTC actually had to have >> support for dealing with real (wall) clock time, ie >> knowing it's 2014 and not 1970. The generic timers are >> just timers. Or am I wrong and UEFI doesn't really >> require that? > > The real-time clock provides four UEFI runtime services (GetTime, > SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can > return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be > retrieved/set due to a hardware error", but I don't think this is enough > to make these two optional. By comparison, GetWakeupTime/SetWakeupTime > can also return EFI_UNSUPPORTED. > > So I agree that the RTC is required in UEFI. ... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models? We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation. I think even the serial devices should be removed. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 From: pbonzini@redhat.com (Paolo Bonzini) Date: Tue, 10 Jun 2014 21:18:34 +0200 Subject: [RFC v2] ARM VM System Specification In-Reply-To: <539754E5.3030408@redhat.com> References: <20140328184517.GA27219@cbox> <53973AA8.9020301@codeaurora.org> <539754E5.3030408@redhat.com> Message-ID: <53975A0A.8090802@redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Il 10/06/2014 20:56, Paolo Bonzini ha scritto: > Il 10/06/2014 20:08, Peter Maydell ha scritto: >> On 10 June 2014 18:04, Christopher Covington wrote: >>> On 06/10/2014 10:42 AM, Peter Maydell wrote: >>>> I just noticed that this doesn't mandate that the platform >>>> provides an RTC. As I understand it, the UEFI spec mandates >>>> that there's an RTC (could somebody more familiar with UEFI >>>> than me confirm/deny that?) so we should probably put one here. >>> >>> Pardon my ignorance, but what exactly disqualifies Generic Timer >>> implementations from being used as Real Time Clocks? >> >> So my naive view was that an RTC actually had to have >> support for dealing with real (wall) clock time, ie >> knowing it's 2014 and not 1970. The generic timers are >> just timers. Or am I wrong and UEFI doesn't really >> require that? > > The real-time clock provides four UEFI runtime services (GetTime, > SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can > return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be > retrieved/set due to a hardware error", but I don't think this is enough > to make these two optional. By comparison, GetWakeupTime/SetWakeupTime > can also return EFI_UNSUPPORTED. > > So I agree that the RTC is required in UEFI. ... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models? We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation. I think even the serial devices should be removed. Paolo