Re: [Qemu-devel] [v3][PATCH 2/4] hw:i386:pc_piix: split pc_init1()

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:48, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:32PM +0800, Tiejun Chen wrote: We'd like to split pc_init1 and then we can share something with other stuff. Signed-off-by: Tiejun Chen With patch 1 in place, this should not be necessary - just propage the co

Re: [Qemu-devel] [v3][PATCH 1/4] i440fx: make types configurable at run-time

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:48, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:31PM +0800, Tiejun Chen wrote: 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 You should have a

Re: [Qemu-devel] [v3][PATCH 3/4] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:50, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:33PM +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen

Re: [Qemu-devel] [v3][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:51, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:30PM +0800, Tiejun Chen wrote: v3: * Drop patch #4 * Add one patch #1 from Michael * Rebase You added my patch but don't use it, so most of my comment weren't addressed. I guess I should cover those co

[Qemu-devel] [v4][PATCH 1/5] i440fx: make types configurable at run-time

2014-08-05 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] [v4][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-08-05 Thread Tiejun Chen
. Michael S. Tsirkin (1): i440fx: make types configurable at run-time Tiejun Chen (4): pc_init1: pass parameters just with types I440FX_PCI_DEVICE: add pci_type to index xen:hw:pci-host:piix: create host bridge to passthrough

[Qemu-devel] [v4][PATCH 5/5] xen:hw:i386:pc_piix: introduce new machine for IGD passthrough

2014-08-05 Thread Tiejun Chen
Now we can introduce a new machine, xenigd, specific to IGD passthrough. This can avoid involving other common codes. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 43 +++ 1 file changed, 43 insertions(+) v4: * Rebase v3: * Rebase v2: * Unify

[Qemu-devel] [v4][PATCH 2/5] pc_init1: pass parameters just with types

2014-08-05 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(-) v4: * New patch to work for patch #1 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bf26550..2bf8046 100644 --- a/hw/i386

[Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index

2014-08-05 Thread Tiejun Chen
We need to use this index to reuse this macro later Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) v4: * New patch to extend I440FX_PCI_DEVICE diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 0cd82b8..4330599

[Qemu-devel] [v4][PATCH 4/5] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-05 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 39 +++ include/hw/i386/pc.h | 2 ++ 2 files

Re: [Qemu-devel] [v4][PATCH 4/5] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-06 Thread Chen, Tiejun
On 2014/8/6 17:42, Michael S. Tsirkin wrote: On Wed, Aug 06, 2014 at 02:50:34PM +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen

Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index

2014-08-06 Thread Chen, Tiejun
On 2014/8/6 17:45, Michael S. Tsirkin wrote: On Wed, Aug 06, 2014 at 02:50:33PM +0800, Tiejun Chen wrote: We need to use this index to reuse this macro later Signed-off-by: Tiejun Chen Which index? Most users don't need to change. Just open-code OBJECT_CHECK where necessary, or add

Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index

2014-08-06 Thread Chen, Tiejun
On 2014/8/7 5:07, Michael S. Tsirkin wrote: On Wed, Aug 06, 2014 at 06:17:02PM +0800, Chen, Tiejun wrote: On 2014/8/6 17:45, Michael S. Tsirkin wrote: On Wed, Aug 06, 2014 at 02:50:33PM +0800, Tiejun Chen wrote: We need to use this index to reuse this macro later Signed-off-by: Tiejun Chen

Re: [Qemu-devel] [v4][PATCH 4/5] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-06 Thread Chen, Tiejun
On 2014/8/7 5:04, Michael S. Tsirkin wrote: On Wed, Aug 06, 2014 at 05:47:12PM +0800, Chen, Tiejun wrote: On 2014/8/6 17:42, Michael S. Tsirkin wrote: On Wed, Aug 06, 2014 at 02:50:34PM +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just

[Qemu-devel] Debug single program in QEMU

2012-03-14 Thread Yue Chen
Hi!~ Now I'd like to see what the micro-ops (intermediate operations generated by TCG) of a single Linux or Windows program, any approach to do this under QEMU? Thanks.

Re: [Qemu-devel] Debug single program in QEMU

2012-03-15 Thread Yue Chen
But it is hard to localize a specific program instead of lots of logs. On Mar 15, 2012 4:14 AM, "陳韋任" wrote: > On Thu, Mar 15, 2012 at 01:26:44PM +0700, Mulyadi Santosa wrote: > > On Thu, Mar 15, 2012 at 09:12, Yue Chen wrote: > > > Hi!~ > > > > &g

Re: [Qemu-devel] Debug single program in QEMU

2012-03-15 Thread Yue Chen
stem mode, I > have > no good idea on how to track a specific program running on the guest OS. > > On Thu, Mar 15, 2012 at 09:40:48AM -0400, Yue Chen wrote: > > But it is hard to localize a specific program instead of lots of logs. > > On Mar 15, 2012 4:14 AM, "陳韋任"

Re: [Qemu-devel] Lack of codes in logging

2012-05-28 Thread Yue Chen
Do you know how to use that? When I use* "log(-d) exec" and "log(-d) pcall"*, the "qemu.log" is always empty. On Mon, May 28, 2012 at 10:47 PM, 陳韋任 (Wei-Ren Chen) < che...@iis.sinica.edu.tw> wrote: > On Mon, May 28, 2012 at 10:37:47PM -0400, Yue Chen wrote:

[Qemu-devel] Any approach to log the file read/write (I/O data flow) like the "-d in_asm" option?

2012-05-31 Thread Yue Chen
Hi, Any approach to log all the file read/write (I/O data flow) in order, together with the instruction traces in QEMU? Thanks.

Re: [Qemu-devel] Any approach to log the file read/write (I/O data flow) like the "-d in_asm" option?

2012-06-03 Thread Yue Chen
o do this? Thanks so much. On Fri, Jun 1, 2012 at 4:09 AM, Stefan Hajnoczi wrote: > On Fri, Jun 1, 2012 at 4:11 AM, Yue Chen wrote: > > Any approach to log all the file read/write (I/O data flow) in order, > > together with the instruction traces in QEMU? Thanks. > > It s

[Qemu-devel] How to speed up the CPU logging?

2012-06-09 Thread Yue Chen
Hi, Guy, When I use "*log cpu*" or "*log exec*" in the system "*-monitor stdio*" mode, it's extremely slow(lose my mouse/keyboard control). I used a buffer instead of directly writing log to disk, but even slower. When I give a large memory ("-m 4G") to VM, or set the process priority(chrt -f 99)

Re: [Qemu-devel] How to speed up the CPU logging?

2012-06-09 Thread Yue Chen
Thanks for replying. Do you know any easy way to do that? On Sat, Jun 9, 2012 at 11:02 AM, Blue Swirl wrote: > On Sat, Jun 9, 2012 at 2:37 PM, Yue Chen wrote: > > Hi, Guy, > > > > When I use "log cpu" or "log exec" in the system "-monitor stdio&

Re: [Qemu-devel] Debug single program in QEMU

2012-04-03 Thread Yue Chen
instructions come out when I use " -d in_asm " to log? It's hard to find the real instructions of that single program... Thanks. 2012/3/15 陳韋任 > http://qemu.weilnetz.de/qemu-doc.html#QEMU-User-space-emulator > > On Thu, Mar 15, 2012 at 10:42:02PM -0400, Yue Chen wrote: > > S

Re: [Qemu-devel] Debug single program in QEMU

2012-04-05 Thread Yue Chen
tem > mode? User mode shouldn't have the issue you described. For system mode, I > have > no good idea on how to track a specific program running on the guest OS. > > On Thu, Mar 15, 2012 at 09:40:48AM -0400, Yue Chen wrote: > > But it is hard to localize a specific program inste

[Qemu-devel] ModuleEntry field type not used

2012-03-06 Thread Chen Yufei
no long being used, and I have no problem compiling qemu after deleting this filed. -- Best regards, Chen Yufei

[Qemu-devel] ModuleEntry "type" field not used

2012-03-06 Thread Chen Yufei
own list, I guess this field is no long being used, and I have no problem compiling QEMU after deleting this filed. Is there any reason to preserve this field? My previous email seems failed to deliver to the mailing list, forgive me if this one duplicates. -- Best regards, Chen Yufei

[Qemu-devel] [PATCH] Remove type field in ModuleEntry as it's not used.

2012-03-07 Thread Chen Yufei
Signed-off-by: Chen Yufei --- module.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/module.c b/module.c index 106a969..c3a6da7 100644 --- a/module.c +++ b/module.c @@ -19,7 +19,6 @@ typedef struct ModuleEntry { -module_init_type type; void (*init)(void

[Qemu-devel] How to trace all the guest OS instructions and the micro-ops

2012-03-11 Thread Yue Chen
Hi! I am doing some research based on the QEMU. Does anyone know how to get (trace) all the instructions of the guest OS, and get all the intermediate micro-ops ? (Not in the 0.9.1 version) Additionally, how to get the whole memory or each process' memory data of the guest OS? I really apprecia

Re: [Qemu-devel] How to trace all the guest OS instructions and the micro-ops

2012-03-11 Thread Chen Yufei
On Mon, Mar 12, 2012 at 5:43 AM, Mulyadi Santosa wrote: > Hi > > On Sun, Mar 11, 2012 at 10:12, Yue Chen wrote: >> I am doing some research based on the QEMU. Does anyone know how to get >> (trace) all the instructions of the guest OS, and get all the intermediate >&g

Re: [Qemu-devel] How to trace all the guest OS instructions and the micro-ops

2012-03-11 Thread Yue Chen
latest version. On Mon, Mar 12, 2012 at 2:20 AM, Chen Yufei wrote: > On Mon, Mar 12, 2012 at 5:43 AM, Mulyadi Santosa > wrote: > > Hi > > > > On Sun, Mar 11, 2012 at 10:12, Yue Chen wrote: > >> I am doing some research based on the QEMU. Does anyone kno

[Qemu-devel] standalone C program "Hello World" on qemu-system-mipsel

2011-07-01 Thread Leo Chen.
Hi, all I am trying to run a standalone C program "Hello World" on qemu-system-mipsel, but it failed to print the message via serial port. What I have done now (step by step): 1. Successfully run a standalone C program "Hello World" on qemu-system-arm, by following this guide: http://balau82.word

Re: [Qemu-devel] standalone C program "Hello World" on qemu-system-mipsel

2011-07-03 Thread Leo Chen.
as Färber : > Hi, > > Am 02.07.2011 um 08:13 schrieb Leo Chen.: > >> qemu-system-mipsel -M mipssim -nographic -kernel bin/test.elf >> or >> qemu-system-mipsel -M malta -nographic -kernel bin/test.elf > > The use of -kernel for a random ELF executable looks str

Re: [Qemu-devel] [PATCH 1/1] ACPI: Call ACPI remove handler when handling ACPI eject event

2011-10-19 Thread Gong Chen
On Wed, Oct 19, 2011 at 10:47 AM, wrote: > From: Liu Ping Fan > > Call the remove handler for ACPI_NOTIFY_EJECT_REQUEST > > Signed-off-by: Liu Ping Fan > --- >  drivers/acpi/bus.c      |    2 +- >  drivers/acpi/scan.c     |    2 +- >  include/acpi/acpi_bus.h |    2 ++ >  3 files changed, 4 inse

Re: [Qemu-devel] [PATCH 1/1] ACPI: Call ACPI remove handler when handling ACPI eject event

2011-10-20 Thread Chen Gong
于 2011/10/20 17:37, qemul...@gmail.com 写道: On Wed, Oct 19, 2011 at 09:35:46PM +0800, Gong Chen wrote: On Wed, Oct 19, 2011 at 10:47 AM, wrote: From: Liu Ping Fan Call the remove handler for ACPI_NOTIFY_EJECT_REQUEST Signed-off-by: Liu Ping Fan --- drivers/acpi/bus.c |2

[Qemu-devel] endless loop when use qemu-system-mipsel to load bios

2011-11-11 Thread rui chen
Hi all, When I try to use command line "qemu-system-mipsel -M malta -L . -nographic" to run redboot, it will have an endless loop, then I find this bug, here is my patch: Author: Chen Rui Date: Sat Nov 12 01:38:23 2011 +0800 resolve an endless loop when use qemu-system

Re: [Qemu-devel] endless loop when use qemu-system-mipsel to load bios

2011-11-16 Thread rui chen
sorry, here is my new patch file: >From 05f4abe8d8c37f1585f2bb7cb89b15426044bb65 Mon Sep 17 00:00:00 2001 From: Chen Rui Date: Sun, 13 Nov 2011 19:42:42 +0800 Subject: [PATCH] resolve an endless loop when use qemu-system-mipsel to load bios Signed-off-by: Chen Rui --- hw/mips_malta.c |

Re: [Qemu-devel] [PATCH 4/5] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-03-23 Thread Chen Gang
On 03/16/2014 09:32 PM, Chen Gang wrote: > On 03/08/2014 09:58 PM, Chen Gang wrote: >> OK, thanks. >> >> Next, I will/should continue to analyse the performance issue for 9pfs >> when users drop into a long directory path under bash shell. >> > > After have

[Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-26 Thread Chen Gang
er 'break' within the matching block). After print "... not support for this target", it can avoid to print "... accelerator does not exist". Signed-off-by: Chen Gang --- vl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-27 Thread Chen Gang
On 03/27/2014 03:55 PM, Marcel Apfelbaum wrote: > On Thu, 2014-03-27 at 09:16 +0800, Chen Gang wrote: >> At present, each 'opt_name' of 'accel_list' is uniq with each other, so >> 'buf' can only match one 'opt_name'. >> >> When dro

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-27 Thread Chen Gang
On 03/27/2014 04:59 PM, Markus Armbruster wrote: > Chen Gang writes: > >> At present, each 'opt_name' of 'accel_list' is uniq with each other, so >> 'buf' can only match one 'opt_name'. >> >> When drop into the matching

[Qemu-devel] [PATCH trival] vl.c: clean up code

2014-03-30 Thread Chen Gang
'args' (which is defined in the middle of code block). Signed-off-by: Chen Gang --- vl.c | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/vl.c b/vl.c index 9975e5a..9c733cb 100644 --- a/vl.c +++ b/vl.c @@ -1188,1

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-03-30 Thread Chen Gang
which style is the best to Qemu. Thanks. On 03/30/2014 10:34 PM, Chen Gang wrote: > in get_boot_device() > > - remove 'res' to simplify code > > in main(): > > - remove useless 'continue'. > > - in main switch(): > >- re

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-30 Thread Chen Gang
Hello Maintainers: If it is necessary to send patch v2 by me, please let me know, I will/should send. Thanks. On 03/27/2014 06:01 PM, Chen Gang wrote: > > > On 03/27/2014 04:59 PM, Markus Armbruster wrote: >> Chen Gang writes: >> >>> At present, each 'opt

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-31 Thread Chen Gang
On 03/31/2014 08:38 PM, Markus Armbruster wrote: > Chen Gang writes: > >> Hello Maintainers: >> >> If it is necessary to send patch v2 by me, please let me know, I >> will/should send. > > Not a maintainer, but if you send a v2 with an improved commit mes

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-31 Thread Chen Gang
On 03/31/2014 09:01 PM, Peter Maydell wrote: > On 31 March 2014 13:53, Chen Gang wrote: >> On 03/31/2014 08:38 PM, Markus Armbruster wrote: >>> Chen Gang writes: >>> >>>> Hello Maintainers: >>>> >>>> If it is necessary to s

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-31 Thread Chen Gang
On 03/31/2014 09:16 PM, Peter Maydell wrote: > On 31 March 2014 14:12, Chen Gang wrote: >> Next, when I send trivial patches, I will/should cc to qemu-trivial. I >> guess, most of my future patches will be trivial patches (and for me, >> trivial != minor). > > We d

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-31 Thread Chen Gang
On 03/31/2014 09:33 PM, Peter Maydell wrote: > On 31 March 2014 14:26, Chen Gang wrote: >> Next, when I send trivial patches, I will only send to qemu-trivial (not >> send/cc to qemu-devel again), that will be more efficient. :-) > > No, please always send to qemu-dev

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-03-31 Thread Chen Gang
On 03/31/2014 11:49 PM, Markus Armbruster wrote: > Chen Gang writes: > >> in get_boot_device() >> >> - remove 'res' to simplify code >> >> in main(): >> >> - remove useless 'continue'. >> >> - in main switch(): &g

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Chen Gang
On 04/01/2014 04:13 PM, Markus Armbruster wrote: > Chen Gang writes: > >> On 03/31/2014 11:49 PM, Markus Armbruster wrote: >>> Chen Gang writes: >>> >>>> in get_boot_device() >>>> >>>> - remove 'res' to simplify code

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Chen Gang
On 04/01/2014 08:36 PM, Alex Bennée wrote: > > Chen Gang writes: > >> Hello Maintainers: >> >> In main switch of main(), it contents several styles for "{...}" code block. >> >> If it is necessary to use unique style within a function, please le

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-04-01 Thread Chen Gang
On 04/01/2014 09:33 PM, Markus Armbruster wrote: > Chen Gang writes: > >> On 04/01/2014 04:13 PM, Markus Armbruster wrote: >>> Chen Gang writes: >>> >>>> On 03/31/2014 11:49 PM, Markus Armbruster wrote: >>>>> Chen Gang writes: >>&

[Qemu-devel] [PATCH-trivial v2] vl: Report accelerator not supported for target more nicely

2014-04-04 Thread Chen Gang
When you ask for an accelerator not supported for your target, you get a bogus "accelerator does not exist" message: $ qemu-system-arm -machine none,accel=kvm KVM not supported for this target "kvm" accelerator does not exist. No accelerator found! Suppress it. Sign

Re: [Qemu-devel] [PATCH-trivial v2] vl: Report accelerator not supported for target more nicely

2014-04-06 Thread Chen Gang
On 04/04/2014 06:57 PM, Markus Armbruster wrote: > Chen Gang writes: > >> When you ask for an accelerator not supported for your target, you get >> a bogus "accelerator does not exist" message: >> >> $ qemu-system-arm -machine none,accel=kvm >>

Re: [Qemu-devel] [Qemu-trivial] [PATCH-trivial v2] vl: Report accelerator not supported for target more nicely

2014-04-06 Thread Chen Gang
On 04/06/2014 02:32 PM, Michael Tokarev wrote: > 04.04.2014 13:39, Chen Gang wrote: >> When you ask for an accelerator not supported for your target, you get >> a bogus "accelerator does not exist" message: >> >> $ qemu-system-arm -machine none,accel=kvm &

Re: [Qemu-devel] [PULL 01/11] vl: Report accelerator not supported for target more nicely

2014-04-08 Thread Chen Gang
Thanks, and I will/should finish the left trivial patches within this week (2014-04-13) On 04/08/2014 03:04 PM, Michael Tokarev wrote: > From: Chen Gang > > When you ask for an accelerator not supported for your target, you get > a bogus "accelerator does not exist"

[Qemu-devel] [PATCH trivial 0/3] vl: simplify code for main() and get_boot_device()

2014-04-08 Thread Chen Gang
ther code style issue: multiple "{...}" styles within "swith(...)"). Signed-off-by: Chen Gang --- vl.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCH trivial 1/3] vl: remove useless 'continue'

2014-04-08 Thread Chen Gang
Normal "if (...) {...} else {...}" is enough in "while(...) {...}", not need additional useless 'continue'. Signed-off-by: Chen Gang --- vl.c |1 - 1 file changed, 1 deletion(-) diff --git a/vl.c b/vl.c index 9975e5a..7505002 100644 --- a/vl.c +++ b/vl.c @@ -

[Qemu-devel] [PATCH trivial 2/3] vl: remove redundant local variable 'res'

2014-04-08 Thread Chen Gang
In function, if no additional resources to free before quit, commonly, need not use additional local variable 'res' to notice about it. So remove it to simplify code. Signed-off-by: Chen Gang --- vl.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vl.c b/

[Qemu-devel] [PATCH trivial 3/3] vl: remove local variable 'args' in the middle of code block

2014-04-08 Thread Chen Gang
n the middle of code block. And at present, we can assume that all related gcc versions will be latest enough to notice about this grammar. Signed-off-by: Chen Gang --- vl.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/vl.c b/vl.c index 377f962..d3814

Re: [Qemu-devel] [PATCH trivial 0/3] vl: simplify code for main() and get_boot_device()

2014-04-14 Thread Chen Gang
May any member help to check them? And next, I shall try to find bug issues (not code style or document issues), and fix them. Hope I can succeed. Thanks. On 04/08/2014 08:00 PM, Chen Gang wrote: > In "vl.c", at least, we can simplify the code below, so can let readers > rea

Re: [Qemu-devel] [PATCH trivial 1/3] vl: remove useless 'continue'

2014-04-14 Thread Chen Gang
On 04/15/2014 10:11 AM, Peter Crosthwaite wrote: > On Tue, Apr 8, 2014 at 10:01 PM, Chen Gang wrote: >> > Normal "if (...) {...} else {...}" is enough in "while(...) {...}", not >> > need additional useless 'continue'. >> > > Only i

Re: [Qemu-devel] [PATCH trivial 2/3] vl: remove redundant local variable 'res'

2014-04-14 Thread Chen Gang
On 04/15/2014 10:13 AM, Peter Crosthwaite wrote: > On Tue, Apr 8, 2014 at 10:02 PM, Chen Gang wrote: >> In function, if no additional resources to free before quit, commonly, >> need not use additional local variable 'res' to notice about it. So >> remove it to simp

Re: [Qemu-devel] [PATCH trivial 2/3] vl: remove redundant local variable 'res'

2014-04-15 Thread Chen Gang
On 04/15/2014 04:43 PM, Markus Armbruster wrote: > Peter Crosthwaite writes: > >> On Tue, Apr 8, 2014 at 10:02 PM, Chen Gang wrote: >>> In function, if no additional resources to free before quit, commonly, >>> need not use additional local variable 'res'

Re: [Qemu-devel] [PATCH trivial 1/3] vl: remove useless 'continue'

2014-04-15 Thread Chen Gang
On 04/15/2014 04:50 PM, Markus Armbruster wrote: > Chen Gang writes: > >> Normal "if (...) {...} else {...}" is enough in "while(...) {...}", not >> need additional useless 'continue'. >> >> Signed-off-by: Chen Gang >> --- >

Re: [Qemu-devel] [PATCH trivial 3/3] vl: remove local variable 'args' in the middle of code block

2014-04-15 Thread Chen Gang
On 04/15/2014 04:56 PM, Markus Armbruster wrote: > Chen Gang writes: > >> For C code, it does not recommend to define a local variable in the >> middle of code block without "{...}". The original author may want to >> zero members not mentioned in structure ass

Re: [Qemu-devel] [PATCH trivial 3/3] vl: remove local variable 'args' in the middle of code block

2014-04-15 Thread Chen Gang
On 04/15/2014 08:29 PM, Peter Crosthwaite wrote: > On Tue, Apr 8, 2014 at 10:05 PM, Chen Gang wrote: >> For C code, it does not recommend to define a local variable in the >> middle of code block without "{...}". The original author may want to >> zero mem

[Qemu-devel] [RFC qom-next v5 2/8] x86: add x86_cpu_unrealizefn() for cpu apic remove

2013-12-23 Thread Chen Fan
Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clean the apic related allocation and vmstates at here. Signed-off-by: Chen Fan --- hw/i386/kvm/apic.c | 8 hw/intc/apic.c | 10 ++ hw/intc

[Qemu-devel] [RFC qom-next v5 1/8] x86: move apic_state field from CPUX86State to X86CPU

2013-12-23 Thread Chen Fan
This motion is preparing for refactoring vCPU apic subsequently. Signed-off-by: Chen Fan --- cpu-exec.c| 2 +- cpus.c| 5 ++--- hw/i386/kvmvapic.c| 8 +++- hw/i386/pc.c | 17 - target-i386/cpu-qom.h | 4

[Qemu-devel] [RFC qom-next v5 4/8] qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier'

2013-12-23 Thread Chen Fan
Rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier' for adding remove vcpu notifier support. Signed-off-by: Chen Fan --- hw/acpi/piix4.c | 10 +- hw/i386/pc.c| 2 +- include/sysemu/sysemu.h | 2 +- qom/cpu.c | 10 +--

[Qemu-devel] [RFC qom-next v5 0/8] i386: add cpu hot remove support

2013-12-23 Thread Chen Fan
ove cpu from the last one rather than specify vcpuid and fix migration bug. Chen Fan (8): x86: move apic_state field from CPUX86State to X86CPU x86: add x86_cpu_unrealizefn() for cpu apic remove qmp: add 'cpu-del' command support qom cpu: rename variable 'cpu_added_notif

[Qemu-devel] [RFC qom-next v5 3/8] qmp: add 'cpu-del' command support

2013-12-23 Thread Chen Fan
add cpu hot-remove interface pc_hot_del_cpu() for unrealizing vcpu device. when using 'cpu-del' command, not need to specify vcpuid, the last one cpu will be removed. Signed-off-by: Chen Fan --- hw/i386/pc.c | 19 +++ hw/i386/pc_piix.c| 3 ++- include/h

[Qemu-devel] [RFC qom-next v5 5/8] qom cpu: add UNPLUG cpu notifier support

2013-12-23 Thread Chen Fan
Move struct HotplugEventType from file piix4.c to file qom/cpu.c, and add struct CPUNotifier for supporting UNPLUG cpu notifier. Signed-off-by: Chen Fan --- hw/acpi/piix4.c | 8 ++-- include/qom/cpu.h | 10 ++ qom/cpu.c | 6 +- 3 files changed, 17 insertions(+), 7

[Qemu-devel] [RFC qom-next v5 8/8] cpus: reclaim allocated vCPU objects

2013-12-23 Thread Chen Fan
After ACPI get a signal to eject a vCPU, then it will notify the vCPU thread to exit in KVM, and the vCPU must be removed from CPU list, before the vCPU really removed, there will release the all related vCPU objects. Signed-off-by: Chen Fan --- cpus.c | 39

[Qemu-devel] [RFC qom-next v5 7/8] piix4: implement function cpu_status_write() for vcpu ejection

2013-12-23 Thread Chen Fan
in the further OS should reject vcpu arbitrarily. Signed-off-by: Chen Fan --- cpus.c| 7 ++ hw/acpi/piix4.c | 48 ++- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 6 - include/qom/cpu.h | 10

[Qemu-devel] [RFC qom-next v5 6/8] i386: implement pc interface cpu_common_unrealizefn() in qom/cpu.c

2013-12-23 Thread Chen Fan
add interface cpu_common_unrealizefn() for emiting vcpu unplug notifier to ACPI, then ACPI could send sci interrupt to OS for hot-remove vcpu. Signed-off-by: Chen Fan --- qom/cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/qom/cpu.c b/qom/cpu.c index 728b83b..78038ab

Re: [Qemu-devel] [RFC qom-next v5 1/8] x86: move apic_state field from CPUX86State to X86CPU

2013-12-23 Thread Chen Fan
On Mon, 2013-12-23 at 16:36 +0100, Andreas Färber wrote: > Am 23.12.2013 10:04, schrieb Chen Fan: > > This motion is preparing for refactoring vCPU apic subsequently. > > > > Signed-off-by: Chen Fan > > --- > > cpu-exec.c| 2 +- > > cpus.

Re: [Qemu-devel] [PATCH qom-cpu] cpu-exec: Optimize X86CPU usage in cpu_exec()

2013-12-23 Thread Chen Fan
} else if ((interrupt_request & CPU_INTERRUPT_NMI) && > !(env->hflags2 & HF2_NMI_MASK)) { > @@ -685,6 +688,9 @@ int cpu_exec(CPUArchState *env) >(defined(TARGET_M68K) || defined(TARGET_PPC) || defined(TARGET_S390X))) > cc = CPU_GET_CLASS(cpu); > #endif > +#ifdef TARGET_I386 > +x86_cpu = X86_CPU(cpu); > +#endif > } > } /* for(;;) */ > Reviewed-by: Chen Fan Thanks. Chen

[Qemu-devel] [PATCH] vl.c: move "if (fd < 0)" into "if (fd <= STDERR_FILENO)"

2013-12-28 Thread Chen Gang
For valid 'fd' (in most cases), it is enough to only check whether it is larger than STDERR_FILENO, so recommend to move "if (fd < 0)" into failure processing block. Signed-off-by: Chen Gang --- vl.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --

Re: [Qemu-devel] [PATCH] vl.c: move "if (fd < 0)" into "if (fd <= STDERR_FILENO)"

2013-12-29 Thread Chen Gang
Firstly, thank you very much for your reply, this is my first patch for qemu. Next year (2014), as a volunteer, I will try to make a patch for qemu in each month. :-) On 12/29/2013 07:43 AM, Peter Maydell wrote: > On 28 December 2013 08:52, Chen Gang wrote: >> For valid 'fd&#

[Qemu-devel] [RFC 2/3] target-i386: add -smp X,apics=0x option

2014-01-14 Thread Chen Fan
This option provides the infrastructure for specifying apicids when boot VM, For example: #boot with apicid 0 and 2: -smp 2,apics=0xA,maxcpus=4 /* 1010 */ #boot with apicid 1 and 7: -smp 2,apics=0x41,maxcpus=8 /* 0100 0001 */ Signed-off-by: Chen Fan --- hw/i386/pc.c| 9

[Qemu-devel] [RFC 0/3] fix migration issues after hotplug a discontinuous cpuid

2014-01-14 Thread Chen Fan
arbitrary CPU hot-remove as well. Chen Fan (3): target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn() target-i386: add -smp X,apics=0x option target-i386: add qmp command 'query-cpus' to display apic_id cpus.c | 1

[Qemu-devel] [RFC 3/3] target-i386: add qmp command 'query-cpus' to display apic_id

2014-01-14 Thread Chen Fan
this patch provided the apic_id display as using command 'query-cpus'. Signed-off-by: Chen Fan --- cpus.c | 1 + qapi-schema.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index ca4c59f..e6ed098 100644 --- a/cpus.c +++ b/cpus.c

[Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()

2014-01-14 Thread Chen Fan
-by: Chen Fan --- exec.c| 5 + target-i386/cpu.c | 9 + 2 files changed, 14 insertions(+) diff --git a/exec.c b/exec.c index 7e49e8e..9be5855 100644 --- a/exec.c +++ b/exec.c @@ -438,7 +438,9 @@ CPUState *qemu_get_cpu(int index) void cpu_exec_init(CPUArchState *env

Re: [Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()

2014-01-15 Thread Chen Fan
On Tue, 2014-01-14 at 11:40 +0100, Igor Mammedov wrote: > On Tue, 14 Jan 2014 17:27:20 +0800 > Chen Fan wrote: > > > the intend of this patch is to register cpu vmstates with apic id instead > > of cpu > > index, due to the property setting of apic_id is behind the

Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-01-20 Thread Chen Fan
On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote: > On Fri, 17 Jan 2014 17:13:55 -0200 > Eduardo Habkost wrote: > > > On Wed, Jan 15, 2014 at 03:37:04PM +0100, Igor Mammedov wrote: > > > On Wed, 15 Jan 2014 20:24:01 +0800 > > > Chen Fan wrote: > >

Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-01-21 Thread Chen Fan
On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote: > On Tue, 21 Jan 2014 15:12:45 +0800 > Chen Fan wrote: > > > On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote: > > > On Fri, 17 Jan 2014 17:13:55 -0200 > > > Eduardo Habkost wrote: > > >

[Qemu-devel] [v1][Qemu-ppc][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size

2013-04-28 Thread Tiejun Chen
We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region. Signed-off-by: Tiejun Chen --- hw/ppc/e500.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index c1bdb6b..145d

Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size

2013-04-30 Thread Chen, Tiejun
> -Original Message- > From: Scott Wood [mailto:scottw...@freescale.com] > Sent: Wednesday, May 01, 2013 7:09 AM > To: Chen, Tiejun > Cc: ag...@suse.de; qemu-...@nongnu.org; qemu-devel@nongnu.org > Subject: Re: [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct >

Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size

2013-04-30 Thread Chen, Tiejun
> -Original Message- > From: Scott Wood [mailto:scottw...@freescale.com] > Sent: Wednesday, May 01, 2013 7:36 AM > To: Chen, Tiejun > Cc: ag...@suse.de; qemu-...@nongnu.org; qemu-devel@nongnu.org > Subject: Re: [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct >

Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size

2013-04-30 Thread Chen, Tiejun
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Tuesday, April 30, 2013 5:53 PM > To: Scott Wood > Cc: Chen, Tiejun; qemu-...@nongnu.org; qemu-devel@nongnu.org > Subject: Re: [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct > params-&g

Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size

2013-04-30 Thread Chen, Tiejun
> -Original Message- > From: Scott Wood [mailto:scottw...@freescale.com] > Sent: Tuesday, April 30, 2013 3:19 AM > To: Chen, Tiejun > Cc: ag...@suse.de; qemu-...@nongnu.org; qemu-devel@nongnu.org > Subject: Re: [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct >

[Qemu-devel] [v2][Qemu-ppc][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size

2013-05-01 Thread Tiejun Chen
We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region. Signed-off-by: Tiejun Chen --- v2: eliminate that original comment in v1. hw/ppc/e500.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/

Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-02-12 Thread Chen Fan
On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote: > Am 21.01.2014 10:51, schrieb Chen Fan: > > On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote: > >> On Tue, 21 Jan 2014 15:12:45 +0800 > >> Chen Fan wrote: > >>> On Mon, 2014-01-20 at 13:29 +0

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf()

2014-02-15 Thread Chen Gang
On 02/05/2014 07:44 AM, Chen Gang wrote: > On 02/05/2014 12:18 AM, Aneesh Kumar K.V wrote: >> >> That is a bug. The snprintf usage with PATH_MAX is to prevent buffer >> overflow and not to truncate. I guess we should fix path handling >> and propagate error correctl

Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-02-17 Thread Chen Fan
On Thu, 2014-02-13 at 10:44 +0100, Igor Mammedov wrote: > On Thu, 13 Feb 2014 14:14:08 +0800 > Chen Fan wrote: > > > On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote: > > > Am 21.01.2014 10:51, schrieb Chen Fan: > > > > On Tue, 2014-01-21 at 10:31 +01

Re: [Qemu-devel] [RFC 2/3] target-i386: add -smp X,apics=0x option

2014-02-17 Thread Chen Fan
On Mon, 2014-02-17 at 11:37 -0700, Eric Blake wrote: > On 01/14/2014 02:27 AM, Chen Fan wrote: > > This option provides the infrastructure for specifying apicids when > > boot VM, For example: > > > > #boot with apicid 0 and 2: > > -smp 2,apics=0xA,maxcpus=4 /*

[Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-02-22 Thread Chen Gang
r guest (permission denied). - Common test: All are still OK after apply this path. "mkdir -p", "create/open file/dir", "modify file/dir", "rm file/dir". change various mount point paths under host and/or guest. Signed-off-by: Chen Ga

Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-02-22 Thread Chen Gang
During the test, I found that if the path is long, the performance is very very slow under 9pfs (whether apply this patch or not, the results are the same). So after this patch passes checking, I will/should analyse this performance issue, next. Thanks. On 02/23/2014 12:48 PM, Chen Gang wrote

Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-02-24 Thread Gang Chen
Firstly, thank you very much for your reviewing. :-) On 02/24/2014 05:22 PM, Markus Armbruster wrote: > Chen Gang writes: > >> When path is truncated by PATH_MAX limitation, it causes QEMU to access >> incorrect file. So use original full path instead of PATH_MAX within &

[Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-25 Thread Chen Fan
Signed-off-by: Chen Fan --- include/qom/node.h | 66 +++ qom/Makefile.objs | 2 +- qom/node.c | 156 + 3 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 include/qom/node.h create mode 100644

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