* [Qemu-devel] [PULL 0/3] pc, virtio: fixes
@ 2018-07-02 23:48 Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 1/3] hw/i386: Fix IVHD entry length for AMD IOMMU Michael S. Tsirkin
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-07-02 23:48 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
----------------------------------------------------------------
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(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 1/3] hw/i386: Fix IVHD entry length for AMD IOMMU
2018-07-02 23:48 [Qemu-devel] [PULL 0/3] pc, virtio: fixes Michael S. Tsirkin
@ 2018-07-02 23:48 ` Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 2/3] hw/i386: Fix AMDVI GATS and HATS encodings Michael S. Tsirkin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-07-02 23:48 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Jan Kiszka, Igor Mammedov, Marcel Apfelbaum,
Paolo Bonzini, Richard Henderson, Eduardo Habkost
From: Jan Kiszka <jan.kiszka@siemens.com>
Counting from the IVHD ID field to the all-devices entry, we have 28
bytes, not 36.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 9bc6d97ea1..fff1059a31 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -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 */
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 2/3] hw/i386: Fix AMDVI GATS and HATS encodings
2018-07-02 23:48 [Qemu-devel] [PULL 0/3] pc, virtio: fixes Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 1/3] hw/i386: Fix IVHD entry length for AMD IOMMU Michael S. Tsirkin
@ 2018-07-02 23:48 ` Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 3/3] virtio-rng: process pending requests on DRIVER_OK Michael S. Tsirkin
2018-07-03 9:46 ` [Qemu-devel] [PULL 0/3] pc, virtio: fixes Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-07-02 23:48 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Jan Kiszka, Marcel Apfelbaum, Paolo Bonzini,
Richard Henderson, Eduardo Habkost
From: Jan Kiszka <jan.kiszka@siemens.com>
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).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/amd_iommu.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h
index aeef802364..874030582d 100644
--- a/hw/i386/amd_iommu.h
+++ b/hw/i386/amd_iommu.h
@@ -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
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 3/3] virtio-rng: process pending requests on DRIVER_OK
2018-07-02 23:48 [Qemu-devel] [PULL 0/3] pc, virtio: fixes Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 1/3] hw/i386: Fix IVHD entry length for AMD IOMMU Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 2/3] hw/i386: Fix AMDVI GATS and HATS encodings Michael S. Tsirkin
@ 2018-07-02 23:48 ` Michael S. Tsirkin
2018-07-03 9:46 ` [Qemu-devel] [PULL 0/3] pc, virtio: fixes Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-07-02 23:48 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Pankaj Gupta, qemu-stable, Sergio lopez,
Stefan Hajnoczi, Amit Shah
From: Pankaj Gupta <pagupta@redhat.com>
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'.
CC: qemu-stable@nongnu.org
Reported-by: Sergio lopez <slopezpa@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/virtio-rng.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 289bbcac03..855f1b41d1 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -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 = {
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] pc, virtio: fixes
2018-07-02 23:48 [Qemu-devel] [PULL 0/3] pc, virtio: fixes Michael S. Tsirkin
` (2 preceding siblings ...)
2018-07-02 23:48 ` [Qemu-devel] [PULL 3/3] virtio-rng: process pending requests on DRIVER_OK Michael S. Tsirkin
@ 2018-07-03 9:46 ` Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2018-07-03 9:46 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: QEMU Developers
On 3 July 2018 at 00:48, Michael S. Tsirkin <mst@redhat.com> wrote:
> 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.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-03 9:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-02 23:48 [Qemu-devel] [PULL 0/3] pc, virtio: fixes Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 1/3] hw/i386: Fix IVHD entry length for AMD IOMMU Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 2/3] hw/i386: Fix AMDVI GATS and HATS encodings Michael S. Tsirkin
2018-07-02 23:48 ` [Qemu-devel] [PULL 3/3] virtio-rng: process pending requests on DRIVER_OK Michael S. Tsirkin
2018-07-03 9:46 ` [Qemu-devel] [PULL 0/3] pc, virtio: fixes Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).