Message ID | 20210914223114.435273-6-rananta@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=cUWt=OE=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B934C433F5 for <linux-arm-kernel@archiver.kernel.org>; Tue, 14 Sep 2021 22:48:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB13D61155 for <linux-arm-kernel@archiver.kernel.org>; Tue, 14 Sep 2021 22:48:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CB13D61155 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=EuNxC+C20khLOrcSdM5pEgNx3cikDrcUBklsFo9Hq5k=; b=w1lziJQXtkDzKVJyb72ZWkBolN y7GcxgDx2jZMZXZtkyqA0kaoOpP8UbnOMJ8xf4Awajv+nmdXBfW1tR9wca6t+pKesff312YBharTl aC8ddlAmBHf5SroXZ1PhhRn9DCO0wxg6mwD0hMyB+tDdJhphAywVQRovphwu8eALJ0fx05njjHBpz zXu616EhbREY7IGmL5GHIFXvKgOB8tWPn/8TRFQ5DQLkC3P6nwDeEshJbKjjlNs/FlVjjWZ4b64Eg R4RqTP6X/m5hUR+cgOLKPG09Fl4h2lAw1D1kAhdNyI61SXBEoehBRFk01pvgfbykBxNySi4IEDuSs F9E6CGWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQHBh-007V29-Vt; Tue, 14 Sep 2021 22:46:02 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQGxj-007PBR-H3 for linux-arm-kernel@lists.infradead.org; Tue, 14 Sep 2021 22:31:36 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id v66-20020a25abc8000000b0059ef57c3386so998284ybi.1 for <linux-arm-kernel@lists.infradead.org>; Tue, 14 Sep 2021 15:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=VREX88yx9xWzleHW1ZEh6k892sL/xPpdGpps/n5mOO0=; b=lq/RxhWNVx7HvcaPCnLIvkYwVN/qajC6Z/TJt7BjQwh2kiG8aYIi9XXaH0fBS2ObXi uE6/PIk3diZR5P/av9EkChN11F3yxn4ytG2jrnfrPhRGWUQURMRhLO13q9wfpwCR7A5g 7/RM69WnbITiPwIbs0CKxqrkVixmM0zXsLIHEQ1wRoh9YknzbX05OpiklsPNYRuGulYJ ieHH741AlkpjfWugkGP71HaL/RjstLd4VOJDdNdvowz1eyiO3NYovGHA5UHOVGx1wlXU yW88zoT/uvTdgcLKGt87Xg/M64lmUFO4TbQhZOSwiPy7azMCeLzAURvn+KJL+pQF/9m8 vfNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=VREX88yx9xWzleHW1ZEh6k892sL/xPpdGpps/n5mOO0=; b=vND8VtG2ROxz1ftQrhlKwMADWtRGBnA+SZGuUAM1/R4gfpLGFr7GRWu51106knL+8s oVuxZyOBDMbP8/zV5BvKWyAGVFh+kLhQt8bVon9hpNTUmKK7PVFx5rHxRsSlLblfSZxn +gKCKZLRGH/4i3F5NSJWv5xJouAZ+F2H1nhri7Y7dnSOe3/MQdqAoEXHkQdvIiJTaYSR ccvYH25qf7ziO3zESecSQPFbTMzMHErNJVNT0ZYuGomNB++C634PWj19kOdcIIhcpxnd v/sEH/4RGjGfSFWOcfhtQeSNDuP0Q+xi2gy1kiyzYog0Upgj5PQCGIccErovhKXPzXr/ nk7A== X-Gm-Message-State: AOAM531Zv9sQD/bSx/rsa1I6IAOrFSr6Nm6My7rHj1Yk4s8iyIgp5WgH X88jcRuRrPHhQSm0AGmy7BKZ4ud/UIAq X-Google-Smtp-Source: ABdhPJyLk4QgmytoSzKirQaQHCryllAwONOUAJ9rKEqFuwJe5coEC6Nmu0X3brEpwZMn9TH/d1w9gy2iCB0z X-Received: from rananta-virt.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1bcc]) (user=rananta job=sendgmr) by 2002:a25:61c8:: with SMTP id v191mr1965131ybb.472.1631658693708; Tue, 14 Sep 2021 15:31:33 -0700 (PDT) Date: Tue, 14 Sep 2021 22:31:04 +0000 In-Reply-To: <20210914223114.435273-1-rananta@google.com> Message-Id: <20210914223114.435273-6-rananta@google.com> Mime-Version: 1.0 References: <20210914223114.435273-1-rananta@google.com> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog Subject: [PATCH v7 05/15] KVM: arm64: selftests: Add support for cpu_relax From: Raghavendra Rao Ananta <rananta@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Andrew Jones <drjones@redhat.com>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Peter Shier <pshier@google.com>, Ricardo Koller <ricarkol@google.com>, Oliver Upton <oupton@google.com>, Reiji Watanabe <reijiw@google.com>, Jing Zhang <jingzhangos@google.com>, Raghavendra Rao Anata <rananta@google.com>, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_153135_650509_59D12EB9 X-CRM114-Status: UNSURE ( 9.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: selftests: Introduce arch_timer selftest
|
expand
|
diff --git a/tools/testing/selftests/kvm/include/aarch64/processor.h b/tools/testing/selftests/kvm/include/aarch64/processor.h index 93797783abad..265054c24481 100644 --- a/tools/testing/selftests/kvm/include/aarch64/processor.h +++ b/tools/testing/selftests/kvm/include/aarch64/processor.h @@ -122,6 +122,11 @@ void vm_install_exception_handler(struct kvm_vm *vm, void vm_install_sync_handler(struct kvm_vm *vm, int vector, int ec, handler_fn handler); +static inline void cpu_relax(void) +{ + asm volatile("yield" ::: "memory"); +} + #define isb() asm volatile("isb" : : : "memory") #define dsb(opt) asm volatile("dsb " #opt : : : "memory") #define dmb(opt) asm volatile("dmb " #opt : : : "memory")