From: "Jan Beulich" Subject: Re: [PATCH 2/2] hvmloader: Allow the toolstack to choose WAET optimisations Date: Wed, 27 Nov 2013 10:03:06 +0000 Message-ID: <5295D16A02000078001076F6@nat28.tlf.novell.com> References: <1385498358-10077-1-git-send-email-andrew.cooper3@citrix.com> <1385498358-10077-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vlbxe-0002tB-2i for xen-devel@lists.xenproject.org; Wed, 27 Nov 2013 10:03:10 +0000 In-Reply-To: <1385498358-10077-3-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser , Ian Jackson , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 26.11.13 at 21:39, Andrew Cooper wrote: > @@ -196,8 +201,35 @@ static struct acpi_20_waet *construct_waet(void) > memcpy(waet, &Waet, sizeof(*waet)); > > waet->header.length = sizeof(*waet); > + > + s = xenstore_read("platform/waet-rtc-noack", NULL); > + if ( s ) > + { > + if ( !strncmp(s, "1", 1) || !strncmp(s, "true", 4) ) > + waet->flags |= ACPI_WAET_RTC_NO_ACK; > + else > + waet->flags &= ~ACPI_WAET_RTC_NO_ACK; > + } > + > + s = xenstore_read("platform/waet-pm-reliable", NULL); > + if ( s ) > + { > + if ( !strncmp(s, "1", 1) || !strncmp(s, "true", 4) ) > + waet->flags |= ACPI_WAET_TIMER_ONE_READ; > + else > + waet->flags &= ~ACPI_WAET_TIMER_ONE_READ; > + } Nothing in this series really allows these to be easily controlled on a per-domain basis - I would have expected a config file flag... And for this second one, as hinted at in your overview mail, I don't really see what purpose the controlling here serves: You don't consume the setting, i.e. the sole effect is that of controlling the ACPI table's flag value. Yet if we're fine with the guest doing single reads (of whatever), then we're surely fine too with it doing double reads. And hence the flag can easily be always set (as it was till now). If any second override was to be considered, I'd recommend on controlling the presence of the WAET as a whole. Jan