Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310926
b: refs/heads/master
c: 5842f57
h: refs/heads/master
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed May 24, 2012
1 parent c4204fa commit 4fd7356
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a32c88b9386ce3df87f28dd46bdc3776cd6edf75
refs/heads/master: 5842f5768599094758931b74190cdf93641a8e35
11 changes: 8 additions & 3 deletions trunk/drivers/tty/hvc/hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,19 @@ static int xen_hvm_console_init(void)
/* already configured */
if (info->intf != NULL)
return 0;

/*
* If the toolstack (or the hypervisor) hasn't set these values, the
* default value is 0. Even though mfn = 0 and evtchn = 0 are
* theoretically correct values, in practice they never are and they
* mean that a legacy toolstack hasn't initialized the pv console correctly.
*/
r = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
if (r < 0)
if (r < 0 || v == 0)
goto err;
info->evtchn = v;
v = 0;
r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v);
if (r < 0)
if (r < 0 || v == 0)
goto err;
mfn = v;
info->intf = ioremap(mfn << PAGE_SHIFT, PAGE_SIZE);
Expand Down

0 comments on commit 4fd7356

Please sign in to comment.