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

Re: [PATCH v3 3/3] x86: Add Kconfig option to require NX bit support


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 19 Jul 2023 08:13:27 +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=EkWYARiSVOLsksrPhMJk5Smy0GzNf2Gmjw33xbrrDSc=; b=SMaZ8G4e/G//RmQrlkPC0A73InHux4eOaVS6yeEb50HrhSESpJLPaAl0N8lfuhnuLxXmd8btJQ2idXBrsCCORHkvp3wVvRfR5dB1nt/TbmLDmm8rzxUXuwl2ILgzoSkx2IEJoJlU42yivg/yHRNchef+1ZfQ2NrmlL4retSi6rKOw5xRXpO195fj3qnN82VBQM1olltvU78eHfw6qdhcnvon3fd4g3F+xlnIru3wxEvIv+HXxDyHJ5hKFIbWDDsmeXigwefTYykDyUxZV0vy7hlY1gAKy1GftJkQEifVHHEjiK22tuS7UqF23yjCIQI82SSIifgMe+ovagKPQOfKGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZzajBYHtEypvanAvT4ILeLWDNtWAJ2x8Zh06hKCHGr4CsJso8CMdEHRVDXXjEWqoo5bOP/zOKvf9GNx4252WqMppTYY8kHFueFgs6hJIRtPCj4+jSzCzzr3DhOSDa7RfuZW+yUdpvknuJ7IuFw1eaH2WzMnA0chreALYKJ3xBu+5qxblaagEUAuoMS8dW491P+3WqIBD0v8xA/eMpaORfmoYFZXZk6kZ2XzgYD5poz5H6b8sFSb++vh5r+16NRJMSI8PD5ZSfK9snjDv17sNocqey3RRv+X2QFB2W2MX7L/QwEGIAb7z88y1GI1Jl5D80PiTpZc60cWryVZBFqGvJg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 19 Jul 2023 06:13:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.07.2023 15:19, Jan Beulich wrote:
> On 29.06.2023 14:17, Alejandro Vallejo wrote:
>> --- a/xen/arch/x86/boot/head.S
>> +++ b/xen/arch/x86/boot/head.S
>> @@ -123,6 +123,7 @@ multiboot2_header:
>>  .Lbad_ldr_nih: .asciz "ERR: EFI ImageHandle is not provided by bootloader!"
>>  .Lbad_efi_msg: .asciz "ERR: EFI IA-32 platforms are not supported!"
>>  .Lbag_alg_msg: .asciz "ERR: Xen must be loaded at a 2Mb boundary!"
>> +.Lno_nx_msg:   .asciz "ERR: Not an NX-capable CPU!"
>>  
>>          .section .init.data, "aw", @progbits
>>          .align 4
>> @@ -153,6 +154,11 @@ early_error: /* Here to improve the disassembly. */
>>  .Lnot_aligned:
>>          add     $sym_offs(.Lbag_alg_msg), %esi
>>          jmp     .Lget_vtb
>> +#ifdef CONFIG_REQUIRE_NX
>> +.Lno_nx:
>> +        add     $sym_offs(.Lno_nx_msg), %esi
>> +        jmp     .Lget_vtb
>> +#endif
> 
> Since I'm in the process of introducing more such paths (for the x86-64-v<N>
> series), I'm curious: Have you actually had success with getting any output
> from this code path? I see unreadable output come through serial (provided
> it's the normal com1 I/O port location where the serial port is), which
> likely is because baud rate wasn't configured yet, and hence I might have
> success by changing the config of the receiving side. And I see nothing at
> all on the screen. While kind of expected when in graphics mode, I wonder
> whether this ever worked, or whether this has simply bitrotted because of
> never actually coming into play.

Pretty clearly this was broken in the course of adding MB2 support, by
b28044226e1c using %esi as the "relocation base" after already having
clobbered it. I'm working on a fix.

Jan



 


Rackspace

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