summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | net: cleanup deliver/deliver_iov func pointersZhi Yong Wu2012-08-014-48/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Make "info network" output more readable infoZhi Yong Wu2012-08-013-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Rename qemu_del_vlan_client() to qemu_del_net_client()Stefan Hajnoczi2012-08-0111-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Rename vc local variables to ncStefan Hajnoczi2012-08-016-143/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Rename VLANClientState to NetClientStateStefan Hajnoczi2012-08-0150-283/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Rename non_vlan_clients to net_clientsStefan Hajnoczi2012-08-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Remove VLANStateStefan Hajnoczi2012-08-0118-137/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Remove vlan code from net.cStefan Hajnoczi2012-08-013-110/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Convert qdev_prop_vlan to peer with hubZhi Yong Wu2012-08-015-17/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Drop vlan argument to qemu_new_net_client()Stefan Hajnoczi2012-08-019-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | hub: Check that hubs are configured correctlyStefan Hajnoczi2012-08-013-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Look up 'vlan' net clients using hubsStefan Hajnoczi2012-08-014-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Use hubs for the vlan featureStefan Hajnoczi2012-08-0114-75/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop using the special-case vlan code in net.c. Instead use the hub net client to implement the vlan feature. The next patch will remove vlan code from net.c completely. 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>
| * | | | net: Add a hub net clientStefan Hajnoczi2012-08-015-16/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vlan feature can be implemented in terms of hubs. By introducing a hub net client it becomes possible to remove the special case vlan code from net.c and push the vlan feature out of generic networking 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>
| * | | | net: Add interface to bridge when SIOCBRADDIF isn't availableCorey Bryant2012-08-011-3/+21
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bridge helper uses the SIOCBRADDIF ioctl to add an inteface to a bridge. SIOCBRADDIF is not available on old Linux versions. This patch adds support to use the SIOCDEVPRIVATE ioctl with BRCTL_ADD_IF if SIOCBRADDIF is not available. Reported-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-08-033-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
| * | | | exec.c: Remove out of date commentPeter Maydell2012-08-031-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>
| * | | | exec.c: Use subpages for large unaligned mappingsTyler Hall2012-08-031-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>
| * | | | exec.c: Fix off-by-one error in register_subpageTyler Hall2012-08-031-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>
| * | | | socket: clean up redundant assignmentAmos Kong2012-08-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | | qom: Clean libuser object and dependency filesJan Kiszka2012-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | | usb: Clean common object and dependency filesJan Kiszka2012-08-031-1/+1
| | |/ / | |/| | | | | | | | | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | | Merge remote-tracking branch 'aneesh/for-upstream' into stagingAnthony Liguori2012-08-031-5/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * aneesh/for-upstream: hw/9pfs: Fix assert when disabling migration configure: Fix build with capabilities
| * | | | hw/9pfs: Fix assert when disabling migrationAneesh Kumar K.V2012-07-311-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 9p we can get the attach request multiple times for the same export. So don't adding migration blocker for every attach request. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | | | configure: Fix build with capabilitiesStefan Weil2012-07-311-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. This patch fixes support for capabilities. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | | | Support 'help' as a synonym for '?' in command line optionsPeter Maydell2012-08-0217-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>
* | | Replace 'struct siginfo' with 'siginfo_t'.Richard W.M. Jones2012-08-012-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>
* | | target-i386: move cpu_reset and reset callback to cpu.cIgor Mammedov2012-08-012-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>
* | | target-i386: move cpu halted decision into x86_cpu_resetIgor Mammedov2012-08-016-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>
* | | fix Xen compilationStefano Stabellini2012-08-011-3/+1
| |/ |/| | | | | | | | | | | | | 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>
* | configure: -I\$(SRC_PATH) goes in QEMU_INCLUDES not QEMU_CFLAGSPeter Maydell2012-07-311-2/+3
| | | | | | | | | | | | | | | | | | If the smartcard configure check passes, add '-I\$(SRC_PATH)/libcacard' to QEMU_INCLUDES, not QEMU_CFLAGS. Otherwise the unexpanded SRC_PATH will cause a warning in every following configure test. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Fix compile warning in utimensat/futimens testPeter Maydell2012-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | Fix compile warning in the utimensat/futimens test ("implicit declaration of function 'utimensat'", ditto futimens) by adding a missing include. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Fix warnings in VDE library probePeter Maydell2012-07-311-1/+2
| | | | | | | | | | | | | | | | | | Fix compile warnings in the VDE library probe ("passing argument 1 of 'vde_open_real' discards 'const' qualifier from pointer target type", ditto argument 2). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Fix compile warning in PNG testPeter Maydell2012-07-311-1/+1
| | | | | | | | | | | | | | | | | | Fix compile warning (variable 'png_ptr' set but not used) in the PNG detection test code. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Fix errors in test for__sync_fetch_and_andStefan Weil2012-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The old test code raises two compiler warnings which are errors since commit 417c9d72d48275d19c60861896efd4962d21aca2. These errors could result in compilations with compiler flag -march486 (so all nice features of newer processors got lost). Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: -march=i486 belongs in QEMU_CFLAGS, not CFLAGSPeter Maydell2012-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | The distinction between QEMU_CFLAGS and CFLAGS is that the former is for flags without which QEMU can't compile, whereas the latter is for flags like "-g -O2" which the user can safely override. "-march=i486" is in the former category, and so belongs in QEMU_CFLAGS. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Replace bash code by standard shell codeStefan Weil2012-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | "+=" does not work with dash and other simple /bin/sh implementations. The new code prepends the flag while the old code either did not work (it continued after an error message which typically was not read) or appended the flag. That difference should not matter here. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Fix build with capabilitiesStefan Weil2012-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. This patch fixes support for capabilities. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Fix build with ALSA audio driverStefan Weil2012-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 417c9d72d48275d19c60861896efd4962d21aca2, all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. Here a build breakage for ALSA (configure --audio-drv-list=alsa) is fixed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Don't run configure tests with -Werror enabledPeter Maydell2012-07-311-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't run configure tests with -Werror in the compiler flags. The idea of -Werror is that it makes problems very obvious to developers, so they get fixed quickly. However, when running configure tests, failures due to -Werror are far from obvious -- they simply result in the test quietly failing when it should have passed. Not using -Werror is in line with recommended practice in the Autoconf world. This commit is essentially backing out the changes in commit 417c9d72. Instead we fix the problem that commit was trying to address in a different way: we add -Werror only for the test of the nss headers, with a comment that this is specifically intended to detect a bug in some releases of nss. We also have to clean up a bug in the smartcard test where it was trying to include smartcard_cflags in the test compile flags: this would always result in a failure with -Werror, because they include an escaped "$(SRC_PATH)" which is only valid when used in the final makefile. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | configure: Split valgrind test into pragma test and valgrind.h testPeter Maydell2012-07-312-2/+25
|/ | | | | | | | | | | | | | | | Split the configure test that checks for valgrind into two, one part checking whether we have the gcc pragma to disable unused-but-set variables, and the other part checking for the existence of valgrind.h. The first of these has to be compiled with -Werror and the second does not and shouldn't generate any warnings. This (a) allows us to enable "make errors in configure tests be build failures" and (b) enables use of valgrind on systems with a gcc which doesn't know about -Wunused-but-set-varibale, like Debian squeeze. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2012-07-3033-248/+337
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mst/tags/for_anthony: msi/msix: added API to set MSI message address and data pci: Add INTx routing notifier pci: Add pci_device_route_intx_to_irq pci: Unregister BARs before device exit pci: convert PCIUnregisterFunc to void msix: Switch msix_uninit to return void msix: Allow full specification of MSIX layout msix: Split PBA into it's own MemoryRegion msix: Note endian TODO item msix: Move msix_mmio_read virtio: Convert to msix_init_exclusive_bar() interface ivshmem: Convert to msix_init_exclusive_bar() interface msix: Add simple BAR allocation MSIX setup functions msix: fix PCIDevice naming inconsistency msix: drop unused msix_bar_size, require valid bar_size
| * Merge branch pci into masterMichael S. Tsirkin2012-07-2933-248/+337
| |\ | | | | | | | | | | | | | | | | | | | | | Merge master and pci branch, resolve build breakage in hw/esp.c introduced by f90c2bcd. Conflicts: hw/esp.c
| | * msi/msix: added API to set MSI message address and dataAlexey Kardashevskiy2012-07-194-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added (msi|msix)_set_message() function for whoever might want to use them. Currently msi_notify()/msix_notify() write to these vectors to signal the guest about an interrupt so the correct values have to written there by the guest or QEMU. For example, POWER guest never initializes MSI/MSIX vectors, instead it uses RTAS hypercalls. So in order to support MSIX for virtio-pci on POWER we have to initialize MSI/MSIX message from QEMU. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: Add INTx routing notifierJan Kiszka2012-07-193-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This per-device notifier shall be triggered by any interrupt router along the path of a device's legacy interrupt signal on routing changes. For simplicity reasons and as this is a slow path anyway, no further details on the routing changes are provided. Instead, the callback is expected to use pci_device_route_intx_to_irq to check the effect of the change. Will be used by KVM PCI device assignment and VFIO. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: Add pci_device_route_intx_to_irqMichael S. Tsirkin2012-07-194-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device assigned on KVM needs to know the mode (enabled/inverted/disabled) and the IRQ number that a given device triggers in the attached interrupt controller. Add a PCI IRQ path discovery function that walks from a given device to the host bridge, and gets this information. For this purpose, a host bridge callback function is introduced: route_intx_to_irq. It is so far only implemented by the PIIX3, other host bridges can be added later on as required. Will be used for KVM PCI device assignment and VFIO. Based on patch by Jan Kiszka, with minor tweaks. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: Unregister BARs before device exitAlex Williamson2012-07-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BARs are registered in init functions from memory regions created by the drivers. Exit functions destroy those memory regions. By unregistering the io regions after exit(), we're calling memory_region_del_subregion on freed memory. Don't do that. The option rom comes along for the ride because it's more symmetric to how it's created. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: convert PCIUnregisterFunc to voidAlex Williamson2012-07-0425-83/+47
| | | | | | | | | | | | | | | | | | | | | | | | Not a single driver has any possibility of failure on their exit function, let's keep it that way. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Switch msix_uninit to return voidAlex Williamson2012-06-182-5/+5
| | | | | | | | | | | | | | | | | | | | | It can't fail. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Allow full specification of MSIX layoutAlex Williamson2012-06-182-99/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally, complete the fully specified interface. msix_add_config() gets folded into msix_init() because we now have quite a few parameters to pass and rolling it in let's us error earlier, avoiding the ugly unwind exit path. msix_mmio_setup() also gets rolled in, just because it's redundant to rediscover offsets when we already have them for such a tiny function. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud