Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbdHHHCZ (ORCPT ); Tue, 8 Aug 2017 03:02:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:46102 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751880AbdHHHCX (ORCPT ); Tue, 8 Aug 2017 03:02:23 -0400 Subject: Re: [PATCH v3] xen: get rid of paravirt op adjust_exception_frame To: Boris Ostrovsky , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, luto@amacapital.net References: <20170803154548.13817-1-jgross@suse.com> From: Juergen Gross Message-ID: Date: Tue, 8 Aug 2017 09:02:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1322 Lines: 39 On 07/08/17 22:56, Boris Ostrovsky wrote: > >> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c >> index 811e4ddb3f37..a3dcd83187ce 100644 >> --- a/arch/x86/xen/enlighten_pv.c >> +++ b/arch/x86/xen/enlighten_pv.c >> @@ -579,6 +579,71 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, >> preempt_enable(); >> } >> >> +#ifdef CONFIG_X86_64 >> +static struct { >> + void (*orig)(void); >> + void (*xen)(void); >> + bool ist_okay; >> + bool handle; >> +} trap_array[] = { >> + { debug, xen_xendebug, true, true }, >> + { int3, xen_xenint3, true, true }, >> + { double_fault, xen_double_fault, true, false }, > > Is it really worth adding 'handle' member to the structure because of a > single special case? We don't expect to ever have another such vector. Hmm, maybe you are right. We don't expect to ever see a double_fault in a pv domain, so we could just drop that special case by handling it like the other IST traps. > (TBH, I think current implementation of cvt_gate_to_trap() is clearer, > even if it is not as general as what is in this patch. I know that Andy > disagrees). I think being able to concentrate as much pv interface stuff as possible to Xen specific sources is a win. The less Xen modifications are needed in non-Xen sources the better. Juergen