bhyverun.c (e50ce2aa06162f7483d7650cc5016069a54e1f77) | bhyverun.c (b100acf254bfe7f5003e82da2578bd1f2f84cdbf) |
---|---|
1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 131 unchanged lines hidden (view full) --- 140 " -W: force virtio to use single-vector MSI\n" 141 " -e: exit on unhandled I/O access\n" 142 " -h: help\n" 143 " -s: <slot,driver,configinfo> PCI slot config\n" 144 " -l: LPC device configuration\n" 145 " -m: memory size in MB\n" 146 " -w: ignore unimplemented MSRs\n" 147 " -x: local apic is in x2APIC mode\n" | 1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 131 unchanged lines hidden (view full) --- 140 " -W: force virtio to use single-vector MSI\n" 141 " -e: exit on unhandled I/O access\n" 142 " -h: help\n" 143 " -s: <slot,driver,configinfo> PCI slot config\n" 144 " -l: LPC device configuration\n" 145 " -m: memory size in MB\n" 146 " -w: ignore unimplemented MSRs\n" 147 " -x: local apic is in x2APIC mode\n" |
148 " -Y: disable MPtable generation\n" |
|
148 " -U: uuid\n", 149 progname, (int)strlen(progname), ""); 150 151 exit(code); 152} 153 154void * 155paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) --- 455 unchanged lines hidden (view full) --- 611 612 vm_set_capability(ctx, cpu, VM_CAP_ENABLE_INVPCID, 1); 613} 614 615int 616main(int argc, char *argv[]) 617{ 618 int c, error, gdb_port, err, bvmcons; | 149 " -U: uuid\n", 150 progname, (int)strlen(progname), ""); 151 152 exit(code); 153} 154 155void * 156paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) --- 455 unchanged lines hidden (view full) --- 612 613 vm_set_capability(ctx, cpu, VM_CAP_ENABLE_INVPCID, 1); 614} 615 616int 617main(int argc, char *argv[]) 618{ 619 int c, error, gdb_port, err, bvmcons; |
619 int max_vcpus; | 620 int max_vcpus, mptgen; |
620 struct vmctx *ctx; 621 uint64_t rip; 622 size_t memsize; 623 624 bvmcons = 0; 625 progname = basename(argv[0]); 626 gdb_port = 0; 627 guest_ncpus = 1; 628 memsize = 256 * MB; | 621 struct vmctx *ctx; 622 uint64_t rip; 623 size_t memsize; 624 625 bvmcons = 0; 626 progname = basename(argv[0]); 627 gdb_port = 0; 628 guest_ncpus = 1; 629 memsize = 256 * MB; |
630 mptgen = 1; |
|
629 | 631 |
630 while ((c = getopt(argc, argv, "abehwxAHIPWp:g:c:s:m:l:U:")) != -1) { | 632 while ((c = getopt(argc, argv, "abehwxAHIPWYp:g:c:s:m:l:U:")) != -1) { |
631 switch (c) { 632 case 'a': 633 x2apic_mode = 0; 634 break; 635 case 'A': 636 acpi = 1; 637 break; 638 case 'b': --- 49 unchanged lines hidden (view full) --- 688 strictmsr = 0; 689 break; 690 case 'W': 691 virtio_msix = 0; 692 break; 693 case 'x': 694 x2apic_mode = 1; 695 break; | 633 switch (c) { 634 case 'a': 635 x2apic_mode = 0; 636 break; 637 case 'A': 638 acpi = 1; 639 break; 640 case 'b': --- 49 unchanged lines hidden (view full) --- 690 strictmsr = 0; 691 break; 692 case 'W': 693 virtio_msix = 0; 694 break; 695 case 'x': 696 x2apic_mode = 1; 697 break; |
698 case 'Y': 699 mptgen = 0; 700 break; |
|
696 case 'h': 697 usage(0); 698 default: 699 usage(1); 700 } 701 } 702 argc -= optind; 703 argv += optind; --- 43 unchanged lines hidden (view full) --- 747 init_bvmcons(); 748 749 error = vm_get_register(ctx, BSP, VM_REG_GUEST_RIP, &rip); 750 assert(error == 0); 751 752 /* 753 * build the guest tables, MP etc. 754 */ | 701 case 'h': 702 usage(0); 703 default: 704 usage(1); 705 } 706 } 707 argc -= optind; 708 argv += optind; --- 43 unchanged lines hidden (view full) --- 752 init_bvmcons(); 753 754 error = vm_get_register(ctx, BSP, VM_REG_GUEST_RIP, &rip); 755 assert(error == 0); 756 757 /* 758 * build the guest tables, MP etc. 759 */ |
755 mptable_build(ctx, guest_ncpus); | 760 if (mptgen) { 761 error = mptable_build(ctx, guest_ncpus); 762 if (error) 763 exit(1); 764 } |
756 757 error = smbios_build(ctx); 758 assert(error == 0); 759 760 if (acpi) { 761 error = acpi_build(ctx, guest_ncpus); 762 assert(error == 0); 763 } --- 18 unchanged lines hidden --- | 765 766 error = smbios_build(ctx); 767 assert(error == 0); 768 769 if (acpi) { 770 error = acpi_build(ctx, guest_ncpus); 771 assert(error == 0); 772 } --- 18 unchanged lines hidden --- |