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

Re: [PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV initial domain


  • To: Juergen Gross <jgross@xxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Mon, 27 Feb 2023 08:52:05 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=fDej2tCL3b5mBA/Z3VfE428l6BGAdVB2dJAu5zMguR0=; b=B45zZidrb7kh/ZT8izIj0cEXeXzTJMIkmKgg7g8gjDbBvUnl/wnuUrL+EjL3tCPWIIkbFywNFd2OWGUOW6r4tbcBwgdlC0w5DBeU5dyskeyncU9A3EQRzYN5b/dFAQD+3LtFs/GVxxVsCkBsojdaXV23pmJLt2THH1DiDYd791wc+1NiOqDAcqGtsAoltHACkziouZ3MFvV+7YluVq1AAWMQP4vOpN1w4QWiR5iyR9oTaDIEB6JAM9cqPfcy8SOpy5zwPZp2DRwW8CY6sj4B81kiNcPXpE4ucoDaQSiaCuccKxPR8GZQTs79ZvEezufjTiM7RREW2efUOUMkqo50fw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MKNMr1PjIR4oZrgO1a7VX8dETkLVAbIRLltKlCSi4xFDS0xAuFCRLUWLjTd1/aG2ToXTHqhUQ8IbHGRALBxuwQ7ReRft9/umu5LftKW++avTlGLH+lSmGsac2JT2fKlFhidFswYIb9lnG4SYJ+RziAOsB4gxCTLqskblemE0NfBn2Qt/s5EeSJDfOCdognpj6CMumIXBAjZE5wyKSF5Bq4ctdRILuvL2brofYeRTmQ5j3vIC4NSKELGf9FEIjcuSTRfW/pP8larTXrGf9Xc+jLKPKrL7RdRCy+3/qh53aXuBhfj1OsH1SmdhmFU8i98Y3f00mqLFJiY3LOCqcV/aZg==
  • Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 27 Feb 2023 13:52:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 2/27/23 2:12 AM, Juergen Gross wrote:
On 24.02.23 22:00, Boris Ostrovsky wrote:

On 2/23/23 4:32 AM, Juergen Gross wrote:
+
+    for (reg = 0; reg < MTRR_MAX_VAR_RANGES; reg++) {
+        op.u.read_memtype.reg = reg;
+        if (HYPERVISOR_platform_op(&op))
+            break;


If we fail on the first iteration, do we still want to mark MTRRs are 
enabled/set in mtrr_overwrite_state()?

Hmm, good idea.

I think we should just drop the call of mtrr_overwrite_state() in this
case.


TBH I am not sure what the right way is to handle errors here. What if the 
hypercall fails on second iteration?


-boris



 


Rackspace

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