- 10 1月, 2017 22 次提交
-
-
由 Yuri Benditovich 提交于
Add procedure for fast drop of queued packets, acting like pop and push without mapping the buffers into memory. Signed-off-by: NYuri Benditovich <yuri.benditovich@daynix.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Yuri Benditovich 提交于
Make virtio queue suitable for push operation from qemu after vhost was stopped. Signed-off-by: NYuri Benditovich <yuri.benditovich@daynix.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Yuri Benditovich 提交于
Bring virtio queue to correct internal state for host-to-guest operations when vhost is temporary stopped. Signed-off-by: NYuri Benditovich <yuri.benditovich@daynix.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
A broken guest can specify physical addresses that correspond to any memory region, but it shouldn't be able to change ROM. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Cc: qemu-stable@nongnu.org Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Halil Pasic 提交于
Correct recalculation of vq->inuse after migration for the corner case where the avail_idx has already wrapped but used_idx not yet. Also change the type of the VirtQueue.inuse to unsigned int. This is done to be consistent with other members representing sizes (VRing.num), and because C99 guarantees max ring size < UINT_MAX but does not guarantee max ring size < INT_MAX. Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com> Fixes: bccdef6b ("virtio: recalculate vq->inuse after migration") CC: qemu-stable@nongnu.org Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Dou Liyang 提交于
Now, AER capa version is fixed to v2, if assigned device isn't v2, then this value will be inconsistent between guest and host Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com> Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Cao jin 提交于
When user specify invalid value for property aer_log_max, device should fail to create, and report appropriate message. Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com> Acked-by: NDmitry Fleytman <dmitry@daynix.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
Common practice with sensitive information (key material, passwords, etc). Prevents sensitive information from being exposed by accident later in coredumps, memory disclosure bugs when heap memory is reused, etc. Sensitive information is sometimes also held in mlocked pages to prevent it being swapped to disk but that's not being done here. Let's zeroize the memory of CryptoDevBackendSymOpInfo structure pointed for key material security. [Thanks to Stefan for help with crafting the commit message] Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
After resolving the relationship with cryptodev backend, the virtio crypto device supports hotplug now. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
Add the check condition for cryptodev device in order to avoid one cryptodev device is used by multiple virtio crypto devices. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
We must assure each virtio crypto pci device has an vaild cryptodev backend object. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
The ready flag should be set by the children of cryptodev backend interface. Warp the setter/getter functions for it. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
This property is used to Tag the cryptodev backend is used by virtio-crypto or not. Making cryptodev can't be hot unplugged when it's in use. Cleanup resources when cryptodev is finalized. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
In some modes of cipher algorithms, the length of destination data maybe larger then source data, such as ciphertext stealing (CTS). For symmetric algorithms, the length of ciphertext is definitly equal to the plaintext for each crypto operation. So we should use the src_len instead of dst_len avoid to pass the incorrect cryptographical results to the frontend driver. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
This patch provides ATSR which was a requirement for software that wants to enable ATS on endpoint devices behind a Root Port. This is done simply by setting ALL_PORTS which indicates all PCI-Express Root Ports support ATS transactions. Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
This patches enable the Address Translation Service support for virtio pci devices. This is needed for a guest visible Device IOTLB implementation and will be required by vhost device IOTLB API implementation for intel IOMMU. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
This patch enables device IOTLB support for intel iommu. The major work is to implement QI device IOTLB descriptor processing and notify the device through iommu notifier. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com>
-
由 Jason Wang 提交于
We use the pointer to stack for key for new address space, this will break hash table searching, fixing by g_malloc() a new key instead. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Acked-by: NPeter Xu <peterx@redhat.com> Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
To avoid duplicated name and ease debugging. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Acked-by: NPeter Xu <peterx@redhat.com> Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
Currently, all virtio devices bypass IOMMU completely. This is because address_space_memory is assumed and used during DMA emulation. This patch converts the virtio core API to use DMA API. This idea is - introducing a new transport specific helper to query the dma address space. (only pci version is implemented). - query and use this address space during virtio device guest memory accessing when iommu platform (VIRTIO_F_IOMMU_PLATFORM) was enabled for this device. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Amit Shah <amit.shah@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Gonglei 提交于
Because the 'size_t' type is 4 bytes in 32-bit platform, which is the same with 'int'. It's easy to make 'max_len' to zero when integer overflow and then cause heap overflow if 'max_len' is zero. Using uint_64 instead of size_t to avoid the integer overflow. Cc: qemu-stable@nongnu.org Reported-by: NLi Qiang <liqiang6-s@360.cn> Signed-off-by: NGonglei <arei.gonglei@huawei.com> Tested-by: NLi Qiang <liqiang6-s@360.cn> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Peter Xu 提交于
IOMMU needs to be migrated before all the PCI devices (in case there are devices that will request for address translation). So marking it with a priority higher than the default (which PCI devices and other belong). Migration framework handled the rest. Signed-off-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 09 1月, 2017 18 次提交
-
-
由 Jean-Christophe Dubois 提交于
From the documentation it is not clear what this SPI register is about. Moreover, neither linux driver nor xvisor driver are using this SPI register. For now we just remove it and issue a log on register write access. Signed-off-by: NJean-Christophe Dubois <jcd@tribudubois.net> Message-id: 20170107122047.26300-1-jcd@tribudubois.net Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Jean-Christophe Dubois 提交于
In normal operation we should never attempt to put more data into the data[] array than it can hold. However if the SPI controller connected to us misbehaves then it can send us a sequence of commands that attempt this. Since the controller might be in the guest (if the hardware does SPI via bit-banging), catch the possible overrun conditions and reset the flash internal state, logging them as guest errors. Signed-off-by: NJean-Christophe Dubois <jcd@tribudubois.net> Message-id: 20170107111631.24444-1-jcd@tribudubois.net Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> [PMM: rewrote commit message to be more exact about when this can happen] Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
This is the ACPI equivalent to "hw/arm/virt: Don't incorrectly claim architectural timer to be edge-triggered" which fixes the DT for machine types 2.9 and later. Signed-off-by: NAndrew Jones <drjones@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-15-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
by moving VirtGuestInfo.fw_cfg to VirtMachineState. This is the mach-virt equivalent of "pc: Move PcGuestInfo.fw_cfg to PCMachineState" and "pc: Eliminate PcGuestInfo struct" combined. Signed-off-by: NAndrew Jones <drjones@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-14-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
We can get to VirtMachineState without the need for saving a pointer on AcpiBuildState. This is the mach-virt equivalent to "acpi: Don't save PcGuestInfo on AcpiBuildState" Signed-off-by: NAndrew Jones <drjones@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-13-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Now that we pass VirtMachineState, and guest-info is just part of that state, we can remove all the redundant members and access the VirtMachineState directly. Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-12-drjones@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Only two functions take VirtGuestInfo parameters. Now that guest-info is part of VirtMachineState, and VirtMachineState is defined in the virt header, pass that instead. Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-11-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
In preparation to share more Virt machine state than just guest-info with other mach-virt source files, move the State and Class structures to virt.h Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-10-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
include/hw/arm/virt-acpi-build.h is only used for VirtGuestInfo, which doesn't even necessarily have to be ACPI specific. Move VirtGuestInfo to include/hw/arm/virt.h, allowing us to remove include/hw/arm/virt-acpi-build.h, and to prepare for even more code motion. Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-9-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Instead of allocating a new struct just for VirtGuestInfo and the machine_done Notifier, place them inside VirtMachineState. This is the mach-virt equivalent of "pc: Eliminate struct PcGuestInfoState" Suggested-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-8-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
machvirt_init may need to probe for the gic version. If so, then make sure the result is written to VirtMachineState. With the state up to date, use it instead of a local variable. This is a cleanup that prepares for VirtMachineState to be passed to functions even outside hw/arm/virt.c Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-7-drjones@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Some simple cleanups made possible by "hw/arm/virt: Merge VirtBoardInfo and VirtMachineState" Signed-off-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20170102200153.28864-6-drjones@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Signed-off-by: NAndrew Jones <drjones@redhat.com> Message-id: 20170102200153.28864-5-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Also remove all unused flags. Signed-off-by: NAndrew Jones <drjones@redhat.com> Message-id: 20170102200153.28864-4-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Also move the enabled flag definition from mach-virt code to acpi common. Signed-off-by: NAndrew Jones <drjones@redhat.com> Message-id: 20170102200153.28864-3-drjones@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andrew Jones 提交于
Signed-off-by: NAndrew Jones <drjones@redhat.com> Message-id: 20170102200153.28864-2-drjones@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
The architectural timers in ARM CPUs all have level triggered interrupts (unless you're using KVM on a host kernel before 4.4, which misimplemented them as edge-triggered). We were incorrectly describing them in the device tree as edge triggered. This can cause problems for guest kernels in 4.8 before rc6: * pre-4.8 kernels ignore the values in the DT * 4.8 before rc6 write the DT values to the GIC config registers * newer than rc6 ignore the DT and insist that the timer interrupts are level triggered regardless Fix the DT so we're describing reality. For backwards-compatibility purposes, only do this for the virt-2.9 machine onward. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NAndrew Jones <drjones@redhat.com>
-
由 Peter Maydell 提交于
Rename all the variables which used to be VirtBoardInfo* and are now VirtMachineState* so their names are in line with the type being used. Apart from the removal of the line 'VirtMachineState *vbi = vms;' this commit is purely a search-and-replace of 'vbi' with 'vms'. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NAndrew Jones <drjones@redhat.com>
-