[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 30/47] Revert "x86: use typedef for SetupData struct"
From: |
Michael Tokarev |
Subject: |
[PATCH 30/47] Revert "x86: use typedef for SetupData struct" |
Date: |
Wed, 8 Mar 2023 19:57:33 +0300 |
From: "Michael S. Tsirkin" <mst@redhat.com>
This reverts commit eebb38a5633a77f5fa79d6486d5b2fcf8fbe3c07.
Fixes: eebb38a563 ("x86: use typedef for SetupData struct")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Dov Murik <dovmurik@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit ea96a784773259d469f3f2465f09e04eabb80a66)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/i386/x86.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 32f37ab7c2..76b12108b4 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -657,12 +657,12 @@ DeviceState *ioapic_init_secondary(GSIState *gsi_state)
return dev;
}
-typedef struct SetupData {
+struct setup_data {
uint64_t next;
uint32_t type;
uint32_t len;
uint8_t data[];
-} __attribute__((packed)) SetupData;
+} __attribute__((packed));
/*
@@ -803,7 +803,7 @@ void x86_load_linux(X86MachineState *x86ms,
FILE *f;
char *vmode;
MachineState *machine = MACHINE(x86ms);
- SetupData *setup_data;
+ struct setup_data *setup_data;
const char *kernel_filename = machine->kernel_filename;
const char *initrd_filename = machine->initrd_filename;
const char *dtb_filename = machine->dtb;
@@ -1086,11 +1086,11 @@ void x86_load_linux(X86MachineState *x86ms,
}
setup_data_offset = QEMU_ALIGN_UP(kernel_size, 16);
- kernel_size = setup_data_offset + sizeof(SetupData) + dtb_size;
+ kernel_size = setup_data_offset + sizeof(struct setup_data) + dtb_size;
kernel = g_realloc(kernel, kernel_size);
- setup_data = (SetupData *)(kernel + setup_data_offset);
+ setup_data = (struct setup_data *)(kernel + setup_data_offset);
setup_data->next = cpu_to_le64(first_setup_data);
first_setup_data = prot_addr + setup_data_offset;
setup_data->type = cpu_to_le32(SETUP_DTB);
@@ -1101,9 +1101,9 @@ void x86_load_linux(X86MachineState *x86ms,
if (!legacy_no_rng_seed) {
setup_data_offset = QEMU_ALIGN_UP(kernel_size, 16);
- kernel_size = setup_data_offset + sizeof(SetupData) + RNG_SEED_LENGTH;
+ kernel_size = setup_data_offset + sizeof(struct setup_data) +
RNG_SEED_LENGTH;
kernel = g_realloc(kernel, kernel_size);
- setup_data = (SetupData *)(kernel + setup_data_offset);
+ setup_data = (struct setup_data *)(kernel + setup_data_offset);
setup_data->next = cpu_to_le64(first_setup_data);
first_setup_data = prot_addr + setup_data_offset;
setup_data->type = cpu_to_le32(SETUP_RNG_SEED);
--
2.30.2
- [PATCH 21/47] target/i386: Fix BEXTR instruction, (continued)
- [PATCH 21/47] target/i386: Fix BEXTR instruction, Michael Tokarev, 2023/03/08
- [PATCH 23/47] target/i386: fix ADOX followed by ADCX, Michael Tokarev, 2023/03/08
- [PATCH 26/47] hw/smbios: fix field corruption in type 4 table, Michael Tokarev, 2023/03/08
- [PATCH 25/47] block/iscsi: fix double-free on BUSY or similar statuses, Michael Tokarev, 2023/03/08
- [PATCH 27/47] Revert "x86: do not re-randomize RNG seed on snapshot load", Michael Tokarev, 2023/03/08
- [PATCH 32/47] Revert "hw/i386: pass RNG seed via setup_data entry", Michael Tokarev, 2023/03/08
- [PATCH 28/47] Revert "x86: re-initialize RNG seed when selecting kernel", Michael Tokarev, 2023/03/08
- [PATCH 29/47] Revert "x86: reinitialize RNG seed on system reboot", Michael Tokarev, 2023/03/08
- [PATCH 33/47] vhost-user-gpio: Configure vhost_dev when connecting, Michael Tokarev, 2023/03/08
- [PATCH 31/47] Revert "x86: return modified setup_data only if read as memory, not as file", Michael Tokarev, 2023/03/08
- [PATCH 30/47] Revert "x86: use typedef for SetupData struct",
Michael Tokarev <=
- [PATCH 34/47] vhost-user-i2c: Back up vqs before cleaning up vhost_dev, Michael Tokarev, 2023/03/08
- [PATCH 41/47] libvhost-user: check for NULL when allocating a virtqueue element, Michael Tokarev, 2023/03/08
- [PATCH 42/47] chardev/char-socket: set s->listener = NULL in char_socket_finalize, Michael Tokarev, 2023/03/08
- [PATCH 40/47] vhost: avoid a potential use of an uninitialized variable in vhost_svq_poll(), Michael Tokarev, 2023/03/08
- [PATCH 35/47] vhost-user-rng: Back up vqs before cleaning up vhost_dev, Michael Tokarev, 2023/03/08
- [PATCH 38/47] hw/timer/hpet: Fix expiration time overflow, Michael Tokarev, 2023/03/08
- [PATCH 39/47] vdpa: stop all svq on device deletion, Michael Tokarev, 2023/03/08
- [PATCH 37/47] virtio-rng-pci: fix transitional migration compat for vectors, Michael Tokarev, 2023/03/08
- [PATCH 43/47] intel-iommu: fail MAP notifier without caching mode, Michael Tokarev, 2023/03/08
- [PATCH 45/47] block: Handle curl 7.55.0, 7.85.0 version changes, Michael Tokarev, 2023/03/08