Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1341937 > unrolled thread
| Started by | Stefano Stabellini <stefano.stabellini@eu.citrix.com> |
|---|---|
| First post | 2016-02-24 13:30 +0100 |
| Last post | 2016-02-24 16:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] hvc_xen: fix xenboot for DomUs Stefano Stabellini <stefano.stabellini@eu.citrix.com> - 2016-02-24 13:30 +0100
Re: [PATCH 2/2] hvc_xen: fix xenboot for DomUs kbuild test robot <lkp@intel.com> - 2016-02-24 14:00 +0100
Re: [PATCH 2/2] hvc_xen: fix xenboot for DomUs Stefano Stabellini <stefano.stabellini@eu.citrix.com> - 2016-02-24 16:50 +0100
| From | Stefano Stabellini <stefano.stabellini@eu.citrix.com> |
|---|---|
| Date | 2016-02-24 13:30 +0100 |
| Subject | [PATCH 2/2] hvc_xen: fix xenboot for DomUs |
| Message-ID | <r5GJQ-4si-7@gated-at.bofh.it> |
The xenboot early console has been partially broken for DomU for a long
time: the output would only go to the hypervisor via hypercall
(HYPERVISOR_console_io), while it wouldn't actually go to the DomU
console. The reason is that domU_write_console would return early as no
xencons structs are configured for it.
Add an appropriate xencons struct for xenboot from the xenboot setup
callback.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
drivers/tty/hvc/hvc_xen.c | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 34e8e9f..20fe578 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -246,6 +246,18 @@ err:
return -ENODEV;
}
+static int xen_early_pv_console_init(struct xencons_info *info, int vtermno)
+{
+ info->evtchn = xen_start_info->console.domU.evtchn;
+ /* GFN == MFN for PV guest */
+ info->intf = gfn_to_virt(xen_start_info->console.domU.mfn);
+ info->vtermno = vtermno;
+
+ list_add_tail(&info->list, &xenconsoles);
+
+ return 0;
+}
+
static int xen_pv_console_init(void)
{
struct xencons_info *info;
@@ -265,13 +277,8 @@ static int xen_pv_console_init(void)
/* already configured */
return 0;
}
- info->evtchn = xen_start_info->console.domU.evtchn;
- /* GFN == MFN for PV guest */
- info->intf = gfn_to_virt(xen_start_info->console.domU.mfn);
- info->vtermno = HVC_COOKIE;
-
spin_lock(&xencons_lock);
- list_add_tail(&info->list, &xenconsoles);
+ xen_early_pv_console_init(info, HVC_COOKIE);
spin_unlock(&xencons_lock);
return 0;
@@ -617,6 +624,18 @@ static void domU_write_early_console(const char *string, unsigned len)
}
#ifdef CONFIG_EARLY_PRINTK
+static int xenboot_setup_console(struct console *console, char *string)
+{
+ static struct xencons_info xenboot;
+
+ if (xen_initial_domain())
+ return 0;
+ if (!xen_pv_domain())
+ return -ENODEV;
+
+ xen_early_pv_console_init(&xenboot, 0);
+}
+
static void xenboot_write_console(struct console *console, const char *string,
unsigned len)
{
@@ -634,6 +653,7 @@ static void xenboot_write_console(struct console *console, const char *string,
struct console xenboot_console = {
.name = "xenboot",
.write = xenboot_write_console,
+ .setup = xenboot_setup_console,
.flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
.index = -1,
};
--
1.7.10.4
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-02-24 14:00 +0100 |
| Message-ID | <r5HcS-4EQ-7@gated-at.bofh.it> |
| In reply to | #1341937 |
[Multipart message — attachments visible in raw view] — view raw
Hi Stefano,
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on v4.5-rc5 next-20160223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Stefano-Stabellini/hvc_xen-add-earlycon-support/20160224-203006
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: x86_64-randconfig-x009-201608 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/tty/hvc/hvc_xen.c: In function 'xenboot_setup_console':
>> drivers/tty/hvc/hvc_xen.c:637:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +637 drivers/tty/hvc/hvc_xen.c
621 }
622 if (off < len)
623 domU_write_console(0, string+off, len-off);
624 }
625
626 #ifdef CONFIG_EARLY_PRINTK
627 static int xenboot_setup_console(struct console *console, char *string)
628 {
629 static struct xencons_info xenboot;
630
631 if (xen_initial_domain())
632 return 0;
633 if (!xen_pv_domain())
634 return -ENODEV;
635
636 xen_early_pv_console_init(&xenboot, 0);
> 637 }
638
639 static void xenboot_write_console(struct console *console, const char *string,
640 unsigned len)
641 {
642 if (!xen_pv_domain())
643 return;
644
645 dom0_write_console(0, string, len);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Stefano Stabellini <stefano.stabellini@eu.citrix.com> |
|---|---|
| Date | 2016-02-24 16:50 +0100 |
| Message-ID | <r5JRo-6CT-5@gated-at.bofh.it> |
| In reply to | #1341948 |
Hi kbuild test robot,
you are awesome as always. I'll fix it in the next version.
Thanks,
Stefano
On Wed, 24 Feb 2016, kbuild test robot wrote:
> Hi Stefano,
>
> [auto build test WARNING on tty/tty-testing]
> [also build test WARNING on v4.5-rc5 next-20160223]
> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
>
> url: https://github.com/0day-ci/linux/commits/Stefano-Stabellini/hvc_xen-add-earlycon-support/20160224-203006
> base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
> config: x86_64-randconfig-x009-201608 (attached as .config)
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
> drivers/tty/hvc/hvc_xen.c: In function 'xenboot_setup_console':
> >> drivers/tty/hvc/hvc_xen.c:637:1: warning: control reaches end of non-void function [-Wreturn-type]
> }
> ^
>
> vim +637 drivers/tty/hvc/hvc_xen.c
>
> 621 }
> 622 if (off < len)
> 623 domU_write_console(0, string+off, len-off);
> 624 }
> 625
> 626 #ifdef CONFIG_EARLY_PRINTK
> 627 static int xenboot_setup_console(struct console *console, char *string)
> 628 {
> 629 static struct xencons_info xenboot;
> 630
> 631 if (xen_initial_domain())
> 632 return 0;
> 633 if (!xen_pv_domain())
> 634 return -ENODEV;
> 635
> 636 xen_early_pv_console_init(&xenboot, 0);
> > 637 }
> 638
> 639 static void xenboot_write_console(struct console *console, const char *string,
> 640 unsigned len)
> 641 {
> 642 if (!xen_pv_domain())
> 643 return;
> 644
> 645 dom0_write_console(0, string, len);
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web