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

Re: [PATCH] x86/entry: Fix !PV build


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 Aug 2022 15:32:28 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=Emkvf+RvM18r/zdy6kiHg/r5I4LGrEwfhhSbTNwbF3w=; b=OUU5y4g+i4vYyKznwjn7RzhefACWhUDC5aanhFnYCJv4dpo4fkn/cYhPCCCDKczpmFS3yD5FCv8Bw4+sIX9DsZCtYdvvdl70PBU4xWXWeFSei/9Nzw4CVlpqz44LSrn9Y/0B0+705FUTPx1KPOBtvTWCsaXMQbexso1etHrYIONZyMqkzHV9ErfeXWZ/HZd4CwxnT0s42uLmVmISlsNvbMNAPecyAlRM2mMNLET/5d+o4NT08NyAyhjHDQF0CF+vVmVe7w1kakAR9K1OzwvhZyLkRnU9FZd6+1TtNdGsyDEbqXcuKoUf/LYp/VijgOrWZdr96R4gC9w3r0uSgqQprA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DZC2zQo34kDnso/eP0cBvwd5V83tfsVMkeiocH67hCb85jdkj9vfpZXATdGEeCp/kGceV1V4mAO21i31/2lx/+lGiTflmKaLQNLQmicG7xzNYa3B5jD45XODPKkTTZh7/FTK9f0rtZOeMl6kIVGNbch4sEYjW9aMr1hrwFONOri7YPQl/EGxDQAfaCwvdr1WSKbYjDFkoiG74UYcrdKJrQuwxbqOMFWH/0ajn1o10cF9yY83+CAINkmkA1ksZ4Vd1sk8RFIEA6PHHcLkdHZ35IygEpPOIrjipgEYvkGx0SDh2e61XvOcKenDDSNGvNSN6ozIMeqioergfOyJelfkOw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 22 Aug 2022 13:32:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.08.2022 15:12, Andrew Cooper wrote:
> early_page_fault() needs to outside of #ifdef CONFIG_PV
> 
> Spotted by Gitlab CI.
> 
> Fixes: fe3f50726e87 ("x86/entry: move .init.text section higher up in the 
> code for readability")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Makes me wonder whether the original change then really was worth it.

> --- a/xen/arch/x86/x86_64/entry.S
> +++ b/xen/arch/x86/x86_64/entry.S
> @@ -22,6 +22,17 @@
>  #endif
>  .endm
>  
> +        .section .init.text, "ax", @progbits
> +ENTRY(early_page_fault)
> +        ENDBR64
> +        movl  $TRAP_page_fault, 4(%rsp)
> +        SAVE_ALL
> +        movq  %rsp, %rdi
> +        call  do_early_page_fault
> +        jmp   restore_all_xen
> +
> +        .text
> +
>  #ifdef CONFIG_PV
>  /* %rbx: struct vcpu */
>  switch_to_kernel:

Rather than putting it at the very top of the file, may I suggest to put
it immediately after

/* --- CODE BELOW THIS LINE (MOSTLY) NOT GUEST RELATED --- */

or yet a few more lines down between continue_pv_domain and
restore_all_xen? Which, as a minor gain, then also doesn't require you
to add a new .text (or other section) directive. Preferably that way
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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