Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Andrew Jones <drjones@redhat.com>,
	eric.auger.pro@gmail.com, maz@kernel.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: thuth@redhat.com, andre.przywara@arm.com
Subject: Re: [PATCH kvm-unit-tests] fixup! arm/arm64: ITS: pending table migration test
Date: Fri, 3 Apr 2020 07:07:10 +0200	[thread overview]
Message-ID: <a13e00e8-b699-103a-af6c-7807b67f8c70@redhat.com> (raw)
In-Reply-To: <20200402180148.490026-1-drjones@redhat.com>

Hi Drew,

On 4/2/20 8:01 PM, Andrew Jones wrote:
> [ Without the fix this test would hang, as timeouts don't work with
>   the migration scripts (yet). Use errata to skip instead of hang. ]
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  arm/gic.c  | 18 ++++++++++++++++--
>  errata.txt |  1 +
>  2 files changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/arm/gic.c b/arm/gic.c
> index ddf0f9d09b14..c0781f8c2c80 100644
> --- a/arm/gic.c
> +++ b/arm/gic.c
> @@ -12,6 +12,7 @@
>   * This work is licensed under the terms of the GNU LGPL, version 2.
>   */
>  #include <libcflat.h>
> +#include <errata.h>
>  #include <asm/setup.h>
>  #include <asm/processor.h>
>  #include <asm/delay.h>
> @@ -812,13 +813,23 @@ static void test_its_migration(void)
>  	check_lpi_stats("dev7/eventid=255 triggers LPI 8196 on PE #2 after migration");
>  }
>  
> +#define ERRATA_UNMAPPED_COLLECTIONS "ERRATA_8c58be34494b"
> +
>  static void test_migrate_unmapped_collection(void)
>  {
> -	struct its_collection *col;
> -	struct its_device *dev2, *dev7;
> +	struct its_collection *col = NULL;
> +	struct its_device *dev2 = NULL, *dev7 = NULL;
> +	bool test_skipped = false;
>  	int pe0 = 0;
>  	u8 config;
>  
> +	if (!errata(ERRATA_UNMAPPED_COLLECTIONS)) {
> +		report_skip("Skipping test, as this test hangs without the fix. "
> +			    "Set %s=y to enable.", ERRATA_UNMAPPED_COLLECTIONS);
> +		test_skipped = true;
> +		goto do_migrate;
out of curiosity why do you still do the migration and not directly return.

Besides, what caused the migration to fail without 8c58be34494b is
bypassed so:

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>

Thank you for the fixup

Eric

> +	}
> +
>  	if (its_setup1())
>  		return;
>  
> @@ -830,9 +841,12 @@ static void test_migrate_unmapped_collection(void)
>  	its_send_mapti(dev2, 8192, 0, col);
>  	gicv3_lpi_set_config(8192, LPI_PROP_DEFAULT);
>  
> +do_migrate:
>  	puts("Now migrate the VM, then press a key to continue...\n");
>  	(void)getchar();
>  	report_info("Migration complete");
> +	if (test_skipped)
> +		return;
>  
>  	/* on the destination, map the collection */
>  	its_send_mapc(col, true);
> diff --git a/errata.txt b/errata.txt
> index 7d6abc2a7bf6..b66afaa9c079 100644
> --- a/errata.txt
> +++ b/errata.txt
> @@ -5,4 +5,5 @@
>  9e3f7a296940    : 4.9                           : arm64: KVM: pmu: Fix AArch32 cycle counter access
>  7b6b46311a85    : 4.11                          : KVM: arm/arm64: Emulate the EL1 phys timer registers
>  6c7a5dce22b3    : 4.12                          : KVM: arm/arm64: fix races in kvm_psci_vcpu_on
> +8c58be34494b    : 5.6                           : KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections
>  #---------------:-------------------------------:---------------------------------------------------
> 

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2020-04-03  5:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 14:52 [kvm-unit-tests PATCH v8 00/13] arm/arm64: Add ITS tests Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 01/13] libcflat: Add other size defines Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 02/13] page_alloc: Introduce get_order() Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 03/13] arm/arm64: gic: Introduce setup_irq() helper Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 04/13] arm/arm64: gicv3: Add some re-distributor defines Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 05/13] arm/arm64: gicv3: Set the LPI config and pending tables Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 06/13] arm/arm64: ITS: Introspection tests Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 07/13] arm/arm64: ITS: its_enable_defaults Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 08/13] arm/arm64: ITS: Device and collection Initialization Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 09/13] arm/arm64: ITS: Commands Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 10/13] arm/arm64: ITS: INT functional tests Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 11/13] arm/run: Allow Migration tests Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 12/13] arm/arm64: ITS: migration tests Eric Auger
2020-04-02 14:52 ` [kvm-unit-tests PATCH v8 13/13] arm/arm64: ITS: pending table migration test Eric Auger
2020-04-02 18:01 ` [PATCH kvm-unit-tests] fixup! " Andrew Jones
2020-04-03  5:07   ` Auger Eric [this message]
2020-04-03  7:37     ` Andrew Jones
2020-04-03  8:23       ` Auger Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a13e00e8-b699-103a-af6c-7807b67f8c70@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=andre.przywara@arm.com \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=maz@kernel.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox