[Qemu-devel] [PATCH v2 06/14] pc_q35: configure Q35 instance using properties

2016-06-22 Thread Efimov Vasily
Currently, Q35 instance is configured using direct access to structure fields. The patch uses property interface to set the fields. Signed-off-by: Efimov Vasily <r...@ispras.ru> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/i386/pc_q35.c | 18 -- 1 file

[Qemu-devel] [PATCH v2 08/14] port92: handle A20 IRQ as GPIO

2016-06-22 Thread Efimov Vasily
as in previous version of code is not required qemu_set_irq will do it. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc.c | 10 +- include/hw/i386/pc.h | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7198ed5..2cd89a9

[Qemu-devel] [PATCH v2 09/14] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public

2016-06-22 Thread Efimov Vasily
ICH9 SMB bridge can be created using qdev API despite existence of helper function. The type name is needed for such creation. Using a preprocessor alias instead the string type name itself is preferable. The patch makes the alias accessible through the header. Signed-off-by: Efimov Vasily &l

[Qemu-devel] [PATCH v2 12/14] isa: introduce wrapper isa_connect_gpio_out

2016-06-22 Thread Efimov Vasily
Currently a direct access to the device structure field is used to connect ISA device IRQ to the bus. GPIO access should be used instead if possible. The patch adds wrapper isa_connect_gpio_out. The function connects specified output GPIO to specified ISA IRQ. Signed-off-by: Efimov Vasily &l

[Qemu-devel] [PATCH v2 14/14] ICH9 LPC: configure PCI IRQs routing internally

2016-06-22 Thread Efimov Vasily
several related functions are made static because they are no needed outside the bridge implementation any more. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc_q35.c | 3 --- hw/isa/lpc_ich9.c | 10 +++--- include/hw/i386/ich9.h | 3 --- 3 files changed, 7 inse

[Qemu-devel] [PATCH v2 04/14] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public

2016-06-22 Thread Efimov Vasily
-by: Efimov Vasily <r...@ispras.ru> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/block/pflash_cfi01.c | 1 - hw/block/pflash_cfi02.c | 1 - include/hw/block/flash.h | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pf

[Qemu-devel] [PATCH v2 10/14] ICH9 LPC: handle GSI as qdev GPIO

2016-06-22 Thread Efimov Vasily
The ICH9 LPC bridge has 24 output IRQs connected to GSI. Currently the IRQs are referenced by pointers. The pointers are initialized at startup by direct access to the structure fields. This violates Qemu device model. The patch makes the IRQs handling to use GPIO model. Signed-off-by: Efimov

[Qemu-devel] [PATCH v2 02/14] pcspk: convert "pit" property type from ptr to link

2016-06-22 Thread Efimov Vasily
The speaker device needs pointer to ISA PIT device to operate. But according to qdev-properties.h, properties of pointer type should be avoided. It seems a link type property is a good substitution. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/audio/pcspk.c | 9 +++-- i

[Qemu-devel] [PATCH v2 03/14] vmport: identify vmport type by macro TYPE_VMPORT

2016-06-22 Thread Efimov Vasily
Currently vmport device is identified by the string literal. Using a preprocessor alias instead is preferable. Signed-off-by: Efimov Vasily <r...@ispras.ru> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/misc/vmport.c | 1 - include/hw/i386/pc.h | 3 ++- 2 file

[Qemu-devel] [PATCH v2 05/14] Q35: implement property interfece to several parameters

2016-06-22 Thread Efimov Vasily
mch.address_space_io And, it adds two size type properties for fields: mch.below_4g_mem_size mch.above_4g_mem_size Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/pci-host/q35.c | 20 include/hw/i386/pc.h | 2 ++ include/hw/pci-host/q35.h | 5 + 3 files chang

[Qemu-devel] [PATCH v2 07/14] pckbd: handle A20 IRQ as GPIO

2016-06-22 Thread Efimov Vasily
version of code is not required because qemu_set_irq will do it. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/input/pckbd.c | 21 +++-- include/hw/i386/pc.h | 1 + 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c

[Qemu-devel] [PATCH v2 13/14] MC146818 RTC: add GPIO access to output IRQ

2016-06-22 Thread Efimov Vasily
The MC146818 RTC device has output IRQ line. Currently the corresponding field is only accessible through direct access. Such access violates Qemu model. The patch makes the field accessible through GPIO. It also updates the setting of the IRQ during initialization. Signed-off-by: Efimov Vasily

[Qemu-devel] [PATCH v2 11/14] ICH9 LPC: move call of isa_bus_irqs to 'realize' method

2016-06-22 Thread Efimov Vasily
bridge output IRQs to used for ISA bus too. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc_q35.c | 3 --- hw/isa/lpc_ich9.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d3213fd..0f04c13 100644 --- a/hw/i386/

[Qemu-devel] [PATCH v2 00/14] Make Q35 devices closer to Qemu object model.

2016-06-22 Thread Efimov Vasily
uces function isa_connect_gpio_out. 13 (previously 12): Use isa_connect_gpio_out instead of isa_init_irq. Efimov Vasily (14): ide: move headers to include folder pcspk: convert "pit" property type from ptr to link vmport: identify vmport type by macro TYPE_VMPORT pflash: make TYPE_CFI_PFL

[Qemu-devel] [PATCH v2 01/14] ide: move headers to include folder

2016-06-22 Thread Efimov Vasily
The patch moves "hw/ide/achi.h", "hw/ide/pci.h" and "hw/ide/internal.h" headers to corresponding folders inside "include" folder alike other Qemu headers. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/ide/ahci.c | 2

[Qemu-devel] [PATCH 01/13] ide: move headers to include folder

2016-06-17 Thread Efimov Vasily
The patch moves "hw/ide/achi.h", "hw/ide/pci.h" and "hw/ide/internal.h" headers to corresponding folders inside "include" folder alike other Qemu headers. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- This patch only moves headers (with the e

[Qemu-devel] [PATCH 13/13] ICH9 LPC: configure PCI IRQs routing internally

2016-06-17 Thread Efimov Vasily
several related functions are made static because they are no needed outside the bridge implementation any more. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc_q35.c | 3 --- hw/isa/lpc_ich9.c | 10 +++--- include/hw/i386/ich9.h | 3 --- 3 files changed, 7 inse

[Qemu-devel] [PATCH 12/13] MC146818 RTC: add GPIO access to output IRQ

2016-06-17 Thread Efimov Vasily
. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/timer/mc146818rtc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index a11b8b4..d88fe25 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -908,6

[Qemu-devel] [PATCH 05/13] Q35: implement property interfece to several parameters

2016-06-17 Thread Efimov Vasily
mch.address_space_io And, it adds two size type properties for fields: mch.below_4g_mem_size mch.above_4g_mem_size Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/pci-host/q35.c | 20 include/hw/i386/pc.h | 2 ++ include/hw/pci-host/q35.h | 5 + 3 files chang

[Qemu-devel] [PATCH 08/13] port92: handle A20 IRQ as GPIO

2016-06-17 Thread Efimov Vasily
as in previous version of code is not required qemu_set_irq will do it. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7198ed5..e8b92ea 100644 --- a/hw/i386/pc.c +++ b/hw/i38

[Qemu-devel] [PATCH 03/13] vmport: identify vmport type by macro TYPE_VMPORT

2016-06-17 Thread Efimov Vasily
Currently vmport device is identified by the string literal. Using a preprocessor alias instead is preferable. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/misc/vmport.c | 1 - include/hw/i386/pc.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/h

[Qemu-devel] [PATCH 07/13] pckbd: handle A20 IRQ as GPIO

2016-06-17 Thread Efimov Vasily
version of code is not required because qemu_set_irq will do it. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/input/pckbd.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 1d932ec..1406b6b 100644 --

[Qemu-devel] [PATCH 06/13] pc_q35: configure Q35 instance using properties

2016-06-17 Thread Efimov Vasily
Currently, Q35 instance is configured using direct access to structure fields. The patch uses property interface to set the fields. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc_q35.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/h

[Qemu-devel] [PATCH 04/13] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public

2016-06-17 Thread Efimov Vasily
-by: Efimov Vasily <r...@ispras.ru> --- hw/block/pflash_cfi01.c | 1 - hw/block/pflash_cfi02.c | 1 - include/hw/block/flash.h | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 31585e3..62d7a56 100644 --- a/hw

[Qemu-devel] [PATCH 11/13] ICH9 LPC: move call of isa_bus_irqs to 'realize' method

2016-06-17 Thread Efimov Vasily
bridge output IRQs to used for ISA bus too. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc_q35.c | 3 --- hw/isa/lpc_ich9.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a1fad2b..4661be2 100644 --- a/hw/i386/

[Qemu-devel] [PATCH 10/13] ICH9 LPC: handle PIC and I/O APIC IRQs as qdev GPIO

2016-06-17 Thread Efimov Vasily
. The patch makes the IRQs handling to use GPIO model. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/i386/pc_q35.c | 11 +-- hw/isa/lpc_ich9.c | 4 include/hw/i386/ich9.h | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_q35.c b/h

[Qemu-devel] [PATCH 09/13] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public

2016-06-17 Thread Efimov Vasily
ICH9 SMB bridge can be created using qdev API despite existence of helper function. The type name is needed for such creation. Using a preprocessor alias instead the string type name itself is preferable. The patch makes the alias accessible through the header. Signed-off-by: Efimov Vasily &l

[Qemu-devel] [PATCH 02/13] pcspk: convert "pit" property type from ptr to link

2016-06-17 Thread Efimov Vasily
The speaker device needs pointer to ISA PIT device to operate. But according to qdev-properties.h, properties of pointer type should be avoided. It seems a link type property is a good substitution. Signed-off-by: Efimov Vasily <r...@ispras.ru> --- hw/audio/pcspk.c | 7 +-- i

[Qemu-devel] [PATCH 00/13] Make Q35 devices closer to Qemu object model.

2016-06-17 Thread Efimov Vasily
devices. The stubs for thay is also generated by the tool. In course of implementing Q35 I've noticed that some device models does not follow Qemu object model close enough. The patch series is desined to make them closer. Efimov Vasily (13): ide: move headers to include folder pcspk

[Qemu-devel] [PATCH v2] PAM: make PAM emulation closer to documentation

2015-07-20 Thread Efimov Vasily
PCI and RAM regions. The memory commit callbacks are used to keep read source and write destination address spaces and ram_addr up to date. Signed-off-by: Efimov Vasily r...@ispras.ru --- v2 change: - use address spaces for access redirection Qemu distribution includes SeaBIOS which has hacks

[Qemu-devel] [PATCH 2/3] memory: make function memory_access_is_direct public

2015-07-16 Thread Efimov Vasily
Make function memory_access_is_direct public. It is required by PAM emulation. Signed-off-by: Efimov Vasily r...@ispras.ru --- exec.c | 12 include/exec/memory-internal.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation

2015-07-16 Thread Efimov Vasily
are updated by the memory commit callback. Note that we cannot use I/O region for PAM as it will violate trying to execute code outside RAM or ROM assertion. Signed-off-by: Efimov Vasily r...@ispras.ru --- hw/pci-host/pam.c | 238 +- include/hw/pci

[Qemu-devel] [PATCH 0/3] PAM emulation improvement

2015-07-16 Thread Efimov Vasily
; -} // Ram already present - just enable writes __make_bios_writable_intel(bdf, pam0); } Efimov Vasily (3): memory: make function invalidate_and_set_dirty public memory: make function memory_access_is_direct public PAM: make PAM emulation closer to documentation exec.c

[Qemu-devel] [PATCH 1/3] memory: make function invalidate_and_set_dirty public

2015-07-16 Thread Efimov Vasily
Make function invalidate_and_set_dirty public. It is required by PAM emulation. Signed-off-by: Efimov Vasily r...@ispras.ru --- exec.c | 2 +- include/exec/memory-internal.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index

[Qemu-devel] [PATCH v2] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.

2013-08-14 Thread Efimov Vasily
QEMU has 'dtb' option for specifing the device tree file for the kernel. The patch adds support for this option to the 'virtex_ml507' machine implementation. Signed-off-by: Efimov Vasily r...@ispras.ru --- hw/ppc/virtex_ml507.c | 29 +++-- 1 file changed, 19 insertions

[Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.

2013-08-13 Thread Efimov Vasily
Signed-off-by: Efimov Vasily r...@ispras.ru --- hw/ppc/virtex_ml507.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index 08e77fb..a00f709 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c