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

Enabling more than one HVC console on Arm64 platform


  • To: amit@xxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Stabellini, Stefano" <stefano.stabellini@xxxxxxx>
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Wed, 22 Nov 2023 19:00:16 +0000
  • 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=eZWDflHyvSXyxnLDpVXI3Lh4doEAtVUGqRgZZsjAyCY=; b=KC0B4GZhfDrcJ8Wf76jBEkbxpzu7c+EIllN9d0rzRY13fmOSqZu2c+9r1rHX3FB7WaX8uKNt40c7X6lYhTs9br8GlXsz8VxZuwMxbN0aNky9ULLpvi2KEKte/EFK0NR1I7nvtSg3ChEjfVEmxJ2IF8hq4eaQAr0zD4IVR/VwoOLNGhatiB02SsEsIfbSnKVWDrmkvvbM086L79jG2ehFXtRQ8APr4TV3TrJOGkBl65x/QxW0ddaISwB+ye8Ct50AcbK6c7zGka4bCHFrHcCDLAY3WPNMSvcw5r7GwXrrOCrmjKPQh26vn56akVgjb/myC0ErqiimO66THlqR0ERLzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FS3BikAmEUdHk/YYN/8JfHiOb+ba3InZRmL3U1YgUnDBGprfJR/5TTHY13Yze+HfUqtZTtB1vF9jM8uo+ZuATyyBNysHAXmxNKDt0btHUGJ/y+ktqJE0O4GO5STDlEOVxtGjrqo6JNaC3tOm3x3RVWNtrWeju1qYgaJoO/0ImTIZl42TtmHQ3dIQZ9wnVMdOJw4fGIlKse2IjvpFmLSM4DZeHtsd3EEDO+mz6HUV4ezLDXbfVX9eFji6OEuGE7EAPUXpWmzT6mNwHghcLbNNst9np2fjfW6pZctDpUhPpMWp/BRovX4t9tQX/RUDU4iMjTbLw18vxWErW1DmtPW8yg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: arnd@xxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 22 Nov 2023 19:00:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Amit/All,

We came across this scenario and would be helpful if you can provide some pointers


Linux running as Dom0 on Xen hypervisor with HVC_DCC = y and HVC_XEN = y on Arm64 platform.

This causes a crash when Dom0 tries to access "DBGDTRTX_EL0" register, it traps to Xen.

Xen does not emulate this register so it crashes.

|Logs - https://paste.debian.net/1298983/|

|
|

|My aim is to avoid the crash and let Xen boot Dom0 even though there might not be a debug console available.|

|So, I am trying to add emulation for |"DBGDTRTX_EL0" register in Xen.


As a quick trial (may be not the perfect solution), I am trying to emulate this register as "read as zero/write ignore" (similar to KVM).

However, I could not see logs to the Xen console (ie HVC0).


So my question is

1. Is it possible in Linux to probe more than one HVC console so that Linux can put the same logs in HVC_DCC and HVC_XEN drivers ?

So that the user can always see the logs in the default Xen console (ie hvc0) even if the debug console is not present.


Another possible alternative I am exploring is to enable trapping for read of MDCCSR_EL0 in Xen, so that Xen returns with MDCCSR_EL0.TXfull set to 1.

static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count)
{
    int i;

    for (i = 0; i < count; i++) {
        while (__dcc_getstatus() & DCC_STATUS_TX)
            cpu_relax(); <<<<<<<<<<----------- So this will be invoked.

        __dcc_putchar(buf[i]);
    }

    return count;
}

Any pointers are highly appreciated.


Kind regards,

Ayan




 


Rackspace

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