]> xenbits.xensource.com Git - xentesttools/bootstrap.git/commitdiff
rcS/inittab: xen-detect under Haswell for PV guests report it as HVM
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 10 Feb 2015 17:06:33 +0000 (12:06 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 10 Feb 2015 19:37:24 +0000 (14:37 -0500)
which means we put in inittab 'ttyS0' - but we want 'hvc0'.
Do one more test for console=hvc0 and if that is found
assume PV.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
root_image/etc/init.d/rcS

index 8be0279a057de9bad2685f003f6f2b8a8d9c08af..df6eff4ddf0f7bb48d748dd06b7fe9371725c111 100755 (executable)
@@ -86,10 +86,15 @@ echo "*.*     /var/log/messages" >> /etc/syslog.conf
 XEND_LOAD=0
 if [ -e /sys/hypervisor/type ]; then
        if [ `cat /sys/hypervisor/type` == "xen" ]; then
+               # Haswell and later for PV will present it as 'HVM'
                xen-detect -H
                if [ $? -ne 0 ]; then
                        XEND_LOAD=1
                fi
+               grep -q hvc0 /proc/cmdline
+               if [ $? -eq 0 ]; then
+                       XEND_LOAD=1
+               fi
        fi
 fi