pc, virtio: fixes
[Qemu-devel] [PULL 1/3] hw/i386: Fix IVHD entry length for AMD IOMMU
In reply to Michael S. TsirkinFrom: Jan Kiszka <[email protected]>
Counting from the IVHD ID field to the all-devices entry, we have 28 bytes, not 36.
--- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/acpi-build.c +1 -1
@@ -2537,7 +2537,7 @@ build_amd_iommu(GArray *table_data, BIOSLinker *linker) (1UL <<7 ),/* PPRSup */ 1);/* IVHD length */ -build_append_int_noprefix (table_data,0x24 ,2 ); +build_append_int_noprefix (table_data,28 ,2 );/* DeviceID */ build_append_int_noprefix (table_data, s->devid,2 );/* Capability offset */
Signature · 1 line
MST
[Qemu-devel] [PULL 2/3] hw/i386: Fix AMDVI GATS and HATS encodings
In reply to Michael S. TsirkinFrom: Jan Kiszka <[email protected]>
We support up to 6 levels, but those are encoded as 10b according to the AMD IOMMU spec (chapter 3.3.1, Extended Feature Register).
--- hw/i386/amd_iommu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/amd_iommu.h +2 -2
@@ -165,8 +165,8 @@#define AMDVI_DTE_UPPER_QUAD_RESERVED 0x08f0000000000000/* AMDVI paging mode */ -#define AMDVI_GATS_MODE (6ULL << 12) -#define AMDVI_HATS_MODE (6ULL << 10) +#define AMDVI_GATS_MODE (2ULL << 12) +#define AMDVI_HATS_MODE (2ULL << 10)/* IOTLB */ #define AMDVI_IOTLB_MAX_SIZE 1024
Signature · 1 line
MST
[Qemu-devel] [PULL 3/3] virtio-rng: process pending requests on DRIVER_OK
In reply to Michael S. TsirkinFrom: Pankaj Gupta <[email protected]>
virtio-rng device causes old guest kernels(2.6.32) to hang on latest qemu. The driver attempts to read from the virtio-rng device too early in it's initialization. Qemu detects guest is not ready and returns, resulting in hang.
To fix handle pending requests when guest is running and driver status is set to 'VIRTIO_CONFIG_S_DRIVER_OK'.
--- hw/virtio/virtio-rng.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
hw/virtio/virtio-rng.c +14 -0
@@ -156,6 +156,19 @@ static void check_rate_limit(void *opaque) vrng->activate_timer = true; } +static void virtio_rng_set_status (VirtIODevice *vdev,uint8_t status) +{ +VirtIORNG *vrng =VIRTIO_RNG (vdev); + +if (!vdev->vm_running) { +return ; + } + vdev->status = status; + +/* Something changed, try to process buffers */ +virtio_rng_process (vrng); +} +static void virtio_rng_device_realize (DeviceState *dev,Error **errp) {VirtIODevice *vdev =VIRTIO_DEVICE (dev);
@@ -261,6 +274,7 @@ static void virtio_rng_class_init(ObjectClass *klass, void *data) vdc->realize = virtio_rng_device_realize; vdc->unrealize = virtio_rng_device_unrealize; vdc->get_features = get_features; + vdc->set_status = virtio_rng_set_status; }static const TypeInfo virtio_rng_info = {
Signature · 1 line
MST
The following changes since commit 00928a421d47f49691cace1207481b7aad31b1f1:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180626' into staging (2018-06-26 18:23:49 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
for you to fetch changes up to 5d9c9ea22ab4f3b3ee497523e34b6f4d3281f62d:
virtio-rng: process pending requests on DRIVER_OK (2018-06-28 04:46:16 +0300)
----------------------------------------------------------------
pc, virtio: fixes
A couple of fixes to amd iommu, and a fix to virtio iommu.
----------------------------------------------------------------
Jan Kiszka (2):
hw/i386: Fix IVHD entry length for AMD IOMMU hw/i386: Fix AMDVI GATS and HATS encodings
Pankaj Gupta (1):
virtio-rng: process pending requests on DRIVER_OK
hw/i386/amd_iommu.h | 4 ++-- hw/i386/acpi-build.c | 2 +- hw/virtio/virtio-rng.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-)
Peter Maydell
AppliedQuoted 10 lines · Michael S. Tsirkin
The following changes since commit
00928a421d47f49691cace1207481b7aad31b1f1:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180626' into staging (2018-06-26 18:23:49 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.gittags/for_upstreamfor you to fetch changes up to
5d9c9ea22ab4f3b3ee497523e34b6f4d3281f62d:
Quoted 9 lines
virtio-rng: process pending requests on
DRIVER_OK(2018-06-28 04:46:16 +0300)----------------------------------------------------------------
pc, virtio: fixesA couple of fixes to amd iommu, and a fix to virtio iommu.
Signed-off-by Michael S. Tsirkin <[email protected]>
Applied, thanks.
-- PMM