Re: [Qemu-devel] The reason behind block linking constraint? (Cont.)

2011-12-15 Thread 陳韋任
On Thu, Dec 15, 2011 at 03:53:10PM +0800, Zhi Yong Wu wrote: > I have one related question. If you build one new kernel image and > initrd from Linus' kernel git tree, and don't modify qemu, can it work > fine? I don't understand what's your point. Unmodified QEMU should boot linux, right? Rega

[Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Zhi Hui Li
I am not sure whether it is need to check the return of g_malloc in qemu ? Thank you very much !

Re: [Qemu-devel] The reason behind block linking constraint? (Cont.)

2011-12-15 Thread Zhi Yong Wu
On Thu, Dec 15, 2011 at 4:01 PM, 陳韋任 wrote: > On Thu, Dec 15, 2011 at 03:53:10PM +0800, Zhi Yong Wu wrote: >> I have one related question. If you build one new kernel image and >> initrd from Linus' kernel git tree, and don't modify qemu, can it work >> fine? > > I don't understand what's your po

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread 陳韋任
> I am not sure whether it is need to check the return of g_malloc in > qemu ? I think not, that's why you use g_malloc as a wrapper. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 H

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Andreas Färber
Am 15.12.2011 09:10, schrieb Zhi Hui Li: > > I am not sure whether it is need to check the return of g_malloc in > qemu ? Compare the glib manual: http://developer.gnome.org/glib/2.30/glib-Memory-Allocation.html#g-malloc http://developer.gnome.org/glib/2.30/glib-Memory-Allocation.html#g-try

[Qemu-devel] [Bug 904617] [NEW] device_add usb-hub causes segfault in qemu-1.0

2011-12-15 Thread Erik Rull
Public bug reported: When calling the command (qemu) device_add usb-hub,bus=usb.0,port=4 qemu replies Error: usb port 4 (bus usb.0) not found (in use?) Then qemu crashes with a segfault: [ 1546.177627] qemu-system-x86[1710]: segfault at 0 ip b75d3f8b sp bfddb0b0 error 6 in qemu-system-x86_64[

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread 陳韋任
Hi, I found this in HACKING: Please note that NULL check for the g_malloc result is redundant and that g_malloc() call with zero size is not allowed. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2

Re: [Qemu-devel] [BUG] [Seabios] PCI 64bit BARs on Win2008 - unable to start the device. (ACPI lacks the _DSM method)

2011-12-15 Thread Gerd Hoffmann
On 12/14/11 05:30, Alexey Korolev wrote: > Hi, >>> >>> It shouldn't be that hard to add the latter though. seabios needs two >>> more pci_region_type (PCI_REGION_TYPE_MEM_64 and >>> PCI_REGION_TYPE_PREFMEM_64) to track and map 64bit bars separately. And >>> a address space window where it can map

Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest

2011-12-15 Thread Wen Congyang
At 12/15/2011 09:30 AM, HATAYAMA Daisuke Write: > From: Wen Congyang > Subject: Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci > device is used by guest > Date: Tue, 13 Dec 2011 17:20:24 +0800 > >> At 12/13/2011 02:01 PM, HATAYAMA Daisuke Write: >>> From: Wen Congyang >>> Subjec

Re: [Qemu-devel] client_migrate_info - do we need a new command?

2011-12-15 Thread Gerd Hoffmann
Hi, > Originally, the command was a normal sync command and my understanding > is that it simply posted notification to the clients. Apparently, users > of the interface need to actually know when the client has Ack'd this > operation because otherwise it's racy since a disconnect may occur > b

Re: [Qemu-devel] [PATCH 1/4] memory: make memory API parsable by gtkdoc-scan

2011-12-15 Thread Avi Kivity
On 12/14/2011 07:55 PM, Stefan Weil wrote: > > > Would 's' instead of '_' work? > > struct sCamelCase; > > typedef struct sCamelCase { > // ... > } CamelCase; > > It does not violate any standard... Would '' instead of 's' work? typedes struct CamelCase { ... } CamelCase; -- error compilin

Re: [Qemu-devel] [PATCH] usb-ohci: return USBBus in usb_ohci_init_pci

2011-12-15 Thread Stefan Hajnoczi
On Wed, Dec 14, 2011 at 06:10:17PM -0600, Anthony Liguori wrote: > Untested, but seemingly obvious and hard to screw up.. Sounds like a challenge so let's take a look... > -void usb_ohci_init_pci(struct PCIBus *bus, int devfn) > +USBBus *usb_ohci_init_pci(struct PCIBus *bus, int devfn) > { > -

Re: [Qemu-devel] [Bug 899140] Re: Problem with Linux Kernel Traffic Control

2011-12-15 Thread Stefan Hajnoczi
On Wed, Dec 14, 2011 at 02:42:12PM -, Vincent Autefage wrote: > Ok so the *Intel e1000* seems the only card which is impacted by the > bug. Let me recap with a summary of your debugging: QEMU 0.14.0, 0.15.0, and 1.0 built from source all have poor network performance below a 20 Mbit/s limit s

Re: [Qemu-devel] [PATCH v3 2/9] block: add BlockJob interface for long-running operations

2011-12-15 Thread Stefan Hajnoczi
On Wed, Dec 14, 2011 at 02:51:47PM +0100, Kevin Wolf wrote: > Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: > > Signed-off-by: Stefan Hajnoczi > > --- > > block_int.h | 83 > > +++ > > 1 files changed, 83 insertions(+), 0 deletions(-) >

Re: [Qemu-devel] [PATCH 4/4] memory: move header into include/ and add to QEMU docs

2011-12-15 Thread Avi Kivity
On 12/14/2011 06:20 PM, Anthony Liguori wrote: > Signed-off-by: Anthony Liguori > --- > QEMU-docs.xml|1 + > include/memory.h | 566 > ++ > memory.h | 566 > -- Enable renam

Re: [Qemu-devel] [PATCH v2 1/4] memory: make memory API parsable by gtkdoc-scan (v2)

2011-12-15 Thread Kevin Wolf
Am 14.12.2011 21:01, schrieb Anthony Liguori: > gtkdoc-scan cannot handle nested structs so remove those from the memory API. > > Signed-off-by: Anthony Liguori Surely the right thing to do then is fixing gtkdoc-scan? Kevin

Re: [Qemu-devel] [PATCH 3/4] memory: update documentation to be in gtk-doc format

2011-12-15 Thread Avi Kivity
On 12/14/2011 06:20 PM, Anthony Liguori wrote: > Signed-off-by: Anthony Liguori > --- > memory.h | 341 > ++ > 1 files changed, 188 insertions(+), 153 deletions(-) > > diff --git a/memory.h b/memory.h > index 3aa8404..4d76df3 100644 >

Re: [Qemu-devel] [PATCH v2 0/4] GTK-DOC build integration (v2)

2011-12-15 Thread Stefan Weil
Am 15.12.2011 06:22, schrieb Andreas Färber: Their website has the following: "GTK-Doc wasn't originally intended to be a general-purpose documentation tool, so it can be a bit awkward to setup and use. For a more polished general-purpose documentation tool you may want to look at Doxygen. Howev

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 04:28:28PM +0800, 陳韋任 wrote: > I found this in HACKING: > > Please note that NULL check for the g_malloc result is redundant and > that g_malloc() call with zero size is not allowed. So we have: 1. You should not request 0 bytes from g_malloc(). 2. g_malloc() does no

Re: [Qemu-devel] [PATCH 2/4] docs: add build infrastructure for gtkdocs

2011-12-15 Thread Avi Kivity
On 12/14/2011 06:20 PM, Anthony Liguori wrote: > By convention, documented headers now go in include/ Dislike. > +include $(SRC_PATH)/Makefile.docs > + > $(common-obj-y): $(GENERATED_HEADERS) > subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o > > @@ -113,6 +115,8 @@ QEMU_CF

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Zhi Hui Li
On 2011年12月15日 17:36, Stefan Hajnoczi wrote: On Thu, Dec 15, 2011 at 04:28:28PM +0800, 陳韋任 wrote: I found this in HACKING: Please note that NULL check for the g_malloc result is redundant and that g_malloc() call with zero size is not allowed. So we have: 1. You should not request 0

Re: [Qemu-devel] multifunction pci virtio-blk devices

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 02:00:11PM +0800, Hui Kai Ran wrote: > but for virtio blk device , how can i open multifunction ability? Please search the mailing list archives, Anthony has posted instructions in previous threads. Stefan

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Stefan Hajnoczi
On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf wrote: > Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: > > diff --git a/hmp.c b/hmp.c > > index 66d9d0f..c16d6a1 100644 > > --- a/hmp.c > > +++ b/hmp.c > > @@ -499,6 +499,46 @@ void hmp_info_pci(Monitor *mon) > > qapi_free_PciInfoList(info);

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread 陳韋任
> Maybe there is insufficient memory, the return is error, > Do we need to check the return ? It'll abort if there is not enough memory. http://mail.gnome.org/archives/gtk-app-devel-list/2003-September/msg00260.html Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of In

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 10:36, schrieb Stefan Hajnoczi: > On Thu, Dec 15, 2011 at 04:28:28PM +0800, 陳韋任 wrote: >> I found this in HACKING: >> >> Please note that NULL check for the g_malloc result is redundant and >> that g_malloc() call with zero size is not allowed. > > So we have: > > 1. You should

Re: [Qemu-devel] [PATCH v2 0/4] GTK-DOC build integration (v2)

2011-12-15 Thread Daniel P. Berrange
On Thu, Dec 15, 2011 at 10:32:20AM +0100, Stefan Weil wrote: > Am 15.12.2011 06:22, schrieb Andreas Färber: > >Their website has the following: > > > >"GTK-Doc wasn't originally intended to be a general-purpose > >documentation tool, so it can be a bit awkward to setup and use. For a > >more polish

[Qemu-devel] [PATCH] usb: fix usb_qdev_init() error handling again

2011-12-15 Thread Stefan Hajnoczi
Commit f462141f18ffdd75847f6459ef83d90b831d12c0 introduced clean up code when usb_qdev_init() fails. Unfortunately it calls .handle_destroy() when .init() was never invoked or failed. This can lead to crashes when .handle_destroy() tries to clean up things that were never initialized. This patch

Re: [Qemu-devel] [PATCH 2/4] docs: add build infrastructure for gtkdocs

2011-12-15 Thread Stefan Weil
Am 15.12.2011 10:37, schrieb Avi Kivity: On 12/14/2011 06:20 PM, Anthony Liguori wrote: By convention, documented headers now go in include/ Dislike. +include $(SRC_PATH)/Makefile.docs + $(common-obj-y): $(GENERATED_HEADERS) subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o

Re: [Qemu-devel] [Bug 904617] [NEW] device_add usb-hub causes segfault in qemu-1.0

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 08:18:31AM -, Erik Rull wrote: > Public bug reported: > > When calling the command > > (qemu) device_add usb-hub,bus=usb.0,port=4 > > qemu replies > > Error: usb port 4 (bus usb.0) not found (in use?) > > Then qemu crashes with a segfault: > > [ 1546.177627] qemu-s

[Qemu-devel] [PATCH] block/qcow.c : return real error code in qcow_open

2011-12-15 Thread Li Zhi Hui
Signed-off-by: Li Zhi Hui --- block/qcow.c | 56 +--- 1 files changed, 37 insertions(+), 19 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index b16955d..e0d0b88 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -95,11 +95,13 @@ static i

Re: [Qemu-devel] [PATCH v2 0/4] GTK-DOC build integration (v2)

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 10:32, schrieb Stefan Weil: > Am 15.12.2011 06:22, schrieb Andreas Färber: >> Their website has the following: >> >> "GTK-Doc wasn't originally intended to be a general-purpose >> documentation tool, so it can be a bit awkward to setup and use. For a >> more polished general-purpose d

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 11:02:39AM +0100, Kevin Wolf wrote: > Am 15.12.2011 10:36, schrieb Stefan Hajnoczi: > > On Thu, Dec 15, 2011 at 04:28:28PM +0800, 陳韋任 wrote: > >> I found this in HACKING: > >> > >> Please note that NULL check for the g_malloc result is redundant and > >> that g_malloc()

Re: [Qemu-devel] [PATCH 00/25] nbd asynchronous operation

2011-12-15 Thread Paolo Bonzini
On 12/06/2011 04:27 PM, Paolo Bonzini wrote: Here is my NBD asynchronous operation series, including asynchronous server. Patches 1-5 add asynchronous operation to the client. Patches 6-9 add new features for flush/FUA and discard (trim). Patches 10-25 add asynchronous operation to the server.

Re: [Qemu-devel] [PATCH v2 0/4] GTK-DOC build integration (v2)

2011-12-15 Thread Stefan Weil
Am 15.12.2011 11:04, schrieb Daniel P. Berrange: On Thu, Dec 15, 2011 at 10:32:20AM +0100, Stefan Weil wrote: Am 15.12.2011 06:22, schrieb Andreas Färber: Their website has the following: "GTK-Doc wasn't originally intended to be a general-purpose documentation tool, so it can be a bit awkward

[Qemu-devel] [Bug 883133] Re: qemu on ARM hosts asserts due to code buffer/libc heap conflict

2011-12-15 Thread Dr. David Alan Gilbert
Fix pushed into QEMU upstream today. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/883133 Title: qemu on ARM hosts asserts due to code buffer/libc heap conflict Status in QEMU: New Status in Lin

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 09:27, schrieb Stefan Hajnoczi: > On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf wrote: >> Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: >>> diff --git a/hmp.c b/hmp.c >>> index 66d9d0f..c16d6a1 100644 >>> --- a/hmp.c >>> +++ b/hmp.c >>> @@ -499,6 +499,46 @@ void hmp_info_pci(Mo

Re: [Qemu-devel] [PATCH v4 00/15] uq/master: Introduce basic irqchip support

2011-12-15 Thread Jan Kiszka
On 2011-12-12 17:51, Jan Kiszka wrote: > On 2011-12-12 17:37, Marcelo Tosatti wrote: >> On Thu, Dec 08, 2011 at 12:52:19PM +0100, Jan Kiszka wrote: >>> Changes in v4: >>> - rebased of current uq/master >>> - fixed stupid bugs that broke bisectability and user space irqchip mode >>> - integrated NMI

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Max Filippov
>> >>  I found this in HACKING: >> >> >> >>   Please note that NULL check for the g_malloc result is redundant and >> >>   that g_malloc() call with zero size is not allowed. >> > >> > So we have: >> > >> > 1. You should not request 0 bytes from g_malloc(). >> >> I think this was related to qemu_ma

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 11:19, schrieb Stefan Hajnoczi: > On Thu, Dec 15, 2011 at 11:02:39AM +0100, Kevin Wolf wrote: >> Am 15.12.2011 10:36, schrieb Stefan Hajnoczi: >>> On Thu, Dec 15, 2011 at 04:28:28PM +0800, 陳韋任 wrote: I found this in HACKING: Please note that NULL check for the g_mall

[Qemu-devel] [PATCH] enable architectural PMU cpuid leaf for kvm

2011-12-15 Thread Gleb Natapov
Signed-off-by: Gleb Natapov diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 0b3af90..91a104b 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -1180,10 +1180,19 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, break; case 0xA:

Re: [Qemu-devel] some questions about g_malloc in qemu

2011-12-15 Thread Peter Maydell
On 15 December 2011 10:19, Stefan Hajnoczi wrote: > On Thu, Dec 15, 2011 at 11:02:39AM +0100, Kevin Wolf wrote: >> I think this was related to qemu_malloc() and Anthony's sed run made it >> refer to g_malloc(), even though it works just fine with 0 bytes. We >> should probably remove this sentence

Re: [Qemu-devel] [PATCH 00/25] nbd asynchronous operation

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 11:21, schrieb Paolo Bonzini: > On 12/06/2011 04:27 PM, Paolo Bonzini wrote: >> Here is my NBD asynchronous operation series, including asynchronous >> server. >> >> Patches 1-5 add asynchronous operation to the client. >> >> Patches 6-9 add new features for flush/FUA and discard (tri

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Luiz Capitulino
On Thu, 15 Dec 2011 11:34:07 +0100 Kevin Wolf wrote: > Am 15.12.2011 09:27, schrieb Stefan Hajnoczi: > > On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf wrote: > >> Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: > >>> diff --git a/hmp.c b/hmp.c > >>> index 66d9d0f..c16d6a1 100644 > >>> --- a/

Re: [Qemu-devel] [PATCH v2 0/4] GTK-DOC build integration (v2)

2011-12-15 Thread Andreas Färber
Am 15.12.2011 11:29, schrieb Stefan Weil: > Am 15.12.2011 11:04, schrieb Daniel P. Berrange: >> On Thu, Dec 15, 2011 at 10:32:20AM +0100, Stefan Weil wrote: >>> Am 15.12.2011 06:22, schrieb Andreas Färber: Their website has the following: "GTK-Doc wasn't originally intended to be a g

Re: [Qemu-devel] [PATCH v2 0/4] GTK-DOC build integration (v2)

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 12:36, schrieb Andreas Färber: > Am 15.12.2011 11:29, schrieb Stefan Weil: >> Am 15.12.2011 11:04, schrieb Daniel P. Berrange: >>> On Thu, Dec 15, 2011 at 10:32:20AM +0100, Stefan Weil wrote: Am 15.12.2011 06:22, schrieb Andreas Färber: > Their website has the following:

Re: [Qemu-devel] [PATCH v4 00/15] uq/master: Introduce basic irqchip support

2011-12-15 Thread Avi Kivity
On 12/15/2011 12:33 PM, Jan Kiszka wrote: > >> > >> Any thoughts on the qemu-kvm merge plan? Sounds painful. > > > > Pain will be where the existing qemu-kvm extensions collide with these > > refactored upstream devices (backend/frontend split specifically). > > That's where we have to merge very

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 11:30 AM, Luiz Capitulino wrote: > On Thu, 15 Dec 2011 11:34:07 +0100 > Kevin Wolf wrote: > >> Am 15.12.2011 09:27, schrieb Stefan Hajnoczi: >> > On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf wrote: >> >> Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: >> >>> diff --g

Re: [Qemu-devel] [PATCH v4 00/15] uq/master: Introduce basic irqchip support

2011-12-15 Thread Jan Kiszka
On 2011-12-15 12:54, Avi Kivity wrote: > On 12/15/2011 12:33 PM, Jan Kiszka wrote: Any thoughts on the qemu-kvm merge plan? Sounds painful. >>> >>> Pain will be where the existing qemu-kvm extensions collide with these >>> refactored upstream devices (backend/frontend split specifically).

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Luiz Capitulino
On Thu, 15 Dec 2011 12:00:16 + Stefan Hajnoczi wrote: > On Thu, Dec 15, 2011 at 11:30 AM, Luiz Capitulino > wrote: > > On Thu, 15 Dec 2011 11:34:07 +0100 > > Kevin Wolf wrote: > > > >> Am 15.12.2011 09:27, schrieb Stefan Hajnoczi: > >> > On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 13:00, schrieb Stefan Hajnoczi: > On Thu, Dec 15, 2011 at 11:30 AM, Luiz Capitulino > wrote: >> On Thu, 15 Dec 2011 11:34:07 +0100 >> Kevin Wolf wrote: >> >>> Am 15.12.2011 09:27, schrieb Stefan Hajnoczi: On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf wrote: > Am 13.1

[Qemu-devel] [RFC] virtio-console fails on unconnected pty

2011-12-15 Thread Christian Borntraeger
Amit, when I tried qemu with -virtio-console pty the guest hangs and attaching on /dev/pts/ does not return anything if the attachement is too late. Turns out that the console is already throttled and the guest is heavily spinning but get_buf never returns the buffer. There seems to be no way fo

[Qemu-devel] [PATCH v5 04/16] apic: Inject external NMI events via LINT1

2011-12-15 Thread Jan Kiszka
On real hardware, NMI button events are injected via the LINT1 line of the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that should not receive them. Change the APIC emulation code to reflect this. Based on qemu

Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 01:37:51PM +0100, Kevin Wolf wrote: > Am 15.12.2011 13:00, schrieb Stefan Hajnoczi: > > On Thu, Dec 15, 2011 at 11:30 AM, Luiz Capitulino > > wrote: > >> On Thu, 15 Dec 2011 11:34:07 +0100 > >> Kevin Wolf wrote: > >> > >>> Am 15.12.2011 09:27, schrieb Stefan Hajnoczi: > >>

[Qemu-devel] [PATCH v5 06/16] apic: Introduce backend/frontend infrastructure for KVM reuse

2011-12-15 Thread Jan Kiszka
The KVM in-kernel APIC model will reuse parts of the user space model while providing the same frontend view to guest and most management interfaces. Introduce an APIC backend concept to encapsulate those parts that will tell user space and KVM model apart. The backend offers callback hooks for ini

[Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Stefan Hajnoczi
What is the status of QEMU's transition from HMP to the QMP interface? My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed

[Qemu-devel] [PATCH v5 05/16] apic: Introduce apic_report_irq_delivered

2011-12-15 Thread Jan Kiszka
The in-kernel i8259 and IOAPIC backends for KVM will need this, so encapsulate the shared bits. Signed-off-by: Jan Kiszka --- hw/apic.c| 11 --- hw/apic.h|1 + trace-events |2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/apic.c b/hw/apic.c inde

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Jan Kiszka
On 2011-12-15 14:02, Stefan Hajnoczi wrote: > What is the status of QEMU's transition from HMP to the QMP interface? > > My current understanding is that QEMU provides new HMP commands for > humans, but HMP is being phased out as an API. Management tools > should rely only on QMP for new commands

[Qemu-devel] [PATCH v5 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-15 Thread Jan Kiszka
More KVM-specific devices will come, so let's start with moving the kvmclock into a dedicated folder. Signed-off-by: Jan Kiszka --- Makefile.target|4 ++-- configure |1 + hw/{kvmclock.c => kvm/clock.c} |4 ++-- hw/{kvmclock.h => kvm/clock.h} |

[Qemu-devel] [PATCH v5 15/16] kvm: x86: Add user space part for in-kernel IOAPIC

2011-12-15 Thread Jan Kiszka
This introduces the KVM-accelerated IOAPIC backend and extends the IRQ routing setup by the 0->2 redirection when needed. The IOAPIC gains a KVM-specific property that allows to define the GSI base for injecting interrupts into the kernel model. This will allow to disentangle PIC and IOAPIC pins f

Re: [Qemu-devel] [PATCH v2 1/4] memory: make memory API parsable by gtkdoc-scan (v2)

2011-12-15 Thread Anthony Liguori
On 12/15/2011 03:28 AM, Kevin Wolf wrote: Am 14.12.2011 21:01, schrieb Anthony Liguori: gtkdoc-scan cannot handle nested structs so remove those from the memory API. Signed-off-by: Anthony Liguori Surely the right thing to do then is fixing gtkdoc-scan? It's not quite that simple. gtkdoc u

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 14:18, schrieb Jan Kiszka: > On 2011-12-15 14:02, Stefan Hajnoczi wrote: >> What is the status of QEMU's transition from HMP to the QMP interface? >> >> My current understanding is that QEMU provides new HMP commands for >> humans, but HMP is being phased out as an API. Management to

Re: [Qemu-devel] [PATCH 2/4] docs: add build infrastructure for gtkdocs

2011-12-15 Thread Anthony Liguori
On 12/15/2011 03:37 AM, Avi Kivity wrote: On 12/14/2011 06:20 PM, Anthony Liguori wrote: By convention, documented headers now go in include/ Dislike. I've been planning on doing this for a while. I think it's a useful way to help improve internal modularity. It provides a consistent way

[Qemu-devel] [PATCH v5 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-15 Thread Jan Kiszka
Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into these models, and maintain IRQ routes. Routing is optional and depends on the host arch supporting KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as we can't route GSI0 to IOAPIC pin 2.

[Qemu-devel] [PATCH v5 08/16] i8259: Introduce backend/frontend infrastructure for KVM reuse

2011-12-15 Thread Jan Kiszka
Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. Again, we create a PIC backend infrastructure and provide hooks for init, reset, and vmload/save. This also introduces a common helper to instantiate a single i8259 chip from the cascade- creating i8259_init fu

Re: [Qemu-devel] [libvirt] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Stefan Berger
On 12/15/2011 08:02 AM, Stefan Hajnoczi wrote: What is the status of QEMU's transition from HMP to the QMP interface? My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. Th

Re: [Qemu-devel] [PATCH 3/4] memory: update documentation to be in gtk-doc format

2011-12-15 Thread Anthony Liguori
On 12/15/2011 03:26 AM, Avi Kivity wrote: On 12/14/2011 06:20 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori --- memory.h | 341 ++ 1 files changed, 188 insertions(+), 153 deletions(-) diff --git a/memory.h b/memory.h in

[Qemu-devel] [PATCH] HACKING: clarify allocation/free recommendations

2011-12-15 Thread Peter Maydell
Clarify the allocation/free recommendations; this is mostly just tidying up following the global-search-and-replace done with the conversion to the GLib g_malloc and friends. Signed-off-by: Peter Maydell --- HACKING | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 4/4] memory: move header into include/ and add to QEMU docs

2011-12-15 Thread Anthony Liguori
On 12/15/2011 03:24 AM, Avi Kivity wrote: On 12/14/2011 06:20 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori --- QEMU-docs.xml|1 + include/memory.h | 566 ++ memory.h | 566 -

Re: [Qemu-devel] [PATCH 1/4] memory: make memory API parsable by gtkdoc-scan

2011-12-15 Thread Anthony Liguori
On 12/15/2011 03:20 AM, Avi Kivity wrote: On 12/14/2011 07:55 PM, Stefan Weil wrote: Would 's' instead of '_' work? struct sCamelCase; typedef struct sCamelCase { // ... } CamelCase; It does not violate any standard... Would '' instead of 's' work? typedes struct CamelCase { ... }

[Qemu-devel] [PULL 0/2] Plan obsolescense of exec.c memory functions

2011-12-15 Thread Avi Kivity
Exile some exec.c functions to a private header, to prevent accidental reuse. Please pull from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/exec-obsolete Avi Kivity (2): etraxfs_eth: drop bogus cpu_unregister_io_memory() memory: move obsolete exec.c functions to a private head

[Qemu-devel] [PATCH 2/2] memory: move obsolete exec.c functions to a private header

2011-12-15 Thread Avi Kivity
This will help avoid accidental usage. Signed-off-by: Avi Kivity --- cpu-common.h| 36 -- exec-obsolete.h | 66 +++ exec.c |3 ++ memory.c|3 ++ 4 files changed, 72 insertions(+), 36

[Qemu-devel] [PATCH 1/2] etraxfs_eth: drop bogus cpu_unregister_io_memory()

2011-12-15 Thread Avi Kivity
Leftover call to cpu_unregister_io_memory() can segfault on cleanup. Remove. Signed-off-by: Avi Kivity --- hw/etraxfs_eth.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c index 5ac2d15..b525258 100644 --- a/hw/etraxfs_eth.c +++ b/h

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Jan Kiszka
On 2011-12-15 14:33, Kevin Wolf wrote: > Am 15.12.2011 14:18, schrieb Jan Kiszka: >> On 2011-12-15 14:02, Stefan Hajnoczi wrote: >>> What is the status of QEMU's transition from HMP to the QMP interface? >>> >>> My current understanding is that QEMU provides new HMP commands for >>> humans, but HMP

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Lucas Meneghel Rodrigues
On 12/15/2011 11:33 AM, Kevin Wolf wrote: Am 15.12.2011 14:18, schrieb Jan Kiszka: On 2011-12-15 14:02, Stefan Hajnoczi wrote: What is the status of QEMU's transition from HMP to the QMP interface? My current understanding is that QEMU provides new HMP commands for humans, but HMP is being pha

[Qemu-devel] [PATCH v5 07/16] apic: Open-code timer save/restore

2011-12-15 Thread Jan Kiszka
To enable migration between accelerated and non-accelerated APIC models, we will need to handle the timer saving and restoring specially and can no longer rely on the automatics of VMSTATE_TIMER. Specifically, accelerated model will not start any QEMUTimer. This patch therefore factors out the gen

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Jan Kiszka
On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote: > On 12/15/2011 11:33 AM, Kevin Wolf wrote: >> Am 15.12.2011 14:18, schrieb Jan Kiszka: >>> On 2011-12-15 14:02, Stefan Hajnoczi wrote: What is the status of QEMU's transition from HMP to the QMP interface? My current understanding

[Qemu-devel] [PATCH v5 16/16] kvm: Arm in-kernel irqchip support

2011-12-15 Thread Jan Kiszka
Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka --- qemu-config.c |4 qemu-options.hx |5 - 2 files changed, 8 insertions(+), 1 deletions(-)

Re: [Qemu-devel] [PATCH 2/4] docs: add build infrastructure for gtkdocs

2011-12-15 Thread Avi Kivity
On 12/15/2011 03:30 PM, Anthony Liguori wrote: > On 12/15/2011 03:37 AM, Avi Kivity wrote: >> On 12/14/2011 06:20 PM, Anthony Liguori wrote: >>> By convention, documented headers now go in include/ >> >> Dislike. > > I've been planning on doing this for a while. I think it's a useful > way to help

Re: [Qemu-devel] [PATCH 3/4] memory: update documentation to be in gtk-doc format

2011-12-15 Thread Avi Kivity
On 12/15/2011 03:33 PM, Anthony Liguori wrote: >> Can we have a space after the colon, or is that disallowed by the >> format? > > > Ugh, I hate reading perl code.. Ah, it's called "reading"? Let's really avoid a fork. -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] [PATCH 4/4] memory: move header into include/ and add to QEMU docs

2011-12-15 Thread Avi Kivity
On 12/15/2011 03:34 PM, Anthony Liguori wrote: > On 12/15/2011 03:24 AM, Avi Kivity wrote: >> On 12/14/2011 06:20 PM, Anthony Liguori wrote: >>> Signed-off-by: Anthony Liguori >>> --- >>> QEMU-docs.xml|1 + >>> include/memory.h | 566 >>> +

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 1:39 PM, Jan Kiszka wrote: > On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote: >> On 12/15/2011 11:33 AM, Kevin Wolf wrote: >>> Am 15.12.2011 14:18, schrieb Jan Kiszka: On 2011-12-15 14:02, Stefan Hajnoczi wrote: > What is the status of QEMU's transition from HM

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Kevin Wolf
Am 15.12.2011 14:39, schrieb Jan Kiszka: > On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote: >> On 12/15/2011 11:33 AM, Kevin Wolf wrote: >>> Am 15.12.2011 14:18, schrieb Jan Kiszka: On 2011-12-15 14:02, Stefan Hajnoczi wrote: > What is the status of QEMU's transition from HMP to the QM

[Qemu-devel] [PATCH v5 10/16] memory: Introduce memory_region_init_reservation

2011-12-15 Thread Jan Kiszka
Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug, but could theoretically be triggered by guest code (DMA to reser

[Qemu-devel] [PATCH v5 12/16] kvm: x86: Establish IRQ0 override control

2011-12-15 Thread Jan Kiszka
KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka --- hw/pc.c|3 ++- kvm-all.c |5 + kvm-stub.c |5 + k

[Qemu-devel] [PATCH v5 00/16] uq/master: Introduce basic irqchip support

2011-12-15 Thread Jan Kiszka
Changes in v5: - properly introduce apic_report_irq_delivered (instead of apic_set_irq_delivered silently) - rework apic to kvm core interface according to Blue's suggestion CC: Lai Jiangshan Jan Kiszka (16): msi: Generalize msix_supported to msi_supported kvm: Move kvmclock into hw/kvm fo

[Qemu-devel] [PATCH v5 13/16] kvm: x86: Add user space part for in-kernel APIC

2011-12-15 Thread Jan Kiszka
This introduces the alternative APIC backend which makes use of KVM's in-kernel device model. External NMI injection via LINT1 is emulated by checking the current state of the in-kernel APIC, only injecting a NMI into the VCPU if LINT1 is unmasked and configured to DM_NMI. MSI is not yet supported

[Qemu-devel] [PATCH v5 03/16] apic: Stop timer on reset

2011-12-15 Thread Jan Kiszka
All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 1:49 PM, Kevin Wolf wrote: > Am 15.12.2011 14:39, schrieb Jan Kiszka: >> On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote: >>> On 12/15/2011 11:33 AM, Kevin Wolf wrote: Am 15.12.2011 14:18, schrieb Jan Kiszka: > On 2011-12-15 14:02, Stefan Hajnoczi wrote: >>

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Luiz Capitulino
On Thu, 15 Dec 2011 13:02:40 + Stefan Hajnoczi wrote: > What is the status of QEMU's transition from HMP to the QMP interface? Depends on what you consider the transition to be. For management tools the transition can be considered done already because we do not support HMP as a stable inte

Re: [Qemu-devel] [PATCH] HACKING: clarify allocation/free recommendations

2011-12-15 Thread Stefan Hajnoczi
On Thu, Dec 15, 2011 at 1:33 PM, Peter Maydell wrote: > Clarify the allocation/free recommendations; this is mostly > just tidying up following the global-search-and-replace done > with the conversion to the GLib g_malloc and friends. > > Signed-off-by: Peter Maydell > --- >  HACKING |   10 +

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Jan Kiszka
On 2011-12-15 14:53, Stefan Hajnoczi wrote: > On Thu, Dec 15, 2011 at 1:49 PM, Kevin Wolf wrote: >> Am 15.12.2011 14:39, schrieb Jan Kiszka: >>> On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote: On 12/15/2011 11:33 AM, Kevin Wolf wrote: > Am 15.12.2011 14:18, schrieb Jan Kiszka: >>

[Qemu-devel] [PATCH v5 09/16] ioapic: Introduce backend/frontend infrastructure for KVM reuse

2011-12-15 Thread Jan Kiszka
Split up the IOAPIC analogously to APIC and i8259. KVM will share the device description, reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/ioapic.c | 130 --- hw/io

[Qemu-devel] [PATCH v5 01/16] msi: Generalize msix_supported to msi_supported

2011-12-15 Thread Jan Kiszka
Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9 - hw/msix.h |2

[Qemu-devel] [PATCH v5 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-15 Thread Jan Kiszka
Introduce the alternative i8259 backend that exploits KVM in-kernel acceleration. The PIIX3 initialization code is furthermore extended by KVM specific IRQ route setup. GSI injection differs in KVM mode from the user space model. As we can dispatch ISA-range IRQs to both IOAPIC and PIC inside the

[Qemu-devel] [PATCH 01/14] block: bdrv_aio_* do not return NULL

2011-12-15 Thread Kevin Wolf
From: Paolo Bonzini Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = ( bdrv_aio_readv | bdrv_aio_writev | bdrv_aio_flush | bdrv_aio_discard | bdrv_aio_ioctl ) (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which howe

[Qemu-devel] [PATCH 11/14] qcow2: Allow >4 GB VM state

2011-12-15 Thread Kevin Wolf
This is a compatible extension to the snapshot header format that allows saving a 64 bit VM state size. Signed-off-by: Kevin Wolf --- block.h|2 +- block/qcow2-snapshot.c | 34 -- block/qcow2.h |2 +- docs/specs/qcow2.txt |

[Qemu-devel] [PATCH 10/14] Documentation: Add qemu-img -t parameter in man page

2011-12-15 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- qemu-img-cmds.hx |6 +++--- qemu-img.texi| 10 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 4be00a5..49dce7c 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-c

[Qemu-devel] [PATCH 12/14] coroutine: switch per-thread free pool to a global pool

2011-12-15 Thread Kevin Wolf
From: Avi Kivity ucontext-based coroutines use a free pool to reduce allocations and deallocations of coroutine objects. The pool is per-thread, presumably to improve locality. However, as coroutines are usually allocated in a vcpu thread and freed in the I/O thread, the pool accounting gets sc

[Qemu-devel] [PATCH 14/14] qiov: prevent double free or use-after-free

2011-12-15 Thread Kevin Wolf
From: Paolo Bonzini qemu_iovec_destroy does not clear the QEMUIOVector fully, and the data could thus be used after free or freed again. While I do not know any example in the tree, I observed this using virtio-scsi (and SCSI scatter/gather) when canceling DMA requests. Signed-off-by: Paolo Bon

Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU

2011-12-15 Thread Anthony Liguori
On 12/15/2011 07:57 AM, Luiz Capitulino wrote: On Thu, 15 Dec 2011 13:02:40 + Stefan Hajnoczi wrote: What is the status of QEMU's transition from HMP to the QMP interface? Depends on what you consider the transition to be. For management tools the transition can be considered done alrea

  1   2   3   >