On 19.07.2023 15: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.

dom0_construct_pv() has

            initrd->mod_start = initrd_mfn = mfn_x(page_to_mfn(page));

Looks like dom0_construct_pvh() and pvh_load_kernel() could have
it const-ified.

> 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.

But propagating const through this, like any other, path is a good
thing, isn't it?

If you want to keep it (you appear to be uncertain)
Acked-by: Jan Beulich <[email protected]>

Jan

Reply via email to