From nobody Wed May 8 19:52:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611555842; cv=none; d=zohomail.com; s=zohoarc; b=CzC4KwOKGoebTJUGJypnrDmKx4t7WbujwhxGh7X3t6mh7UuYZjHSKLvovc+YXYrZwsluhfa8SrgSohNYxBWBU0VidDHdWUxOX5f/oseI9hZq++bqHglUYbVLamkeg5sGvYLkJGQzkULQeDRyN53gtVodVEjblNgxdaxX41umjbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611555842; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=HsCS/Vdc7BAEI1MFVdwD/2zBW+emDvxnBiyAdvYv7Vs=; b=iTvDdVp4LOSK83N751mD3XvRimXCd0M3SlqF97o5HaKtjk0N36S4GcDfIToV+1DVSfF+Hp2YdOK3kdAS5WBFU/jCcwSqIU7+JOLCosn+HHnN+3xQJ562BUKezM/C9XGaFjBvUXNGAN2UCnAzr8/INDEbTGEBeI50k5O0wuaRFbQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611555842760485.0674455856673; Sun, 24 Jan 2021 22:24:02 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-390-1O5J_huiOOWFMT6cdQSPbg-1; Mon, 25 Jan 2021 01:23:57 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CDBD81005504; Mon, 25 Jan 2021 06:23:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 054EC5D9DB; Mon, 25 Jan 2021 06:23:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 716CF4E58E; Mon, 25 Jan 2021 06:23:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10P6Nhtx015173 for ; Mon, 25 Jan 2021 01:23:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id 255ED2026D25; Mon, 25 Jan 2021 06:23:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2054C2026D46 for ; Mon, 25 Jan 2021 06:23:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12370811E84 for ; Mon, 25 Jan 2021 06:23:41 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-353-hehj-UkHNgykSvK3QeRCVQ-1; Mon, 25 Jan 2021 01:23:38 -0500 Received: by mail-pj1-f52.google.com with SMTP id p15so7740727pjv.3 for ; Sun, 24 Jan 2021 22:23:37 -0800 (PST) Received: from localhost.localdomain.localdomain ([222.67.221.235]) by smtp.gmail.com with ESMTPSA id n7sm15609392pfn.141.2021.01.24.22.23.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jan 2021 22:23:36 -0800 (PST) X-MC-Unique: 1O5J_huiOOWFMT6cdQSPbg-1 X-MC-Unique: hehj-UkHNgykSvK3QeRCVQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HsCS/Vdc7BAEI1MFVdwD/2zBW+emDvxnBiyAdvYv7Vs=; b=CY6Binxapsw2H/LtN3yI8/1gasYaTKSe8xzNBtH3XVAmwovEqbiUZo9e4ApXkduoz1 ZSTS2SJXtLZVXim7a8s5VM6F7BuIo8vOF4MRFPVwhyeZ/9QSKssyZMx9AEiyK8m3F8DR kDWrfv++k+99G0iobjROgYmPEPOdZCJekJOR7NVf1CGfqEas4h7fefQU42wJOhXEj7IN zhPP5exToTT4R9ASOdcpyIRfwyYumoao5Z7GgsM78DoBT9ESB4hbZNAgDkfwMHRyuExF rcJeNNU3Ru8HhvxgqIvdL155kmN+Zw6M+D5Oq56BmhFvuMizw/A5fxFMgP0cWO/pv/X8 2unQ== X-Gm-Message-State: AOAM532yC1cSl/9Zah9FyqRrHuIBCvaY2ZJsUaBcP0uiFvHKzG2lAQgX jgjD0Km2n2/LlSYngDYFvqptZHIt/ugCd5wBhl9lsg== X-Google-Smtp-Source: ABdhPJwl7uU1b+BdKZAxl2gWHLMc8mJRlxMs1DjQy4mVTaTEOylnySkM+wmc7YPJXYTmJ56opnKN0A== X-Received: by 2002:a17:90a:ea02:: with SMTP id w2mr20098794pjy.228.1611555816773; Sun, 24 Jan 2021 22:23:36 -0800 (PST) From: gongwei To: libvir-list@redhat.com Subject: [PATCH] conf: add realtime parameter for rtc Date: Mon, 25 Jan 2021 01:23:27 -0500 Message-Id: <1611555807-42423-1-git-send-email-gongwei@smartx.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: gongwei X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 2 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Pass the parameter clock rt to qemu to ensure that the virtual machine is not synchronized with the host time --- src/conf/domain_conf.c | 1 + src/qemu/qemu_command.c | 3 +++ src/qemu/qemu_validate.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dab4f10..c19124d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1106,6 +1106,7 @@ VIR_ENUM_IMPL(virDomainTimerTrack, "boot", "guest", "wall", + "realtime", ); =20 VIR_ENUM_IMPL(virDomainTimerTickpolicy, diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1ec302d..5e09aa0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5947,6 +5947,9 @@ qemuBuildClockArgStr(virDomainClockDefPtr def) case VIR_DOMAIN_TIMER_TRACK_WALL: virBufferAddLit(&buf, ",clock=3Dhost"); break; + case VIR_DOMAIN_TIMER_TRACK_REALTIME: + virBufferAddLit(&buf, ",clock=3Drt"); + break; } =20 switch (def->timers[i]->tickpolicy) { diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a060bd9..d4fe40f 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -444,6 +444,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, case -1: /* unspecified - use hypervisor default */ case VIR_DOMAIN_TIMER_TRACK_GUEST: case VIR_DOMAIN_TIMER_TRACK_WALL: + case VIR_DOMAIN_TIMER_TRACK_REALTIME: break; case VIR_DOMAIN_TIMER_TRACK_BOOT: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, --=20 1.8.3.1