Re: [Qemu-devel] QEMU build broken

2014-05-10 Thread Markus Armbruster
Brad Smith b...@comstyle.com writes: On 09/05/14 7:35 PM, Peter Maydell wrote: On 10 May 2014 00:02, Brad Smith b...@comstyle.com wrote: On 08/05/14 10:54 AM, Peter Maydell wrote: Ah, bsd-user. Do you actually use it, or is it just in the default compile that you're running? I do not use

Re: [Qemu-devel] QEMU build broken

2014-05-10 Thread Brad Smith
On 10/05/14 2:25 AM, Markus Armbruster wrote: Brad Smith b...@comstyle.com writes: On 09/05/14 7:35 PM, Peter Maydell wrote: On 10 May 2014 00:02, Brad Smith b...@comstyle.com wrote: On 08/05/14 10:54 AM, Peter Maydell wrote: Ah, bsd-user. Do you actually use it, or is it just in the

[Qemu-devel] [PULL 1/8] target-i386: Remove unused data from local array

2014-05-10 Thread Paolo Bonzini
From: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-i386/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 7a295f6..114f9e1 100644 ---

[Qemu-devel] [PULL 2/8] kvm: add set_one_reg/get_one_reg helpers

2014-05-10 Thread Paolo Bonzini
From: Alexey Kardashevskiy a...@ozlabs.ru This adds QEMU wrappers for KVM_SET_ONE_REG/KVM_GET_ONE_REG ioctls. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/sysemu/kvm.h | 20 kvm-all.c| 18

[Qemu-devel] [PULL 4/8] pci-assign: limit # of msix vectors

2014-05-10 Thread Paolo Bonzini
From: Michael S. Tsirkin m...@redhat.com KVM only supports MSIX table size up to 256 vectors, but some assigned devices support more vectors, at the moment attempts to assign them fail with EINVAL. Tweak the MSIX capability exposed to guest to limit table size to a supported value.

[Qemu-devel] [PULL 5/8] target-i386: set eflags prior to calling svm_load_seg_cache() in svm_helper.c

2014-05-10 Thread Paolo Bonzini
From: Kevin O'Connor ke...@koconnor.net The svm_load_seg_cache() function calls cpu_x86_load_seg_cache() which inspects env-eflags. So, make sure all changes to eflags are done prior to loading the segment cache. Signed-off-by: Kevin O'Connor ke...@koconnor.net Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 6/8] target-i386: set eflags and cr0 prior to calling cpu_x86_load_seg_cache() in smm_helper.c

2014-05-10 Thread Paolo Bonzini
From: Kevin O'Connor ke...@koconnor.net The cpu_x86_load_seg_cache() function inspects cr0 and eflags, so make sure all changes to eflags and cr0 are done prior to loading the segment caches. Signed-off-by: Kevin O'Connor ke...@koconnor.net Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

[Qemu-devel] [PULL 3/8] pci-assign: Fix a bug when map MSI-X table memory failed

2014-05-10 Thread Paolo Bonzini
From: Gonglei arei.gong...@huawei.com when map MSI-X table memory failed, the dev-msix_table not be set to NULL, the assigned_dev_unregister_msix_mmio() will case a segfault when munmap the failed dev-msix_table. Signed-off-by: Gonglei Arei arei.gong...@huawei.com Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL 0/8] KVM changes for 2014-05-08

2014-05-10 Thread Paolo Bonzini
The following changes since commit 3a87f8b6859e6221b827ab4737779dddb37553ec: Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into staging (2014-03-20 11:45:38 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for

[Qemu-devel] [PULL 7/8] target-i386: set eflags prior to calling cpu_x86_load_seg_cache() in seg_helper.c

2014-05-10 Thread Paolo Bonzini
From: Kevin O'Connor ke...@koconnor.net The cpu_x86_load_seg_cache() function inspects eflags, so make sure all changes to eflags are done prior to loading the segment caches. Signed-off-by: Kevin O'Connor ke...@koconnor.net Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

[Qemu-devel] [PULL 8/8] target-i386: the x86 CPL is stored in CS.selector - auto update hflags accordingly.

2014-05-10 Thread Paolo Bonzini
From: Kevin O'Connor ke...@koconnor.net Instead of manually calling cpu_x86_set_cpl() when the CPL changes, check for CPL changes on calls to cpu_x86_load_seg_cache(R_CS). Every location that called cpu_x86_set_cpl() also called cpu_x86_load_seg_cache(R_CS), so cpu_x86_set_cpl() is no longer

Re: [Qemu-devel] QEMU build broken

2014-05-10 Thread Paolo Bonzini
Il 10/05/2014 08:45, Brad Smith ha scritto: Having your feature in-tree is a privilege, not a right. You earn it by helping to maintain it. it's not really maintained right now means it has not been earning its keep. You're encouraged to remedy that. Huh? my feature? I have nothing to do

Re: [Qemu-devel] Question about RAM migration flags

2014-05-10 Thread Juan Quintela
Peter Lieven p...@kamp.de wrote: Am 09.05.2014 um 11:43 schrieb Dr. David Alan Gilbert dgilb...@redhat.com: * Peter Lieven (p...@kamp.de) wrote: Hi, while working on ram migration and reading through the code I realized that qemu does not stop loading a saved VM or rejecting an incoming

Re: [Qemu-devel] QEMU build broken

2014-05-10 Thread Peter Maydell
On 10 May 2014 08:07, Paolo Bonzini pbonz...@redhat.com wrote: Why don't you send a patch? Or just test the one I sent yesterday: http://patchwork.ozlabs.org/patch/347443/ thanks -- PMM

Re: [Qemu-devel] [PATCH v2 1/3] linux-user: Support little-endian PPC64 in user mode.

2014-05-10 Thread Peter Maydell
On 10 May 2014 10:16, Doug Kwan dougk...@google.com wrote: diff --git a/linux-user/uname.c b/linux-user/uname.c index f5d4c66..cb1f9a3 100644 --- a/linux-user/uname.c +++ b/linux-user/uname.c @@ -65,6 +65,12 @@ const char *cpu_to_uname_machine(void *cpu_env) return i586; }

Re: [Qemu-devel] [PATCH v2 3/3] Add a new user mode target for little-endian PPC64.

2014-05-10 Thread Peter Maydell
On 10 May 2014 10:16, Doug Kwan dougk...@google.com wrote: Signed-off-by: Doug Kwan dougk...@google.com --- configure | 6 ++ default-configs/ppc64le-linux-user.mak | 1 + 2 files changed, 7 insertions(+) create mode 100644

Re: [Qemu-devel] [PATCH v2 1/3] linux-user: Support little-endian PPC64 in user mode.

2014-05-10 Thread Peter Maydell
On 10 May 2014 10:16, Doug Kwan dougk...@google.com wrote: Look at ELF header to determin ABI version on PPC64. This is required typo: determine. for executing the first instruction correctly. Also print correct machine name in uname() system call. thanks -- PMM

Re: [Qemu-devel] [PATCH v2 2/3] PPC: Allow little-endian user mode.

2014-05-10 Thread Peter Maydell
On 10 May 2014 10:16, Doug Kwan dougk...@google.com wrote: This allow running PPC64 little-endian in user mode if target is configured that way. In PPC64 LE user mode we set MSR.LE during initialization. Overhaul handling of byteswapping in code generation and mem helpers. This looks pretty

[Qemu-devel] [PATCH] migration: catch unknown flags in ram_load

2014-05-10 Thread Peter Lieven
if a saved vm has unknown flags in the memory data qemu currently simply ignores this flag and continues which yields in an unpredictable result. this patch catches all unknown flags and aborts the loading of the vm. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven p...@kamp.de ---

[Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread Peter Lieven
we currently look up the ram ptr for each single page. Cache the pointer while we operate on the same block. Signed-off-by: Peter Lieven p...@kamp.de --- arch_init.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index

[Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64

2014-05-10 Thread Peter Maydell
We were returning the incorrect uname string (with a hyphen, not an underscore) for x86_64. Fix this by removing the x86_64 special case, since the default just use UNAME_MACHINE behaviour suffices. This leaves cpu_to_uname_machine() special cases for only those architectures which need to vary

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread 陈梁
Hi, The patch is correct. There is a small improved point. /* In doubt sent page as normal */ bytes_sent = -1; @@ -990,16 +996,17 @@ static inline void *host_from_stream_offset(QEMUFile *f, int flags) { static RAMBlock

Re: [Qemu-devel] [Qemu-ppc] macio ide question/bug report

2014-05-10 Thread BALATON Zoltan
On Wed, 7 May 2014, Mark Cave-Ayland wrote: On 07/05/14 18:00, BALATON Zoltan wrote: On Wed, 7 May 2014, Mark Cave-Ayland wrote: I'm not sure if your problem related to s-lba == -1 should be solved just for macio or higher up in the block layer, but the block people will be on qemu-devel and

Re: [Qemu-devel] [PATCH 7/8] hw/arm/stellaris: Correct handling of GPTM TAR register

2014-05-10 Thread Peter Crosthwaite
On Fri, May 9, 2014 at 4:46 AM, Peter Maydell peter.mayd...@linaro.org wrote: We don't implement very much of the GPTM TAR register, and what we do is wrong. The are we in RT mode? field is in s-config, not s-control. Correct this, use LOG_UNIMP rather than hw_error() for the cases we don't

Re: [Qemu-devel] [PATCH] migration: catch unknown flags in ram_load

2014-05-10 Thread 陈梁
if a saved vm has unknown flags in the memory data qemu currently simply ignores this flag and continues which yields in an unpredictable result. this patch catches all unknown flags and aborts the loading of the vm. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven p...@kamp.de

[Qemu-devel] [PATCH] arch_init: Simplify code for load_xbzrle()

2014-05-10 Thread Chen Gang
For xbzrle_decode_buffer(), when decoding contents will exceed writing buffer, it will return -1, so need not check the return value whether large than writing buffer. And when failure occurs within load_xbzrle(), it always return -1 without any resources which need release. So can remove the

Re: [Qemu-devel] [PATCH 8/8] hw/arm/omap_gpmc: Avoid buffer overrun filling prefetch FIFO

2014-05-10 Thread Peter Crosthwaite
On Fri, May 9, 2014 at 4:46 AM, Peter Maydell peter.mayd...@linaro.org wrote: In fill_prefetch_fifo(), if the device we are reading from is 16 bit, then we must not try to transfer an odd number of bytes into the FIFO. This could otherwise have resulted in our overrunning the prefetch.fifo

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread Peter Lieven
Am 10.05.2014 13:38, schrieb 陈梁: Hi, The patch is correct. There is a small improved point. /* In doubt sent page as normal */ bytes_sent = -1; @@ -990,16 +996,17 @@ static inline void *host_from_stream_offset(QEMUFile *f,

Re: [Qemu-devel] [PATCH 3/4] block: replace fprintf(stderr, ...) with error_report() in block/

2014-05-10 Thread Peter Crosthwaite
On Sat, May 10, 2014 at 9:55 AM, Le Tan tamlokv...@gmail.com wrote: Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline.

Re: [Qemu-devel] [PATCH 7/8] hw/arm/stellaris: Correct handling of GPTM TAR register

2014-05-10 Thread Peter Maydell
On 10 May 2014 13:33, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Fri, May 9, 2014 at 4:46 AM, Peter Maydell peter.mayd...@linaro.org wrote: We don't implement very much of the GPTM TAR register, and what we do is wrong. The are we in RT mode? field is in s-config, not

Re: [Qemu-devel] uvesafb doesn't work with seabios

2014-05-10 Thread Kevin O'Connor
On Fri, May 09, 2014 at 05:06:21PM +0200, Bernhard Walle wrote: Hello, I'm using QEmu 2.0.0 on a Linux host (x86-64) with a quite special target system that uses uvesafb ('video=uvesafb:1024x768-32'). I get following errors in the target system: uvesafb: Getting mode info block for

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread Paolo Bonzini
Il 10/05/2014 12:51, Peter Lieven ha scritto: we currently look up the ram ptr for each single page. Cache the pointer while we operate on the same block. Why don't you instead cache the result in the MemoryRegion, so that memory_region_get_ram_ptr becomes a simple, inline field access?

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread Peter Lieven
You mean, a) extent the MemoryRegion stuct with a pointer? b) on the first call to memory_region_get_ram_ptr cache the result in the struct? Peter Am 10.05.2014 17:33, schrieb Paolo Bonzini: Il 10/05/2014 12:51, Peter Lieven ha scritto: we currently look up the ram ptr for each single page.

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread Peter Lieven
Am 10.05.2014 17:33, schrieb Paolo Bonzini: Il 10/05/2014 12:51, Peter Lieven ha scritto: we currently look up the ram ptr for each single page. Cache the pointer while we operate on the same block. Why don't you instead cache the result in the MemoryRegion, so that

[Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-10 Thread Jun Li
This patch fixed the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1084302 . path_combine can not calculate the correct full path name for backing_file. Such as: create a snapshot chain: sn2-sn1-$BASE_IMG backing file is : /home/wookpecker/img.qcow2 sn1 : /home/woodpecker/tmp/sn1 sn2

[Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-10 Thread Jun Li
From: Jun Li junm...@gmail.com This patch fixed the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1084302 . path_combine can not calculate the correct full path name for backing_file. Such as: create a snapshot chain: sn2-sn1-$BASE_IMG backing file is : /home/wookpecker/img.qcow2

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-10 Thread Peter Lieven
or even this: diff --git a/include/exec/memory.h b/include/exec/memory.h index 1d55ad9..3003875 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -161,6 +161,7 @@ struct MemoryRegion { unsigned ioeventfd_nb; MemoryRegionIoeventfd *ioeventfds; NotifierList

[Qemu-devel] [PATCH] vfio-pci: Quirk RTL8168 NIC

2014-05-10 Thread Alex Williamson
This device is ridiculous. It has two MMIO BARs, BAR4 and BAR2. BAR4 hosts the MSI-X table, so oviously it would be too easy to access it directly, instead it creates a window register in BAR2 that, among other things, provides access to the MSI-X table. This means MSI-X doesn't work in the

Re: [Qemu-devel] QEMU build broken

2014-05-10 Thread Brad Smith
On 10/05/14 3:07 AM, Paolo Bonzini wrote: Il 10/05/2014 08:45, Brad Smith ha scritto: Having your feature in-tree is a privilege, not a right. You earn it by helping to maintain it. it's not really maintained right now means it has not been earning its keep. You're encouraged to remedy

[Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-10 Thread Jun Li
This patch fixed the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1084302 . path_combine can not calculate the correct full path name for backing_file. Such as: create a snapshot chain: sn2-sn1-$BASE_IMG backing file is : /home/wookpecker/img.qcow2 sn1 : /home/woodpecker/tmp/sn1 sn2

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-10 Thread lijun
On 04/22/2014 05:21 PM, Marcel Apfelbaum wrote: On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref: