[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 1/1] Add mmio_hole_size
On 09/30/14 12:06, George Dunlap wrote: > On Tue, Sep 30, 2014 at 4:36 PM, Boris Ostrovsky > <boris.ostrovsky@xxxxxxxxxx> wrote: >> On 09/30/2014 09:22 AM, George Dunlap wrote: >>> On Tue, Sep 30, 2014 at 2:27 AM, Boris Ostrovsky >>> <boris.ostrovsky@xxxxxxxxxx> wrote: >>>>> + if ( mmio_hole_size ) >>>>> + { >>>>> + uint64_t max_ram_below_4g = (1ULL << 32) - mmio_hole_size; >>>>> + >>>>> + if ( max_ram_below_4g > HVM_BELOW_4G_MMIO_START ) >>>>> + { >>>>> + printf("max_ram_below_4g=0x"PRIllx >>>>> + " too big for mmio_hole_size=0x"PRIllx >>>>> + " has been ignored.\n", >>>>> + PRIllx_arg(max_ram_below_4g), >>>>> + PRIllx_arg(mmio_hole_size)); >>>>> + } >>>> >>>> Do you need to check whether the hole is too large? >>>> >>>> Here and in the toolstack. >>> How large is too large? I've seen real machines with a 3GiB memory >>> hole... It is hard to answer this question. Clearly not leaving enough ram to load and run the BIOS is bad. Then there is the real mode size of 16MiB. Next on the list is how much does the guest expect? Does it change based on max ram? Also just because Linux does not like the size, maybe something else will work fine. In my testing, 3GiB works fine. However I did not test for a guest > 64GiB with the 3GiB. Also small machines (like < 8GiB) worked fine for 3.75GiB with CentOS 5.3... >> >> >> But if mmio_hole_size is set to, say, 4GB we can't expect anything good, >> right? I don't know what the reasonable upper limit on it should be but it >> seems to me we need one. Especially given that it's a uint64_t. > Well the worst it can do is cause the guest to crash, I think, isn't it? :-) Maybe even not get far enough to boot (grub fails without message)... which is a form of a crash. > If mmio_hole_size > 4G, then in the check above, max_ram_below_4g will > wrap around and end up higher than HVM_BELOW_4G_MMIO_START, and > nothing will be done. Yup. -Don Slutz > -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |