[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need guidance regarding emulation of GICR_PENDBASER and GICR_PROPBASER registers on Aarch32


  • To: Andre Przywara <andre.przywara@xxxxxxx>, marc.zyngier@xxxxxxx, eric.auger@xxxxxxxxxx, james.morse@xxxxxxx, alexandru.elisei@xxxxxxx, suzuki.poulose@xxxxxxx
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Tue, 18 Oct 2022 11:38:00 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BvkagyM3KobcBA2b4SMRPB5en7GYIVE5ghqxHNPc/kA=; b=L8kvfnXchaPGeiiHmbxcE+WjG8S6nDUpWmxqkOh5JMLniOIFZ6bXVmG3lm+zj5Kap+KUMvAqHuAeoCZfr1XbnMul+mjMpsCatz90FWvM9lZC+dCQ89rrdzv91f4p/9DlFaWaY4QIcaU6bx3BFQ4oxmtfqx77AHi/G/2Sxxv43o5aYnRkhkwP1gR9O6stohmu9SZ5hZ5Z6T0bbIKSjqtDL9vi5QQ+TpklXVsl933OrPTgvB8L9Zoj5AR9V0OR1tqgZv+G4ZUrtNwY1EfCQP1n58e6gZF+0xwFMV/kURSP1IQZULYc1ffx0OdalX4NcwHmt3lihUMs5V36HpwjBzBOcA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k2qQrG9E5W1FrmCOLWv9dyUigCmjYVuqhh592gATa91GvXfkchXbBFymb8CR2r4KB76ByGCjQFh6qXpuE4Kr5zUYCWDYJtrTeXzNv3GUJJNix8wUcUEprmdaSilN5L2yCZgVRQ2ZKR0cNxHOl/VDfXrGX3j9OiKk86mqV7IcMWpyHjq3rw0CZD/pLOZcAR2Vm050IzP32r9Jxd+q2PO78mU5gqLQ6tF/cpohBIRzViCiczKxDfhTykWVqbIRpoORhfeR1IJ5/gTF8msQDyvc/ZpPBTzderjk9RvdWbi5HV4C0CrFj+AxEYr3mIFm3CUvvll7yP1usZVxueCJkwowsg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: catalin.marinas@xxxxxxx, will@xxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, kvmarm@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>, "stefanos@xxxxxxxxxx" <stefanos@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Oct 2022 10:38:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Andre/All,

Greetings. I am trying to port Xen on Cortex-R52.

I am trying to understand whether GICR_PENDBASER and GICR_PROPBASER exist on Aarch32 platform.

Looking at the definition of the registers in "Arm IHI ID020922", (from my understanding) it seems the registers can be accessed in 64bit mode only.

Please confirm if my understanding is correct or not.

This seems unlike GICR_TYPER which might be accessed as two 32 bit registers. The reason being the upper 32bits represent affinity and the lower 32 bits represent everything else.


If GICR_PENDBASER and GICR_PROPBASER are accessible in 64 bit mode only, then we Xen can't emulate them on Aarch32 as ISS is invalid (for ldrd, strd instructions).

However, looking at the following commit in kernel, I am a bit confused.

commit 0aa1de57319c4e023187aca0d59dd593a96459a8
Author: Andre Przywara <andre.przywara@xxxxxxx>
Date:   Fri Jul 15 12:43:29 2016 +0100

    KVM: arm64: vgic: Handle ITS related GICv3 redistributor registers

    In the GICv3 redistributor there are the PENDBASER and PROPBASER
    registers which we did not emulate so far, as they only make sense
    when having an ITS. In preparation for that emulate those MMIO
    accesses by storing the 64-bit data written into it into a variable
    which we later read in the ITS emulation.
    We also sanitise the registers, making sure RES0 regions are respected
    and checking for valid memory attributes.

<<<<< code >>>
REGISTER_DESC_WITH_LENGTH(GICR_PROPBASER,
-               vgic_mmio_read_raz, vgic_mmio_write_wi, 8,
+               vgic_mmio_read_propbase, vgic_mmio_write_propbase, 8,
                VGIC_ACCESS_64bit | VGIC_ACCESS_32bit),
        REGISTER_DESC_WITH_LENGTH(GICR_PENDBASER,
-               vgic_mmio_read_raz, vgic_mmio_write_wi, 8,
+               vgic_mmio_read_pendbase, vgic_mmio_write_pendbase, 8,
                VGIC_ACCESS_64bit | VGIC_ACCESS_32bit),
<<<< code >>>>

The register regions are defined in arch/arm64/kvm/vgic/vgic-mmio-v3.c and the registers seem accessible in both 64 bit and 32 bit modes. Please let me know if GICR_PENDBASER and GICR_PROPBASER are accessible in 32 bit mode.

Kind regards,
Ayan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.