Re: [Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-04 Thread li guang
code in seg_helper.c, which is > a nasty mix of direct access to dr[7] and using the hw_breakpoint_* > functions. > > -- PMM -- regards! li guang

Re: [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function

2012-12-04 Thread li guang
97,11 @@ void helper_movl_drN_T0(CPUX86State *env, int reg, > > target_ulong t0) > > env->dr[reg] = t0; > > hw_breakpoint_insert(env, reg); > > } else if (reg == 7) { > > -for (i = 0; i < 4; i++) { > > +for (i = 0; i < DR7_MAX_BP; i++) { > > hw_breakpoint_remove(env, i); > > } > > env->dr[7] = t0; > > -for (i = 0; i < 4; i++) { > > +for (i = 0; i < DR7_MAX_BP; i++) { > > hw_breakpoint_insert(env, i); > > } > > } else { > > diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c > > index ff93374..16d489a 100644 > > --- a/target-i386/seg_helper.c > > +++ b/target-i386/seg_helper.c > > @@ -465,9 +465,9 @@ static void switch_tss(CPUX86State *env, int > > tss_selector, > > > > #ifndef CONFIG_USER_ONLY > > /* reset local breakpoints */ > > -if (env->dr[7] & 0x55) { > > -for (i = 0; i < 4; i++) { > > -if (hw_breakpoint_enabled(env->dr[7], i) == 0x1) { > > +if (env->dr[7] & DR7_LOCAL_BP_MASK) { > > +for (i = 0; i < DR7_MAX_BP; i++) { > > +if (hw_breakpoint_enabled(env->dr[7], i)) { > > hw_breakpoint_remove(env, i); > > } > > } > > -- > > 1.7.2.5 > > > -- regards! li guang

Re: [Qemu-devel] [PATCH 1/3] target-i386:define name of breakpoint bit in dr7

2012-12-04 Thread li guang
icate that they're values for the TYPE field, not direct > specifications of bits in DR7. hmm, is it necessary? you know, the use of these names is after calling 'hw_breakpoint_type' function, so, it's obvious for dr7's type field. > > -- PMM -- regards! li guang

[Qemu-devel] [PATCH 0/3] target-i386:make breakpoint more cleaner

2012-12-04 Thread li guang
-i386/helper.c |70 -- target-i386/machine.c |2 +- target-i386/misc_helper.c |4 +- target-i386/seg_helper.c |6 ++-- 5 files changed, 60 insertions(+), 33 deletions(-) -- regards! li guang

Re: [Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-05 Thread li guang
在 2012-12-05三的 09:53 +0100,Jan Kiszka写道: > On 2012-12-05 01:51, li guang wrote: > > 在 2012-12-04二的 11:26 +,Peter Maydell写道: > >> On 4 December 2012 11:11, Jan Kiszka wrote: > >>> On 2012-12-04 11:23, Peter Maydell wrote: > >>>> Doesn't

Re: [Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-05 Thread li guang
在 2012-12-06四的 10:08 +0800,li guang写道: > 在 2012-12-05三的 09:53 +0100,Jan Kiszka写道: > > On 2012-12-05 01:51, li guang wrote: > > > 在 2012-12-04二的 11:26 +,Peter Maydell写道: > > >> On 4 December 2012 11:11, Jan Kiszka wrote: > > >>> On 2012-12-04 11:2

[Qemu-devel] [PATCH v2 0/3] target-i386:make breakpoint more cleaner

2012-12-05 Thread li guang
6 ++-- 5 files changed, 77 insertions(+), 34 deletions(-) -- regards! li guang

Re: [Qemu-devel] [Qemu-trivial] [PATCH v4] correct error message qemu-img reported

2012-12-06 Thread li guang
> > > > Signed-off-by: liguang > > --- > > qemu-img.c |7 ++- > > 1 files changed, 6 insertions(+), 1 deletions(-) > > Reviewed-by: Stefan Hajnoczi -- regards! li guang

Re: [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function

2012-12-06 Thread li guang
for the subjects of all the patch emails and not just the > cover letter that would be helpful. git format-patch's > --subject-prefix='PATCH v3' option should do this for you. > > -- PMM -- regards! li guang

Re: [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function

2012-12-06 Thread li guang
在 2012-12-06四的 09:23 +,Peter Maydell写道: > On 6 December 2012 09:16, li guang wrote: > > 在 2012-12-06四的 08:54 +,Peter Maydell写道: > >> On 6 December 2012 03:03, liguang wrote: > >> > Signed-off-by: liguang > >> > --- a/target-i386/seg_help

Re: [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function

2012-12-06 Thread li guang
在 2012-12-06四的 09:48 +,Peter Maydell写道: > On 6 December 2012 09:36, Andreas Färber wrote: > > Am 06.12.2012 10:27, schrieb li guang: > >> 在 2012-12-06四的 09:23 +,Peter Maydell写道: > >>> On 6 December 2012 09:16, li guang wrote: > >>>> 在 2012-12

[Qemu-devel] [PATCH v3 0/3] target-i386:make breakpoint more cleaner

2012-12-06 Thread li guang
misc_helper.c |4 +- target-i386/seg_helper.c |6 ++-- 5 files changed, 77 insertions(+), 34 deletions(-) -- regards! li guang

Re: [Qemu-devel] [PATCH v4] correct error message qemu-img reported

2012-12-06 Thread li guang
t; Oh, my fault, I'll fix. Thanks! > Kevin > > > > +if (*end) { > > error_report("Invalid image size specified! You may use k, M, > > G or " > >"T suffixes for "); > > error_report("kilobytes, megabytes, gigabytes and terabytes."); > > > > > -- regards! li guang

Re: [Qemu-devel] [PATCH v3 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-09 Thread li guang
, I'll fix for them. Thanks! > > > > >> +} > >> + > >> +static inline bool hw_global_breakpoint_enabled(unsigned long dr7, int > >> index) > >> +{ > >> +return !!((dr7 >> (index * 2)) & 2); > >> +} > >> + > >> +static inline bool hw_breakpoint_enabled(unsigned long dr7, int index) > >> +{ > >> +return (hw_global_breakpoint_enabled(dr7, index) || > >> +hw_local_breakpoint_enabled(dr7, index)); > >> } > > > > -- PMM > > > -- regards! li guang

Re: [Qemu-devel] [ [PATCH 1/2] cutils:change strtosz_suffix_unit function

2012-12-11 Thread li guang
> +double val, integral, fraction; > > > > errno = 0; > > val = strtod(nptr, &endptr); > > @@ -246,6 +246,7 @@ int64_t strtosz_suffix_unit(const char *nptr, char > > **end, > > goto fail; > > } > > if ((val * mul >= INT64_MAX) || val < 0) { > > +retval = 0; > > goto fail; > > } > > retval = val * mul; > > -- > > 1.7.2.5 > > > > -- regards! li guang

Re: [Qemu-devel] [ [PATCH 2/2] qemu-img:report size overflow error message

2012-12-11 Thread li guang
patch > in the commit message. OK, reasonable. Thanks! -- regards! li guang

Re: [Qemu-devel] [PATCH v4 1/3] target-i386:define name of breakpoint bit in dr7

2012-12-13 Thread li guang
INST 0x0 > +#define DR7_TYPE_DATA_WR 0x1 > +#define DR7_TYPE_IO_RW 0x2 > +#define DR7_TYPE_DATA_RW 0x3 > + > > #define PG_PRESENT_BIT 0 > #define PG_RW_BIT1 -- regards! li guang

Re: [Qemu-devel] [PATCH 2/2] qemu-img:report size overflow error message

2012-12-16 Thread li guang
"); > } else { > error_report("Invalid image size specified!" > " You may use k, M, G or T suffixes for"); > error_report("kilobytes, megabytes, gigabytes and > terabytes."); > } > ret = -1; > goto out; > } > > To be pedantically correct, "8 exabytes" should be "8 Exbibytes" or "8 > EiB". yes, it's better. Thanks! -- regards! li guang

Re: [Qemu-devel] [PATCH 1/2] cutils:change strtosz_suffix_unit function

2012-12-16 Thread li guang
ed = 0; > > @@ -246,6 +246,7 @@ int64_t strtosz_suffix_unit(const char *nptr, char > > **end, > > goto fail; > > } > > if ((val * mul >= INT64_MAX) || val < 0) { > > +retval = ERANGE; > > goto fail; > > } > > retval = val * mul; > > Your error codes aren't negative, and you failed to update the function > comment! OK, will fix. -- regards! li guang

Re: [Qemu-devel] [PATCH 1/2] cutils:change strtosz_suffix_unit function

2012-12-16 Thread li guang
; > > unsigned char c; > > > int mul_required = 0; > > > @@ -246,6 +246,7 @@ int64_t strtosz_suffix_unit(const char *nptr, char > > > **end, > > > goto fail; > > > } > > > if ((val * mul >= INT64_MAX) || val < 0) { > > > +retval = ERANGE; > > > goto fail; > > > } > > > retval = val * mul; > > > > Your error codes aren't negative, and you failed to update the function > > comment! > Returning negative here is fine for now form target-i386/cpu.c pov. OK -- regards! li guang

Re: [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number

2012-12-19 Thread li guang
) { > > qemu_log("%s: %d %d\n", __func__, exception, error_code); > > -#endif > > +} > > + seems original '#if 1, #endif' statement is for temporary debug only, so maybe can be concealed out entirely. for log purpose, every exception code will log when 'do_interrupt' for MIPS if log is enabled. > > env->exception_index = exception; > > env->error_code = error_code; > > > > -- > > 1.7.3.4 > -- regards! li guang

Re: [Qemu-devel] [PATCH] Makefile: remove *.lo files when make clean

2013-01-25 Thread li guang
rm -f *.a $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ > > rm -f *.la > > rm -Rf .libs > > rm -f qemu-img-cmds.h > > > > See the similar patch at > http://permalink.gmane.org/gmane.comp.emulators.qemu/188686 > > Paolo Oh, sorry, didn't notice it. but, seems rm libcacard.la is overshoot, it doesn't hurt, am I right? -- regards! li guang

Re: [Qemu-devel] [PATCH 0/3] accel:some cleanup work for vm accelerator

2013-01-28 Thread li guang
ping ... 在 2013-01-24四的 13:03 +0800,liguang写道: > do some cleanup work fo vm accelerator > > patch 1/3: skip init accelerator if it's not available > patch 2/3: correct error message when fail to init kvm > patch 3/3: change {xen,kvm,tcg,qtest}_allowed from int to bool > > hw/xen.h

Re: [Qemu-devel] [PATCH 5/6] load_linux: report open kernel file & its size error

2013-02-04 Thread li guang
OK, will fix. Thanks! 在 2013-02-04一的 18:20 +,Blue Swirl写道: > On Mon, Feb 4, 2013 at 2:27 AM, liguang wrote: > > Signed-off-by: liguang > > --- > > hw/pc.c | 14 +++--- > > 1 files changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/hw/pc.c b/hw/pc.c > > index 01d00f6..0

Re: [Qemu-devel] [seabios][PATCH 2/2] acpi: change numa data format from fw_cfg interface

2013-02-14 Thread li guang
Sorry for late reply 在 2013-02-06三的 23:18 -0500,Kevin O'Connor写道: > On Mon, Feb 04, 2013 at 10:28:00AM +0800, liguang wrote: > > the old numa format got form fw_cfg is: > > number of nodes > > node id of cpu (array) > > node memory size (array) > > > > now, format it like array of: > > apci_map,

Re: [Qemu-devel] [seabios][PATCH 1/2] move all acpi-table related definitions to acpi.h

2013-02-14 Thread li guang
在 2013-02-06三的 23:15 -0500,Kevin O'Connor写道: > On Mon, Feb 04, 2013 at 10:27:59AM +0800, liguang wrote: > > Signed-off-by: liguang > > Thanks. Some comments. > > [...] > > --- a/src/acpi.h > > +++ b/src/acpi.h > [...] > > +#include "acpi-dsdt.hex" > > Moving the acpi structure defines to the h

Re: [Qemu-devel] [PATCH] machine: correct macro name for default boot_order

2013-02-21 Thread li guang
在 2013-02-20三的 09:28 +0100,Markus Armbruster写道: > liguang writes: > > > DEFAULT_MACHINE_OPTIONS is setting default boot_order, > > while QEMUMachine already has default_machine_opts > > to encapsulate some default options, so change it to > > DEFAULT_MACHINE_BOOT_ORDER. > > Right now, DEFAULT_MA

Re: [Qemu-devel] [PATCH 1/3] target-i386: group cpu model definitions by vendor

2013-02-28 Thread li guang
ping ... 在 2013-02-27三的 09:17 +0800,liguang写道: > Signed-off-by: liguang > --- > target-i386/cpu.c | 296 ++-- > 1 files changed, 148 insertions(+), 148 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index aab35c7..ce76055 1

Re: [Qemu-devel] [PATCH][RFC] vl: move unrelated functions out of vl.c

2013-03-04 Thread li guang
Hi, Anthony is it reasonable split? 在 2013-02-28四的 12:45 +0800,liguang写道: > now, lots of other functions which were not related with > mainloop exist in vl.c, e.g. > > numa related functions (numa_add() ...) > bt related functions (bt_parse() ...) > usb related functions (usb_parse() ...) > gui

Re: [Qemu-devel] [SeaBIOS] [Seabios PATCH] make reboot-timeout to static for using it after POST phase

2013-03-05 Thread li guang
在 2013-03-05二的 10:06 +0800,Amos Kong写道: > From: Kevin O'Connor > > Memory allocated with malloc_tmp() can't be used after the POST > phase. The reboot-timeout inside romfile could not be loaded in > boot_fail(). The patch saved reboot-timeout to a static variable, > it fixed the regression bug in

Re: [Qemu-devel] [PATCH v2 3/3] hw: correctly implement soft reset

2013-03-05 Thread li guang
在 2013-03-05二的 20:00 +0100,Paolo Bonzini写道: > Do not do a hard reset for port 92h, keyboard controller, or cf9h soft reset. > These only reset the CPU. > > Reviewed-by: Anthony Liguori > Signed-off-by: Paolo Bonzini > --- > hw/lpc_ich9.c | 7 ++- > hw/pc.c | 3 ++- > hw/pckbd.c| 5

Re: [Qemu-devel] [PATCH v2 3/3] hw: correctly implement soft reset

2013-03-06 Thread li guang
在 2013-03-06三的 09:36 +0100,Paolo Bonzini写道: > Il 06/03/2013 03:02, li guang ha scritto: > > 在 2013-03-05二的 20:00 +0100,Paolo Bonzini写道: > >> Do not do a hard reset for port 92h, keyboard controller, or cf9h soft > >> reset. > >> These only reset the CPU. &g

Re: [Qemu-devel] [PATCH v13 0/8] pv event interface between host and guest

2013-03-06 Thread li guang
在 2013-03-06三的 10:07 +0100,Paolo Bonzini写道: > Il 06/03/2013 09:56, Hu Tao ha scritto: > >> > > >> > Something like this should work (in SeaBIOS's src/acpi-dsdt-isa.dsl): > >> > > >> > Device(PEVT) { > >> > Name(_HID, EisaId("QEMU0001")) > >> > OperationRegion(PEOR, SystemIO, 0

[Qemu-devel] propose to implement ower device

2013-03-06 Thread li guang
Hi, Anthony and all By now all devices of QEMU do not have much more power management consideration, for example, if system do suspend, it will call all registered notifiers, this was loosely required, and the code to do power management state transition seems just do 'ugly emulation', rather than

Re: [Qemu-devel] propose to implement ower device

2013-03-10 Thread li guang
在 2013-03-07四的 21:41 +0800,Wenchao Xia写道: > 于 2013-3-7 11:40, li guang 写道: > > Hi, Anthony and all > > > > By now all devices of QEMU do not have much more > > power management consideration, for example, if > > system do suspend, it will call all registere

[Qemu-devel] propose to implement power device

2013-03-10 Thread li guang
Hi, all By now all devices of QEMU do not have much more power management consideration, for example, if system do suspend, it will call all registered notifiers, this was loosely required, and the code to do power management state transition seems just do 'ugly emulation', rather than be consciou

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip

2013-03-14 Thread li guang
ke to ask all > developers to help correct this idea, if it's worth to implement, > I'll go head to refactor more. > > Li Guang (14) >gitignore: ignore more files >qdev: add power management method >qdev: remove redundant abort() >

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip

2013-03-17 Thread li guang
ping ... 在 2013-03-15五的 08:59 +0800,li guang写道: > Hi, Anthony > > Sorry to bother you, > can you please help to see it this work is > worth to go on, or ... > > or someone else can help to see this patch-set. > > Thanks All. > > > 在 2013-03-13三的 16

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip

2013-03-18 Thread li guang
在 2013-03-18一的 09:34 +0100,Andreas Färber写道: > Am 13.03.2013 09:01, schrieb liguang: > > Li Guang (14) > > gitignore: ignore more files > > qdev: add power management method > > qdev: remove redundant abort() > > qdev: add power on/off/suspend

Re: [Qemu-devel] [PATCH][RFC 04/14] qdev: add power on/off/suspend/wakeup handler

2013-03-18 Thread li guang
在 2013-03-18一的 09:31 +0100,Andreas Färber写道: > Am 13.03.2013 09:01, schrieb liguang: > > Signed-off-by: liguang > > --- > > hw/qdev-core.h |9 + > > hw/qdev.c | 96 > > > > 2 files changed, 105 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH][RFC 02/14] qdev: add power management method

2013-03-18 Thread li guang
Thanks! 在 2013-03-18一的 09:25 +0100,Andreas Färber写道: > Am 13.03.2013 09:01, schrieb liguang: > > In fact, every devices have to be aware of > > it's power management, so it can decide what > > to do when platform board switch it's power > > state between on/off/suspend/wakeup. > > > > Signed-off-

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip

2013-03-18 Thread li guang
在 2013-03-18一的 11:07 +,Peter Maydell写道: > On 13 March 2013 08:01, liguang wrote: > > By now, all devices of QEMU do not have much more > > power management consideration, for example, if > > system do suspend, it will call all registered notifiers, > > this was loosely required, and the code t

Re: [Qemu-devel] [RFC PATCH v4 00/30] ACPI memory hotplug

2013-03-18 Thread li guang
在 2013-01-10四的 19:57 +0100,Vasilis Liaskovitis写道: > > > > > > IIRC q35 supports memory hotplug natively (picked up in some > > > discussion). Is that correct? > > > > > From previous discussion I also understand that q35 supports native > > hotplug. > > Sections 5.1 and 5.2 of the spec describ

Re: [Qemu-devel] [RFC PATCH v4 00/30] ACPI memory hotplug

2013-03-19 Thread li guang
在 2013-02-28四的 11:18 +0100,Vasilis Liaskovitis写道: > Hi, > > sorry for the delay. > On Tue, Feb 19, 2013 at 07:39:40PM -0300, Erlon Cruz wrote: > > On Tue, Dec 18, 2012 at 10:41 AM, Vasilis Liaskovitis < > > vasilis.liaskovi...@profitbricks.com> wrote: > > > > > This is v4 of the ACPI memory hotpl

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip

2013-03-19 Thread li guang
在 2013-03-19二的 09:05 +,Peter Maydell写道: > On 19 March 2013 00:55, li guang wrote: > > 在 2013-03-18一的 11:07 +,Peter Maydell写道: > >> I'm really dubious that this can or should be implemented by > >> adding methods at the device base class level. I don'

Re: [Qemu-devel] [PATCH] i386: Use #defines instead of magic numbers for CPUID cache information

2013-08-26 Thread li guang
在 2013-08-26一的 19:23 -0300,Eduardo Habkost写道: > This is an attempt to make the CPUID cache topology code clearer, by > replacing the magic numbers in the code with #defines, and moving all > the cache information to the same place in the file. > > I took care of comparing the assembly output of co

Re: [Qemu-devel] [PATCH v2 1/2] tcg/mips: detect available host instructions at runtime

2013-08-27 Thread li guang
Hi, Aurelien, to nitpick, use_mips32r2_instructions may already indicate use_mips32_instructions,right? so during ISA detection, we may first do mips32r2, then mips32 detection is unnecessary, I think. 在 2013-08-28三的 00:11 +0200,Aurelien Jarno写道: > Now that TCG supports enabling and disabling o

Re: [Qemu-devel] [PATCH] exec: avoid tcg_commit when kvm_enabled

2013-09-03 Thread Li Guang
can help to assure whether Xen & QTest need tcg_commit? > > > +memory_listener_register(&tcg_memory_listener, > > &address_space_memory); > > +} > > } > > > > MemoryRegion *get_system_memory(void) > -- Thanks! Li Guang

Re: [Qemu-devel] [Qemu-trivial] [PATCH] cputlb: remove dead function tlb_update_dirty

2013-09-03 Thread Li Guang
the fallout. ;) > > Similarly target-i386 TCG is not suited for qemu-trivial IMO, instead > rth or someone who works on and/or reviews it (rth?) should volunteer as > proper maintainer. I'd like to maintain cputlb.c, can I? > With the larger part of the community using KVM these > days, we simply can't have that be handled by the community at large any > more. > > So yes, I know you were on vacation and you seem eager to take up work > again, that's great; I'm just cautioning that CC'ing everything on > qemu-trivial (not your fault, you're on the receiving end) can't be the > new solution, so feel encouraged to push back a little. :) > > Cheers, > Andreas > -- Thanks! Li Guang

Re: [Qemu-devel] [PATCH] exec: avoid tcg_commit when kvm_enabled

2013-09-03 Thread Li Guang
在 2013-09-04三的 08:23 +0200,Paolo Bonzini写道: > Il 04/09/2013 03:07, Li Guang ha scritto: > > 在 2013-09-03二的 10:39 +0200,Andreas Färber写道: > >> Am 03.09.2013 08:59, schrieb liguang: > >>> Signed-off-by: liguang > >>> --- > >>> exec.c |4 +++

[Qemu-devel] 答复: [PATCH] vnc: add additional key up event before repeated key down

2014-09-17 Thread Li, Guang
> -邮件原件- > 发件人: qemu-devel-bounces+lig.fnst=cn.fujitsu@nongnu.org > [mailto:qemu-devel-bounces+lig.fnst=cn.fujitsu@nongnu.org] 代表 Peter > Maydell > 发送时间: 2014年9月18日 0:09 > 收件人: Gerd Hoffmann > 抄送: Stefano Stabellini; Markus Armbruster; qemu-devel; > xen-de...@lists.xen.org; Anthony

Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device

2013-04-09 Thread li guang
在 2013-04-09二的 13:06 +0200,Paolo Bonzini写道: > Il 09/04/2013 10:26, li guang ha scritto: > > > qemu_system_suspend_request, qemu_register_suspend_notifier > > >for S0->S3 > > > > > > qemu_system_wakeup_request, qemu_re

Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast

2013-04-09 Thread li guang
在 2013-04-09二的 13:36 +0200,Paolo Bonzini写道: > Il 08/04/2013 13:32, Igor Mammedov ha scritto: > > > >> > This patch should be combined with [PATCH 07/22] > >> > > >> > 在 2013-04-05五的 16:37 +0200,Igor Mammedov写道: > >>> > > Signed-off-by: Igor Mammedov > >>> > > --- > >>> > > hw/ioapic_common.c |

Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_internal

2013-04-09 Thread li guang
在 2013-04-09二的 10:08 +0100,Peter Maydell写道: > On 9 April 2013 09:21, li guang wrote: > > 在 2013-04-09二的 10:11 +0200,Paolo Bonzini写道: > >> Il 09/04/2013 10:05, 陳韋任 (Wei-Ren Chen) ha scritto: > >> > Hi liguang, > >> > > >> > Just to be cu

Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_internal

2013-04-09 Thread li guang
在 2013-04-10三的 10:31 +0800,陳韋任 (Wei-Ren Chen)写道: > Hi liguang, > > > OK, thanks! > > but, please make no mistake, > > I'm not saying this patch promote performance of TCG, > > this just optimize code writing of this function, of > > course code writing is not deemed to promote its performance. > >

Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_internal

2013-04-09 Thread li guang
在 2013-04-10三的 10:58 +0800,陳韋任 (Wei-Ren Chen)写道: > > you're right, seems the word 'optimize' is not good here. > > but what should I use? > > you know, even compiler like gcc will use -O for code optimization. > > "translate: code cleanup in gen_intermediate_code_internal" would be > better, I t

Re: [Qemu-devel] [PATCH] translate: cleanup gen_intermediate_code_internal

2013-04-10 Thread li guang
在 2013-04-10三的 09:44 +0200,Paolo Bonzini写道: > Il 10/04/2013 05:30, liguang ha scritto: > > Signed-off-by: liguang > > --- > > target-arm/translate.c | 17 - > > target-i386/translate.c | 17 - > > target-mips/translate.c | 16 > > 3 files ch

Re: [Qemu-devel] [PATCH 1/2] target-i386: remove cpu reset callback

2013-04-10 Thread li guang
在 2013-04-10三的 10:34 +0200,Igor Mammedov写道: > On Wed, 10 Apr 2013 16:02:28 +0800 > liguang wrote: > > > we should remove it now, if not, cpu reset > > will do 2 times. > Currently CPU is bus-less device so there isn't anything to reset it during > reboot except callback. > This patch will break

Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device

2013-04-10 Thread li guang
在 2013-04-10三的 15:52 +0200,Paolo Bonzini写道: > Il 10/04/2013 15:41, guang li ha scritto: > > Yes, you're right. > > The motivation is I want to implement a device > > called EC which is a notion from laptop for QEMU, > > EC has some main functions, like keyboard, mouse, > > low-speed device control(

Re: [Qemu-devel] [PATCH] translate: cleanup gen_intermediate_code_internal

2013-04-10 Thread li guang
在 2013-04-10三的 11:54 +0200,Paolo Bonzini写道: > Il 10/04/2013 09:55, li guang ha scritto: > > 在 2013-04-10三的 09:44 +0200,Paolo Bonzini写道: > >> Il 10/04/2013 05:30, liguang ha scritto: > >>> Signed-off-by: liguang > >>> --- > >>> target-arm/tr

Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_internal

2013-04-10 Thread li guang
在 2013-04-09二的 17:20 +0800,陳韋任 (Wei-Ren Chen)写道: > Hi liguang, > > On Tue, Apr 09, 2013 at 04:21:10PM +0800, li guang wrote: > > 在 2013-04-09二的 10:11 +0200,Paolo Bonzini写道: > > > Il 09/04/2013 10:05, 陳韋任 (Wei-Ren Chen) ha scritto: > > > > Hi liguang, > &

Re: [Qemu-devel] [PATCH v3] hw/i386/pc: prompt not multboot or morden kernel image

2013-04-10 Thread li guang
在 2013-04-09二的 14:15 -0500,Jesse Larrew写道: > On 04/09/2013 12:05 AM, li guang wrote: > > 在 2013-04-08一的 23:36 -0500,Jesse Larrew写道: > >> On 04/08/2013 09:27 PM, liguang wrote: > >>> if head magic is missing or wrong unexpectedly, we'd > >>> better

[Qemu-devel] [PATCH 00/16] minially change gen_intermediate_code_internal function

2013-04-10 Thread li guang
here are instructions in the finial qemu-system-x86 before and after my chanage, you can easily find a redundant 'addl' was removed this patch-set is v2 of previous 'translate: cleanup gen_intermediate_code_internal patch' v2: Keep variable 'num_insns' initailization spotted by 陳韋任 (Wei-Ren

Re: [Qemu-devel] [PATCH 00/16] minially change gen_intermediate_code_internal function

2013-04-10 Thread li guang
Oh, sorry, minially -> minimally 在 2013-04-11四的 11:41 +0800,li guang写道: > here are instructions in the finial qemu-system-x86 > before and after my chanage, you can easily find a > redundant 'addl' was removed > > this patch-set is v2 of

[Qemu-devel] [update][PATCH 00/16] minimally change gen_intermediate_code_internal functio

2013-04-10 Thread li guang
this patch-set is v2 of previous 'translate: cleanup gen_intermediate_code_internal patch' v2: Keep variable 'num_insns' initailization spotted by 陳韋任 (Wei-Ren Chen) update: 1. correct miss-spelled word 'mini*ally' 2. change second place just like first here are instructions in the

Re: [Qemu-devel] [PATCH] translate: cleanup gen_intermediate_code_internal

2013-04-10 Thread li guang
Yes, Thanks! 在 2013-04-11四的 08:23 +0200,Paolo Bonzini写道: > Il 11/04/2013 04:11, li guang ha scritto: > >> > I don't care if the compiler doesn't complain (though I doubt it > >> > doesn't; are you using --enable-debug? > > absolutely yes. > &

Re: [Qemu-devel] [update][PATCH 00/16] minimally change gen_intermediate_code_internal functio

2013-04-10 Thread li guang
I would like to say this manual code writing optimization may be mostly done by compiler's optimization work, so one may view these changes as unnecessary, but I think it's not the execute to do not blame the code. 在 2013-04-11四的 14:31 +0800,li guang写道: > this patch-set is v

Re: [Qemu-devel] [PATCH 3/3] debugcon: fix compiler warning when open DEBUG_DEBUGCON

2013-04-14 Thread li guang
在 2013-04-12五的 14:19 +0200,Andreas Färber写道: > Am 12.04.2013 06:12, schrieb liguang: > > compiler warnings: > > CChw/char/debugcon.o > > hw/char/debugcon.c: In function ‘debugcon_ioport_write’: > > hw/char/debugcon.c:58: warning: format ‘%02x’ expects type ‘unsigned int’, > > but argument 3

Re: [Qemu-devel] [PATCH 11/19] target-i386: introduce apic-id property

2013-04-14 Thread li guang
在 2013-04-12五的 13:29 -0300,Eduardo Habkost写道: > On Fri, Apr 12, 2013 at 05:46:42PM +0200, Igor Mammedov wrote: > > On Fri, 12 Apr 2013 10:13:13 -0300 > > Eduardo Habkost wrote: > [...] > > > > > > +static void x86_cpuid_set_apic_id(Object *obj, Visitor *v, void > > > > > > *opaque, > > > > > > +

Re: [Qemu-devel] The details of round robin of multi-vcpu in TCG mode

2013-04-15 Thread li guang
You can find the chance of exit main loop by every calling of cpu_loop_exit() in cpu_exec(). 在 2013-04-16二的 09:51 +0800,puckbee写道: > Hi there: > > Sorry to post this problem a second time, for I thought maybe the > question is not descripted clearly. > > I'm studying the execution detai

Re: [Qemu-devel] [PATCH v2 3/3] debugcon: fix compiler warning when open DEBUG_DEBUGCON

2013-04-15 Thread li guang
在 2013-04-15一的 21:51 -0500,Jesse Larrew写道: > On 04/14/2013 09:14 PM, liguang wrote: > > compiler warnings: > > CChw/char/debugcon.o > > hw/char/debugcon.c: In function ‘debugcon_ioport_write’: > > hw/char/debugcon.c:58: warning: format ‘%02x’ expects type ‘unsigned int’, > > but argument 3 h

Re: [Qemu-devel] [PATCH v2 2/3] debugcon: make debug message more readable

2013-04-15 Thread li guang
在 2013-04-15一的 21:44 -0500,Jesse Larrew写道: > On 04/14/2013 09:14 PM, liguang wrote: > > #ifdef DEBUG_DEBUGCON > > -printf("debugcon: write addr=0x%04" HWADDR_PRIx " val=0x%02x\n", addr, > > val); > > +printf(" [debugcon: write addr=0x%04" HWADDR_PRIx " val=0x%02]\n", > > addr, val); > >

Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device

2013-04-16 Thread li guang
在 2013-04-16二的 15:45 -0500,Anthony Liguori写道: > Paolo Bonzini writes: > > > Il 10/04/2013 15:41, guang li ha scritto: > >> Yes, you're right. > >> The motivation is I want to implement a device > >> called EC which is a notion from laptop for QEMU, > >> EC has some main functions, like keyboard,

[Qemu-devel] [RFC][PATCH 0/2] Embedded Controller chip emulation

2013-04-17 Thread li guang
Embedded Controller chip could commonly be found at platforms for laptop, it generally does power management, keyboard and mouse simulation, ACPI defined operation, low-speed devices handling ... It talks with OS via io-port 0x60/0x54, 0x62/0x66, the first pair is for i8042 compatible, the last pai

Re: [Qemu-devel] [RFC][PATCH 2/2] hw: add Embedded Controller chip emulation

2013-04-17 Thread li guang
在 2013-04-17三的 19:54 +0200,Andreas Färber写道: > Am 17.04.2013 09:23, schrieb liguang: > > this work implemented Embedded Controller chip emulation > > which was defined at ACPI SEPC v5 chapter 12: > > "ACPI Embedded Controller Interface Specification" > > > > commonly Embedded Controller will emula

Re: [Qemu-devel] [SeaBIOS] [RFC][PATCH 0/2] Embedded Controller chip emulation

2013-04-17 Thread li guang
Oh, No, that's a private interface for Intel's AMT, this is a chip embedded in mainboard. 在 2013-04-17三的 11:04 +0200,Fred .写道: > HECI ? > http://en.wikipedia.org/wiki/Host_Embedded_Controller_Interface > > > > On Wed, Apr 17, 2013 at 9:32 AM, li guang > wrote

Re: [Qemu-devel] [SeaBIOS] [RFC][PATCH 2/2] hw: add Embedded Controller chip emulation

2013-04-17 Thread li guang
No, sorry. As this is RFC patch, I sent it only for demo my thought. 在 2013-04-17三的 12:41 +0200,Mark Marshall写道: > Hi. > > > At least one major bug (noted below), have you tested all of this yet? > > > MM > > > On 17 April 2013 09:23, liguang wrote: > this work implemented Embedded

Re: [Qemu-devel] [SeaBIOS] [RFC][PATCH 1/2] acpi: add ASL for Embedded Controller

2013-04-17 Thread li guang
在 2013-04-17三的 07:46 -0600,Marc Jones写道: > What EC is this for? The device and interface is defined by the spec, > but the offsets and methods are custom for every EC. > > you're mostly right, the specific content ACPI space will vary for different boards, this one just for a common case > >

Re: [Qemu-devel] [PATCH 07/16] cpu: introduce get_arch_id() method and override it for target-i386

2013-04-18 Thread li guang
在 2013-04-16二的 00:12 +0200,Igor Mammedov写道: > get_arch_id() adds possibility for generic code to get guest visible > CPU ID without accessing CPUArchState. If target doesn't override it, > it will return cpu_index. > > Override it on target-i386 to return APIC ID. > > Signed-off-by: Igor Mammedov

Re: [Qemu-devel] [PATCH 1/6] target-i386/seg_helper: replace env->eip with EIP

2013-04-19 Thread li guang
在 2013-04-19五的 09:48 +0200,Richard Henderson写道: > On 2013-04-19 04:52, liguang wrote: > > Signed-off-by: liguang > > --- > > target-i386/seg_helper.c | 46 > > +++--- > > 1 files changed, 23 insertions(+), 23 deletions(-) > > > > diff --git a/target-i3

Re: [Qemu-devel] [PATCH 00/12] target-i386: remove some macros

2013-04-21 Thread li guang
sorry, please see new 12 patches, for previous sent patches have little manual-changed errors. 在 2013-04-22一的 11:37 +0800,liguang写道: > remove macros EAX, EBX, ECX, EDX, EBP, ESP, ESI, EDI, EIP, DF > as suggested by Richard Henderson > > Li Guang (12) >target-i386/hel

Re: [Qemu-devel] [PATCH v3 1/3] debugcon: fix always print "addr=0x0, val=0x0" bug

2013-04-21 Thread li guang
ping ... 在 2013-04-16二的 11:53 +0800,liguang写道: > when use DEBUG_DEBUGCON, screen spits: > debugcon: write addr=0x val=0x00 > Rdebugcon: write addr=0x val=0x00 > udebugcon: write addr=0x val=0x00 > ndebugcon: write addr=0x val=0x00 > ndebugcon: write addr=0x val=0x00 > idebugcon

Re: [Qemu-devel] [PATCH 2/2] target-*/cpu.h: remove cs_base for other targets

2013-04-24 Thread li guang
在 2013-04-24三的 08:05 +0100,Peter Maydell写道: > On 24 April 2013 02:48, liguang wrote: > > Signed-off-by: liguang > > I'm afraid this is definitely wrong. It has a less than > helpful name, but cs_base is actually just "another 32/64 bits > of state that the target can use to distinguish translati

Re: [Qemu-devel] [PATCH 1/2] cpu-exec: rid cs_base of TranslationBlock

2013-04-24 Thread li guang
在 2013-04-24三的 09:11 +0200,Aurelien Jarno写道: > On Wed, Apr 24, 2013 at 08:36:54AM +0200, Paolo Bonzini wrote: > > Il 24/04/2013 03:48, liguang ha scritto: > > > cs_base is only meaningful for target-i386/sparc, > > > so, get rid of cs_base for other target > > > > This is really ugly, we're trying

Re: [Qemu-devel] [PATCH 2/2] target-*/cpu.h: remove cs_base for other targets

2013-04-24 Thread li guang
在 2013-04-24三的 08:28 +0100,Peter Maydell写道: > On 24 April 2013 08:15, li guang wrote: > > 在 2013-04-24三的 08:05 +0100,Peter Maydell写道: > >> On 24 April 2013 02:48, liguang wrote: > >> > Signed-off-by: liguang > >> > >> I'm afraid this is d

Re: [Qemu-devel] [PATCH 2/2] target-*/cpu.h: remove cs_base for other targets

2013-04-24 Thread li guang
在 2013-04-24三的 08:36 +0100,Peter Maydell写道: > On 24 April 2013 08:32, li guang wrote: > > I think even others want to use something like you said, > > it should not 'cs_base', or, it's a bad name. > > Yes, this is why I said "has a less than helpful na

Re: [Qemu-devel] [PATCH 2/2] target-*/cpu.h: remove cs_base for other targets

2013-04-24 Thread li guang
在 2013-04-24三的 16:22 +0200,Andreas Färber写道: > Am 24.04.2013 09:40, schrieb li guang: > > 在 2013-04-24三的 08:36 +0100,Peter Maydell写道: > >> On 24 April 2013 08:32, li guang wrote: > >>> I think even others want to use something like you said, > >>> it

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-25 Thread Li Guang
Peter Maydell wrote: On 25 December 2013 08:35, liguang wrote: sunxi-linux kernel parse config script to do hardware configurations Signed-off-by: liguang --- hw/arm/allwinner-a10.c | 18 ++ hw/arm/cubieboard.c|2 ++ include/hw/arm/allwinner-a1

Re: [Qemu-devel] [PATCH] hw/sd: move sdhci.h to include/hw

2013-12-25 Thread Li Guang
Peter Maydell wrote: On 25 December 2013 07:21, liguang wrote: This is where your patch should have had an explanation for why you're making this change. What is the user outside of hw/sd/ that needs this header that means we should move it into include/ ? I don't mean someone will inclu

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-25 Thread Li Guang
Peter Maydell wrote: On 26 December 2013 00:14, Li Guang wrote: Peter Maydell wrote: On 25 December 2013 08:35, liguang wrote: sunxi-linux kernel parse config script to do hardware configurations Signed-off-by: liguang --- hw/arm/allwinner-a10.c | 18

Re: [Qemu-devel] [PATCH] hw/sd: move sdhci.h to include/hw

2013-12-25 Thread Li Guang
Peter Maydell wrote: On 26 December 2013 00:22, Li Guang wrote: Peter Maydell wrote: On 25 December 2013 07:21, liguang wrote: This is where your patch should have had an explanation for why you're making this change. What is the user outside of hw/sd/ that needs this header

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-25 Thread Li Guang
Peter Maydell wrote: On 26 December 2013 00:39, Li Guang wrote: Peter Maydell wrote: On 26 December 2013 00:14, Li Guang wrote: it's the approach sunxi-linux kernel config hardware, the binary is actually a transformed text script, and context of script is

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-25 Thread Li Guang
Peter Crosthwaite wrote: On Thu, Dec 26, 2013 at 10:47 AM, Peter Maydell wrote: On 26 December 2013 00:39, Li Guang wrote: Peter Maydell wrote: On 26 December 2013 00:14, Li Guang wrote: it's the approach sunxi-linux kernel config hardware, the bina

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-25 Thread Li Guang
Peter Maydell wrote: On 26 December 2013 01:09, Peter Crosthwaite wrote: Can you just provide a generic solution to the "blob some random data into RAM" problem (If one doesn't exist already)? Well, we do already have that (see -machine firmware=whatever), but... Yes, right.

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-26 Thread Li Guang
Peter Maydell wrote: On 26 December 2013 19:40, Hans de Goede wrote: I'm one of the linux-sunxi developers, the only reason we've this fex file abomination, is because we've inherited it from the android-allwinner sources. Thanks for the clarification; I suspected that might be the c

[Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-01 Thread Li Guang
this blob loader will be used to load a specified blob into a specified RAM address. Signed-off-by: Li Guang --- it can be used now for allwinner-a10, like: "-device blob-loader,addr=0x4300,file=/path/script.bin" reference: http://linux-sunxi.org/Sunxi-tools script file add

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-01 Thread Li Guang
Peter Crosthwaite wrote: On Thu, Jan 2, 2014 at 3:35 PM, Li Guang wrote: this blob loader will be used to load a specified blob into a specified RAM address. Suggested-by: Peter Crosthwaite Signed-off-by: Li Guang --- it can be used now for allwinner-a10, like: "-device

Re: [Qemu-devel] [PATCH 2/2] hw/arm/allwinner-a10: initialize EMAC

2014-01-05 Thread Li Guang
Hi, please use prefix AwA10 for names instead of Aw, also PATCH 1/2. Thanks for your effort on this! Beniamino Galvani wrote: Signed-off-by: Beniamino Galvani --- hw/arm/allwinner-a10.c | 20 include/hw/arm/allwinner-a10.h |4 2 files changed, 24 inser

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use "realize" and avoid init. This way you can use an Error* to report the error. Also, the actual load_image_targphys call probably should be done in a reset handler, not at realize time. Ok I t

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use "realize" and avoid init. This way you can use an Error* to report the error. Also, the actual load_image_targphys call probably should be done in a reset handler, not at re

  1   2   3   4   >