Messages in this thread | | | Date | Tue, 19 Jul 2022 17:12:38 +0000 | From | Sean Christopherson <> | Subject | Re: [RFC FIX PATCH] x86/e820: Stop kernel boot when RAM resource reservation fails |
| |
On Tue, Jul 19, 2022, Bharata B Rao wrote: > On 7/18/2022 8:37 PM, Borislav Petkov wrote: > > > > I betcha you can generate a lot of "kernel bugs" with weird qemu > > options. If it is not a real use case, nobody cares. > > I see that we will hit this problem by default when starting > a guest with 1T or more memory using QEMU.
That a user can create a bad configuration using QEMU's default MAXPHYADDR doesn't change the fact that adding memory beyond MAXPHYADDR is firmly a configuration bug.
> > And even if it were a real use case, panicking the machine is not the > > right fix. > > I couldn't see a clean exit/recovery option in setup_arch()->e820__reserve_resources() > where this happens. Any suggestions?
WARN or pr_err/warn() and move on, or just do nothing. Adding code to try and gracefully handle an architecturally impossible configuration is a waste of time and effort. Like Boris said, there's practically a limitless number of bad setups QEMU can create, this one just happens to be easier to create than others due to shortcomings in QEMU.
| |