[PATCH 1/2] Set the serial port to port zero is none is specified.

4 views
Skip to first unread message

Himanshu Chauhan

unread,
Feb 27, 2021, 3:14:29 AM2/27/21
to xvisor...@googlegroups.com, Himanshu Chauhan
Signed-off-by: Himanshu Chauhan <hcha...@xvisor-x86.org>
---
arch/x86/board/common/devices/serial/serial.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/board/common/devices/serial/serial.c b/arch/x86/board/common/devices/serial/serial.c
index d2115371..671b65aa 100644
--- a/arch/x86/board/common/devices/serial/serial.c
+++ b/arch/x86/board/common/devices/serial/serial.c
@@ -215,6 +215,8 @@ struct defterm_ops *get_serial_defterm_ops(void *data)
attr = SERIAL0_CONFIG_DTS_PATH;
else if (!strcmp(cmdline_console_string, "serial@1"))
attr = SERIAL1_CONFIG_DTS_PATH;
+ else /* if incorrectly specified, default to serial port 0 */
+ attr = SERIAL0_CONFIG_DTS_PATH;

rc = vmm_devtree_setattr(node, VMM_DEVTREE_CONSOLE_ATTR_NAME,
(void *)attr, VMM_DEVTREE_ATTRTYPE_STRING,
--
2.27.0

Himanshu Chauhan

unread,
Feb 27, 2021, 3:14:38 AM2/27/21
to xvisor...@googlegroups.com, Himanshu Chauhan
Updated the document to use losetup etc to create and prepare
the virtual drive. Earlier small linux distro was suggested.

Signed-off-by: Himanshu Chauhan <hcha...@xvisor-x86.org>
---
docs/x86/x86_64_generic.txt | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/docs/x86/x86_64_generic.txt b/docs/x86/x86_64_generic.txt
index 1ce2a46e..4b53a3fb 100644
--- a/docs/x86/x86_64_generic.txt
+++ b/docs/x86/x86_64_generic.txt
@@ -59,13 +59,15 @@ C. Preparing to Boot Guest:

b. Creating a disk for qemu
i. Create a raw QEMU disk image: qemu-img create -f raw xvisor-hd.disk 32M
- ii. Boot a slackware or any other small linux distro to partition the dist and create filesystem on it
- # qemu-system-i386 -cdrom slackware_i486-14.0-mini-install.iso -hda xvisor-hd.disk -m 128 -boot d
- (NOTE: In Linux, use fdisk and mkfs.vfat to partition and create filesystem on the partition.)
- iii. Mount the new partition in disk in host Linux (where you are compiling xvisor and seabios)
+ ii. Find the loopback device for the disk file by running command:
+ losetup --partscan --find --show xvisor-hd.disk
+ iii. Make the filesystem on the disk:
+ sudo mkfs.vfat /dev/loop26p1
+ iv. Mount the new partition in disk in host Linux (where you are compiling xvisor and seabios)
# mkdir xmount
- # sudo mount -o loop,offset=1048576 xvisor-hd.disk xmount/
- iv. Copy seabios binary in it.
+ # sudo mount /dev/loop26p1 ./xmount/
+ NOTE: the loop device can different. Check the output of losetup in step ii.
+ v. Copy seabios binary in it.
# cp xvisor-seabios/out/bios.bin xmount/
# sudo umount xmount

--
2.27.0

Anup Patel

unread,
Mar 6, 2021, 11:09:33 PM3/6/21
to Xvisor Devel, Himanshu Chauhan
On Sat, Feb 27, 2021 at 1:44 PM Himanshu Chauhan
<hcha...@xvisor-x86.org> wrote:
>
> Signed-off-by: Himanshu Chauhan <hcha...@xvisor-x86.org>

Please add "x86: " prefix to patch subject.

Otherwise looks good to me.

Reviewed-by: Anup Patel <an...@brainfault.org>

Regards,
Anup
> --
> You received this message because you are subscribed to the Google Groups "Xvisor Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to xvisor-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/xvisor-devel/20210226122845.1106647-1-hchauhan%40xvisor-x86.org.

Anup Patel

unread,
Mar 6, 2021, 11:11:18 PM3/6/21
to Xvisor Devel, Himanshu Chauhan
On Sat, Feb 27, 2021 at 1:44 PM Himanshu Chauhan
<hcha...@xvisor-x86.org> wrote:
>
> Updated the document to use losetup etc to create and prepare
> the virtual drive. Earlier small linux distro was suggested.
>
> Signed-off-by: Himanshu Chauhan <hcha...@xvisor-x86.org>

Please add "x86: " prefix to patch subject.

Otherwise looks good to me.

Reviewed-by: Anup Patel <an...@brainfault.org>

Regards,
Anup

> --
> You received this message because you are subscribed to the Google Groups "Xvisor Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to xvisor-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/xvisor-devel/20210226122845.1106647-2-hchauhan%40xvisor-x86.org.
Reply all
Reply to author
Forward
0 new messages