Re: [Qemu-devel] latest qemu with gdb remote not working

2013-06-02 Thread Peter Maydell
On 2 June 2013 06:46, Peter Cheung wrote: > I just tried to compile the latest qemu on Fedora 18 64 bits, > it is also fail. When i press "c" in gdb, the qemu won't start > running. Good. This significantly increases the chances that somebody will investigate. > But one thing fedora is diffe

Re: [Qemu-devel] KVM call agenda for 2013-05-28

2013-06-02 Thread Michael S. Tsirkin
On Fri, May 31, 2013 at 01:45:55PM +0200, Laszlo Ersek wrote: > On 05/31/13 09:09, Jordan Justen wrote: > > > Why is updating the ACPI tables in seabios viewed as such a burden? > > Either qemu does it, or seabios... (And, OVMF too, but I don't think > > you guys are concerned with that. :) > > I

Re: [Qemu-devel] KVM call agenda for 2013-05-28

2013-06-02 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 10:34:26PM -0400, Kevin O'Connor wrote: > On Tue, May 28, 2013 at 07:53:09PM -0400, Kevin O'Connor wrote: > > There were discussions on potentially introducing a middle component > > to generate the tables. Coreboot was raised as a possibility, and > > David thought it woul

[Qemu-devel] [PATCH 0/4] Fix ppc64 tcg issues

2013-06-02 Thread Anton Blanchard
Hi, qemu is currently broken on ppc64. After applying the following patches I am able to boot a ppc64 and x86-64 image successfully. Anton

[Qemu-devel] [PATCH 3/4] tcg-ppc64: Fix add2_i64

2013-06-02 Thread Anton Blanchard
add2_i64 was adding the lower double word to the upper double word of each input. Fix this so we add the lower double words, then the upper double words with carry propagation. Cc: qemu-sta...@nongnu.org Signed-off-by: Anton Blanchard --- sub2 has similar issues, I haven't fixed it because I do

[Qemu-devel] [PATCH 4/4] tcg-ppc64: rotr_i32 rotates wrong amount

2013-06-02 Thread Anton Blanchard
rotr_i32 calculates the amount to left shift and puts it into a temporary, but then doesn't use it when doing the shift. Cc: qemu-sta...@nongnu.org Signed-off-by: Anton Blanchard --- Index: b/tcg/ppc64/tcg-target.c === --- a/tcg/pp

[Qemu-devel] [PATCH 2/4] tcg-ppc64: bswap64 rotates output 32 bits

2013-06-02 Thread Anton Blanchard
If our input and output is in the same register, bswap64 tries to undo a rotate of the input. This just ends up rotating the output. Cc: qemu-sta...@nongnu.org Signed-off-by: Anton Blanchard --- diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0fcf2b5..64fb0af 100644 --- a/tcg

[Qemu-devel] [PATCH 1/4] tcg-ppc64: Fix RLDCL opcode

2013-06-02 Thread Anton Blanchard
The rldcl instruction doesn't have an sh field, so the minor opcode of 8 is actually 4 when using the XO30 macro. Cc: qemu-sta...@nongnu.org Signed-off-by: Anton Blanchard --- Index: b/tcg/ppc64/tcg-target.c === --- a/tcg/ppc64/tcg

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-06-02 Thread Paolo Bonzini
Il 01/06/2013 00:18, Richard Henderson ha scritto: > On 05/30/2013 02:16 PM, Paolo Bonzini wrote: >> +static inline Int128 int128_rshift(Int128 a, int n) >> +{ >> +return (Int128) { (a.lo >> n) | (a.hi << (64 - n)), (a.hi >> n) }; >> +} > > Produces wrong results for n == 0, since (a.hi << 64)

Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough

2013-06-02 Thread Alex Williamson
On Sat, 2013-06-01 at 14:13 +0200, Benoît Canet wrote: > Hello, > > I may have soon the PF driver of an SR-IOV card to code and make work with > QEMU/KVM so I have the following questions. > > In an AMD64 setup where QEMU use VFIO to passthrough the VFs of an SR-IOV card > to a guest will the con

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-06-02 Thread Peter Maydell
On 31 May 2013 23:18, Richard Henderson wrote: > On 05/30/2013 02:16 PM, Paolo Bonzini wrote: >> +static inline Int128 int128_rshift(Int128 a, int n) >> +{ >> +return (Int128) { (a.lo >> n) | (a.hi << (64 - n)), (a.hi >> n) }; >> +} > > Produces wrong results for n == 0, since (a.hi << 64) is

Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost

2013-06-02 Thread Gleb Natapov
On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > Bootindex string passed from qemu: > > > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > > > > > We ma

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 16:18, Peter Maydell ha scritto: > On 31 May 2013 23:18, Richard Henderson wrote: >> On 05/30/2013 02:16 PM, Paolo Bonzini wrote: >>> +static inline Int128 int128_rshift(Int128 a, int n) >>> +{ >>> +return (Int128) { (a.lo >> n) | (a.hi << (64 - n)), (a.hi >> n) }; >>> +} >> >> P

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-06-02 Thread Peter Maydell
On 2 June 2013 15:36, Paolo Bonzini wrote: > This should work: > > int64_t h; > if (!n) { > return a; > } > h = a.hi >> n; This is undefined for n >= 64. > if (n >= 64) { > return (Int128) { h, h >> 63 }; > } else { >return (Int128) { (a.lo >> n) |

Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost

2013-06-02 Thread Michael S. Tsirkin
On Sun, Jun 02, 2013 at 05:29:45PM +0300, Gleb Natapov wrote: > On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > > Bootindex string passed from qemu:

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-06-02 Thread Gleb Natapov
On Wed, May 29, 2013 at 11:45:44AM +0300, Michael S. Tsirkin wrote: > On Tue, May 28, 2013 at 07:53:09PM -0400, Kevin O'Connor wrote: > > On Thu, May 23, 2013 at 03:41:32PM +0300, Michael S. Tsirkin wrote: > > > Juan is not available now, and Anthony asked for > > > agenda to be sent early. > > > S

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-06-02 Thread Michael S. Tsirkin
On Sun, Jun 02, 2013 at 06:05:42PM +0300, Gleb Natapov wrote: > On Wed, May 29, 2013 at 11:45:44AM +0300, Michael S. Tsirkin wrote: > > On Tue, May 28, 2013 at 07:53:09PM -0400, Kevin O'Connor wrote: > > > On Thu, May 23, 2013 at 03:41:32PM +0300, Michael S. Tsirkin wrote: > > > > Juan is not avail

Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough

2013-06-02 Thread Benoît Canet
Thanks a lot for the answer. Best regards Benoît > Le Sunday 02 Jun 2013 à 08:11:42 (-0600), Alex Williamson a écrit : > On Sat, 2013-06-01 at 14:13 +0200, Benoît Canet wrote: > > Hello, > > > > I may have soon the PF driver of an SR-IOV card to code and make work with > > QEMU/KVM so I have t

[Qemu-devel] [PATCH] softfloat: Fix shift128Right for shift counts 64..127

2013-06-02 Thread Peter Maydell
shift128Right would give the wrong result for a shift count between 64 and 127. This was never noticed because all of our uses of this function are guaranteed not to use shift counts in this range. Signed-off-by: Peter Maydell --- Found by code inspection. This contribution can be licensed under

Re: [Qemu-devel] Why some test suite in kvm-unit-tests designed for 64bit only?

2013-06-02 Thread Gleb Natapov
On Thu, May 30, 2013 at 06:58:07PM +0800, 李春奇 wrote: > Hi there, > I'm now reading codes of kvm-unit-tests and I found that some of the > test cases for x86 is only designed for x86_64 (including access.flat, > apic.flat, emulator.flat, idt_test.flat and so on). I wonder why these > cases are not

Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost

2013-06-02 Thread Gleb Natapov
On Sun, Jun 02, 2013 at 05:59:04PM +0300, Michael S. Tsirkin wrote: > On Sun, Jun 02, 2013 at 05:29:45PM +0300, Gleb Natapov wrote: > > On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > > > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > > > On Tue, May 28, 2013 at 08

[Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership

2013-06-02 Thread Paolo Bonzini
Now that the DMA APIs are unified, we move closer and closer to breaking memory access from the BQL dependency. This series adds an API to reference/unreference memory regions, which is not really needed only for BQL-less memory access: the big lock can already be dropped between address_space_map

[Qemu-devel] [PATCH 01/15] memory: add getter/setter for owner

2013-06-02 Thread Paolo Bonzini
Whenever memory regions are accessed outside the BQL, they need to be preserved against hot-unplug. MemoryRegions actually do not have their own reference count; they piggyback on a QOM object, their "owner". Add two functions to retrieve and specify the owner. The setter function will affect the

[Qemu-devel] [PATCH 02/15] memory: add ref/unref

2013-06-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 30 ++ memory.c | 14 ++ 2 files changed, 44 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 457a53c..71df1e6 100644 --- a/include/exec/memory.h +++ b/incl

[Qemu-devel] [PATCH 12/15] vfio: add memory_region_set_owner calls

2013-06-02 Thread Paolo Bonzini
Cc: Alex Williamson Signed-off-by: Paolo Bonzini --- hw/misc/vfio.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index a1f5803..3c0dc9f 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -1156,6 +1156,7 @@ static void vfio_vga_probe_ati_3c3_quirk(V

[Qemu-devel] [PATCH 07/15] acpi: add memory_region_set_owner calls

2013-06-02 Thread Paolo Bonzini
ACPI regions are added directly to the I/O address space, without going through BARs. Thus they need the owner to be set directly. Signed-off-by: Paolo Bonzini --- hw/acpi/ich9.c | 1 + hw/acpi/piix4.c | 5 + hw/isa/apm.c| 1 + 3 files changed, 7 insertions(+) diff --git a/hw/acpi/ich

[Qemu-devel] [PATCH 05/15] pci: set owner for BARs

2013-06-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index fa30110..2456075 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -914,6 +914,8 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num, uint64_t wmask;

[Qemu-devel] [PATCH 04/15] exec: add a reference to the region returned by address_space_translate

2013-06-02 Thread Paolo Bonzini
Once address_space_translate will be callable out of the big QEMU lock, the returned MemoryRegion will be unprotected as soon as address_space_translate terminates. Avoid this by adding a reference to the region, and dropping it in the caller of address_space_translate. Signed-off-by: Paolo Bonzin

[Qemu-devel] [PATCH 06/15] sysbus: set owner for MMIO regions

2013-06-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/core/sysbus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 9004d8c..788696b 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -115,6 +115,8 @@ void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memor

[Qemu-devel] [PATCH 03/15] memory: add ref/unref calls

2013-06-02 Thread Paolo Bonzini
Add ref/unref calls at the following places: - places where memory regions are stashed by a listener and used outside the BQL (including in Xen or KVM). - memory_region_find callsites Signed-off-by: Paolo Bonzini --- exec.c| 6 +- hw/core/loader.c

[Qemu-devel] [PATCH 09/15] isa/portio: allow setting an owner

2013-06-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/isa/isa-bus.c | 2 ++ include/exec/ioport.h | 3 +++ ioport.c | 10 ++ 3 files changed, 15 insertions(+) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 7860b17..d263d0f 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@

[Qemu-devel] [PATCH 08/15] misc: add memory_region_set_owner calls

2013-06-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/char/serial-pci.c | 1 + hw/misc/pc-testdev.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index 2138e35..6b6106b 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -106,6 +106,7 @@ static

[Qemu-devel] [PATCH 10/15] vga: add memory_region_set_owner calls

2013-06-02 Thread Paolo Bonzini
Cc: Gerd Hoffman Signed-off-by: Paolo Bonzini --- hw/display/cirrus_vga.c | 19 ++- hw/display/qxl.c| 6 -- hw/display/vga-isa-mm.c | 2 +- hw/display/vga-isa.c| 4 ++-- hw/display/vga-pci.c| 5 +++-- hw/display/vga.c| 19 ++- hw/di

[Qemu-devel] [PATCH 14/15] memory: return MemoryRegion from qemu_ram_addr_from_host

2013-06-02 Thread Paolo Bonzini
It will be needed in the next patch. Signed-off-by: Paolo Bonzini --- exec.c| 35 +-- include/exec/cpu-common.h | 2 +- target-i386/kvm.c | 4 ++-- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/exec.c b/exec.c index

[Qemu-devel] [PATCH 11/15] pci-assign: add memory_region_set_owner calls

2013-06-02 Thread Paolo Bonzini
Cc: Alex Williamson Signed-off-by: Paolo Bonzini --- hw/i386/kvm/pci-assign.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index ff85590..4b1c2d9 100644 --- a/hw/i386/kvm/pci-assign.c +++ b/hw/i386/kvm/pci-assign.c @@ -300,6

[Qemu-devel] [PATCH 13/15] exec: check MRU in qemu_ram_addr_from_host

2013-06-02 Thread Paolo Bonzini
This function is not used outside the iothread mutex, so it can use ram_list.mru_block. Signed-off-by: Paolo Bonzini --- exec.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index bf287cb..9fd4c90 100644 --- a/exec.c +++ b/exec.c @@ -1441,18 +1

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-06-02 Thread Gleb Natapov
On Sun, Jun 02, 2013 at 06:09:50PM +0300, Michael S. Tsirkin wrote: > On Sun, Jun 02, 2013 at 06:05:42PM +0300, Gleb Natapov wrote: > > On Wed, May 29, 2013 at 11:45:44AM +0300, Michael S. Tsirkin wrote: > > > On Tue, May 28, 2013 at 07:53:09PM -0400, Kevin O'Connor wrote: > > > > On Thu, May 23, 2

[Qemu-devel] [PATCH 15/15] memory: ref/unref memory across address_space_map/unmap

2013-06-02 Thread Paolo Bonzini
The iothread mutex might be released between map and unmap, so the mapped region might disappear. Signed-off-by: Paolo Bonzini --- exec.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 39324ba..538aa9e 100644 --- a/exec.c +++ b/exec.c @@ -2

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-06-02 Thread Michael S. Tsirkin
On Sun, Jun 02, 2013 at 06:40:43PM +0300, Gleb Natapov wrote: > On Sun, Jun 02, 2013 at 06:09:50PM +0300, Michael S. Tsirkin wrote: > > On Sun, Jun 02, 2013 at 06:05:42PM +0300, Gleb Natapov wrote: > > > On Wed, May 29, 2013 at 11:45:44AM +0300, Michael S. Tsirkin wrote: > > > > On Tue, May 28, 201

Re: [Qemu-devel] [PATCH 02/15] memory: add ref/unref

2013-06-02 Thread Peter Maydell
On 2 June 2013 16:43, Paolo Bonzini wrote: > +/** > + * memory_region_ref: Add 1 to a memory region's reference count > + * > + * Whenever memory regions are accessed outside the BQL, they need to be > + * preserved against hot-unplug. MemoryRegions actually do not have their > + * own reference

Re: [Qemu-devel] [PATCH 14/15] memory: return MemoryRegion from qemu_ram_addr_from_host

2013-06-02 Thread Peter Maydell
On 2 June 2013 16:43, Paolo Bonzini wrote: > -int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); > +MemoryRegion *qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); > ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); This is weird, because now the _nofail and the standard v

Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership

2013-06-02 Thread Peter Maydell
On 2 June 2013 16:43, Paolo Bonzini wrote: > Reference counting the region piggybacks on reference counting of a QOM > object, the "owner" of the region. The owner API is designed so that > it will be called as little as possible. Unowned subregions will get a > region if memory_region_set_owner

Re: [Qemu-devel] [PATCH] tcx: Fix 24-bit display mode

2013-06-02 Thread Mark Cave-Ayland
On 01/06/13 21:59, Blue Swirl wrote: On Sat, Jun 1, 2013 at 11:41 AM, Mark Cave-Ayland wrote: Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode of the tcx display adapter by accidentally passing in the final address of the dirty region to memory_region_reset_dirty()

[Qemu-devel] [PATCHv2] tcx: Fix 24-bit display mode

2013-06-02 Thread Mark Cave-Ayland
Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode of the tcx display adapter by accidentally passing in the final address of the dirty region to memory_region_reset_dirty() instead of its size. Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 10 ++ 1 fi

Re: [Qemu-devel] [PATCHv2] tcx: Fix 24-bit display mode

2013-06-02 Thread Blue Swirl
Thanks, applied. On Sun, Jun 2, 2013 at 4:23 PM, Mark Cave-Ayland wrote: > Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode of > the tcx display adapter by accidentally passing in the final address of the > dirty region to memory_region_reset_dirty() instead of its size

[Qemu-devel] [PATCH] linux-user: Allow getdents to be provided by getdents64

2013-06-02 Thread Peter Maydell
Newer architectures may only implement the getdents64 syscall, not getdents. Provide an implementation of getdents in terms of getdents64 so that we can run getdents-using targets on a getdents64-only host. Signed-off-by: Peter Maydell --- Guess which exciting new architecture doesn't have getden

Re: [Qemu-devel] Could configure generate QEMU's linker scripts?

2013-06-02 Thread Peter Maydell
On 20 May 2013 18:21, Richard Henderson wrote: > On 05/19/2013 09:30 AM, Ed Maste wrote: >> That is, it just changes the start address. Is this generally the >> only difference between QEMU's linker scripts and system built-ins? > > Yes. So for a new architecture how do we determine whether we n

Re: [Qemu-devel] [PATCH uq/master] fix double free the memslot in kvm_set_phys_mem

2013-06-02 Thread Richard W.M. Jones
On Fri, May 31, 2013 at 04:52:18PM +0800, Xiao Guangrong wrote: > Luiz Capitulino reported that guest refused to boot and qemu > complained with: > kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument > > It is caused by commit 235e8982ad that did double free for the memslot >

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 16:50, Peter Maydell ha scritto: > On 2 June 2013 15:36, Paolo Bonzini wrote: >> This should work: >> >> int64_t h; >> if (!n) { >> return a; >> } >> h = a.hi >> n; > > This is undefined for n >= 64. Yes, it has to be a.hi >> (n & 63). > I would suggest loo

Re: [Qemu-devel] [PATCH uq/master] fix double free the memslot in kvm_set_phys_mem

2013-06-02 Thread Jordan Justen
Reviewed-by: Jordan Justen On Fri, May 31, 2013 at 1:52 AM, Xiao Guangrong wrote: > Luiz Capitulino reported that guest refused to boot and qemu > complained with: > kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument > > It is caused by commit 235e8982ad that did double fre

Re: [Qemu-devel] [PATCH V19 0/8] add-cow file format

2013-06-02 Thread Fam Zheng
On Thu, 05/30 18:00, Dongxu Wang wrote: > It will introduce a new file format: add-cow. > > The add-cow file format makes it possible to perform copy-on-write on top of > a raw disk image. When we know that no backing file clusters remain visible > (e.g. we have streamed the entire image and copi

Re: [Qemu-devel] [PATCH V19 1/8] V18: docs: document for add-cow file format

2013-06-02 Thread Fam Zheng
On Thu, 05/30 18:00, Dongxu Wang wrote: > From: Dong Xu Wang > > Document for add-cow format, the usage and spec of add-cow are > introduced. > > v18-v19: > 1) backing_fmt and image_fmt NUL-terminated. > 2) other fix. > V17->V18: > 1) remove version field. > 2) header size is maximum value and c

Re: [Qemu-devel] [PATCH V19 1/8] V18: docs: document for add-cow file format

2013-06-02 Thread Dongxu Wang
On 2013/6/3 9:48, Fam Zheng wrote: On Thu, 05/30 18:00, Dongxu Wang wrote: From: Dong Xu Wang Document for add-cow format, the usage and spec of add-cow are introduced. v18-v19: 1) backing_fmt and image_fmt NUL-terminated. 2) other fix. V17->V18: 1) remove version field. 2) header size is max

Re: [Qemu-devel] [PATCH V3 0/4] qapi and snapshot code clean up in block layer

2013-06-02 Thread Wenchao Xia
于 2013-5-31 21:19, Luiz Capitulino 写道: On Fri, 31 May 2013 21:04:10 +0800 Wenchao Xia wrote: 于 2013-5-30 10:41, Wenchao Xia 写道: 于 2013-5-27 23:41, Kevin Wolf 写道: Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben: These patches are the common part of my hmp/qmp block query series and Pavel'

Re: [Qemu-devel] updated: kvm networking todo wiki

2013-06-02 Thread Rusty Russell
Anthony Liguori writes: > "Michael S. Tsirkin" writes: > >> On Thu, May 30, 2013 at 08:40:47AM -0500, Anthony Liguori wrote: >>> Stefan Hajnoczi writes: >>> >>> > On Thu, May 30, 2013 at 7:23 AM, Rusty Russell >>> > wrote: >>> >> Anthony Liguori writes: >>> >>> Rusty Russell writes: >>> >>>

[Qemu-devel] [PATCH V14 0/6] enhancement for qmp/hmp interfaces of block info

2013-06-02 Thread Wenchao Xia
This series lets qmp interface show delaied info, including internal snapshot /backing chain on all block device at runtime, which helps management stack and human user, by retrieving exactly the same info of what qemu sees. Example: -> { "execute": "query-block" } <- { "return":[

[Qemu-devel] [PATCH V14 3/6] qmp: add recursive member in ImageInfo

2013-06-02 Thread Wenchao Xia
New member *backing-image is added to reflect the backing chain status. Signed-off-by: Wenchao Xia --- block/qapi.c |7 +++ qapi-schema.json |5 - 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index e9d8b74..a407c3d 100644 --- a/b

[Qemu-devel] [PATCH V14 1/6] block: add snapshot info query function bdrv_query_snapshot_info_list()

2013-06-02 Thread Wenchao Xia
This patch adds function bdrv_query_snapshot_info_list(), which will retrieve snapshot info of an image in qmp object format. The implementation is based on the code moved from qemu-img.c with modification to fit more for qmp based block layer API. Signed-off-by: Wenchao Xia Reviewed-by: Eric Bla

[Qemu-devel] [PATCH V14 2/6] block: add image info query function bdrv_query_image_info()

2013-06-02 Thread Wenchao Xia
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by: Wenchao Xia --- block/qapi.c | 43 +++

[Qemu-devel] [PATCH V14 5/6] hmp: show ImageInfo in 'info block'

2013-06-02 Thread Wenchao Xia
Now human monitor can show image details, include internal snapshot and backing chain info for every block device. Signed-off-by: Wenchao Xia --- hmp.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/hmp.c b/hmp.c index 4fb76ec..2aa832c 100644 --- a/hmp.c +

[Qemu-devel] [PATCH V14 6/6] hmp: add parameters device and -v for info block

2013-06-02 Thread Wenchao Xia
With these parameters, user can choose the information to be showed, to avoid message flood in the monitor. Signed-off-by: Wenchao Xia Reviewed-by: Kevin Wolf --- hmp.c | 25 - monitor.c |7 --- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH V14 4/6] qmp: add ImageInfo in BlockDeviceInfo used by query-block

2013-06-02 Thread Wenchao Xia
Now image info will be retrieved as an embbed json object inside BlockDeviceInfo, backing chain info and all related internal snapshot info can be got in the enhanced recursive structure of ImageInfo. Signed-off-by: Wenchao Xia --- block/qapi.c | 43 +-- inc

[Qemu-devel] [PATCH v1 0/3] Serial cleanup

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite Some cosmetics, refactored to use util/fifo8 for the FIFO8, then factored out some common code. Tested as working on petalogix-ml605 machine model + Linux (has coverage of serial fifo usage). Peter Crosthwaite (3): char/serial: cosmetic fixes. char/serial: Use gener

[Qemu-devel] [PATCH v1 1/3] char/serial: cosmetic fixes.

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite Some cosmetic fixes to char/serial fixing some checkpatch errors. Cc: qemu-triv...@nongnu.org Signed-off-by: Peter Crosthwaite --- Needed for the next patch to pass checkpatch. Done as sep patch to not obscure that patch. hw/char/serial.c | 30 +++-

[Qemu-devel] [PATCH v1 2/3] char/serial: Use generic Fifo8

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite Use the generic Fifo8 helper provided by QEMU, rather than re-implement privately. Signed-off-by: Peter Crosthwaite --- hw/char/serial.c | 98 +--- include/hw/char/serial.h | 15 +++- 2 files changed, 39 insertion

[Qemu-devel] [PATCH v1 3/3] char/serial: serial_ioport_write: Factor out common code

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite These three lines are common to both FIFO and regular mode. Just factor them out to outside the if rather than replicate the same lines inside both if and else. Cc: qemu-triv...@nongnu.org Signed-off-by: Peter Crosthwaite --- hw/char/serial.c | 10 +++--- 1 file c

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-06-02 Thread Gerd Hoffmann
On 06/01/13 01:01, Jordan Justen wrote: > On Fri, May 31, 2013 at 2:32 AM, Gerd Hoffmann wrote: >> Hi, >> >>> I guess -bios would load coreboot. Coreboot would siphon the data >>> necessary for ACPI table building through the current (same) fw_cfg >>> bottleneck, build the tables, >> >> Yes. >

Re: [Qemu-devel] [PATCH v2 1/2] target-i386/seg_helper: refactor 4 helper functions

2013-06-02 Thread li guang
Oh, almost forgot it, Peter, what about the version? Thanks! 在 2013-05-06一的 13:55 +0800,liguang写道: > for helper_{lsl, lar, verr, verw}, there are > common parts, so move them outside, and then > call this new helper-helper function. > > Signed-off-by: liguang > --- > v2: change misc_check_helpe

[Qemu-devel] [PATCH v1 0/3] Memory: Trivial fixes

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite Some trivial fixes to memory API. Peter Crosthwaite (3): memory: Fix comment typo memory: as_update_topology_pass: Improve comments memory: render_memory_region: factor out fr constant setters memory.c | 19 --- 1 file changed, 8 insertions(+), 11

[Qemu-devel] [PATCH v1 1/3] memory: Fix comment typo

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite s/ajacent/adjacent Signed-off-by: Peter Crosthwaite --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 5cb8f4a..60e033b 100644 --- a/memory.c +++ b/memory.c @@ -282,7 +282,7 @@ static bool can_merge(FlatRange *r1,

[Qemu-devel] [PATCH v1 2/3] memory: as_update_topology_pass: Improve comments

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite These comments we're a little difficult to read. First one had incorrect parenthesis. The part about attributes changing is really applicable to the region being 'in both' rather than 'in new' Second comment has an obscure parenthetic about 'Logging may have changed'. Mad

[Qemu-devel] [PATCH v1 3/3] memory: render_memory_region: factor out fr constant setters

2013-06-02 Thread peter . crosthwaite
From: Peter Crosthwaite These 4 replicated lines set properties of fr that are constant over the course of the function. Factor out their repeated setting (and also guards against them being set multiple times in the loop below). Signed-off-by: Peter Crosthwaite --- memory.c | 13 +---

[Qemu-devel] fstrim and cache=none

2013-06-02 Thread Dusty Mabe
Hi, Is it valid to have cache=none and discard=unmap together? I notice that when I have cache=none the fstrim operations inside of my guests gives me an error and i get this from the sys filesystem: [root@guest ~]# cat /sys/block/sdb/queue/discard* 4096 0 0 This wasn't very obvious to me to be

[Qemu-devel] Boot guest OS on many nodes?

2013-06-02 Thread Steven.G
Dear all, I've a scene, I have many host nodes with linux kernels, and I want to boot one guest OS on all these nodes use QEMU/KVM. In order that I can use all the physical CPUs and Mems distributed on these linux nodes, and the Guest looks like a SMP or shared-memory system. How can I use QEMU/KV

Re: [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI

2013-06-02 Thread Alexey Kardashevskiy
On 05/31/2013 08:41 PM, Paolo Bonzini wrote: > Il 31/05/2013 12:25, Alexey Kardashevskiy ha scritto: >> On 05/31/2013 08:07 PM, Benjamin Herrenschmidt wrote: >>> On Fri, 2013-05-31 at 15:58 +1000, Alexey Kardashevskiy wrote: And another question (sorry I am not very familiar with terminol

Re: [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI

2013-06-02 Thread Paolo Bonzini
Il 01/06/2013 02:01, Benjamin Herrenschmidt ha scritto: > On Fri, 2013-05-31 at 12:41 +0200, Paolo Bonzini wrote: > >> It may be halfway through, but it is always restarted on the destination. > > "restarted" as in the whole transfer is restarted if any right ? So we > can essentially consider as

Re: [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI

2013-06-02 Thread Paolo Bonzini
Il 03/06/2013 07:46, Alexey Kardashevskiy ha scritto: > Ok. I implemented {save|load}_request for IBMVSCSI, started testing - the > destination system behaves very unstable, sometime it is a fault in > _raw_spin_lock or it looks okay but any attempt to read the filesystem > leads to 100% cpu load i

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 17:05, Gleb Natapov ha scritto: >>> Anthony requested that patches be made that generate the ACPI tables >>> in QEMU for the upcoming hotplug work, so that they could be evaluated >>> to see if they truly do need to live in QEMU or if the code could live >>> in the firmware. There we

Re: [Qemu-devel] fstrim and cache=none

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 22:21, Dusty Mabe ha scritto: > Hi, > > Is it valid to have cache=none and discard=unmap together? I notice > that when I have cache=none the fstrim operations inside of my guests > gives me an error What error? Can you add an extra disk and try dd if=/dev/urandom of=/dev/sdc bs=1

Re: [Qemu-devel] [PATCH 14/15] memory: return MemoryRegion from qemu_ram_addr_from_host

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 18:04, Peter Maydell ha scritto: > On 2 June 2013 16:43, Paolo Bonzini wrote: >> -int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); >> +MemoryRegion *qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); >> ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); > > T

Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 18:12, Peter Maydell ha scritto: > On 2 June 2013 16:43, Paolo Bonzini wrote: >> Reference counting the region piggybacks on reference counting of a QOM >> object, the "owner" of the region. The owner API is designed so that >> it will be called as little as possible. Unowned subre

Re: [Qemu-devel] [PATCH 02/15] memory: add ref/unref

2013-06-02 Thread Paolo Bonzini
Il 02/06/2013 17:58, Peter Maydell ha scritto: >> > + * memory_region_ref: Add 1 to a memory region's reference count >> > + * >> > + * Whenever memory regions are accessed outside the BQL, they need to be >> > + * preserved against hot-unplug. MemoryRegions actually do not have their >> > + * own

Re: [Qemu-devel] [PATCH uq/master] fix double free the memslot in kvm_set_phys_mem

2013-06-02 Thread Gleb Natapov
On Fri, May 31, 2013 at 04:52:18PM +0800, Xiao Guangrong wrote: > Luiz Capitulino reported that guest refused to boot and qemu > complained with: > kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument > > It is caused by commit 235e8982ad that did double free for the memslot >