Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-21 Thread Chen Gang
On 3/22/15 01:33, Peter Maydell wrote: > On 20 March 2015 at 23:57, Chen Gang wrote: >> For 'opcode_tilegx.h', it comes from Linux kernel which is already more >> than 1000 lines. For me, I still suggest to let it within one patch. > > Right, for that sort of sp

[Qemu-devel] [v3][PATCH 0/2] libxl: try to support IGD passthrough for qemu upstream

2015-03-22 Thread Tiejun Chen
traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu upstream. Tiejun Chen (2): libxl: introduce libxl__is_igd_vga_passthru libxl: introduce gfx_passthru_kind docs/man/xl.cfg.pod.5| 11 ++-- tools/libxl

[Qemu-devel] [v3][PATCH 1/2] libxl: introduce libxl__is_igd_vga_passthru

2015-03-22 Thread Tiejun Chen
. Signed-off-by: Tiejun Chen Acked-by: Ian Campbell --- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++ 2 files changed, 126 insertions(+) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 934465a

[Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-22 Thread Tiejun Chen
at table to need to pass that option to qemu. But if gfx_passthru_kind = "igd" we always force to pass that. And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu u

[Qemu-devel] [PATCH v2 2/2] icc_bus: remove icc related files

2015-03-22 Thread Chen Fan
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Chen Fan --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 2 - hw/cpu/icc_bus.c | 118

[Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-22 Thread Chen Fan
ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time being hotplug was available only for BUS attached devices. Now this patch is to drop ICC bus impl, and switch to bus-less CPU+APIC hotplug, handling them in the same manner as pc-dimm. Signed-off-by: Chen

[Qemu-devel] [PATCH v2 0/2] remove icc bus/bridge

2015-03-22 Thread Chen Fan
ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but new we use HotplugHandler to make hotplug. so ICC Bus is unnecessary. this codes has passed the new pc-cpu-test. Chen Fan (2): cpu/apic: drop icc bus/bridge/ icc_bus: remove icc related files default-configs/i386

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-23 Thread Chen Fan
On 03/23/2015 04:23 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 13:54:23 +0800 Chen Fan wrote: ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time being hotplug was available only for BUS attached devices. Now this patch is to drop ICC bus impl, and

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-23 Thread Chen Fan
On 03/23/2015 05:43 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 17:07:29 +0800 Chen Fan wrote: On 03/23/2015 04:23 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 13:54:23 +0800 Chen Fan wrote: ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time

Re: [Qemu-devel] [PATCH 06/12 v8] target-tilegx: Add TILE-Gx building files

2015-03-23 Thread Chen Gang
On 3/23/15 23:06, Richard Henderson wrote: > On 03/21/2015 03:23 AM, Chen Gang wrote: >> Add related configuration, make files for tilegx. >> >> Signed-off-by: Chen Gang >> --- >> configure | 3 +++ >> default-configs/tilegx

[Qemu-devel] One question to lowlevel/xl/xl.c and lowlevel/xc/xc.c

2015-03-24 Thread Chen, Tiejun
All guys, Sorry to bother you. I have a question to two files, tools/python/xen/lowlevel/xc/xc.c and tools/python/xen/lowlevel/xl/xl.c. Who is a caller to those methods like pyxc_methods[] and pyxl_methods[]? And how should we call these approaches? In my specific case, I'm trying to introdu

Re: [Qemu-devel] One question to lowlevel/xl/xl.c and lowlevel/xc/xc.c

2015-03-24 Thread Chen, Tiejun
On 2015/3/24 17:51, Ian Campbell wrote: On Tue, 2015-03-24 at 16:47 +0800, Chen, Tiejun wrote: All guys, Thanks for your reply. Sorry to bother you. I have a question to two files, tools/python/xen/lowlevel/xc/xc.c and tools/python/xen/lowlevel/xl/xl.c. Who is a caller to those methods

Re: [Qemu-devel] One question to lowlevel/xl/xl.c and lowlevel/xc/xc.c

2015-03-24 Thread Chen, Tiejun
On 2015/3/24 18:20, Ian Campbell wrote: On Tue, 2015-03-24 at 18:15 +0800, Chen, Tiejun wrote: On 2015/3/24 17:51, Ian Campbell wrote: On Tue, 2015-03-24 at 16:47 +0800, Chen, Tiejun wrote: All guys, Thanks for your reply. Sorry to bother you. I have a question to two files, tools

Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-24 Thread Chen, Tiejun
On 2015/3/24 22:50, Ian Campbell wrote: On Mon, 2015-03-23 at 09:17 +0800, Tiejun Chen wrote: Although we already have 'gfx_passthru' in b_info, this doesn' suffice Fixed. ^t after we want to handle IGD sp

Re: [Qemu-devel] One question to lowlevel/xl/xl.c and lowlevel/xc/xc.c

2015-03-24 Thread Chen, Tiejun
On 2015/3/24 18:40, Ian Campbell wrote: On Tue, 2015-03-24 at 18:31 +0800, Chen, Tiejun wrote: NB, the libxl ones are broken and not even compiled right now, you can ignore them. Looks this is still compiled now. xc is, xl is not, I am sure of that. Indeed, you're right :) I

Re: [Qemu-devel] [PATCH v5 5/7] vfio-pci: pass the aer error to guest

2015-03-24 Thread Chen Fan
On 03/16/2015 10:09 PM, Alex Williamson wrote: On Mon, 2015-03-16 at 15:35 +0800, Chen Fan wrote: On 03/16/2015 11:52 AM, Alex Williamson wrote: On Mon, 2015-03-16 at 11:05 +0800, Chen Fan wrote: On 03/14/2015 06:34 AM, Alex Williamson wrote: On Thu, 2015-03-12 at 18:23 +0800, Chen Fan

Re: [Qemu-devel] [PATCH v5 5/7] vfio-pci: pass the aer error to guest

2015-03-24 Thread Chen Fan
On 03/16/2015 10:09 PM, Alex Williamson wrote: On Mon, 2015-03-16 at 15:35 +0800, Chen Fan wrote: On 03/16/2015 11:52 AM, Alex Williamson wrote: On Mon, 2015-03-16 at 11:05 +0800, Chen Fan wrote: On 03/14/2015 06:34 AM, Alex Williamson wrote: On Thu, 2015-03-12 at 18:23 +0800, Chen Fan

Re: [Qemu-devel] [PATCH v5 5/7] vfio-pci: pass the aer error to guest

2015-03-24 Thread Chen Fan
On 03/25/2015 10:41 AM, Alex Williamson wrote: On Wed, 2015-03-25 at 09:53 +0800, Chen Fan wrote: On 03/16/2015 10:09 PM, Alex Williamson wrote: On Mon, 2015-03-16 at 15:35 +0800, Chen Fan wrote: On 03/16/2015 11:52 AM, Alex Williamson wrote: On Mon, 2015-03-16 at 11:05 +0800, Chen Fan

Re: [Qemu-devel] One question to lowlevel/xl/xl.c and lowlevel/xc/xc.c

2015-03-25 Thread Chen, Tiejun
On 2015/3/25 18:26, Ian Campbell wrote: On Wed, 2015-03-25 at 09:18 +0800, Chen, Tiejun wrote: Actually my problem is that, I need to add a new parameter, 'flag', like this, xc_assign_device(xxx,xxx,flag). So if I don't refine xc.c, tools can't be compiled successfu

Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-25 Thread Chen, Tiejun
On 2015/3/25 18:32, Ian Campbell wrote: On Wed, 2015-03-25 at 09:10 +0800, Chen, Tiejun wrote: +But when given as a string the B option describes the type +of device to enable. Not this behavior is only supported with upstream "Note" and "the upstream..." Fixed. +=i

Re: [Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough

2015-03-26 Thread Chen, Tiejun
Michael and Gerd, I don't see any more comments for this revision, so what's next that I should do? Thanks Tiejun On 2015/3/19 9:01, Chen, Tiejun wrote: On 2015/3/18 18:21, Gerd Hoffmann wrote: On Mi, 2015-03-18 at 17:06 +0800, Tiejun Chen wrote: Implement a pci host bridge s

Re: [Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough

2015-03-26 Thread Chen, Tiejun
On 2015/3/26 16:15, Michael S. Tsirkin wrote: On Thu, Mar 26, 2015 at 03:57:18PM +0800, Chen, Tiejun wrote: Michael and Gerd, I don't see any more comments for this revision, so what's next that I should do? Thanks Tiejun On 2015/3/19 9:01, Chen, Tiejun wrote: It's only been

Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-26 Thread Chen, Tiejun
On 2015/3/26 18:06, Ian Campbell wrote: On Thu, 2015-03-26 at 08:53 +0800, Chen, Tiejun wrote: Hrm, OK. I suppose we can live with autodetect and igd both meaning igd and whoever adds a new type will have to remember to add a check for qemu-trad then. When we really have to introduce a new

[Qemu-devel] [PATCH 00/12 v9] tilegx: Firstly add tilegx feature for linux-user

2015-03-27 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (12): linux-user: tilegx: Firstly add architecture related features linux-user: tilegx: Add target features support

[Qemu-devel] [PATCH 01/12 v9] linux-user: tilegx: Firstly add architecture related features

2015-03-27 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278 linux-user/tilegx

[Qemu-devel] [PATCH 03/12 v9] linux-user: Support tilegx architecture in syscall

2015-03-27 Thread Chen Gang
Add tilegx architecture in "syscall_defs.h", all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions(+), 4 deletion

[Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu

2015-03-27 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h | 48

[Qemu-devel] [PATCH 05/12 v9] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-27 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PATCH 07/12 v9] target-tilegx: Add helper features for linux-user

2015-03-27 Thread Chen Gang
For supporting linux-user system call, tilegx need support exception helper features for it. Signed-off-by: Chen Gang --- target-tilegx/helper.c | 31 +++ target-tilegx/helper.h | 1 + 2 files changed, 32 insertions(+) create mode 100644 target-tilegx/helper.c

[Qemu-devel] [PATCH 08/12 v9] target-tilegx: Add opcode basic implementation for tilegx

2015-03-27 Thread Chen Gang
It is from Tilera Corporation, and copied from Linux kernel "arch/tile/ include/uapi/arch/opcode_tilegx.h". Signed-off-by: Chen Gang --- target-tilegx/opcode_tilegx.h | 1406 + 1 file changed, 1406 insertions(+) create mode 100644 tar

[Qemu-devel] [PATCH 09/12 v9] target-tilegx: Finish processing bundle and preparing decoding pipes

2015-03-27 Thread Chen Gang
Finish processing tilegx bundle, and reach to related pipes. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 515 ++ 1 file changed, 515 insertions(+) create mode 100644 target-tilegx/translate.c diff --git a/target-tilegx/translate.c b

[Qemu-devel] [PATCH 10/12 v9] target-tilegx: Add TILE-Gx building files

2015-03-27 Thread Chen Gang
Add related configuration, make files for tilegx. Now, qemu tilegx can pass building. Signed-off-by: Chen Gang --- configure | 3 +++ default-configs/tilegx-linux-user.mak | 1 + target-tilegx/Makefile.objs | 1 + 3 files changed, 5 insertions(+) create

[Qemu-devel] [PATCH 11/12 v9] target-tilegx: Decoding pipes to support finish running 1st system call

2015-03-27 Thread Chen Gang
For the instructions which need tcg generation, the decoding functions return directly, or they will direct to the exception. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 704 ++ 1 file changed, 704 insertions(+) diff --git a/target

[Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-03-27 Thread Chen Gang
Generate related tcg instructions, and qemu tilegx can run to 1st system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Signed-off-by: Chen Gang --- target-tilegx/translate.c | 543 ++ 1 file changed, 543

[Qemu-devel] [PATCH 06/12 v9] target-tilegx: Add cpu basic features for linux-user

2015-03-27 Thread Chen Gang
It implements minimized cpu features for linux-user. Signed-off-by: Chen Gang --- target-tilegx/cpu-qom.h | 73 target-tilegx/cpu.c | 149 target-tilegx/cpu.h | 94 ++ 3 files changed

[Qemu-devel] [PATCH 04/12 v9] linux-user: Support tilegx architecture in linux-user

2015-03-27 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user/main.c| 86

Re: [Qemu-devel] [PATCH 00/12 v9] tilegx: Firstly add tilegx feature for linux-user

2015-03-27 Thread Chen Gang
On 3/28/15 01:01, Richard Henderson wrote: > On 03/27/2015 03:47 AM, Chen Gang wrote: >> After load elf64 binary, qemu tilegx can finish executing the first >> system call (uname) successfully in _dl_discover_osversion(), and >> return to __libc_start_main(). >> >>

Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-29 Thread Chen, Tiejun
On 2015/3/27 17:54, Ian Campbell wrote: On Fri, 2015-03-27 at 09:29 +0800, Chen, Tiejun wrote: On 2015/3/26 18:06, Ian Campbell wrote: On Thu, 2015-03-26 at 08:53 +0800, Chen, Tiejun wrote: Hrm, OK. I suppose we can live with autodetect and igd both meaning igd and whoever adds a new type

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-30 Thread Chen Fan
On 03/23/2015 05:43 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 17:07:29 +0800 Chen Fan wrote: On 03/23/2015 04:23 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 13:54:23 +0800 Chen Fan wrote: ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-31 Thread Chen Fan
On 03/30/2015 08:45 PM, Igor Mammedov wrote: On Mon, 30 Mar 2015 18:12:06 +0800 Chen Fan wrote: On 03/23/2015 05:43 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 17:07:29 +0800 Chen Fan wrote: On 03/23/2015 04:23 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 13:54:23 +0800 Chen Fan wrote

Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-31 Thread Chen, Tiejun
On 2015/3/30 17:19, Ian Campbell wrote: On Mon, 2015-03-30 at 09:28 +0800, Chen, Tiejun wrote: Sounds it should be a legacy fix to qemu-xen-tranditional :) So lets do it now, @@ -326,6 +326,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, } if

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-31 Thread Chen Fan
On 03/31/2015 05:51 PM, Igor Mammedov wrote: On Tue, 31 Mar 2015 16:54:43 +0800 Chen Fan wrote: On 03/30/2015 08:45 PM, Igor Mammedov wrote: On Mon, 30 Mar 2015 18:12:06 +0800 Chen Fan wrote: On 03/23/2015 05:43 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 17:07:29 +0800 Chen Fan wrote

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-03-31 Thread Chen Fan
On 04/01/2015 09:40 AM, Chen Fan wrote: On 03/31/2015 05:51 PM, Igor Mammedov wrote: On Tue, 31 Mar 2015 16:54:43 +0800 Chen Fan wrote: On 03/30/2015 08:45 PM, Igor Mammedov wrote: On Mon, 30 Mar 2015 18:12:06 +0800 Chen Fan wrote: On 03/23/2015 05:43 PM, Igor Mammedov wrote: On Mon

Re: [Qemu-devel] [PATCH v5 5/7] vfio-pci: pass the aer error to guest

2015-03-31 Thread Chen Fan
On 03/25/2015 10:41 AM, Alex Williamson wrote: On Wed, 2015-03-25 at 09:53 +0800, Chen Fan wrote: On 03/16/2015 10:09 PM, Alex Williamson wrote: On Mon, 2015-03-16 at 15:35 +0800, Chen Fan wrote: On 03/16/2015 11:52 AM, Alex Williamson wrote: On Mon, 2015-03-16 at 11:05 +0800, Chen Fan

Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-04-01 Thread Chen, Tiejun
Perhaps add "With qemu-xen-traditional IGD is always assumed and other options than autodetect or explicit IGD will result in an error"? Will do. diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index a8b08f2..4fd6310 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm

Re: [Qemu-devel] [PATCH v2 1/2] cpu/apic: drop icc bus/bridge/

2015-04-07 Thread Chen Fan
On 03/23/2015 04:23 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 13:54:23 +0800 Chen Fan wrote: ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time being hotplug was available only for BUS attached devices. Now this patch is to drop ICC bus impl, and

Re: [Qemu-devel] [PATCH v5 5/7] vfio-pci: pass the aer error to guest

2015-04-08 Thread Chen Fan
On 04/01/2015 11:46 PM, Alex Williamson wrote: On Wed, 2015-04-01 at 12:12 +0800, Chen Fan wrote: On 03/25/2015 10:41 AM, Alex Williamson wrote: On Wed, 2015-03-25 at 09:53 +0800, Chen Fan wrote: On 03/16/2015 10:09 PM, Alex Williamson wrote: On Mon, 2015-03-16 at 15:35 +0800, Chen Fan

[Qemu-devel] [PATCH] kvm_irqchip_assign_irqfd: just set irqfd in case of kvm_irqfds_enabled()

2014-12-26 Thread Tiejun Chen
We should avoid to set irqfd{} unconditionally. Signed-off-by: Tiejun Chen --- kvm-all.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 18cc6b4..5b9786b 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1257,21 +1257,21 @@ int

Re: [Qemu-devel] [PATCH] kvm_irqchip_assign_irqfd: just set irqfd in case of kvm_irqfds_enabled()

2014-12-28 Thread Chen, Tiejun
On 2014/12/27 22:52, Paolo Bonzini wrote: On 26/12/2014 18:59, Peter Maydell wrote: Mm, but once you're into such microoptimisations as this you really need to have a good justification for the effort, in the form of profiling measurements that indicate that this is a hot path. In this case t

[Qemu-devel] [RFC][PATCH] qemu_opt_get_bool_helper: back finding desc by name just if !opt->desc

2015-01-04 Thread Tiejun Chen
mu-option.c:387: qemu_opt_get_bool_helper: \ Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core dumped) So inside qemu_opt_get_bool_helper, we need to call find_desc_by_name() to work parse_option_bool() out just in case of !opt->desc. Signed-off-by: Tiejun Chen

[Qemu-devel] [Bug 1407454] Re: assertion failed when using "-usb" option

2015-01-04 Thread Tiejun Chen
Could you test this? Signed-off-by: Tiejun Chen --- util/qemu-option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index a708241..7cb3601 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -377,7 +377,7 @@ static bool

[Qemu-devel] [Bug 1406706] Re: guest will be destroyed when create guest with parameter "-usbdevice tablet".

2015-01-04 Thread Tiejun Chen
Could you test this? Signed-off-by: Tiejun Chen --- util/qemu-option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index a708241..7cb3601 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -377,7 +377,7 @@ static bool

Re: [Qemu-devel] [RFC][PATCH] qemu_opt_get_bool_helper: back finding desc by name just if !opt->desc

2015-01-05 Thread Chen, Tiejun
On 2015/1/6 1:13, Eric Blake wrote: On 01/04/2015 10:35 PM, Tiejun Chen wrote: After one commit 49d2e648e808, "machine: remove qemu_machine_opts global list", is introduced, QEMU doesn't keep a global list of options but set desc lately. Then we can see the following, $ x86_

Re: [Qemu-devel] [PATCH] vl.c: fix -usb option assertion failure in qemu_opt_get_bool_helper()

2015-01-05 Thread Chen, Tiejun
find() but use the MachineState->usb field instead of qemu_opt_get_bool(). Cc: Marcel Apfelbaum Cc: Tiejun Chen Signed-off-by: Stefan Hajnoczi --- vl.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index bea9656..6e8889c 100644 --- a/vl.c +++ b/vl.c @@ -99

Re: [Qemu-devel] [RFC][PATCH] qemu_opt_get_bool_helper: back finding desc by name just if !opt->desc

2015-01-05 Thread Chen, Tiejun
On 2015/1/6 9:21, Chen, Tiejun wrote: On 2015/1/6 1:13, Eric Blake wrote: On 01/04/2015 10:35 PM, Tiejun Chen wrote: After one commit 49d2e648e808, "machine: remove qemu_machine_opts global list", is introduced, QEMU doesn't keep a global list of options but set desc lately.

Re: [Qemu-devel] [PATCH] vl.c: fix -usb option assertion failure in qemu_opt_get_bool_helper()

2015-01-06 Thread Chen, Tiejun
On 2015/1/6 14:20, Shannon Zhao wrote: On 2015/1/6 10:37, Chen, Tiejun wrote: On 2015/1/5 20:14, Marcel Apfelbaum wrote: On 01/05/2015 01:50 PM, Stefan Hajnoczi wrote: On Mon, Jan 5, 2015 at 11:37 AM, Jan Kiszka wrote: On 2015-01-05 12:22, Stefan Hajnoczi wrote: Commit

Re: [Qemu-devel] [RFC][PATCH] qemu_opt_get_bool_helper: back finding desc by name just if !opt->desc

2015-01-06 Thread Chen, Tiejun
On 2015/1/6 22:56, Stefan Hajnoczi wrote: On Tue, Jan 06, 2015 at 10:39:13AM +0800, Chen, Tiejun wrote: On 2015/1/6 9:21, Chen, Tiejun wrote: On 2015/1/6 1:13, Eric Blake wrote: On 01/04/2015 10:35 PM, Tiejun Chen wrote: After one commit 49d2e648e808, "machine: remove qemu_machine

[Qemu-devel] [Bug 1408152] Re: latest qemu git doesn't load

2015-01-06 Thread Tiejun Chen
This issue seems to be similar to 1406706 and 1407454. Looks Marcel is working on a fix, and he also posted something to first address USB stuff, https://www.mail-archive.com/qemu-devel@nongnu.org/msg272607.html -- You received this bug notification because you are a member of qemu- devel-ml, wh

[Qemu-devel] [RESEND PATCH v1 0/5] Common unplug and unplug request cb for memory and CPU hot-unplug.

2015-01-07 Thread Tang Chen
request cb. So this patch set introduces these commom functions as part1, and memory and CPU hot-unplug will come soon as part 2 and 3. This patch-set is based on QEmu 2.2 Tang Chen (5): acpi, pc: Add hotunplug request cb for pc machine. acpi, ich9: Add hotunplug request cb for ich9. acpi, pc

[Qemu-devel] [RESEND PATCH v1 2/5] acpi, ich9: Add hotunplug request cb for ich9.

2015-01-07 Thread Tang Chen
Memory and CPU hot unplug are both asynchronize procedures. They both need unplug request cb when the unplug operation happens. This patch adds hotunplug request cb for ich9, and memory and CPU hot unplug will base on it. --- hw/acpi/ich9.c | 7 +++ hw/isa/lpc_ich9.c | 5 +++-- i

[Qemu-devel] [RESEND PATCH v1 3/5] acpi, pc: Add unplug cb for pc machine.

2015-01-07 Thread Tang Chen
Memory and CPU hot unplug are both asynchronize procedures. When the unplug operation happens, unplug request cb is called first. And when ghest OS finished handling unplug, unplug cb will be called to do the real removal of device. This patch adds hotunplug cb for pc machine, and memory and CPU h

[Qemu-devel] [RESEND PATCH v1 4/5] acpi, ich9: Add unplug cb for ich9.

2015-01-07 Thread Tang Chen
Memory and CPU hot unplug are both asynchronize procedures. When the unplug operation happens, unplug request cb is called first. And when ghest OS finished handling unplug, unplug cb will be called to do the real removal of device. This patch adds hotunplug cb for ich9, and memory and CPU hot unp

[Qemu-devel] [RESEND PATCH v1 5/5] acpi, piix4: Add unplug cb for piix4.

2015-01-07 Thread Tang Chen
Memory and CPU hot unplug are both asynchronize procedures. When the unplug operation happens, unplug request cb is called first. And when ghest OS finished handling unplug, unplug cb will be called to do the real removal of device. This patch adds hotunplug cb for piix4, and memory and CPU hot un

[Qemu-devel] [RESEND PATCH v1 1/5] acpi, pc: Add hotunplug request cb for pc machine.

2015-01-07 Thread Tang Chen
Memory and CPU hot unplug are both asynchronous procedures. They both need unplug request callback to initiate unplug operation. Add unplug handler to pc machine that will be used by following CPU and memory unplug patches. --- hw/i386/pc.c | 8 1 file changed, 8 insertions(+) diff --gi

[Qemu-devel] [RESEND PATCH v1 00/13] QEmu memory hot unplug support.

2015-01-07 Thread Tang Chen
following patchset. [PATCH] Common unplug and unplug request cb for memory and CPU hot-unplug. https://www.mail-archive.com/qemu-devel@nongnu.org/msg272745.html Hu Tao (2): acpi, piix4: Add memory hot unplug request support for piix4. pc, acpi bios: Add memory hot unplug interface. Tang Chen (11

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

2015-01-07 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] [RESEND PATCH v1 06/13] acpi, ich9: Add memory hot unplug request support for ich9.

2015-01-07 Thread Tang Chen
Call memory unplug request cb in ich9_pm_device_unplug_request_cb(). --- hw/acpi/ich9.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index c48d176..841f57d 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -304,8 +304,14 @@ void i

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

2015-01-07 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] [RESEND PATCH v1 04/13] acpi, mem-hotplug: Add unplug request cb for memory device.

2015-01-07 Thread Tang Chen
member named is_removing to MemStatus indicating that the memory slot is being removed. Set it to true in acpi_memory_unplug_request_cb(), and send SCI to guest. Signed-off-by: Tang Chen --- hw/acpi/memory_hotplug.c | 16 include/hw/acpi/memory_hotplug.h | 4 2 files

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

2015-01-07 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] [RESEND PATCH v1 05/13] acpi, piix4: Add memory hot unplug request support for piix4.

2015-01-07 Thread Tang Chen
From: Hu Tao Call memory unplug request cb in piix4_device_unplug_request_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/piix4.c b/hw/acpi/piix4.c index 4407388..f809c3a 100644 --- a/hw

[Qemu-devel] [RESEND PATCH v1 07/13] pc-dimm: Add memory hot unplug request support for pc-dimm.

2015-01-07 Thread Tang Chen
Implement memory unplug request cb for pc-dimm, and call it in pc_machine_device_unplug_request_cb(). --- hw/i386/pc.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 0f3b1e0..f501f1f 100644 --- a/hw/i386/pc.c +++

[Qemu-devel] [RESEND PATCH v1 11/13] pc-dimm: Add memory hot unplug support for pc-dimm.

2015-01-07 Thread Tang Chen
Implement unplug cb for pc-dimm. It remove the corresponding memory region, and unregister vmstat. At last, it calls memory unplug cb to reset memory status and do unparenting. --- hw/i386/pc.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/hw/i386/p

[Qemu-devel] [RESEND PATCH v1 10/13] acpi, ich9: Add memory hot unplug support for ich9.

2015-01-07 Thread Tang Chen
Call memory unplug cb in ich9_pm_device_unplug_cb(). --- hw/acpi/ich9.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 841f57d..0a8e757 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -317,8 +317,14 @@ void ich9_pm_device_un

[Qemu-devel] [RESEND PATCH v1 09/13] acpi, piix4: Add memory hot unplug support for piix4.

2015-01-07 Thread Tang Chen
Call memory unplug cb in piix4_device_unplug_cb(). --- hw/acpi/piix4.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index f809c3a..4ae4867 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -377,8 +377,16 @@ static void piix

[Qemu-devel] [RESEND PATCH v1 08/13] acpi, mem-hotplug: Add unplug cb for memory device.

2015-01-07 Thread Tang Chen
Reset all memory status, and unparent the memory device. --- hw/acpi/memory_hotplug.c | 16 include/hw/acpi/memory_hotplug.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index 3d8e398..2b0c8ca 100644 --- a/hw/

[Qemu-devel] [RESEND PATCH v1 13/13] pc, acpi bios: Add memory hot unplug interface.

2015-01-07 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/acpi-dsdt-mem-hotplug.dsl | 11 ++- hw/i386/ssdt-mem.dsl | 5 + include/hw/acpi/pc-hotplug.h | 2 ++ 3 files changed

[Qemu-devel] [RESEND PATCH v1 12/13] acpi: Add hardware implementation for memory hot unplug.

2015-01-07 Thread Tang Chen
This patch adds a new bit to memory hotplug IO port indicating that ej0 has been evaluated by guest OS. And call pc-dimm unplug cb to do the real removal. Signed-off-by: Hu Tao Signed-off-by: Tang Chen --- docs/specs/acpi_mem_hotplug.txt | 8 ++-- hw/acpi/memory_hotplug.c| 23

[Qemu-devel] [RFC PATCH 0/4] pass aer error to guest

2015-01-11 Thread Chen Fan
driver to recover from the error. Chen Fan (4): pcie_aer: fix typos in pcie_aer_inject_error comment pcie-aer: Fix command pcie_aer_inject_error is invalid vfio-pci: add aer capability support vfio-pci: pass the aer error to guest hw/pci/pcie_aer.c | 11 +++ hw/vfio/pci.c

[Qemu-devel] [RFC PATCH 1/4] pcie_aer: fix typos in pcie_aer_inject_error comment

2015-01-11 Thread Chen Fan
Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 1

[Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-11 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 40 1 file changed, 40 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index b4e73d1..0ee6326 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2667,6 +2667,41 @@ static int vfio_add_capabilities

[Qemu-devel] [RFC PATCH 4/4] vfio-pci: pass the aer error to guest

2015-01-11 Thread Chen Fan
. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- hw/vfio/pci.c | 35 --- include/hw/pci/pcie_aer.h | 3 ++- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 571dc92..4812e3d 100644

[Qemu-devel] [RFC PATCH 2/4] pcie-aer: Fix command pcie_aer_inject_error is invalid

2015-01-11 Thread Chen Fan
=bridge1,id=up.1,addr=00.0 -device xio3130-downstream,bus=up.1,id=down.1,port=1,addr=00.0,chassis=5 (qemu) pcie_aer_inject_error net0 POISON_TLP after that, guest can output the error message. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) dif

Re: [Qemu-devel] [PATCH 0/2] pcie-aer: Fix command pcie_aer_inject_error invalid

2015-01-11 Thread Chen, Fan
Hi all, I have sent another patches to implement "pass aer error to guest" including this patches, so please ignore this. Thanks, Chen On Wed, 2014-11-19 at 12:10 +0800, Chen Fan wrote: > set each patch details. > > Chen Fan (2): > pcie_aer: fix typos in pcie_ae

Re: [Qemu-devel] [RFC PATCH 2/4] pcie-aer: Fix command pcie_aer_inject_error is invalid

2015-01-14 Thread Chen Fan
On 01/12/2015 09:56 PM, Marcel Apfelbaum wrote: On 01/12/2015 05:04 AM, Chen Fan wrote: in spec "PCI Express 3.0" section 6.2.6 Figure 6-3 virtual bridge part, the flowchart showing tell us SERR# enable at Bridge Control register associate with system error at Secondary Status re

Re: [Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-15 Thread Chen Fan
On 01/12/2015 11:26 PM, Alex Williamson wrote: On Mon, 2015-01-12 at 11:04 +0800, Chen Fan wrote: This patch isn't trivial enough for a blank commit log. Why do we need to make those bits emulated? Do we only care about AER for now? I think the vfio extend capabilities control regi

Re: [Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-15 Thread Chen Fan
On 01/12/2015 09:14 PM, Paolo Bonzini wrote: On 12/01/2015 04:04, Chen Fan wrote: +static int vfio_add_ext_capabilities(VFIOPCIDevice *vdev) +{ +PCIDevice *pdev = &vdev->pdev; +PCIExpressDevice *exp; +uint32_t header; +uint16_t next = PCI_CONFIG_SPACE_SIZE; +

Re: [Qemu-devel] [RFC PATCH 2/4] pcie-aer: Fix command pcie_aer_inject_error is invalid

2015-01-16 Thread Chen Fan
On 01/12/2015 09:56 PM, Marcel Apfelbaum wrote: On 01/12/2015 05:04 AM, Chen Fan wrote: in spec "PCI Express 3.0" section 6.2.6 Figure 6-3 virtual bridge part, the flowchart showing tell us SERR# enable at Bridge Control register associate with system error at Secondary Status re

[Qemu-devel] [v6][PATCH 00/10] xen: add Intel IGD passthrough support

2015-01-19 Thread Tiejun Chen
assthrough. Michael S. Tsirkin (1): i440fx: make types configurable at run-time Tiejun Chen (9): pc_init1: pass parameters just with types piix: create host bridge to passthrough hw/pci-assign: split pci-assign.c

[Qemu-devel] [v6][PATCH 01/10] i440fx: make types configurable at run-time

2015-01-19 Thread Tiejun Chen
From: "Michael S. Tsirkin" Xen wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c| 4 +++- hw/pci-host/piix.c | 9 - include/hw/i38

[Qemu-devel] [v6][PATCH 03/10] piix: create host bridge to passthrough

2015-01-19 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 16 include/hw/i386/pc.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c

[Qemu-devel] [v6][PATCH 04/10] hw/pci-assign: split pci-assign.c

2015-01-19 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/Makefile.objs | 1 + hw/i386/kvm/pci-assign.c | 82

[Qemu-devel] [v6][PATCH 09/10] xen, gfx passthrough: register host bridge specific to passthrough

2015-01-19 Thread Tiejun Chen
Just register that pci host bridge specific to passthrough. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 4148028..f015238 100644 --- a/hw/i386/pc_piix.c +++ b

[Qemu-devel] [v6][PATCH 07/10] xen, gfx passthrough: register a isa bridge

2015-01-19 Thread Tiejun Chen
bably don't matter to the Gfx driver, but obviously any difference in display port connections will so it should be fine with any PCH in case of passthrough. So currently use one PCH version, 0x8c4e, to cover all HSW(Haswell) scenarios, 0x9cc3 for BDW(Broadwell). Signed-off-by: Tiejun Chen -

[Qemu-devel] [v6][PATCH 02/10] pc_init1: pass parameters just with types

2015-01-19 Thread Tiejun Chen
Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index cc10f72..4148028 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c

[Qemu-devel] [v6][PATCH 05/10] xen, gfx passthrough: basic graphics passthrough support

2015-01-19 Thread Tiejun Chen
basic gfx passthrough support: - add a vga type for gfx passthrough - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX Signed-off-by: Tiejun Chen Signed-off-by: Yang Zhang --- hw/xen/Makefile.objs | 1 + hw/xen/xen-host-pci-device.c | 5 ++ hw/xen/xen-host-pci

[Qemu-devel] [v6][PATCH 06/10] xen, gfx passthrough: retrieve VGA BIOS to work

2015-01-19 Thread Tiejun Chen
Now we retrieve VGA bios like kvm stuff in qemu but we need to fix Device Identification in case if its not matched with the real IGD device since Seabios is always trying to compare this ID to work out VGA BIOS. Signed-off-by: Tiejun Chen --- hw/xen/xen_pt.c | 10 ++ hw/xen

[Qemu-devel] [v6][PATCH 08/10] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2015-01-19 Thread Tiejun Chen
Some registers of Intel IGD are mapped in host bridge, so it needs to passthrough these registers of physical host bridge to guest because emulated host bridge in guest doesn't have these mappings. Signed-off-by: Tiejun Chen Signed-off-by: Yang Zhang --- hw/pci-host/piix.c | 3 +

[Qemu-devel] [v6][PATCH 10/10] xen, gfx passthrough: add opregion mapping

2015-01-19 Thread Tiejun Chen
The OpRegion shouldn't be mapped 1:1 because the address in the host can't be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). The original patch is from Jean Guyader Signed-off-by: Tiejun Chen Signed-of

[Qemu-devel] [PATCH] tcg: Use macro instead of hard code number 0xffffffff for tcg_target_ulong using

2015-01-19 Thread Chen Gang
x27;U'. - For higher, some append 'ull', some use type cast. - For lower but may be used higher bits, append 'ull'. Signed-off-by: Chen Gang --- tcg/optimize.c| 16 tcg/s390/tcg-target.c | 24 tcg/tcg.h

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