From patchwork Wed Nov 2 09:08:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: xinhui X-Patchwork-Id: 9408539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8052960234 for ; Wed, 2 Nov 2016 05:16:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71D2829E05 for ; Wed, 2 Nov 2016 05:16:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6665129E09; Wed, 2 Nov 2016 05:16:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_MED autolearn=no version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 22B4029E05 for ; Wed, 2 Nov 2016 05:16:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1nsc-0002Nh-4E; Wed, 02 Nov 2016 05:14:30 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1nsa-0002Mf-QZ for xen-devel@lists.xenproject.org; Wed, 02 Nov 2016 05:14:28 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id BD/7D-10083-43679185; Wed, 02 Nov 2016 05:14:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHKsWRWlGSWpSXmKPExsUyZfE8Vl3jMsk Ig9dzZS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxtfe+YC+bzVHxddJWlgXECVxcjF4eQwCVG ietHFzJCOC1MEhtv9bNCOG8YJd7++8sG4ZxmlLh8cDNUZj2jxJ9tL9ghnB2MEp+2bofKrGOUW LD4DtS024wSHxt6gBxODjYBA4kbFzaxgCREBLqZJF5tWAOWYBY4zyxx/otBFyMHh7BAsMSGI4 IgYRYBVYlJFy6wgIQlBOQlnt2uBwlzCvhJPPq4jBnEFhLwlVh24TvYFF4BQYmTM5+AlTMLqEu snycEMVxeonnrbLByCQERiYl/37NB2KoSF+fMhIrrSLyZOoERwraQWNFwlRXCNpJoe3mMGWK8 n8T0x9+YIOJZEvv33gb7RELgP6PEl9ML2ScwSs9CcsYshDNmITljASPzKkb14tSistQiXWO9p KLM9IyS3MTMHF1DAzO93NTi4sT01JzEpGK95PzcTYzAeGUAgh2MHf+cDjFKcjApifLqlkpGCP El5adUZiQWZ8QXleakFh9ilOHgUJLgNSkBygkWpaanVqRl5gATB0xagoNHSYS3sRgozVtckJh bnJkOkTrFqCglzrsYpE8AJJFRmgfXBktWlxhlpYR5GYEOEeIpSC3KzSxBlX/FKM7BqARUATKF JzOvBG76K6DFTECLzZMkQBaXJCKkpBoYgytNek/27LmVrRjNoHxuhUPv1bC1iZYzHXrMLkmtk Pzy+rpX2VU+p/MnHhn4/LGQLPqaU/zy67eGX9bPGCxL1jA+qyz9umtBiLre7BuSgXF6amuE49 lkXkp6+Zw50TfNqiB+xgsnU8e7HxueWdd3Lt9/se/Tcln1/IlSL6f+bRD2X8NQ9rBOiaU4I9F Qi7moOBEAxHC4FlEDAAA= X-Env-Sender: xinhui.pan@linux.vnet.ibm.com X-Msg-Ref: server-7.tower-27.messagelabs.com!1478063666!64468476!1 X-Originating-IP: [148.163.158.5] X-SpamReason: No, hits=2.1 required=7.0 tests=DATE_IN_FUTURE_03_06, UNPARSEABLE_RELAY X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37094 invoked from network); 2 Nov 2016 05:14:27 -0000 Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by server-7.tower-27.messagelabs.com with AES256-SHA encrypted SMTP; 2 Nov 2016 05:14:27 -0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA25DQo4032951 for ; Wed, 2 Nov 2016 01:14:26 -0400 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0b-001b2d01.pphosted.com with ESMTP id 26f61hh7e2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 02 Nov 2016 01:14:25 -0400 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Nov 2016 15:14:23 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 2 Nov 2016 15:14:21 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 639242CE8056; Wed, 2 Nov 2016 16:14:21 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA25ELgb196928; Wed, 2 Nov 2016 16:14:21 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA25EJDS009117; Wed, 2 Nov 2016 16:14:21 +1100 Received: from ltcalpine2-lp13.aus.stglabs.ibm.com (ltcalpine2-lp13.aus.stglabs.ibm.com [9.40.195.196]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uA25CnXp006036; Wed, 2 Nov 2016 16:14:14 +1100 From: Pan Xinhui To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-s390@vger.kernel.org, xen-devel-request@lists.xenproject.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Date: Wed, 2 Nov 2016 05:08:38 -0400 X-Mailer: git-send-email 2.4.11 In-Reply-To: <1478077718-37424-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> References: <1478077718-37424-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110205-0008-0000-0000-000000D81966 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110205-0009-0000-0000-000008646BC4 Message-Id: <1478077718-37424-12-git-send-email-xinhui.pan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-02_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611020096 Cc: kernellwp@gmail.com, jgross@suse.com, dave@stgolabs.net, David.Laight@ACULAB.COM, rkrcmar@redhat.com, peterz@infradead.org, benh@kernel.crashing.org, bsingharora@gmail.com, will.deacon@arm.com, Pan Xinhui , borntraeger@de.ibm.com, mingo@redhat.com, paulus@samba.org, mpe@ellerman.id.au, pbonzini@redhat.com, paulmck@linux.vnet.ibm.com, boqun.feng@gmail.com Subject: [Xen-devel] [PATCH v7 11/11] Documentation: virtual: kvm: Support vcpu preempted check X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 preempted" into struct kvm_steal_time. This field tells if one vcpu is running or not. It is zero if 1) some old KVM deos not support this filed. 2) the vcpu is not preempted. Other values means the vcpu has been preempted. Signed-off-by: Pan Xinhui Acked-by: Radim Krčmář Acked-by: Paolo Bonzini --- Documentation/virtual/kvm/msr.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt index 2a71c8f..ab2ab76 100644 --- a/Documentation/virtual/kvm/msr.txt +++ b/Documentation/virtual/kvm/msr.txt @@ -208,7 +208,9 @@ MSR_KVM_STEAL_TIME: 0x4b564d03 __u64 steal; __u32 version; __u32 flags; - __u32 pad[12]; + __u8 preempted; + __u8 u8_pad[3]; + __u32 pad[11]; } whose data will be filled in by the hypervisor periodically. Only one @@ -232,6 +234,11 @@ MSR_KVM_STEAL_TIME: 0x4b564d03 nanoseconds. Time during which the vcpu is idle, will not be reported as steal time. + preempted: indicate the VCPU who owns this struct is running or + not. Non-zero values mean the VCPU has been preempted. Zero + means the VCPU is not preempted. NOTE, it is always zero if the + the hypervisor doesn't support this field. + MSR_KVM_EOI_EN: 0x4b564d04 data: Bit 0 is 1 when PV end of interrupt is enabled on the vcpu; 0 when disabled. Bit 1 is reserved and must be zero. When PV end of