summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-04alpha-linux-user: Fix a3 error return with v0 error bypass.Richard Henderson1-7/+5
We were failing to initialize a3 for syscalls that bypass the negative return value error check. Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04linux-user: Translate pipe2 flags; add to straceRichard Henderson2-1/+5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04linux-user: Allocate the right amount of space for non-fixed file mapsRichard Henderson1-11/+19
If we let the kernel handle the implementation of mmap_find_vma, via an anon mmap, we must use the size as indicated by the user and not the size truncated to the filesize. This happens often in ld.so, where we initially mmap the file to the size of the text+data+bss to reserve an area, then mmap+fixed over the top to properly handle data and bss. Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATHRichard Henderson2-2/+25
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04linux-user: Sync fcntl.h bits with the kernelRichard Henderson1-102/+92
For each target, only define the bits that appear in arch/target/include/asm/fcntl.h. Mirror the kernel's asm-generic layout by handling anything undefined afterward. Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04alpha-linux-user: Handle TARGET_SSI_IEEE_RAISE_EXCEPTION properlyRichard Henderson1-10/+51
We weren't aggregating the exceptions, nor raising signals properly. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04alpha-linux-user: Work around hosted mmap allocation problemsRichard Henderson1-2/+13
Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04alpha-linux-user: Fix signal handlingRichard Henderson2-1/+43
Proper signal numbers were not defined, and EXCP_INTERRUPT was unhandled, leading to all sorts of subtle confusion. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-08-04bitops: drop volatile qualifierBlue Swirl1-13/+13
Qualifier 'volatile' is not useful for applications, it's too strict for single threaded code but does not give the real atomicity guarantees needed for multithreaded code. Drop them and now useless casts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-04configure: Fix set-but-not-used warning in Xen 4.1 probePeter Maydell1-2/+1
The Xen 4.1 probe never uses the return value from xc_interface_open(), so was provoking a compiler warning on newer gcc. Fix by not bothering to put the return value anywhere. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-04configure: Don't run Xen compile checks in subshellsPeter Maydell1-15/+15
The Xen compile checks are currently run inside subshells. This is unnecessary and has the effect that if do_cc() exits with an error message then this only causes the subshell to exit, not the whole of configure, which is confusing. Remove the subshells, changing: if ( cat ; compile_prog ) ; then ... to if cat && compile_prog ; then ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-04Fixes related to processing of qemu's -numa optionChegu Vinod4-25/+27
The -numa option to qemu is used to create [fake] numa nodes and expose them to the guest OS instance. There are a couple of issues with the -numa option: a) Max VCPU's that can be specified for a guest while using the qemu's -numa option is 64. Due to a typecasting issue when the number of VCPUs is > 32 the VCPUs don't show up under the specified [fake] numa nodes. b) KVM currently has support for 160VCPUs per guest. The qemu's -numa option has only support for upto 64VCPUs per guest. This patch addresses these two issues. Below are examples of (a) and (b) a) >32 VCPUs are specified with the -numa option: /usr/local/bin/qemu-system-x86_64 \ -enable-kvm \ 71:01:01 \ -net tap,ifname=tap0,script=no,downscript=no \ -vnc :4 ... Upstream qemu : -------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 6 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 32 33 34 35 36 37 38 39 40 41 node 0 size: 131072 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 42 43 44 45 46 47 48 49 50 51 node 1 size: 131072 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 52 53 54 55 56 57 58 59 node 2 size: 131072 MB node 3 cpus: 30 node 3 size: 131072 MB node 4 cpus: node 4 size: 131072 MB node 5 cpus: 31 node 5 size: 131072 MB With the patch applied : ----------------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 6 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 node 0 size: 131072 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 node 1 size: 131072 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 node 2 size: 131072 MB node 3 cpus: 30 31 32 33 34 35 36 37 38 39 node 3 size: 131072 MB node 4 cpus: 40 41 42 43 44 45 46 47 48 49 node 4 size: 131072 MB node 5 cpus: 50 51 52 53 54 55 56 57 58 59 node 5 size: 131072 MB b) >64 VCPUs specified with -numa option: /usr/local/bin/qemu-system-x86_64 \ -enable-kvm \ -cpu Westmere,+rdtscp,+pdpe1gb,+dca,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+d-vnc :4 ... Upstream qemu : -------------- only 63 CPUs in NUMA mode supported. only 64 CPUs in NUMA mode supported. QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 8 nodes node 0 cpus: 6 7 8 9 38 39 40 41 70 71 72 73 node 0 size: 65536 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 42 43 44 45 46 47 48 49 50 51 74 75 76 77 78 79 node 1 size: 65536 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 52 53 54 55 56 57 58 59 60 61 node 2 size: 65536 MB node 3 cpus: 30 62 node 3 size: 65536 MB node 4 cpus: node 4 size: 65536 MB node 5 cpus: node 5 size: 65536 MB node 6 cpus: 31 63 node 6 size: 65536 MB node 7 cpus: 0 1 2 3 4 5 32 33 34 35 36 37 64 65 66 67 68 69 node 7 size: 65536 MB With the patch applied : ----------------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 8 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 node 0 size: 65536 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 node 1 size: 65536 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 node 2 size: 65536 MB node 3 cpus: 30 31 32 33 34 35 36 37 38 39 node 3 size: 65536 MB node 4 cpus: 40 41 42 43 44 45 46 47 48 49 node 4 size: 65536 MB node 5 cpus: 50 51 52 53 54 55 56 57 58 59 node 5 size: 65536 MB node 6 cpus: 60 61 62 63 64 65 66 67 68 69 node 6 size: 65536 MB node 7 cpus: 70 71 72 73 74 75 76 77 78 79 Signed-off-by: Chegu Vinod <chegu_vinod@hp.com>, Jim Hull <jim.hull@hp.com>, Craig Hada <craig.hada@hp.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-04build: Fix build breakage detected by buildbotDunrong Huang2-4/+7
More details: http://buildbot.b1-systems.de/qemu/builders/xen_unstable/builds/83/steps/compile/logs/stdio VLANState has been removed since commit a005d07, so "vlan id" should be fetched using net_hub_id_for_client(). Signed-off-by: Dunrong Huang <riegamaths@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-03fips: fix build on !LinuxAnthony Liguori2-3/+5
Commit 0f66998 makes -enable-fips conditional on Linux hosts but then uses it unconditionally in vl.c. Fix this by moving the fips handling to os-posix.c and adding a condition. Cc: Paul Moore <pmoore@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-03slirp: Handle whole 127.0.0.0/8 network as local addresses.Anders Waldenborg3-2/+9
Changes so translation of remote address to the host's ip address in the virtual network happens for all addresses in the 127.0.0.0/8 network, not just 127.0.0.1. This fixes so that hostfwd bound to addresses such as 127.0.0.2 works. Signed-off-by: Anders Waldenborg <anders@0x63.nu> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-08-03Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori8-40/+161
* bonzini/scsi-next: scsi: add support for ATA_PASSTHROUGH_xx scsi command esp: add missing const on TypeInfo structures esp: enable for all PCI machines Revert "megasas: disable due to build breakage" megasas: static SAS addresses scsi-disk: fix compilation with DEBUG_SCSI megasas: Update function megasys_scsi_uninit SCSI: STARTSTOPUNIT only eject/load media if powercondition is 0 SCSI: Update the sense code for PREVENT REMOVAL errors
2012-08-03scsi: add support for ATA_PASSTHROUGH_xx scsi commandCong Meng2-5/+87
Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03vnc: disable VNC password authentication (security type 2) when in FIPS modePaul Moore6-3/+63
FIPS 140-2 requires disabling certain ciphers, including DES, which is used by VNC to obscure passwords when they are sent over the network. The solution for FIPS users is to disable the use of VNC password auth when the host system is operating in FIPS compliance mode and the user has specified '-enable-fips' on the QEMU command line. This patch causes QEMU to emit a message to stderr when the host system is running in FIPS mode and a VNC password was specified on the commend line. If the system is not running in FIPS mode, or is running in FIPS mode but VNC password authentication was not requested, QEMU operates normally. Signed-off-by: Paul Moore <pmoore@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-03Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori6-13/+48
* qmp/queue/qmp: hmp: show the backing file depth block: Use bdrv_get_backing_file_depth() block: create bdrv_get_backing_file_depth() qapi: qapi.py: allow the "'" character to be escaped
2012-08-03Merge remote-tracking branch 'afaerber-or/qom-cpu-4' into stagingAnthony Liguori6-35/+46
* afaerber-or/qom-cpu-4: cpu: Move thread_kicked to CPUState cpu: Move thread field into CPUState cpu: Move CPU_COMMON_THREAD into CPUState qemu-thread: Let qemu_thread_is_self() return bool
2012-08-03Merge remote-tracking branch 'sstabellini/xen-fixes-20120801' into stagingAnthony Liguori1-1/+0
* sstabellini/xen-fixes-20120801: fix Xen compilation configure: Fix xen probe with Xen 4.2 and later
2012-08-03Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori66-827/+974
* stefanha/net: net: add the support for -netdev socket, listen net: fix the coding style hub: add the support for hub own flow control net: determine if packets can be sent before net queue deliver packets net: cleanup deliver/deliver_iov func pointers net: Make "info network" output more readable info net: Rename qemu_del_vlan_client() to qemu_del_net_client() net: Rename vc local variables to nc net: Rename VLANClientState to NetClientState net: Rename non_vlan_clients to net_clients net: Remove VLANState net: Remove vlan code from net.c net: Convert qdev_prop_vlan to peer with hub net: Drop vlan argument to qemu_new_net_client() hub: Check that hubs are configured correctly net: Look up 'vlan' net clients using hubs net: Use hubs for the vlan feature net: Add a hub net client net: Add interface to bridge when SIOCBRADDIF isn't available
2012-08-03Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori3-16/+12
* stefanha/trivial-patches: exec.c: Remove out of date comment exec.c: Use subpages for large unaligned mappings exec.c: Fix off-by-one error in register_subpage socket: clean up redundant assignment qom: Clean libuser object and dependency files usb: Clean common object and dependency files
2012-08-03Merge remote-tracking branch 'aneesh/for-upstream' into stagingAnthony Liguori1-5/+10
* aneesh/for-upstream: hw/9pfs: Fix assert when disabling migration configure: Fix build with capabilities
2012-08-03exec.c: Remove out of date commentPeter Maydell1-8/+0
Remove an out of date comment: this comment used to be attached to cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally inserted a couple of other functions between the comment and its function. It is in any case obsolete since (a) the function arguments it refers to have been replaced with a single MemoryRegionSection* argument and (b) the inability to handle regions whose offset_within_address_space and offset_within_region aren't equally aligned was fixed as part of the rewrite of this code. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-03exec.c: Use subpages for large unaligned mappingsTyler Hall1-4/+9
Registering a multi-page memory region that is non-page-aligned results in a subpage from the start to the page boundary, some number of full pages, and possibly another subpage from the last page boundary to the end. The full pages will have a value for offset_within_region that is not a multiple of TARGET_PAGE_SIZE. Accesses through softmmu are unable to handle this and will segfault. Handling full pages through subpages is not optimal, but only non-page-aligned mappings take the penalty. Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Avi Kivity <avi@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-03exec.c: Fix off-by-one error in register_subpageTyler Hall1-1/+1
subpage_register() expects "end" to be the last byte in the mapping. Registering a non-page-aligned memory region that extends up to or beyond a page boundary causes subpage_register() to silently fail through the (end >= PAGE_SIZE) check. This bug does not cause noticeable problems for mappings that do not extend to a page boundary, though they do register an extra byte. Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Avi Kivity <avi@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-03socket: clean up redundant assignmentAmos Kong1-1/+0
Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-03hmp: show the backing file depthBenoît Canet1-0/+2
Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-03block: Use bdrv_get_backing_file_depth()Benoît Canet3-3/+11
Use the dedicated counting function in qmp_query_block in order to propagate the backing file depth to HMP and add backing_file_depth to qmp-commands.hx Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-03block: create bdrv_get_backing_file_depth()Benoît Canet2-0/+14
Create bdrv_get_backing_file_depth() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-03qom: Clean libuser object and dependency filesJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-03usb: Clean common object and dependency filesJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-03esp: add missing const on TypeInfo structuresHervé Poussineau1-2/+2
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03esp: enable for all PCI machinesPaolo Bonzini2-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03Revert "megasas: disable due to build breakage"Paolo Bonzini1-0/+1
This reverts commit 92336855975805d88c7979f53bc05c2d47abab04. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03megasas: static SAS addressesHannes Reinecke2-17/+49
This patch introduces a new property 'sas_address' which allows the user to specify the SAS address for the HBA. The default address is following the NAA locally assigned identifier format with the locally assigned address 0x525400 as used eg for the MAC addresses. The lower bytes are set to the pci address which will ensure uniqueness for the local machine. The port addresses are now calculated based on the magic number 0x1221 (which is found in real hardware, too) plus the device number. Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Andreas Faerber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03scsi-disk: fix compilation with DEBUG_SCSIPaolo Bonzini1-11/+12
Reported-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03megasas: Update function megasys_scsi_uninitStefan Weil1-2/+1
Commit f90c2bcdbc69e41e575f868b984c3e2de8f51bac changed PCIUnregisterFunc, therefore the function prototype needs an update. megasas.o is currently not linked, so this bug was not detected by the buildbots. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03SCSI: STARTSTOPUNIT only eject/load media if powercondition is 0Ronnie Sahlberg1-0/+6
The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be placed in the power condition defined in Table 558. If this field has a value other than 0h then the Start and LoEj bits shall be ignored. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03SCSI: Update the sense code for PREVENT REMOVAL errorsRonnie Sahlberg1-2/+2
Change the sense codes for failures to eject a device that is locked by PREVENT_ALLOW_MEDIUM_REMOVAL from the generic MEDIA_LOAD_OR_EJECT_FAILED to the more specific MEDIUM_REMOVAL_PREVENTED. The second sense code is more accurate, and is also listed in MMC annex F for the recommended sense codes for MMC devices while the first sense code is not. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-02Support 'help' as a synonym for '?' in command line optionsPeter Maydell17-23/+70
For command line options which permit '?' meaning 'please list the permitted values', add support for 'help' as a synonym, by abstracting the check out into a helper function. This change means that in some cases where we were being lazy in our string parsing, "?junk" will now be rejected as an invalid option rather than being (undocumentedly) treated the same way as "?". Update the documentation to use 'help' rather than '?', since '?' is a shell metacharacter and thus prone to fail confusingly if there is a single character filename in the current working directory and the '?' has not been escaped. It's therefore better to steer users towards 'help', though '?' is retained for backwards compatibility. We do not, however, update the output of the system emulator's -help (or any documentation autogenerated from the qemu-options.hx which is the source of the -help text) because libvirt parses our -help output and will break. At a later date when QEMU provides a better interface so libvirt can avoid having to do this, we can update the -help text too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-02cpu: Move thread_kicked to CPUStateAndreas Färber3-6/+10
Change field type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02cpu: Move thread field into CPUStateAndreas Färber3-18/+24
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02cpu: Move CPU_COMMON_THREAD into CPUStateAndreas Färber3-12/+12
CPU_COMMON_THREAD was only used for Windows, adding an hThread field to CPU_COMMON. Move the field into QOM CPUState and change its type to HANDLE, which it is assigned from. This requires Windows headers, pulled in through qemu-thread.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02qemu-thread: Let qemu_thread_is_self() return boolAndreas Färber3-3/+4
qemu_cpu_is_self(), passing the return value through, will later be adapted to return bool as well. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Stefan Weil <sw@weilnetz.de>
2012-08-01qapi: qapi.py: allow the "'" character to be escapedLuiz Capitulino1-10/+21
Support escaping the escape character, and make more robust (don't die for '', handle ' without matching '. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-01Replace 'struct siginfo' with 'siginfo_t'.Richard W.M. Jones2-5/+5
glibc 2.16 will remove the undocumented definition of 'struct siginfo' from <bits/siginfo.h>. This change is already present in glibc 2.15.90, so qemu compilation of certain targets (eg. cris-user) breaks. This struct was always typedef'd to be the same as 'siginfo_t' which is what POSIX documents, so use that instead. Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-01target-i386: move cpu_reset and reset callback to cpu.cIgor Mammedov2-8/+15
Moving reset callback into cpu object from board level and resetting cpu at the end of x86_cpu_realize() will allow properly create cpu object during run-time (hotplug) without calling reset externaly. When reset over QOM hierarchy is implemented, reset callback should be removed. v2: - leave cpu_reset in pc_new_cpu() for now, it's to be cleaned up when APIC init is moved in cpu.c Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-01target-i386: move cpu halted decision into x86_cpu_resetIgor Mammedov6-15/+36
MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this. However there is no point in implementing MP initialization protocol in qemu. Thus first CPU is always marked as BSP. This patch: - moves decision to designate BSP from board into cpu, making cpu self-sufficient in this regard. Later it will allow to cleanup hw/pc.c and remove cpu_reset and wrappers from there. - stores flag that CPU is BSP in IA32_APIC_BASE to model behavior described in Inted SDM vol 3a part 1 chapter 8.4.1 - uses MSR_IA32_APICBASE_BSP flag in apic_base for checking if cpu is BSP patch is based on Jan Kiszka's proposal: http://thread.gmane.org/gmane.comp.emulators.qemu/100806 Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>