* [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06
@ 2012-12-06 9:06 Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 01/13] user: Move *-user/qemu-types.h to main directory Andreas Färber
` (14 more replies)
0 siblings, 15 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel
Cc: Igor Mammedov, Paolo Bonzini, Andreas Färber,
Eduardo Habkost
Hello,
This is my current QOM CPU patch queue. Please pull.
Regards,
Andreas
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
The following changes since commit 19e6c50d2d843220efbdd3b2db21d83c122c364a:
target-mips: Fix incorrect shift for SHILO and SHILOV (2012-12-06 08:12:14 +0100)
are available in the git repository at:
git://github.com/afaerber/qemu-cpu.git qom-cpu
for you to fetch changes up to d7f57a46d07c0a72295a56704ab0fecefb2aaea8:
target-i386: Postpone cpuid_level update to realize time (2012-12-06 09:17:06 +0100)
----------------------------------------------------------------
Eduardo Habkost (11):
user: Move *-user/qemu-types.h to main directory
user: Rename qemu-types.h to qemu-user-types.h
ui/vnc-palette.c: Include headers it needs
qapi/qmp-registry.c: Include headers it needs
qga/channel-posix.c: Include headers it needs
qlist.h: Do not include qemu-common.h
Create qemu-types.h for struct typedefs
sysemu.h: Include qemu-types.h instead of qemu-common.h
qdev: qdev_create(): use error_report() instead of hw_error()
target-i386/cpu.c: Coding style fixes
target-i386: Separate feature string parsing from CPU model lookup
Igor Mammedov (2):
target-i386: Use define for cpuid vendor string size
target-i386: Postpone cpuid_level update to realize time
bsd-user/qemu-types.h | 24 -------
bsd-user/qemu.h | 2 +-
cpu-all.h | 2 +-
hw/qdev-core.h | 11 +--
hw/qdev.c | 8 ++-
linux-user/qemu.h | 2 +-
qapi/qmp-registry.c | 2 +
qemu-common.h | 52 +-------------
qemu-types.h | 61 ++++++++++++++++
linux-user/qemu-types.h => qemu-user-types.h | 0
qga/channel-posix.c | 5 ++
qlist.h | 1 -
sysemu.h | 2 +-
target-i386/cpu.c | 100 ++++++++++++++++----------
target-i386/cpu.h | 2 +
ui/vnc-palette.c | 2 +
16 Dateien geändert, 144 Zeilen hinzugefügt(+), 132 Zeilen entfernt(-)
delete mode 100644 bsd-user/qemu-types.h
create mode 100644 qemu-types.h
rename linux-user/qemu-types.h => qemu-user-types.h (100%)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 01/13] user: Move *-user/qemu-types.h to main directory
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 02/13] user: Rename qemu-types.h to qemu-user-types.h Andreas Färber
` (13 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
The bsd-user/qemu-types.h and linux-user/qemu-types.h files are almost
the same, but linux-user has the additional definitions of tswapal().
This moves the linux-user file to the main directory, so the same file
can be used by linux-user and bsd-user.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
bsd-user/qemu-types.h | 24 ------------------------
linux-user/qemu-types.h => qemu-types.h | 0
2 Dateien geändert, 24 Zeilen entfernt(-)
delete mode 100644 bsd-user/qemu-types.h
rename linux-user/qemu-types.h => qemu-types.h (100%)
diff --git a/bsd-user/qemu-types.h b/bsd-user/qemu-types.h
deleted file mode 100644
index 1adda9f..0000000
--- a/bsd-user/qemu-types.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef QEMU_TYPES_H
-#define QEMU_TYPES_H
-#include "cpu.h"
-
-#ifdef TARGET_ABI32
-typedef uint32_t abi_ulong;
-typedef int32_t abi_long;
-#define TARGET_ABI_FMT_lx "%08x"
-#define TARGET_ABI_FMT_ld "%d"
-#define TARGET_ABI_FMT_lu "%u"
-#define TARGET_ABI_BITS 32
-#else
-typedef target_ulong abi_ulong;
-typedef target_long abi_long;
-#define TARGET_ABI_FMT_lx TARGET_FMT_lx
-#define TARGET_ABI_FMT_ld TARGET_FMT_ld
-#define TARGET_ABI_FMT_lu TARGET_FMT_lu
-#define TARGET_ABI_BITS TARGET_LONG_BITS
-/* for consistency, define ABI32 too */
-#if TARGET_ABI_BITS == 32
-#define TARGET_ABI32 1
-#endif
-#endif
-#endif
diff --git a/linux-user/qemu-types.h b/qemu-types.h
similarity index 100%
rename from linux-user/qemu-types.h
rename to qemu-types.h
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 02/13] user: Rename qemu-types.h to qemu-user-types.h
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 01/13] user: Move *-user/qemu-types.h to main directory Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 03/13] ui/vnc-palette.c: Include headers it needs Andreas Färber
` (12 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Riku Voipio, Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
The header file is specific for *-user, but I plan to introduce a more
generic qemu-types.h file, so I'm renaming it.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
bsd-user/qemu.h | 2 +-
cpu-all.h | 2 +-
linux-user/qemu.h | 2 +-
qemu-types.h => qemu-user-types.h | 0
4 Dateien geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)
rename qemu-types.h => qemu-user-types.h (100%)
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 8a5ee3d..d268899 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -11,7 +11,7 @@
#include <stdlib.h>
#endif /* DEBUG_REMAP */
-#include "qemu-types.h"
+#include "qemu-user-types.h"
enum BSDType {
target_freebsd,
diff --git a/cpu-all.h b/cpu-all.h
index c9c51b8..d6b2b19 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -180,7 +180,7 @@ static inline void tswap64s(uint64_t *s)
#if defined(CONFIG_USER_ONLY)
#include <assert.h>
-#include "qemu-types.h"
+#include "qemu-user-types.h"
/* On some host systems the guest address space is reserved on the host.
* This allows the guest address space to be offset to a convenient location.
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 5e53dca..ceddb3c 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -11,7 +11,7 @@
#include <stdlib.h>
#endif /* DEBUG_REMAP */
-#include "qemu-types.h"
+#include "qemu-user-types.h"
#include "thunk.h"
#include "syscall_defs.h"
diff --git a/qemu-types.h b/qemu-user-types.h
similarity index 100%
rename from qemu-types.h
rename to qemu-user-types.h
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 03/13] ui/vnc-palette.c: Include headers it needs
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 01/13] user: Move *-user/qemu-types.h to main directory Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 02/13] user: Rename qemu-types.h to qemu-user-types.h Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 04/13] qapi/qmp-registry.c: " Andreas Färber
` (11 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
Include:
- <glib.h> for g_malloc0()
- <string.h> for memset()
Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers
should eventually stop including qemu-common.h.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
ui/vnc-palette.c | 2 ++
1 Datei geändert, 2 Zeilen hinzugefügt(+)
diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c
index 63d5f64..c130dee 100644
--- a/ui/vnc-palette.c
+++ b/ui/vnc-palette.c
@@ -27,6 +27,8 @@
*/
#include "vnc-palette.h"
+#include <glib.h>
+#include <string.h>
static VncPaletteEntry *palette_find(const VncPalette *palette,
uint32_t color, unsigned int hash)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 04/13] qapi/qmp-registry.c: Include headers it needs
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (2 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 03/13] ui/vnc-palette.c: Include headers it needs Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 05/13] qga/channel-posix.c: " Andreas Färber
` (10 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
Include:
- <glib.h> for g_malloc0()
- <string.h> for strcmp()
Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers
should eventually stop including qemu-common.h.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
qapi/qmp-registry.c | 2 ++
1 Datei geändert, 2 Zeilen hinzugefügt(+)
diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c
index 5414613..c2c31b4 100644
--- a/qapi/qmp-registry.c
+++ b/qapi/qmp-registry.c
@@ -12,6 +12,8 @@
*
*/
+#include <glib.h>
+#include <string.h>
#include "qapi/qmp-core.h"
static QTAILQ_HEAD(QmpCommandList, QmpCommand) qmp_commands =
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 05/13] qga/channel-posix.c: Include headers it needs
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (3 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 04/13] qapi/qmp-registry.c: " Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 06/13] qlist.h: Do not include qemu-common.h Andreas Färber
` (9 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Igor Mammedov, Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
Include:
- <errno.h> for errno
- <unistd.h> & <fcntl.h> for fcntl()
- <stdlib.h> for exit()
- "osdep.h" for qemu_open()
Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers
should eventually stop including qemu-common.h.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
qga/channel-posix.c | 5 +++++
1 Datei geändert, 5 Zeilen hinzugefügt(+)
diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index d152827..769a559 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -1,5 +1,10 @@
#include <glib.h>
#include <termios.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include "osdep.h"
#include "qemu_socket.h"
#include "qga/channel.h"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 06/13] qlist.h: Do not include qemu-common.h
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (4 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 05/13] qga/channel-posix.c: " Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 07/13] Create qemu-types.h for struct typedefs Andreas Färber
` (8 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
I don't know why it was including it, as I don't see any code that
depends on anything from qemu-common.h.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
qlist.h | 1 -
1 Datei geändert, 1 Zeile entfernt(-)
diff --git a/qlist.h b/qlist.h
index ae776f9..7408947 100644
--- a/qlist.h
+++ b/qlist.h
@@ -15,7 +15,6 @@
#include "qobject.h"
#include "qemu-queue.h"
-#include "qemu-common.h"
#include "qemu-queue.h"
typedef struct QListEntry {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 07/13] Create qemu-types.h for struct typedefs
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (5 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 06/13] qlist.h: Do not include qemu-common.h Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 08/13] sysemu.h: Include qemu-types.h instead of qemu-common.h Andreas Färber
` (7 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
Instead of keeping all those struct typedefs in qemu-common.h, move it
to a header that can be safely included by other headers, containing
only the struct typedefs and not pulling in other dependencies.
Also, move some of the qdev-core.h typedefs to the new file, too, so
other headers don't need to include qdev-core.h only because of
DeviceState and other typedefs.
This will help us remove qemu-common.h dependencies from some headers
later.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
hw/qdev-core.h | 11 +---------
qemu-common.h | 52 +----------------------------------------------
qemu-types.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 Dateien geändert, 63 Zeilen hinzugefügt(+), 61 Zeilen entfernt(-)
create mode 100644 qemu-types.h
diff --git a/hw/qdev-core.h b/hw/qdev-core.h
index fff7f0f..d672cca 100644
--- a/hw/qdev-core.h
+++ b/hw/qdev-core.h
@@ -3,20 +3,11 @@
#include "qemu-queue.h"
#include "qemu-option.h"
+#include "qemu-types.h"
#include "qemu/object.h"
#include "hw/irq.h"
#include "error.h"
-typedef struct Property Property;
-
-typedef struct PropertyInfo PropertyInfo;
-
-typedef struct CompatProperty CompatProperty;
-
-typedef struct BusState BusState;
-
-typedef struct BusClass BusClass;
-
enum DevState {
DEV_STATE_CREATED = 1,
DEV_STATE_INITIALIZED,
diff --git a/qemu-common.h b/qemu-common.h
index cef264c..e674786 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -14,6 +14,7 @@
#include "compiler.h"
#include "config-host.h"
+#include "qemu-types.h"
#if defined(__arm__) || defined(__sparc__) || defined(__mips__) || defined(__hppa__) || defined(__ia64__)
#define WORDS_ALIGNED
@@ -21,15 +22,6 @@
#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
-typedef struct QEMUTimer QEMUTimer;
-typedef struct QEMUFile QEMUFile;
-typedef struct QEMUBH QEMUBH;
-typedef struct DeviceState DeviceState;
-
-struct Monitor;
-typedef struct Monitor Monitor;
-typedef struct MigrationParams MigrationParams;
-
/* we put basic includes here to avoid repeating them in device drivers */
#include <stdlib.h>
#include <stdio.h>
@@ -258,48 +250,6 @@ struct ParallelIOArg {
typedef int (*DMA_transfer_handler) (void *opaque, int nchan, int pos, int size);
-/* A load of opaque types so that device init declarations don't have to
- pull in all the real definitions. */
-typedef struct NICInfo NICInfo;
-typedef struct HCIInfo HCIInfo;
-typedef struct AudioState AudioState;
-typedef struct BlockDriverState BlockDriverState;
-typedef struct DriveInfo DriveInfo;
-typedef struct DisplayState DisplayState;
-typedef struct DisplayChangeListener DisplayChangeListener;
-typedef struct DisplaySurface DisplaySurface;
-typedef struct PixelFormat PixelFormat;
-typedef struct QemuConsole QemuConsole;
-typedef struct CharDriverState CharDriverState;
-typedef struct MACAddr MACAddr;
-typedef struct NetClientState NetClientState;
-typedef struct i2c_bus i2c_bus;
-typedef struct ISABus ISABus;
-typedef struct ISADevice ISADevice;
-typedef struct SMBusDevice SMBusDevice;
-typedef struct PCIHostState PCIHostState;
-typedef struct PCIExpressHost PCIExpressHost;
-typedef struct PCIBus PCIBus;
-typedef struct PCIDevice PCIDevice;
-typedef struct PCIExpressDevice PCIExpressDevice;
-typedef struct PCIBridge PCIBridge;
-typedef struct PCIEAERMsg PCIEAERMsg;
-typedef struct PCIEAERLog PCIEAERLog;
-typedef struct PCIEAERErr PCIEAERErr;
-typedef struct PCIEPort PCIEPort;
-typedef struct PCIESlot PCIESlot;
-typedef struct MSIMessage MSIMessage;
-typedef struct SerialState SerialState;
-typedef struct PCMCIACardState PCMCIACardState;
-typedef struct MouseTransformInfo MouseTransformInfo;
-typedef struct uWireSlave uWireSlave;
-typedef struct I2SCodec I2SCodec;
-typedef struct SSIBus SSIBus;
-typedef struct EventNotifier EventNotifier;
-typedef struct VirtIODevice VirtIODevice;
-typedef struct QEMUSGList QEMUSGList;
-typedef struct SHPCDevice SHPCDevice;
-
typedef uint64_t pcibus_t;
typedef enum LostTickPolicy {
diff --git a/qemu-types.h b/qemu-types.h
new file mode 100644
index 0000000..fd532a2
--- /dev/null
+++ b/qemu-types.h
@@ -0,0 +1,61 @@
+#ifndef QEMU_TYPEDEFS_H
+#define QEMU_TYPEDEFS_H
+
+/* A load of opaque types so that device init declarations don't have to
+ pull in all the real definitions. */
+typedef struct QEMUTimer QEMUTimer;
+typedef struct QEMUFile QEMUFile;
+typedef struct QEMUBH QEMUBH;
+
+struct Monitor;
+typedef struct Monitor Monitor;
+typedef struct MigrationParams MigrationParams;
+
+typedef struct Property Property;
+typedef struct PropertyInfo PropertyInfo;
+typedef struct CompatProperty CompatProperty;
+typedef struct DeviceState DeviceState;
+typedef struct BusState BusState;
+typedef struct BusClass BusClass;
+
+typedef struct NICInfo NICInfo;
+typedef struct HCIInfo HCIInfo;
+typedef struct AudioState AudioState;
+typedef struct BlockDriverState BlockDriverState;
+typedef struct DriveInfo DriveInfo;
+typedef struct DisplayState DisplayState;
+typedef struct DisplayChangeListener DisplayChangeListener;
+typedef struct DisplaySurface DisplaySurface;
+typedef struct PixelFormat PixelFormat;
+typedef struct QemuConsole QemuConsole;
+typedef struct CharDriverState CharDriverState;
+typedef struct MACAddr MACAddr;
+typedef struct NetClientState NetClientState;
+typedef struct i2c_bus i2c_bus;
+typedef struct ISABus ISABus;
+typedef struct ISADevice ISADevice;
+typedef struct SMBusDevice SMBusDevice;
+typedef struct PCIHostState PCIHostState;
+typedef struct PCIExpressHost PCIExpressHost;
+typedef struct PCIBus PCIBus;
+typedef struct PCIDevice PCIDevice;
+typedef struct PCIExpressDevice PCIExpressDevice;
+typedef struct PCIBridge PCIBridge;
+typedef struct PCIEAERMsg PCIEAERMsg;
+typedef struct PCIEAERLog PCIEAERLog;
+typedef struct PCIEAERErr PCIEAERErr;
+typedef struct PCIEPort PCIEPort;
+typedef struct PCIESlot PCIESlot;
+typedef struct MSIMessage MSIMessage;
+typedef struct SerialState SerialState;
+typedef struct PCMCIACardState PCMCIACardState;
+typedef struct MouseTransformInfo MouseTransformInfo;
+typedef struct uWireSlave uWireSlave;
+typedef struct I2SCodec I2SCodec;
+typedef struct SSIBus SSIBus;
+typedef struct EventNotifier EventNotifier;
+typedef struct VirtIODevice VirtIODevice;
+typedef struct QEMUSGList QEMUSGList;
+typedef struct SHPCDevice SHPCDevice;
+
+#endif /* QEMU_TYPEDEFS_H */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 08/13] sysemu.h: Include qemu-types.h instead of qemu-common.h
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (6 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 07/13] Create qemu-types.h for struct typedefs Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 09/13] qdev: qdev_create(): use error_report() instead of hw_error() Andreas Färber
` (6 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
It just needs the Monitor and DeviceState typedefs, so it doesn't need
all of qemu-common.h.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
sysemu.h | 2 +-
1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/sysemu.h b/sysemu.h
index f5ac664..ab1ef8b 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -2,7 +2,7 @@
#define SYSEMU_H
/* Misc. things related to the system emulator. */
-#include "qemu-common.h"
+#include "qemu-types.h"
#include "qemu-option.h"
#include "qemu-queue.h"
#include "qemu-timer.h"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 09/13] qdev: qdev_create(): use error_report() instead of hw_error()
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (7 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 08/13] sysemu.h: Include qemu-types.h instead of qemu-common.h Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 10/13] target-i386/cpu.c: Coding style fixes Andreas Färber
` (5 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
hw_error() is specific for fatal hardware emulation errors, not for
internal errors related to the qdev object/class abstraction or object
initialization.
Replace it with an error_report() call, followed by abort().
This will also help reduce dependencies of the qdev code (as hw_error()
is from cpus.o, and depends on the CPU list from exec.o).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
hw/qdev.c | 8 +++++---
1 Datei geändert, 5 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index 788b4da..599382c 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -109,10 +109,12 @@ DeviceState *qdev_create(BusState *bus, const char *name)
dev = qdev_try_create(bus, name);
if (!dev) {
if (bus) {
- hw_error("Unknown device '%s' for bus '%s'\n", name,
- object_get_typename(OBJECT(bus)));
+ error_report("Unknown device '%s' for bus '%s'\n", name,
+ object_get_typename(OBJECT(bus)));
+ abort();
} else {
- hw_error("Unknown device '%s' for default sysbus\n", name);
+ error_report("Unknown device '%s' for default sysbus\n", name);
+ abort();
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 10/13] target-i386/cpu.c: Coding style fixes
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (8 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 09/13] qdev: qdev_create(): use error_report() instead of hw_error() Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 11/13] target-i386: Separate feature string parsing from CPU model lookup Andreas Färber
` (4 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
- Use spaces instead of tabs on cpu_x86_cpuid().
- Use braces on 'if' statement cpu_x86_find_by_name().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-i386/cpu.c | 30 ++++++++++++++++--------------
1 Datei geändert, 16 Zeilen hinzugefügt(+), 14 Zeilen entfernt(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index c6c2ca0..754af68 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1215,7 +1215,7 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
char *s = g_strdup(cpu_model);
char *featurestr, *name = strtok(s, ",");
- /* Features to be added*/
+ /* Features to be added */
uint32_t plus_features = 0, plus_ext_features = 0;
uint32_t plus_ext2_features = 0, plus_ext3_features = 0;
uint32_t plus_kvm_features = kvm_default_features, plus_svm_features = 0;
@@ -1227,9 +1227,11 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
uint32_t minus_7_0_ebx_features = 0;
uint32_t numvalue;
- for (def = x86_defs; def; def = def->next)
- if (name && !strcmp(name, def->name))
+ for (def = x86_defs; def; def = def->next) {
+ if (name && !strcmp(name, def->name)) {
break;
+ }
+ }
if (kvm_enabled() && name && strcmp(name, "host") == 0) {
kvm_cpu_fill_host(x86_cpu_def);
} else if (!def) {
@@ -1835,17 +1837,17 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
}
break;
case 0x8000000A:
- if (env->cpuid_ext3_features & CPUID_EXT3_SVM) {
- *eax = 0x00000001; /* SVM Revision */
- *ebx = 0x00000010; /* nr of ASIDs */
- *ecx = 0;
- *edx = env->cpuid_svm_features; /* optional features */
- } else {
- *eax = 0;
- *ebx = 0;
- *ecx = 0;
- *edx = 0;
- }
+ if (env->cpuid_ext3_features & CPUID_EXT3_SVM) {
+ *eax = 0x00000001; /* SVM Revision */
+ *ebx = 0x00000010; /* nr of ASIDs */
+ *ecx = 0;
+ *edx = env->cpuid_svm_features; /* optional features */
+ } else {
+ *eax = 0;
+ *ebx = 0;
+ *ecx = 0;
+ *edx = 0;
+ }
break;
case 0xC0000000:
*eax = env->cpuid_xlevel2;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 11/13] target-i386: Separate feature string parsing from CPU model lookup
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (9 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 10/13] target-i386/cpu.c: Coding style fixes Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 12/13] target-i386: Use define for cpuid vendor string size Andreas Färber
` (3 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost, Andreas Färber
From: Eduardo Habkost <ehabkost@redhat.com>
Instead of parsing the whole cpu_model string inside
cpu_x86_find_by_name(), first split it into the CPU model name and the
full feature string, then parse the feature string into pieces.
When using CPU model classes, those two pieces of information will be
used at different moments (CPU model name will be used to find CPU
class, feature string will be used after CPU object was created), so
making the split in two steps will make it easier to refactor the code
later.
This should also help on the CPU properties work, that will just need to
replace the cpu_x86_parse_featurestr() logic (and can keep the CPU model
lookup code as-is).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-i386/cpu.c | 69 +++++++++++++++++++++++++++++++++++------------------
1 Datei geändert, 46 Zeilen hinzugefügt(+), 23 Zeilen entfernt(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 754af68..7877df1 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1208,25 +1208,10 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque,
cpu->env.tsc_khz = value / 1000;
}
-static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
+static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *name)
{
- unsigned int i;
x86_def_t *def;
- char *s = g_strdup(cpu_model);
- char *featurestr, *name = strtok(s, ",");
- /* Features to be added */
- uint32_t plus_features = 0, plus_ext_features = 0;
- uint32_t plus_ext2_features = 0, plus_ext3_features = 0;
- uint32_t plus_kvm_features = kvm_default_features, plus_svm_features = 0;
- uint32_t plus_7_0_ebx_features = 0;
- /* Features to be removed */
- uint32_t minus_features = 0, minus_ext_features = 0;
- uint32_t minus_ext2_features = 0, minus_ext3_features = 0;
- uint32_t minus_kvm_features = 0, minus_svm_features = 0;
- uint32_t minus_7_0_ebx_features = 0;
- uint32_t numvalue;
-
for (def = x86_defs; def; def = def->next) {
if (name && !strcmp(name, def->name)) {
break;
@@ -1235,16 +1220,37 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
if (kvm_enabled() && name && strcmp(name, "host") == 0) {
kvm_cpu_fill_host(x86_cpu_def);
} else if (!def) {
- goto error;
+ return -1;
} else {
memcpy(x86_cpu_def, def, sizeof(*def));
}
+ return 0;
+}
+
+/* Parse "+feature,-feature,feature=foo" CPU feature string
+ */
+static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
+{
+ unsigned int i;
+ char *featurestr; /* Single 'key=value" string being parsed */
+ /* Features to be added */
+ uint32_t plus_features = 0, plus_ext_features = 0;
+ uint32_t plus_ext2_features = 0, plus_ext3_features = 0;
+ uint32_t plus_kvm_features = kvm_default_features, plus_svm_features = 0;
+ uint32_t plus_7_0_ebx_features = 0;
+ /* Features to be removed */
+ uint32_t minus_features = 0, minus_ext_features = 0;
+ uint32_t minus_ext2_features = 0, minus_ext3_features = 0;
+ uint32_t minus_kvm_features = 0, minus_svm_features = 0;
+ uint32_t minus_7_0_ebx_features = 0;
+ uint32_t numvalue;
+
add_flagname_to_bitmaps("hypervisor", &plus_features,
&plus_ext_features, &plus_ext2_features, &plus_ext3_features,
&plus_kvm_features, &plus_svm_features, &plus_7_0_ebx_features);
- featurestr = strtok(NULL, ",");
+ featurestr = features ? strtok(features, ",") : NULL;
while (featurestr) {
char *val;
@@ -1378,11 +1384,9 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
x86_cpu_def->level = 7;
}
- g_free(s);
return 0;
error:
- g_free(s);
return -1;
}
@@ -1492,11 +1496,25 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
CPUX86State *env = &cpu->env;
x86_def_t def1, *def = &def1;
Error *error = NULL;
+ char *name, *features;
+ gchar **model_pieces;
memset(def, 0, sizeof(*def));
- if (cpu_x86_find_by_name(def, cpu_model) < 0)
- return -1;
+ model_pieces = g_strsplit(cpu_model, ",", 2);
+ if (!model_pieces[0]) {
+ goto error;
+ }
+ name = model_pieces[0];
+ features = model_pieces[1];
+
+ if (cpu_x86_find_by_name(def, name) < 0) {
+ goto error;
+ }
+
+ if (cpu_x86_parse_featurestr(def, features) < 0) {
+ goto error;
+ }
if (def->vendor1) {
env->cpuid_vendor1 = def->vendor1;
env->cpuid_vendor2 = def->vendor2;
@@ -1553,9 +1571,14 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
if (error) {
fprintf(stderr, "%s\n", error_get_pretty(error));
error_free(error);
- return -1;
+ goto error;
}
+
+ g_strfreev(model_pieces);
return 0;
+error:
+ g_strfreev(model_pieces);
+ return -1;
}
#if !defined(CONFIG_USER_ONLY)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 12/13] target-i386: Use define for cpuid vendor string size
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (10 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 11/13] target-i386: Separate feature string parsing from CPU model lookup Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time Andreas Färber
` (2 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Igor Mammedov, Andreas Färber
From: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-i386/cpu.c | 6 +++---
target-i386/cpu.h | 2 ++
2 Dateien geändert, 5 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 7877df1..a631ae9 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1106,13 +1106,13 @@ static char *x86_cpuid_get_vendor(Object *obj, Error **errp)
char *value;
int i;
- value = (char *)g_malloc(12 + 1);
+ value = (char *)g_malloc(CPUID_VENDOR_SZ + 1);
for (i = 0; i < 4; i++) {
value[i ] = env->cpuid_vendor1 >> (8 * i);
value[i + 4] = env->cpuid_vendor2 >> (8 * i);
value[i + 8] = env->cpuid_vendor3 >> (8 * i);
}
- value[12] = '\0';
+ value[CPUID_VENDOR_SZ] = '\0';
return value;
}
@@ -1123,7 +1123,7 @@ static void x86_cpuid_set_vendor(Object *obj, const char *value,
CPUX86State *env = &cpu->env;
int i;
- if (strlen(value) != 12) {
+ if (strlen(value) != CPUID_VENDOR_SZ) {
error_set(errp, QERR_PROPERTY_VALUE_BAD, "",
"vendor", value);
return;
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 90ef1ff..386c4f6 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -510,6 +510,8 @@
#define CPUID_7_0_EBX_ADX (1 << 19)
#define CPUID_7_0_EBX_SMAP (1 << 20)
+#define CPUID_VENDOR_SZ 12
+
#define CPUID_VENDOR_INTEL_1 0x756e6547 /* "Genu" */
#define CPUID_VENDOR_INTEL_2 0x49656e69 /* "ineI" */
#define CPUID_VENDOR_INTEL_3 0x6c65746e /* "ntel" */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (11 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 12/13] target-i386: Use define for cpuid vendor string size Andreas Färber
@ 2012-12-06 9:06 ` Andreas Färber
2012-12-07 17:57 ` Eduardo Habkost
2012-12-07 18:00 ` [Qemu-devel] [PATCH] " Eduardo Habkost
2012-12-07 18:21 ` [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
2012-12-10 16:57 ` Anthony Liguori
14 siblings, 2 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-06 9:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Igor Mammedov, Andreas Färber
From: Igor Mammedov <imammedo@redhat.com>
Delay capping cpuid_level to 7 to realize time so property setters
for cpuid_7_0_ebx_features and "level" could be used in any order/time
between x86_cpu_initfn() and x86_cpu_realize().
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-i386/cpu.c | 3 ---
1 Datei geändert, 3 Zeilen entfernt(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a631ae9..f56aa0d 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1381,9 +1381,6 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
goto error;
}
- if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
- x86_cpu_def->level = 7;
- }
return 0;
error:
--
1.7.10.4
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time
2012-12-06 9:06 ` [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time Andreas Färber
@ 2012-12-07 17:57 ` Eduardo Habkost
2012-12-07 18:18 ` Andreas Färber
2012-12-07 18:00 ` [Qemu-devel] [PATCH] " Eduardo Habkost
1 sibling, 1 reply; 21+ messages in thread
From: Eduardo Habkost @ 2012-12-07 17:57 UTC (permalink / raw)
To: Andreas Färber; +Cc: Igor Mammedov, qemu-devel
On Thu, Dec 06, 2012 at 10:06:57AM +0100, Andreas Färber wrote:
[...]
> ---
> target-i386/cpu.c | 3 ---
> 1 Datei geändert, 3 Zeilen entfernt(-)
>
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index a631ae9..f56aa0d 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1381,9 +1381,6 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
> if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
> goto error;
> }
> - if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
> - x86_cpu_def->level = 7;
> - }
> return 0;
>
> error:
NACK. A patch chunk is missing. I will resend the fixed version, just in
case.
--
Eduardo
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH] target-i386: Postpone cpuid_level update to realize time
2012-12-06 9:06 ` [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time Andreas Färber
2012-12-07 17:57 ` Eduardo Habkost
@ 2012-12-07 18:00 ` Eduardo Habkost
2012-12-07 18:28 ` Andreas Färber
1 sibling, 1 reply; 21+ messages in thread
From: Eduardo Habkost @ 2012-12-07 18:00 UTC (permalink / raw)
To: Andreas Färber; +Cc: Igor Mammedov, qemu-devel
From: Igor Mammedov <imammedo@redhat.com>
Delay capping cpuid_level to 7 to realize time so property setters
for cpuid_7_0_ebx_features and "level" could be used in any order/time
between x86_cpu_initfn() and x86_cpu_realize().
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
The patch in the pull request sent by Andreas is not the right one (a
patch chunk is missing). I'm resending the correct patch.
---
target-i386/cpu.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a631ae9..7be3ad8 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1381,9 +1381,6 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
goto error;
}
- if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
- x86_cpu_def->level = 7;
- }
return 0;
error:
@@ -2074,6 +2071,11 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **errp)
void x86_cpu_realize(Object *obj, Error **errp)
{
X86CPU *cpu = X86_CPU(obj);
+ CPUX86State *env = &cpu->env;
+
+ if (env->cpuid_7_0_ebx_features && env->cpuid_level < 7) {
+ env->cpuid_level = 7;
+ }
#ifndef CONFIG_USER_ONLY
qemu_register_reset(x86_cpu_machine_reset_cb, cpu);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time
2012-12-07 17:57 ` Eduardo Habkost
@ 2012-12-07 18:18 ` Andreas Färber
0 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-07 18:18 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: Igor Mammedov, qemu-devel
Am 07.12.2012 18:57, schrieb Eduardo Habkost:
> On Thu, Dec 06, 2012 at 10:06:57AM +0100, Andreas Färber wrote:
> [...]
>> ---
>> target-i386/cpu.c | 3 ---
>> 1 Datei geändert, 3 Zeilen entfernt(-)
>>
>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
>> index a631ae9..f56aa0d 100644
>> --- a/target-i386/cpu.c
>> +++ b/target-i386/cpu.c
>> @@ -1381,9 +1381,6 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
>> if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
>> goto error;
>> }
>> - if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
>> - x86_cpu_def->level = 7;
>> - }
>> return 0;
>>
>> error:
>
> NACK. A patch chunk is missing. I will resend the fixed version, just in
> case.
Uh, mismerge... thanks for noticing! Fixed.
https://github.com/afaerber/qemu-cpu/commits/qom-cpu
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (12 preceding siblings ...)
2012-12-06 9:06 ` [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time Andreas Färber
@ 2012-12-07 18:21 ` Andreas Färber
2012-12-10 16:57 ` Anthony Liguori
14 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-07 18:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Igor Mammedov, Eduardo Habkost, Paolo Bonzini
Am 06.12.2012 10:06, schrieb Andreas Färber:
> Hello,
>
> This is my current QOM CPU patch queue. Please pull.
>
> Regards,
> Andreas
>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
Both branches updated with a fix:
The following changes since commit 19e6c50d2d843220efbdd3b2db21d83c122c364a:
target-mips: Fix incorrect shift for SHILO and SHILOV (2012-12-06
08:12:14 +0100)
are available in the git repository at:
git://github.com/afaerber/qemu-cpu.git qom-cpu
for you to fetch changes up to b34d12d153e6e5c5e5e00eac510b054a94409deb:
target-i386: Postpone cpuid_level update to realize time (2012-12-07
19:03:04 +0100)
----------------------------------------------------------------
Eduardo Habkost (11):
user: Move *-user/qemu-types.h to main directory
user: Rename qemu-types.h to qemu-user-types.h
ui/vnc-palette.c: Include headers it needs
qapi/qmp-registry.c: Include headers it needs
qga/channel-posix.c: Include headers it needs
qlist.h: Do not include qemu-common.h
Create qemu-types.h for struct typedefs
sysemu.h: Include qemu-types.h instead of qemu-common.h
qdev: qdev_create(): use error_report() instead of hw_error()
target-i386/cpu.c: Coding style fixes
target-i386: Separate feature string parsing from CPU model lookup
Igor Mammedov (2):
target-i386: Use define for cpuid vendor string size
target-i386: Postpone cpuid_level update to realize time
bsd-user/qemu-types.h | 24 ------
bsd-user/qemu.h | 2 +-
cpu-all.h | 2 +-
hw/qdev-core.h | 11 +--
hw/qdev.c | 8 +-
linux-user/qemu.h | 2 +-
qapi/qmp-registry.c | 2 +
qemu-common.h | 52 +------------
qemu-types.h | 61 +++++++++++++++
linux-user/qemu-types.h => qemu-user-types.h | 0
qga/channel-posix.c | 5 ++
qlist.h | 1 -
sysemu.h | 2 +-
target-i386/cpu.c | 105
++++++++++++++++----------
target-i386/cpu.h | 2 +
ui/vnc-palette.c | 2 +
16 Dateien geändert, 149 Zeilen hinzugefügt(+), 132 Zeilen entfernt(-)
delete mode 100644 bsd-user/qemu-types.h
create mode 100644 qemu-types.h
rename linux-user/qemu-types.h => qemu-user-types.h (100%)
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH] target-i386: Postpone cpuid_level update to realize time
2012-12-07 18:00 ` [Qemu-devel] [PATCH] " Eduardo Habkost
@ 2012-12-07 18:28 ` Andreas Färber
0 siblings, 0 replies; 21+ messages in thread
From: Andreas Färber @ 2012-12-07 18:28 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: Igor Mammedov, qemu-devel
Am 07.12.2012 19:00, schrieb Eduardo Habkost:
> From: Igor Mammedov <imammedo@redhat.com>
>
> Delay capping cpuid_level to 7 to realize time so property setters
> for cpuid_7_0_ebx_features and "level" could be used in any order/time
> between x86_cpu_initfn() and x86_cpu_realize().
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> The patch in the pull request sent by Andreas is not the right one (a
> patch chunk is missing). I'm resending the correct patch.
Igor's patch didn't apply cleanly despite --3way, seems one hunk got
lost. Sorry!
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index a631ae9..7be3ad8 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
[...]
> @@ -2074,6 +2071,11 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **errp)
> void x86_cpu_realize(Object *obj, Error **errp)
> {
> X86CPU *cpu = X86_CPU(obj);
> + CPUX86State *env = &cpu->env;
> +
> + if (env->cpuid_7_0_ebx_features && env->cpuid_level < 7) {
> + env->cpuid_level = 7;
> + }
>
> #ifndef CONFIG_USER_ONLY
> qemu_register_reset(x86_cpu_machine_reset_cb, cpu);
I manually patch'ed in this missing hunk and made you a Signed-off-by.
Pull was updated with new commit hash and stats already.
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
` (13 preceding siblings ...)
2012-12-07 18:21 ` [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
@ 2012-12-10 16:57 ` Anthony Liguori
2012-12-10 17:01 ` Paolo Bonzini
14 siblings, 1 reply; 21+ messages in thread
From: Anthony Liguori @ 2012-12-10 16:57 UTC (permalink / raw)
To: Andreas Färber, qemu-devel
Cc: Igor Mammedov, Eduardo Habkost, Paolo Bonzini
Andreas Färber <afaerber@suse.de> writes:
> Hello,
>
> This is my current QOM CPU patch queue. Please pull.
>
> Regards,
> Andreas
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
>
>
> The following changes since commit 19e6c50d2d843220efbdd3b2db21d83c122c364a:
>
> target-mips: Fix incorrect shift for SHILO and SHILOV (2012-12-06 08:12:14 +0100)
>
> are available in the git repository at:
>
> git://github.com/afaerber/qemu-cpu.git qom-cpu
>
> for you to fetch changes up to d7f57a46d07c0a72295a56704ab0fecefb2aaea8:
>
> target-i386: Postpone cpuid_level update to realize time (2012-12-06 09:17:06 +0100)
>
> ----------------------------------------------------------------
> Eduardo Habkost (11):
> user: Move *-user/qemu-types.h to main directory
> user: Rename qemu-types.h to qemu-user-types.h
> ui/vnc-palette.c: Include headers it needs
> qapi/qmp-registry.c: Include headers it needs
> qga/channel-posix.c: Include headers it needs
> qlist.h: Do not include qemu-common.h
> Create qemu-types.h for struct typedefs
> sysemu.h: Include qemu-types.h instead of qemu-common.h
> qdev: qdev_create(): use error_report() instead of hw_error()
> target-i386/cpu.c: Coding style fixes
> target-i386: Separate feature string parsing from CPU model lookup
>
> Igor Mammedov (2):
> target-i386: Use define for cpuid vendor string size
> target-i386: Postpone cpuid_level update to realize time
>
> bsd-user/qemu-types.h | 24 -------
> bsd-user/qemu.h | 2 +-
> cpu-all.h | 2 +-
> hw/qdev-core.h | 11 +--
> hw/qdev.c | 8 ++-
> linux-user/qemu.h | 2 +-
> qapi/qmp-registry.c | 2 +
> qemu-common.h | 52 +-------------
> qemu-types.h | 61 ++++++++++++++++
> linux-user/qemu-types.h => qemu-user-types.h | 0
> qga/channel-posix.c | 5 ++
> qlist.h | 1 -
> sysemu.h | 2 +-
> target-i386/cpu.c | 100 ++++++++++++++++----------
> target-i386/cpu.h | 2 +
> ui/vnc-palette.c | 2 +
> 16 Dateien geändert, 144 Zeilen hinzugefügt(+), 132 Zeilen entfernt(-)
> delete mode 100644 bsd-user/qemu-types.h
> create mode 100644 qemu-types.h
> rename linux-user/qemu-types.h => qemu-user-types.h (100%)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06
2012-12-10 16:57 ` Anthony Liguori
@ 2012-12-10 17:01 ` Paolo Bonzini
0 siblings, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2012-12-10 17:01 UTC (permalink / raw)
To: Anthony Liguori
Cc: Igor Mammedov, Andreas Färber, Eduardo Habkost, qemu-devel
Il 10/12/2012 17:57, Anthony Liguori ha scritto:
> Andreas Färber <afaerber@suse.de> writes:
>
>> Hello,
>>
>> This is my current QOM CPU patch queue. Please pull.
>>
>> Regards,
>> Andreas
>
> Pulled. Thanks.
Thanks, I'll rebase the directory stuff as soon as possible, please help
reviewing it in the meantime! :)
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2012-12-10 17:02 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 9:06 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 01/13] user: Move *-user/qemu-types.h to main directory Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 02/13] user: Rename qemu-types.h to qemu-user-types.h Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 03/13] ui/vnc-palette.c: Include headers it needs Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 04/13] qapi/qmp-registry.c: " Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 05/13] qga/channel-posix.c: " Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 06/13] qlist.h: Do not include qemu-common.h Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 07/13] Create qemu-types.h for struct typedefs Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 08/13] sysemu.h: Include qemu-types.h instead of qemu-common.h Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 09/13] qdev: qdev_create(): use error_report() instead of hw_error() Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 10/13] target-i386/cpu.c: Coding style fixes Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 11/13] target-i386: Separate feature string parsing from CPU model lookup Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 12/13] target-i386: Use define for cpuid vendor string size Andreas Färber
2012-12-06 9:06 ` [Qemu-devel] [PATCH 13/13] target-i386: Postpone cpuid_level update to realize time Andreas Färber
2012-12-07 17:57 ` Eduardo Habkost
2012-12-07 18:18 ` Andreas Färber
2012-12-07 18:00 ` [Qemu-devel] [PATCH] " Eduardo Habkost
2012-12-07 18:28 ` Andreas Färber
2012-12-07 18:21 ` [Qemu-devel] [PULL] QOM CPUState patch queue 2012-12-06 Andreas Färber
2012-12-10 16:57 ` Anthony Liguori
2012-12-10 17:01 ` Paolo Bonzini
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).