#15606 closed defect (invalid)
in 5.1 IOMMMIOMapMMIOHCPage produce reference to zero address
Reported by: | yjh | Owned by: | |
---|---|---|---|
Component: | VMM | Version: | VirtualBox 5.1.0 |
Keywords: | Cc: | ||
Guest type: | all | Host type: | Windows |
Description
I'm use IOMMMIOMapMMIOHCPage for share memory page between host and guest (VBOXextension + guest driver). In 4.x and 5.0 all work correctly, but in 5.1 GPF on start VM. I have tried to find out that occurs and has seen that the PGM_BTH_PFN(PrefetchPage, cpu) is zero (in callback registered via PDMDevHlpPCIIORegionRegister).
Attachments (1)
Change History (9)
comment:1 by , 9 years ago
by , 9 years ago
comment:3 by , 9 years ago
So you use some kind of custom code in your VM and it worked with VBox 4.x and 5.0 but doesn't work with VBox 5.1?
comment:4 by , 9 years ago
Absolutely truly.
I specify, just in case - the code is not executing in a VM, but in VirtualBox Exstension.
comment:5 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
For such requests, please go to the forums. There is a developers corner.
comment:6 by , 9 years ago
In fact, I reported on the specific errors in the VirtualBox kernel code. Can the line number to specify :)
comment:8 by , 9 years ago
Just do some exception occurs in IOMMMIOMapMMIOHCPage in (VirtualBox code) no matter how it is called (the reason I stated in the first report), but if you feel you need to know exactly - quote below:
- in pfnConstruct (see: PDMDEVREG)
a. allocate memory, pointer placed in self->shm
b.
rc = supR3PageLock(self->shm, 60*1024, self->pages);
if(RT_FAILURE(rc)) goto FAIL;
c. call
PDMDevHlpPCIIORegionRegister(ins, 0, 60*1024, PCI_ADDRESS_SPACE_MEM, pcidev_map_shm);
---------------
2.
static DECLCALLBACK(int)
pcidev_map_shm(PPCIDEVICE dev, int reg,
RTGCPHYS phys, uint32_t size, PCIADDRESSSPACE space)
{
pcidev_state *self = RT_FROM_MEMBER(dev, pcidev_state, pcidev);
if(phys == NIL_RTGCPHYS) return VINF_SUCCESS;
...some code...
for(i = 0; i < 60*1024/PAGE_SIZE; i ++) {
RTGCPHYS gc_addr = phys + i * PAGE_SIZE;
RTGCPHYS hc_addr = self->pages[ i ].Phys;
rc = PDMDevHlpMMIORegister(self->pcidev.pDevIns, gc_addr, PAGE_SIZE, NULL,
IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU,
pcidev_shm_write, pcidev_shm_read, "vboxcdb shm");
if(RT_FAILURE(rc)) return rc;
IOMMMIOMapMMIOHCPage(pvm, pcpu, gc_addr, hc_addr, X86_PTE_RW | X86_PTE_P);
!!!!!!!!!!!!!!!!!!!! first call produce exception
if(RT_FAILURE(rc)) return rc;
}
return VINF_SUCCESS;
}
The absolute bare minimum for help is the VBox.log file of such a VM session.