Commits
q35-iommu-v2
Name already in use
Commits on Jul 27, 2014
-
intel-iommu: add dev_to_context_entry()
Add dev_to_context_entry() to map a device to its corresponding domain. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: split intel_iommu.h into two files
include/hw/i386/intel_iommu.h contains definitions that will be used by q35 or acpi. hw/i386/intel_iommu_internal.h contains definitions that just be used by hw/i386/intel_iommu.c. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: clear up codes and remove assert() to check dma_memory_r…
…ead() Don't use assert() to check the return value of dma_memory_read() because this should be part of the fault reporting need to be fixed in future. Signed-off-by: Le Tan <tamlokveer@gmail.com>
Commits on Jul 26, 2014
-
intel-iommu: fix the format argument of VTD_DPRINTF()
This is induced by changing DMAR_FRCD_REG_NR to 1ULL. Signed-off-by: Le Tan <tamlokveer@gmail.com>
Commits on Jul 25, 2014
-
intel-iommu: add VTD_ASSERT() macro
Add VTD_ASSERT() macro to make an assertion when SAFE_CHECK_INTEL_IOMMU is defined. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: use ldl_le_p()/stl_le_p() and ldq_le_p()/stq_le_p() to a…
…ccess CSRs Use endian-save accessors to access CSRs. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: rename struct vtd_root_entry and vtd_context_entry
Rename two struct: vtd_root_entry -> VTDRootEntry vtd_context_entry -> VTDContextEntry Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: rename constant definitions with consistent prefix
Rename some constant definitions with consistent prefix VTD_. Remove unused constant definitions. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: use assert() to check the return value of dma_memory_read()
Use assert() to check dma_memory_read() rather than print some warning and return invalid value, since we can do nothing more than aobrt if dma_memory_read() fail. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: rename some CSRs access functions
Rename some CSRs access funcionts: __get_quad() -> get_quad_raw() __get_long() -> get_long_raw() set_mask_quad() -> set_claer_mask_quad() set_mask_long() -> set_clear_mask_long() Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: change D() to VTD_DPRINTF() and delete some dead code
Chang D() to VTD_DPRINTF() to avoid polluting the global namespace. Delete some dead code which has been commented out before. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: change the copyright information.
Change the copyright information of intel_iommu.c and intel_iommu.h to standard form used in QEMU. Signed-off-by: Le Tan <tamlokveer@gmail.com>
Commits on Jul 22, 2014
-
intel-iommu: add Intel IOMMU emulation to q35 and add a machine optio…
…n "vtd" as a switch Add Intel IOMMU emulation to q35 chipset and expose it to the guest. 1. Add a machine option. Users can use "-machine vtd=on|off" in the command line to enable/disable Intel IOMMU. The default is off. 2. Accroding to the machine option, q35 will initialize the Intel IOMMU and use pci_setup_iommu() to setup q35_host_dma_iommu() as the IOMMU function for the pci bus. 3. q35_host_dma_iommu() will return different address space according to the bus_num and devfn of the device. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: add DMAR table to ACPI tables
Expose Intel IOMMU to the BIOS. If object of TYPE_INTEL_IOMMU_DEVICE exists, add DMAR table to ACPI RSDT table. For now the DMAR table indicates that there is only one hardware unit without INTR_REMAP capability on the platform. Signed-off-by: Le Tan <tamlokveer@gmail.com>
-
intel-iommu: introduce Intel IOMMU (VT-d) emulation
Add support for emulating Intel IOMMU according to the VT-d specification for the q35 chipset machine. Implement the logic for DMAR (DMA remapping) without PASID support. Use register-based invalidation for context-cache invalidation and IOTLB invalidation. Basic fault reporting and caching are not implemented yet. Signed-off-by: Le Tan <tamlokveer@gmail.com>
Commits on Jul 18, 2014
-
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into…
… staging Andreas's fixes to --enable-modules, two 2.1 regression fixes, and a new qtest. Michael sent a pull request of his own, so I dropped the vhost changes. # gpg: Signature made Fri 18 Jul 2014 14:30:34 BST using RSA key ID 9B4D86F2 # gpg: Can't check signature: public key not found * remotes/bonzini/tags/for-upstream: Revert "kvmclock: Ensure time in migration never goes backward" Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation" module: Don't complain when a module is absent module: Simplify module_load() qtest: new test for wdt_ib700 target-i386: Allow execute from user mode when SMEP is enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
Revert "kvmclock: Ensure time in migration never goes backward"
This reverts commit a096b3a. This patch caused a hang that was fixed by commit 9b17868 (kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation, 2014-06-03), and we just had to revert that commit. Drop this one too. Cc: agraf@suse.de Cc: mtosatti@redhat.com Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_n…
…sec calculation" This reverts commit 9b17868. This patch fixed a hang introduced by commit a096b3a (kvmclock: Ensure time in migration never goes backward, 2014-05-16), but it causes a regression in migration whose cause is not quite clear. Because of this, I'm choosing to revert both patches. This trades a 2.1 regression for a bug that's been there forever. Cc: agraf@suse.de Cc: mtosatti@redhat.com Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
module: Don't complain when a module is absent
The current implementation depends on a configure-time generated list of block modules. When any of them is absent, module_load() emits a warning. This is suboptimal because extracting code to modules was mainly done to allow separate packaging of modules with intrusive dependencies. Absence of optional packages then leads to absence of modules and an error message, which users may recognize as new and report as error. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
module: Simplify module_load()
The file path is not used for error reporting, so we can free it directly after use. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
Since the "pause" watchdog action had a regression and it went unnoticed for a while, let's add a test for it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-reques…
…t' into staging Block pull request # gpg: Signature made Fri 18 Jul 2014 13:39:43 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/block-pull-request: qemu-iotests: fix 028 failure due to disk image path raw-posix: Fail gracefully if no working alignment is found block: Add Error argument to bdrv_refresh_limits() qcow2: Fix error path for unknown incompatible features Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
qemu-iotests: fix 028 failure due to disk image path
The disk image path is echoed by QEMU's readline when the "drive_backup disk ${TEST_IMG}.copy" HMP command is issued. Unfortunately it is very hard to filter out the path due to readline's character-by-character output (with terminal escape sequences). Just redirect this command to /dev/null for now. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>Stefan Hajnoczi committedJul 18, 2014 -
raw-posix: Fail gracefully if no working alignment is found
If qemu couldn't find out what O_DIRECT alignment to use with a given file, it would run into assert(bdrv_opt_mem_align(bs) != 0); in block.c and confuse users. This adds a more descriptive error message for such cases. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf authored and Stefan Hajnoczi committedJul 18, 2014 -
block: Add Error argument to bdrv_refresh_limits()
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf authored and Stefan Hajnoczi committedJul 18, 2014 -
qcow2: Fix error path for unknown incompatible features
qcow2's report_unsupported_feature() had two bugs: A 32 bit truncation would prevent feature table entries for bits 32-63 from being used, and it could assign errp multiple times if there was more than one unknown feature, resulting in an error_set() assertion failure. Fix the truncation, make sure to set the error exactly once and add a qemu-iotests case for it. This fixes https://bugs.launchpad.net/qemu/+bug/1342704/ Reported-by: Maria Kustova <maria.k@catit.be> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Kevin Wolf authored and Stefan Hajnoczi committedJul 18, 2014 -
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into sta…
…ging pc,vhost,test fixes Minor bugfixes all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 18 Jul 2014 00:43:04 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: vhost-user: minor cleanups qtest: Adapt vhost-user-test to latest vhost-user changes vhost-user: Fix VHOST_SET_MEM_TABLE processing qtest: fix vhost-user-test compilation with old GLib fix typo: apci -> acpi pc_piix: Reuse pc_compat_1_2() for pc-0.1[0123] pc: fix qemu exiting with error when -m X < 128 with old machines types Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Commits on Jul 17, 2014
-
assert to verify cast does not discard information minor style fixup. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
qtest: Adapt vhost-user-test to latest vhost-user changes
A new field mmap_offset was added in the vhost-user message, we need to reflect this change in the test too. Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
vhost-user: Fix VHOST_SET_MEM_TABLE processing
qemu_get_ram_fd doesn't accept a guest physical address. ram_addr_t are opaque values that are assigned in qemu_ram_alloc. Find the ram_addr_t corresponding to the userspace_addr using qemu_ram_addr_from_host, and then call qemu_get_ram_fd on it. Thanks to Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
-
pc: fix qemu exiting with error when -m X < 128 with old machine types
If machine doesn't support memory hotplug then starting QEMU with initial memory less than default will make QEMU exit with following error message: $QEMU -m 16 -M isapc qemu-system-i386: "-memory 'slots|maxmem'" is not supported by: isapc Set maxram_size to initial memory value before parsing 'maxmem' option allows to keep maxmem in sync with initial memory size if no maxmem option was specified. Signed-off-by: Igor Mammedov <imammedo@redhat.com> CC: Bruce Rogers <brogers@suse.com> Reviewed-By: Bruce Rogers <brogers@suse.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
cadence_uart: check for serial backend before using it.
This checks that s->chr is not NULL before using it. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
Merge remote-tracking branch 'remotes/amit-migration/for-2.1' into st…
…aging * remotes/amit-migration/for-2.1: vmstate static checker: detect section renames Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
Merge remote-tracking branch 'remotes/amit/for-2.1' into staging
* remotes/amit/for-2.1: virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Commits on Jul 16, 2014
-
virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug
We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started without a virtio-console port, port #0 is kept aside. However, after a virtconsole port is unplugged, port id 0 became available, and the next hotplug of a virtserialport caused failure due to it not being a console port. Steps to reproduce: $ ./x86_64-softmmu/qemu-system-x86_64 -m 512 -cpu host -enable-kvm -device virtio-serial-pci -monitor stdio -vnc :1 QEMU 2.0.91 monitor - type 'help' for more information (qemu) device_add virtconsole,id=p1 (qemu) device_del p1 (qemu) device_add virtserialport,id=p1 Port number 0 on virtio-serial devices reserved for virtconsole devices for backward compatibility. Device 'virtserialport' could not be initialized (qemu) quit Reported-by: dengmin <mdeng@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Amit Shah committedJul 16, 2014