Re: [Qemu-devel] [PATCH 5/8] tcg: Remove stray semi-colons from target-*/helper.h

2013-09-15 Thread Stefan Weil
Am 15.09.2013 02:03, schrieb Richard Henderson: > During GEN_HELPER=1, these are actually stray top-level semi-colons > which are technically invalid ISO C, but GCC accepts as an extension. > If we added enough __extension__ markers that we could dare use > -Wpedantic, we'd see > > warning: ISO C

Re: [Qemu-devel] ACPI enabled => qemu process exits when guest shuts down

2013-09-15 Thread Paolo Bonzini
Il 14/09/2013 11:24, Erik Rull ha scritto: > Hi all, > > I tried a guest OS that is ACPI capable with enabled ACPI in qemu (+kvm) > and qemu quits when the guest OS was shut down (and the "guest PC" > should be powered off). Well, from the guest point of view, this > behavior seems to be okay, but

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Tue, Sep 10, 2013 at 02:12:56PM +0100, Peter Maydell wrote: > On 10 September 2013 14:02, Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2013 at 01:50:47PM +0100, Peter Maydell wrote: > >> On 10 September 2013 13:39, Michael S. Tsirkin wrote: > >> > On Mon, Sep 09, 2013 at 02:16:41PM +0100, Pet

Re: [Qemu-devel] [PATCH] pci: remove explicit check to 64K ioport size

2013-09-15 Thread Hervé Poussineau
Michael S. Tsirkin a écrit : On Fri, Sep 13, 2013 at 01:58:44PM +0200, Hervé Poussineau wrote: This check is useless, as bigger addresses will be ignored when added to 'io' MemoryRegion, which has a size of 64K. However, some architectures don't use the 'io' MemoryRegion, like the alpha and ver

[Qemu-devel] [PATCH v2 0/6] pci: keep window properties up to date

2013-09-15 Thread Michael S. Tsirkin
w32/w64 properties that we report in QOM are currently static, but this is wrong: guest firmware can select its own windows: optimal placement for w64 is guest-dependent, further, for Q35, w32 is affected by the MCFG base and size. This detects the actual window configuration used by guest and rep

[Qemu-devel] [PATCH v2 2/6] range: add Range to typedefs

2013-09-15 Thread Michael S. Tsirkin
will help simplify header dependencies. Signed-off-by: Michael S. Tsirkin --- include/qemu/range.h| 2 +- include/qemu/typedefs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/range.h b/include/qemu/range.h index b76cc0d..4a0780d 100644 --- a/include/qemu/

[Qemu-devel] [PATCH v2 1/6] q35: make pci window address/size match guest cfg

2013-09-15 Thread Michael S. Tsirkin
For Q35, MMCFG address and size are guest configurable. Update w32 property to make it behave accordingly. Signed-off-by: Michael S. Tsirkin --- hw/pci-host/q35.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 5473504..72f6b72 100644 -

[Qemu-devel] [PATCH v2 5/6] q35: use 64 bit window programmed by guest

2013-09-15 Thread Michael S. Tsirkin
Detect the 64 bit window programmed by firmware and configure properties accordingly. Signed-off-by: Michael S. Tsirkin --- hw/pci-host/q35.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 72f6b72..23dbeea 100644 --

[Qemu-devel] [PATCH v2 4/6] pci: add helper to retrieve the 64-bit range

2013-09-15 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 1 + hw/pci/pci.c | 50 ++ 2 files changed, 51 insertions(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 37979aa..4b90e5d 100644 --- a/include/hw/pci/pci.h +++

[Qemu-devel] [PATCH v2 3/6] range: add min/max operations on ranges

2013-09-15 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- include/qemu/range.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/qemu/range.h b/include/qemu/range.h index 4a0780d..1c688ca 100644 --- a/include/qemu/range.h +++ b/include/qemu/range.h @@ -17,6 +17,23 @@ struct Range {

[Qemu-devel] [PATCH v2 6/6] piix: use 64 bit window programmed by guest

2013-09-15 Thread Michael S. Tsirkin
Detect the 64 bit window programmed by firmware and configure properties accordingly. Signed-off-by: Michael S. Tsirkin --- hw/pci-host/piix.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 221d82b..c041149 100644

Re: [Qemu-devel] [PATCH v2 3/6] range: add min/max operations on ranges

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 11:46:44AM +0300, Michael S. Tsirkin wrote: > Signed-off-by: Michael S. Tsirkin Actually I applied the following on top - not going to repost as that just adds a comment. diff --git a/include/qemu/range.h b/include/qemu/range.h index 1c688ca..aae9720 100644 --- a/include/

[Qemu-devel] [Bug 1181796] Re: Qemu locks up when incoming serial fills up

2013-09-15 Thread alex
It seems the same problem with windbg #1225187 The patch above does not solve the problem. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1181796 Title: Qemu locks up when incoming serial fills up

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Marcel Apfelbaum
On Tue, 2013-09-10 at 14:12 +0100, Peter Maydell wrote: > On 10 September 2013 14:02, Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2013 at 01:50:47PM +0100, Peter Maydell wrote: > >> On 10 September 2013 13:39, Michael S. Tsirkin wrote: > >> > On Mon, Sep 09, 2013 at 02:16:41PM +0100, Peter Mayd

Re: [Qemu-devel] [Bug] qemu-alpha broken on 32 bit hosts

2013-09-15 Thread Peter Maydell
On 14 September 2013 18:35, Stefan Weil wrote: > All (?) syscalls fail to handle addresses larger than 32 bit correctly. > See "Bad address" in the strace ouput below. Isn't "64 bit guest on 32 bit host" in the set of "things we don't expect to work" ? Maybe I'm misremembering... -- PMM

Re: [Qemu-devel] subregion collisions

2013-09-15 Thread Peter Maydell
On 14 September 2013 22:31, Michael S. Tsirkin wrote: > Enabling the print in memory.c shows quite a lot > of these: > warning: subregion collision fec0/1000 (ioapic) vs 800/f800 > (pci-hole) > warning: subregion collision fed0/400 (hpet) vs 800/f800 > (pci-hole) > warning:

Re: [Qemu-devel] [PATCH 5/8] tcg: Remove stray semi-colons from target-*/helper.h

2013-09-15 Thread Peter Maydell
On 15 September 2013 08:03, Stefan Weil wrote: > Instead of removing the semicolons from the DEF_HELPER_x lines, > I'd prefer removing them from the DEF_HELPER_FLAGS_x definitions. > > Code formatters and static code analyzers (maybe humans, too) prefer > lines which look like valid C syntax, ther

Re: [Qemu-devel] [PATCH 21/47] hw/char/Kconfig: Add Kconfig file

2013-09-15 Thread Alberto Garcia
On Fri, Sep 13, 2013 at 04:49:48PM +0200, Paolo Bonzini wrote: > I'm not sure of the benefit of an hw/ipack directory if (a) there is > only one class providing the bus and (b) all the classes using the > bus (well, there is just one of them) are in the same directory. > > If any of the two condi

Re: [Qemu-devel] [PATCH v2 0/2] KVM: s390: add floating irq controller

2013-09-15 Thread Gleb Natapov
On Fri, Sep 06, 2013 at 03:30:38PM +0200, Christian Borntraeger wrote: > On 06/09/13 14:19, Jens Freimann wrote:> This series adds a kvm_device that > acts as a irq controller for floating > > interrupts. As a first step it implements functionality to retrieve and > > inject > > interrupts for t

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 08:14, Michael S. Tsirkin wrote: > On Tue, Sep 10, 2013 at 02:12:56PM +0100, Peter Maydell wrote: >> On 10 September 2013 14:02, Michael S. Tsirkin wrote: >> > On Tue, Sep 10, 2013 at 01:50:47PM +0100, Peter Maydell wrote: >> >> On 10 September 2013 13:39, Michael S. Tsirkin

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 11:56:40AM +0100, Peter Maydell wrote: > On 15 September 2013 08:14, Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2013 at 02:12:56PM +0100, Peter Maydell wrote: > >> On 10 September 2013 14:02, Michael S. Tsirkin wrote: > >> > On Tue, Sep 10, 2013 at 01:50:47PM +0100, Pet

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 12:05, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 11:56:40AM +0100, Peter Maydell wrote: >> The alias will win for the addresses it handles. But if >> the alias is a container with "holes" then it doesn't handle >> the "holes" and the lower priority background region

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 12:23:41PM +0100, Peter Maydell wrote: > On 15 September 2013 12:05, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 11:56:40AM +0100, Peter Maydell wrote: > >> The alias will win for the addresses it handles. But if > >> the alias is a container with "holes" then it

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 13:17, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 12:23:41PM +0100, Peter Maydell wrote: >>. If it's a "pure container" then it >> doesn't respond for areas that none of its subregions >> cover (it can't, it has no idea what it should do). > > Interesting. This really

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 02:24:07PM +0100, Peter Maydell wrote: > On 15 September 2013 13:17, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 12:23:41PM +0100, Peter Maydell wrote: > >>. If it's a "pure container" then it > >> doesn't respond for areas that none of its subregions > >> cover (

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 14:39, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 02:24:07PM +0100, Peter Maydell wrote: >> Yes, that's true, but even then it's usually just "overlaps >> of subregions within a single container" and there isn't >> a need to worry about within-container versus outside

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 02:49:32PM +0100, Peter Maydell wrote: > On 15 September 2013 14:39, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 02:24:07PM +0100, Peter Maydell wrote: > >> Yes, that's true, but even then it's usually just "overlaps > >> of subregions within a single container" a

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 15:08, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 02:49:32PM +0100, Peter Maydell wrote: >> Yes, but if we were applying a sensible set of priorities >> then you don't need to care at all about the contents >> of the pci hole container, because the pci hole will >> be

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 03:08:38PM +0100, Peter Maydell wrote: > On 15 September 2013 15:08, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 02:49:32PM +0100, Peter Maydell wrote: > >> Yes, but if we were applying a sensible set of priorities > >> then you don't need to care at all about the

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 15:20, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 03:08:38PM +0100, Peter Maydell wrote: >> Well, that's your choice, but I'd be really surprised if the >> PCI controller allowed PCI BARs to get mapped over the >> top of builtin devices like that. > > Well it has no w

[Qemu-devel] [PATCH] docs/memory.txt: Clarify and expand priority/overlap documentation

2013-09-15 Thread Peter Maydell
The documentation of how overlapping memory regions behave and how the priority system works was rather brief, and confusion about priorities seems to be quite common for developers trying to understand how the memory region system works, so expand and clarify it. This includes a worked example wit

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 03:49:00PM +0100, Peter Maydell wrote: > On 15 September 2013 15:20, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 03:08:38PM +0100, Peter Maydell wrote: > >> Well, that's your choice, but I'd be really surprised if the > >> PCI controller allowed PCI BARs to get ma

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 16:05, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 03:49:00PM +0100, Peter Maydell wrote: >> On 15 September 2013 15:20, Michael S. Tsirkin wrote: >> > Actually you previosly wrote: >> > > the versatilePB's PCI controller only responds to accesses >> >

Re: [Qemu-devel] [PATCH] docs/memory.txt: Clarify and expand priority/overlap documentation

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 03:51:53PM +0100, Peter Maydell wrote: > The documentation of how overlapping memory regions behave and how > the priority system works was rather brief, and confusion about > priorities seems to be quite common for developers trying to understand > how the memory region sys

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 04:08:26PM +0100, Peter Maydell wrote: > On 15 September 2013 16:05, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 03:49:00PM +0100, Peter Maydell wrote: > >> On 15 September 2013 15:20, Michael S. Tsirkin wrote: > >> > Actually you previosly wrote: > >> >

[Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Marcel Apfelbaum
A MemoryRegion with negative priority was created and it spans over all the pci address space. It "intercepts" the accesses to unassigned pci address space and will follow the pci spec: 1. returns -1 on read 2. does nothing on write Note: setting the RECEIVED MASTER ABORT bit in the STATUS regis

[Qemu-devel] [PATCH v4 0/3] pci: implement upstream master abort protocol

2013-09-15 Thread Marcel Apfelbaum
PCI spec requires that a transaction that has not been claimed by any PCI bus devices will be terminated by the initiator with "master abort". For read transactions -1() is returned and writes are silently dropped. Implementation: - Allowed the MemoryRegion priority to be negative so a s

[Qemu-devel] [PATCH v4 2/3] docs/memory: Explicitly state that MemoryRegion priority is signed

2013-09-15 Thread Marcel Apfelbaum
Priority was used to make visible some subregions by obscuring the parent MemoryRegion addresses overlapping with the subregion. By allowing the priority to be negative the opposite can be done: Allow a subregion to be visible on all the addresses not covered by other subregions. Signed-off-by: M

[Qemu-devel] [PATCH v4 1/3] memory: allow MemoryRegion's priority field to accept negative values

2013-09-15 Thread Marcel Apfelbaum
Priority is used to make visible some subregions by obscuring the parent MemoryRegion addresses overlapping with the subregion. By allowing the priority to be negative the opposite can be done: Allow a subregion to be visible on all the addresses not covered by the parent MemoryRegion or other sub

Re: [Qemu-devel] [RFC 0/4] ARM aarch64 disas output libvixl support

2013-09-15 Thread Rob Landley
On 09/11/2013 07:54:32 AM, Claudio Fontana wrote: This is the aarch64 libvixl support patchset in the current state. It provides (limited) support for disassembly output on aarch64. Only host disassembly is enabled, since target for aarch64 is not in yet. An external objdump solution as exem

Re: [Qemu-devel] [PATCH] docs/memory.txt: Clarify and expand priority/overlap documentation

2013-09-15 Thread Peter Maydell
On 15 September 2013 16:24, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 03:51:53PM +0100, Peter Maydell wrote: >> The documentation of how overlapping memory regions behave and how >> the priority system works was rather brief, and confusion about >> priorities seems to be quite common for

Re: [Qemu-devel] [PATCH] docs/memory.txt: Clarify and expand priority/overlap documentation

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 05:55:54PM +0100, Peter Maydell wrote: > On 15 September 2013 16:24, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 03:51:53PM +0100, Peter Maydell wrote: > >> The documentation of how overlapping memory regions behave and how > >> the priority system works was rathe

Re: [Qemu-devel] [PATCH RFC v2 2/2] hw/pci: handle unassigned pci addresses

2013-09-15 Thread Peter Maydell
On 15 September 2013 16:31, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 04:08:26PM +0100, Peter Maydell wrote: >> The aborts I refer to above are if you misprogram the >> device to try to do a bus master access to some part of >> PCI memory space other than where the host controller's >> B

Re: [Qemu-devel] [PATCH v4 1/3] memory: allow MemoryRegion's priority field to accept negative values

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 07:16:39PM +0300, Marcel Apfelbaum wrote: > Priority is used to make visible some subregions by obscuring > the parent MemoryRegion addresses overlapping with the subregion. > > By allowing the priority to be negative the opposite can be done: > Allow a subregion to be visi

[Qemu-devel] [PATCH] qom: helper macro for adding read-only properties

2013-09-15 Thread Michael S. Tsirkin
Add a helper macro for adding read-only properties, that works in the common case where the value is a constant. Signed-off-by: Michael S. Tsirkin --- I'm using this patch in my acpi work - any objections to applying it on my tree? include/qom/object.h | 21 + 1 file change

Re: [Qemu-devel] [PATCH v4 1/3] memory: allow MemoryRegion's priority field to accept negative values

2013-09-15 Thread Peter Maydell
On 15 September 2013 17:16, Marcel Apfelbaum wrote: > Priority is used to make visible some subregions by obscuring > the parent MemoryRegion addresses overlapping with the subregion. > > By allowing the priority to be negative the opposite can be done: > Allow a subregion to be visible on all the

Re: [Qemu-devel] [RFC 0/4] ARM aarch64 disas output libvixl support

2013-09-15 Thread Peter Maydell
On 15 September 2013 17:41, Rob Landley wrote: > Wait, incorporating C++ code into qemu was considered the _good_ solution? > > What was the bad solution? Not supporting disassembly at all, and/or having a runtime dependency on finding an objdump that works for the target. -- PMM

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > A MemoryRegion with negative priority was created and > it spans over all the pci address space. > It "intercepts" the accesses to unassigned pci > address space and will follow the pci spec: > 1. returns -1 on read > 2. does not

Re: [Qemu-devel] [PATCH] docs/memory.txt: Clarify and expand priority/overlap documentation

2013-09-15 Thread Peter Maydell
On 15 September 2013 18:07, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 05:55:54PM +0100, Peter Maydell wrote: >> On 15 September 2013 16:24, Michael S. Tsirkin wrote: >> > On Sun, Sep 15, 2013 at 03:51:53PM +0100, Peter Maydell wrote: >> >> The memory core uses the following rules to se

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Peter Maydell
On 15 September 2013 18:30, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: >> +static const MemoryRegionOps master_abort_mem_ops = { >> +.read = master_abort_mem_read, >> +.write = master_abort_mem_write, >> +.endianness = DEVICE_NATIVE_EN

Re: [Qemu-devel] [PATCH v4 2/3] docs/memory: Explicitly state that MemoryRegion priority is signed

2013-09-15 Thread Peter Maydell
On 15 September 2013 17:16, Marcel Apfelbaum wrote: > Priority was used to make visible some subregions by obscuring > the parent MemoryRegion addresses overlapping with the subregion. > > By allowing the priority to be negative the opposite can be done: > Allow a subregion to be visible on all th

Re: [Qemu-devel] [PATCH] docs/memory.txt: Clarify and expand priority/overlap documentation

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 06:29:51PM +0100, Peter Maydell wrote: > On 15 September 2013 18:07, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 05:55:54PM +0100, Peter Maydell wrote: > >> On 15 September 2013 16:24, Michael S. Tsirkin wrote: > >> > On Sun, Sep 15, 2013 at 03:51:53PM +0100, Pet

Re: [Qemu-devel] [PATCH v4 1/3] memory: allow MemoryRegion's priority field to accept negative values

2013-09-15 Thread Peter Maydell
On 15 September 2013 18:25, Peter Maydell wrote: > On 15 September 2013 17:16, Marcel Apfelbaum wrote: >> Priority is used to make visible some subregions by obscuring >> the parent MemoryRegion addresses overlapping with the subregion. > If you have to do a v5 for some reason it would be nice t

Re: [Qemu-devel] [PATCH] qom: helper macro for adding read-only properties

2013-09-15 Thread Peter Maydell
On 15 September 2013 18:23, Michael S. Tsirkin wrote: > +/* Add a property that is an integer constant. */ > +#define OBJECT_ADD_PROP_CONST(obj, name, value) \ > +do {\ > +void OBJECT_ADD_PROP_GET(

Re: [Qemu-devel] Block Filters

2013-09-15 Thread Benoît Canet
Le Friday 06 Sep 2013 à 11:55:38 (+0200), Kevin Wolf a écrit : > Am 06.09.2013 um 11:18 hat Fam Zheng geschrieben: > > On Fri, 09/06 10:45, Kevin Wolf wrote: > > > Am 06.09.2013 um 09:56 hat Fam Zheng geschrieben: > > > > Since BlockDriver.bdrv_snapshot_create() is an optional operation, > > > > b

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-15 Thread Benoît Canet
> > Kevin what do you think of this ? > > I could strip down the dedupe journal code to specialize it. > > If you think it turns out easier than using the journalling > infrastructure that we're going to implement anyway, then why not. This question need to be though. The good thing about the cur

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Marcel Apfelbaum
On Sun, 2013-09-15 at 20:30 +0300, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > > A MemoryRegion with negative priority was created and > > it spans over all the pci address space. > > It "intercepts" the accesses to unassigned pci > > address spac

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Marcel Apfelbaum
On Sun, 2013-09-15 at 18:32 +0100, Peter Maydell wrote: > On 15 September 2013 18:30, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > >> +static const MemoryRegionOps master_abort_mem_ops = { > >> +.read = master_abort_mem_read, > >> +.writ

Re: [Qemu-devel] [RFC 0/4] ARM aarch64 disas output libvixl support

2013-09-15 Thread Laurent Desnogues
On Sun, Sep 15, 2013 at 7:27 PM, Peter Maydell wrote: > On 15 September 2013 17:41, Rob Landley wrote: >> Wait, incorporating C++ code into qemu was considered the _good_ solution? >> >> What was the bad solution? > > Not supporting disassembly at all, and/or having a runtime > dependency on find

Re: [Qemu-devel] [PATCH] qom: helper macro for adding read-only properties

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 06:54:35PM +0100, Peter Maydell wrote: > On 15 September 2013 18:23, Michael S. Tsirkin wrote: > > +/* Add a property that is an integer constant. */ > > +#define OBJECT_ADD_PROP_CONST(obj, name, value) \ > > +do {

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 06:32:13PM +0100, Peter Maydell wrote: > On 15 September 2013 18:30, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > >> +static const MemoryRegionOps master_abort_mem_ops = { > >> +.read = master_abort_mem_read, > >> +

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Peter Maydell
On 15 September 2013 21:25, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 06:32:13PM +0100, Peter Maydell wrote: >> On 15 September 2013 18:30, Michael S. Tsirkin wrote: >> > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: >> >> +static const MemoryRegionOps master_abort_m

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: > On 15 September 2013 21:25, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 06:32:13PM +0100, Peter Maydell wrote: > >> On 15 September 2013 18:30, Michael S. Tsirkin wrote: > >> > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Mar

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Peter Maydell
On 15 September 2013 22:07, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: >> "native" means "if the device's MMIO callback does 'return 0x12345678;' >> for a 32 bit read then the guest CPU should see 0x12345678". That's >> almost always what you want fo

Re: [Qemu-devel] [PATCH v9 5/8] module: implement module loading

2013-09-15 Thread Fam Zheng
On Fri, 09/13 15:07, Daniel P. Berrange wrote: > On Fri, Sep 13, 2013 at 05:59:13PM +0800, Fam Zheng wrote: > > +void module_load(module_load_type type) > > +{ > > +#ifdef CONFIG_MODULES > > +const char *path; > > +char *fname = NULL; > > +const char **mp; > > +const char *module_wh

Re: [Qemu-devel] [PATCH v9 0/8] Shared Library Module Support

2013-09-15 Thread Fam Zheng
On Fri, 09/13 12:31, Peter Maydell wrote: > On 13 September 2013 10:59, Fam Zheng wrote: > > This series implements feature of shared object building as described in: > > > > http://wiki.qemu.org/Features/Modules > > This doesn't seem to apply to master: > > cam-vm-266:precise:qemu$ patches appl

Re: [Qemu-devel] [PATCH v9 5/8] module: implement module loading

2013-09-15 Thread Fam Zheng
On Fri, 09/13 07:52, Richard Henderson wrote: > On 09/13/2013 02:59 AM, Fam Zheng wrote: > > +const char *module_whitelist[] = { > > +CONFIG_MODULE_WHITELIST > > +}; > > static const char * const module_whitelist[] = ... > OK, thanks. > > +switch (type) { > > +case MO

[Qemu-devel] [RFC qom-cpu v3 02/10] apic: remove redundant variable 'apic_no' from apic_init_common()

2013-09-15 Thread Chen Fan
In struct APICCommonState, there is an id field yet, which was set earlier, qdev_prop_set_uint8(env->apic_state, "id", env->cpuid_apic_id); so we use the id field instead of the variable 'apic_no' to represent the unique apic index. Signed-off-by: Chen Fan --- hw/intc/apic_common.c | 6 +-

[Qemu-devel] [RFC qom-cpu v3 05/10] qmp: add 'cpu-del' command support

2013-09-15 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/i386/pc.c | 6 ++ hw/i386/pc_piix.c| 1 + include/hw/boards.h | 2 ++ include/hw/i386/pc.h | 1 + qapi-schema.json | 12 qmp-commands.hx | 23 +++ qmp.c| 9 + 7 files changed, 54

[Qemu-devel] [RFC qom-cpu v3 01/10] x86: move apic_state field from CPUX86State to X86CPU

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

[Qemu-devel] [RFC qom-cpu v3 00/10] i386: add cpu hot remove support

2013-09-15 Thread Chen Fan
Via implementing ACPI standard methods _EJ0 in bios, after Guest OS hot remove one vCPU, it is able to send a signal to QEMU, then QEMU could notify the assigned vCPU of exiting. meanwhile, and intruduce the QOM command 'cpu-del' to remove vCPU from QEMU itself. this work is based on Andreas Färb

[Qemu-devel] [RFC qom-cpu v3 09/10] piix4: implement function cpu_status_write() for vcpu ejection

2013-09-15 Thread Chen Fan
When OS eject a vcpu (like: echo 1 > /sys/bus/acpi/devices/LNXCPUXX/eject), it will call acpi EJ0 method, the firmware will write the new cpumap, QEMU will know which vcpu need to be ejected. Signed-off-by: Chen Fan --- hw/acpi/piix4.c | 37 - 1 file changed,

[Qemu-devel] [RFC qom-cpu v3 06/10] qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier'

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

[Qemu-devel] [RFC qom-cpu v3 03/10] apic: remove local_apics array and using CPU_FOREACH instead

2013-09-15 Thread Chen Fan
Using CPU_FOREACH() marco instead of scaning the entire local_apics array for fast searching apic. Signed-off-by: Chen Fan --- hw/intc/apic.c | 73 ++--- include/hw/i386/apic_internal.h | 2 -- 2 files changed, 32 insertions(+), 43 deletions(

[Qemu-devel] [RFC qom-cpu v3 07/10] qom cpu: add UNPLUG cpu notifier support

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

[Qemu-devel] [RFC qom-cpu v3 10/10] cpus: reclaim allocated vCPU objects

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

[Qemu-devel] [RFC qom-cpu v3 04/10] x86: add x86_cpu_unrealizefn() for cpu apic remove

2013-09-15 Thread Chen Fan
Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clear the apic related information at here. Signed-off-by: Chen Fan --- hw/i386/kvm/apic.c| 8 hw/intc/apic.c| 8 target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 3

[Qemu-devel] [RFC qom-cpu v3 08/10] i386: implement pc interface pc_hot_del_cpu()

2013-09-15 Thread Chen Fan
Implement cpu interface pc_hot_del_cpu() for unrealizing device vCPU. emiting vcpu-remove notifier to ACPI, then ACPI could send sci interrupt to OS for hot-remove vcpu. Signed-off-by: Chen Fan --- hw/i386/pc.c | 30 -- qom/cpu.c| 12 2 files changed,

Re: [Qemu-devel] [PATCH v4 00/12] xics: reworks and in-kernel support

2013-09-15 Thread Alexey Kardashevskiy
On 09/10/2013 02:26 PM, Alexey Kardashevskiy wrote: > On 09/04/2013 12:56 PM, Alexey Kardashevskiy wrote: >> On 08/30/2013 03:28 PM, Alexey Kardashevskiy wrote: >>> Yet another try with XICS and XICS-KVM. >>> >>> v3->v4: >>> Addressed multiple comments from Alex; >>> Split out many tiny patches to

Re: [Qemu-devel] [RFC PATCH 0/8] Remove stub mon-protocol-event for block

2013-09-15 Thread Wenchao Xia
于 2013/9/12 17:31, Paolo Bonzini 写道: Il 12/09/2013 11:15, Wenchao Xia ha scritto: This series will remove the usage of symbols of mon-protocol-event in qemu-img, qemu-nbd and qemu-io, in short remove the connetion for block layer. Background: I am tring to decouple block layer code with othe

[Qemu-devel] Qemu Boot failure with /dev/ram0

2013-09-15 Thread Saptarshi Sen
Hi, I want to use a ram disk as a block device for my kernel.( i am measuring file io on ram ) I am trying to boot a kernel from using /dev/ram0. However I am getting "No root Device found" qemu-system-x86_64 -m 8G -hda disk.img -kernel vmlinuz-3.10.0-rc6 -initrd initramfs-3.10.0-rc6.i

Re: [Qemu-devel] [PULL 33/42] block: return BDRV_BLOCK_ZERO past end of backing file

2013-09-15 Thread Peter Lieven
On 13.09.2013 17:20, Kevin Wolf wrote: Am 13.09.2013 um 10:25 hat Paolo Bonzini geschrieben: Il 13/09/2013 09:33, Peter Lieven ha scritto: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini If the sectors are unallocated and we are past the end of the backing file, they will rea

Re: [Qemu-devel] [PATCH 12/12] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-09-15 Thread Peter Lieven
On 13.09.2013 12:25, Peter Lieven wrote: this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use bdi.discard_zeroes to return the zero state of an unallocated block. the callout to bdrv_has_zero_init() is only valid right after bdrv_create. Sig

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 10:41:26PM +0100, Peter Maydell wrote: > On 15 September 2013 22:07, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: > >> "native" means "if the device's MMIO callback does 'return 0x12345678;' > >> for a 32 bit read then the gue

Re: [Qemu-devel] [PATCH] qom: helper macro for adding read-only properties

2013-09-15 Thread Andreas Färber
Am 15.09.2013 19:23, schrieb Michael S. Tsirkin: > Add a helper macro for adding read-only properties, that works in the > common case where the value is a constant. > > Signed-off-by: Michael S. Tsirkin > --- > > I'm using this patch in my acpi work - any objections > to applying it on my tree?

[Qemu-devel] [PATCH v10 0/8] Shared Library Module Support

2013-09-15 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules The main idea behind modules is to isolate dependencies on third party libraries from qemu executables, such as libglusterfs or librbd, so that the end users can install core qemu packa

[Qemu-devel] [PATCH v10 2/8] make.rule: fix $(obj) to a real relative path

2013-09-15 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling bec

[Qemu-devel] [PATCH v10 1/8] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-09-15 Thread Fam Zheng
From: Peter Maydell Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct "$(SRC_PATH)/$(obj)" to get at the

[Qemu-devel] [PATCH v10 7/8] .gitignore: ignore module related files (dll, so, mo)

2013-09-15 Thread Fam Zheng
Signed-off-by: Fam Zheng --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8e1b73f..ac679ea 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fsdev/virtfs-proxy-helper.pod *.cp *.dvi *.exe +*.dll +*.so +*.mo *.fn *.ky *.log -- 1.8.

[Qemu-devel] [PATCH v10 3/8] rule.mak: allow per object cflags and libs

2013-09-15 Thread Fam Zheng
Adds extract-libs in LINK to expand any "per object libs", the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. "foo.o" must be listed a nested var (e.g. common-obj-y) t

[Qemu-devel] [PATCH v10 5/8] module: implement module loading

2013-09-15 Thread Fam Zheng
Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading function: void module_load(module_load_type). which loads whitelisted ".so" files of the given

[Qemu-devel] [PATCH v10 4/8] build-sys: introduce common-obj-m and block-obj-m for DSO

2013-09-15 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, then linked

[Qemu-devel] [PATCH v10 8/8] block: convert block drivers linked with libs to modules

2013-09-15 Thread Fam Zheng
The converted block drivers are: curl iscsi rbd ssh glusterfs no longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. Signed-off-by: Fam Zheng --- block/M

[Qemu-devel] [PATCH v10 6/8] Makefile: install modules with "make install"

2013-09-15 Thread Fam Zheng
Install all the modules to ${MODDIR}. Signed-off-by: Fam Zheng --- Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 20167b8..a254f1c 100644 --- a/Makefile +++ b/Makefile @@ -363,6 +363,12 @@ install-datadir install-localstatedir ifneq ($(TOOLS),)

Re: [Qemu-devel] [RFC 4/4] disas: implement host disassembly output for aarch64

2013-09-15 Thread Andreas Färber
Am 11.09.2013 15:08, schrieb Claudio Fontana: > use C++ libvixl to implement output, for now only enabled for the host output > disasm, since we don't have the aarch64 target yet. > > Signed-off-by: Claudio Fontana > --- > configure | 6 + > disas.c |