[systemd-devel] [PATCH] udev rules: add udev rule to create /dev/ptp_kvm

Marcelo Tosatti mtosatti at redhat.com
Tue Feb 28 02:50:59 UTC 2017


On Sun, Feb 26, 2017 at 09:52:18PM +0100, Lennart Poettering wrote:
> On Thu, 23.02.17 22:20, Marcelo Tosatti (mtosatti at redhat.com) wrote:
> 
> > 
> > Its necessary to specify the KVM PTP device name in userspace.
> > 
> > In case a network card with PTP device is assigned to the guest,
> > it might be the case that KVM PTP gets /dev/ptp0 instead of /dev/ptp1. 
> > 
> > Fix a device name for the KVM PTP device.
> 
> What's the symlink precisely good for, can you elaborate? 

You want to configure Chrony to use PTP in the guest to sync with the
host.

You need to add a entry to /etc/chrony.conf pointing to "/dev/ptp0", 
the ptp_kvm device.

However, it might be the case that a PCI assigned device has a PTP
clock, and it can be registered as "/dev/ptp0" and ptp_kvm as
"/dev/ptp1".

> Also, what's the benefit of shipping this upstream? Why not ship that
> rule with kvm?

qemu-kvm package? Sure i can do that, but then all distributions 
have to do the same with their own packages.

Why not do it in a centralized location where everyone benefits?
(other virtual devices such as virtio-serial already have aliases
upstream).

> Lennart
> 
> -- 
> Lennart Poettering, Red Hat


More information about the systemd-devel mailing list