Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lguest: remove NOTIFY facility from demonstration launcher.

This was only used for early console, now we can get rid of it altogether.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

+1 -24
+1 -24
tools/lguest/lguest.c
··· 1079 1079 tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); 1080 1080 } 1081 1081 1082 - /*L:215 1083 - * This is the generic routine we call when the Guest uses LHCALL_NOTIFY. 1084 - */ 1085 - static void handle_output(unsigned long addr) 1086 - { 1087 - /* 1088 - * Early console write is done using notify on a nul-terminated string 1089 - * in Guest memory. It's also great for hacking debugging messages 1090 - * into a Guest. 1091 - */ 1092 - if (addr >= guest_limit) 1093 - errx(1, "Bad NOTIFY %#lx", addr); 1094 - 1095 - write(STDOUT_FILENO, from_guest_phys(addr), 1096 - strnlen(from_guest_phys(addr), guest_limit - addr)); 1097 - } 1098 - 1099 1082 /*L:217 1100 1083 * We do PCI. This is mainly done to let us test the kernel virtio PCI 1101 1084 * code. ··· 2645 2662 2646 2663 /* We read from the /dev/lguest device to run the Guest. */ 2647 2664 readval = pread(lguest_fd, &notify, sizeof(notify), cpu_id); 2648 - 2649 - /* One unsigned long means the Guest did HCALL_NOTIFY */ 2650 2665 if (readval == sizeof(notify)) { 2651 - if (notify.trap == 0x1F) { 2652 - verbose("Notify on address %#08x\n", 2653 - notify.addr); 2654 - handle_output(notify.addr); 2655 - } else if (notify.trap == 13) { 2666 + if (notify.trap == 13) { 2656 2667 verbose("Emulating instruction at %#x\n", 2657 2668 getreg(eip)); 2658 2669 emulate_insn(notify.insn);