Commit 4b274b16 authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Merge remote-tracking branch 'afaerber/qom-cpu' into staging



* afaerber/qom-cpu:
  target-i386: Explicitly set vendor for each built-in cpudef
  target-i386: Sanitize AMD's ext2_features at realize time
  target-i386: Filter out unsupported features at realize time
  qemu-common.h: Make qemu_init_vcpu() stub static inline
  target-i386: check/enforce: Eliminate check_feat field
  target-i386: check/enforce: Check SVM flag support as well
  target-i386: check/enforce: Check all CPUID.80000001H.EDX bits
  target-i386: check/enforce: Do not ignore "hypervisor" flag
  target-i386: check/enforce: Fix CPUID leaf numbers on error messages
  target-i386: kvm: Enable all supported KVM features for -cpu host
  target-i386: kvm: -cpu host: Use GET_SUPPORTED_CPUID for SVM features
  cpu: Change parent type to Device
  qdev: Don't assume existence of parent bus on unparenting
  qdev: Include qdev code into *-user, too
  libqemustub: sysbus_get_default() stub
  libqemustub: vmstate register/unregister stubs
  libqemustub: Add qemu_[un]register_reset() stubs

Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parents 560c30b1 ebe8b9c6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -21,6 +21,13 @@ qom-obj-y = qom/

universal-obj-y += $(qom-obj-y)

#######################################################################
# Core hw code (qdev core)
hw-core-obj-y += hw/
hw-core-obj-y += qemu-option.o

universal-obj-y += $(hw-core-obj-y)

#######################################################################
# oslib-obj-y is code depending on the OS (win32 vs posix)
oslib-obj-y = osdep.o cutils.o qemu-timer-common.o
@@ -182,6 +189,7 @@ nested-vars += \
	user-obj-y \
	common-obj-y \
	universal-obj-y \
	hw-core-obj-y \
	extra-obj-y \
	trace-obj-y
dummy := $(call unnest-vars)
+7 −2
Original line number Diff line number Diff line
# core qdev-related obj files, also used by *-user:
hw-core-obj-y += qdev.o qdev-properties.o
# irq.o needed for qdev GPIO handling:
hw-core-obj-y += irq.o


common-obj-y = usb/ ide/ pci/
common-obj-y += loader.o
common-obj-$(CONFIG_VIRTIO) += virtio-console.o
@@ -154,7 +160,6 @@ common-obj-$(CONFIG_SOUND) += $(sound-obj-y)
common-obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/

common-obj-y += usb/
common-obj-y += irq.o
common-obj-$(CONFIG_PTIMER) += ptimer.o
common-obj-$(CONFIG_MAX7310) += max7310.o
common-obj-$(CONFIG_WM8750) += wm8750.o
@@ -180,7 +185,7 @@ common-obj-$(CONFIG_SD) += sd.o
common-obj-y += bt.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o
common-obj-y += bt-hci-csr.o
common-obj-y += msmouse.o ps2.o
common-obj-y += qdev.o qdev-properties.o qdev-monitor.o
common-obj-y += qdev-monitor.o
common-obj-y += qdev-properties-system.o
common-obj-$(CONFIG_BRLAPI) += baum.o

+5 −3
Original line number Diff line number Diff line
@@ -698,16 +698,18 @@ static void device_class_base_init(ObjectClass *class, void *data)
    klass->props = NULL;
}

static void qdev_remove_from_bus(Object *obj)
static void device_unparent(Object *obj)
{
    DeviceState *dev = DEVICE(obj);

    if (dev->parent_bus != NULL) {
        bus_remove_child(dev->parent_bus, dev);
    }
}

static void device_class_init(ObjectClass *class, void *data)
{
    class->unparent = qdev_remove_from_bus;
    class->unparent = device_unparent;
}

void device_reset(DeviceState *dev)
+3 −1
Original line number Diff line number Diff line
@@ -288,7 +288,9 @@ struct qemu_work_item {
};

#ifdef CONFIG_USER_ONLY
#define qemu_init_vcpu(env) do { } while (0)
static inline void qemu_init_vcpu(void *env)
{
}
#else
void qemu_init_vcpu(void *env);
#endif
+3 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#ifndef QEMU_CPU_H
#define QEMU_CPU_H

#include "qom/object.h"
#include "hw/qdev-core.h"
#include "qemu/thread.h"

/**
@@ -46,7 +46,7 @@ typedef struct CPUState CPUState;
 */
typedef struct CPUClass {
    /*< private >*/
    ObjectClass parent_class;
    DeviceClass parent_class;
    /*< public >*/

    void (*reset)(CPUState *cpu);
@@ -66,7 +66,7 @@ struct kvm_run;
 */
struct CPUState {
    /*< private >*/
    Object parent_obj;
    DeviceState parent_obj;
    /*< public >*/

    struct QemuThread *thread;
Loading