Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp770137ybe; Wed, 11 Sep 2019 04:33:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1z+yH4Rz1MYNKu3C1SuVDUvL+vYg1xuaGOl3qw94m0KSfUKbDhishVjW4vTqfYvoqqNgl X-Received: by 2002:a05:6402:a48:: with SMTP id bt8mr35769645edb.86.1568201581525; Wed, 11 Sep 2019 04:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568201581; cv=none; d=google.com; s=arc-20160816; b=Qg8h1WX6xxvLe0orljpuKAua0j/Ra3zr6Js/nXOg6ZUFRaGQUC6ao7ze0o/oqkZ2Wl hxfLgHONNTrbtT/3t6aAXgXA2Neaa7BXP7DbjS0mY8lUCx8fV93mTQJxsTCjBEvYbwz8 U6t5exREPAYGqUjx15ZBb5yYX8Qo7E+kpWkUc2csyDfIXs2/07UEpalGN6XrWcbTEWHm JZ3u+sGpvzl05DE9jm0SK212HiFaj2f2ejsfdBg+kSbFkYCC+FxEysP2pS6IgiNhLl8T FxgwuCXrVzRM4+Jr0g3/I4m9qGNmrUtxB6VtWCXrEVfqQ57YnDJpfoZJXwaghv7VbtJI NU3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=RYLIrcnVNaX5+ZKMokklYH1loZEx/45zelmkBFMXxEI=; b=D6hK+QC72Le2MLKk4RF5HW1+84DIcZT1tPysdJrU9pLif8XxvJGRnQHXzoXvuYaXR5 IiYdbE0k81wy4gSWXrUHOgJ/2+Z+WkbzQlnOHu4fYqwPg+eyy7DARgrGmJgebTB0ANeK fmU3+NySZPMIV2/cDOB/vsAG/YadGZHbUR0bgXN4BHKQr25/QtZPcUeRInOAXD9JtDX7 8LPg1WQM2/pJzVrre+osopIw0DG6J6L0M2opMNc6qWlKFxrRKj8fPww0AixUxyzUiLEM aWP9voxgS8c64SH38D/vDTFQKTLFgyJ0OKCWvgRDwzYRtAJPFIo+jK4ltgOpR4J0QJi7 aWTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16si10954780ejr.190.2019.09.11.04.32.35; Wed, 11 Sep 2019 04:33:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727329AbfIKLal (ORCPT + 99 others); Wed, 11 Sep 2019 07:30:41 -0400 Received: from foss.arm.com ([217.140.110.172]:45910 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbfIKLal (ORCPT ); Wed, 11 Sep 2019 07:30:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 35F6B28; Wed, 11 Sep 2019 04:30:40 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 394263F59C; Wed, 11 Sep 2019 04:30:37 -0700 (PDT) Date: Wed, 11 Sep 2019 12:30:35 +0100 Message-ID: <86ftl3rrxg.wl-maz@kernel.org> From: Marc Zyngier To: "Jianyong Wu (Arm Technology China)" Cc: "netdev@vger.kernel.org" , "pbonzini@redhat.com" , "sean.j.christopherson@intel.com" , "richardcochran@gmail.com" , Mark Rutland , Will Deacon , Suzuki Poulose , "linux-kernel@vger.kernel.org" , Steve Capper , "Kaly Xin (Arm Technology China)" , "Justin He (Arm Technology China)" Subject: Re: [RFC PATCH 3/3] Enable ptp_kvm for arm64 In-Reply-To: References: <20190829063952.18470-1-jianyong.wu@arm.com> <20190829063952.18470-4-jianyong.wu@arm.com> <4d04867c-2188-9574-fbd1-2356c6b99b7d@kernel.org> <86h85osbzz.wl-maz@kernel.org> <86blvtsodw.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Sep 2019 11:06:18 +0100, "Jianyong Wu (Arm Technology China)" wrote: > > Hi Marc, > > I think there are three points for the migration issue of ptp_kvm, > where a VM using ptp_kvm migrates to a host without ptp_kvm support. > > First: how does it impact the VM having migrated? > I run a VM with ptp_kvm support in guest but not support in > host. the ptp0 will return 0 when get time from it which can't pass > the check of chrony, then chrony will choose another clocksource. > From this point, VM will only get lost in precision of time sync. "only" is a bit of an understatement. Once the guest has started relying on a service, it seems rather harsh to pretend this service doesn't exist anymore. It could well be that the VM cannot perform its function if the precision is not good enough. The analogy is the Spectre-v2 mitigation, which is implemented as a hypercall. Nothing will break if you migrate to a host that doesn't support the mitigation, but the guest will now be unsafe. Is that acceptable? the answer is of course "no". > Second: how to check the failure of the ptp kvm service > when there is no ptp kvm service, hypercall will go into default > ops, so we can check the return value which can inform us the > failure. Sure. But that's still an issue. The VM relied on the service, and the service isn't available anymore. > Third: how to inform VMM > There is ioctl cmd call "KVM_CHECK_EXTENSION" in kvm, which may do > that thing. Accordingly, qemu should be offered the support which > will block us. We can try to add this support in kvm but we are not > sure the response from qemu side. It doesn't matter whether QEMU implements that check or . The important thing is that we give userspace a way to check this for this, and having a capability that can be checked against is probably the right thing to do. Thanks, M. -- Jazz is not dead, it just smells funny.