[Qemu-devel] ELF loader?

2015-06-07 Thread Liviu Ionescu
while debugging my Cortex-M code I added a trace in the ELF loader and I noticed an odd thing: cortexm_mcu_image_load() Load 10012 bytes at 0x0800-0x0800271B. Load132 bytes at 0x0800271C-0x0800279F. Load704 bytes at 0x2084-0x2343. <--- Cortex-M3 core initialised. the first

Re: [Qemu-devel] [PATCH] block: allow write-threshold on device name

2015-06-07 Thread Amos Kong
On Sun, Jun 7, 2015 at 9:38 AM, Eric Blake wrote: > > Commit e2462113 allowed the ability to fire an event if a BDS > node exceeds a threshold during a write, but limited the option > to only work on node names. For convenience, expand this to > allow a device name as a way to set the threshold o

Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury

2015-06-07 Thread Peter Crosthwaite
On Tue, May 26, 2015 at 1:24 AM, Peter Maydell wrote: > On 26 May 2015 at 09:01, Peter Crosthwaite > wrote: >> On Tue, May 26, 2015 at 12:18 AM, Peter Maydell >> wrote: >>> On 26 May 2015 at 06:49, Peter Crosthwaite >>> wrote: From: Peter Crosthwaite The "arm" variant for this

[Qemu-devel] [PATCH v5] i386: Introduce ARAT CPU feature

2015-06-07 Thread Jan Kiszka
From: Jan Kiszka ARAT signals that the APIC timer does not stop in power saving states. As our APICs are emulated, it's fine to expose this feature to guests, at least when asking for KVM host features or with CPU types that include the flag. The exact model number that introduced the feature is

Re: [Qemu-devel] [PATCH 4/4] i386/acpi-build: build_crs(): fetch BAR from PCI config space directly

2015-06-07 Thread Michael S. Tsirkin
On Sat, Jun 06, 2015 at 01:46:29AM +0200, Laszlo Ersek wrote: > OVMF downloads the ACPI linker/loader script from QEMU when the edk2 PCI > Bus driver globally signals the firmware that PCI enumeration and resource > allocation have completed. At this point QEMU regenerates the ACPI payload > in an

Re: [Qemu-devel] [PATCH 3/4] i386/acpi: add XSDT

2015-06-07 Thread Michael S. Tsirkin
On Fri, Jun 05, 2015 at 10:38:24AM +0800, Shannon Zhao wrote: > > > On 2015/6/5 0:21, Michael S. Tsirkin wrote: > > At the moment it mirrors RSDT exactly. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > include/hw/acpi/acpi-defs.h | 15 --- > > include/hw/acpi/aml-build.h |

Re: [Qemu-devel] [PATCH 4/4] acpi: unify rsdp generation

2015-06-07 Thread Michael S. Tsirkin
On Fri, Jun 05, 2015 at 10:47:16AM +0800, Shannon Zhao wrote: > > > On 2015/6/5 0:21, Michael S. Tsirkin wrote: > > Now that both i386 and arm use v2 tables, > > use common code for both. > > > > Warning: untested. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > include/hw/acpi/aml-buil

Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury

2015-06-07 Thread Peter Maydell
On 7 June 2015 at 09:49, Peter Crosthwaite wrote: > OK I am at the bottom of it. The case statement only handles the base > arch and the host arch not the actual target arch. Aha. > This means the > "arm)" case is all that is called for aarch64 target. the "aarch64)" > case in existing code is p

Re: [Qemu-devel] ELF loader?

2015-06-07 Thread Peter Maydell
On 7 June 2015 at 09:19, Liviu Ionescu wrote: > while debugging my Cortex-M code I added a trace in the ELF loader and I > noticed an odd thing: > > cortexm_mcu_image_load() > Load 10012 bytes at 0x0800-0x0800271B. > Load132 bytes at 0x0800271C-0x0800279F. > Load704 bytes at 0x20

[Qemu-devel] Can emulated PCI device support Virtual Functions?

2015-06-07 Thread Dotan Barak
Hi. >From reading the QEMU source code, I can see that it can emulate native PCI device(s). I wonder, can such emulated PCI device support SR-IOV and expose Virtual Functions? Those Virtual Functions will be used in a nested virtualization and assigned to the most inner Virtual Machines. Thanks

[Qemu-devel] Can emulated PCI device support Virtual Functions?

2015-06-07 Thread Dotan Barak
Hi all. >From reading the QEMU source code, I can see that it can emulate native PCI device(s). I wonder, can such emulated PCI device support SR-IOV and expose Virtual Functions? If Virtual Functions are supported, can they be used in a nested virtualization and assigned to the most inner Virt

Re: [Qemu-devel] [edk2] [PATCH] OvmfPkg/PlatformPei: Initialise RCBA (B0:D31:F0 0xf0) register

2015-06-07 Thread Paulo Alcantara
On Sat, 06 Jun 2015 22:13:21 -0700 Jordan Justen wrote: > On 2015-06-06 12:10:03, Paulo Alcantara wrote: > > This patch initialises root complex register block BAR in order to > > support TCO watchdog emulation features (e.g. reboot upon NO_REBOOT > > bit not set) on QEMU. > > > > Contributed-un

[Qemu-devel] [PATCH v2] OvmfPkg/PlatformPei: Initialise RCBA (B0:D31:F0 0xf0) register

2015-06-07 Thread Paulo Alcantara
This patch initialises root complex register block BAR in order to support TCO watchdog emulation features (e.g. reboot upon NO_REBOOT bit not set) on QEMU. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara --- OvmfPkg/Include/IndustryStandard/Q35MchIch9.h |

Re: [Qemu-devel] ELF loader?

2015-06-07 Thread Liviu Ionescu
> On 07 Jun 2015, at 13:46, Peter Maydell wrote: > > On 7 June 2015 at 09:19, Liviu Ionescu wrote: >> while debugging my Cortex-M code I added a trace in the ELF loader and I >> noticed an odd thing: >> >> cortexm_mcu_image_load() >> Load 10012 bytes at 0x0800-0x0800271B. >> Load132

[Qemu-devel] Where are i386 flags??

2015-06-07 Thread Davide Ferraretto
Where I can find i386 flags after every instruction??

Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury

2015-06-07 Thread Peter Crosthwaite
On Sun, Jun 7, 2015 at 3:51 AM, Peter Maydell wrote: > On 7 June 2015 at 09:49, Peter Crosthwaite > wrote: >> OK I am at the bottom of it. The case statement only handles the base >> arch and the host arch not the actual target arch. > > Aha. > >> This means the >> "arm)" case is all that is cal

[Qemu-devel] [PATCH v2] memory_mapping: Rework cpu related includes

2015-06-07 Thread Peter Crosthwaite
This makes it more consistent with all other core code files, which either just rely on qemu-common.h inclusion or precede cpu.h with qemu-common.h. cpu-all.h should not be included in addition to cpu.h. Remove it. Signed-off-by: Peter Crosthwaite --- changed since v1: Leave in cpu.h include Pi

Re: [Qemu-devel] [PATCH 09/10 v11] target-tilegx: Generate tcg instructions to finish "Hello world"

2015-06-07 Thread Chen Gang
After thinking of again, for me, I still prefer to keep gen_cntlz() and others, the reason is below: - gen_* (include gen_cntlz) are used in multiple areas, and most gen_* are not single statement. For each gen_*, printing insns is easy (and may be helpful). - decode* is for switch opcod

Re: [Qemu-devel] [RFC v2 02/34] cpu-exec: Purge all uses of CPU_GET_ENV

2015-06-07 Thread Peter Crosthwaite
On Mon, Jun 1, 2015 at 12:03 PM, Richard Henderson wrote: > On 05/30/2015 11:11 PM, Peter Crosthwaite wrote: >> Remove un-needed usages of CPU_GET_ENV by converting the APIs to use >> CPUState pointers and retrieving the env_ptr as minimally needed. >> >> FIXME: apply target-foo change pattern to

Re: [Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyone

2015-06-07 Thread Peter Crosthwaite
On Mon, Jun 1, 2015 at 12:51 AM, Paolo Bonzini wrote: > > > On 31/05/2015 08:11, Peter Crosthwaite wrote: >> In system mode emulation (at least) this definition has no architecture >> specific dependencies. Move it to common code such that common code can >> use it (primarily for defining function

Re: [Qemu-devel] [RFC v2 19/34] HACK: disas: Defeature print_target_address

2015-06-07 Thread Peter Crosthwaite
On Mon, Jun 1, 2015 at 11:55 AM, Richard Henderson wrote: > On 05/30/2015 11:11 PM, Peter Crosthwaite wrote: >> -/* Print address in hex, truncated to the width of a target virtual >> address. */ >> -static void >> -generic_print_target_address(bfd_vma addr, struct disassemble_info *info) >> -{ >

Re: [Qemu-devel] [RFC v2 20/34] HACK: exec: comment out use of cpu_get_tb_cpu_from_state

2015-06-07 Thread Peter Crosthwaite
On Mon, Jun 1, 2015 at 1:09 AM, Paolo Bonzini wrote: > > > On 31/05/2015 08:11, Peter Crosthwaite wrote: >> Not sure as to whether virtualise or not here, just commenting out for >> the moment as watchpoints are nor critical to this RFC. >> >> Signed-off-by: Peter Crosthwaite > > Yes, it should b

Re: [Qemu-devel] [PATCH 3/4] i386/acpi: add XSDT

2015-06-07 Thread Shannon Zhao
On 2015/6/7 17:42, Michael S. Tsirkin wrote: > On Fri, Jun 05, 2015 at 10:38:24AM +0800, Shannon Zhao wrote: >> >> >> On 2015/6/5 0:21, Michael S. Tsirkin wrote: >>> At the moment it mirrors RSDT exactly. >>> >>> Signed-off-by: Michael S. Tsirkin >>> --- >>> include/hw/acpi/acpi-defs.h | 15 +++

Re: [Qemu-devel] [PATCH 4/4] acpi: unify rsdp generation

2015-06-07 Thread Shannon Zhao
On 2015/6/7 17:45, Michael S. Tsirkin wrote: > On Fri, Jun 05, 2015 at 10:47:16AM +0800, Shannon Zhao wrote: >> >> >> On 2015/6/5 0:21, Michael S. Tsirkin wrote: >>> Now that both i386 and arm use v2 tables, >>> use common code for both. >>> >>> Warning: untested. >>> >>> Signed-off-by: Michael S

Re: [Qemu-devel] [PATCH v2] slirp: use less predictable directory name in /tmp for smb config (CVE-2015-4037)

2015-06-07 Thread Miroslav Rezanina
On Tue, Jun 02, 2015 at 08:46:35AM +0300, Michael Tokarev wrote: > In this version I used mkdtemp(3) which is: > > _BSD_SOURCE > || /* Since glibc 2.10: */ > (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) > > (POSIX.1-2008), so should be available on systems we c

Re: [Qemu-devel] On x86 MMU modes

2015-06-07 Thread Sandhya Kumar
Thanks Peter for your response. I notice that *tlb_fill()* is happening only in *softmmu_template.h *and not anywhere else in code base. This means I should expect the TLB itself to be populated here for other code loads to have successful look up later. Am I wrong with my understanding? Even I g

Re: [Qemu-devel] [PATCH] mirror: Skip block_job_defer_to_main_loop if already in the main context

2015-06-07 Thread Fam Zheng
On Fri, 05/29 10:22, Fam Zheng wrote: > mirror_exit does the replacing, which requires source and target to be > in sync, unfortunately we can't guarantee that before we have a complete > block pause mechanism. So for non-dataplane block jobs, let's do the old > thing as pre commit 5a7e7a0ba (block

[Qemu-devel] [PATCH v4 3/3] ppc: Move cpu_exec_init() call to realize function

2015-06-07 Thread Bharata B Rao
Move cpu_exec_init() call from instance_init to realize. This allows any failures from cpu_exec_init() to be handled appropriately. Also add corresponding cpu_exec_exit() call from unrealize. cpu_dt_id assignment from instance_init is no longer needed since correct assignment for cpu_dt_id is alre

[Qemu-devel] [PATCH v4 1/3] cpus: Add Error argument to cpu_exec_init()

2015-06-07 Thread Bharata B Rao
Add an Error argument to cpu_exec_init() to let users collect the error. This is in preparation to change the CPU enumeration logic in cpu_exec_init(). With the new enumeration logic, cpu_exec_init() can fail if cpu_index values corresponding to max_cpus have already been handed out. Since all cur

[Qemu-devel] [PATCH v4 0/3] Bitmap based CPU enumeration

2015-06-07 Thread Bharata B Rao
This patch changes the way cpu_index is handed out to newly created CPUs by tracking the allocted CPUs in a bitmap. More information and the need for this patch is described in patch 2/3 of this series. These generic changes are needed to support CPU hot plug/unplug on PowerPC. There are no functi

[Qemu-devel] [PATCH v4 2/3] cpus: Convert cpu_index into a bitmap

2015-06-07 Thread Bharata B Rao
Currently CPUState.cpu_index is monotonically increasing and a newly created CPU always gets the next higher index. The next available index is calculated by counting the existing number of CPUs. This is fine as long as we only add CPUs, but there are architectures which are starting to support CPU

Re: [Qemu-devel] Cant make the IPMI simulator work, help needed.

2015-06-07 Thread RamakrishnaDeepak Battu
Thank you Corey. I haven't noticed the port 623, I changed it. If I ran this command alone: /usr/local/bin/qemu-system-x86_64 --enable-kvm -nographic -net nic,model=e1000,macaddr=52:54:00:12:34:59 -net user,hostfwd=tcp::-10.0.2.15:22 -chardev socket,id=ipmi0,host=localhost,port=623,reconnect

Re: [Qemu-devel] [PULL 02/17] qmp: Add optional bool "unmap" to drive-mirror

2015-06-07 Thread Fam Zheng
On Fri, 06/05 12:57, Stefan Hajnoczi wrote: > From: Fam Zheng > > If specified as "true", it allows discarding on target sectors where source is > not allocated. > > Signed-off-by: Fam Zheng > Reviewed-by: Paolo Bonzini > Message-id: 1432790990-25383-3-git-send-email-f...@redhat.com > Signed-o

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-07 Thread Jason Wang
On 06/05/2015 09:24 PM, Thibaut Collet wrote: > Add VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev backend is > vhost-user. > > For netdev backend using virtio-net NIC the self announce is managed directly > by the virtio-net NIC and not by the netdev backend itself. > To avoid d

[Qemu-devel] [PATCH v7 0/8] block: Mirror discarded sectors

2015-06-07 Thread Fam Zheng
v7: Fix the lost assignment of s->unmap. v6: Fix pnum in bdrv_get_block_status_above. [Paolo] v5: Rewrite patch 1. Address Eric's comments on patch 3. Add Eric's rev-by to patches 2 & 4. Check BDRV_BLOCK_DATA in patch 3. [Paolo] This fixes the mirror assert failure reported by wangxi

[Qemu-devel] [PATCH v7 1/8] block: Add bdrv_get_block_status_above

2015-06-07 Thread Fam Zheng
Like bdrv_is_allocated_above, this function follows the backing chain until seeing BDRV_BLOCK_ALLOCATED. Base is not included. Reimplement bdrv_is_allocated on top. Signed-off-by: Fam Zheng --- block/io.c| 56 +-- include/block/block

[Qemu-devel] [PATCH v7 3/8] mirror: Do zero write on target if sectors not allocated

2015-06-07 Thread Fam Zheng
If guest discards a source cluster, mirroring with bdrv_aio_readv is overkill. Some protocols do zero upon discard, where it's best to use bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be enough. Signed-off-by: Fam Zheng --- block/mirror.c | 20 ++-- 1 file changed, 18

[Qemu-devel] [PATCH v7 8/8] iotests: Use event_wait in wait_ready

2015-06-07 Thread Fam Zheng
Only poll the specific type of event we are interested in, to avoid stealing events that should be consumed by someone else. Suggested-by: John Snow Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v7 2/8] qmp: Add optional bool "unmap" to drive-mirror

2015-06-07 Thread Fam Zheng
If specified as "true", it allows discarding on target sectors where source is not allocated. Signed-off-by: Fam Zheng --- block/mirror.c| 8 ++-- blockdev.c| 5 + hmp.c | 2 +- include/block/block_int.h | 2 ++ qapi/block-core.json |

[Qemu-devel] [PATCH v7 4/8] block: Fix dirty bitmap in bdrv_co_discard

2015-06-07 Thread Fam Zheng
Unsetting dirty globally with discard is not very correct. The discard may zero out sectors (depending on can_write_zeroes_with_unmap), we should replicate this change to destination side to make sure that the guest sees the same data. Calling bdrv_reset_dirty also troubles mirror job because the

[Qemu-devel] [PATCH v7 6/8] qemu-iotests: Make block job methods common

2015-06-07 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- tests/qemu-iotests/041| 66 ++- tests/qemu-iotests/iotests.py | 28 ++ 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/tests/qemu-iotes

[Qemu-devel] [PATCH v7 5/8] block: Remove bdrv_reset_dirty

2015-06-07 Thread Fam Zheng
Using this function would always be wrong because a dirty bitmap must have a specific owner that consumes the dirty bits and calls bdrv_reset_dirty_bitmap(). Remove the unused function to avoid future misuse. Reviewed-by: Eric Blake Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block.c

[Qemu-devel] [PATCH v7 7/8] qemu-iotests: Add test case for mirror with unmap

2015-06-07 Thread Fam Zheng
This checks that the discard on mirror source that effectively zeroes data is also reflected by the data of target. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/qemu-iotests/132 | 59 ++ tests/qemu-iotests/132.out | 5 tests/qem

Re: [Qemu-devel] [RFC PATCH v0] numa: API to lookup NUMA node by address

2015-06-07 Thread Bharata B Rao
On Mon, May 25, 2015 at 02:42:40PM -0300, Eduardo Habkost wrote: > On Mon, May 25, 2015 at 01:17:57PM +0530, Bharata B Rao wrote: > > On Thu, May 14, 2015 at 11:39:06AM +0200, Paolo Bonzini wrote: > > > On 13/05/2015 20:06, Eduardo Habkost wrote: > > > > Also, this introduces a circular dependency

Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support

2015-06-07 Thread Jason Wang
On 06/05/2015 10:32 PM, Pankaj Gupta wrote: > We use vhostforce to enable vhost even if Guests don't have MSI-X support > and we fall back to QEMU virtio-net. This patch will enable vhost > unconditionally > whenever we have vhostforce='ON' or vhost='ON'. > > Initially, I wanted to remove

Re: [Qemu-devel] [PATCH RFC V3 1/4] Use Aff1 with mpidr This is an improved and KVM-aware alternative to

2015-06-07 Thread Pavel Fedin
Hi! > I think that Pavel's needs to address all the issues in the original thread. Ok. I have read the thread and i'll prepare a fixed version of this shortly. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

Re: [Qemu-devel] [PATCH v3 0/6] qemu: guest agent: implement guest-exec command

2015-06-07 Thread Denis V. Lunev
On 21/05/15 08:49, Denis V. Lunev wrote: These patches for guest-agent add the functionality to execute commands on a guest UNIX machine. These patches add the following interfaces: guest-pipe-open guest-exec guest-exec-status With these interfaces it's possible to: * Open an anonymous pipe a

Re: [Qemu-devel] [PATCH 0/4] qga: disk and volume info for Windows guest

2015-06-07 Thread Denis V. Lunev
On 02/05/15 13:13, Denis V. Lunev wrote: Functionality match with Linux. Patches 1 and 2 are very useful for consistent backups of Windows guests. Signed-off-by: Olga Krishtal Signed-off-by: Denis V. Lunev CC: Michael Roth PING, 1 week till soft freeze. Michael, can you pls consider these