All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Peter Hilber <peter.hilber@opensynergy.com>,
	<linux-kernel@vger.kernel.org>, <virtualization@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-rtc@vger.kernel.org>,
	"Ridoux, Julien" <ridouxj@amazon.com>,
	<virtio-dev@lists.linux.dev>, "Luu, Ryan" <rluu@amazon.com>,
	"Chashper, David" <chashper@amazon.com>,
	"Mohamed Abuelfotoh, Hazem" <abuehaze@amazon.com>,
	"Christopher S . Hall" <christopher.s.hall@intel.com>,
	Jason Wang <jasowang@redhat.com>,
	"John Stultz" <jstultz@google.com>, <netdev@vger.kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Marc Zyngier <maz@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Simon Horman" <horms@kernel.org>
Subject: Re: [PATCH] ptp: Add vDSO-style vmclock support
Date: Fri, 26 Jul 2024 17:49:58 +0100	[thread overview]
Message-ID: <20240726174958.00007d10@Huawei.com> (raw)
In-Reply-To: <98813a70f6d3377d3a9d502fd175be97334fcc87.camel@infradead.org>

On Thu, 25 Jul 2024 14:50:50 +0100
David Woodhouse <dwmw2@infradead.org> wrote:

> On Thu, 2024-07-25 at 08:33 -0400, Michael S. Tsirkin wrote:
> > On Thu, Jul 25, 2024 at 01:31:19PM +0100, David Woodhouse wrote:  
> > > On Thu, 2024-07-25 at 08:29 -0400, Michael S. Tsirkin wrote:  
> > > > On Thu, Jul 25, 2024 at 01:27:49PM +0100, David Woodhouse wrote:  
> > > > > On Thu, 2024-07-25 at 08:17 -0400, Michael S. Tsirkin wrote:  
> > > > > > On Thu, Jul 25, 2024 at 10:56:05AM +0100, David Woodhouse wrote:  
> > > > > > > > Do you want to just help complete virtio-rtc then? Would be easier than
> > > > > > > > trying to keep two specs in sync.  
> > > > > > > 
> > > > > > > The ACPI version is much more lightweight and doesn't take up a
> > > > > > > valuable PCI slot#. (I know, you can do virtio without PCI but that's
> > > > > > > complex in other ways).
> > > > > > >   
> > > > > > 
> > > > > > Hmm, should we support virtio over ACPI? Just asking.  
> > > > > 
> > > > > Given that we support virtio DT bindings, and the ACPI "PRP0001" device
> > > > > exists with a DSM method which literally returns DT properties,
> > > > > including such properties as "compatible=virtio,mmio" ... do we
> > > > > already?
> > > > > 
> > > > >   
> > > > 
> > > > In a sense, but you are saying that is too complex?
> > > > Can you elaborate?  
> > > 
> > > No, I think it's fine. I encourage the use of the PRP0001 device to
> > > expose DT devices through ACPI. I was just reminding you of its
> > > existence.  
> > 
> > Confused. You said "I know, you can do virtio without PCI but that's
> > complex in other ways" as the explanation why you are doing a custom
> > protocol.  
> 
> Ah, apologies, I wasn't thinking that far back in the conversation.
> 
> If we wanted to support virtio over ACPI, I think PRP0001 can be made
> to work and isn't too complex (even though it probably doesn't yet work
> out of the box).
> 
> But for the VMCLOCK thing, yes, the simple ACPI device is a lot simpler
> than virtio-rtc and much more attractive.
> 
> Even if the virtio-rtc specification were official today, and I was
> able to expose it via PCI, I probably wouldn't do it that way. There's
> just far more in virtio-rtc than we need; the simple shared memory
> region is perfectly sufficient for most needs, and especially ours.
> 
> I have reworked
> https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/vmclock
> to take your other feedback into account.
> 
> It's now more flexible about the size handling, and explicitly checking
> that specific fields are present before using them. 
> 
> I think I'm going to add a method on the ACPI device to enable the
> precise clock information. I haven't done that in the driver yet; it
> still just consumes the precise clock information if it happens to be
> present already. The enable method can be added in a compatible fashion
> (the failure mode is that guests which don't invoke this method when
> the hypervisor needs them to will see only the disruption signal and
> not precise time).
> 
> For the HID I'm going to use AMZNVCLK. I had used QEMUVCLK in the QEMU
> patches, but I'll change that to use AMZNVCLK too when I repost the
> QEMU patch.

That doesn't fit with ACPI _HID definitions.
Second set 4 characters need to be hex digits as this is an
ACPI style ID (which I assume this is given AMZN is a valid
vendor ID.  6.1.5 in ACPI v6.5

Maybe I'm missing something...

J



WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Peter Hilber <peter.hilber@opensynergy.com>,
	<linux-kernel@vger.kernel.org>, <virtualization@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-rtc@vger.kernel.org>,
	"Ridoux,  Julien" <ridouxj@amazon.com>,
	<virtio-dev@lists.linux.dev>, "Luu, Ryan" <rluu@amazon.com>,
	"Chashper, David" <chashper@amazon.com>,
	"Mohamed Abuelfotoh, Hazem" <abuehaze@amazon.com>,
	"Christopher S . Hall" <christopher.s.hall@intel.com>,
	Jason Wang <jasowang@redhat.com>,
	"John Stultz" <jstultz@google.com>, <netdev@vger.kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Marc Zyngier <maz@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Simon Horman" <horms@kernel.org>
Subject: Re: [PATCH] ptp: Add vDSO-style vmclock support
Date: Fri, 26 Jul 2024 17:49:58 +0100	[thread overview]
Message-ID: <20240726174958.00007d10@Huawei.com> (raw)
In-Reply-To: <98813a70f6d3377d3a9d502fd175be97334fcc87.camel@infradead.org>

On Thu, 25 Jul 2024 14:50:50 +0100
David Woodhouse <dwmw2@infradead.org> wrote:

> On Thu, 2024-07-25 at 08:33 -0400, Michael S. Tsirkin wrote:
> > On Thu, Jul 25, 2024 at 01:31:19PM +0100, David Woodhouse wrote:  
> > > On Thu, 2024-07-25 at 08:29 -0400, Michael S. Tsirkin wrote:  
> > > > On Thu, Jul 25, 2024 at 01:27:49PM +0100, David Woodhouse wrote:  
> > > > > On Thu, 2024-07-25 at 08:17 -0400, Michael S. Tsirkin wrote:  
> > > > > > On Thu, Jul 25, 2024 at 10:56:05AM +0100, David Woodhouse wrote:  
> > > > > > > > Do you want to just help complete virtio-rtc then? Would be easier than
> > > > > > > > trying to keep two specs in sync.  
> > > > > > > 
> > > > > > > The ACPI version is much more lightweight and doesn't take up a
> > > > > > > valuable PCI slot#. (I know, you can do virtio without PCI but that's
> > > > > > > complex in other ways).
> > > > > > >   
> > > > > > 
> > > > > > Hmm, should we support virtio over ACPI? Just asking.  
> > > > > 
> > > > > Given that we support virtio DT bindings, and the ACPI "PRP0001" device
> > > > > exists with a DSM method which literally returns DT properties,
> > > > > including such properties as "compatible=virtio,mmio" ... do we
> > > > > already?
> > > > > 
> > > > >   
> > > > 
> > > > In a sense, but you are saying that is too complex?
> > > > Can you elaborate?  
> > > 
> > > No, I think it's fine. I encourage the use of the PRP0001 device to
> > > expose DT devices through ACPI. I was just reminding you of its
> > > existence.  
> > 
> > Confused. You said "I know, you can do virtio without PCI but that's
> > complex in other ways" as the explanation why you are doing a custom
> > protocol.  
> 
> Ah, apologies, I wasn't thinking that far back in the conversation.
> 
> If we wanted to support virtio over ACPI, I think PRP0001 can be made
> to work and isn't too complex (even though it probably doesn't yet work
> out of the box).
> 
> But for the VMCLOCK thing, yes, the simple ACPI device is a lot simpler
> than virtio-rtc and much more attractive.
> 
> Even if the virtio-rtc specification were official today, and I was
> able to expose it via PCI, I probably wouldn't do it that way. There's
> just far more in virtio-rtc than we need; the simple shared memory
> region is perfectly sufficient for most needs, and especially ours.
> 
> I have reworked
> https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/vmclock
> to take your other feedback into account.
> 
> It's now more flexible about the size handling, and explicitly checking
> that specific fields are present before using them. 
> 
> I think I'm going to add a method on the ACPI device to enable the
> precise clock information. I haven't done that in the driver yet; it
> still just consumes the precise clock information if it happens to be
> present already. The enable method can be added in a compatible fashion
> (the failure mode is that guests which don't invoke this method when
> the hypervisor needs them to will see only the disruption signal and
> not precise time).
> 
> For the HID I'm going to use AMZNVCLK. I had used QEMUVCLK in the QEMU
> patches, but I'll change that to use AMZNVCLK too when I repost the
> QEMU patch.

That doesn't fit with ACPI _HID definitions.
Second set 4 characters need to be hex digits as this is an
ACPI style ID (which I assume this is given AMZN is a valid
vendor ID.  6.1.5 in ACPI v6.5

Maybe I'm missing something...

J




  parent reply	other threads:[~2024-07-26 16:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 17:16 [PATCH] ptp: Add vDSO-style vmclock support David Woodhouse
2024-07-25  5:48 ` Michael S. Tsirkin
2024-07-25  9:56   ` David Woodhouse
2024-07-25 11:31     ` Daniel P. Berrangé
2024-07-25 11:53       ` David Woodhouse
2024-07-25 12:00         ` Daniel P. Berrangé
2024-07-25 12:17     ` Michael S. Tsirkin
2024-07-25 12:27       ` David Woodhouse
2024-07-25 12:29         ` Michael S. Tsirkin
2024-07-25 12:31           ` David Woodhouse
2024-07-25 12:33             ` Michael S. Tsirkin
2024-07-25 13:50               ` David Woodhouse
2024-07-25 14:11                 ` Michael S. Tsirkin
2024-07-25 15:18                   ` David Woodhouse
2024-07-25 16:38                     ` Michael S. Tsirkin
2024-07-25 19:35                       ` David Woodhouse
2024-07-25 20:50                         ` Michael S. Tsirkin
2024-07-25 21:00                           ` David Woodhouse
2024-07-25 21:04                             ` Michael S. Tsirkin
2024-07-25 21:29                               ` David Woodhouse
2024-07-25 21:47                                 ` Michael S. Tsirkin
2024-07-25 22:20                                   ` David Woodhouse
2024-07-26  6:06                                     ` Michael S. Tsirkin
2024-07-26  8:35                                       ` David Woodhouse
2024-07-26 12:52                                         ` Michael S. Tsirkin
2024-07-26 13:00                                           ` David Woodhouse
2024-07-26 13:04                                             ` Michael S. Tsirkin
2024-07-26 13:08                                               ` David Woodhouse
2024-07-26  5:09                                 ` Michael S. Tsirkin
2024-07-26  5:55                                   ` Michael S. Tsirkin
2024-07-26  8:06                                     ` David Woodhouse
2024-07-26 12:47                                       ` Michael S. Tsirkin
2024-07-26 12:51                                         ` David Woodhouse
2024-07-26 16:49                 ` Jonathan Cameron [this message]
2024-07-26 16:49                   ` Jonathan Cameron via
2024-07-26 18:28                   ` David Woodhouse
2024-07-28 10:37                     ` Michael S. Tsirkin
2024-07-28 13:07                       ` David Woodhouse
2024-07-28 15:23                         ` Michael S. Tsirkin
2024-07-29  6:45                           ` David Woodhouse
2024-07-25  5:54 ` Michael S. Tsirkin
2024-07-25 10:00   ` David Woodhouse
2024-07-25 11:20 ` Paolo Abeni
2024-07-25 11:49   ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240726174958.00007d10@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=a.zummo@towertech.it \
    --cc=abuehaze@amazon.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=chashper@amazon.com \
    --cc=christopher.s.hall@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dwmw2@infradead.org \
    --cc=horms@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=jstultz@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.hilber@opensynergy.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richardcochran@gmail.com \
    --cc=ridouxj@amazon.com \
    --cc=rluu@amazon.com \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=virtio-dev@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.