qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012
@ 2012-07-21 12:26 Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 1/6] powerpc pci: fixed packing of ranges[] Stefan Hajnoczi
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:26 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Stefan Hajnoczi

The following changes since commit 61dc008f3529fa74a63aad1907438dad857e255a:

  Revert "audio: Make PC speaker audio card available by default" (2012-07-19 18:25:52 -0500)

are available in the git repository at:

  git://github.com/stefanha/qemu.git trivial-patches

for you to fetch changes up to 43ffe61f9cc22f9ad4d05a18a304b1095fa1f2b3:

  Fix some more Qemus in documentation and help text (2012-07-21 10:54:40 +0100)

----------------------------------------------------------------
Alexey Kardashevskiy (1):
      powerpc pci: fixed packing of ranges[]

Mao, Junjie (1):
      Recognize PCID feature

Peter Maydell (1):
      cpus.c: Make all_cpu_threads_idle() static

Stefan Weil (3):
      Use macro QEMU_PACKED for new packed structures
      qdev: Fix Open Firmware comment
      Fix some more Qemus in documentation and help text

 cpus.c               |   52 ++++++++++++++--------------
 docs/usb-storage.txt |    2 +-
 hw/mfi.h             |   92 +++++++++++++++++++++++++-------------------------
 hw/ppce500_spin.c    |    2 +-
 hw/qdev.h            |   11 +++---
 hw/spapr_pci.c       |    2 +-
 qemu-common.h        |    1 -
 qemu-options.hx      |    4 +--
 target-i386/cpu.c    |    2 +-
 9 files changed, 83 insertions(+), 85 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 1/6] powerpc pci: fixed packing of ranges[]
  2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
@ 2012-07-21 12:27 ` Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 2/6] Recognize PCID feature Stefan Hajnoczi
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Alexey Kardashevskiy, qemu-devel, Stefan Hajnoczi

From: Alexey Kardashevskiy <aik@ozlabs.ru>

By default mingw-gcc is trying to pack structures the way to
preserve binary compatibility with MS Visual C what leads to
incorrect and unexpected padding in the PCI bus ranges property of
the sPAPR PHB.

The patch replaces __attribute__((packed)) with more strict QEMU_PACKED
which actually is __attribute__((gcc_struct, packed)) on Windows.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Tested-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/spapr_pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
index 47ba5ff..b2e4f78 100644
--- a/hw/spapr_pci.c
+++ b/hw/spapr_pci.c
@@ -418,7 +418,7 @@ int spapr_populate_pci_devices(sPAPRPHBState *phb,
         uint64_t child;
         uint64_t parent;
         uint64_t size;
-    } __attribute__((packed)) ranges[] = {
+    } QEMU_PACKED ranges[] = {
         {
             cpu_to_be32(b_ss(1)), cpu_to_be64(0),
             cpu_to_be64(phb->io_win_addr),
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 2/6] Recognize PCID feature
  2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 1/6] powerpc pci: fixed packing of ranges[] Stefan Hajnoczi
@ 2012-07-21 12:27 ` Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 3/6] Use macro QEMU_PACKED for new packed structures Stefan Hajnoczi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Stefan Hajnoczi, Mao, Junjie

From: "Mao, Junjie" <junjie.mao@intel.com>

This patch makes Qemu recognize the PCID feature specified from configuration or command line options.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 target-i386/cpu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index b3bcbac..6b9659f 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -50,7 +50,7 @@ static const char *ext_feature_name[] = {
     "ds_cpl", "vmx", "smx", "est",
     "tm2", "ssse3", "cid", NULL,
     "fma", "cx16", "xtpr", "pdcm",
-    NULL, NULL, "dca", "sse4.1|sse4_1",
+    NULL, "pcid", "dca", "sse4.1|sse4_1",
     "sse4.2|sse4_2", "x2apic", "movbe", "popcnt",
     "tsc-deadline", "aes", "xsave", "osxsave",
     "avx", NULL, NULL, "hypervisor",
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 3/6] Use macro QEMU_PACKED for new packed structures
  2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 1/6] powerpc pci: fixed packing of ranges[] Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 2/6] Recognize PCID feature Stefan Hajnoczi
@ 2012-07-21 12:27 ` Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 4/6] cpus.c: Make all_cpu_threads_idle() static Stefan Hajnoczi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi

From: Stefan Weil <sw@weilnetz.de>

Since commit 541dc0d47f10973c241e9955afc2aefc96adec51,
some new packed structures were added without using QEMU_PACKED.

QEMU_PACKED is needed for compilations with MinGW.
For other platforms nothing changes.

The code was fixed using this command:

    git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/mfi.h          |   92 ++++++++++++++++++++++++++---------------------------
 hw/ppce500_spin.c |    2 +-
 2 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/hw/mfi.h b/hw/mfi.h
index 8a82162..3045d4e 100644
--- a/hw/mfi.h
+++ b/hw/mfi.h
@@ -435,24 +435,24 @@ typedef enum {
 struct mfi_sg32 {
     uint32_t addr;
     uint32_t len;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_sg64 {
     uint64_t addr;
     uint32_t len;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_sg_skinny {
     uint64_t addr;
     uint32_t len;
     uint32_t flag;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 union mfi_sgl {
     struct mfi_sg32 sg32[1];
     struct mfi_sg64 sg64[1];
     struct mfi_sg_skinny sg_skinny[1];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Message frames.  All messages have a common header */
 struct mfi_frame_header {
@@ -468,7 +468,7 @@ struct mfi_frame_header {
     uint16_t flags;
     uint16_t timeout;
     uint32_t data_len;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_init_frame {
     struct mfi_frame_header header;
@@ -487,7 +487,7 @@ struct mfi_io_frame {
     uint32_t lba_lo;
     uint32_t lba_hi;
     union mfi_sgl sgl;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_PASS_FRAME_SIZE 48
 struct mfi_pass_frame {
@@ -496,7 +496,7 @@ struct mfi_pass_frame {
     uint32_t sense_addr_hi;
     uint8_t cdb[16];
     union mfi_sgl sgl;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_DCMD_FRAME_SIZE 40
 struct mfi_dcmd_frame {
@@ -504,7 +504,7 @@ struct mfi_dcmd_frame {
     uint32_t opcode;
     uint8_t mbox[MFI_MBOX_SIZE];
     union mfi_sgl sgl;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_abort_frame {
     struct mfi_frame_header header;
@@ -512,7 +512,7 @@ struct mfi_abort_frame {
     uint32_t abort_mfi_addr_lo;
     uint32_t abort_mfi_addr_hi;
     uint32_t reserved1[6];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_smp_frame {
     struct mfi_frame_header header;
@@ -521,7 +521,7 @@ struct mfi_smp_frame {
         struct mfi_sg32 sg32[2];
         struct mfi_sg64 sg64[2];
     } sgl;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_stp_frame {
     struct mfi_frame_header header;
@@ -531,7 +531,7 @@ struct mfi_stp_frame {
         struct mfi_sg32 sg32[2];
         struct mfi_sg64 sg64[2];
     } sgl;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 union mfi_frame {
     struct mfi_frame_header header;
@@ -563,7 +563,7 @@ struct mfi_init_qinfo {
     uint32_t pi_addr_hi;
     uint32_t ci_addr_lo;
     uint32_t ci_addr_hi;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Controller properties */
 struct mfi_ctrl_props {
@@ -626,7 +626,7 @@ struct mfi_ctrl_props {
                                * is spun down (0=use FW defaults)
                                */
     uint8_t reserved[24];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* PCI information about the card. */
 struct mfi_info_pci {
@@ -635,7 +635,7 @@ struct mfi_info_pci {
     uint16_t subvendor;
     uint16_t subdevice;
     uint8_t reserved[24];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Host (front end) interface information */
 struct mfi_info_host {
@@ -647,7 +647,7 @@ struct mfi_info_host {
     uint8_t reserved[6];
     uint8_t port_count;
     uint64_t port_addr[8];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Device (back end) interface information */
 struct mfi_info_device {
@@ -659,7 +659,7 @@ struct mfi_info_device {
     uint8_t reserved[6];
     uint8_t port_count;
     uint64_t port_addr[8];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Firmware component information */
 struct mfi_info_component {
@@ -667,7 +667,7 @@ struct mfi_info_component {
     char version[32];
     char build_date[16];
     char build_time[16];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Controller default settings */
 struct mfi_defaults {
@@ -710,7 +710,7 @@ struct mfi_defaults {
     uint8_t fde_only;
     uint8_t delay_during_post;
     uint8_t resv[19];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* Controller default settings */
 struct mfi_bios_data {
@@ -722,7 +722,7 @@ struct mfi_bios_data {
     uint8_t expose_all_drives;
     uint8_t reserved[56];
     uint8_t check_sum;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* SAS (?) controller info, returned from MFI_DCMD_CTRL_GETINFO. */
 struct mfi_ctrl_info {
@@ -807,7 +807,7 @@ struct mfi_ctrl_info {
         uint8_t min;
         uint8_t max;
         uint8_t reserved[2];
-    } __attribute__ ((packed)) stripe_sz_ops;
+    } QEMU_PACKED stripe_sz_ops;
 
     uint32_t pd_ops;
 #define MFI_INFO_PDOPS_FORCE_ONLINE     0x01
@@ -826,7 +826,7 @@ struct mfi_ctrl_info {
     struct mfi_ctrl_props properties;
     char package_version[0x60];
     uint8_t pad[0x800 - 0x6a0];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* keep track of an event. */
 union mfi_evt {
@@ -836,7 +836,7 @@ union mfi_evt {
         int8_t class;
     } members;
     uint32_t word;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* event log state. */
 struct mfi_evt_log_state {
@@ -845,24 +845,24 @@ struct mfi_evt_log_state {
     uint32_t clear_seq_num;
     uint32_t shutdown_seq_num;
     uint32_t boot_seq_num;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_progress {
     uint16_t progress;
     uint16_t elapsed_seconds;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_evt_ld {
     uint16_t target_id;
     uint8_t ld_index;
     uint8_t reserved;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_evt_pd {
     uint16_t device_id;
     uint8_t enclosure_index;
     uint8_t slot_number;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 /* event detail, returned from MFI_DCMD_CTRL_EVENT_WAIT. */
 struct mfi_evt_detail {
@@ -982,13 +982,13 @@ struct mfi_evt_detail {
     } args;
 
     char description[128];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_evt_list {
     uint32_t count;
     uint32_t reserved;
     struct mfi_evt_detail event[1];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 union mfi_pd_ref {
     struct {
@@ -996,7 +996,7 @@ union mfi_pd_ref {
         uint16_t seq_num;
     } v;
     uint32_t ref;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 union mfi_pd_ddf_type {
     struct {
@@ -1016,7 +1016,7 @@ union mfi_pd_ddf_type {
         uint32_t reserved;
     } non_disk;
     uint32_t type;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_pd_progress {
     uint32_t active;
@@ -1027,7 +1027,7 @@ struct mfi_pd_progress {
     struct mfi_progress patrol;
     struct mfi_progress clear;
     struct mfi_progress reserved[4];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_pd_info {
     union mfi_pd_ref ref;
@@ -1062,7 +1062,7 @@ struct mfi_pd_info {
     uint8_t unusable_in_current_config;
     uint8_t vpd_page83_ext[64];
     uint8_t reserved[512-358];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_pd_address {
     uint16_t device_id;
@@ -1072,14 +1072,14 @@ struct mfi_pd_address {
     uint8_t scsi_dev_type;
     uint8_t connect_port_bitmap;
     uint64_t sas_addr[2];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_MAX_SYS_PDS 240
 struct mfi_pd_list {
     uint32_t size;
     uint32_t count;
     struct mfi_pd_address addr[MFI_MAX_SYS_PDS];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 union mfi_ld_ref {
     struct {
@@ -1088,7 +1088,7 @@ union mfi_ld_ref {
         uint16_t seq;
     } v;
     uint32_t ref;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_ld_list {
     uint32_t ld_count;
@@ -1099,7 +1099,7 @@ struct mfi_ld_list {
         uint8_t reserved2[3];
         uint64_t size;
     } ld_list[MFI_MAX_LD];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 enum mfi_ld_access {
     MFI_LD_ACCESS_RW =          0,
@@ -1136,7 +1136,7 @@ struct mfi_ld_props {
     uint8_t current_cache_policy;
     uint8_t no_bgi;
     uint8_t reserved[7];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_ld_params {
     uint8_t primary_raid_level;
@@ -1149,7 +1149,7 @@ struct mfi_ld_params {
     uint8_t init_state;
     uint8_t is_consistent;
     uint8_t reserved[23];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_ld_progress {
     uint32_t            active;
@@ -1162,21 +1162,21 @@ struct mfi_ld_progress {
     struct mfi_progress fgi;
     struct mfi_progress recon;
     struct mfi_progress reserved[4];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_span {
     uint64_t start_block;
     uint64_t num_blocks;
     uint16_t array_ref;
     uint8_t reserved[6];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_MAX_SPAN_DEPTH      8
 struct mfi_ld_config {
     struct mfi_ld_props properties;
     struct mfi_ld_params params;
     struct mfi_span span[MFI_MAX_SPAN_DEPTH];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_ld_info {
     struct mfi_ld_config ld_config;
@@ -1187,7 +1187,7 @@ struct mfi_ld_info {
     uint8_t reserved1[1];
     uint8_t vpd_page83[64];
     uint8_t reserved2[16];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 union mfi_spare_type {
     uint8_t flags;
@@ -1195,7 +1195,7 @@ union mfi_spare_type {
 #define MFI_SPARE_IS_REVERTABLE (1 << 1)
 #define MFI_SPARE_IS_ENCL_AFFINITY (1 << 2)
     uint8_t type;
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_MAX_ARRAYS 16
 struct mfi_spare {
@@ -1204,7 +1204,7 @@ struct mfi_spare {
     uint8_t reserved[2];
     uint8_t array_count;
     uint16_t array_refd[MFI_MAX_ARRAYS];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_MAX_ROW_SIZE 32
 struct mfi_array {
@@ -1221,7 +1221,7 @@ struct mfi_array {
             uint8_t slot;
         } encl;
     } pd[MFI_MAX_ROW_SIZE];
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 struct mfi_config_data {
     uint32_t size;
@@ -1237,7 +1237,7 @@ struct mfi_config_data {
       struct mfi_ld_config ld[];
       struct mfi_spare  spare[];
     */
-} __attribute__ ((packed));
+} QEMU_PACKED;
 
 #define MFI_SCSI_MAX_TARGETS  128
 #define MFI_SCSI_MAX_LUNS       8
diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c
index fddf219..c5b8e05 100644
--- a/hw/ppce500_spin.c
+++ b/hw/ppce500_spin.c
@@ -40,7 +40,7 @@ typedef struct spin_info {
     uint32_t resv;
     uint32_t pir;
     uint64_t reserved;
-} __attribute__ ((packed)) SpinInfo;
+} QEMU_PACKED SpinInfo;
 
 typedef struct spin_state {
     SysBusDevice busdev;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 4/6] cpus.c: Make all_cpu_threads_idle() static
  2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
                   ` (2 preceding siblings ...)
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 3/6] Use macro QEMU_PACKED for new packed structures Stefan Hajnoczi
@ 2012-07-21 12:27 ` Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 5/6] qdev: Fix Open Firmware comment Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 6/6] Fix some more Qemus in documentation and help text Stefan Hajnoczi
  5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Peter Maydell, qemu-devel, Stefan Hajnoczi

From: Peter Maydell <peter.maydell@linaro.org>

Commit 946fb27c1 moved all the uses of all_cpu_threads_idle()
into cpus.c. This means we can mark the function 'static'
(again), if we shuffle it a bit earlier in the source file.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 cpus.c        |   52 ++++++++++++++++++++++++++--------------------------
 qemu-common.h |    1 -
 2 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/cpus.c b/cpus.c
index b182b3d..756e624 100644
--- a/cpus.c
+++ b/cpus.c
@@ -61,6 +61,32 @@
 
 static CPUArchState *next_cpu;
 
+static bool cpu_thread_is_idle(CPUArchState *env)
+{
+    if (env->stop || env->queued_work_first) {
+        return false;
+    }
+    if (env->stopped || !runstate_is_running()) {
+        return true;
+    }
+    if (!env->halted || qemu_cpu_has_work(env) || kvm_irqchip_in_kernel()) {
+        return false;
+    }
+    return true;
+}
+
+static bool all_cpu_threads_idle(void)
+{
+    CPUArchState *env;
+
+    for (env = first_cpu; env != NULL; env = env->next_cpu) {
+        if (!cpu_thread_is_idle(env)) {
+            return false;
+        }
+    }
+    return true;
+}
+
 /***********************************************************/
 /* guest cycle counter */
 
@@ -433,32 +459,6 @@ static int cpu_can_run(CPUArchState *env)
     return 1;
 }
 
-static bool cpu_thread_is_idle(CPUArchState *env)
-{
-    if (env->stop || env->queued_work_first) {
-        return false;
-    }
-    if (env->stopped || !runstate_is_running()) {
-        return true;
-    }
-    if (!env->halted || qemu_cpu_has_work(env) || kvm_irqchip_in_kernel()) {
-        return false;
-    }
-    return true;
-}
-
-bool all_cpu_threads_idle(void)
-{
-    CPUArchState *env;
-
-    for (env = first_cpu; env != NULL; env = env->next_cpu) {
-        if (!cpu_thread_is_idle(env)) {
-            return false;
-        }
-    }
-    return true;
-}
-
 static void cpu_handle_guest_debug(CPUArchState *env)
 {
     gdb_set_stop_cpu(env);
diff --git a/qemu-common.h b/qemu-common.h
index 09676f5..7c8dac8 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -293,7 +293,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id);
 void qemu_cpu_kick(void *env);
 void qemu_cpu_kick_self(void);
 int qemu_cpu_is_self(void *env);
-bool all_cpu_threads_idle(void);
 
 /* work queue */
 struct qemu_work_item {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 5/6] qdev: Fix Open Firmware comment
  2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
                   ` (3 preceding siblings ...)
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 4/6] cpus.c: Make all_cpu_threads_idle() static Stefan Hajnoczi
@ 2012-07-21 12:27 ` Stefan Hajnoczi
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 6/6] Fix some more Qemus in documentation and help text Stefan Hajnoczi
  5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi

From: Stefan Weil <sw@weilnetz.de>

Commit 0d936928ef87ca1bb7b41b5b89c400c699a7691c removed code,
but left the related comment at a location where it no longer
belongs to.

The patch moves the comment to the correct callback and improves the text.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/qdev.h |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/hw/qdev.h b/hw/qdev.h
index 247dd1e..a2cbd9d 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -78,12 +78,6 @@ struct DeviceState {
     int alias_required_for_version;
 };
 
-/*
- * This callback is used to create Open Firmware device path in accordance with
- * OF spec http://forthworks.com/standards/of1275.pdf. Indicidual bus bindings
- * can be found here http://playground.sun.com/1275/bindings/.
- */
-
 #define TYPE_BUS "bus"
 #define BUS(obj) OBJECT_CHECK(BusState, (obj), TYPE_BUS)
 #define BUS_CLASS(klass) OBJECT_CLASS_CHECK(BusClass, (klass), TYPE_BUS)
@@ -95,6 +89,11 @@ struct BusClass {
     /* FIXME first arg should be BusState */
     void (*print_dev)(Monitor *mon, DeviceState *dev, int indent);
     char *(*get_dev_path)(DeviceState *dev);
+    /*
+     * This callback is used to create Open Firmware device path in accordance
+     * with OF spec http://forthworks.com/standards/of1275.pdf. Individual bus
+     * bindings can be found at http://playground.sun.com/1275/bindings/.
+     */
     char *(*get_fw_dev_path)(DeviceState *dev);
     int (*reset)(BusState *bus);
 };
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 6/6] Fix some more Qemus in documentation and help text
  2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
                   ` (4 preceding siblings ...)
  2012-07-21 12:27 ` [Qemu-devel] [PATCH 5/6] qdev: Fix Open Firmware comment Stefan Hajnoczi
@ 2012-07-21 12:27 ` Stefan Hajnoczi
  5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-07-21 12:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi

From: Stefan Weil <sw@weilnetz.de>

Hopefully they will be eliminated one day.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 docs/usb-storage.txt |    2 +-
 qemu-options.hx      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/usb-storage.txt b/docs/usb-storage.txt
index ff97559..e58e849 100644
--- a/docs/usb-storage.txt
+++ b/docs/usb-storage.txt
@@ -2,7 +2,7 @@
 qemu usb storage emulation
 --------------------------
 
-Qemu has two emulations for usb storage devices.
+QEMU has two emulations for usb storage devices.
 
 Number one emulates the classic bulk-only transport protocol which is
 used by 99% of the usb sticks on the marked today and is called
diff --git a/qemu-options.hx b/qemu-options.hx
index 97245a3..dc68e15 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1439,7 +1439,7 @@ Forward guest TCP connections to the IP address @var{server} on port @var{port}
 to the character device @var{dev} or to a program executed by @var{cmd:command}
 which gets spawned for each connection. This option can be given multiple times.
 
-You can either use a chardev directly and have that one used throughout Qemu's
+You can either use a chardev directly and have that one used throughout QEMU's
 lifetime, like in the following example:
 
 @example
@@ -1449,7 +1449,7 @@ qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...]
 @end example
 
 Or you can execute a command on every TCP connection established by the guest,
-so that Qemu behaves similar to an inetd process for that virtual server:
+so that QEMU behaves similar to an inetd process for that virtual server:
 
 @example
 # call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-21 12:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21 12:26 [Qemu-devel] [PULL 0/6] Trivial patches for 14 to 21 July 2012 Stefan Hajnoczi
2012-07-21 12:27 ` [Qemu-devel] [PATCH 1/6] powerpc pci: fixed packing of ranges[] Stefan Hajnoczi
2012-07-21 12:27 ` [Qemu-devel] [PATCH 2/6] Recognize PCID feature Stefan Hajnoczi
2012-07-21 12:27 ` [Qemu-devel] [PATCH 3/6] Use macro QEMU_PACKED for new packed structures Stefan Hajnoczi
2012-07-21 12:27 ` [Qemu-devel] [PATCH 4/6] cpus.c: Make all_cpu_threads_idle() static Stefan Hajnoczi
2012-07-21 12:27 ` [Qemu-devel] [PATCH 5/6] qdev: Fix Open Firmware comment Stefan Hajnoczi
2012-07-21 12:27 ` [Qemu-devel] [PATCH 6/6] Fix some more Qemus in documentation and help text Stefan Hajnoczi

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).