kvm: remove non-sane sanity check
Apparently some platforms don't have pSize < vSize. Fixes #208 PiperOrigin-RevId: 245480998 Change-Id: I2a98229912f4ccbfcd8e79dfa355104f14275a9c
This commit is contained in:
parent
228dc15fd1
commit
5749f64314
|
@ -50,8 +50,9 @@ type physicalRegion struct {
|
|||
var physicalRegions []physicalRegion
|
||||
|
||||
// fillAddressSpace fills the host address space with PROT_NONE mappings until
|
||||
// the number of available bits until we have a host address space size that is
|
||||
// equal to the physical address space.
|
||||
// we have a host address space size that is less than or equal to the physical
|
||||
// address space. This allows us to have an injective host virtual to guest
|
||||
// physical mapping.
|
||||
//
|
||||
// The excluded regions are returned.
|
||||
func fillAddressSpace() (excludedRegions []region) {
|
||||
|
@ -67,11 +68,6 @@ func fillAddressSpace() (excludedRegions []region) {
|
|||
pSize := uintptr(1) << ring0.PhysicalAddressBits()
|
||||
pSize -= reservedMemory
|
||||
|
||||
// Sanity check.
|
||||
if vSize < pSize {
|
||||
panic(fmt.Sprintf("vSize (%x) < pSize (%x)", vSize, pSize))
|
||||
}
|
||||
|
||||
// Add specifically excluded regions; see excludeVirtualRegion.
|
||||
applyVirtualRegions(func(vr virtualRegion) {
|
||||
if excludeVirtualRegion(vr) {
|
||||
|
@ -81,6 +77,11 @@ func fillAddressSpace() (excludedRegions []region) {
|
|||
}
|
||||
})
|
||||
|
||||
// Do we need any more work?
|
||||
if vSize < pSize {
|
||||
return excludedRegions
|
||||
}
|
||||
|
||||
// Calculate the required space and fill it.
|
||||
//
|
||||
// Note carefully that we add faultBlockSize to required up front, and
|
||||
|
|
Loading…
Reference in New Issue