Re: [Qemu-devel] ELF loader?

2015-06-07 Thread Peter Maydell
On 7 June 2015 at 09:19, Liviu Ionescu i...@livius.net 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

[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

[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 peter.mayd...@linaro.org wrote: On 7 June 2015 at 09:49, Peter Crosthwaite peter.crosthwa...@xilinx.com 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

[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

Re: [Qemu-devel] ELF loader?

2015-06-07 Thread Liviu Ionescu
On 07 Jun 2015, at 13:46, Peter Maydell peter.mayd...@linaro.org wrote: On 7 June 2015 at 09:19, Liviu Ionescu i...@livius.net 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

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 peter.crosthwa...@xilinx.com 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

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 jordan.l.jus...@intel.com 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.

[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 pca...@zytor.com ---

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 f...@redhat.com If specified as true, it allows discarding on target sectors where source is not allocated. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id:

[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

[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

[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

[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

[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 f...@redhat.com --- block/mirror.c | 20 ++-- 1

[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 f...@redhat.com --- block/mirror.c| 8 ++-- blockdev.c| 5 + hmp.c | 2 +- include/block/block_int.h | 2 ++

[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 js...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: John Snow js...@redhat.com --- tests/qemu-iotests/iotests.py | 9 ++---

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

[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

[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 f...@redhat.com --- block/io.c| 56 +--

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

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:

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 r...@twiddle.net 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

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

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 pbonz...@redhat.com 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

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 ebl...@redhat.com 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

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 peter.mayd...@linaro.org wrote: On 26 May 2015 at 09:01, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Tue, May 26, 2015 at 12:18 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 26 May 2015 at 06:49, Peter Crosthwaite

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

2015-06-07 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com 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

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 m...@redhat.com --- 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 m...@redhat.com --- include/hw/acpi/aml-build.h

[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 crosthwaite.pe...@gmail.com --- changed since

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 pbonz...@redhat.com 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

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 r...@twiddle.net 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)

[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] [Xen-devel] [PATCH][XSA-126] xen: limit guest control of PCI command register

2015-06-07 Thread Michael S. Tsirkin
On Mon, Apr 20, 2015 at 04:32:12PM +0200, Michael S. Tsirkin wrote: On Mon, Apr 20, 2015 at 03:08:09PM +0100, Jan Beulich wrote: On 20.04.15 at 15:43, m...@redhat.com wrote: On Mon, Apr 13, 2015 at 01:51:06PM +0100, Jan Beulich wrote: On 13.04.15 at 14:47, m...@redhat.com wrote: Can

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 m...@redhat.com --- 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. Tsirkin

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 care

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