Re: [Qemu-devel] [PATCH v3 0/8] block: drive-backup live backup command

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 09:31, Stefan Hajnoczi ha scritto: On Mon, May 20, 2013 at 09:23:43AM +0200, Paolo Bonzini wrote: Il 20/05/2013 08:24, Stefan Hajnoczi ha scritto: You only need to fdatasync() before every guest flush, no? No, you need to set the dirty bit before issuing the write on the host

Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 10:33, Amos Kong ha scritto: On Thu, May 16, 2013 at 05:20:37PM +0200, Paolo Bonzini wrote: Il 16/05/2013 17:17, Peter Maydell ha scritto: On 16 May 2013 16:09, Paolo Bonzini pbonz...@redhat.com wrote: ... In XWindows, you get a KeyRelease for every KeyPress Event. In X

Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 11:51, Amos Kong ha scritto: On Tue, May 21, 2013 at 05:04:30PM +0800, Amos Kong wrote: On Tue, May 21, 2013 at 10:38:00AM +0200, Paolo Bonzini wrote: Please correct me if something is wrong, thanks. When we use VNC/SPICE/SDL, vm Window will captured the key events, then qemu

Re: [Qemu-devel] [PATCH v3 0/8] block: drive-backup live backup command

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 12:34, Stefan Hajnoczi ha scritto: On Tue, May 21, 2013 at 10:30:22AM +0200, Paolo Bonzini wrote: Il 21/05/2013 09:31, Stefan Hajnoczi ha scritto: On Mon, May 20, 2013 at 09:23:43AM +0200, Paolo Bonzini wrote: Il 20/05/2013 08:24, Stefan Hajnoczi ha scritto: You only need

[Qemu-devel] [PATCH 00/30] Introduction of IOMMUs into the memory API

2013-05-21 Thread Paolo Bonzini
: abort if an emulated iommu is used pci: use memory core for iommu support David Gibson (1): memory: Add iommu map/unmap notifiers Jan Kiszka (3): memory: Replace open-coded memory_region_is_romd memory: Rename readable flag to romd_mode memory: Introduce address_space_lookup_region Paolo

[Qemu-devel] [PATCH 01/30] exec: remove obsolete comment

2013-05-21 Thread Paolo Bonzini
See how we call memory_region_section_addr two lines below to convert a physical address to a base address in the region. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/exec.c b/exec.c index aec65c5..197625c 100644

[Qemu-devel] [PATCH 02/30] exec: eliminate qemu_put_ram_ptr

2013-05-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 8 hw/pci/pci.c | 2 -- hw/scsi/megasas.c | 1 - include/exec/cpu-common.h | 1 - trace-events | 3 --- 5 files changed, 15 deletions(-) diff --git a/exec.c b/exec.c index

[Qemu-devel] [PATCH 05/30] memory: assert that PhysPageEntry's ptr does not overflow

2013-05-21 Thread Paolo Bonzini
While sized to 15 bits in PhysPageEntry, the ptr field is ORed into the iotlb entries together with a page-aligned pointer. The ptr field must not overflow into this page-aligned value, assert that it is smaller than the page size. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 2

[Qemu-devel] [PATCH 04/30] exec: eliminate stq_phys_notdirty

2013-05-21 Thread Paolo Bonzini
It is not used anywhere. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 27 --- include/exec/cpu-common.h | 1 - include/exec/poison.h | 1 - 3 files changed, 29 deletions(-) diff --git a/exec.c b/exec.c index fa5f9c3..1355661

[Qemu-devel] [PATCH 08/30] memory: Rename readable flag to romd_mode

2013-05-21 Thread Paolo Bonzini
Kiszka jan.kis...@siemens.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/block/pflash_cfi01.c | 6 +++--- hw/block/pflash_cfi02.c | 2 +- include/exec/memory.h | 22 +++--- memory.c| 30

[Qemu-devel] [PATCH 03/30] exec: make qemu_get_ram_ptr private

2013-05-21 Thread Paolo Bonzini
It is a private interface between exec.c and memory.c. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/cpu-common.h | 2 -- include/exec/memory-internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu

[Qemu-devel] [PATCH 11/30] memory: fix address space initialization/destruction

2013-05-21 Thread Paolo Bonzini
From: Avi Kivity avi.kiv...@gmail.com A couple of fields were left uninitialized. This was not observed earlier because all address spaces were statically allocated. Also free allocation for those fields. Signed-off-by: Avi Kivity avi.kiv...@gmail.com Signed-off-by: Paolo Bonzini pbonz

[Qemu-devel] [PATCH 07/30] memory: Replace open-coded memory_region_is_romd

2013-05-21 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com Improves readability. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translate-all.c b/translate-all.c index da93608..0d84b0d 100644 --- a/translate-all.c +++

[Qemu-devel] [PATCH 15/30] memory: add address_space_valid

2013-05-21 Thread Paolo Bonzini
The old-style IOMMU lets you check whether an access is valid in a given DMAContext. There is no equivalent for AddressSpace in the memory API, implement it with a lookup of the dispatch tree. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- dma-helpers.c | 5 + exec.c

[Qemu-devel] [PATCH 06/30] memory: allow memory_region_find() to run on non-root memory regions

2013-05-21 Thread Paolo Bonzini
memory_region_find() is similar to registering a MemoryListener and checking for the MemoryRegionSections that come from a particular region. There is no reason for this to be limited to a root memory region. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/memory.h | 13

[Qemu-devel] [PATCH 16/30] memory: clean up phys_page_find

2013-05-21 Thread Paolo Bonzini
Remove the goto. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 8f1b507..82da067 100644 --- a/exec.c +++ b/exec.c @@ -187,19 +187,15 @@ MemoryRegionSection *phys_page_find

[Qemu-devel] [PATCH 10/30] memory: make memory_global_sync_dirty_bitmap take an AddressSpace

2013-05-21 Thread Paolo Bonzini
Suggested-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- arch_init.c | 2 +- include/exec/memory.h | 7 +++ memory.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index

[Qemu-devel] [PATCH 18/30] memory: add return value to address_space_rw/read/write

2013-05-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 23 ++- include/exec/memory.h | 12 +--- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/exec.c b/exec.c index e5ee8ff..4cc5ecb 100644 --- a/exec.c +++ b/exec.c @@ -1901,7

[Qemu-devel] [PATCH 09/30] memory: do not duplicate memory_region_destructor_none

2013-05-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- memory.c | 5 - 1 file changed, 5 deletions(-) diff --git a/memory.c b/memory.c index 013464b..5431463 100644 --- a/memory.c +++ b/memory.c @@ -768,10 +768,6 @@ static void memory_region_destructor_ram_from_ptr(MemoryRegion *mr

[Qemu-devel] [PATCH 19/30] memory: Introduce address_space_lookup_region

2013-05-21 Thread Paolo Bonzini
jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 4cc5ecb..a29dec5 100644 --- a/exec.c +++ b/exec.c @@ -198,13 +198,19 @@ static MemoryRegionSection *phys_page_find

[Qemu-devel] [PATCH 23/30] spapr: convert TCE API to use an opaque type

2013-05-21 Thread Paolo Bonzini
...@gibson.dropbear.id.au Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/ppc/spapr_iommu.c| 54 ++--- hw/ppc/spapr_pci.c | 8 +++ hw/ppc/spapr_vio.c | 13 ++- include/hw/pci-host/spapr.h | 2 +- include/hw/ppc/spapr.h | 12

[Qemu-devel] [PATCH 22/30] vfio: abort if an emulated iommu is used

2013-05-21 Thread Paolo Bonzini
From: Avi Kivity avi.kiv...@gmail.com vfio doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Signed-off-by: Avi Kivity avi.kiv...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/misc/vfio.c | 2 ++ 1 file changed, 2 insertions

[Qemu-devel] [PATCH 24/30] spapr: make IOMMU translation go through IOMMUTLBEntry

2013-05-21 Thread Paolo Bonzini
The next step is to introduce the translation code that will be used for IOMMU MemoryRegions, but still do the actual translation in a DMAContext. Acked-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/ppc/spapr_iommu.c | 59

[Qemu-devel] [PATCH 30/30] memory: give name to every AddressSpace

2013-05-21 Thread Paolo Bonzini
mtree output. The patch fixes this. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 6 ++ hw/pci/pci.c | 3 ++- hw/ppc/spapr_vio.c| 2 +- include/exec/memory.h | 5 +++-- memory.c | 8

[Qemu-devel] [PATCH 14/30] memory: create FlatView for new address spaces

2013-05-21 Thread Paolo Bonzini
far because all address spaces started empty, including the PCI address space where the bus master region is initially disabled. However, the target address space of an IOMMU is usually rooted at get_system_memory(), which might not be empty at the time the IOMMU is created. Signed-off-by: Paolo

[Qemu-devel] [PATCH 27/30] pci: use memory core for iommu support

2013-05-21 Thread Paolo Bonzini
-by: Paolo Bonzini pbonz...@redhat.com --- hw/pci/pci.c| 46 ++--- hw/ppc/spapr_pci.c | 9 + include/hw/pci-host/spapr.h | 1 + include/hw/pci/pci.h| 4 ++-- include/hw/pci/pci_bus.h| 4 ++-- 5 files changed, 33

[Qemu-devel] [PATCH 17/30] memory: add address_space_translate

2013-05-21 Thread Paolo Bonzini
, compute the offset within the region, and check how big the current mapping is. This way, a large flat region can be written with a single lookup rather than a page at a time. address_space_translate will also provide a single point where IOMMU forwarding is implemented. Signed-off-by: Paolo

[Qemu-devel] [PATCH 29/30] dma: eliminate DMAContext

2013-05-21 Thread Paolo Bonzini
The DMAContext is a simple pointer to an AddressSpace that is now always already available. Make everyone hold the address space directly, and clean up the DMA API to use the AddressSpace directly. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- dma-helpers.c | 24

[Qemu-devel] [PATCH 26/30] dma: eliminate old-style IOMMU support

2013-05-21 Thread Paolo Bonzini
The translate function in the DMAContext is now always NULL. Remove every reference to it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- dma-helpers.c| 178 +++ exec.c | 3 +- hw/pci/pci.c | 3 +- hw/ppc

[Qemu-devel] [PATCH 20/30] memory: iommu support

2013-05-21 Thread Paolo Bonzini
in address_space_translate - Paolo] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 35 ++- include/exec/memory.h | 66 +++ memory.c | 21 3 files changed, 112 insertions(+), 10

[Qemu-devel] [PATCH 21/30] memory: Add iommu map/unmap notifiers

2013-05-21 Thread Paolo Bonzini
From: David Gibson da...@gibson.dropbear.id.au This patch adds a NotifierList to MemoryRegions which represent IOMMUs allowing other parts of the code to register interest in mappings or unmappings from the IOMMU. All IOMMU implementations will need to call memory_region_notify_iommu() to inform

[Qemu-devel] [PATCH 28/30] spapr_vio: take care of creating our own AddressSpace/DMAContext

2013-05-21 Thread Paolo Bonzini
is trivially address_space_memory). Acked-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/ppc/spapr_iommu.c | 11 --- hw/ppc/spapr_vio.c | 3 ++- include/hw/ppc/spapr.h | 1 - include/hw/ppc/spapr_vio.h | 21

[Qemu-devel] [PATCH 25/30] spapr: use memory core for iommu support

2013-05-21 Thread Paolo Bonzini
Now we can stop using a translating DMAContext, but we do not yet modify the sPAPRTCETable users to get an AddressSpace; they keep using the table via a DMAContext. Acked-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/ppc/spapr_iommu.c | 49

[Qemu-devel] [PATCH 13/30] memory: limit sections in the radix tree to the actual address space size

2013-05-21 Thread Paolo Bonzini
if TARGET_PHYS_ADDR_SPACE_BITS is too large - Paolo ] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 13 - include/exec/memory.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 380245f..8d91221 100644 --- a/exec.c +++ b/exec.c

[Qemu-devel] [PATCH 12/30] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62

2013-05-21 Thread Paolo Bonzini
-off-by: Paolo Bonzini pbonz...@redhat.com --- target-s390x/cpu.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 0ce82cf..6304c4d 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -34,7 +34,10 @@ #include exec/cpu

[Qemu-devel] [PATCH scsi] scsi-generic: fix sign extension of READ CAPACITY(10) data

2013-05-21 Thread Paolo Bonzini
. If the READ CAPACITY(10) command reported an overflow (0x), we must not overwrite the previously-known maximum accessible LBA, or the guest will fail to access the disk above the first 2TB. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-generic.c | 5 +++-- 1 file changed

Re: [Qemu-devel] [PATCH 1/2] chardev: Make the name of memory device consistent

2013-05-21 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 21/05/2013 14:38, Eric Blake ha scritto: On 05/21/2013 04:27 AM, Lei Li wrote: Now we have memory char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name

Re: [Qemu-devel] [PATCH v3 2/8] block: add basic backup support to block driver

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 15:34, Stefan Hajnoczi ha scritto: /** * hbitmap_iter_init: [...] * position of the iterator is also okay. However, concurrent resetting of * bits can lead to unexpected behavior if the iterator has not yet reached * those bits. */ void hbitmap_iter_init(HBitmapIter

Re: [Qemu-devel] [PATCH v3 2/8] block: add basic backup support to block driver

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 17:25, Dietmar Maurer ha scritto: Hmm, right. But do we need the bitmap at all? We can just use bdrv_is_allocated like bdrv_co_do_readv does. If a write occur, we read and backup that cluster immediately (out of order). So I am quite sure we need the bitmap. This is the

Re: [Qemu-devel] [PATCH v3 2/8] block: add basic backup support to block driver

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 17:54, Dietmar Maurer ha scritto: Hmm, right. But do we need the bitmap at all? We can just use bdrv_is_allocated like bdrv_co_do_readv does. If a write occur, we read and backup that cluster immediately (out of order). So I am quite sure we need the bitmap. This is the same

Re: [Qemu-devel] [PATCH v3 2/8] block: add basic backup support to block driver

2013-05-21 Thread Paolo Bonzini
Il 21/05/2013 18:26, Dietmar Maurer ha scritto: Hmm, right. But do we need the bitmap at all? We can just use bdrv_is_allocated like bdrv_co_do_readv does. Does that works with a nbd driver? Ah, right. That's the answer. Or does that add another RPC call (slow down)? It doesn't work at

Re: [Qemu-devel] [PATCH v1 1/1] glib: Fix some misuses of gsize/size_t types

2013-05-22 Thread Paolo Bonzini
) { -- 1.8.3.rc1.44.gb387c77.dirty Adding qemu-trivial... Reviewed-by: Paolo Bonzini pbonz...@redhat.com Paolo

Re: [Qemu-devel] [PATCH v2 1/1] qom/object: Don't poll cast cache for NULL objects

2013-05-22 Thread Paolo Bonzini
Reviewed-by: Paolo Bonzini pbonz...@redhat.com ... and added qemu-sta...@nongnu.org since this got in pretty close to a release. Paolo

Re: [Qemu-devel] segfault in aio_bh_poll async.c:80 WAS: Re: kvm process disappears

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 08:26, Stefan Priebe - Profihost AG ha scritto: Hi, as i can't reproduce no ;-( i just saw the kernel segfault message and used addr2line and a qemu dbg package to get the code line. I've now seen this again for two or three times. It always happens when we do an fstrim

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 10:38, Peter Maydell ha scritto: On 22 May 2013 09:37, Michael S. Tsirkin m...@redhat.com wrote: It's my fault for running -rc kernels all the time I guess, I get crashes kind of often, and losing more time on make clean on top of reboot annoys me. But we actually could make it

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: The fix is simple here: don't use ccache. I don't. In fact, from what I saw people use ccache to work around makefile bugs, so they can do make clean; make and have it finish quickly. Any other examples? Testing configure patches should

Re: [Qemu-devel] [PATCH 00/30] Introduction of IOMMUs into the memory API

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 04:30, Alexey Kardashevskiy ha scritto: On 05/21/2013 08:57 PM, Paolo Bonzini wrote: This is part 1 of the memory API updates for 1.6. (Part 2 is the introduction of get/set_owner, part 3 is the introduction of the RCU-style flatview). Compared to the first submissions

Re: [Qemu-devel] [PATCH v4 2/8] block: add basic backup support to block driver

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 11:38, Kevin Wolf ha scritto: + +DPRINTF(brdv_co_backup_cow done C% PRId64 \n, start); +} + +out: +if (bounce_buffer) { +qemu_vfree(bounce_buffer); +} + +cow_request_end(cow_request); + +qemu_co_rwlock_unlock(job-flush_rwlock); + +

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 11:42, Michael S. Tsirkin ha scritto: On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonzini wrote: Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: The fix is simple here: don't use ccache. I don't. In fact, from what I saw people use ccache to work around makefile bugs

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 12:50, Michael S. Tsirkin ha scritto: On Wed, May 22, 2013 at 12:40:23PM +0200, Paolo Bonzini wrote: Il 22/05/2013 11:42, Michael S. Tsirkin ha scritto: On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonzini wrote: Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: The fix

Re: [Qemu-devel] [PATCH v4 00/10] curl: fix curl read

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 11:44, Richard W.M. Jones ha scritto: On Wed, May 22, 2013 at 11:16:40AM +0800, Fam Zheng wrote: Changes from v3: 01, 06, 07: Add QLIST_INIT in qemu_open to initialize each list. 07: Move clean up for s-acbs from later patch to here. Use qemu_aio_relase instead of g_free on

Re: [Qemu-devel] 'qemu-nbd' explicit flush

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 11:47, Stefan Hajnoczi ha scritto: On Tue, May 21, 2013 at 08:01:10PM +, Mark Trumpold wrote: Linux kernel 3.3.1 with Qemu patch to enable kernel flushing: http://thread.gmane.org/gmane.linux.drivers.nbd.general/1108 Did you check that the kernel is sending

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 13:09, Michael S. Tsirkin ha scritto: Usually I do the same---I just do slightly more thorough testing for configure patches. I've no idea what happens with ccache on a crash by the way. It's possible that it's careful to do renames in order to not leave corrupted output

Re: [Qemu-devel] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 16:29, Anthony Liguori ha scritto: Peter Maydell peter.mayd...@linaro.org writes: On 22 May 2013 14:15, Anthony Liguori aligu...@us.ibm.com wrote: Paolo Bonzini pbonz...@redhat.com writes: You don't need to know what targets were supported in the version that you compiled

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 17:51, Wolfgang Richter ha scritto: On Thu, May 16, 2013 at 9:44 AM, Richard W.M. Jones rjo...@redhat.com mailto:rjo...@redhat.com wrote: Ideally I'd like to issue some QMP commands which would set up the point-in-time snapshot, and then connect to this snapshot over

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 22:47, Richard W.M. Jones ha scritto: I meant if there was interest in reading from a disk that isn't fully synchronized (yet) to the original disk (it might have old blocks). Or would you only want to connect once a (complete) snapshot is available (synchronized

Re: [Qemu-devel] [PATCH 17/30] memory: add address_space_translate

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 09:09, liu ping fan ha scritto: void address_space_rw(AddressSpace *as, hwaddr addr, uint8_t *buf, int len, bool is_write) { -AddressSpaceDispatch *d = as-dispatch; -int l; +hwaddr l; uint8_t *ptr; uint32_t val; -

Re: [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a

2013-05-23 Thread Paolo Bonzini
Il 22/05/2013 15:09, Andreas Färber ha scritto: Allows us to drop CONFIG_NO_GET_MEMORY_MAPPING with its indirect dependency on CONFIG_HAVE_GET_MEMORY_MAPPING in Makefile.target. Signed-off-by: Andreas Färber afaer...@suse.de --- Makefile.target | 2 --

Re: [Qemu-devel] segfault in aio_bh_poll async.c:80 WAS: Re: kvm process disappears

2013-05-23 Thread Paolo Bonzini
Il 22/05/2013 14:24, Stefan Priebe - Profihost AG ha scritto: Am 22.05.2013 um 10:41 schrieb Paolo Bonzini pbonz...@redhat.com: Il 22/05/2013 08:26, Stefan Priebe - Profihost AG ha scritto: Hi, as i can't reproduce no ;-( i just saw the kernel segfault message and used addr2line and a qemu

Re: [Qemu-devel] [PATCH 17/30] memory: add address_space_translate

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 15:06, liu ping fan ha scritto: The idea is that address_space_translate gets a ref to the MemoryRegion, and the ref is then released by the caller of address_space_translate. This will require subpage hold a reference to real mr. Hmm, that's right. Jan, that could be a concern

Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 14:15, Stefan Hajnoczi ha scritto: On Tue, May 21, 2013 at 11:33:33AM -0400, Tomoki Sekiyama wrote: * How to build run qemu-ga with VSS support - Download Microsoft VSS SDK from: http://www.microsoft.com/en-us/download/details.aspx?id=23490 - Setup the SDK

Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 15:28, Stefan Hajnoczi ha scritto: On Thu, May 23, 2013 at 3:20 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 23/05/2013 14:15, Stefan Hajnoczi ha scritto: On Tue, May 21, 2013 at 11:33:33AM -0400, Tomoki Sekiyama wrote: * How to build run qemu-ga with VSS support

Re: [Qemu-devel] [PATCH 1/8] pci: Cleanup configuration for pci-hotplug.c

2013-05-23 Thread Paolo Bonzini
Il 09/05/2013 02:31, David Gibson ha scritto: diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs index a7fb9d0..2ad32b6 100644 --- a/hw/pci/Makefile.objs +++ b/hw/pci/Makefile.objs @@ -8,4 +8,4 @@ common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o common-obj-$(CONFIG_NO_PCI) +=

Re: [Qemu-devel] qemu seabios issue with vhost-scsi

2013-05-23 Thread Paolo Bonzini
scsi target scanning, we need to set the VIRTIO_CONFIG_S_DRIVER_OK flag so the device can do setup properly. This fix a bug when booting tcm_vhost with seabios. Signed-off-by: Asias He as...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com Still, Gleb is right that SeaBIOS

Re: [Qemu-devel] [PATCH 5/8] pci: Replace pci_find_domain() with more general pci_root_bus_path()

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 16:57, Michael S. Tsirkin ha scritto: On Thu, May 23, 2013 at 04:51:17PM +0200, Paolo Bonzini wrote: Il 23/05/2013 13:04, Michael S. Tsirkin ha scritto: Most current uses of pci_find_domain() are for error or informational messages, so the change in identifiers should be harmless

Re: [Qemu-devel] [PATCH 5/8] pci: Replace pci_find_domain() with more general pci_root_bus_path()

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 13:04, Michael S. Tsirkin ha scritto: Most current uses of pci_find_domain() are for error or informational messages, so the change in identifiers should be harmless. The exception is pci_get_dev_path(), whose results form part of migration streams. To maintain

Re: [Qemu-devel] [PATCH 15/30] memory: add address_space_valid

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 16:22, Jan Kiszka ha scritto: The old-style IOMMU lets you check whether an access is valid in a given DMAContext. There is no equivalent for AddressSpace in the memory API, implement it with a lookup of the dispatch tree. I don't love the name - address_space_valid

Re: [Qemu-devel] qemu seabios issue with vhost-scsi

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 17:27, Asias He ha scritto: On Thu, May 23, 2013 at 04:58:05PM +0200, Paolo Bonzini wrote: Il 23/05/2013 16:48, Badari Pulavarty ha scritto: The common virtio-scsi code in QEMU should guard against this. In virtio-blk data plane I hit a similar case and ended up starting

Re: [Qemu-devel] [PATCH 00/10] virtio: import headers from linux

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 17:32, Michael S. Tsirkin ha scritto: On Thu, May 23, 2013 at 05:56:43PM +0300, Michael S. Tsirkin wrote: On Thu, May 23, 2013 at 03:41:07PM +0100, Peter Maydell wrote: On 23 May 2013 15:34, Michael S. Tsirkin m...@redhat.com wrote: I'm working on adding new virtio layout to

Re: [Qemu-devel] qemu seabios issue with vhost-scsi

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 18:11, Badari Pulavarty ha scritto: On 05/23/2013 08:30 AM, Paolo Bonzini wrote: Il 23/05/2013 17:27, Asias He ha scritto: On Thu, May 23, 2013 at 04:58:05PM +0200, Paolo Bonzini wrote: Il 23/05/2013 16:48, Badari Pulavarty ha scritto: The common virtio-scsi code in QEMU should

Re: [Qemu-devel] qemu seabios issue with vhost-scsi

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 18:38, Badari Pulavarty ha scritto: If that is with the old SeaBIOS, then SIGABRT is intended. :) The guest is buggy, the problem in QEMU only lies in _how_ it fails. Paolo I am confused now. Without above changes, seabios fix makes the guest boot. But with the above

Re: [Qemu-devel] [PATCH] qemu-kvm: fix unmatched RAM alloction/free

2013-05-23 Thread Paolo Bonzini
mmap is used in qemu_vmalloc function instead of qemu_memalign(commit 7dda5dc8), so it should change qemu_vfree to munmap to fix a unmatched issue. This issue appears when a PCI device is being assigned to KVM guest, failure to read PCI rom file will bring RAM free, then the incorrect

Re: [Qemu-devel] [PATCH 00/30] Introduction of IOMMUs into the memory API

2013-05-23 Thread Paolo Bonzini
Il 22/05/2013 11:24, Paolo Bonzini ha scritto: Il 22/05/2013 04:30, Alexey Kardashevskiy ha scritto: On 05/21/2013 08:57 PM, Paolo Bonzini wrote: This is part 1 of the memory API updates for 1.6. (Part 2 is the introduction of get/set_owner, part 3 is the introduction of the RCU-style

Re: [Qemu-devel] [PATCH 00/30] Introduction of IOMMUs into the memory API

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 19:25, Peter Maydell ha scritto: BTW, if you give me your Tested-by it would be good, since most comments have been cosmetic. I'd like to collect all of Peter's Reviewed-by from the RFC and send a pull request next week. There's been at least one requested fix in code review,

Re: [Qemu-devel] qemu seabios issue with vhost-scsi

2013-05-23 Thread Paolo Bonzini
- Messaggio originale - Da: Stefan Hajnoczi stefa...@gmail.com A: Paolo Bonzini pbonz...@redhat.com Cc: Badari Pulavarty pbad...@us.ibm.com, Asias He as...@redhat.com, Nicholas A. Bellinger n...@linux-iscsi.org, qemu-devel qemu-devel@nongnu.org, Gleb Natapov g...@redhat.com

Re: [Qemu-devel] [PATCH 04/30] exec: eliminate stq_phys_notdirty

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 19:32, Peter Maydell ha scritto: On 21 May 2013 11:57, Paolo Bonzini pbonz...@redhat.com wrote: It is not used anywhere. So does this get deleted just because it's not used, or because it gets in the way of patches later in the series. No, it doesn't get in the way, I just

Re: [Qemu-devel] [PATCH 21/30] memory: Add iommu map/unmap notifiers

2013-05-23 Thread Paolo Bonzini
Il 23/05/2013 20:27, Peter Maydell ha scritto: On 21 May 2013 11:57, Paolo Bonzini pbonz...@redhat.com wrote: From: David Gibson da...@gibson.dropbear.id.au This patch adds a NotifierList to MemoryRegions which represent IOMMUs allowing other parts of the code to register interest in mappings

Re: [Qemu-devel] [PATCH 15/30] memory: add address_space_valid

2013-05-24 Thread Paolo Bonzini
Il 23/05/2013 20:04, Peter Maydell ha scritto: Shouldn't we be calling the MemoryRegionOps accepts() callback here? What about access alignment constraints and access size restrictions? Yes, we should. What if the validity of the range changes between the time you asked and when you

Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 10:59, Stefan Hajnoczi ha scritto: On Thu, May 23, 2013 at 03:50:19PM +0200, Paolo Bonzini wrote: Il 23/05/2013 15:28, Stefan Hajnoczi ha scritto: On Thu, May 23, 2013 at 3:20 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 23/05/2013 14:15, Stefan Hajnoczi ha scritto: On Tue

Re: [Qemu-devel] 'qemu-nbd' explicit flush

2013-05-24 Thread Paolo Bonzini
Il 23/05/2013 23:58, Mark Trumpold ha scritto: I have a working configuration using the signal approach suggested by Stefan. 'qemu-nbd.c' is patched as follows: do { main_loop_wait(false); + if (sighup_reported) { + sighup_reported = false; +

Re: [Qemu-devel] [PATCH 15/30] memory: add address_space_valid

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 12:52, Peter Maydell ha scritto: On 24 May 2013 09:02, Paolo Bonzini pbonz...@redhat.com wrote: Il 23/05/2013 20:04, Peter Maydell ha scritto: Shouldn't we be calling the MemoryRegionOps accepts() callback here? What about access alignment constraints and access size

Re: [Qemu-devel] [PATCH 15/30] memory: add address_space_valid

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 15:27, Peter Maydell ha scritto: On 24 May 2013 13:58, Paolo Bonzini pbonz...@redhat.com wrote: If it's okay for you, I'll send a pull request up to memory: clean up phys_page_find and go on with the next series. That's fine with me, but please don't forget to fix up the doc

Re: [Qemu-devel] [PATCH 00/30] Introduction of IOMMUs into the memory API

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 16:12, Alexey Kardashevskiy ha scritto: On 05/24/2013 03:08 AM, Paolo Bonzini wrote: Il 22/05/2013 11:24, Paolo Bonzini ha scritto: Il 22/05/2013 04:30, Alexey Kardashevskiy ha scritto: On 05/21/2013 08:57 PM, Paolo Bonzini wrote: This is part 1 of the memory API updates for 1.6

Re: [Qemu-devel] [PATCH 2/2] rtl8139: flush queued packets when RxBufPtr is written

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 16:38, Stefan Hajnoczi ha scritto: Net queues support efficient receive disable. For example, tap's file descriptor will not be polled while its peer has receive disabled. This saves CPU cycles for needlessly copying and then dropping packets which the peer cannot receive.

[Qemu-devel] [PATCH 01/15] exec: remove obsolete comment

2013-05-24 Thread Paolo Bonzini
See how we call memory_region_section_addr two lines below to convert a physical address to a base address in the region. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[Qemu-devel] [PULL 00/15] IOMMU patches for 1.6, part 1

2013-05-24 Thread Paolo Bonzini
-coded memory_region_is_romd memory: Rename readable flag to romd_mode Paolo Bonzini (11): exec: remove obsolete comment exec: eliminate qemu_put_ram_ptr exec: make qemu_get_ram_ptr private exec: eliminate stq_phys_notdirty memory: assert that PhysPageEntry's ptr

[Qemu-devel] [PATCH 04/15] exec: eliminate stq_phys_notdirty

2013-05-24 Thread Paolo Bonzini
It is not used anywhere. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 27 --- include/exec/cpu-common.h | 1 - include/exec/poison.h | 1 - 3 files changed, 29 deletions(-) diff

[Qemu-devel] [PATCH 06/15] memory: allow memory_region_find() to run on non-root memory regions

2013-05-24 Thread Paolo Bonzini
memory_region_find() is similar to registering a MemoryListener and checking for the MemoryRegionSections that come from a particular region. There is no reason for this to be limited to a root memory region. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz

[Qemu-devel] [PATCH 02/15] exec: eliminate qemu_put_ram_ptr

2013-05-24 Thread Paolo Bonzini
Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 8 hw/pci/pci.c | 2 -- hw/scsi/megasas.c | 1 - include/exec/cpu-common.h | 1 - trace-events | 3 --- 5 files changed

[Qemu-devel] [PATCH 05/15] memory: assert that PhysPageEntry's ptr does not overflow

2013-05-24 Thread Paolo Bonzini
-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/exec.c b/exec.c index 1355661..8562fca 100644 --- a/exec.c +++ b/exec.c @@ -713,6 +713,12 @@ static void destroy_all_mappings(AddressSpaceDispatch *d) static uint16_t phys_section_add

[Qemu-devel] [PATCH 15/15] memory: clean up phys_page_find

2013-05-24 Thread Paolo Bonzini
Remove the goto. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 3fdca46..3a9ddcb 100644 --- a/exec.c +++ b/exec.c @@ -187,19 +187,15

[Qemu-devel] [PATCH 13/15] memory: limit sections in the radix tree to the actual address space size

2013-05-24 Thread Paolo Bonzini
...@gmail.com [ Fail the build if TARGET_PHYS_ADDR_SPACE_BITS is too large - Paolo ] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c| 13 - include/exec/memory.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index

[Qemu-devel] [PATCH 02/22] exec: drop useless #if

2013-05-24 Thread Paolo Bonzini
This code is only compiled for softmmu targets. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/exec.c b/exec.c index b720be5..7728ea3 100644 --- a/exec.c +++ b/exec.c @@ -1430,10 +1430,8 @@ static void notdirty_mem_write(void

[Qemu-devel] [PATCH 07/15] memory: Replace open-coded memory_region_is_romd

2013-05-24 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com Improves readability. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translate-all.c b/translate-all.c index

[Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-05-24 Thread Paolo Bonzini
Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cputlb.c | 20 +++--- exec.c| 189 +- include/exec/cputlb.h | 12 ++-- include/exec/memory.h | 31 - translate-all.c | 6

[Qemu-devel] [PATCH 14/15] memory: populate FlatView for new address spaces

2013-05-24 Thread Paolo Bonzini
Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 9478f98..99f046d 100644 --- a/memory.c +++ b/memory.c @@ -1576,8 +1576,9 @@ void address_space_init(AddressSpace

[Qemu-devel] [PATCH 00/22] Memory/IOMMU patches, part 2: unassigned access detection

2013-05-24 Thread Paolo Bonzini
repository. Paolo Paolo Bonzini (22): exec: eliminate io_mem_ram exec: drop useless #if cputlb: simplify tlb_set_page exec: make io_mem_unassigned private exec: do not use error_mem_read memory: dispatch unassigned accesses based on .valid.accepts memory: add address_space_translate memory

[Qemu-devel] [PATCH 13/22] memory: export memory_region_access_valid to exec.c

2013-05-24 Thread Paolo Bonzini
We'll use it to implement address_space_access_valid. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/memory-internal.h | 3 +++ memory.c | 8 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/exec/memory-internal.h b/include

[Qemu-devel] [PATCH 03/22] cputlb: simplify tlb_set_page

2013-05-24 Thread Paolo Bonzini
The same if condition is repeated twice. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cputlb.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cputlb.c b/cputlb.c index aba7e44..b56bc01 100644 --- a/cputlb.c +++ b/cputlb.c @@ -262,17 +262,14 @@ void

[Qemu-devel] [PATCH 10/15] memory: make memory_global_sync_dirty_bitmap take an AddressSpace

2013-05-24 Thread Paolo Bonzini
Since this is a MemoryListener operation, it only makes sense on an AddressSpace granularity. Suggested-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- arch_init.c | 2 +- include/exec/memory.h | 7 +++ memory.c | 3

  1   2   3   4   5   6   7   8   9   10   >