[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] How can i redirect the writes to the console from the HVM (port 0xe9) to Qemu?


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
  • Date: Tue, 4 Aug 2009 17:31:48 +0300
  • Delivery-date: Tue, 04 Aug 2009 07:32:13 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=mSYJ2rBCkaoLKiuy7Drjjq/ZDlA1OC27q4Hmsb8modCtMHDyG+GuXtSFYk2RtsKuiq SBjlE1G2nuglHuFxt4NKyEXJoNe7B1V8D6n+orkFgqiNUGHiTamCx/xptN+Xbt4xhy+V 0gNof+wfdARjUh8UB6ea6EpazXvzV11+m6ROU=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi,

I would like to write all the logs of the HVM console (like the
hvmloader prints, hvm bios prints, etc.), which are actually written
to port 0xe9, to *also* be written to the qemu log file. So,
basically, i should just do the following in qemu:

static void ioportE9_write(void *opaque, uint32_t addr, uint32_t data)
{
    fprintf(logfile, "%c", (char)data);
}

...
<somewhere in the qemu init>
...
    /* Log all the UART's to the qemu log file */
    register_ioport_write(0xe9, 1, 1, ioportE9_write, NULL);
...

Well, it turns out that this doesn't work. After i checked it, it
seems that this doesn't work, because Xen registers it's own handler
for the ioport 0xe9, which prevents me from getting the HVM accesses
to this port. Xen performs the registeration in the following place:
file:               xen/arch/x86/hvm/hvm.c
function:       hvm_domain_initialise()

The line looks like this:
...
    register_portio_handler(d, 0xe9, 1, hvm_print_line);
...

In previous versions of Xen, Xen hooked this 0xe9 port, by direct code
in the vmx part, which made it possible to register your own handler
for this port, but in the current Xen, this is changed.

Does anyone know how can i register my own "hook" function on this
port, without modifying the code in hvm.c? Is there a chain of writes?

Tom

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.