[Qemu-devel] [RESEND PATCH v3 2/8] acpi, ich9: Add memory hot unplug support for ich9.

2014-08-27 Thread Tang Chen
Implement ich9_pm_device_unplug_cb() to support memory hot-remove, calling acpi_memory_unplug_cb(). And itself will be called in ich9_device_unplug_cb(). Signed-off-by: Tang Chen --- hw/acpi/ich9.c | 12 hw/isa/lpc_ich9.c | 5 +++-- include/hw/acpi/ich9.h | 2 ++ 3

[Qemu-devel] [RESEND PATCH v3 1/8] acpi, piix4: Add memory hot unplug support for piix4.

2014-08-27 Thread Tang Chen
From: Hu Tao Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger memory hot-remove, and call it in piix4_device_unplug_cb(). Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 25 + hw/acpi/piix4.c

[Qemu-devel] [RESEND PATCH v3 4/8] qdev: Add memory hot unplug support for bus-less devices.

2014-08-27 Thread Tang Chen
From: Hu Tao Implement bus-less device hot-remove in qdev_unplug(). It will call PCMachine callback introduced in previous patch. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/core/qdev.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c

[Qemu-devel] [RESEND PATCH v3 3/8] pc: Add memory hot unplug support for pc machine.

2014-08-27 Thread Tang Chen
From: Hu Tao Implement device unplug callback for PCMachine. And it now only support pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced in previous patches. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/i386/pc.c | 32 1

[Qemu-devel] [RFC PATCH v1 2/4] Add event handling for memory device insertion.

2014-08-27 Thread Tang Chen
Define device insertion OST event and status, and add a function to handle memory insertion. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 18 ++ include/hw/acpi/acpi.h | 10 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/hw/acpi

[Qemu-devel] [RESEND PATCH v3 8/8] monitor: Add memory hot unplug support for device_del command.

2014-08-27 Thread Tang Chen
From: Hu Tao Implement find_peripheral_device() to find bus-less device, and call it in qmp_device_del() so that device_del command will be able to remove memory device. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- include/qom/object.h | 1 + qdev-monitor.c | 23

[Qemu-devel] [RFC PATCH v1 0/4] Handle memory hotplug errors from guest OS.

2014-08-27 Thread Tang Chen
ACPI hardware operations. So this patch-set introduces a wait condition variable to synchronize these two threads. Tang Chen (4): Use macro to define ACPI notification event. Add event handling for memory device insertion. Introduce wait condition to catch guest OS memory hotplug error. Handle m

[Qemu-devel] [RESEND PATCH v3 5/8] pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.

2014-08-27 Thread Tang Chen
From: Hu Tao Implement unrealize function for pc-dimm device. It delete subregion from hotplug region, and delete ram address range from guest ram list. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/mem/pc-dimm.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/mem

[Qemu-devel] [RFC PATCH v1 4/4] Handle memory hotplug error from guest OS in QEmu.

2014-08-27 Thread Tang Chen
vcpu thread after OST status is written to ACPI register, this patch checks OST status, and report an error to users, and cancel hotplug progress if necessary. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 83 +--- 1 file changed, 79 inser

[Qemu-devel] [RESEND PATCH v3 6/8] acpi: Add hardware implementation for memory hot unplug.

2014-08-27 Thread Tang Chen
ing memory hot-remove in guest. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 62 ++-- include/hw/acpi/acpi.h | 14 + include/hw/acpi/memory_hotplug.h | 1 + 3 files changed, 74 insertions(+), 3 deletion

[Qemu-devel] [RFC PATCH v1 3/4] Introduce wait condition to catch guest OS memory hotplug error.

2014-08-27 Thread Tang Chen
signal QEmu when OST status is written into ACPI register. This is used by the following patch. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index

[Qemu-devel] [RESEND PATCH v3 7/8] pc, acpi bios: Add memory hot unplug interface.

2014-08-27 Thread Tang Chen
From: Hu Tao This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/i386/ssdt-mem.dsl | 5 + hw/i386/ssdt-misc.dsl| 15 ++- include/hw/acpi/pc-hotplug.h | 2 ++ 3 files changed, 21

[Qemu-devel] [RFC PATCH v1 1/4] Use macro to define ACPI notification event.

2014-08-27 Thread Tang Chen
According to ACPI spec, device object notification values define insertion request (Device Check) as 1, and ejection request as 3. Use macro to define them. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 7 +-- include/hw/acpi/acpi.h | 5 - 2 files changed, 9 insertions

[Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-27 Thread Tiejun Chen
We will try to reuse assign_dev_load_option_rom in xen side, and especially its a good beginning to unify pci assign codes both on kvm and xen in the future. Signed-off-by: Tiejun Chen --- hw/i386/kvm/pci-assign.c| 170 +--- include/hw/pci/pci_assign.h | 204

[Qemu-devel] [PATCH 0/1] qemu:pci-assign: try to pci-assign.c

2014-08-27 Thread Tiejun Chen
OS!\n"); +rc = -1; +goto out; +} ... ---- Tiejun Chen (1): hw/pci-assign: split pci-assign.c hw/i386/kvm/pci-assign.c| 170 +++--

Re: [Qemu-devel] [PATCH 0/1] qemu:pci-assign: try to pci-assign.c

2014-08-27 Thread Chen, Tiejun
On 2014/8/27 17:29, Laszlo Ersek wrote: On 08/27/14 11:13, Tiejun Chen wrote: As you know I'm working on supporting IGD passthrough. Here we need load VGABIOS to work out IGD case. Obviously something may be duplicated to kvm codes, we should unify some codes but looks its not easy to f

Re: [Qemu-devel] [PATCH 0/1] qemu:pci-assign: try to pci-assign.c

2014-08-27 Thread Chen, Tiejun
On 2014/8/27 17:39, Laszlo Ersek wrote: On 08/27/14 11:34, Chen, Tiejun wrote: On 2014/8/27 17:29, Laszlo Ersek wrote: Just to make it clear: I'm assuming that you CC'd me because get-maintainer.pl listed my name, as a committer. I had one series in Yes. this area that impr

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-08-27 Thread Chen, Tiejun
+ */ +dev = pci_create_simple(bus, PCI_DEVFN(0x1f, 0), +"xen-igd-passthrough-isa-bridge"); +if (dev) { +r = xen_host_pci_device_get(&hdev, 0, 0, PCI_DEVFN(0x1f, 0), 0); +if (!r) { +pci_config_set_vendor_id(dev->config, hdev.vendor

Re: [Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-27 Thread Chen, Tiejun
On 2014/8/27 21:03, Michael S. Tsirkin wrote: On Wed, Aug 27, 2014 at 05:13:07PM +0800, Tiejun Chen wrote: We will try to reuse assign_dev_load_option_rom in xen side, and especially its a good beginning to unify pci assign codes both on kvm and xen in the future. Signed-off-by: Tiejun Chen

Re: [Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-28 Thread Chen, Tiejun
On 2014/8/28 9:44, Chen, Tiejun wrote: On 2014/8/27 21:03, Michael S. Tsirkin wrote: On Wed, Aug 27, 2014 at 05:13:07PM +0800, Tiejun Chen wrote: We will try to reuse assign_dev_load_option_rom in xen side, and especially its a good beginning to unify pci assign codes both on kvm and xen in

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-08-28 Thread Chen, Tiejun
On 2014/8/28 8:56, Chen, Tiejun wrote: + */ +dev = pci_create_simple(bus, PCI_DEVFN(0x1f, 0), +"xen-igd-passthrough-isa-bridge"); +if (dev) { +r = xen_host_pci_device_get(&hdev, 0, 0, PCI_DEVFN(0x1f, 0), 0); +

[Qemu-devel] [PATCH 1/1] cpu: Correct cpu-hotplug failure

2013-07-24 Thread Chen Fan
When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an uninitialized cpu->kvm-fd to ioctl. so we move realizing apic to the back of qemu_init_vcpu. Signed-off-by: Chen Fan --- incl

[Qemu-devel] [PATCH v2] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Chen Fan
of qemu_init_vcpu. Signed-off-by: Chen Fan --- include/qom/cpu.h | 2 ++ qom/cpu.c | 13 + target-i386/cpu.c | 10 -- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index daf1835..4b16385 100644 --- a/include/qom/cp

[Qemu-devel] [RESEND][PATCH v2] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Chen Fan
uninitialized, kvmfd is zero, fail to ioctl). But in startup case system wide reset after vcpu was initialized. ->machine->init -> qdev_machine_creation_done -> qemu_system_reset -> cpu_synchronize_all_post_reset -> cpu_synchronize_post_reset. v1-v2: Change cpu_apic_realize t

[Qemu-devel] [PATCH] cpus: use cpu_is_stopped efficiently

2013-07-26 Thread Tiejun Chen
It makes more sense and simple later. Signed-off-by: Tiejun Chen --- cpus.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cpus.c b/cpus.c index c232265..a997632 100644 --- a/cpus.c +++ b/cpus.c @@ -62,6 +62,11 @@ static CPUArchState *next_cpu; +bool

[Qemu-devel] [v2][PATCH 1/1] cpus: use cpu_is_stopped efficiently

2013-08-01 Thread Tiejun Chen
It makes more sense and simple later. Signed-off-by: Tiejun Chen --- v1 -> v2: To optimize performance slightly, we can reorder the two conditions to avoid the non-inline function call if cpu->stopped. cpus.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff -

[Qemu-devel] [PATCH] arch_init: Simplify code for load_xbzrle()

2014-05-10 Thread Chen Gang
related checking statements, and also can remove 'rc' and 'ret' local variables, Signed-off-by: Chen Gang --- arch_init.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arch_init.c b/arch_init.c index 60c975d..98ee5b6 100644 --- a/arch_init

[Qemu-devel] [RFC 1/3] using CPUMASK bitmaps to calculate cpu index

2014-05-13 Thread Chen Fan
instead of seeking the number of CPUs, using CPUMASK bitmaps to calculate the cpu index, also would be a gread benefit to remove cpu index. Signed-off-by: Chen Fan --- exec.c | 9 - include/qom/cpu.h | 9 + include/sysemu/sysemu.h | 7 --- 3 files

[Qemu-devel] [RFC 0/3] cpu: add device_add foo-x86_64-cpu support

2014-05-13 Thread Chen Fan
check of APIC ID after cpu object initialization that was different from 'cpu_add' command which check 'ids' at the beginning. Chen Fan (3): using CPUMASK bitmaps to calculate cpu index cpu: introduce CpuTopoInfo structure for argument simplification cpu: add device_add fo

[Qemu-devel] [RFC 2/3] cpu: introduce CpuTopoInfo structure for argument simplification

2014-05-13 Thread Chen Fan
Signed-off-by: Chen Fan Reviewed-by: Eduardo Habkost --- target-i386/topology.h | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/target-i386/topology.h b/target-i386/topology.h index 07a6c5f..e9ff89c 100644 --- a/target-i386/topology.h

[Qemu-devel] [RFC 3/3] cpu: add device_add foo-x86_64-cpu support

2014-05-13 Thread Chen Fan
apic-id property to add default APIC IDs. Signed-off-by: Chen Fan --- include/qom/cpu.h | 2 ++ qdev-monitor.c | 11 ++ target-i386/cpu.c | 91 +- target-i386/topology.h | 18 ++ 4 files changed, 121 insertions(+), 1

[Qemu-devel] [v2][PATCH 2/8] pci: provide a way to reserve some specific devfn

2014-05-16 Thread Tiejun Chen
Sometime we may need to reserve some specific devfn since some vgabios or drivers have to work well with a fixed bdf. Signed-off-by: Tiejun Chen --- v2: * New patch hw/pci/pci.c | 11 +++ include/hw/pci/pci.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/pci/pci.c

[Qemu-devel] [v2][PATCH 8/8] xen, gfx passthrough: add opregion mapping

2014-05-16 Thread Tiejun Chen
by: Tiejun Chen Cc: Jean Guyader --- v2: * We should return zero as an invalid address value while calling igd_read_opregion(). hw/xen/xen_pt.h | 4 +++- hw/xen/xen_pt_config_init.c | 45 ++- hw/xen/xen_pt_graphics

[Qemu-devel] [v2][PATCH 0/8] xen: add Intel IGD passthrough support

2014-05-16 Thread Tiejun Chen
u upstream. ---- Tiejun Chen (5): pci: use bitmap to manage registe/runregister pci device pci: provide a way to reserve some specific devfn xen, gfx passthrough: reserve 00:02.0 for INTEL IGD xen, gfx passthrough: create intel

[Qemu-devel] [v2][PATCH 1/8] pci: use bitmap to manage registe/runregister pci device

2014-05-16 Thread Tiejun Chen
It would be convenient to manage devfn directly in some cases. Signed-off-by: Tiejun Chen --- v2: * New patch hw/pci/pci.c | 12 +++- include/hw/pci/pci_bus.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 22fe5ee

[Qemu-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support

2014-05-16 Thread Tiejun Chen
Chen Cc: Weidong Han --- v2: * retrieve VGA bios from sysfs properly. * redefine some function name. hw/xen/Makefile.objs | 2 +- hw/xen/xen-host-pci-device.c | 5 ++ hw/xen/xen-host-pci-device.h | 1 + hw/xen/xen_pt.c | 10 +++ hw/xen/xen_pt.h | 4 + hw

[Qemu-devel] [v2][PATCH 5/8] xen, gfx passthrough: create intel isa bridge

2014-05-16 Thread Tiejun Chen
: Yang Zhang Signed-off-by: Tiejun Chen Cc: Allen Kay --- v2: * Nothing is changed. hw/xen/xen_pt_graphics.c | 71 1 file changed, 71 insertions(+) diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c index e1f0724..6b86293 100644

[Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-16 Thread Tiejun Chen
Some VBIOSs and drivers assume the IGD BDF (bus:device:function) is always 00:02.0, so we need to reserves 00:02.0 for assigned IGD in guest. Signed-off-by: Tiejun Chen Signed-off-by: Yang Zhang --- v2: * Use a common way patch #2 introduce to reserve PCI devfn. hw/pci-host/piix.c | 8

[Qemu-devel] [v2][PATCH 6/8] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2014-05-16 Thread Tiejun Chen
Yang Zhang Signed-off-by: Tiejun Chen Cc:Weidong Han --- v2: * To introduce is_igd_passthrough() to make sure we touch physical host bridge only in IGD case. hw/xen/xen_pt.h | 4 ++ hw/xen/xen_pt_graphics.c | 140 +++ 2 files changed, 144

[Qemu-devel] [v2][PATCH 7/8] xen, gfx passthrough: create host bridge to passthrough

2014-05-16 Thread Tiejun Chen
Implement that pci host bridge to specific to passthrough. Actually thsi just inherit the standard one. Signed-off-by: Tiejun Chen --- v2: * New patch. hw/pci-host/piix.c | 56 -- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [Qemu-trivial] [PATCH] arch_init: Simplify code for load_xbzrle()

2014-05-18 Thread Chen Gang
On 05/17/2014 03:54 PM, Michael Tokarev wrote: > 10.05.2014 16:51, Chen Gang wrote: >> For xbzrle_decode_buffer(), when decoding contents will exceed writing >> buffer, it will return -1, so need not check the return value whether >> large than writing buffer. >> >&g

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, May 19, 2014 2:45 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Fabio Fantoni [mailto:fabio.fant...@m2r.biz] > Sent: Monday, May 19, 2014 3:48 PM > To: Gerd Hoffmann; Chen, Tiejun > Cc: peter.mayd...@linaro.org; xen-de...@lists.xensource.com; > m...@redhat.com; Kay, Allen M; stefano.stabell...@eu.cit

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, May 16, 2014 10:06 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 2/8] pci: provide a way to reserve some specific devfn

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, May 16, 2014 10:07 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, May 16, 2014 10:09 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 5/8] xen, gfx passthrough: create intel isa bridge

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, May 16, 2014 10:12 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 7/8] xen, gfx passthrough: create host bridge to passthrough

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, May 16, 2014 10:37 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 6/8] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, May 16, 2014 10:35 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, May 19, 2014 7:23 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Monday, May 19, 2014 8:10 PM > To: Konrad Rzeszutek Wilk > Cc: Chen, Tiejun; anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@a

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 6/8] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2014-05-19 Thread Chen, Tiejun
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Monday, May 19, 2014 9:34 PM > To: Zhang, Yang Z > Cc: Chen, Tiejun; anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.

Re: [Qemu-devel] [v2][PATCH 8/8] xen, gfx passthrough: add opregion mapping

2014-05-20 Thread Chen, Tiejun
> -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Monday, May 19, 2014 7:54 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; qemu-devel@no

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support

2014-05-20 Thread Chen, Tiejun
Just resend since looks this delivery is delayed to these recipients or groups. Sorry for any inconveniences. Thanks Tiejun > -Original Message- > From: Chen, Tiejun > Sent: Tuesday, May 20, 2014 9:30 AM > To: 'Konrad Rzeszutek Wilk' > Cc: anthony.per...@ci

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-20 Thread Chen, Tiejun
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Monday, May 19, 2014 6:13 PM > To: Chen, Tiejun > Cc: Gerd Hoffmann; anthony.per...@citrix.com; > stefano.stabell...@eu.citrix.com; kelly.zyta...@amd.com; > peter.mayd.

Re: [Qemu-devel] [v2][PATCH 8/8] xen, gfx passthrough: add opregion mapping

2014-05-20 Thread Chen, Tiejun
> -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Tuesday, May 20, 2014 6:51 PM > To: Chen, Tiejun > Cc: Stefano Stabellini; anthony.per...@citrix.com; m...@redhat.com; > kelly.zyta...@amd.com; qemu-devel@no

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-20 Thread Chen, Tiejun
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: Tuesday, May 20, 2014 10:45 PM > To: Chen, Tiejun > Cc: Gerd Hoffmann; stefano.stabell...@eu.citrix.com; m...@redhat.com; > kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-21 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, May 19, 2014 9:51 PM > To: Chen, Tiejun > Cc: anthony.per...@citrix.com; stefano.stabell...@eu.citrix.com; > m...@redhat.com; kelly.zyta...@amd.com; peter.mayd...@li

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-21 Thread Chen, Tiejun
Just ping, any concern about this? Thanks Tiejun > -Original Message- > From: qemu-devel-bounces+tiejun.chen=intel@nongnu.org > [mailto:qemu-devel-bounces+tiejun.chen=intel@nongnu.org] On Behalf Of > Chen, Tiejun > Sent: Wednesday, May 21, 2014 3:08 PM >

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-21 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, May 22, 2014 1:40 PM > To: Chen, Tiejun > Cc: Anthony PERARD; Daniel P. Berrange; peter.mayd...@linaro.org; > xen-de...@lists.xensource.com; m...@redhat.com; > stefano.stabell.

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-22 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, May 22, 2014 2:45 PM > To: Chen, Tiejun > Cc: Anthony PERARD; Daniel P. Berrange; peter.mayd...@linaro.org; > xen-de...@lists.xensource.com; m...@redhat.com; > stefano.stabell.

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-22 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, May 22, 2014 2:45 PM > To: Chen, Tiejun > Cc: Anthony PERARD; Daniel P. Berrange; peter.mayd...@linaro.org; > xen-de...@lists.xensource.com; m...@redhat.com; > stefano.stabell.

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Chen, Tiejun
xen-platform device to some > > other place with a simple 'qemu -device xen-platform,addr=$slot'. > > > > Tested-by: Tiejun Chen Sorry, I'm not sure if this works well as Gerd expect. I already reply something online, please take a look at that before app

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-22 Thread Chen, Tiejun
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, May 22, 2014 7:22 PM > To: Chen, Tiejun > Cc: Anthony PERARD; Daniel P. Berrange; peter.mayd...@linaro.org; > xen-de...@lists.xensource.com; m...@redhat.com; > stefano.stabell.

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-22 Thread Chen, Tiejun
> -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: Thursday, May 22, 2014 10:20 PM > To: Michael S. Tsirkin > Cc: Chen, Tiejun; peter.mayd...@linaro.org; xen-de...@lists.xensource.com; > Daniel P. Berrange; stefano.stabell...@eu.citrix

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-08 Thread Chen, Tiejun
On 2014/10/7 15:27, Michael S. Tsirkin wrote: On Sun, Sep 28, 2014 at 01:38:43PM +0800, Chen, Tiejun wrote: **errp) { uint32_t value = 0; XenHostPCIDevice hdev; int r = 0, num; r = xen_host_pci_device_get(&hdev, 0, 0, 0x02, 0); if (!r) { value = hdev.devic

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-08 Thread Chen, Tiejun
On 2014/10/7 15:26, Michael S. Tsirkin wrote: On Tue, Sep 30, 2014 at 10:43:09AM +0800, Chen, Tiejun wrote: On 2014/9/29 18:01, Michael S. Tsirkin wrote: On Sun, Sep 28, 2014 at 10:59:05AM +0800, Chen, Tiejun wrote: On 2014/9/3 9:40, Kay, Allen M wrote: -Original Message- From

[Qemu-devel] [PATCH] disas/libvixl/a64/instructions-a64.h: Remove useless varialbe to avoid building break with '-Werror'

2014-10-09 Thread Chen Gang
ructions-a64.h:119:20: error: 'vixl::kFP32DefaultNaN' defined but not used [-Werror=unused-variable] static const float kFP32DefaultNaN = rawbits_to_float(0x7fc0); ^ cc1plus: all warnings being treated as errors make: *** [disas/arm-a64.o] Error 1 Signed-

Re: [Qemu-devel] [PATCH] disas/libvixl/a64/instructions-a64.h: Remove useless varialbe to avoid building break with '-Werror'

2014-10-09 Thread Chen Gang
On 10/9/14 22:54, Eric Blake wrote: > On 10/09/2014 08:00 AM, Chen Gang wrote: > > That's a very long subject line. Try to keep subjects around 60 > characters or so ('git shortlog -30' can give you an idea of reasonable > subjects). OK, thanks, I shall notic

Re: [Qemu-devel] [PATCH] disas/libvixl/a64/instructions-a64.h: Remove useless varialbe to avoid building break with '-Werror'

2014-10-09 Thread Chen Gang
On 10/9/14 22:34, Peter Maydell wrote: > On 9 October 2014 15:00, Chen Gang wrote: >> The related variables are useless, need be removed, or can not pass >> microblaze building, after fix it, can build microblaze, successfully. >> >> The related configuration: >&

Re: [Qemu-devel] [PATCH] disas/libvixl/a64/instructions-a64.h: Remove useless varialbe to avoid building break with '-Werror'

2014-10-10 Thread Chen Gang
On 10/10/14 15:37, Peter Maydell wrote: > On 10 October 2014 02:54, Chen Gang wrote: >> I use the latest upstream gcc (which pulled from master in 2014-10-0?). >> In my memory (not quite sure), the older version gcc may not notice >> about this warning. > > Hmm. I

Re: [Qemu-devel] [PATCH] disas/libvixl/a64/instructions-a64.h: Remove useless varialbe to avoid building break with '-Werror'

2014-10-10 Thread Chen Gang
On 10/10/14 16:53, Chen Gang wrote: > On 10/10/14 15:37, Peter Maydell wrote: >>>> The reason I'm reluctant to make changes to these files is >>>> that they're pulled in from a different upstream project >>>> (libvixl) so we should only fix critica

[Qemu-devel] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-11 Thread Chen Gang
g treated as errors make: *** [disas/arm-a64.o] Error 1 After this patch, can pass upstream gcc 5.0.0 building (print warning, but not break building), and fedora 20 gcc 4.8.1 building (not find warnings). Signed-off-by: Chen Gang --- disas/libvixl/a64/instructions-a64.h | 9 + 1 file c

Re: [Qemu-devel] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-11 Thread Chen Gang
On 10/11/14 22:07, Chen Gang wrote: > 'instructions-a64.h' has unused variables for qemu which can be found by > gcc 5.0.0 or higher. and qemu needs "-Werror", and cause building break. > But they may be used by another projects (not qemu). > > So for gcc 5.

Re: [Qemu-devel] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-11 Thread Chen Gang
On 10/12/14 5:25, Peter Maydell wrote: > On 11 October 2014 15:13, Chen Gang wrote: > > MJT: please don't put this in -trivial, it will clash with > the update to libvixl 1.6 currently on the list. > OK thanks (also remove -trivial from replying mailing list). > >

Re: [Qemu-devel] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-12 Thread Chen Gang
On 10/12/14 15:50, Peter Maydell wrote: > On 12 October 2014 01:32, Chen Gang wrote: >> On 10/12/14 5:25, Peter Maydell wrote: >>> Some other approaches to this that would confine the >>> fix to the makefiles rather than requiring us to modify >>> the vi

[Qemu-devel] [PATCH] target-ppc: kvm: Fix memory overflow issue about strncat()

2014-10-13 Thread Chen Gang
strncat() will append additional '\0' to destination buffer, so need additional 1 byte for it, or may cause memory overflow, just like other area within QEMU have done. Signed-off-by: Chen Gang --- target-ppc/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH] target-ppc: kvm: Fix memory overflow issue about strncat()

2014-10-13 Thread Chen Gang
/%s", buf, propname); -f = fopen(buf, "rb"); +f = fopen(tmp, "rb"); +g_free(buf); if (!f) { return -1; } For me, it is really a personal taste, so if the maintainer feels the diff above is OK, I shall send patch v2 for it within 2 days. Th

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-14 Thread Chen Gang
On 10/15/2014 03:58 AM, Michael Tokarev wrote: > On 11.10.2014 23:25, Peter Maydell wrote: >> On 11 October 2014 15:13, Chen Gang wrote: >> >> MJT: please don't put this in -trivial, it will clash with >> the update to libvixl 1.6 currently on the list. > >

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-15 Thread Chen Gang
On 10/15/14 4:47, Chen Gang wrote: > On 10/15/2014 03:58 AM, Michael Tokarev wrote: >> >> That's what I'm after too (after trying to fix it properly). >> And no, at this time I dont know how gcc5 handles this. >> > > At present, I have sent the related

[Qemu-devel] [PATCH v2] target-ppc: kvm: Fix memory overflow issue about strncat()

2014-10-15 Thread Chen Gang
strncat() will append additional '\0' to destination buffer, so need additional 1 byte for it, or may cause memory overflow, just like other area within QEMU have done. And can use g_strdup_printf() instead of strncat(), which may be more easier understanding. Signed-off-by:

[Qemu-devel] [PATCH v4 00/12] QEmu memory hot unplug support.

2014-10-15 Thread Tang Chen
t for pc machine. qdev: Add memory hot unplug support for bus-less devices. pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support. pc, acpi bios: Add memory hot unplug interface. monitor: Add memory hot unplug support for device_del command. Tang Chen (6): acpi, mem-hotp

[Qemu-devel] [PATCH v4 05/12] acpi, piix4: Add memory hot unplug support for piix4.

2014-10-15 Thread Tang Chen
From: Hu Tao Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger memory hot-remove, and call it in piix4_device_unplug_cb(). Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/acpi/piix4.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/acpi

[Qemu-devel] [PATCH v4 07/12] pc: Add memory hot unplug support for pc machine.

2014-10-15 Thread Tang Chen
From: Hu Tao Implement device unplug callback for PCMachine. And it now only support pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced in previous patches. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/i386/pc.c | 31 +++ 1 file

[Qemu-devel] [PATCH v4 01/12] acpi, mem-hotplug: Use PC_DIMM_SLOT_PROP in acpi_memory_plug_cb().

2014-10-15 Thread Tang Chen
Replace string "slot" in acpi_memory_plug_cb() with MACRO PC_DIMM_SLOT_PROP. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index ed39241..c6580da 10064

[Qemu-devel] [PATCH v4 02/12] acpi, mem-hotplug: Add acpi_memory_get_slot_status_descriptor() to get MemStatus.

2014-10-15 Thread Tang Chen
Add a new API named acpi_memory_get_slot_status_descriptor() to obtain a single memory slot status. Doing this is because this procedure will be used by other functions in the next coming patches. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 27 +++ 1 file

[Qemu-devel] [PATCH v4 03/12] acpi, mem-hotplug: Add acpi_memory_hotplug_sci() to rise sci for memory hotplug.

2014-10-15 Thread Tang Chen
Add a new API named acpi_memory_hotplug_sci() to send memory hotplug SCI. Doing this is because this procedure will be used by other functions in the next coming patches. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 12 1 file changed, 8 insertions(+), 4 deletions

[Qemu-devel] [PATCH v4 04/12] acpi, mem-hotplug: Add acpi_memory_unplug_cb() to implement memory unplug.

2014-10-15 Thread Tang Chen
Add a new bool member named is_removing to MemStatus indicating that the memory solt is being removed. Set it to true in acpi_memory_unplug_cb(), and send SCI to guest. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 15 +++ include/hw/acpi/memory_hotplug.h | 3

[Qemu-devel] [PATCH v4 11/12] pc, acpi bios: Add memory hot unplug interface.

2014-10-15 Thread Tang Chen
From: Hu Tao This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/i386/ssdt-mem.dsl | 5 + hw/i386/ssdt-misc.dsl| 13 - include/hw/acpi/pc-hotplug.h | 2 ++ 3 files changed, 19

[Qemu-devel] [PATCH v4 06/12] acpi, ich9: Add memory hot unplug support for ich9.

2014-10-15 Thread Tang Chen
Implement ich9_pm_device_unplug_cb() to support memory hot-remove, calling acpi_memory_unplug_cb(). And itself will be called in ich9_device_unplug_cb(). Signed-off-by: Tang Chen --- hw/acpi/ich9.c | 12 hw/isa/lpc_ich9.c | 5 +++-- include/hw/acpi/ich9.h | 2 ++ 3

[Qemu-devel] [PATCH v4 08/12] qdev: Add memory hot unplug support for bus-less devices.

2014-10-15 Thread Tang Chen
From: Hu Tao Implement bus-less device hot-remove in qdev_unplug(). For now, only pc-dimm is bus-less device, but this is generic handling that applies to other devices. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/core/qdev.c | 8 1 file changed, 8 insertions(+) diff

[Qemu-devel] [PATCH v4 09/12] pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.

2014-10-15 Thread Tang Chen
From: Hu Tao Implement unrealize function for pc-dimm device. It remove subregion from hotplug region, and delete ram address range from guest ram list. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- hw/mem/pc-dimm.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/mem

[Qemu-devel] [PATCH v4 10/12] acpi: Add hardware implementation for memory hot unplug.

2014-10-15 Thread Tang Chen
Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- docs/specs/acpi_mem_hotplug.txt | 8 ++-- hw/acpi/memory_hotplug.c| 14 +++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/specs/acpi_mem_hotplug.txt b/docs/specs/acpi_mem_hotplug.txt index 1290994..5

[Qemu-devel] [PATCH v4 12/12] monitor: Add memory hot unplug support for device_del command.

2014-10-15 Thread Tang Chen
From: Hu Tao Implement find_peripheral_device() to find bus-less device, and call it in qmp_device_del() so that device_del command will be able to remove memory device. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- qdev-monitor.c | 46 ++ 1

[Qemu-devel] [Consult] microblaze: About running upstream main branch qemu

2014-10-19 Thread Chen Gang
microblaze_complete.cpio.gz - result: Segmentation fault (core dumped) (after a simple try, I am sure, it is caused by "dtb"). And excuse me, at present, I have to only focus on fixing upstream qemu issues (I have no enough time resource for other qemu branches), please understand. Thanks.

Re: [Qemu-devel] [Consult] microblaze: About running upstream main branch qemu

2014-10-19 Thread Chen Gang
On 10/19/14 21:38, Max Filippov wrote: > On Sun, Oct 19, 2014 at 5:37 PM, Chen Gang wrote: >>- running: >> >> ./arm-softmmu/qemu-system-arm -M arm-generic-fdt -nographic -smp 2 >> -machine linux=on -serial mon:stdio -dtb ../linux-xlnx/system.dtb \ >>

Re: [Qemu-devel] [Consult] microblaze: About running upstream main branch qemu

2014-10-19 Thread Chen Gang
OK, thanks, I shall try it within 2 days. Send from Lenovo A788t. Guenter Roeck wrote: >On 10/19/2014 06:58 AM, Chen Gang wrote: >> >> On 10/19/14 21:38, Max Filippov wrote: >>> On Sun, Oct 19, 2014 at 5:37 PM, Chen Gang wrote: >>>> - running: >>&

Re: [Qemu-devel] [Consult] microblaze: About running upstream main branch qemu

2014-10-20 Thread Chen Gang
fc20 20140613 Welcome any suggestions or completions. Thanks. -- Chen Gang Open share and attitude like air water and life which God blessed

[Qemu-devel] Qemu Translation Blocks Execute slightly different each time?

2014-10-20 Thread M Chen
chael Chen

Re: [Qemu-devel] [Consult] microblaze: About running upstream main branch qemu

2014-10-21 Thread Chen Gang
On 10/21/14 12:37, Guenter Roeck wrote: > On 10/20/2014 08:23 AM, Chen Gang wrote: >> On 10/19/2014 10:58 PM, Guenter Roeck wrote: >>> >>> This doesn't use devicetree, but the configurations are known to be working >>> with kernel releases all the way ba

<    1   2   3   4   5   6   7   8   9   10   >