summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20150903' into stagingPeter Maydell2015-09-036-13/+531
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First batch of s390x patches for 2.5: - introduce 2.5 compat machine - support for migration of storage keys # gpg: Signature made Thu 03 Sep 2015 11:28:06 BST using RSA key ID C6F02FAF # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" * remotes/cohuck/tags/s390x-20150903: s390x: Disable storage key migration on old machine type s390x: Migrate guest storage keys (initial memory only) s390x: Info skeys sub-command s390x: Dump-skeys hmp support s390x: Dump storage keys qmp command s390x: Enable new s390-storage-keys device s390x: Create QOM device for s390 storage keys s390x: add 2.5 compat s390-ccw-virtio machine Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * s390x: Disable storage key migration on old machine typeJason J. Herne2015-09-032-3/+42
| | | | | | | | | | | | | | | | | | This code disables storage key migration when an older machine type is specified. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Migrate guest storage keys (initial memory only)Jason J. Herne2015-09-031-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | Routines to save/load guest storage keys are provided. register_savevm is called to register them as migration handlers. We prepare the protocol to support more complex parameters. So we will later be able to support standby memory (having empty holes), compression and "state live migration" like done for ram. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Info skeys sub-commandJason J. Herne2015-09-031-0/+23
| | | | | | | | | | | | | | | | | | | | Provide an info skeys hmp sub-command to allow the end user to dump a storage key for a given address. This is useful for guest operating system developers. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Dump-skeys hmp supportJason J. Herne2015-09-031-0/+12
| | | | | | | | | | | | | | | | | | Add dump-skeys command to the human monitor. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Dump storage keys qmp commandJason J. Herne2015-09-031-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | Provide a dump-skeys qmp command to allow the end user to dump storage keys. This is useful for debugging problems with guest storage key support within Qemu and for guest operating system developers. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * s390x: Enable new s390-storage-keys deviceJason J. Herne2015-09-033-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s390 guest initialization is modified to make use of new s390-storage-keys device. Old code that globally allocated storage key array is removed. The new device enables storage key access for kvm guests. Cache storage key QOM objects in frequently used helper functions to avoid a performance hit every time we use one of these functions. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Create QOM device for s390 storage keysJason J. Herne2015-09-033-0/+218
| | | | | | | | | | | | | | | | | | | | A new QOM style device is provided to back guest storage keys. A special version for KVM is created, which handles the storage key access via KVM_S390_GET_SKEYS and KVM_S390_SET_SKEYS ioctl. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: add 2.5 compat s390-ccw-virtio machineCornelia Huck2015-09-031-2/+17
| | | | | | | | | | | | Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
* | ne2000: Drop ne2000_can_receiveFam Zheng2015-09-023-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | ne2000_receive already checks the same conditions and drops the packet if it's not ready, removing the .can_receive callback avoids the necessity to add explicit flushes when the conditions turn true (which is required by the new semantics of .can_receive since 6e99c63 "net/socket: Drop net_socket_can_send"). Plus the "return 1" if E8390_STOP is also suspicious. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | vmxnet3: Drop net_vmxnet3_info.can_receiveFam Zheng2015-09-021-1/+0
| | | | | | | | | | | | | | | | | | | | Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the semantics around .can_receive for sockets to now require the device to flush queued pkts when transitioning to a .can_receive=true state. But it's OK to drop incoming packets when the link is not active. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | rtl8139: Do not consume the packet during overflow in standard mode.Vladislav Yasevich2015-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When operation in standard mode, we currently return the size of packet during buffer overflow. This consumes the overflow packet. Return 0 instead so we can re-process the overflow packet when we have room. This fixes issues with lost/dropped fragments of large messages. Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Message-id: 1441121206-6997-3-git-send-email-vyasevic@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | rtl8139: Fix receive buffer overflow checkVladislav Yasevich2015-09-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rtl8139_do_receive() tries to check for the overflow condition by making sure that packet_size + 8 does not exceed the available buffer space. The issue here is that RxBuffAddr, used to calculate available buffer space, is aligned to a a 4 byte boundry after every update. So it is possible that every packet ends up being slightly padded when written to the receive buffer. This padding is not taken into account when checking for overflow and we may end up missing the overflow condition can causing buffer overwrite. This patch takes alignment into consideration when checking for overflow condition. Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Message-id: 1441121206-6997-2-git-send-email-vyasevic@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | rtl8139: use ldl/stl wrapper for unaligned 32-bit accessStefan Hajnoczi2015-09-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | The tx offload feature accesses a 16-bit aligned TCP header struct. The 32-bit fields must be accessed using ldl/stl wrappers since some host architectures fault on unaligned access. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Message-id: 1438604157-29664-4-git-send-email-stefanha@redhat.com
* | rtl8139: use net/eth.h macros instead of custom macrosStefan Hajnoczi2015-09-021-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate the following "custom" macros since they are just duplicates of net/eth.h macros under a different name: ETHER_ADDR_LEN -> ETH_ALEN ETH_P_8021Q -> ETH_P_VLAN IP_HEADER_LENGTH -> IP_HDR_GET_LEN TCP_FLAG_FIN -> TH_FIN TCP_FLAG_PUSH -> TH_PUSH Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Message-id: 1438604157-29664-3-git-send-email-stefanha@redhat.com
* | rtl8139: remove duplicate net/eth.h definitionsStefan Hajnoczi2015-09-021-52/+5
|/ | | | | | | | | The transmit offload features inspect Ethernet, IP, TCP, and UDP headers. Avoid redefining these net/eth.h structs. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Message-id: 1438604157-29664-2-git-send-email-stefanha@redhat.com
* xlnx-zynqmp: Connect the four OCM banksAlistair Francis2015-08-251-0/+15
| | | | | | | | | | | The Xilinx EP108 has four separate OCM banks which are located adjacent to each other. This patch adds the four banks to the ZynqMP SoC. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: afa6ba31163a5d541a0bef4b0dc11f2597e0c495.1436813543.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2015-08-186-59/+117
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SCSI fixes from Stefan and Fam * vhost-scsi fix from Igor and Lu Lina * a build system fix from Daniel * two more multi-arch-related patches from Peter C. * TCG patches from myself and Sergey Fedorov * RCU improvement from Wen Congyang * a few more simple cleanups # gpg: Signature made Fri 14 Aug 2015 22:41:52 BST using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: disas: Defeature print_target_address hw: fix mask for ColdFire UART command register scsi-generic: identify AIO callbacks more clearly scsi-disk: identify AIO callbacks more clearly scsi: create restart bottom half in the right AioContext configure: only add CONFIG_RDMA to config-host.h once qemu-nbd: remove unnecessary qemu_notify_event() vhost-scsi: Clarify vhost_virtqueue_mask argument exec: use macro ROUND_UP for alignment rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu() exec: drop cpu_can_do_io, just read cpu->can_do_io cpu_defs: Simplify CPUTLB padding logic cpu-exec: Do not invalidate original TB in cpu_exec_nocache() vhost/scsi: call vhost_dev_cleanup() at unrealize() time virtio-scsi-test: Add test case for tail unaligned WRITE SAME scsi-disk: Fix assertion failure on WRITE SAME tests: virtio-scsi: clear unit attention after reset scsi-disk: fix cmd.mode field typo virtio-scsi: use virtqueue_map_sg() when loading requests Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hw: fix mask for ColdFire UART command registerPaolo Bonzini2015-08-141-1/+1
| | | | | | | | | | | | | | | | | | The "miscellaneous commands" part of the register is 3 bits wide. Spotted by Coverity and confirmed in the datasheet, downloadable from http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf (figure 14-6). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scsi-generic: identify AIO callbacks more clearlyPaolo Bonzini2015-08-141-25/+41
| | | | | | | | | | | | | | | | | | | | | | Functions that are not callbacks should assert that aiocb is NULL and have a SCSIGenericReq argument. AIO callbacks should assert that aiocb is not NULL. They also have an opaque argument. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scsi-disk: identify AIO callbacks more clearlyPaolo Bonzini2015-08-141-30/+61
| | | | | | | | | | | | | | | | | | | | | | Functions that are not callbacks should assert that aiocb is NULL and have a non-opaque argument (usually a pointer to SCSIDiskReq). AIO callbacks should assert that aiocb is not NULL and take care of calling block_acct done. They also have an opaque argument. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scsi: create restart bottom half in the right AioContextPaolo Bonzini2015-08-141-1/+2
| | | | | | | | | | | | | | | | This matches commit 4407c1c (virtio-blk: Schedule BH in the right context, 2014-06-17), which did the same thing for virtio-blk. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * vhost-scsi: Clarify vhost_virtqueue_mask argumentLu Lina2015-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | vhost_virtqueue_mask takes an "absolute" virtqueue index, while the code looks like it's passing an index that is relative to s->dev.vq_index. In reality, s->dev.vq_index is always zero, so this patch does not make any difference, but the code is clearer. Signed-off-by: Lu Lina <lina.lulina@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Message-Id: <1437978359-17960-1-git-send-email-arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * vhost/scsi: call vhost_dev_cleanup() at unrealize() timeIgor Mammedov2015-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vhost-scsi calls vhost_dev_init() at realize() time but forgets to call it's counterpart vhost_dev_cleanup() at unrealize() time. Calling it should fix leaking of memory table and mem_sections table in vhost device. And also unregister vhost's memory listerner to prevent access from memory core to freed memory. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1438262999-287627-1-git-send-email-imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scsi-disk: Fix assertion failure on WRITE SAMEFam Zheng2015-07-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last portion of an unaligned WRITE SAME command could fail the assertion in bdrv_aligned_pwritev: assert(!qiov || bytes == qiov->size); Because we updated data->iov.iov_len right above this if block, but data->qiov still has the old size. Reinitialize the qiov to make them equal and keep block layer happy. Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1438159512-3871-2-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scsi-disk: fix cmd.mode field typoStefan Hajnoczi2015-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The cmd.xfer field is the data length. The cmd.mode field is the data transfer direction. scsi_handle_rw_error() was using the wrong error policy for read requests. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <1438262173-11546-3-git-send-email-stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * virtio-scsi: use virtqueue_map_sg() when loading requestsStefan Hajnoczi2015-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The VirtQueueElement struct is serialized during migration but the in_sg[]/out_sg[] iovec arrays are not usable on the destination host because the pointers are meaningless. Use virtqueue_map_sg() to refresh in_sg[]/out_sg[] to valid pointers based on in_addr[]/out_addr[] hwaddrs. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <1438262173-11546-2-git-send-email-stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into ↵Peter Maydell2015-08-141-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging # gpg: Signature made Fri 14 Aug 2015 16:01:19 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/net-pull-request: tests: test rx recovery from cont tests: introduce basic pci test for virtio-net net/vmxnet3: Fix incorrect debug message Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | net/vmxnet3: Fix incorrect debug messageDana Rubin2015-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Dana Rubin <dana.rubin@ravellosystems.com> In commit 80da311d81, "net/vmxnet3: Fix RX TCP/UDP checksum on partially summed packets" a debug message was introduced in vmxnet3_rx_need_csum_calculate() for an unlikely input condition. The message accidentally printed 'len' variable instead of 'pkt_len'. Fix, providing the correct argument. Signed-off-by: Dana Rubin <dana.rubin@ravellosystems.com> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> Message-id: 1438109090-18957-1-git-send-email-shmulik.ladkani@ravellosystems.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | | Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150813' into stagingPeter Maydell2015-08-131-0/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MIPS patches 2015-08-13 Changes: * mips32r5-generic CPU updated and renamed to P5600 * improvements in LWL/LDL, logging and fulong2e # gpg: Signature made Thu 13 Aug 2015 17:10:59 BST using RSA key ID 0B29DA6B # gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8DD3 2F98 5495 9D66 35D4 4FC0 5211 8E3C 0B29 DA6B * remotes/lalrae/tags/mips-20150813: target-mips: Use CPU_LOG_INT for logging related to interrupts hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accesses target-mips: simplify LWL/LDL mask generation target-mips: update mips32r5-generic into P5600 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accessesPeter Maydell2015-08-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LDMA and COP memory regions represent four 32 bit registers each, but the memory regions themselves are 0x100 bytes large. Add guards to the read and write accessors so that bogus accesses beyond the four defined registers don't just run off the end of the bonldma and boncop structs and into whatever lies beyond. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
* | | | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2015-08-1314-193/+171
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtio,pc,acpi fixes, cleanups Mostly cleanups, notably Eduardo's compat code rework, and smbios rearrangement for use by ARM. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu 13 Aug 2015 12:59:16 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (24 commits) MAINTAINERS: list smbios maintainers smbios: move smbios code into a common folder smbios: remove dependency on x86 e820 tables smbios: extract x86 smbios building code into a function acpi: avoid potential uninitialized access to cpu_hp_io_base virtio-net: remove useless codes pci: allow 0 address for PCI IO/MEM regions pc: Remove redundant arguments from pc_memory_init() pc: Remove redundant arguments from pc_cmos_init() pc: Remove redundant arguments from *load_linux() pc: Use PCMachineState as pc_guest_info_init() argument pc: Move {above,below}_4g_mem_size variables to PCMachineState pc: Use PCMachineState for pc_memory_init() argument pc: Use PCMachineState for pc_cmos_init() argument pc: Eliminate pc_default_machine_options() pc: Eliminate pc_common_machine_options() pc: Move PCMachineClass, PCMachineState to qemu/typedefs.h pc: Rename pc_machine variables to pcms pc: Use error_abort when registering properties target-i386: Remove x86_cpu_compat_set_features() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | | smbios: move smbios code into a common folderWei Huang2015-08-137-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To share smbios among different architectures, this patch moves SMBIOS code (smbios.c and smbios.h) from x86 specific folders into new hw/smbios directories. As a result, CONFIG_SMBIOS=y is defined in x86 default config files. Acked-by: Gabriel Somlo <somlo@cmu.edu> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Wei Huang <wei@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | smbios: remove dependency on x86 e820 tablesWei Huang2015-08-132-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current smbios builds type 19 table from e820, which is x86 specific. This patch removes smbios' dependency on e820 by passing an array of memory area to smbios_get_tables(). Acked-by: Gabriel Somlo <somlo@cmu.edu> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Wei Huang <wei@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | smbios: extract x86 smbios building code into a functionWei Huang2015-08-131-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extracts out the procedure of buidling x86 SMBIOS tables into a dedicated function. Acked-by: Gabriel Somlo <somlo@cmu.edu> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Wei Huang <wei@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | acpi: avoid potential uninitialized access to cpu_hp_io_baseDaniel P. Berrange2015-08-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building QEMU with Mingw64 toolchain I see a warning CC x86_64-softmmu/hw/i386/acpi-build.o hw/i386/acpi-build.c: In function 'acpi_build': hw/i386/acpi-build.c:1138:9: warning: 'pm.cpu_hp_io_base' may be used uninitialized in this function [-Wmaybe-uninitialized] aml_append(crs, ^ hw/i386/acpi-build.c:1666:16: note: 'pm.cpu_hp_io_base' was declared here AcpiPmInfo pm; ^ In acpi_get_pm_info() some of the fields are pre-initialized to 0, but this one was missed. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
| * | | | virtio-net: remove useless codesJason Wang2015-08-131-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 40bad8f3deba15e2074ff34cfe923c12916b1cc5("virtio-net: fix used len for tx"), async_tx.len was no longer used afterwards. So remove useless codes with it. Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pci: allow 0 address for PCI IO/MEM regionsLaurent Vivier2015-08-132-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some kernels program a 0 address for io regions. PCI 3.0 spec section 6.2.5.1 doesn't seem to disallow this. based on patch by Michael Roth <mdroth@linux.vnet.ibm.com> Add pci_allow_0_addr in MachineClass to conditionally allow addr 0 for pseries, as this can break other architectures. This patch allows to hotplug PCI card in pseries machine, as the first added card BAR0 is always set to 0 address. This as a temporary hack, waiting to fix PCI memory priorities for more machine types... Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Remove redundant arguments from pc_memory_init()Eduardo Habkost2015-08-133-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove arguments that can be found in PCMachineState. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Remove redundant arguments from pc_cmos_init()Eduardo Habkost2015-08-133-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove arguments that can be found in PCMachineState. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Remove redundant arguments from *load_linux()Eduardo Habkost2015-08-132-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove arguments that can be found in PCMachineState. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Use PCMachineState as pc_guest_info_init() argumentEduardo Habkost2015-08-133-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Move {above,below}_4g_mem_size variables to PCMachineStateEduardo Habkost2015-08-132-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make the info readily available for the other initialization functions, and will allow us to simplify their argument list. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Use PCMachineState for pc_memory_init() argumentEduardo Habkost2015-08-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc_memory_init() already expects a PCMachineState object, there's no point in upcasting it to MachineState before calling the function. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Use PCMachineState for pc_cmos_init() argumentEduardo Habkost2015-08-133-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc_cmos_init() already expects a PCMachineState object, there's no point in upcasting it to MachineState before calling the function. While doing it, reorder the arguments so PCMachineState is the first function argument. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Eliminate pc_default_machine_options()Eduardo Habkost2015-08-133-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only PC machines that didn't call pc_default_machine_options() were isaps and xenfv. Both were already overwriting max_cpus, and only isapc was not overwriting hot_add_cpu. After making isapc set hot_add_cpu to NULL, we can move the pc_default_machine_options() code the PC common class_init. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Eliminate pc_common_machine_options()Eduardo Habkost2015-08-132-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All TYPE_PC_MACHINE subclasses call pc_common_machine_options(). TYPE_PC_MACHINE can simply initialize the common options on class_init directly. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Rename pc_machine variables to pcmsEduardo Habkost2015-08-133-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the code use the same variable name everywhere. "pcms" is already being used in existing code and it's shorter. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Use error_abort when registering propertiesEduardo Habkost2015-08-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No errors should happen when registering the properties, but we shouldn't silently ignore them if they happen. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | | pc: Use PC_COMPAT_* for CPUID feature compatibilityEduardo Habkost2015-08-132-44/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can use compat_props to keep CPUID feature compatibility, using the boolean QOM properties for CPUID feature flags. This simplifies the compatibility code, and reduces duplication between pc_piix.c and pc_q35.c. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud