From 2d15c6d99043d81ab40510d43e7361ecb002b264 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 9 Sep 2015 16:50:58 +0200 Subject: [PATCH] seoul: handle a MSR to let Genode/Nova guest boot Issue #1702 --- repos/ports/src/app/seoul/main.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/repos/ports/src/app/seoul/main.cc b/repos/ports/src/app/seoul/main.cc index f90a5c10b..453956e4a 100644 --- a/repos/ports/src/app/seoul/main.cc +++ b/repos/ports/src/app/seoul/main.cc @@ -826,13 +826,15 @@ class Vcpu_dispatcher : public Vcpu_handler, msg.cpu->ebx = 0; msg.cpu->ecx = 0; msg.cpu->edx = 0; - break; - + return true; + case 0x80000007U: + /* Bit 8 of edx indicates whether invariant TSC is supported */ + msg.cpu->eax = msg.cpu->ebx = msg.cpu->ecx = msg.cpu->edx = 0; + return true; default: - PDBG("CpuMessage::TYPE_CPUID index %x ignored, return true)", - msg.cpuid_index); + Logging::printf("CpuMessage::TYPE_CPUID index %x ignored\n", + msg.cpuid_index); } - return true; } }; @@ -1074,7 +1076,7 @@ class Machine : public StaticReceiver return false; } - PINF("Our mac address is %2x:%2x:%2x:%2x:%2x:%2x\n", + Logging::printf("Our mac address is %2x:%2x:%2x:%2x:%2x:%2x\n", _nic->mac_address().addr[0], _nic->mac_address().addr[1], _nic->mac_address().addr[2], @@ -1105,7 +1107,7 @@ class Machine : public StaticReceiver bool receive(MessageDisk &msg) { if (verbose_debug) - PDBG("MessageDisk"); + Logging::printf("MessageDisk\n"); return false; } @@ -1186,7 +1188,7 @@ class Machine : public StaticReceiver try { tx_packet = _nic->tx()->alloc_packet(msg.len); } catch (Nic::Session::Tx::Source::Packet_alloc_failed) { - PERR("tx packet alloc failed"); + Logging::printf("error: tx packet alloc failed\n"); return false; } @@ -1203,7 +1205,7 @@ class Machine : public StaticReceiver if (ack_tx_packet.size() != tx_packet.size() || ack_tx_packet.offset() != tx_packet.offset()) { - PERR("unexpected acked packet"); + Logging::printf("error: unexpected acked packet\n"); } /* release sent packet to free the space in the tx communication buffer */ @@ -1217,14 +1219,14 @@ class Machine : public StaticReceiver bool receive(MessagePciConfig &msg) { if (verbose_debug) - PDBG("MessagePciConfig"); + Logging::printf("MessagePciConfig\n"); return false; } bool receive(MessageAcpi &msg) { if (verbose_debug) - PDBG("MessageAcpi"); + Logging::printf("MessageAcpi\n"); return false; }