|
|
9ae3a8 |
From c5760d0c0f29b8ae540b3ca553f461874447c32f Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 6 Nov 2013 16:32:32 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 73/81] pvpanic: fix fwcfg for big endian hosts
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1383755557-21590-5-git-send-email-marcel.a@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55549
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH v3 4/9] pvpanic: fix fwcfg for big endian hosts
|
|
|
9ae3a8 |
Bugzilla: 990601
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Convert port number to little endian when
|
|
|
9ae3a8 |
exposing it in fw cfg.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit fea7d5966a54a5e5400cd38897a95ea576b5af4d)
|
|
|
9ae3a8 |
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/misc/pvpanic.c | 7 ++++---
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/misc/pvpanic.c | 7 ++++---
|
|
|
9ae3a8 |
1 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
|
|
|
9ae3a8 |
index 8263225..1aab787 100644
|
|
|
9ae3a8 |
--- a/hw/misc/pvpanic.c
|
|
|
9ae3a8 |
+++ b/hw/misc/pvpanic.c
|
|
|
9ae3a8 |
@@ -99,10 +99,11 @@ static int pvpanic_isa_initfn(ISADevice *dev)
|
|
|
9ae3a8 |
static void pvpanic_fw_cfg(ISADevice *dev, FWCfgState *fw_cfg)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
PVPanicState *s = ISA_PVPANIC_DEVICE(dev);
|
|
|
9ae3a8 |
+ uint16_t *pvpanic_port = g_malloc(sizeof(*pvpanic_port));
|
|
|
9ae3a8 |
+ *pvpanic_port = cpu_to_le16(s->ioport);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- fw_cfg_add_file(fw_cfg, "etc/pvpanic-port",
|
|
|
9ae3a8 |
- g_memdup(&s->ioport, sizeof(s->ioport)),
|
|
|
9ae3a8 |
- sizeof(s->ioport));
|
|
|
9ae3a8 |
+ fw_cfg_add_file(fw_cfg, "etc/pvpanic-port", pvpanic_port,
|
|
|
9ae3a8 |
+ sizeof(*pvpanic_port));
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
void pvpanic_init(ISABus *bus)
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|