[Qemu-devel] [PATCH] fix qemu compile error with --enable-debug

2012-07-03 Thread Wanpeng Li
From: Wanpeng Li CC i386-softmmu/target-i386/translate.o /home/kernel/qemu/target-i386/translate.c: In function ‘gen_sse’: /home/kernel/qemu/target-i386/translate.c:3571:27: error: assignment from incompatible pointer type [-Werror] /home/kernel/qemu/target-i386/translate.c:3573:17: error

Re: [Qemu-devel] [PATCH] fix qemu compile error with --enable-debug

2012-07-03 Thread Wanpeng Li
u! > >2012/7/4 Wanpeng Li : >> From: Wanpeng Li >> >> CC i386-softmmu/target-i386/translate.o >> /home/kernel/qemu/target-i386/translate.c: In function ‘gen_sse’: >> /home/kernel/qemu/target-i386/translate.c:3571:27: error: assignment from >> incompatible

[Qemu-devel] [PATCH] cleanup pc_vga_init function

2012-07-04 Thread Wanpeng Li
From: Wanpeng Li Since function pc_vga_init doesn't need to return DeviceState any more, just cleanup. Signed-off-by: Wanpneg Li --- hw/pc.c | 18 +++--- hw/pc.h |2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index c7e9ab3..f3

[Qemu-devel] [BUG] guest os oops when run in upstream qemu x86_64

2012-07-05 Thread Wanpeng Li
) during guest os boot no --enable-kvm has -m 1024 guest os will block during guest os boot has --enable-kvm no -m guest os will block during guest os boot has --enable-kvm has -m 1024 run normally Regards, Wanpeng Li

Re: [Qemu-devel] [question] Is there a plan to introduce a unified co-scheduling mechanism to CFS ?

2014-10-10 Thread Wanpeng Li
desired when several cooperating threads/task is running in guest. Is there a plane for this work? Please refer to gang scheduler. Regards, Wanpeng Li Thanks, Zhang Haoyu -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kerne

[Qemu-devel] main-system-bus

2012-03-13 Thread Wanpeng Li
Hi all: I am confused with what's the meaning of main-system-bus, it emulates physical bus like FSB(front side bus) or just a virtual bus as the root of device tree. Regards, Wanpeng Li

[Qemu-devel] [PATCH 2/6] convert MemoryRegion to QOM

2012-03-25 Thread Wanpeng Li
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- memory.c | 94 ++ memory.h |8 + 2 files changed, 78 insertions(+), 24 deletions(-) diff --git a/memory.c b/memory.c index 22b0352

[Qemu-devel] [PATCH 4/6] prepare to create HPET, RTC and i8254 through composition

2012-03-25 Thread Wanpeng Li
ional. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/hpet.c | 39 ++- hw/hpet_emul.h | 41 + hw/i8254_internal.h |2 +- hw/mc146818rtc.c| 26 -

[Qemu-devel] [PATCH 3/6] convert pci-host to QOM

2012-03-25 Thread Wanpeng Li
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/pci_host.c | 26 ++ hw/pci_host.h |5 + 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index 44c6c20..44d7e55 100644 --- a

[Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-03-25 Thread Wanpeng Li
children are visible in the device model. This lets you set properties of the parent and its children. realize() (which is still called DeviceState::init today) will be called right before the guest starts up for the first time. Signed-off-by: Anthony Liguori Signed-off-by: Wa

[Qemu-devel] [PATCH 6/6] make some functions static

2012-03-25 Thread Wanpeng Li
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/pc.c | 22 +++--- hw/pc.h | 26 -- 2 files changed, 11 insertions(+), 37 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index d5a557e..5f93643 100644 --- a/hw/pc.c

[Qemu-devel] [PATCH 5/6] merge pc_piix.c to pc.c

2012-03-25 Thread Wanpeng Li
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- Makefile.target |1 - hw/pc.c | 816 +-- hw/pc.h | 20 +- hw/pc_piix.c| 762

[Qemu-devel] [PATCH 1/6] eliminate piix_pci.c and module i440fx and piix3

2012-03-25 Thread Wanpeng Li
PMC is contained within the i440fx which we will now reflect in composition in the next few changesets. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- Makefile.target |2 +- hw/i440fx.c | 431 +++ hw/i440fx.h | 78 +++ hw/p

[Qemu-devel] [PATCH 3/6] convert pci-host to QOM

2012-03-26 Thread Wanpeng Li
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/pci_host.c | 26 ++ hw/pci_host.h |5 + 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index 44c6c20..44d7e55 100644 --- a

Re: [Qemu-devel] [PATCH 3/6] convert pci-host to QOM

2012-03-26 Thread Wanpeng Li
On Mon, Mar 26, 2012 at 10:06:45AM +0800, Wanpeng Li wrote: > >From: Anthony Liguori > > >Signed-off-by: Anthony Liguori >Signed-off-by: Wanpeng Li > >--- > hw/pci_host.c | 26 ++ > hw/pci_host.h |5 + > 2 files changed, 31 inse

Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-03-26 Thread Wanpeng Li
On Mon, Mar 26, 2012 at 02:47:19PM +0200, Andreas Färber wrote: >Am 26.03.2012 04:06, schrieb Wanpeng Li: >> From: Anthony Liguori > >Resending an old cover letter is not a good idea. This looks like a v2, >so please mark it as such in the subjects; it's missing a Change

[Qemu-devel] RFC: options parsing in vl.c should be module

2012-03-29 Thread Wanpeng Li
Hi all: Consider of the options parsing process in main function of vl.c is too long. It should be module into single function to clear Ideas, strengthen the source code management, and increase code readability. Regards, Wanpeng Li -- LTC China, IBM, Shanghai

[Qemu-devel] script

2012-03-30 Thread Wanpeng Li
Hi all: Are there any materials introduce how to use the scripts under scripts/ ? Regards, Wanpeng Li -- LTC China, IBM, Shanghai

Re: [Qemu-devel] script

2012-03-30 Thread Wanpeng Li
On Fri, Mar 30, 2012 at 11:28:53AM +0200, Andreas Färber wrote: >Am 30.03.2012 09:11, schrieb Wanpeng Li: >> Are there any materials introduce how to use the scripts under scripts/ >> ? > >Is this a general question about improving our scripts' documentation, >or are

[Qemu-devel] [PATCH] RFC: options parse in vl.c should be moduled

2012-03-30 Thread Wanpeng Li
order to not influence command-line invocations. Signed-off-by: Wanpeng Li --- vl.c | 159 ++--- 1 files changed, 83 insertions(+), 76 deletions(-) diff --git a/vl.c b/vl.c index 0fccf50..fa4d0a9 100644 --- a/vl.c +++ b/vl.c

Re: [Qemu-devel] [PATCH] RFC: options parse in vl.c should be moduled

2012-03-30 Thread Wanpeng Li
On Fri, Mar 30, 2012 at 01:53:14PM +0100, Daniel P. Berrange wrote: >On Fri, Mar 30, 2012 at 08:36:43PM +0800, Wanpeng Li wrote: >> Consider of the options parse process in main function of vl.c is too >> long.It should be module into single function to clear ideas, strengthen >

[Qemu-devel] [PATCH] remove useless comments in dma

2012-04-06 Thread Wanpeng Li
This comment is useless, just removes it and makes the codes clear. Signed-off-by: Wanpeng Li --- dma.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dma.h b/dma.h index 20e86d2..5bd1fc8 100644 --- a/dma.h +++ b/dma.h @@ -11,7 +11,6 @@ #define DMA_H #include

Re: [Qemu-devel] [PATCH] remove useless comments in dma

2012-04-08 Thread Wanpeng Li
On Sat, Apr 07, 2012 at 02:23:43PM +, Blue Swirl wrote: >On Fri, Apr 6, 2012 at 07:52, Wanpeng Li wrote: >> This comment is useless, just removes it and makes the codes clear. >> >> Signed-off-by: Wanpeng Li > >Thanks, applied. Patches like these could be directe

[Qemu-devel] relationship between vmport vmmouse i8042 port92

2012-04-08 Thread Wanpeng Li
Hi all: I know i8042 is a chip in southbridge which control keyboard and mouse. Keboard is emulated by i8042 in qemu and mouse is emulated by vmmouse. But what are port92 and vmport, what's the relationship among these four stuff ? Regards, Wanpeng Li -- LTC China, IBM, Shanghai

[Qemu-devel] [PATCH] avoid repeating contain header file

2012-04-09 Thread Wanpeng Li
Signed-off-by: Wanpeng Li --- hw/ps2.h | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/hw/ps2.h b/hw/ps2.h index 32a4231..d19c226 100644 --- a/hw/ps2.h +++ b/hw/ps2.h @@ -1,3 +1,30 @@ +/* + * QEMU PS/2 keyboard/mouse emulation

[Qemu-devel] [PATCH] avoid repeating contain header file

2012-04-10 Thread Wanpeng Li
Signed-off-by: Wanpeng Li --- hw/ps2.h | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/hw/ps2.h b/hw/ps2.h index 32a4231..d19c226 100644 --- a/hw/ps2.h +++ b/hw/ps2.h @@ -1,3 +1,30 @@ +/* + * QEMU PS/2 keyboard/mouse emulation

[Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit

2012-03-03 Thread Wanpeng Li
PCI_CLASS_DISPLAY_VGA has already defined in hw/pci_ids.h, so use the macro definition instead of a simple digit. Signed-off-by: Wanpeng Li --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index fe71666..274d86d 100644 --- a/hw/pci.c

[Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit

2012-03-03 Thread Wanpeng Li
PCI_CLASS_DISPLAY_VGA has already defined in hw/pci_ids.h, so use the macro definition instead of a simple digit. Signed-off-by: Wanpeng Li --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index fe71666..274d86d 100644 --- a/hw/pci.c

[Qemu-devel] questions about pci

2012-03-04 Thread WanPeng Li
ioport write/read, I have traced this function, but I haven't found it has any relationship with pci read/write configuration space functions like i440fx_write_config and piix3_write_config.So how does it emulate pci configuration space access when not use passthrough? thanks Wanpeng Li LTC

[Qemu-devel] [PATCH] fix bug of isa_bus irq

2012-03-10 Thread Wanpeng Li
ISA bus only use IRQ 0~15, so don't need to give an array qemu_irq 0~24, just array qemu_irq i8259 is ok. Signed-off-by: Wanpeng Li --- hw/pc_piix.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 63dba4e..52f7cf8 100644 ---

[Qemu-devel] [PATCH] fix bug of isa_bus irq

2012-03-10 Thread Wanpeng Li
ISA bus only use IRQ 0~15, so don't need to give an array qemu_irq 0~23, just array qemu_irq i8259 is ok. Signed-off-by: Wanpeng Li --- hw/pc_piix.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 63dba4e..52f7cf8 100644 ---

Re: [Qemu-devel] [PATCH] fix bug of isa_bus irq

2012-03-11 Thread Wanpeng Li
On Sun, Mar 11, 2012 at 08:46:38AM +0100, Jan Kiszka wrote: >On 2012-03-11 08:04, Wanpeng Li wrote: >> ISA bus only use IRQ 0~15, so don't need to give an array qemu_irq 0~23, just >> array qemu_irq i8259 is ok. >> >> Signed-off-by: Wanpeng Li >> --- &

Re: [Qemu-devel] QEMU NUMA and memory allocation problem

2013-05-19 Thread Wanpeng Li
c NUMA balancing) that either the policy for schednuma or autonuma can be rebased on implemented by Mel has already merged. Regards, Wanpeng Li > >Thanks, >Wanlong Gao > > > >> Hi, >> >> We just met a problem of QEMU memory allocation. >> Here is the de

[Qemu-devel] [PATCH] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also add corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li --- target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15 +++ target-i386/machine.c | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH v2] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also adds corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li --- v1 -> v2: * use a subsection instead of bumping the version number. target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15 +++ target-i386/machine.c |

[Qemu-devel] [PATCH RESCEND v2] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also adds corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li --- v1 -> v2: * use a subsection instead of bumping the version number. target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15 +++ target-i386/machine.c |

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-25 Thread Wanpeng Li
ynIC message slot and triggering the corresponding > synthetic interrupt. Could you post a link for this specification? Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-26 Thread Wanpeng Li
2015-11-26 16:34 GMT+08:00 Andrey Smetanin : > > > On 11/26/2015 08:28 AM, Wanpeng Li wrote: >> >> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin : >>> >>> Per Hyper-V specification (and as required by Hyper-V-aware guests), >>> SynIC provides 4 per-v

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-12-01 Thread Wanpeng Li
2015-11-26 16:34 GMT+08:00 Andrey Smetanin : > > > On 11/26/2015 08:28 AM, Wanpeng Li wrote: >> >> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin : >>> >>> Per Hyper-V specification (and as required by Hyper-V-aware guests), >>> SynIC provides 4 per-v

[Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-11-07 Thread Wanpeng Li
This series aggressively refactors the PC machine initialization to be more modelled and less ad-hoc. The highlights of this series are: 1) Things like -m and -bios-name are now device model properties 2) The i440fx and piix3 are now modelled in a thorough fashion 3) i440fx_init is trivialized

[Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM

2012-11-07 Thread Wanpeng Li
Take advantage of Andreas's pci-host patchset, add instance_init function to fully implement convert pci-host to QOM. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/pci_host.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/pci_host.c

[Qemu-devel] [PATCH 01/10] convert RTC as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert RTC as piix3 proper QOM child. RTC creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/mc146818rtc.c | 29

[Qemu-devel] [PATCH 04/10] convert PCSPK as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert PCSPK as piix3 proper QOM child. PCSPK creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/pcspk.c | 19 +-- hw/pcspk.h | 19

[Qemu-devel] [PATCH 06/10] convert i8042 as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert i8042 as piix3 proper QOM child. I8042 creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/pc.c|9 ++--- hw/pckbd.c | 24 +--- hw

[Qemu-devel] [PATCH 07/10] convert VMPORT as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert VMPORT as piix3 proper QOM child. VMPORT creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/pc.c |1 - hw/pc.h |5 - hw/piix3.c | 11

[Qemu-devel] [PATCH 08/10] convert VMMOUSE as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert VMMOUSE as piix3 proper QOM child. VMMOUSE creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/pc.c | 15 ++- hw/piix3.c | 10 ++ hw

[Qemu-devel] [PATCH 10/10] convert IOAPIC as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert IOAPIC as piix3 proper QOM child. IOAPIC creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/ioapic.c |2 +- hw/ioapic.h |2 -- hw

[Qemu-devel] [PATCH v5 2/3] merge pc_piix.c to pc.c

2012-11-07 Thread Wanpeng Li
just made things worse. Making things proper objects and using composition is the right way to share common devices. By pulling these files back together, we can start to fix some of this mess. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i386/Makefile.objs |1

[Qemu-devel] [PATCH 02/10] convert HPET as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert HPET as piix3 proper QOM child. HPET creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/hpet.c | 35

[Qemu-devel] [PATCH 05/10] convert PORT92 as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert PORT92 as piix3 proper QOM child. PORT92 creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/pc.c| 25 - hw/pc.h|3 +++ hw/piix3

[Qemu-devel] [PATCH 00/10] piix3: create all child devices as proper QOM children

2012-11-07 Thread Wanpeng Li
child device in the PIIX3 ::init function. Anthony Liguori (3): convert RTC as piix3 proper QOM child convert HPET as piix3 proper QOM child convert PIT as piix3 proper QOM child Wanpeng Li (7): convert PCSPK as piix3 proper QOM child convert PORT92 as piix3 proper QOM child convert I8042 as

[Qemu-devel] [PATCH 03/10] convert PIT as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert PIT as piix3 proper QOM child. PIT creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i8254.c |2 +- hw/i8254_internal.h

[Qemu-devel] [PATCH 09/10] convert IDE as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert IDE as piix3 proper QOM child. IDE creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li --- hw/i440fx.c |6 ++ hw/ide.h |6 -- hw/ide

Re: [Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-11-14 Thread Wanpeng Li
On Thu, Nov 08, 2012 at 01:36:09PM +0800, Wanpeng Li wrote: >This series aggressively refactors the PC machine initialization to be more >modelled and less ad-hoc. The highlights of this series are: > >1) Things like -m and -bios-name are now device model properties > >2) The i4

Re: [Qemu-devel] [PATCH 7/12] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers

2015-08-18 Thread Wanpeng Li
R_CRASH in this patchset. :( Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH v5] i386: Introduce ARAT CPU feature

2015-06-23 Thread Wanpeng Li
in power states (which we do not even emulate IIRC). In that case, the OS is under risk of sleeping forever, thus need to look for a different wakeup source. HPET will always be the default broadcast event device I think. Regards, Wanpeng Li Live-migration or VM pausing are external effects on al

[Qemu-devel] [PATCH v4 3/5] convert pci-host to QOM

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/pci_host.c | 26 ++ hw/pci_host.h |5 + 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index 8041778..095bfe3

[Qemu-devel] [PATCH v4 2/5] convert MemoryRegion to QOM

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- memory.c | 94 ++ memory.h |8 + 2 files changed, 78 insertions(+), 24 deletions(-) diff --git a/memory.c b/memory.c index

[Qemu-devel] [PATCH v4 4/5] prepare to create HPET, RTC and i8254 through composition

2012-07-18 Thread Wanpeng Li
IX is rational. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/hpet.c | 39 ++- hw/hpet_emul.h | 41 + hw/i8254.c |2 +- hw/i8254_internal.h |2 +- hw/mc146818rtc.c|

[Qemu-devel] [PATCH v4 1/5] eliminate piix_pci.c and module i440fx and piix3

2012-07-18 Thread Wanpeng Li
t that the PMC is contained within the i440fx which we will now reflect in composition in the next few changesets. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i386/Makefile.objs |2 +- hw/i440fx.c | 434 +++ hw/i440fx.h

[Qemu-devel] [PATCH v4 0/5] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-07-18 Thread Wanpeng Li
e in the device model. This lets you set properties of the parent and its children. realize() (which is still called DeviceState::init today) will be called right before the guest starts up for the first time. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li Change in v4: *rebase

[Qemu-devel] [PATCH v4 5/5] merge pc_piix.c to pc.c

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i386/Makefile.objs |1 - hw/pc.c | 753 +++-- hw/pc.h | 46 +--- hw/pc_piix.c | 661

Re: [Qemu-devel] [PATCH v4 4/5] prepare to create HPET, RTC and i8254 through composition

2012-07-19 Thread Wanpeng Li
On Thu, Jul 19, 2012 at 03:23:32PM -0500, Anthony Liguori wrote: >Wanpeng Li writes: > >> [CCing ML] >> >> From: Anthony Liguori > >Each of these devices should be a separate patch. > >Please don't just send patches from branches of mine. Spend so

[Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-07-23 Thread Wanpeng Li
iceState::init today) will be called right before the guest starts up for the first time. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li Change in v5: * drop patch "convert MemoryRegion to QOM" and "prepare to create HPET, RTC and i8254 through composition" * add And

[Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM

2012-07-23 Thread Wanpeng Li
From: Anthony Liguori makes pci_host a proper QOM type. Changelog: * against Andreas pci_host branch * make host bridge TypeInfos const * use PCI_HOST_BRIDGE() where appropriate Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i440fx.c |6 +++--- hw/pc.c |2

[Qemu-devel] [PATCH v5 2/3] merge pc_piix.c to pc.c

2012-07-23 Thread Wanpeng Li
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i386/Makefile.objs |1 - hw/pc.c | 695 + hw/pc.h | 46 +--- hw/pc_piix.c | 661

[Qemu-devel] [PATCH v5 1/3] eliminate piix_pci.c and module i440fx and piix3

2012-07-23 Thread Wanpeng Li
at the PMC is contained within the i440fx which we will now reflect in composition in the next few changesets. Signed-off-by: Anthony Liguori Signed-off-by: Wanpeng Li --- hw/i386/Makefile.objs |2 +- hw/i440fx.c | 434 +++ hw/i440fx.h

Re: [Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM

2012-07-23 Thread Wanpeng Li
On Mon, Jul 23, 2012 at 02:57:20PM +0200, Andreas Färber wrote: >Am 23.07.2012 14:35, schrieb Wanpeng Li: >> From: Anthony Liguori >> >> makes pci_host a proper QOM type. >> >> Changelog: >> * against Andreas pci_host branch >> * make host bridge Typ

[Qemu-devel] [PATCH] i386: Enable IA32_MISC_ENABLE MWAIT bit when exposing mwait/monitor

2019-05-13 Thread Wanpeng Li
From: Wanpeng Li The CPUID.01H:ECX[bit 3] ought to mirror the value of the MSR IA32_MISC_ENABLE MWAIT bit and as userspace has control of them both, it is userspace's job to configure both bits to match on the initial setup. Cc: Eduardo Habkost Cc: Paolo Bonzini Cc: Radim Krčmář S

Re: [Qemu-devel] [PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-08-31 Thread Wanpeng Li
ncrease downtime when acquire the benefit of reducing total time, maybe it will be more acceptable if there is no downside for downtime. Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-08-31 Thread Wanpeng Li
#x27; >> perception than total time, however, this feature will increase downtime >> when acquire the benefit of reducing total time, maybe it will be more >> acceptable if there is no downside for downtime. >> >> Regards, >> Wanpeng Li > > In theory, there is no fac

[Qemu-devel] [PATCH] pc: apic: fix touch LAPIC when irqchip is split

2016-09-13 Thread Wanpeng Li
From: Wanpeng Li Add -kernel_irqchip=split ./x86-run x86/eventinj.flat qemu-system-x86_64 -enable-kvm -machine kernel_irqchip=split -cpu host -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -kernel x86/eventinj.flat enabling apic

Re: [Qemu-devel] [PATCH] pc: apic: fix touch LAPIC when irqchip is split

2016-09-13 Thread Wanpeng Li
ic: fix touch LAPIC when irqchip is split... >> ERROR: suspect code indent for conditional statements (4, 9) >> #90: FILE: hw/i386/pc.c:164: >> +if (!kvm_irqchip_in_kernel()) { >> + intno = apic_get_interrupt(cpu->apic_state); > ^ > Should be 4 spaces here. > >> >> ERROR: suspect code indent for conditional statements (9, 13) >> #92: FILE: hw/i386/pc.c:166: >> + if (intno >= 0) { >> + return intno; > > Then this and later will be indented back by 1 column. You are right, thanks Fam. Regards, Wanpeng Li

[Qemu-devel] [PATCH v2] pc: apic: fix touch LAPIC when irqchip is split

2016-09-13 Thread Wanpeng Li
From: Wanpeng Li Add -kernel_irqchip=split ./x86-run x86/eventinj.flat qemu-system-x86_64 -enable-kvm -machine kernel_irqchip=split -cpu host -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -kernel x86/eventinj.flat enabling apic

[Qemu-devel] [PATCH] pc: apic: introduce APIC macro

2016-09-14 Thread Wanpeng Li
From: Wanpeng Li Introduce a new APIC macro to replace APIC_COMMON macro in hw/intc/apic.c in order to capture access LAPIC in qemu even if LAPIC is emulated in kvm. Suggested-by: Paolo Bonzini Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Michael S. Tsirkin Cc: Eduardo Habkost Signed-off-by

Re: [Qemu-devel] [PATCH] pc: apic: introduce APIC macro

2016-09-14 Thread Wanpeng Li
by TYPE_APIC. Will do, thanks for your review. Regards, Wanpeng Li

[Qemu-devel] [PATCH v2] pc: apic: introduce APIC macro

2016-09-15 Thread Wanpeng Li
From: Wanpeng Li Introduce a new APIC macro to replace APIC_COMMON macro in hw/intc/apic.c in order to capture access LAPIC in qemu even if LAPIC is emulated in kvm. Suggested-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Michael S. Tsirkin Cc

[Qemu-devel] [PATCH] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-20 Thread Wanpeng Li
From: Wanpeng Li This patch adds async pf flag to KVM_GET/SET_VCPU_EVENTS interface. Signed-off-by: Wanpeng Li --- linux-headers/asm-x86/kvm.h | 2 ++ target/i386/cpu.h | 1 + target/i386/kvm.c | 6 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/linux

[Qemu-devel] [PATCH v2] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-21 Thread Wanpeng Li
From: Wanpeng Li This patch adds async page fault flag to KVM_GET/SET_VCPU_EVENTS interface. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li --- v1 -> v2: * reuse the pad for async_page_fault * cleanup coding style linux-headers/asm-x86/kvm.h | 3 ++- target/i386/cp

Re: [Qemu-devel] [PATCH] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-21 Thread Wanpeng Li
2017-06-22 0:28 GMT+08:00 Radim Krčmář : > 2017-06-20 20:14-0700, Wanpeng Li: >> From: Wanpeng Li >> >> This patch adds async pf flag to KVM_GET/SET_VCPU_EVENTS interface. >> >> Signed-off-by: Wanpeng Li >> --- >> diff --git a/linux-header

Re: [Qemu-devel] [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save

2017-02-07 Thread Wanpeng Li
> If you are correlating the clocks, then yes. > > Older Linux guests get upset (marking the TSC clocksource unstable > because the watchdog checks TSC vs kvmclock), but there is a workaround for it > in newer guests > (kvmclock interface to notify watchdog to not complain). Could

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-11 Thread Wanpeng Li
LOG_DIRTY_PAGES) && >> - !(new->flags & KVM_MEM_LOG_DIRTY_PAGES)) >> - kvm_mmu_zap_collapsible_sptes(kvm, new); This is an unlikely branch(unless guest live migration fails and continue to run on the source machine) instead of hot path, do you ha

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-11 Thread Wanpeng Li
2017-05-11 21:43 GMT+08:00 Wanpeng Li : > 2017-05-11 20:24 GMT+08:00 Paolo Bonzini : >> >> >> On 11/05/2017 14:07, Zhoujian (jay) wrote: >>> -* Scan sptes if dirty logging has been stopped, dropping those >>> -* which can be collapse

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-11 Thread Wanpeng Li
2017-05-11 22:18 GMT+08:00 Zhoujian (jay) : > Hi Wanpeng, > >> 2017-05-11 21:43 GMT+08:00 Wanpeng Li : >> > 2017-05-11 20:24 GMT+08:00 Paolo Bonzini : >> >> >> >> >> >> On 11/05/2017 14:07, Zhoujian (jay) wrote: >> >>> -

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-16 Thread Wanpeng Li
# 9.52% of all iTLB > cache hits (16.67%) > 1,152,784 iTLB-loads > (33.32%) > > 10.000703078 seconds time elapsed > ** Could you comment out the original "lazy collapse small sptes into la

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-17 Thread Wanpeng Li
etup: > > 1) set up 1G hugetlbfs hugepages and use those for the guest's memory > > 2) test both without and with the above patch. > In addition, we can compare /sys/kernel/debug/kvm/largepages w/ and w/o the patch. IIRC, /sys/kernel/debug/kvm/largepages will drop during live migration, it will keep a small value if live migration fails and w/o "lazy collapse small sptes into large sptes" codes, however, it will increase gradually if w/ the "lazy collapse small sptes into large sptes" codes. Regards, Wanpeng Li

[Qemu-devel] [PATCH v3] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-28 Thread Wanpeng Li
From: Wanpeng Li This patch adds async page fault flag to KVM_GET/SET_VCPU_EVENTS interface. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li --- v2 -> v3: * nested_apf for vcpu events v1 -> v2: * reuse the pad for async_page_fault * cleanup coding style linux-heade

Re: [Qemu-devel] [PATCH v3] target-i386/cpu: Add new EPYC CPU model

2017-08-16 Thread Wanpeng Li
been merged in kvm/qemu? Regards, Wanpeng Li > > Removed: xop, fma4, tbm > > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: Tom Lendacky > Signed-off-by: Brijesh Singh > --- > > Changes since v2: > * limit the xlevel to 0x800a &g

Re: [Qemu-devel] [PATCH] target-i386 : fix a race condition result to lost INIT

2017-07-30 Thread Wanpeng Li
clear INIT in pending_events > considering migration, just at level >= KVM_PUT_RESET_STATE, > add KVM_VCPUEVENT_VALID_SMM in events.flags.I think it is better to > modify in qemu. Do it in qemu just avoids to trigger the bug instead of fixing it. Why we touch INIT pen

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2018-12-10 Thread Wanpeng Li
On Fri, 19 May 2017 at 16:10, Jay Zhou wrote: > > Hi Paolo and Wanpeng, > > On 2017/5/17 16:38, Wanpeng Li wrote: > > 2017-05-17 15:43 GMT+08:00 Paolo Bonzini : > >>> Recently, I have tested the performance before migration and after > >>> migrat

Re: [Qemu-devel] [PATCH v3 1/2] kvm: support -dedicated cpu-pm=on|off

2018-07-04 Thread Wanpeng Li
On Wed, 20 Jun 2018 at 10:41, Michael S. Tsirkin wrote: > > On Wed, Jun 20, 2018 at 08:46:10AM +0800, Wanpeng Li wrote: > > On Wed, 20 Jun 2018 at 08:07, Michael S. Tsirkin wrote: > > > > > > On Tue, Jun 19, 2018 at 05:07:46PM -0500, Eric Blake wrote: > &g

[Qemu-devel] [PATCH] target-i386: coalesced PIO support for RTC

2018-07-10 Thread Wanpeng Li
%92.72% 67.15us ( +- 7.93% ) After patch: IO Port Access Samples Samples% Time%Avg time 0x70:POUT1750945.42%42.08% 6.37us ( +- 20.37% ) Thanks to Peng Hao's initial patch. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Eduardo Habkost Signed-off-by: Wanpeng Li ---

[Qemu-devel] [PATCH v2] target-i386: coalesced PIO support for RTC

2018-07-11 Thread Wanpeng Li
: Wanpeng Li --- v1 -> v2: * add the original author accel/kvm/kvm-all.c | 56 +++ hw/timer/mc146818rtc.c| 8 +++ include/exec/memattrs.h | 1 + include/exec/memory.h | 5 + include/sysemu/kvm.h | 8 +++ linux-head

Re: [Qemu-devel] [PATCH] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-07-23 Thread Wanpeng Li
Ping, On Tue, 3 Jul 2018 at 05:43, Eduardo Habkost wrote: > > On Mon, Jul 02, 2018 at 06:22:51PM +0800, Wanpeng Li wrote: > > From: Wanpeng Li > > > > Adds PV_SEND_IPI CPUID feature bit. > > > > Thanks! > > Paolo, Radim: can I assume the bit is already

Re: [Qemu-devel] [PATCH] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-08-07 Thread Wanpeng Li
Hi Eduardo, On Tue, 3 Jul 2018 at 05:43, Eduardo Habkost wrote: > > On Mon, Jul 02, 2018 at 06:22:51PM +0800, Wanpeng Li wrote: > > From: Wanpeng Li > > > > Adds PV_SEND_IPI CPUID feature bit. > > > > Thanks! > > Paolo, Radim: can I assume the bit is a

[Qemu-devel] [PATCH] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-07-02 Thread Wanpeng Li
From: Wanpeng Li Adds PV_SEND_IPI CPUID feature bit. Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Radim Krčmář Cc: Vitaly Kuznetsov Signed-off-by: Wanpeng Li --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

Re: [Qemu-devel] [PATCH v3 1/2] kvm: support -dedicated cpu-pm=on|off

2018-06-19 Thread Wanpeng Li
u-pm=on' reads reasonably well. > > Yes but host resource what? I feel it says nothing at all about what > one can expect to find in this flag. > > > About the only other noun I could think of would be '-feature cpu-pm=on'. > > If we have nothing at all to say about what is grouping these things, > we don't need a new flag. We can make it a machine property. > > It's user's hint that some host resource is dedicated to a VM. The commit 633711e82 (kvm: rename KVM_HINTS_DEDICATED to KVM_HINTS_REALTIME) should be reverted according to several threads discussion I think. Regards, Wanpeng Li

[Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip

2016-09-22 Thread Wanpeng Li
From: Wanpeng Li The qemu will crash when info ioapic through hmp if irqchip is split. Below message is splat: KVM_GET_IRQCHIP failed: Unknown error -6 This patch fix it by dumping the ioapic state from the qemu emulated ioapic if irqchip is split. Cc: Paolo Bonzini Cc: Richard Henderson

[Qemu-devel] [PATCH] target-i386: fix losing XCR0 processor state component bits

2016-09-27 Thread Wanpeng Li
From: Wanpeng Li Commit 96193c22a "target-i386: Move xsave component mask to features array" leverages features array to handle XCR0 processor state component bits, however, it introduces a regression: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0] warnin

Re: [Qemu-devel] [PATCH] target-i386: fix losing XCR0 processor state component bits

2016-09-28 Thread Wanpeng Li
2016-09-28 15:54 GMT+08:00 Paolo Bonzini : [...] > I think the right place to add the test is x86_cpu_get_migratable_flags. I just sent out v2 to handle this, thanks for pointing out. Regards, Wanpeng Li

  1   2   >