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 <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau MonnĂ© <[email protected]>
CC: Wei Liu <[email protected]>
CC: Daniel Smith <[email protected]>
CC: Christopher Clark <[email protected]>

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 <[email protected]>

Reply via email to