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

Re: [PATCH] xen/x86: fix PV trap handling on secondary processors


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Thu, 16 Sep 2021 21:34:46 -0400
  • 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; bh=1RNWjIRij83DQK3/NgNDTxM5HwLq/MaxDMSD14Y6B0Y=; b=NVfHi3hRMhIFVLp0heb7wQyeTkNItJuMPomI8o5SW6EFOkVBWdqQqug4GvoiamlWLzmPF6qTbcgVA+CYXlXHGqionhCmYv7UdukEP+zxWR+WKqUju7ERZtZOP28Tnt0IZSAEOEK1aXxXVvl1x2S1OA/CHYlSaPfdfSz7G7gY/v6oxHYOl8/0yVZGVx9VV01nL4lK1os5UKc10SDvbQ2U1HzF8TP5Lu/KpXJaVS3loUrvO3ixC4IJeYu6bt0BMUUE+GyUn7te9bMAlWnTAJ9lumunXd8x2Unz8Nl3nCbeKra7BQkrAGS/ivwKw3izfSiMFp2g6V4mrTva7beg5PJEOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lZoue0kQ9hS+QxdWfOuNj9YXy2VooSz35ZP76e5DnPV+r9SP1BSq8NCalygQyM7e8URmCxmzyC2kM6oUturdxe9NtmwzyAFPZRCNdkCSChvfmlohpvPYlx7yyXDiNTwAUd/eHEJCnZZbBkvNA5prot28+eEN4s96FQYNPPK8K/0bzUjt8+2W0sOSmW1dxEfh9j4cyScSLCVrU4ai85N1dTTRLjHHf2p0N8xhCjaGxT2jNimHV3J1USZDLBTDVq3b0HDlVzgRwtM7mw5AMTuJ88UBB/FykaQhPDxs9Xocg7X8E4r/8QIA0GUC6rzG3j9uc6I6n71WVaCF3QfkZfiTJA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=oracle.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 17 Sep 2021 01:35:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 9/16/21 11:04 AM, Jan Beulich wrote:
>  {
>       const struct desc_ptr *desc = this_cpu_ptr(&idt_desc);
> +     unsigned i, count = (desc->size + 1) / sizeof(gate_desc);
>  
> -     xen_convert_trap_info(desc, traps);


Can you instead add a boolean parameter to xen_convert_trap_info() to indicate 
whether to skip empty entries? That will avoid (almost) duplicating the code.


-boris


> +     BUG_ON(count > 256);
> +
> +     for (i = 0; i < count; ++i) {
> +             const gate_desc *entry = (gate_desc *)desc->address + i;
> +
> +             cvt_gate_to_trap(i, entry, &traps[i]);
> +     }
>  }
>  
>  /* Load a new IDT into Xen.  In principle this can be per-CPU, so we
>



 


Rackspace

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