[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-devel] Disk IO using QEMU
> -----Original Message----- > From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx > [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of > Alkesh Shah > Sent: 19 April 2007 05:18 > To: xen-devel@xxxxxxxxxxxxxxxxxxx > Subject: [Xen-devel] Disk IO using QEMU > > Hi, > > I am trying to understand how Disk I/O actually works in HVM. > From what > I understand, whenever a disk i/o takes place in a guest OS, a VMEXIT > occurs. The hypervisor than executes some handler, which sets up an > event pending bit for the event channel communicating with > the QEMU-DM > in the Domain 0. QEMU-DM than emulates these I/O instructions. > > Specifically, I wanted to know - > 1. The functions that are called in this process.... or the > files that > I need to look at in order to understand the exact flow. The IO instruction is intercepted by the hardware in the processor, which forms a IOIO vmexit, which ends up in the relevant part of vmexit_handler in .../xen/arch/x86/hvm/{vmx/vmx.c,svm/svm.c}. Form there it goes to generic hvm-code (hvm_send_pio or some such), which does some parsing and then does the event stuff. In QEMU it comes in to .../tools/ioemu/target-i386-dm/helper2.c, which then (after some function calls) does the IO operation - that's essentially a function table of 65536 entries (times 3 for different sized), and eventually ends up in .../tools/ioemu/hw/ide.c. > 2. Since, QEMU-DM handles both the display as well as the > disk I/O, is > the same event channel port used for communication between hypervisor > and qemu-dm for both display and disk i/o? To quote Little Britain's Vicky Pollard, "Yeah, but no, but yeah, but ..." Yes, qemu-dm is responsible for the video output too. But it's (for most parts) not using the event-channel to display the data - it's using a shared memory buffer that is just compared to see if it's changed since last time every few milliseconds. If it's changed, it gets redrawn. So the event-channel used for IO operations isn't involved in the display updates [other than when there is a mode-change or some other IO operation to the graphics processor, but that's a rare occurrence relatively speaking]. -- Mats > > Thank you for you help. > > Regards, > Alkesh Shah > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |