aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-08-03Merge remote-tracking branch 'afaerber-or/qom-cpu-4' into stagingAnthony Liguori
* 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 Liguori
* 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 Liguori
* 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 Liguori
* 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 Liguori
* aneesh/for-upstream: hw/9pfs: Fix assert when disabling migration configure: Fix build with capabilities
2012-08-03exec.c: Remove out of date commentPeter Maydell
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 Hall
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 Hall
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 Kong
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 Canet
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 Canet
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 Canet
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 Kiszka
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 Kiszka
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é Poussineau
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03esp: enable for all PCI machinesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03Revert "megasas: disable due to build breakage"Paolo Bonzini
This reverts commit 92336855975805d88c7979f53bc05c2d47abab04. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03megasas: static SAS addressesHannes Reinecke
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 Bonzini
Reported-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-03megasas: Update function megasys_scsi_uninitStefan Weil
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 Sahlberg
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 Sahlberg
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 Maydell
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ärber
Change field type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02cpu: Move thread field into CPUStateAndreas Färber
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02cpu: Move CPU_COMMON_THREAD into CPUStateAndreas Färber
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ärber
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 Capitulino
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. Jones
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 Mammedov
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 Mammedov
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>
2012-08-01fix Xen compilationStefano Stabellini
xen_pt_unregister_device is used as PCIUnregisterFunc, so it should match the type. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Tested-by: Andreas Färber <afaerber@suse.de>
2012-08-01fix Xen compilationStefano Stabellini
xen_pt_unregister_device is used as PCIUnregisterFunc, so it should match the type. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-01configure: Fix xen probe with Xen 4.2 and laterAnthony PERARD
The xs.h header is now deprecated and produces a warning. This prevents the configure script from enabling Xen with xen-unstable whom will become 4.2. As this header is not anymore common to every version of Xen, we just remove it from the early probe for Xen. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-08-01net: add the support for -netdev socket, listenZhi Yong Wu
The -net socket,listen option does not work with the newer -netdev syntax: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg01508.html This patch makes it work now. For the case where one vlan has multiple listenning sockets, the patch will also provide the support. Supported syntax: 1.) -net socket,listen=127.0.0.1:1234,vlan=0 2.) -net socket,listen=127.0.0.1:1234,vlan=0 -net socket,listen=127.0.0.1:1235,vlan=0 3.) -netdev socket,listen=127.0.0.1:1234,id=socket0 Drop the NetSocketListenState struct and add a listen_fd field to NetSocketState. When a -netdev socket,listen= instance is created there will be a NetSocketState with fd=-1 and a valid listen_fd. The net_socket_accept() handler waits for listen_fd to become readable and then accepts the connection. When this state transition happens, we no longer monitor listen_fd for incoming connections...until the client disconnects again. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: fix the coding styleZhi Yong Wu
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01hub: add the support for hub own flow controlZhi Yong Wu
Only when all other hub port's *peer* .can_receive() all return 1, the source hub port .can_receive() return 1. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: determine if packets can be sent before net queue deliver packetsZhi Yong Wu
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: cleanup deliver/deliver_iov func pointersZhi Yong Wu
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Make "info network" output more readable infoZhi Yong Wu
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Rename qemu_del_vlan_client() to qemu_del_net_client()Stefan Hajnoczi
Another step in moving the vlan feature out of net core. Users only deal with NetClientState and therefore qemu_del_vlan_client() should be named qemu_del_net_client(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Rename vc local variables to ncStefan Hajnoczi
Now that VLANClientState has been renamed to NetClientState all 'vc' local variables should be 'nc'. Much of the code already used 'nc' but there are places where 'vc' needs to be renamed. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Rename VLANClientState to NetClientStateStefan Hajnoczi
The vlan feature is no longer part of net core. Rename VLANClientState to NetClientState because net clients are not explicitly associated with a vlan at all, instead they have a peer net client to which they are connected. This patch is a mechanical search-and-replace except for a few whitespace fixups where changing VLANClientState to NetClientState misaligned whitespace. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Rename non_vlan_clients to net_clientsStefan Hajnoczi
There is no longer a distinction between vlan clients and non-vlan clients in the net core. The net core only knows about point-to-point clients which are connected to a peer. It's time to rename the global list of net clients since it no longer refers to vlans at all. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Remove VLANStateStefan Hajnoczi
VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Remove vlan code from net.cStefan Hajnoczi
The vlan implementation in net.c has been replaced by hubs so we can remove the code. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Convert qdev_prop_vlan to peer with hubZhi Yong Wu
Instead of using VLANState use net/hub.h to support the vlan qdev property. The vlan qdev property becomes an alias for the peer qdev property but is represented as a VLAN ID number. When a VLAN ID is selected the device will really peer with a hub port. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Drop vlan argument to qemu_new_net_client()Stefan Hajnoczi
Since hubs are now used to implement the 'vlan' feature and the vlan argument is always NULL, remove the argument entirely and update all net clients that use qemu_new_net_client(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01hub: Check that hubs are configured correctlyStefan Hajnoczi
Checks can be performed to make sure that hubs have at least one NIC and one host device, warning the user if this is not the case. Configurations which do not meet this rule tend to be broken but just emit a warning. This patch preserves compatibility with the checks performed by net core on vlans. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01net: Look up 'vlan' net clients using hubsStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>