Skip to contentSkip to conversation

Are linker scripts needed?

DISCUSSION Tian, Kevin 3 participants 3 messages May 23, 2005

lore
Share & tools
lore
#0 lore raw

(Just some rough idea, since I don't know much detail of DM part. ;-)

Quoted 6 lines

I suppose it improves performance and simplifies the data path, but it should probably dynamically map the vmx guest's pages for I/O on demand. After all, this approach isn't going to work for bigmem domains on i386 (particularly once PAE is working). So it seems a bad idea to come to rely on it any more than as a bit of a hack to get you up and running.

Another requirement for dynamic map on demand is that guest pfn -> machine pfn mapping may be changed due to balloon driver. It's not that perfect for a DM to assume that mapping info never changed, and thus maps all the guest memory in one request at the start...

Quoted 8 lines

Best of all (imo) would be for it to act as a 'driver in the middle':
connecting the fully virt guest through to an ordinary backend driver, and not itself touching I/O buffers at all. Perhaps ultimately we can push the qemu drivers into the vmx container itself, perhaps in 'virtual smm mode', so that from outside the container it looks just like any other paravirt I/O channel.

Frist, to clarify a term: Do you mean vmx container as "vmx domain" ? :)

Major benefit of your approach, from my thought, is that backend driver in service OS can service both para-virtualization and full-firtualization domain then, with a unified channel interface and logic, right? I'm trying to understand how 'virtual smm mode' you mentioned can be achieved, and thinking at least following modifications may be required:
- DM can not only be user application. A bunch of kernel module
like a collection of existing frontend drivers have to be created for each component of DM in vmx container.
- DM itself has to be bound with a faked device (Maybe PCI
device), to be able to receive emulation message coming from HV, after HV captures unmodified domain's access to MMIO, etc.
- More backend-frontend drivers need time to be cultivated
gradually, like SCSI support, etc, to behave like a complete DM.s

However the major defect somehow may lie with the maintain effort. Also take USB port as the example, there'll be around 10 or more maintainers of different backend-frontend components, who have to keep up with kernel evolvement both on service OS side and domainN side, since kernel module is tightly coupled with kernel internal interfaces. However current DM model has no such problem. With more deployment of xen, there'll be more such effort. Of course, also with more deployment of xen, there'll be more people who'd like to contribute to xen then. ;-)

Thanks,
Kevin

#1 lore raw
Quoted 1 line · Kevin

Frist, to clarify a term: Do you mean vmx container as "vmx domain" ? :)

I mean the 'guest mode' of VMX, as opposed to code that runs in VMX domain context, but within the hypervisor in 'host mode'.

Quoted 6 lines

Major benefit of your approach, from my thought, is that backend driver in service OS can service both para-virtualization and full-firtualization domain then, with a unified channel interface and logic, right? I'm trying to understand how 'virtual smm mode' you mentioned can be achieved, and thinking at least following modifications may be required:

I thought that VMX provided a virtual equivalent of SMM, where management and emulation code can run under the OS's feet without it realising? If this is not provided then I do not think the trick can work, as you would need to steal some virtual address space in which to execute the qemu code.

-- Keir

#2 lore raw
Quoted 4 lines · Keir Fraser

I thought that VMX provided a virtual equivalent of SMM, where management and emulation code can run under the OS's feet without it realising?

Yes, this is how vmxassist implements real mode support.

Quoted 3 lines

If this is not provided then I do not think the trick can work, as you would need to steal some virtual address space in which to execute the qemu code.

The "world switch" can switch to a different address space (CR3 on x86/RID on ia64), without having to steal guest virtual.

-Arun