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

Re: [PATCH RFC] x86/boot: Update construct_dom0() to take a const char *cmdline


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 27 Jul 2023 13:25:00 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690478704; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=TKhkL6fzus3QJYxSCY4OtKCGJ09TJbxESxUFSW6m7dk=; b=KJVaZXO3AZmXsigwumCCmSccWgp1cy8XQXfAxuztD5AX7ml8nNY0aeADIOVTO3Fy0f5ER3uyN9uMdtsTZIC4MUWI/RqkHqeWJuektfrbwVcR35yTVLqpZ2A0nFhPNuCWPYbzo93Y54SteJyLN8VxfXvF7dzkxZuU8akJI98Om2g=
  • Arc-seal: i=1; a=rsa-sha256; t=1690478704; cv=none; d=zohomail.com; s=zohoarc; b=KrOMC3BPld0hHpUdeDVnUhOybZBJ1pNi3uiuLeKPS4cl+x3wj/Vm4/4tqOOjEGGSDstODuveBZ+8YzSXq+mV5UhmI5sOXshuyG0ECg9/tPEtiwEx0NNDLveUie9h7HLjMKhDCdcRi8XJvM4OejPdFPP+CrugsaVtwa/8TH5RmWA=
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Christopher Clark <christopher@xxxxxxxxxx>
  • Delivery-date: Thu, 27 Jul 2023 17:25:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 7/19/23 09:18, Andrew Cooper wrote:
With hvm_copy_to_guest_*() able to use const sources, update construct_dom0()
and friends to pass a const cmdline pointer.  Nothing in these paths have a
reason to be modifying the command line passed in.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
CC: Christopher Clark <christopher@xxxxxxxxxx>

Slightly RFC.

I'm confused as to why image is const, but the initrd isn't.

Also, I suspect this will interfere with the Hyperlauch work, and I'd be happy
to leave it alone if all of this is being fixed differently anyway.

This is overall a good change and honestly I don't see this having any significant impact on HL. And if it does, it would be better to fix HL then block this positive change.

This is necessary to make the -Wwrite-strings bodge compile, but I'm hoping
that a less-bad solution to the cmdline literals problem would avoid the need
to propagate const through this callpath.
---
  xen/arch/x86/dom0_build.c             | 2 +-
  xen/arch/x86/hvm/dom0_build.c         | 4 ++--
  xen/arch/x86/include/asm/dom0_build.h | 4 ++--
  xen/arch/x86/include/asm/setup.h      | 2 +-
  xen/arch/x86/pv/dom0_build.c          | 2 +-
  5 files changed, 7 insertions(+), 7 deletions(-)


Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>



 


Rackspace

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