qemu-e2k/hw
Pavel Fedin 4b3cfe72d9 intc/gic: Extract some reusable vGIC code
Some functions previously used only by vGICv2 are useful also for vGICv3
implementation. Untie them from GICState and make accessible from within
other modules:
- kvm_arm_gic_set_irq()
- kvm_gic_supports_attr() - moved to common code and renamed to
  kvm_device_check_attr()
- kvm_gic_access() - turned into GIC-independent kvm_device_access().
  Data pointer changed to void * because some GICv3 registers are
  64-bit wide

Some of these changes are not used right now, but they will be helpful for
implementing live migration.

Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but
they would require two extra parameters (s->dev_fd and s->num_cpu) as well as
lots of typecasts of 's' to DeviceState * and back to GICState *. This makes
the code very ugly so i decided to stop at this point. I tried also an
approach with making a base class for all possible GICs, but it would contain
only three variables (dev_fd, cpu_num and irq_num), and accessing them through
the rest of the code would be again tedious (either ugly casts or qemu-style
separate object pointer). So i disliked it too.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Tested-by: Ashok kumar <ashoks@broadcom.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 2ef56d1dd64ffb75ed02a10dcdaf605e5b8ff4f8.1441784344.git.p.fedin@samsung.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-09-24 01:29:36 +01:00
..
9pfs virtio: get_features() can fail 2015-07-27 18:11:53 +03:00
acpi hw/acpi/ich9: clean up stale comment about KVM not supporting SMM 2015-07-27 22:44:47 +03:00
alpha Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
arm Revert use of DEFINE_MACHINE() for registrations of multiple machines 2015-09-19 16:40:27 +02:00
audio typofixes - v4 2015-09-11 10:45:43 +03:00
block Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
bt maint: avoid useless "if (foo) free(foo)" pattern 2015-09-11 10:21:38 +03:00
char maint: avoid useless "if (foo) free(foo)" pattern 2015-09-11 10:21:38 +03:00
core Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
cpu hw/cpu/{a15mpcore, a9mpcore}: Handle missing has_el3 CPU props gracefully 2015-09-14 14:39:49 +01:00
cris Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
display Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
dma * Support for jemalloc 2015-09-14 16:13:16 +01:00
gpio i.MX: Add GPIO device 2015-09-14 14:39:49 +01:00
i2c i.MX: Add I2C controller emulator 2015-09-07 10:39:30 +01:00
i386 Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
ide ahci: clean up initial d2h semantics 2015-09-18 10:58:56 -04:00
input Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
intc intc/gic: Extract some reusable vGIC code 2015-09-24 01:29:36 +01:00
ipack pci: Trivial device model conversions to realize 2015-02-26 12:42:16 +01:00
isa i8257: remove cpu_request_exit irq 2015-09-09 15:34:53 +02:00
lm32 Revert use of DEFINE_MACHINE() for registrations of multiple machines 2015-09-19 16:40:27 +02:00
m68k Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
mem numa,pc-dimm: Store pc-dimm memory information in numa_info 2015-07-03 17:47:58 -03:00
microblaze Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
mips Revert use of DEFINE_MACHINE() for registrations of multiple machines 2015-09-19 16:40:27 +02:00
misc mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete 2015-09-20 22:48:38 +02:00
moxie Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
net Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
nvram maint: avoid useless "if (foo) free(foo)" pattern 2015-09-11 10:21:38 +03:00
openrisc Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
pci Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
pci-bridge hw/pci-bridge: format special OFW unit address for PXB host 2015-06-23 22:58:36 +02:00
pci-host PPC: e500 pci host: Fix ATMUs register reads 2015-09-20 22:48:39 +02:00
pcmcia hmp: Remove "info pcmcia" 2014-10-24 12:19:11 +01:00
ppc sPAPR: Enable EEH on VFIO PCI device only 2015-09-23 10:51:11 +10:00
s390x machine: Set MachineClass::name automatically 2015-09-19 16:39:28 +02:00
scsi * Support for jemalloc 2015-09-14 16:13:16 +01:00
sd typofixes - v4 2015-09-11 10:45:43 +03:00
sh4 Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
smbios smbios: add smbios 3.0 support 2015-09-07 10:39:28 +01:00
sparc Revert use of DEFINE_MACHINE() for registrations of multiple machines 2015-09-19 16:40:27 +02:00
sparc64 Revert use of DEFINE_MACHINE() for registrations of multiple machines 2015-09-19 16:40:27 +02:00
ssi arm: Use g_new() & friends where that makes obvious sense 2015-09-07 10:39:27 +01:00
timer i.MX: KZM: use standalone i.MX31 SOC support 2015-09-07 10:39:30 +01:00
tpm maint: remove unused include for dirent.h 2015-09-11 10:21:38 +03:00
tricore Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
unicore32 Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
usb maint: avoid useless "if (foo) free(foo)" pattern 2015-09-11 10:21:38 +03:00
vfio vfio/pci: Add emulated PCI IDs 2015-09-23 13:04:49 -06:00
virtio hw/virtio/virtio-pci: Remove meaningless blank Property 2015-09-11 11:03:42 +03:00
watchdog i6300esb: fix timer overflow 2015-09-11 10:21:38 +03:00
xen typofixes - v4 2015-09-11 10:45:43 +03:00
xenpv Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
xtensa Revert use of DEFINE_MACHINE() for registrations of multiple machines 2015-09-19 16:40:27 +02:00
Makefile.objs smbios: move smbios code into a common folder 2015-08-13 14:08:30 +03:00