WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] How can i redirect the writes to the console from the HVM (p

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] How can i redirect the writes to the console from the HVM (port 0xe9) to Qemu?
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=W9Fcic7hxxHp+iUmrouwOtCCZt98E+T4pEGe7MK1HKI=; b=aalrTg2RywwYht6kpwMPmOI0TYjZLsgY0+1Xfr+P3i0F0iXTR3LAe8Jm664bGl8W0I 5DeImn/SyZg5CREvOhvlyrTvgTxqHmLLDy5uH5yANHYeDGgnRGK4Xq1cEIdUSEx8yAiw ETwmeuymAFbgN5zZ3Ejxu5+vAx4gbgIqmRhZ4=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>