[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/time: minor adjustments to init_pit()
- To: Andrew Cooper <amc96@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 25 Jan 2022 13:18:04 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TYjWYPJD0TX4y4MGuU7nGi/QSPUmjBiEsakUN84Nt94=; b=bX2sSwSylQ4Qf4CXvzJa6MNnZJ4cypYgseq0OSebb3GebLLTre/rDgdGfCXjB0SX9sqAAlz8yX0Z4/sT5MzOqA/BnuvLX3BMo0xn7W8OSzTVBVPVBoFbmAkLxWs5D862VqYuE4mO4xDvhBskL0VABDkfqdHsyvFw4mIUNgUqkH5s4PFAi3v0C6QuAE930JairpaWa/BC3rIgTs4ewVhfOIgG6yDfv762NQMhRZVN82AAbPc1+pzjLD1dug6qwmb/S6nHQNff7fFMQepEww/54GxZOxrJ3IMiYQT0mTBzDx+1WuT4QGWts2tHAstm4kZxT4ZKMHOoySEDQqQA+D/bMQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F6umcfKs/OKUNdSCSOZOK8CNmSkjBRNB7Z0ANzaSgORUzifAFmns+KD6Q4RuZd5ObS/bakMfyoN5lPW2CIjv7kLY8NByeVZ0/vBuOHs2XkMaB3HbTzVvlR+ICoyfG+cWhALeoMeEWIgdH2wMIsQAPuSGK0Ghk/i7HlqOESgQFdsdrXJwGMHyZA+ACUVDo8ZfeQaggM3RE8OIdzBmfZZOubZ1w0erFn/mPyrb3AoGhfWk09k/U0ixxtrj3QdCK1FhiJZ9LusGEap06gF5wLg/hb7kJE4Di81u7imYKL0Y+ztO7/iNXEtcnE0Ut7zY703U99Ulmf8uFPNacFpX3y6bHw==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 25 Jan 2022 12:18:25 +0000
- Ironport-data: A9a23:6KANNK39C71jLKbfhPbD5Sp2kn2cJEfYwER7XKvMYLTBsI5bp2BTm 2pOCj/Ta/yLMzCgeNp+PY6/8UsBu5HcnIAwGwE/pC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCanAZqTNMEn9700o6wbNh2+aEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhrvBDm ZYVn5KKRih3L5Dqw9lAaBhEHHQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1EnMMsIdOtJIoCknph0SvYHbAtRpWrr6Diu4MIgmpr2Jkm8fD2X Pg6MGpEfij5XiJoYQcRMsoevsCIvyyqG9FfgA3M/vdmi4TJ9yRh3b6oPNfLd9iiQcROgl3et m/A537+ABwRKJqY0zXt2m2orv/Cm2X8Qo16PLS9/a80qEaJzWJVDhAKPXO5q/Skjk+1W/pEN lcZvCEpqMAPGFeDF4enGUfi+Tjd40BaC4E4//AGBB+l+4rmskXBLGY+QREfeeEA7/Jrfj022 Qrc9z/2PgBHvLqQQHOb076bqzKuJ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ytHWuQ/dpU0dMz2DvctbnnZE4gXwKDwHeOFfb6BJba Z1fqB81kedkXJ8VLXCOlA1G9Ltivfsj5zcbRsPF3ccmXWzZWPB0s+AL/CAtC1uKQ9y/Q==
- Ironport-sdr: iuPwnD2995nRHruME0Ng/oHSVYtpweT22F+TXNsJ9IPTqkmm7Ocv2bwLi6nZRinOXJfexrcH5t vJE6xK0g1kJacehhbSY69VXDsPdrBG5TSCVpHkRDuj7Vb9Pp8omPk0e9KO8WfQL5pxuYdzE3p8 itxZtYKAo8psof9H9QSmPm8OrXbhlZR4KvnpF9CdEJpgGWFx+gdzrVGv2JkCrSDyfgOhz27RGm JYIIixUIXYrNSHuqG3qkmWO7MqyugfcV7gjXMydgjt07fcbC0fq092j2Hai+LKsjSFu0/IEnKS obmZzpQ6G1bXmq7pwlS5oLPf
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Jan 20, 2022 at 04:17:37PM +0000, Andrew Cooper wrote:
> On 17/01/2022 10:36, Jan Beulich wrote:
> > For one, "using_pit" shouldn't be set ahead of the function's last
> > (for now: only) error path. Otherwise "clocksource=pit" on the command
> > line can lead to misbehavior when actually taking that error path.
> >
> > And then make an implicit assumption explicit: CALIBRATE_FRAC cannot,
> > for example, simply be changed to 10. The way init_pit() works, the
> > upper bound on the calibration period is about 54ms.
> >
> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
> > ---
> > Really I've noticed this while considering what would happen if someone
> > specified "clocksource=pit" on the shim's command line. Unlike "hpet"
> > and "acpi", "pit" presently wouldn't be (explicitly) ignored. While,
> > aiui, right now the only error path would be taken (due to port 0x61
> > reads being supposed to get back 0xff), I don't think we can build on
> > that longer term: Seeing what we use port 0x61 for in traps.c, I think
> > sooner or later we will need to have some form of emulation for it. Such
> > emulation is then not unlikely to continuously report 0 in the bit in
> > question. That would leed to an infinite loop here.
>
> If we're not already doing it, pv shim really ought to set the FADT
> hardware reduced bits. There should be no need to depend on heuristics
> around ~0.
We have talked about setting the hardware reduced flag for PVH,
it's however tricky. For once hardware-reduced ACPI mandates the usage
of UEFI firmware, which we don't yet fully support for PVH.
And then we cannot set that flag for a PVH dom0, because we use a mix
of crafted and native ACPI tables, so we risk that setting the bit
creates incompatibilities with the native tables we expose.
Roger.
|