From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137540; cv=none; d=zoho.com; s=zohoarc; b=MjM5pl5WrctJ+RuHFM92vziUulBZN+kM63LojmQPtI4LBEKZXZeNsD5qkPbGr1JVSnMsca063Bc5NlitNA8o+uq+qOt6/5RtU3hi9I52Mb9L6SkqpuYuIVgAkB3MQImRs9BXwgi4V6UD+D2arpspByDcWOlA0VG6itNf+0UWz9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137540; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=EZ1cBuImb6Ap5fn61HKvU/m2TJ4b1A6M1wj/MLyZfbw=; b=Bfg7wQg7bqZeJOuEf7KcrVby08XkxNICO7I3RC6Ovc21Vc9045xS64lsL1A4fTvMRo3era4npbS/KhHZUxpCcsRFjw24klVLK7YAFIpiKEMitl2gVkF2262xsbhRAGz3/C1q72p8mKd4lv8LqBXrs8/caTgpOI9ZXtQmL3GlmRw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564137540595100.69495055164191; Fri, 26 Jul 2019 03:39:00 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbg-0006Xt-KY; Fri, 26 Jul 2019 10:37:48 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbf-0006Xi-LC for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:47 +0000 Received: from mail-lj1-x243.google.com (unknown [2a00:1450:4864:20::243]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 678e6ef2-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:46 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id i21so51040302ljj.3 for ; Fri, 26 Jul 2019 03:37:46 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:43 -0700 (PDT) X-Inumbo-ID: 678e6ef2-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+Sj40svUpTZp0FXDzpVnnnckBrBiw8PXNGcGLtUyPKE=; b=u4em/W6jRqWmOf+CYZ3d1Q3rNyyCnhsP4bkIqS0Bc27rpzcgf1ddnkGGBOtTBz/Kwv YnquHzQtRhbVjwZAfe4w6ETGxdR0sS+ZX0tVLMxszwSjoi5z1zAmqH3OOqva8UQBPBbN wgrF62Iun2BLLIVhHOCyhXEL0XMR9dMxe9GCaxELUhZsqeXmoigFCX/UvxTvLaCE9W1i dqf9QNT2TyATgcbCDEik6WMI8NgjyKGsc+/lO2rYCtE2JTytwtWsYKgQe0sFBNiuKpqY dDXVkzC6nE/KeQBVwwT6LXWu+tqPom9mqN6iLSuzagSaIrrmwMGDXZVAg78hpNnx4bJM Qwlg== 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:in-reply-to :references; bh=+Sj40svUpTZp0FXDzpVnnnckBrBiw8PXNGcGLtUyPKE=; b=N30fDrQNwMmFHlLGiG3WTYZOtaZ9oGCCdtweAbAzil8/xc92MEEtsqaHOAXZ/bm3mH Y/MLqKVymChaQM0cmrEVZstlKXTbZDq4ADzDfRyPBgzaRrR0iRLuTmGTxr/VM631c/B3 CM3Z1UYqpCKAC00RNUxzZIkRgV5YYAhWgkz4huWE5k41VDDnf5EATAjDYQsPGcKeZ0yn dXrCwctcef1DZiIM5VXj0Cr7aVDbOfKWSvwnvL+VfUAOa1yqKL4tYkUnKbfAI4IbAPe3 uAiPTeocRoj/1AWnr/15KPi3H44A79zmaRb0niCYVHAYxW+pfjGRz+Zbw3+tgWHrUvm3 4G/A== X-Gm-Message-State: APjAAAXNMbNUfBfv2+NIVHi2gXjbJg9QevElI0Fa3JzISnJ+WTrGw0bi dHXk7EqPh9seDg9ubpFMEaaJWI5Q X-Google-Smtp-Source: APXvYqwXXNpLzZGEnDDiwwHay0T5FDcaE/mLGYQOy37/tNPPR4fhRzc4ujo6laCsPVMrXFxbagdP8g== X-Received: by 2002:a2e:9593:: with SMTP id w19mr1850913ljh.69.1564137464536; Fri, 26 Jul 2019 03:37:44 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:34 +0300 Message-Id: <1564137460-25629-2-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> Subject: [Xen-devel] [RFC 1/6] xen/arm: Re-enable interrupt later in the trap path X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Andrii Anisov MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Julien Grall This makes function enter_hypervisor_head() being executed with irqs locked. Signed-off-by: Julien Grall [Andrii: add a justification commit message] Signed-off-by: Andrii Anisov --- xen/arch/arm/arm64/entry.S | 11 +++++------ xen/arch/arm/traps.c | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm64/entry.S index 97b05f5..8f28789 100644 --- a/xen/arch/arm/arm64/entry.S +++ b/xen/arch/arm/arm64/entry.S @@ -195,7 +195,6 @@ hyp_error_invalid: =20 hyp_error: entry hyp=3D1 - msr daifclr, #2 mov x0, sp bl do_trap_hyp_serror exit hyp=3D1 @@ -203,7 +202,7 @@ hyp_error: /* Traps taken in Current EL with SP_ELx */ hyp_sync: entry hyp=3D1 - msr daifclr, #6 + msr daifclr, #4 mov x0, sp bl do_trap_hyp_sync exit hyp=3D1 @@ -304,7 +303,7 @@ guest_sync_slowpath: ALTERNATIVE("bl check_pending_vserror; cbnz x0, 1f", "nop; nop", SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT) - msr daifclr, #6 + msr daifclr, #4 mov x0, sp bl do_trap_guest_sync 1: @@ -332,7 +331,7 @@ guest_fiq_invalid: =20 guest_error: entry hyp=3D0, compat=3D0 - msr daifclr, #6 + msr daifclr, #4 mov x0, sp bl do_trap_guest_serror exit hyp=3D0, compat=3D0 @@ -347,7 +346,7 @@ guest_sync_compat: ALTERNATIVE("bl check_pending_vserror; cbnz x0, 1f", "nop; nop", SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT) - msr daifclr, #6 + msr daifclr, #4 mov x0, sp bl do_trap_guest_sync 1: @@ -375,7 +374,7 @@ guest_fiq_invalid_compat: =20 guest_error_compat: entry hyp=3D0, compat=3D1 - msr daifclr, #6 + msr daifclr, #4 mov x0, sp bl do_trap_guest_serror exit hyp=3D0, compat=3D1 diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 3103620..5a9dc66 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2017,6 +2017,8 @@ static void enter_hypervisor_head(struct cpu_user_reg= s *regs) { struct vcpu *v =3D current; =20 + ASSERT(!local_irq_is_enabled()); + /* If the guest has disabled the workaround, bring it back on. */ if ( needs_ssbd_flip(v) ) arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL); @@ -2051,6 +2053,7 @@ void do_trap_guest_sync(struct cpu_user_regs *regs) const union hsr hsr =3D { .bits =3D regs->hsr }; =20 enter_hypervisor_head(regs); + local_irq_enable(); =20 switch ( hsr.ec ) { @@ -2186,6 +2189,7 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) const union hsr hsr =3D { .bits =3D regs->hsr }; =20 enter_hypervisor_head(regs); + local_irq_enable(); =20 switch ( hsr.ec ) { @@ -2224,6 +2228,7 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) void do_trap_hyp_serror(struct cpu_user_regs *regs) { enter_hypervisor_head(regs); + local_irq_enable(); =20 __do_trap_serror(regs, VABORT_GEN_BY_GUEST(regs)); } @@ -2231,6 +2236,7 @@ void do_trap_hyp_serror(struct cpu_user_regs *regs) void do_trap_guest_serror(struct cpu_user_regs *regs) { enter_hypervisor_head(regs); + local_irq_enable(); =20 __do_trap_serror(regs, true); } --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137548; cv=none; d=zoho.com; s=zohoarc; b=Fjv5PkSbaG9W86q/7/jpOfAg3ypLJfWf61ofUU9Bvtf0HgVHtJElHyI3w+GshXSEk6RoN4tZ963ZVQ+01xixDb2WROnqIhHbKPzdtxgRtQJQlxE+Xd0xfDkbK/EVcfPKdLAft7diL2zVj2ZeeA9NtN30dTW6SG4Bo5heAVs5L1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137548; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=EYZL3iJm5/RdIWC5PinzYR+HZ59HZakiQApxuR8lmNQ=; b=KiZ0Vw4YXArhuXc6uFEOiG8F+uIOPL369es99sNjVTAMpfx1OE5moqFLslygoddFcRvKXHZIVo01BXx9pclSPl1zILyASTuJfCbVgP0/8kY23lVvgCsLvcZZ2VJOjJ1oPHvY8XaZur/lP8ar8lrlXmnaAqealZOc1bqln6UPsZM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564137548415207.83794595285644; Fri, 26 Jul 2019 03:39:08 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbj-0006YT-2P; Fri, 26 Jul 2019 10:37:51 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbh-0006YG-Oi for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:49 +0000 Received: from mail-lj1-x243.google.com (unknown [2a00:1450:4864:20::243]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6890b12e-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:48 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id t28so51004234lje.9 for ; Fri, 26 Jul 2019 03:37:47 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:45 -0700 (PDT) X-Inumbo-ID: 6890b12e-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r+8JnlZestTVxlER6RMuaC2epWUTI/v8WDaAeYWwhA0=; b=RErUSs4OfOW/pF16O1aJVbU3Hhci+OMHYQPUk2SEsqu4CYSMr9MwQIgkWyIIPO/yvp qGPQOfBQFNHUiuojaa2stI9YYWn7ptUKN7+6Xisdjrzlv6L5DtPy+qD15r3hpHWGNqRw MyH9te2o+rJVHwlsKBzYnHNAJ/qEPaImQEB+cz0ozfInPKstUj+m5gS4RofLWvphvdJy p1/zSAvhBDeFosLUoqdt7AU7w1JxbdBw0CxwJyo4m6gjUUXqBFgjujvS88TmqIb4EucG eY0hfn8R/bYIeBvpj+DvmG4uZO0AQPY4CyZrBw0/MY6gZ5XTM7Z2vCDm5eAbgbbRBk0U FUYg== 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:in-reply-to :references; bh=r+8JnlZestTVxlER6RMuaC2epWUTI/v8WDaAeYWwhA0=; b=Q2nzZhVjBZ4Rf3kBXs+7iVLDAT3YrRL2/1FFnDtX8KU0vyoZCQdpHokwPDQKjBiw6x hTj5YtEH7FtUGAQTaXdvVmFtSIDiEX8idYP3fzb9rjEuP1AKKSBn3bd6kkHJfLhV5tcP zZtCmrZqGGS336VbgrH0dD2ZWgM2qo0YPC/r9NGSiLn7fftvpP0RY3fg23By4S9TQdxf O4wwcmpttAeKB4qrEv5UHejxLgJVyP8xdfcaX86UmVnwZJlO7pazEcSn0pV4+onUqEQ6 qsFwNtrOq37IDczzv9O37bff0aCfcVB9gkpPVtpIAtjbdkY9R6b+9iyN1tA5bLJfKTGb u//Q== X-Gm-Message-State: APjAAAW1E3qgZyRi7yK8BkflNCatvLTFCPHhGC4Lu5qLaI1CAtrXboh6 +C4qpgGfmDN0Zio6x+uygZbxBxWO X-Google-Smtp-Source: APXvYqzHH/Xa7A2eRVemlcQHIS8r9ZHsUY98TbT8rBeFeaJFRSzBtBgMe01uVPHjzTX70sZs9qqx3g== X-Received: by 2002:a2e:9117:: with SMTP id m23mr49167542ljg.134.1564137466198; Fri, 26 Jul 2019 03:37:46 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:35 +0300 Message-Id: <1564137460-25629-3-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> Subject: [Xen-devel] [RFC 2/6] schedule: account true system idle time X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Andrii Anisov , George Dunlap , Dario Faggioli , Julien Grall , Volodymyr Babchuk MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov Currently the idle time is being accounted as a idle vcpu runtime. This is not entirely correct, because the entity named idle vcpu is in fact a hypervisor tasks worker. E.g. some softirqs are processed by the idle vcpu. So lets change idle vcpu time accounting and specify system idle time as a idle vcpu blocked time. For this we should appropriately change idle vcpu runstates around the real processor idle entry. Signed-off-by: Andrii Anisov --- xen/arch/arm/domain.c | 24 ++++++++++++++++++++++++ xen/common/schedule.c | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 941bbff..a4e0fd7 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -19,6 +19,7 @@ #include #include #include +#include =20 #include #include @@ -42,6 +43,27 @@ =20 DEFINE_PER_CPU(struct vcpu *, curr_vcpu); =20 +static inline void idle_vcpu_runstate_change( + unsigned int cpu, int new_state, s_time_t new_entry_time) +{ + s_time_t delta; + struct vcpu *v =3D idle_vcpu[cpu]; + spinlock_t *lock =3D vcpu_schedule_lock(v); + + ASSERT(v =3D=3D current); + ASSERT(v->runstate.state !=3D new_state); + + delta =3D new_entry_time - v->runstate.state_entry_time; + if ( delta > 0 ) + { + v->runstate.time[v->runstate.state] +=3D delta; + v->runstate.state_entry_time =3D new_entry_time; + } + + v->runstate.state =3D new_state; + vcpu_schedule_unlock(lock, v); +} + static void do_idle(void) { unsigned int cpu =3D smp_processor_id(); @@ -51,11 +73,13 @@ static void do_idle(void) process_pending_softirqs(); =20 local_irq_disable(); + idle_vcpu_runstate_change(cpu, RUNSTATE_blocked, NOW()); if ( cpu_is_haltable(cpu) ) { dsb(sy); wfi(); } + idle_vcpu_runstate_change(cpu, RUNSTATE_running, NOW()); local_irq_enable(); =20 sched_tick_resume(); diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 349f962..0a38d4a 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -214,7 +214,7 @@ uint64_t get_cpu_idle_time(unsigned int cpu) if ( cpu_online(cpu) && v ) vcpu_runstate_get(v, &state); =20 - return state.time[RUNSTATE_running]; + return state.time[RUNSTATE_blocked]; } =20 /* @@ -922,6 +922,8 @@ void vcpu_block(void) { struct vcpu *v =3D current; =20 + ASSERT(!is_idle_vcpu(v)); + set_bit(_VPF_blocked, &v->pause_flags); =20 arch_vcpu_block(v); --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137548; cv=none; d=zoho.com; s=zohoarc; b=h5MONPHdOHj7sXkS4M8/fdT0tWOE47INeagTwn5as1WTOR/Xdi/GoZECtlIWPdXYu5C7oXDAvPIlsifxkVJMwNvyzGZ+11jaELjnpIWPKYfVAYsy+YkeDhPKOOs2ixE8ATEY2VWz5wW6g6hWrPMSchGT356XNUz5+YrPSBTUrmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137548; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Mpf3hSAbIRm86srDshjU8hAsw3l9qgNLRyt3wOw9Xaw=; b=fDUGB4ZUk4ivyynCuqTcC5rVwHSlhRwS0z2X6+kSgzM+fIX+PAg8uJCR6JGTrgzUwaM1BaSiib+vz1ys/UlXo+PsCSaENW57g8BhTdoTBNqKN3i+1EQfiUQPf91HVYEsZQfiDzdInNypJUTipSNoHqjAC+BgWIofFd3D7Nzml3M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564137548895896.2177888184499; Fri, 26 Jul 2019 03:39:08 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbk-0006Ym-BZ; Fri, 26 Jul 2019 10:37:52 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbj-0006YS-2Y for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:51 +0000 Received: from mail-lj1-x244.google.com (unknown [2a00:1450:4864:20::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6966fc2c-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:49 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id z28so51094529ljn.4 for ; Fri, 26 Jul 2019 03:37:49 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:47 -0700 (PDT) X-Inumbo-ID: 6966fc2c-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C3x4QZ/H4fgKZsJV2PbcUbwqhU719ym2cTFrlww8kZY=; b=R/H0E1/6+rMg/3WCvEe9/KLRWuqeREmPZE3AiKSsOgN9nnoBk1j6TVzacFxVdnCtHR gU845z7hckIYtECJwT5+b0deaH/YpeBEcUDUmpjzua9Pik8s91Pdt4tySnpDlhsOJjdl PWsSFPxunfvwbeM8saD9kH1vLKmQ+cslg+941l009y8uwAD4f2OQ06PsLjmKtXP0ZfhA VYcFkWtfgiETEcjlKo1ev+/37DMVujdrNPhQy7028ldUXW53k5ZG9smambKHS6TdXLV7 Vw03wzHDPA9AFRi24+XHNq857R+zhhNRAeTSKsonu82m4GHH4cEkrUzO82B+U09Cy0Dp uUsQ== 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:in-reply-to :references; bh=C3x4QZ/H4fgKZsJV2PbcUbwqhU719ym2cTFrlww8kZY=; b=J1vLbQ7z+AjiuGe+BdGreybqd2XFokllHjkpXsiqFLV/6A/sSrEjXYY7gCXFVa6jEn vCFWh7TF9FCcPzMZIl/VU54vMtjLuyiqV36PFcZJtwHIg6BA9vqvOSRypCITjG1rHMrv 3O/WLoptJrsPTaCvqEDIZskYt/7PKybwu4nkBklS2o6sIGtUYa9pZxHLq9QVhgE2UlSM 3IZYWEF85JUExps+NbFUGDgQVGEIuWr06I8Iz/fGPX3eC8rLgp4Z2XGzvLCvOHjbFJxk 9V5wVcevGm5tTmnorpCqKD0Xw+I4AP3GTghfmjBN4VJrGx+KEKK1Wfmgjci4W07koplT hAqw== X-Gm-Message-State: APjAAAXCLAHjwGABuj8RSShmoXx21rotsJB7O8zWqEursn+RSPL3Fb25 6m45duncWg367Abgeg1d5gO4LTsG X-Google-Smtp-Source: APXvYqyT8un3YLD9G2tfwX3LQueJ5HDZkWbzbOKu5Ef/7cVWGME2KZ90taK4tZyTRDrpxTuM+UzZSg== X-Received: by 2002:a2e:9950:: with SMTP id r16mr31882783ljj.173.1564137467625; Fri, 26 Jul 2019 03:37:47 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:36 +0300 Message-Id: <1564137460-25629-4-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> Subject: [Xen-devel] [RFC 3/6] sysctl: extend XEN_SYSCTL_getcpuinfo interface X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Tim Deegan , Stefano Stabellini , Andrii Anisov , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Dario Faggioli , Julien Grall , Jan Beulich MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov Extend XEN_SYSCTL_getcpuinfo interface with guest and hypervisor time information. Signed-off-by: Andrii Anisov --- xen/common/schedule.c | 22 ++++++++++++++++++++++ xen/common/sysctl.c | 2 ++ xen/include/public/sysctl.h | 2 ++ xen/include/xen/sched.h | 2 ++ 4 files changed, 28 insertions(+) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 0a38d4a..9e8805d 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -217,6 +217,28 @@ uint64_t get_cpu_idle_time(unsigned int cpu) return state.time[RUNSTATE_blocked]; } =20 +uint64_t get_cpu_guest_time(unsigned int cpu) +{ + struct vcpu_runstate_info state =3D { 0 }; + struct vcpu *v =3D idle_vcpu[cpu]; + + if ( cpu_online(cpu) && v ) + vcpu_runstate_get(v, &state); + + return state.time[RUNSTATE_runnable]; +} + +uint64_t get_cpu_hyp_time(unsigned int cpu) +{ + struct vcpu_runstate_info state =3D { 0 }; + struct vcpu *v =3D idle_vcpu[cpu]; + + if ( cpu_online(cpu) && v ) + vcpu_runstate_get(v, &state); + + return state.time[RUNSTATE_running]; +} + /* * If locks are different, take the one with the lower address first. * This avoids dead- or live-locks when this code is running on both diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index 765effd..c4abb11 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -152,6 +152,8 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_s= ysctl) for ( i =3D 0; i < nr_cpus; i++ ) { cpuinfo.idletime =3D get_cpu_idle_time(i); + cpuinfo.guesttime =3D get_cpu_guest_time(i); + cpuinfo.hyptime =3D get_cpu_hyp_time(i); =20 if ( copy_to_guest_offset(op->u.getcpuinfo.info, i, &cpuinfo, = 1) ) goto out; diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index 91c48dc..1a4e4de 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -164,6 +164,8 @@ struct xen_sysctl_debug_keys { /* XEN_SYSCTL_getcpuinfo */ struct xen_sysctl_cpuinfo { uint64_aligned_t idletime; + uint64_aligned_t hyptime; + uint64_aligned_t guesttime; }; typedef struct xen_sysctl_cpuinfo xen_sysctl_cpuinfo_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpuinfo_t); diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index b40c8fd..5e28797 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -882,6 +882,8 @@ int vcpu_pin_override(struct vcpu *v, int cpu); =20 void vcpu_runstate_get(struct vcpu *v, struct vcpu_runstate_info *runstate= ); uint64_t get_cpu_idle_time(unsigned int cpu); +uint64_t get_cpu_hyp_time(unsigned int cpu); +uint64_t get_cpu_guest_time(unsigned int cpu); =20 /* * Used by idle loop to decide whether there is work to do: --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137547; cv=none; d=zoho.com; s=zohoarc; b=cRnnQlakXSWpPW40gNk9hRWpMBrNT91N7C5kqPz+5vwYqQSl16guhvf3E+4nlBWWARUOsamftHnfBZZPDzFSJFdZw1kvCoVxual/Z7TFFCTi1JjPHBEu9Lr8CetseZnRHWxzOP1w4R7FrYF84GbVxbWMLYqZmnThQhsOaQivPs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137547; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=V/x6IA6239I6DpS5oRPWABAJ5AekHEUFXEL47jdMPVg=; b=TFlzQaXh9EzWZFznO6F5CD59TkCPdMWSJot/5FgLEXl3yFtPi7rTKJo4OrZ276ee2xsk2lrB5Q0wKDNC6TKG92O7acatlxJWcaPL1UySljMA66YG9OhpUN2Yy5Nbw65zVNmKgVXI2bpt8/ylwJZM2NtWlx7a46CqZspiN16DZEk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564137547497966.868242254953; Fri, 26 Jul 2019 03:39:07 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbl-0006Z5-Kc; Fri, 26 Jul 2019 10:37:53 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbj-0006Yh-QC for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:51 +0000 Received: from mail-lf1-x142.google.com (unknown [2a00:1450:4864:20::142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6a395883-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:50 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id s19so36751526lfb.9 for ; Fri, 26 Jul 2019 03:37:50 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:48 -0700 (PDT) X-Inumbo-ID: 6a395883-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D23SaDmMes/5rLk7esszHz1ov4+y99tR1u40eMXh+wA=; b=hi8w1xokQ+1fLlzpVqiUDin0oatRCd/qhpzeNDSs/Spm98Ir+9OkAQ/7wRRdTxjnqP G0+ecuRC5ee7OZUk9Oc+vzyXxzZZYwR9HxJe11bHezLlaoadI3OlNPuBx9rE5+z3+gYf 2HUyjN6jjRfWs8kQUCcBzxdTNYa2eWgQ/MO5n9RIGRVI8zsNhfdndJg2Csnh0gzZY/uX X6pTM42THxJHPq72Q0yI88ggniNS0voqlk3vPU3ZSp8o738TkWrKX2Mwj3bRDWMnHPyP kHtc/vsSRVfCDUiTGkjgggpX24haR92UuDGnzj/Gt5Lnh2ImLvHk0ft+a/UFxZwWrqSe WtrQ== 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:in-reply-to :references; bh=D23SaDmMes/5rLk7esszHz1ov4+y99tR1u40eMXh+wA=; b=jcBdnSeDoTXnpWjqo50mjpiySvPSbmI/oSArztxrARZHrezWxTMPLNdxvKndcuyQET 1JeSq6Fs2f3uyvpvEpNo5Lu5Hh5abKEl12XKDo7mvA5dA4kUTXJVh7OJEwACuJSYHrmG /RLdq5PSSHEpx3k2UmQVM9iYDMwJxp5Rm6iRC4okJxTKIcbYJWidXUepRJ34ZkOkMdwQ RzTHXjAPZ2qLbxxyMTkmMttCc78yHB5lg8Qm+tQw8DpGl7Tx5MF1Q1mlaAeI8WE6VdcK uw3EVWQAuiHyuH+tzpaMmP14AB2q+1k+XiAZAQ7K/c5j7tTtlcE1vnBG9HE6CfCO2UX9 DVDA== X-Gm-Message-State: APjAAAU7BapOLj4du2phj5tiByeNQjQXAQIkuhA9wawna/grD7csSMLY mI4WFHE9UGfMQwQX3o/AmFU0sB0S X-Google-Smtp-Source: APXvYqwhDnkKYPKaAsFCvVBcWCL344LKoLD8j+pk9K4PRKK/NgAbZ2S4oC/Myup42mxgATYcPQOqAQ== X-Received: by 2002:a05:6512:51c:: with SMTP id o28mr45535842lfb.67.1564137468910; Fri, 26 Jul 2019 03:37:48 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:37 +0300 Message-Id: <1564137460-25629-5-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> Subject: [Xen-devel] [RFC 4/6] xentop: show CPU load information X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson , Andrii Anisov , Wei Liu MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov Let xentop request and show information about CPU load (hypervisor, guest and idle information) Signed-off-by: Andrii Anisov --- tools/xenstat/libxenstat/src/xenstat.c | 38 +++++++++++++++++++++++++= ++++ tools/xenstat/libxenstat/src/xenstat.h | 9 +++++++ tools/xenstat/libxenstat/src/xenstat_priv.h | 3 +++ tools/xenstat/xentop/xentop.c | 30 +++++++++++++++++++++++ 4 files changed, 80 insertions(+) diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxens= tat/src/xenstat.c index bba143e..e4029d2 100644 --- a/tools/xenstat/libxenstat/src/xenstat.c +++ b/tools/xenstat/libxenstat/src/xenstat.c @@ -148,6 +148,9 @@ static inline unsigned long long parse(char *s, char *m= atch) xenstat_node *xenstat_get_node(xenstat_handle * handle, unsigned int flags) { #define DOMAIN_CHUNK_SIZE 256 + xc_cpuinfo_t *cpuinfo; + int max_cpus, nr_cpus; + xenstat_node *node; xc_physinfo_t physinfo =3D { 0 }; xc_domaininfo_t domaininfo[DOMAIN_CHUNK_SIZE]; @@ -177,6 +180,26 @@ xenstat_node *xenstat_get_node(xenstat_handle * handle= , unsigned int flags) * handle->page_size; =20 node->freeable_mb =3D 0; + + max_cpus =3D node->num_cpus; + + cpuinfo =3D calloc(max_cpus, sizeof(xc_cpuinfo_t)); + if (!cpuinfo) + return NULL; + + if (xc_getcpuinfo(handle->xc_handle, max_cpus, cpuinfo, &nr_cpus) < 0) { + free(cpuinfo); + return NULL; + } + + for ( i =3D 0; i < nr_cpus; i++) { + node->idle_time +=3D cpuinfo[i].idletime; + node->hyp_time +=3D cpuinfo[i].hyptime; + node->guest_time +=3D cpuinfo[i].guesttime; + } + + free(cpuinfo); + /* malloc(0) is not portable, so allocate a single domain. This will * be resized below. */ node->domains =3D malloc(sizeof(xenstat_domain)); @@ -346,6 +369,21 @@ unsigned long long xenstat_node_cpu_hz(xenstat_node * = node) return node->cpu_hz; } =20 +unsigned long long xenstat_node_idle_time(xenstat_node * node) +{ + return node->idle_time; +} + +unsigned long long xenstat_node_guest_time(xenstat_node * node) +{ + return node->guest_time; +} + +unsigned long long xenstat_node_hyp_time(xenstat_node * node) +{ + return node->hyp_time; +} + /* Get the domain ID for this domain */ unsigned xenstat_domain_id(xenstat_domain * domain) { diff --git a/tools/xenstat/libxenstat/src/xenstat.h b/tools/xenstat/libxens= tat/src/xenstat.h index 76a660f..5b34461 100644 --- a/tools/xenstat/libxenstat/src/xenstat.h +++ b/tools/xenstat/libxenstat/src/xenstat.h @@ -80,6 +80,15 @@ unsigned int xenstat_node_num_cpus(xenstat_node * node); /* Get information about the CPU speed */ unsigned long long xenstat_node_cpu_hz(xenstat_node * node); =20 +/* Get information about the CPU idle time */ +unsigned long long xenstat_node_idle_time(xenstat_node * node); + +/* Get information about the CPU guest execution time */ +unsigned long long xenstat_node_guest_time(xenstat_node * node); + +/* Get information about the CPU hypervisor execution time */ +unsigned long long xenstat_node_hyp_time(xenstat_node * node); + /* * Domain functions - extract information from a xenstat_domain */ diff --git a/tools/xenstat/libxenstat/src/xenstat_priv.h b/tools/xenstat/li= bxenstat/src/xenstat_priv.h index 4eb44a8..78ad8c4 100644 --- a/tools/xenstat/libxenstat/src/xenstat_priv.h +++ b/tools/xenstat/libxenstat/src/xenstat_priv.h @@ -45,6 +45,9 @@ struct xenstat_node { unsigned int flags; unsigned long long cpu_hz; unsigned int num_cpus; + unsigned long long hyp_time; + unsigned long long guest_time; + unsigned long long idle_time; unsigned long long tot_mem; unsigned long long free_mem; unsigned int num_domains; diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c index af11ebf..aa6e9b0 100644 --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -930,6 +930,34 @@ void adjust_field_widths(xenstat_domain *domain) fields[FIELD_VBD_WSECT-1].default_width =3D length; } =20 +void do_utilization(void) +{ + double us_elapsed =3D 0.0, + us_hyp =3D 0.0, + us_guest =3D 0.0, + us_idle =3D 0.0; + + /* Can't calculate CPU percentage without a current and a previous sample= .*/ + if(prev_node !=3D NULL && cur_node !=3D NULL) { + + /* Calculate the time elapsed in microseconds */ + us_elapsed =3D ((curtime.tv_sec-oldtime.tv_sec)*1000000.0 + +(curtime.tv_usec - oldtime.tv_usec)); + + /* In the following, nanoseconds must be multiplied by 1000.0 to + * convert to microseconds, then divided by 100.0 to get a percentage, + * resulting in a multiplication by 10.0 */ + us_idle =3D ((xenstat_node_idle_time(cur_node) - + xenstat_node_idle_time(prev_node))/10.0)/us_elapsed; + us_guest =3D ((xenstat_node_guest_time(cur_node) - + xenstat_node_guest_time(prev_node))/10.0)/us_elapsed; + us_hyp =3D ((xenstat_node_hyp_time(cur_node) - + xenstat_node_hyp_time(prev_node))/10.0)/us_elapsed; + } + + print("%%CPU(s): %6.1f gu, %6.1f hy, %6.1f id \n", + us_guest, us_hyp, us_idle); +} =20 /* Section printing functions */ /* Prints the top summary, above the domain table */ @@ -972,6 +1000,8 @@ void do_summary(void) used =3D xenstat_node_tot_mem(cur_node); freeable_mb =3D 0; =20 + do_utilization(); + /* Dump node memory and cpu information */ if ( freeable_mb <=3D 0 ) print("Mem: %lluk total, %lluk used, %lluk free ", --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137541; cv=none; d=zoho.com; s=zohoarc; b=NTu23/gS+JUu7j67D99cbHUsybPA2T0t8s+kZlx99qneuYHUzV4dGmBdiP4vFA/wtiIAO2RF00jMBrrBCJCIdjy3V3ToMhtZEMN6tUNx+H4gpknDbO1UqgZ0wr4R6h+Qxbl0tNbDtexjAcqYq5eFZITw6k/7fUaEWspKTjPW74g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137541; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=FRy850xjue0n8mm6Z3NC0AbJ/ACuDfhRXaEJRZ6fz8Q=; b=FkpbLgxJ3JykVl3SUyUXwLHxSQaDZGZ4oFCi/5BkKOXqU7ptsOSbdti+yquKNKaBU0d9Tp29fpNaIeiceX0UOr3vzOB+IvmL6soLm5yNfwo0hc/GcDCX4HzIbZ/npp1gBzIuzwgchaNAOpIQz0asL2u0ruvx2jmkozp7xzGYYbI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 156413754132012.687861454799418; Fri, 26 Jul 2019 03:39:01 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbl-0006ZD-VR; Fri, 26 Jul 2019 10:37:53 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbl-0006Yy-63 for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:53 +0000 Received: from mail-lf1-x141.google.com (unknown [2a00:1450:4864:20::141]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6ade9d24-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:51 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id b17so36773306lff.7 for ; Fri, 26 Jul 2019 03:37:51 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:49 -0700 (PDT) X-Inumbo-ID: 6ade9d24-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nPUZNsAM40LxOGsx6lmuVJn2v89gou977qScNyinde8=; b=J2qCKtwrLHXWe4zuH0pFWEQdcL18O42w6YtFZ+pm2omiDQOHJ2KW6M+4oC8MbTfSf1 hB/TMSug9aGxkPiAIIF6UiJuVaKAou9usPfbaO9XqYEBvkYRyVBjUwoeeuYth4Nhf+xW x4k1mc1pT7ZyLXZslk88/yNHp29yC8emtdNCPA7FtIQyoNVRfHVMIJySOBbNNcA+tjkx +Y4XMs1LlnH0fa92ygKeyxXlk6KH7gKei89qBMyn3VX2/JZjD9n64wxuxBXElMmKFocJ qdWn5O0HG3ZEyXmEQQyid3hWlBlc4S8YvdK3pKo5WE/yoNAH9GgsvE6+UXK6ECREv65w 9Qgg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=nPUZNsAM40LxOGsx6lmuVJn2v89gou977qScNyinde8=; b=MMa60ZMEVfZjelO7N2clRRaoftX5h9pUSJS7JCbamyHeYdJn7hJiPPELP6dpCLWaL2 FhE4W2QyFGy1IH6Y+mLHXfnVFcxP1kUVRo7Mz7WaCFjtMRU4lRWbo0RSxWu8/LI3qt/l PfdfjvXWgnjCRIXGEuuNHNPejUS6tlFEpzs/PwnM6zJqm5VhFrU86I+kLnmkMbFWDV3J 5WqPiBjGoh13m/XNRNNyRKR4WbeQSIDn/Ki655/5q8w0XG1Xr0wcgbZXIpIN+XUBYDq2 YXNDE0081qzF/rvNumumjJaTo1j5SGzPhZF5ecWHv5pjzWAxJH6WPj6JKYH9q+j/7SdM OgvQ== X-Gm-Message-State: APjAAAVyr8IOsR3gdUicMIkzdzJsO4qHxTtRPHBuF3ERoBwA0CbKpzCU Ic5m3lOK3TgY2t/Os08qkz0+9tFy X-Google-Smtp-Source: APXvYqzML1t+rRV4ytTFuxDs7jkrk0AYZoGH9rFrIUTWbI2wu4vBlsPDabQwZMhTE0pMSmM1ELa2jQ== X-Received: by 2002:ac2:5609:: with SMTP id v9mr42000579lfd.27.1564137470036; Fri, 26 Jul 2019 03:37:50 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:38 +0300 Message-Id: <1564137460-25629-6-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> MIME-Version: 1.0 Subject: [Xen-devel] =?utf-8?q?=5BRFC_5/6=5D_arm64=3A_=D1=81all_enter=5Fhy?= =?utf-8?q?pervisor=5Fhead_only_when_it_is_needed?= X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Andrii Anisov Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov On ARM64 we know exactly if trap happened from hypervisor or guest, so we do not need to take that decision. This reduces a condition for all enter_hypervisor_head calls and the function call for traps from the hypervisor mode. Currently, it is implemented for ARM64 only. Integrating the stuff with ARM32 requires moving ` if ( guest_mode(regs) )` condition into ARM32 specific traps.c Signed-off-by: Andrii Anisov --- xen/arch/arm/arm64/entry.S | 6 ++-- xen/arch/arm/traps.c | 75 ++++++++++++++++++++++++------------------= ---- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm64/entry.S index 8f28789..21c710d 100644 --- a/xen/arch/arm/arm64/entry.S +++ b/xen/arch/arm/arm64/entry.S @@ -211,7 +211,7 @@ hyp_irq: entry hyp=3D1 msr daifclr, #4 mov x0, sp - bl do_trap_irq + bl do_trap_hyp_irq exit hyp=3D1 =20 guest_sync: @@ -321,7 +321,7 @@ guest_irq: SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT) msr daifclr, #4 mov x0, sp - bl do_trap_irq + bl do_trap_guest_irq 1: exit hyp=3D0, compat=3D0 =20 @@ -364,7 +364,7 @@ guest_irq_compat: SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT) msr daifclr, #4 mov x0, sp - bl do_trap_irq + bl do_trap_guest_irq 1: exit hyp=3D0, compat=3D1 =20 diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 5a9dc66..13726db 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2011,48 +2011,45 @@ static inline bool needs_ssbd_flip(struct vcpu *v) cpu_require_ssbd_mitigation(); } =20 -static void enter_hypervisor_head(struct cpu_user_regs *regs) +static void enter_hypervisor_head(void) { - if ( guest_mode(regs) ) - { - struct vcpu *v =3D current; + struct vcpu *v =3D current; =20 - ASSERT(!local_irq_is_enabled()); + ASSERT(!local_irq_is_enabled()); =20 - /* If the guest has disabled the workaround, bring it back on. */ - if ( needs_ssbd_flip(v) ) - arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL); + /* If the guest has disabled the workaround, bring it back on. */ + if ( needs_ssbd_flip(v) ) + arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL); =20 - /* - * If we pended a virtual abort, preserve it until it gets cleared. - * See ARM ARM DDI 0487A.j D1.14.3 (Virtual Interrupts) for detail= s, - * but the crucial bit is "On taking a vSError interrupt, HCR_EL2.= VSE - * (alias of HCR.VA) is cleared to 0." - */ - if ( v->arch.hcr_el2 & HCR_VA ) - v->arch.hcr_el2 =3D READ_SYSREG(HCR_EL2); + /* + * If we pended a virtual abort, preserve it until it gets cleared. + * See ARM ARM DDI 0487A.j D1.14.3 (Virtual Interrupts) for details, + * but the crucial bit is "On taking a vSError interrupt, HCR_EL2.VSE + * (alias of HCR.VA) is cleared to 0." + */ + if ( v->arch.hcr_el2 & HCR_VA ) + v->arch.hcr_el2 =3D READ_SYSREG(HCR_EL2); =20 #ifdef CONFIG_NEW_VGIC - /* - * We need to update the state of our emulated devices using level - * triggered interrupts before syncing back the VGIC state. - * - * TODO: Investigate whether this is necessary to do on every - * trap and how it can be optimised. - */ - vtimer_update_irqs(v); - vcpu_update_evtchn_irq(v); + /* + * We need to update the state of our emulated devices using level + * triggered interrupts before syncing back the VGIC state. + * + * TODO: Investigate whether this is necessary to do on every + * trap and how it can be optimised. + */ + vtimer_update_irqs(v); + vcpu_update_evtchn_irq(v); #endif =20 - vgic_sync_from_lrs(v); - } + vgic_sync_from_lrs(v); } =20 void do_trap_guest_sync(struct cpu_user_regs *regs) { const union hsr hsr =3D { .bits =3D regs->hsr }; =20 - enter_hypervisor_head(regs); + enter_hypervisor_head(); local_irq_enable(); =20 switch ( hsr.ec ) @@ -2188,7 +2185,6 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) { const union hsr hsr =3D { .bits =3D regs->hsr }; =20 - enter_hypervisor_head(regs); local_irq_enable(); =20 switch ( hsr.ec ) @@ -2227,7 +2223,6 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) =20 void do_trap_hyp_serror(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); local_irq_enable(); =20 __do_trap_serror(regs, VABORT_GEN_BY_GUEST(regs)); @@ -2235,21 +2230,31 @@ void do_trap_hyp_serror(struct cpu_user_regs *regs) =20 void do_trap_guest_serror(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); + enter_hypervisor_head(); local_irq_enable(); =20 __do_trap_serror(regs, true); } =20 -void do_trap_irq(struct cpu_user_regs *regs) +void do_trap_guest_irq(struct cpu_user_regs *regs) +{ + enter_hypervisor_head(); + gic_interrupt(regs, 0); +} + +void do_trap_guest_fiq(struct cpu_user_regs *regs) +{ + enter_hypervisor_head(); + gic_interrupt(regs, 1); +} + +void do_trap_hyp_irq(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); gic_interrupt(regs, 0); } =20 -void do_trap_fiq(struct cpu_user_regs *regs) +void do_trap_hyp_fiq(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); gic_interrupt(regs, 1); } =20 --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137543; cv=none; d=zoho.com; s=zohoarc; b=brAnIXlDdeM1haEm2ox1wGHu8SdAZ/4L75fgTYM+ar53Z7NRptpbmKvYYoM6e8M6nFAr3WVAQjh1Fz6mbUyuOJWkrGEeyvCkhSak5EcqYeRwxlkq4V0QfcnxAP+6AUsfS+DfoXcYqDfUybwkcdwT697ij2XaVyz2M99GmlZnmHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137543; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=FRy850xjue0n8mm6Z3NC0AbJ/ACuDfhRXaEJRZ6fz8Q=; b=QsfuW9tsPmj3+DH5t8CZXnT0PQTJyVUeghVRdQ5/jgTxS+1/L8WklMNP0Z3ecRjcXgFkEHWdQqJRNKdXvACDLTY9pHSB8/tNHAYaNxNt2Q8SZzExHCWjfYqzUN4CGRI6xfL03jkldqoJsjDPLPPFz7qyo7PveDTAfsb2q5sl1uc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564137543105699.2921755336191; Fri, 26 Jul 2019 03:39:03 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbn-0006ah-Cs; Fri, 26 Jul 2019 10:37:55 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbm-0006ZY-GS for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:54 +0000 Received: from mail-lf1-x143.google.com (unknown [2a00:1450:4864:20::143]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6b8763af-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:52 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id p197so36726567lfa.2 for ; Fri, 26 Jul 2019 03:37:52 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:50 -0700 (PDT) X-Inumbo-ID: 6b8763af-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nPUZNsAM40LxOGsx6lmuVJn2v89gou977qScNyinde8=; b=oH3E58kh7WZ0HMOZyAUN7LoTmej479AMQMJwg/6jtz4Q/mQZ/t6vl6mwWWzrDUpely PXl33//8uQ213KGj3BYb3Q26xNXEbdyEeMTf/6NGj/7NwbWD+6VO2ZtGnNmHd0AGqHon Dwc0RUXN1CabsMcfEce1XcMYdQfH1QOyRzqDubFP2865wXuXL3awnAbOJ4vLpQnJrI4I qiKYD1rJfc+cnoghJ5Tlc34A7T43rzCV9mMBqI+NkH7xr5q5FqXAJ6wEcgHjGsDP64+O Jn1xTG7Lnmk2xku3laHMT+pFfTQ9uzU+7rOsgfGwXcflHDhNTClC2GfyCfGZCYV8EBek ODzQ== 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:in-reply-to :references; bh=nPUZNsAM40LxOGsx6lmuVJn2v89gou977qScNyinde8=; b=EH/wfSnX40vO7/KPkuiZAfJEI+x74TGOV0fmwjh9J6U6MNPMkB36UbFyVW+jfouwov MNO4RjTbQ+52J4L2LfFieih2QuykKsjRCoqiRa1l3/swWW7Lh9rhARuHED0breGLww1+ o85vo9Dbq3UsPrzQ2eWURzofkgta6872RCdIEsCv/220WnW9F2VbRV/XMRbEXbksJcxJ 72Cfy8++bUJ1fha73Z5RykalGFdXY8zIrHlMOPkkHpDz7RJSQ/rsdCQiAqpCHz5d7frF TVEmNbLB5I3Dj2zsN1rfVKUkyqudZl9V2Nlo6Vbf9IVrw4a2STtrm645JY0RpzSrpmmQ syiA== X-Gm-Message-State: APjAAAX+PiObgAlGAX4gjweDMH0LNAFGebWuSzP5WVeWtOJ8JWsVAE92 sK4gUDHdYJinjCKwPSCaDD59QdjN X-Google-Smtp-Source: APXvYqzJKw9mi4WrVdzqtUIw/sAMf+Y09Za9RWs5NYRc2SFwkbJ6ZoAs/6S2r0HrRkLtil10LeEbUQ== X-Received: by 2002:ac2:51ab:: with SMTP id f11mr4889140lfk.55.1564137471150; Fri, 26 Jul 2019 03:37:51 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:39 +0300 Message-Id: <1564137460-25629-7-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> Subject: [Xen-devel] [RFC 5/6] arm64: call enter_hypervisor_head only when it is needed X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Andrii Anisov MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov On ARM64 we know exactly if trap happened from hypervisor or guest, so we do not need to take that decision. This reduces a condition for all enter_hypervisor_head calls and the function call for traps from the hypervisor mode. Currently, it is implemented for ARM64 only. Integrating the stuff with ARM32 requires moving ` if ( guest_mode(regs) )` condition into ARM32 specific traps.c Signed-off-by: Andrii Anisov --- xen/arch/arm/arm64/entry.S | 6 ++-- xen/arch/arm/traps.c | 75 ++++++++++++++++++++++++------------------= ---- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm64/entry.S index 8f28789..21c710d 100644 --- a/xen/arch/arm/arm64/entry.S +++ b/xen/arch/arm/arm64/entry.S @@ -211,7 +211,7 @@ hyp_irq: entry hyp=3D1 msr daifclr, #4 mov x0, sp - bl do_trap_irq + bl do_trap_hyp_irq exit hyp=3D1 =20 guest_sync: @@ -321,7 +321,7 @@ guest_irq: SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT) msr daifclr, #4 mov x0, sp - bl do_trap_irq + bl do_trap_guest_irq 1: exit hyp=3D0, compat=3D0 =20 @@ -364,7 +364,7 @@ guest_irq_compat: SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT) msr daifclr, #4 mov x0, sp - bl do_trap_irq + bl do_trap_guest_irq 1: exit hyp=3D0, compat=3D1 =20 diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 5a9dc66..13726db 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2011,48 +2011,45 @@ static inline bool needs_ssbd_flip(struct vcpu *v) cpu_require_ssbd_mitigation(); } =20 -static void enter_hypervisor_head(struct cpu_user_regs *regs) +static void enter_hypervisor_head(void) { - if ( guest_mode(regs) ) - { - struct vcpu *v =3D current; + struct vcpu *v =3D current; =20 - ASSERT(!local_irq_is_enabled()); + ASSERT(!local_irq_is_enabled()); =20 - /* If the guest has disabled the workaround, bring it back on. */ - if ( needs_ssbd_flip(v) ) - arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL); + /* If the guest has disabled the workaround, bring it back on. */ + if ( needs_ssbd_flip(v) ) + arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL); =20 - /* - * If we pended a virtual abort, preserve it until it gets cleared. - * See ARM ARM DDI 0487A.j D1.14.3 (Virtual Interrupts) for detail= s, - * but the crucial bit is "On taking a vSError interrupt, HCR_EL2.= VSE - * (alias of HCR.VA) is cleared to 0." - */ - if ( v->arch.hcr_el2 & HCR_VA ) - v->arch.hcr_el2 =3D READ_SYSREG(HCR_EL2); + /* + * If we pended a virtual abort, preserve it until it gets cleared. + * See ARM ARM DDI 0487A.j D1.14.3 (Virtual Interrupts) for details, + * but the crucial bit is "On taking a vSError interrupt, HCR_EL2.VSE + * (alias of HCR.VA) is cleared to 0." + */ + if ( v->arch.hcr_el2 & HCR_VA ) + v->arch.hcr_el2 =3D READ_SYSREG(HCR_EL2); =20 #ifdef CONFIG_NEW_VGIC - /* - * We need to update the state of our emulated devices using level - * triggered interrupts before syncing back the VGIC state. - * - * TODO: Investigate whether this is necessary to do on every - * trap and how it can be optimised. - */ - vtimer_update_irqs(v); - vcpu_update_evtchn_irq(v); + /* + * We need to update the state of our emulated devices using level + * triggered interrupts before syncing back the VGIC state. + * + * TODO: Investigate whether this is necessary to do on every + * trap and how it can be optimised. + */ + vtimer_update_irqs(v); + vcpu_update_evtchn_irq(v); #endif =20 - vgic_sync_from_lrs(v); - } + vgic_sync_from_lrs(v); } =20 void do_trap_guest_sync(struct cpu_user_regs *regs) { const union hsr hsr =3D { .bits =3D regs->hsr }; =20 - enter_hypervisor_head(regs); + enter_hypervisor_head(); local_irq_enable(); =20 switch ( hsr.ec ) @@ -2188,7 +2185,6 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) { const union hsr hsr =3D { .bits =3D regs->hsr }; =20 - enter_hypervisor_head(regs); local_irq_enable(); =20 switch ( hsr.ec ) @@ -2227,7 +2223,6 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) =20 void do_trap_hyp_serror(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); local_irq_enable(); =20 __do_trap_serror(regs, VABORT_GEN_BY_GUEST(regs)); @@ -2235,21 +2230,31 @@ void do_trap_hyp_serror(struct cpu_user_regs *regs) =20 void do_trap_guest_serror(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); + enter_hypervisor_head(); local_irq_enable(); =20 __do_trap_serror(regs, true); } =20 -void do_trap_irq(struct cpu_user_regs *regs) +void do_trap_guest_irq(struct cpu_user_regs *regs) +{ + enter_hypervisor_head(); + gic_interrupt(regs, 0); +} + +void do_trap_guest_fiq(struct cpu_user_regs *regs) +{ + enter_hypervisor_head(); + gic_interrupt(regs, 1); +} + +void do_trap_hyp_irq(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); gic_interrupt(regs, 0); } =20 -void do_trap_fiq(struct cpu_user_regs *regs) +void do_trap_hyp_fiq(struct cpu_user_regs *regs) { - enter_hypervisor_head(regs); gic_interrupt(regs, 1); } =20 --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 18:14:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564137541; cv=none; d=zoho.com; s=zohoarc; b=aw7VPo6JC5krfR13YBr2q4vGMEzJ1CRhkae6cRuhDBg+qxG+521tryrLw4txtieXHZZYJ7B+VrrZe15PoQaMRR0R9KcCImlGQN/qDapKr0n5eeBMF9pIQ7Vz04ms2CQZ41GuEC3ZpI3Q8vn1t9Ie4xtYO394frYD7/w7pUqURZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564137541; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=YqvT82AV1jGKZ95rIyJGVyul50gI1bFMwei5VQzz+jI=; b=Rt0f9flogiho7ueK/bDmBjoOkTRU/yl7kVKHiNB+srbycYs5OBUk6Yp6g4crHRhsJVOiz9wzKckAYr3iGcKAillfcn/7AEm1Q87l50PnyQD7vAUI3L1qV7DrTxU3yxyQCuDL9lCKISppsosvn4aadPh5cJiATYcJCM5okcxRwK4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564137541353174.72826592408296; Fri, 26 Jul 2019 03:39:01 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbq-0006cd-PB; Fri, 26 Jul 2019 10:37:58 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqxbp-0006by-4g for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 10:37:57 +0000 Received: from mail-lj1-x242.google.com (unknown [2a00:1450:4864:20::242]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6d259876-af91-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 10:37:55 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id p17so51022628ljg.1 for ; Fri, 26 Jul 2019 03:37:55 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id m4sm9938274ljc.56.2019.07.26.03.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 03:37:52 -0700 (PDT) X-Inumbo-ID: 6d259876-af91-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GHql7nst5PZI5seboz+e6ZOjIlMgKOZG3COnwTjnuXI=; b=NSGVgOVO88sYlATLQVikDUBjqOGp5k+vazPW9O9B1bXJ+GK6mKBn1Ge8KD0OV0Ckbo qEcuobrfhsKmY6tQSRgcXZue09Wz/eAS11OkEO4Qv+aq3qgZdBFdSJGNrHQ01cFueJRc YN7sLYvSH/nf9XjeLgh/CdnmFqvRay22G79L77rqykcuAswU7yYRpoPKDD46CryCJFbD T5kP2hzvlgBy4ERaYE3icpD2Kfvrg/U3ct1XBJLGWdtNhP41mioCtDYt2JAToGBrVKdR bqprERBd9bH55Ut+/vrLtq2KL8tmwqdkzvtv7jNWFYYDTbSYELMdeWnoR9g8Lmm5F3Jh VrIQ== 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:in-reply-to :references; bh=GHql7nst5PZI5seboz+e6ZOjIlMgKOZG3COnwTjnuXI=; b=QQc6ooU8akJ8y7EdXsycED9EKu5Ok8AWuFc7kDkMAWhKm7tDzPrDuo/sZrrKWYRsgi +e98SDzCc2crdUHRZTVFxWXGxs9FDtR25syJwVrC7FXc9rrYJzEeOFdr1i3olI99F5ep Zxc3zZyVmbvKN8JsNDsCvZTn80qulb/Zaju7hXkg007aPGj8lzVBGvkmzf3X/YhA1yL9 E8WFCoJjz9XI1xL641YbDZHhRBkLxz/TOARU1rnFwPh42LrY9h0q1TcodYpIJ48d2IHR 2eSZ20XAveCeEFnaiCuihV9PqFDDcVyeRIw/v8U8yxgxbZ8iqTO2INJ37v6pRfH0eSa9 XEww== X-Gm-Message-State: APjAAAXzNYnNABX9BbQBT8HkG2W8gO4VLgXup0ewv3SpB91zTQjbJcQX Ndh/vHnpz9aeHIG6domOZeZzfM03n68= X-Google-Smtp-Source: APXvYqx8wtYl0O5SH9Q0NcbAVJxXg8MB6wZSjOnbhJs/IK377DfJz5MwCrtvGOiE0KdcFWliNH60jQ== X-Received: by 2002:a2e:8ecb:: with SMTP id e11mr10753271ljl.218.1564137473779; Fri, 26 Jul 2019 03:37:53 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 13:37:40 +0300 Message-Id: <1564137460-25629-8-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> References: <1564137460-25629-1-git-send-email-andrii.anisov@gmail.com> Subject: [Xen-devel] [RFC 6/6] schedule: account all the hypervisor time to the idle vcpu X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Andrii Anisov , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Meng Xu , Jan Beulich , Dario Faggioli , Volodymyr Babchuk MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov Account for a guest: - guest running time - guest sync traps serving time (hypercalls, trapped emulated iomems, etc) - vcpu jobs in leave_hypervisor_tail Account for the hyp: - IRQ processing - Softirq processing Signed-off-by: Andrii Anisov --- xen/arch/arm/traps.c | 49 ++++++++++++++++++++++++++---- xen/common/sched_credit.c | 2 +- xen/common/sched_credit2.c | 4 +-- xen/common/sched_rt.c | 2 +- xen/common/schedule.c | 74 +++++++++++++++++++++++++++++++++++++++---= ---- xen/include/xen/sched.h | 5 ++++ 6 files changed, 116 insertions(+), 20 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 13726db..f978b94 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2064,7 +2064,7 @@ void do_trap_guest_sync(struct cpu_user_regs *regs) if ( !check_conditional_instr(regs, hsr) ) { advance_pc(regs, hsr); - return; + break; } if ( hsr.wfi_wfe.ti ) { /* Yield the VCPU for WFE */ @@ -2126,10 +2126,16 @@ void do_trap_guest_sync(struct cpu_user_regs *regs) perfc_incr(trap_hvc32); #ifndef NDEBUG if ( (hsr.iss & 0xff00) =3D=3D 0xff00 ) - return do_debug_trap(regs, hsr.iss & 0x00ff); + { + do_debug_trap(regs, hsr.iss & 0x00ff); + break; + } #endif if ( hsr.iss =3D=3D 0 ) - return do_trap_hvc_smccc(regs); + { + do_trap_hvc_smccc(regs); + break; + } nr =3D regs->r12; do_trap_hypercall(regs, &nr, hsr); regs->r12 =3D (uint32_t)nr; @@ -2141,10 +2147,16 @@ void do_trap_guest_sync(struct cpu_user_regs *regs) perfc_incr(trap_hvc64); #ifndef NDEBUG if ( (hsr.iss & 0xff00) =3D=3D 0xff00 ) - return do_debug_trap(regs, hsr.iss & 0x00ff); + { + do_debug_trap(regs, hsr.iss & 0x00ff); + break; + } #endif if ( hsr.iss =3D=3D 0 ) - return do_trap_hvc_smccc(regs); + { + do_trap_hvc_smccc(regs); + break; + } do_trap_hypercall(regs, ®s->x16, hsr); break; case HSR_EC_SMC64: @@ -2179,6 +2191,11 @@ void do_trap_guest_sync(struct cpu_user_regs *regs) hsr.bits, hsr.ec, hsr.len, hsr.iss); inject_undef_exception(regs, hsr); } + + local_irq_disable(); + hyp_tacc_head(1); + + /*we will call tacc tail from the leave_hypervisor_tail*/ } =20 void do_trap_hyp_sync(struct cpu_user_regs *regs) @@ -2219,6 +2236,7 @@ void do_trap_hyp_sync(struct cpu_user_regs *regs) hsr.bits, hsr.ec, hsr.len, hsr.iss); do_unexpected_trap("Hypervisor", regs); } + } =20 void do_trap_hyp_serror(struct cpu_user_regs *regs) @@ -2234,28 +2252,47 @@ void do_trap_guest_serror(struct cpu_user_regs *reg= s) local_irq_enable(); =20 __do_trap_serror(regs, true); + + local_irq_disable(); + hyp_tacc_head(2); } =20 void do_trap_guest_irq(struct cpu_user_regs *regs) { + hyp_tacc_head(3); + enter_hypervisor_head(); gic_interrupt(regs, 0); + + /*we will call tacc tail from the leave_hypervisor_tail*/ } =20 void do_trap_guest_fiq(struct cpu_user_regs *regs) { + hyp_tacc_head(4); + enter_hypervisor_head(); gic_interrupt(regs, 1); + + /*we will call tacc tail from the leave_hypervisor_tail*/ } =20 void do_trap_hyp_irq(struct cpu_user_regs *regs) { + hyp_tacc_head(5); + gic_interrupt(regs, 0); + + hyp_tacc_tail(5); } =20 void do_trap_hyp_fiq(struct cpu_user_regs *regs) { + hyp_tacc_head(6); + gic_interrupt(regs, 1); + + hyp_tacc_tail(6); } =20 static void check_for_pcpu_work(void) @@ -2318,6 +2355,8 @@ void leave_hypervisor_tail(void) */ SYNCHRONIZE_SERROR(SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT); =20 + hyp_tacc_tail(1234); + /* * The hypervisor runs with the workaround always present. * If the guest wants it disabled, so be it... diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 3c0d7c7..b8d866b 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -1856,7 +1856,7 @@ csched_schedule( (unsigned char *)&d); } =20 - runtime =3D now - current->runstate.state_entry_time; + runtime =3D current->runtime; if ( runtime < 0 ) /* Does this ever happen? */ runtime =3D 0; =20 diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 8e4381d..2d11a5f 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -3285,7 +3285,7 @@ runq_candidate(struct csched2_runqueue_data *rqd, * no point forcing it to do so until rate limiting expires. */ if ( !yield && prv->ratelimit_us && vcpu_runnable(scurr->vcpu) && - (now - scurr->vcpu->runstate.state_entry_time) < + scurr->vcpu->runtime < MICROSECS(prv->ratelimit_us) ) { if ( unlikely(tb_init_done) ) @@ -3296,7 +3296,7 @@ runq_candidate(struct csched2_runqueue_data *rqd, } d; d.dom =3D scurr->vcpu->domain->domain_id; d.vcpu =3D scurr->vcpu->vcpu_id; - d.runtime =3D now - scurr->vcpu->runstate.state_entry_time; + d.runtime =3D scurr->vcpu->runtime; __trace_var(TRC_CSCHED2_RATELIMIT, 1, sizeof(d), (unsigned char *)&d); diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index 0acfc3d..f1de511 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -947,7 +947,7 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu= *svc, s_time_t now) return; =20 /* burn at nanoseconds level */ - delta =3D now - svc->last_start; + delta =3D svc->vcpu->runtime; /* * delta < 0 only happens in nested virtualization; * TODO: how should we handle delta < 0 in a better way? diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 9e8805d..d3246f9 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -1504,20 +1504,16 @@ static void schedule(void) (now - next->runstate.state_entry_time) : 0, next_slice.time); =20 - ASSERT(prev->runstate.state =3D=3D RUNSTATE_running); - TRACE_4D(TRC_SCHED_SWITCH, prev->domain->domain_id, prev->vcpu_id, next->domain->domain_id, next->vcpu_id); =20 - vcpu_runstate_change( - prev, - ((prev->pause_flags & VPF_blocked) ? RUNSTATE_blocked : - (vcpu_runnable(prev) ? RUNSTATE_runnable : RUNSTATE_offline)), - now); - - ASSERT(next->runstate.state !=3D RUNSTATE_running); - vcpu_runstate_change(next, RUNSTATE_running, now); + if ( !vcpu_runnable(prev) ) + vcpu_runstate_change( + prev, + ((prev->pause_flags & VPF_blocked) ? RUNSTATE_blocked : + RUNSTATE_offline), + now); =20 /* * NB. Don't add any trace records from here until the actual context @@ -1526,6 +1522,7 @@ static void schedule(void) =20 ASSERT(!next->is_running); next->is_running =3D 1; + next->runtime =3D 0; =20 pcpu_schedule_unlock_irq(lock, cpu); =20 @@ -1541,6 +1538,58 @@ static void schedule(void) context_switch(prev, next); } =20 +DEFINE_PER_CPU(int, hyp_tacc_cnt); + +void hyp_tacc_head(int place) +{ + //printk("\thead cpu %u, place %d, cnt %d\n", smp_processor_id(), plac= e, this_cpu(hyp_tacc_cnt)); + + ASSERT(this_cpu(hyp_tacc_cnt) >=3D 0); + + if ( this_cpu(hyp_tacc_cnt) =3D=3D 0 ) + { + s_time_t now =3D NOW(); + spin_lock(per_cpu(schedule_data,smp_processor_id()).schedule_lock); + /* + * Stop time accounting for guest (guest vcpu) + */ + ASSERT( (current->runstate.state_entry_time & XEN_RUNSTATE_UPDATE)= =3D=3D 0); + current->runtime +=3D now - current->runstate.state_entry_time; + vcpu_runstate_change(current, RUNSTATE_runnable, now); + /* + * Start time accounting for hyp (idle vcpu) + */ + vcpu_runstate_change(idle_vcpu[smp_processor_id()], RUNSTATE_runni= ng, now); + spin_unlock(per_cpu(schedule_data,smp_processor_id()).schedule_loc= k); + } + + this_cpu(hyp_tacc_cnt)++; +} + +void hyp_tacc_tail(int place) +{ + //printk("\t\t\t\ttail cpu %u, place %d, cnt %d\n", smp_processor_id()= , place, this_cpu(hyp_tacc_cnt)); + + ASSERT(this_cpu(hyp_tacc_cnt) > 0); + + if (this_cpu(hyp_tacc_cnt) =3D=3D 1) + { + s_time_t now =3D NOW(); + spin_lock(per_cpu(schedule_data,smp_processor_id()).schedule_lock); + /* + * Stop time accounting for guest (guest vcpu) + */ + vcpu_runstate_change(idle_vcpu[smp_processor_id()], RUNSTATE_runna= ble, now); + /* + * Start time accounting for hyp (idle vcpu) + */ + vcpu_runstate_change(current, RUNSTATE_running, now); + spin_unlock(per_cpu(schedule_data,smp_processor_id()).schedule_loc= k); + } + + this_cpu(hyp_tacc_cnt)--; +} + void context_saved(struct vcpu *prev) { /* Clear running flag /after/ writing context to memory. */ @@ -1597,8 +1646,9 @@ static int cpu_schedule_up(unsigned int cpu) sd->curr =3D idle_vcpu[cpu]; init_timer(&sd->s_timer, s_timer_fn, NULL, cpu); atomic_set(&sd->urgent_count, 0); + per_cpu(hyp_tacc_cnt, cpu) =3D 1; =20 - /* Boot CPU is dealt with later in schedule_init(). */ + /* Boot CPU is dealt with later in scheduler_init(). */ if ( cpu =3D=3D 0 ) return 0; =20 @@ -1654,6 +1704,8 @@ static void cpu_schedule_down(unsigned int cpu) sd->sched_priv =3D NULL; =20 kill_timer(&sd->s_timer); + + per_cpu(hyp_tacc_cnt, cpu) =3D 0; } =20 static int cpu_schedule_callback( diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 5e28797..9391318 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -174,6 +174,8 @@ struct vcpu } runstate_guest; /* guest address */ #endif =20 + s_time_t runtime; + /* Has the FPU been initialised? */ bool fpu_initialised; /* Has the FPU been used since it was last saved? */ @@ -998,6 +1000,9 @@ extern void dump_runq(unsigned char key); =20 void arch_do_physinfo(struct xen_sysctl_physinfo *pi); =20 +void hyp_tacc_head(int place); +void hyp_tacc_tail(int place); + #endif /* __SCHED_H__ */ =20 /* --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel