qemu-patch-raspberry4/target/i386
Eduardo Habkost e90f2a8c3e qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable
cannot_instantiate_with_device_add_yet was introduced by commit
efec3dd631 to replace no_user. It was
supposed to be a temporary measure.

When it was introduced, we had 54
cannot_instantiate_with_device_add_yet=true lines in the code.
Today (3 years later) this number has not shrunk: we now have
57 cannot_instantiate_with_device_add_yet=true lines. I think it
is safe to say it is not a temporary measure, and we won't see
the flag go away soon.

Instead of a long field name that misleads people to believe it
is temporary, replace it a shorter and less misleading field:
user_creatable.

Except for code comments, changes were generated using the
following Coccinelle patch:

  @@
  expression DC;
  @@
  (
  -DC->cannot_instantiate_with_device_add_yet = false;
  +DC->user_creatable = true;
  |
  -DC->cannot_instantiate_with_device_add_yet = true;
  +DC->user_creatable = false;
  )

  @@
  typedef ObjectClass;
  expression dc;
  identifier class, data;
  @@
   static void device_class_init(ObjectClass *class, void *data)
   {
   ...
   dc->hotpluggable = true;
  +dc->user_creatable = true;
   ...
   }

  @@
  @@
   struct DeviceClass {
   ...
  -bool cannot_instantiate_with_device_add_yet;
  +bool user_creatable;
   ...
  }

  @@
  expression DC;
  @@
  (
  -!DC->cannot_instantiate_with_device_add_yet
  +DC->user_creatable
  |
  -DC->cannot_instantiate_with_device_add_yet
  +!DC->user_creatable
  )

Cc: Alistair Francis <alistair.francis@xilinx.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Thomas Huth <thuth@redhat.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20170503203604.31462-2-ehabkost@redhat.com>
[ehabkost: kept "TODO remove once we're there" comment]
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-05-17 10:37:00 -03:00
..
arch_dump.c hmp: fix "dump-quest-memory" segfault 2017-03-31 11:53:42 +01:00
arch_memory_mapping.c x86: implement la57 paging mode 2016-12-22 16:01:04 +01:00
bpt_helper.c target-i386: Fix eflags.TF/#DB handling of syscall/sysret insns 2016-12-22 16:01:04 +01:00
cc_helper.c target-i386: Use ctpop helper 2017-01-10 08:49:59 -08:00
cc_helper_template.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu-qom.h i386: Define static "base" CPU model 2017-02-27 13:23:27 -03:00
cpu.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
cpu.h i386: Don't override -cpu options on -cpu host/max 2017-03-28 16:41:10 -03:00
excp_helper.c target-i386: correctly propagate retaddr into SVM helpers 2017-02-16 18:37:01 +01:00
fpu_helper.c linux-user: Add signal handling support for x86_64 2017-02-27 23:10:02 +01:00
gdbstub.c x86: Fix x86_64 'g' packet response to gdb from 32-bit mode. 2016-12-22 16:00:25 +01:00
hax-all.c target/i386: Add Intel HAX files 2017-01-19 22:07:46 +01:00
hax-darwin.c hax: add Darwin support 2017-01-19 22:07:46 +01:00
hax-darwin.h hax: add Darwin support 2017-01-19 22:07:46 +01:00
hax-i386.h hax: add Darwin support 2017-01-19 22:07:46 +01:00
hax-interface.h target/i386: Add Intel HAX files 2017-01-19 22:07:46 +01:00
hax-mem.c hax: Fix memory mapping de-duplication logic 2017-05-05 12:10:00 +02:00
hax-windows.c target/i386: Add Intel HAX files 2017-01-19 22:07:46 +01:00
hax-windows.h target/i386: Add Intel HAX files 2017-01-19 22:07:46 +01:00
helper.c target-i386: fix "info lapic" segfault on isapc 2017-04-02 21:17:47 +02:00
helper.h target-i386: correctly propagate retaddr into SVM helpers 2017-02-16 18:37:01 +01:00
hyperv.c event_notifier: cleanups around event_notifier_set_handler 2017-01-16 17:52:35 +01:00
hyperv.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
int_helper.c target-i386: Use clz and ctz opcodes 2017-01-10 08:06:11 -08:00
kvm-stub.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
kvm.c kvm: Print MSR information if KVM_{GET,SET}_MSRS failed 2017-03-14 13:26:36 +01:00
kvm_i386.h kvmclock: reduce kvmclock difference on migration 2016-12-22 16:00:56 +01:00
machine.c migration/i386: Remove support for pre-0.12 formats 2017-05-11 16:08:51 -03:00
Makefile.objs hax: add Darwin support 2017-01-19 22:07:46 +01:00
mem_helper.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
misc_helper.c target/i386/misc_helper: wrap BQL around another IRQ generator 2017-04-10 10:14:50 +01:00
monitor.c monitor: Fix crashes when using HMP commands without CPU 2017-02-21 18:29:01 +00:00
mpx_helper.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
ops_sse.h target-i386: Use ctpop helper 2017-01-10 08:49:59 -08:00
ops_sse_header.h target-i386: Use ctpop helper 2017-01-10 08:49:59 -08:00
seg_helper.c target-i386: defer VMEXIT to do_interrupt 2017-03-09 10:41:48 +00:00
shift_helper_template.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
smm_helper.c tcg: drop global lock during TCG code execution 2017-02-24 10:32:45 +00:00
svm.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
svm_helper.c target-i386: defer VMEXIT to do_interrupt 2017-03-09 10:41:48 +00:00
TODO Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
trace-events Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
translate.c tcg/i386: Check the size of instruction being translated 2017-03-24 11:49:38 +01:00