Skip to content
  • Paolo Bonzini's avatar
    ec05ec26
    memory: use mr->ram_addr in "is this RAM?" assertions · ec05ec26
    Paolo Bonzini authored
    
    
    mr->terminates alone doesn't guarantee that we are looking at a RAM region.
    mr->ram_addr also has to be checked, in order to distinguish RAM and I/O
    regions.
    
    So, do the following:
    
    1) add a new define RAM_ADDR_INVALID, and test it in the assertions
    instead of mr->terminates
    
    2) IOMMU regions were not setting mr->ram_addr to a bogus value, initialize
    it in the instance_init function so that the new assertions would fire
    for IOMMU regions as well.
    
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    ec05ec26
    memory: use mr->ram_addr in "is this RAM?" assertions
    Paolo Bonzini authored
    
    
    mr->terminates alone doesn't guarantee that we are looking at a RAM region.
    mr->ram_addr also has to be checked, in order to distinguish RAM and I/O
    regions.
    
    So, do the following:
    
    1) add a new define RAM_ADDR_INVALID, and test it in the assertions
    instead of mr->terminates
    
    2) IOMMU regions were not setting mr->ram_addr to a bogus value, initialize
    it in the instance_init function so that the new assertions would fire
    for IOMMU regions as well.
    
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading