From: "Jan Beulich" Subject: Re: [PATCH 3/3] x86/nmi: Fix shootdown of pcpus running in VMX non-root mode Date: Wed, 11 Feb 2015 13:22:49 +0000 Message-ID: <54DB65B9020000780005F098@mail.emea.novell.com> References: <1423588332-23819-1-git-send-email-andrew.cooper3@citrix.com> <1423588332-23819-4-git-send-email-andrew.cooper3@citrix.com> <54DB44EE020000780005EF90@mail.emea.novell.com> <54DB4753.6010102@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54DB4753.6010102@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Tim Deegan , Xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 11.02.15 at 13:13, wrote: > On 11/02/15 11:02, Jan Beulich wrote: >>>>> On 10.02.15 at 18:12, wrote: >>> + * to construct a writable mapping. >>> + */ >>> + set_fixmap(FIX_TBOOT_MAP_ADDRESS, __pa(&exception_table[TRAP_nmi])); >>> + write_atomic((unsigned long *) >>> + (fix_to_virt(FIX_TBOOT_MAP_ADDRESS) + >>> + ((unsigned long)&exception_table[TRAP_nmi] & ~PAGE_MASK)), >>> + (unsigned long)&do_nmi_crash); >> By converting the first cast to (void **) or even >> (typeof(do_nmi_crash) **) it would seem possible to drop the last >> cast altogether. While at it you could also drop the unnecessary &. > > None of these casts can be dropped, because write_atomic() uses explicit > uint??_t casts. Gcc objects because of -Werror=pointer-to-int-cast. Oh, indeed (and all that on only the unused cases of the switch). In that case no need to re-submit, fixing the typos can be done while committing. Jan