VirtualBox

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

VBox.log (58.8 KB ) - added by yjh 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Frank Mehnert, 8 years ago

The absolute bare minimum for help is the VBox.log file of such a VM session.

by yjh, 8 years ago

Attachment: VBox.log added

comment:2 by yjh, 8 years ago

Added

comment:3 by Frank Mehnert, 8 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 yjh, 8 years ago

Absolutely truly.
I specify, just in case - the code is not executing in a VM, but in VirtualBox Exstension.

Last edited 8 years ago by yjh (previous) (diff)

comment:5 by Frank Mehnert, 8 years ago

Resolution: invalid
Status: newclosed

For such requests, please go to the forums. There is a developers corner.

comment:6 by yjh, 8 years ago

In fact, I reported on the specific errors in the VirtualBox kernel code. Can the line number to specify :)

comment:7 by Frank Mehnert, 8 years ago

Sorry, without knowing your code it's impossible to help you.

comment:8 by yjh, 8 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:


  1. 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;

}


Last edited 8 years ago by yjh (previous) (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use