Re: [Qemu-devel] Qemu Booting a PC without an MBR?

2013-08-29 Thread Peter Lieven
On 30.08.2013 08:37, Paolo Bonzini wrote: Il 30/08/2013 08:28, Peter Lieven ha scritto: Hi all, today I had the second incidence of a migrated system (copied with DD) to qemu which won't boot. (stuck after booting from harddisk message). Looking at sector 0 I found out that it does not have an

Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling

2013-08-29 Thread Alexey Kardashevskiy
On 08/30/2013 04:39 PM, Paolo Bonzini wrote: > Il 30/08/2013 08:15, Alexey Kardashevskiy ha scritto: What if you just merge the two series together? >> It will still be a function which can accept sections bigger than 2^64 and >> theoretically call int128_get64() and assert. I would think that

Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling

2013-08-29 Thread Paolo Bonzini
Il 30/08/2013 08:15, Alexey Kardashevskiy ha scritto: >> > What if you just merge the two series together? > It will still be a function which can accept sections bigger than 2^64 and > theoretically call int128_get64() and assert. I would think that every time > when anyone calls int128_get64(), t

Re: [Qemu-devel] Qemu Booting a PC without an MBR?

2013-08-29 Thread Paolo Bonzini
Il 30/08/2013 08:28, Peter Lieven ha scritto: > Hi all, > > today I had the second incidence of a migrated system (copied with DD) > to qemu which won't boot. (stuck after booting from harddisk message). > > Looking at sector 0 I found out that it does not have an MBR. It seems > that real hardwa

[Qemu-devel] Qemu Booting a PC without an MBR?

2013-08-29 Thread Peter Lieven
Hi all, today I had the second incidence of a migrated system (copied with DD) to qemu which won't boot. (stuck after booting from harddisk message). Looking at sector 0 I found out that it does not have an MBR. It seems that real hardware and I was told also vmware can cope with this. Is the

Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling

2013-08-29 Thread Alexey Kardashevskiy
On 08/29/2013 06:50 PM, Paolo Bonzini wrote: > Il 29/08/2013 08:58, Alexey Kardashevskiy ha scritto: >> On 08/29/2013 04:29 PM, Paolo Bonzini wrote: >>> Il 29/08/2013 04:26, Alexey Kardashevskiy ha scritto: Right. I was planning to add my IOMMU stuff right before calculating @end. >>> >>>

[Qemu-devel] [PATCH v4] spapr: add "stop-self" RTAS call required to support hot CPU unplug

2013-08-29 Thread Alexey Kardashevskiy
PAPR+ requires two RTAS calls to be supported by the hypervisor in order to allow hotplugging VCPUs from the guest. The "start-cpu" RTAS call was already there but "stop-self" was not. This adds the "stop-self" RTAS call. Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * added MSR clear to

Re: [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node

2013-08-29 Thread Alexey Kardashevskiy
On 08/29/2013 03:30 PM, Andreas Färber wrote: > Am 29.08.2013 06:29, schrieb Alexey Kardashevskiy: >> On 08/16/2013 08:35 AM, Andreas Färber wrote: >>> Instead of relying on cpu_model, obtain the device tree node label >>> per CPU. Use DeviceClass::fw_name when available. This implicitly >>> resolv

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-29 Thread Paolo Bonzini
Il 30/08/2013 05:28, Gary Ching-Pang Lin ha scritto: >> > I tried this out, and I get the black screen as well when ept=n, but it >> > boots >> > successfully to the efi shell when ept=y. >> > >> > Gary, what does 'cat /sys/module/kvm_intel/parameters/ept' report on your >> > failing machine? >>

Re: [Qemu-devel] PCNet-PCI I/O ops byte order

2013-08-29 Thread Paolo Bonzini
Il 29/08/2013 22:56, Oleksandr Tymoshenko ha scritto: > Hello, > > I'm working on QEMU/mips support for FreeBSD. qemu-system-mipsel works > just fine but I ran into a problem with qemu-system-mips. There are two > devices on PCI bus in MALTA machine emulation. ATA IDE controller and > PCNet NIC:

[Qemu-devel] [PATCH v4 09/12] xics: add cpu_setup callback

2013-08-29 Thread Alexey Kardashevskiy
This adds a cpu_setup callback to the XICS device class (as XICS-KVM will do it different), xics_cpu_setup() will call it if it is set. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c| 5 + include/hw/ppc/xics.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/intc/xic

[Qemu-devel] [PATCH v4 10/12] xics-kvm: Support for in-kernel XICS interrupt controller

2013-08-29 Thread Alexey Kardashevskiy
From: David Gibson Recent (host) kernels support emulating the PAPR defined "XICS" interrupt controller system within KVM. This patch allows qemu to initialize and configure the in-kernel XICS, and keep its state in sync with qemu's XICS state as necessary. This should give considerable perform

[Qemu-devel] [PATCH v4 05/12] xics: add pre_save/post_load dispatchers

2013-08-29 Thread Alexey Kardashevskiy
The upcoming support of in-kernel XICS will redefine migration callbacks for both ICS and ICP so classes and callback pointers are added. Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * xics_cpu_setup() movement moved to a separate patch * cpu_setup() callback moved to the "xics split" pat

[Qemu-devel] [PATCH v4 00/12] xics: reworks and in-kernel support

2013-08-29 Thread Alexey Kardashevskiy
Yet another try with XICS and XICS-KVM. v3->v4: Addressed multiple comments from Alex; Split out many tiny patches to make them easier to review; Fixed xics_cpu_setup not to call the parent; And many, many small changes. v2->v3: Addressed multiple comments from Andreas; Added 2 patches for XICS f

[Qemu-devel] [PATCH v4 04/12] xics: replace fprintf with error_report

2013-08-29 Thread Alexey Kardashevskiy
This replaces old-style fprintf with new style error_report. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 539a33a..cc4894d 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@

[Qemu-devel] [PATCH v4 07/12] xics: add missing const specifiers to TypeInfo

2013-08-29 Thread Alexey Kardashevskiy
This adds missing const specifiers to ICS and ICP TypeInfo's. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 2733cb2..5faf598 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@

[Qemu-devel] [PATCH v4 03/12] spapr: move cpu_setup after kvmppc_set_papr

2013-08-29 Thread Alexey Kardashevskiy
This moves the xics_cpu_setup() call after kvmppc_set_papr() in order to get VCPUs initialized as this is required by upcoming XICS-KVM. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c

[Qemu-devel] [PATCH v4 06/12] xics: convert init() to realize()

2013-08-29 Thread Alexey Kardashevskiy
This fixes XICS according new QOM rules. This converts ICS's init() callbacks to realize(). This converts legacy qdev_init_nofail() to property_set(realized). Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * bits which add "const" to TypeInfo were moved to a separate patch v3: * ics_real

[Qemu-devel] [PATCH v4 08/12] xics: split to xics and xics-common

2013-08-29 Thread Alexey Kardashevskiy
The upcoming XICS-KVM support will use bits of emulated XICS code. So this introduces new level of hierarchy - "xics-common" class. Both emulated XICS and XICS-KVM will inherit from it and override class callbacks when required. The new "xics-common" class implements: 1. replaces static "nr_irqs"

[Qemu-devel] [PATCH v4 02/12] xics: move reset and cpu_setup

2013-08-29 Thread Alexey Kardashevskiy
This simple change makes following patches nicer. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 72 +- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 31868c4..539a33a 100644

[Qemu-devel] [PATCH v4 11/12] xics: Implement H_IPOLL

2013-08-29 Thread Alexey Kardashevskiy
From: Benjamin Herrenschmidt This adds support for the H_IPOLL hypercall which the guest uses to poll for a pending interrupt. This hypercall is mandatory for PAPR+ and there is no way for the guest to detect whether it is supported or not so just add it. Signed-off-by: Benjamin Herrenschmidt S

[Qemu-devel] [PATCH v4 12/12] xics: Implement H_XIRR_X

2013-08-29 Thread Alexey Kardashevskiy
From: Benjamin Herrenschmidt This implements H_XIRR_X hypercall in addition to H_XIRR as it is mandatory for PAPR+ and there is no way for the guest to detect whether it is supported or not so just add it. As the Partition Adjunct Option is not supported at the moment, the CPPR parameter of the

[Qemu-devel] [PATCH v4 01/12] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-08-29 Thread Alexey Kardashevskiy
From: David Gibson Recent PowerKVM allows the kernel to intercept some RTAS calls from the guest directly. This is used to implement the more efficient in-kernel XICS for example. qemu is still responsible for assigning the RTAS token numbers however, and needs to tell the kernel which RTAS fun

Re: [Qemu-devel] [RFC 4/5] hw/arm/digic: add UART support

2013-08-29 Thread Peter Crosthwaite
Hi Antony, On Thu, Aug 29, 2013 at 7:33 PM, Antony Pavlov wrote: > Signed-off-by: Antony Pavlov > --- > hw/arm/digic.c| 3 + > hw/char/Makefile.objs | 1 + > hw/char/digic-uart.c | 207 > ++ > 3 files changed, 211 insertions(+) > cr

Re: [Qemu-devel] [RFC 1/5] target-arm: add ARM946E-S CPU

2013-08-29 Thread Peter Crosthwaite
On Fri, Aug 30, 2013 at 4:17 AM, Antony Pavlov wrote: > On Thu, 29 Aug 2013 11:44:38 +0100 > Peter Maydell wrote: > >> On 29 August 2013 10:33, Antony Pavlov wrote: >> > This is slightly altered version of ARM946E-S CPU code >> > from EOS QEMU (Magic Lantern project) so nearly all >> > credits g

Re: [Qemu-devel] [RFC 2/5] hw/arm: add very initial support for Canon DIGIC SoC

2013-08-29 Thread Peter Crosthwaite
Hi, On Fri, Aug 30, 2013 at 6:16 AM, Peter Maydell wrote: > > On 29 August 2013 20:36, Antony Pavlov wrote: > > On Thu, 29 Aug 2013 14:15:40 +0200 > > Andreas Färber wrote: > >> DigicState should be a QOM type derived from TYPE_DEVICE. Since you're > >> hardcoding the CPU type, please use obje

Re: [Qemu-devel] [RFC] aio: add aio_context_acquire() and aio_context_release()

2013-08-29 Thread Wenchao Xia
于 2013-8-27 22:39, Stefan Hajnoczi 写道: > It can be useful to run an AioContext from a thread which normally does > not "own" the AioContext. For example, request draining can be > implemented by acquiring the AioContext and looping aio_poll() until all > requests have been completed. > > The foll

Re: [Qemu-devel] [PATCHv2] aio / timers: use g_usleep() not sleep()

2013-08-29 Thread Stefan Weil
Am 30.08.2013 00:32, schrieb Alex Bligh: > sleep() apparently doesn't exist under mingw. Use g_usleep for > portability. > > Signed-off-by: Alex Bligh > --- > tests/test-aio.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/test-aio.c b/tests/test-aio.c > i

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-29 Thread Gary Ching-Pang Lin
On Fri, Aug 30, 2013 at 02:04:40AM +1000, Bruce Rogers wrote: > >>> On 8/29/2013 at 02:23 AM, Gary Ching-Pang Lin wrote: > > On Wed, Aug 28, 2013 at 02:55:26PM +0200, Andreas Färber wrote: > >> Am 28.08.2013 14:10, schrieb Laszlo Ersek: > >> > On 08/28/13 13:49, Andreas Färber wrote: > >> >> Am

[Qemu-devel] [PATCH V11 10/11] NUMA: add qmp command query-numa

2013-08-29 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 65 qapi-schema.json | 36 +++ qmp-commands.hx | 49 ++ 3 fil

[Qemu-devel] [PATCH V11 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-29 Thread Wanlong Gao
These are used to generate stuff for OptsVisitor. Reviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- qapi-schema.json | 47 +++ 1 file changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..11851a1 100644 ---

[Qemu-devel] [PATCH V11 05/11] NUMA: Add numa_info structure to contain numa nodes info

2013-08-29 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8 ++

[Qemu-devel] [PATCH V11 07/11] NUMA: set guest numa nodes memory policy

2013-08-29 Thread Wanlong Gao
Set the guest numa nodes memory policies using the mbind(2) system call node by node. After this patch, we are able to set guest nodes memory policies through the QEMU options, this arms to solve the guest cross nodes memory access performance issue. And as you all know, if PCI-passthrough is used,

[Qemu-devel] [PATCH V11 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-29 Thread Wanlong Gao
As you know, QEMU can't direct it's memory allocation now, this may cause guest cross node access performance regression. And, the worse thing is that if PCI-passthrough is used, direct-attached-device uses DMA transfer between device and qemu process. All pages of the guest will be pinned by get_u

[Qemu-devel] [PATCH V11 11/11] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-08-29 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index ae695b0..2d878c6 100644 --- a/hmp.c +++ b/hmp.c @@ -27

[Qemu-devel] [PATCH V11 04/11] NUMA: move numa related code to numa.c

2013-08-29 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 - include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 76 + vl.c| 57 + 5 files chang

[Qemu-devel] [PATCH V11 08/11] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-08-29 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c | 62 ++

[Qemu-devel] [PATCH V11 06/11] NUMA: parse guest numa nodes memory policy

2013-08-29 Thread Wanlong Gao
The memory policy setting format is like: policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N And we are adding this setting as a suboption of "-numa mem,", the memory policy then can be set like following: -numa node,nodeid=0,cpus=0 \ -numa node,nodeid=1,cpus=1

[Qemu-devel] [PATCH V11 02/11] NUMA: split -numa option

2013-08-29 Thread Wanlong Gao
Change -numa option like following as Paolo suggested: -numa node,nodeid=0,cpus=0-1 \ -numa mem,nodeid=0,size=1G This new option will make later coming memory hotplug better. And this new option is implemented using OptsVisitor. And just remain "-numa node,mem=xx" as legacy. Reviewed-by:

[Qemu-devel] [PATCH V11 03/11] NUMA: check if the total numa memory size is equal to ram_size

2013-08-29 Thread Wanlong Gao
If the total number of the assigned numa nodes memory is not equal to the assigned ram size, it will write the wrong data to ACPI talb, then the guest will ignore the wrong ACPI table and recognize all memory to one node. It's buggy, we should check it to ensure that we write the right data to ACPI

[Qemu-devel] [PATCH V11 09/11] NUMA: add hmp command set-mem-policy

2013-08-29 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx | 16 ++ h

Re: [Qemu-devel] [PATCH V2 1/3] qemu-iotests: add unix socket help program

2013-08-29 Thread Wenchao Xia
于 2013-8-29 22:50, Luiz Capitulino 写道: On Tue, 27 Aug 2013 10:52:09 +0800 Wenchao Xia wrote: This program can do a sendmsg call to transfer fd with unix socket, which is not supported in python2. The built binary will not be deleted in clean, but it is a existing issue in ./tests, which shoul

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-29 Thread Lei Li
Patch posted: http://patchwork.ozlabs.org/patch/270084/ -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1216368 Title: unsupported screen resolution crashes sdl-qemu Status in QEMU: New Bug desc

Re: [Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help

2013-08-29 Thread Wenchao Xia
于 2013-8-29 22:16, Luiz Capitulino 写道: On Tue, 27 Aug 2013 20:38:12 +0800 Wenchao Xia wrote: This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global variables are not directly used in those functions any more.

Re: [Qemu-devel] [PATCH v3 6/8] xics-kvm: Support for in-kernel XICS interrupt controller

2013-08-29 Thread Anthony Liguori
Alexey Kardashevskiy writes: > From: David Gibson > > Recent (host) kernels support emulating the PAPR defined "XICS" interrupt > controller system within KVM. This patch allows qemu to initialize and > configure the in-kernel XICS, and keep its state in sync with qemu's XICS > state as necessa

[Qemu-devel] [PATCH 5/6] linux-user: add support of binfmt_misc 'O' flag

2013-08-29 Thread Laurent Vivier
The binfmt_misc module can calculate the credentials and security token according to the binary instead of to the interpreter if the 'C' flag is enabled. To be able to execute non-readable binaries, this flag implies 'O' flag. When 'O' flag is enabled, bintfmt_misc opens the file for reading and p

[Qemu-devel] [PATCH 6/6] scripts: create a template to use with lxc-create

2013-08-29 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- scripts/lxc-cross-debian | 353 +++ 1 file changed, 353 insertions(+) create mode 100755 scripts/lxc-cross-debian diff --git a/scripts/lxc-cross-debian b/scripts/lxc-cross-debian new file mode 100755 index 000..ad

[Qemu-devel] [PATCH 3/6] linux-user: allow use of TIOCGSID

2013-08-29 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/ioctls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 439c2a9..7381012 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -20,6 +20,7 @@ IOCTL(TIOCSCTTY, 0, TYPE_INT) IOCTL(T

[Qemu-devel] [PATCH 4/6] linux-user: add some IPV6 commands in setsockop()

2013-08-29 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 20 1 file changed, 20 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9acc4f5..b32bff0 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1315,6 +1315,26 @@ static abi_long d

[Qemu-devel] [PATCH 1/6] linux-user: convert /proc/net/route when endianess differs

2013-08-29 Thread Laurent Vivier
This patch allows to have IP addresses in correct order in the case of "netstat -nr" when the endianess of the guest differs from one of the host. For instance, an m68k guest on an x86_64 host: WITHOUT this patch: $ netstat -nr Kernel IP routing table Destination Gateway Genmask

[Qemu-devel] [PATCH 0/6] linux-user: Misc patches for linux container compatibility

2013-08-29 Thread Laurent Vivier
I bring with me this serie of patches for some months now. They allow to boot and use a linux-user mode qemu in a linux container. Some of them have been already sent to the mailing list with no result. Please review, comments are welcome, and apply. Laurent Vivier (6): linux-user: convert /pr

[Qemu-devel] [PATCH 2/6] linux-user: Add setsockopt(SO_ATTACH_FILTER)

2013-08-29 Thread Laurent Vivier
This is needed to be able to run dhclient. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 44 linux-user/syscall_defs.h | 12 2 files changed, 56 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

Re: [Qemu-devel] [RFC 2/5] hw/arm: add very initial support for Canon DIGIC SoC

2013-08-29 Thread Condello
On Thu, Aug 29, 2013 at 11:33 AM, Antony Pavlov wrote: > diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak > index ac0815d..0d1d783 100644 > --- a/default-configs/arm-softmmu.mak > +++ b/default-configs/arm-softmmu.mak > @@ -63,6 +63,7 @@ CONFIG_FRAMEBUFFER=y > CONFIG

[Qemu-devel] PCNet-PCI I/O ops byte order

2013-08-29 Thread Oleksandr Tymoshenko
Hello, I'm working on QEMU/mips support for FreeBSD. qemu-system-mipsel works just fine but I ran into a problem with qemu-system-mips. There are two devices on PCI bus in MALTA machine emulation. ATA IDE controller and PCNet NIC: hw/ide/pci.c and hw/net/pcnet-pci.c respectively. Problem is I/O

[Qemu-devel] Fwd: Direct guest device access from nested guest

2013-08-29 Thread Aaron Fabbri
Sorry. Resending in plain text. (Gmail). -- Forwarded message -- Has anyone considered a paravirt approach? That is: Guest kernel: Write a new IOMMU API back end which does KVM hypercalls. Exposes VFIO to guest user processes (nested VMs) as usual. Host kernel: KVM does thin

Re: [Qemu-devel] Direct guest device access from nested guest

2013-08-29 Thread Aaron Fabbri
Has anyone considered a paravirt approach? That is: Guest kernel: Write a new IOMMU API back end which does KVM hypercalls. Exposes VFIO to guest user processes (nested VMs) as usual. Host kernel: KVM does things like collapse {guest_va -> guest_pa -> host_pa} mappings to {guest_va -> host_pa}

Re: [Qemu-devel] [PATCH v4 16/21] qemu-img: add a "map" subcommand

2013-08-29 Thread Eric Blake
On 08/29/2013 08:00 AM, Paolo Bonzini wrote: > This command dumps the metadata of an entire chain, in either tabular or JSON > format. > > Signed-off-by: Paolo Bonzini > --- > qemu-img-cmds.hx | 6 ++ > qemu-img.c | 191 > +++ > 2 file

Re: [Qemu-devel] [PULL 0/6] kdump patches for s390x/kvm

2013-08-29 Thread Alexander Graf
On 29.08.2013, at 23:10, Christian Borntraeger wrote: > Alex, can you either Ack or Pull the following patches: Patch 1 needs some rework. Patches 2-6 are: Acked-by: Alexander Graf Alex > > The following changes since commit 951fab990db05d47ab9da5e72521e406c73a3eb9: > > target-mips: fi

Re: [Qemu-devel] [PATCH] aio / timers: use g_usleep() not sleep()

2013-08-29 Thread Alex Bligh
On 29 Aug 2013, at 19:38, Stefan Weil wrote: >> >> -sleep(1); >> +g_usleep(1*G_USEC_PER_SEC); > > Although checkpatch.pl does not complain, I'd prefer a blank before > and after operators like "*". > > Here a simple g_usleep(G_USEC_PER_SEC) would be even better. Prefer 1 as it's then

[Qemu-devel] [PATCHv2] aio / timers: use g_usleep() not sleep()

2013-08-29 Thread Alex Bligh
sleep() apparently doesn't exist under mingw. Use g_usleep for portability. Signed-off-by: Alex Bligh --- tests/test-aio.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-aio.c b/tests/test-aio.c index 4215701..c4fe0fc 100644 --- a/tests/test-aio.c +++ b/t

[Qemu-devel] [PULL 5/6] s390: Implement load normal reset

2013-08-29 Thread Christian Borntraeger
kdump on s390 uses a load normal reset to bring the system in a defined state by doing a subsystem reset. The issuing CPUs will have an initial CPU reset, all other CPUs will have a CPU reset as defined in POP (no register content will change). Implement this as architectured. Signed-off-by: Chri

Re: [Qemu-devel] [PULL 1/6] s390/kvm: basic implementation of diagnose 308 subcode 6

2013-08-29 Thread Alexander Graf
On 29.08.2013, at 23:10, Christian Borntraeger wrote: > From: "Eugene (jno) Dvurechenski" > > Linux uses a check for subcode 6 to decide if other subcodes are > available. Provide a minimal implementation. > > Signed-off-by: Eugene (jno) Dvurechenski > Reviewed-by: Cornelia Huck > Signed-off

[Qemu-devel] [PATCH v2 6/7] tcg: Introduce zero and sign-extended versions of load helpers

2013-08-29 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/exec/softmmu_template.h | 58 - tcg/i386/tcg-target.c | 6 ++--- tcg/tcg.h | 21 ++- 3 files changed, 64 insertions(+), 21 deletions(-) diff --git a/include/exec/soft

[Qemu-devel] [PATCH v2 7/7] tcg-i386: Make use of zero-extended memory helper routines

2013-08-29 Thread Richard Henderson
For 8 and 16-bit unsigned loads, rely on the zero-extension from the helper and use a smaller 32-bit move insn. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-targ

[Qemu-devel] [PATCH v2 2/7] tcg-i386: Don't perform GETPC adjustment in TCG code

2013-08-29 Thread Richard Henderson
Since we now perform it inside the helper, no need to do it here. This also lets us perform a tail-call from the store slow path to the helper. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) d

[Qemu-devel] [PATCH v2 5/7] exec: Split softmmu_defs.h

2013-08-29 Thread Richard Henderson
The _cmmu helpers can be moved to exec-all.h. The helpers that are used from TCG will shortly need access to tcg_target_long so move their declarations into tcg.h. This requires minor include adjustments to all TCG backends. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 5

[Qemu-devel] [PATCH v2 4/7] target: Include softmmu_exec.h where forgotten

2013-08-29 Thread Richard Henderson
Several targets forgot to include softmmu_exec.h, which would break them with a header cleanup to follow. Signed-off-by: Richard Henderson --- target-lm32/op_helper.c | 2 ++ target-moxie/helper.c| 1 + target-ppc/mmu_helper.c | 2 ++ target-unicore32/op_helper.c | 2 ++ target

[Qemu-devel] [PATCH v2 1/7] exec: Reorganize the GETRA/GETPC macros

2013-08-29 Thread Richard Henderson
Always define GETRA; use __builtin_extract_return_addr, rather than having a special case for s390. Split GETPC_ADJ out of GETPC; use 2 universally, rather than having a special case for arm. Rename GETPC_LDST to GETRA_LDST to indicate that it does not contain the GETPC_ADJ value. Likewise with

[Qemu-devel] [PATCH v2 3/7] exec: Rename USUFFIX to LSUFFIX

2013-08-29 Thread Richard Henderson
In a following patch, there will be confusion between multiple "unsigned" suffixes; rename this one so as to imply "load". Signed-off-by: Richard Henderson --- include/exec/softmmu_template.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/exec/softmmu_te

[Qemu-devel] [PATCH v2 0/7] Further tcg ldst improvements

2013-08-29 Thread Richard Henderson
Changes from v1 to v2: * Rebased vs master, fixing minor conflicts. * Dropped the tail-call from qemu_ld slow path to helper, as discussed wrt not constraining the ld output register. The patch set is available at git://github.com/rth7680/qemu.git tcg-ool-2 r~ Richard Henderson (7):

[Qemu-devel] [PATCH v2 02/18] tcg: Change flush_icache_range arguments to uintptr_t

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 3 +-- tcg/arm/tcg-target.h | 9 - tcg/hppa/tcg-target.h| 3 +-- tcg/i386/tcg-target.h| 3 +-- tcg/ia64/tcg-target.h| 3 +-- tcg/mips/tcg-target.h| 3 +-- tcg/s390/tcg-ta

Re: [Qemu-devel] [PATCH v4 15/21] block: return BDRV_BLOCK_ZERO past end of backing file

2013-08-29 Thread Eric Blake
On 08/29/2013 08:00 AM, Paolo Bonzini wrote: > If the sectors are unallocated and we are past the end of the > backing file, they will read as zero. > > Signed-off-by: Paolo Bonzini > --- > block.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v2 07/18] tcg: Define TCG_ptr properly

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index 0c4c60e..98b487e 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -643,11 +643,11 @@ do {\ void tcg_add_target_add_op_defs(

[Qemu-devel] [PATCH v2 14/18] tcg: Use appropriate types in tcg_reg_alloc_call

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index c93ed9e..73f4c13 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2046,7 +2046,9 @@ static int tcg_reg_alloc_call(TCGContext *s,

Re: [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_allocated

2013-08-29 Thread Eric Blake
On 08/29/2013 08:00 AM, Paolo Bonzini wrote: Subject line mentions bdrv_co_is_allocated, but patch body deals with bdrv_is_allocated. > Some bdrv_is_allocated callers do not expect errors, but the fallback > in qcow2.c might make other callers trip on assertion failures or > infinite loops. > >

Re: [Qemu-devel] qemu-user + networking issues / segfaults

2013-08-29 Thread Christof Schulze
Am Samstag, 24. August 2013, 00:21:57 schrieb Christof Schulze: > Hello qemu-devel list, > This is my first post to this list and I am not sure whether this > actually is the correct Mailinglist. I recently compiled qemu-1.6.0 > on an arm platform for the purpose of running the binary only > otrd

[Qemu-devel] [PATCH v2 08/18] tcg: Change frame pointer offsets to intptr_t

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 5 ++--- tcg/tcg.h | 9 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index eac8bd2..f6fa226 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -306,8 +306,7 @@ void tcg_prologue_

[Qemu-devel] [PULL 4/6] s390/cpu: split CPU reset into architectured functions

2013-08-29 Thread Christian Borntraeger
s390 provides several CPU resets: - CPU reset, clears interrupts, stop processing, clears TLB, but does not touch registers - initial CPU reset, like CPU reset, but also clears PSW, prefix, FPC, timer and control registers. It does not touch gprs, fprs and acrs (!) - Power on reset: the full mo

Re: [Qemu-devel] [PATCH 1/6] osdep: Create qemu_getauxval and qemu_init_auxval

2013-08-29 Thread Aurelien Jarno
On Sat, Aug 17, 2013 at 03:38:03PM -0700, Richard Henderson wrote: > Abstract away dependence on a system implementation of getauxval. > > Signed-off-by: Richard Henderson > --- > include/qemu/osdep.h | 20 > linux-user/main.c| 1 + > util/Makefile.objs | 1 + > util/getauxv

[Qemu-devel] [PATCH v2 16/18] tcg-i386: Use intptr_t appropriately

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 70e80f9..247c9d2 100644 --- a/tcg/i386/tcg-ta

[Qemu-devel] [PULL 6/6] s390: wire up nmi command to raise a RESTART interrupt on S390

2013-08-29 Thread Christian Borntraeger
From: "Eugene (jno) Dvurechenski" There is the 'nmi' command that is used to trigger a guest dump via kdump feature on x86. s390 uses RESTART interrupt to trigger kdump. So, this patch provides a mean to use 'nmi' command on s390 to raise RESTART interrupt. The CPU to receive the RESTART inter

[Qemu-devel] [PULL 3/6] s390: provide a cpu load normal function

2013-08-29 Thread Christian Borntraeger
Some code needs to perform an IPL-like bootup that mimics the ESA (31bit) restart. Provide a cpu class method that does so. Signed-off-by: Christian Borntraeger --- target-s390x/cpu-qom.h | 2 ++ target-s390x/cpu.c | 14 ++ target-s390x/cpu.h | 3 +++ 3 files changed, 19 in

[Qemu-devel] [PATCH v2 18/18] configure: Allow x32 as a host

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- configure | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 0a55c20..af6b048 100755 --- a/configure +++ b/configure @@ -362,7 +362,11 @@ if test ! -z "$cpu"

Re: [Qemu-devel] [PATCH v3 0/3] tcg/mips: host detection

2013-08-29 Thread Richard Henderson
On 08/29/2013 01:51 PM, Aurelien Jarno wrote: > Aurelien Jarno (3): > tcg/mips: detect available host instructions at runtime > tcg/mips: inline bswap16/bswap32 ops > tcg/mips: only enable ext8s/ext16s ops on MIPS32R2 Reviewed-by: Richard Henderson r~

[Qemu-devel] [PATCH v2 13/18] tcg: Change tcg_out_ld/st offset to intptr_t

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 4 ++-- tcg/arm/tcg-target.c | 4 ++-- tcg/hppa/tcg-target.c| 4 ++-- tcg/i386/tcg-target.c| 4 ++-- tcg/ia64/tcg-target.c| 4 ++-- tcg/mips/tcg-target.c| 4 ++-- tcg/ppc/tcg-target.c

[Qemu-devel] [PATCH v2 11/18] tcg: Use uintptr_t in TCGHelperInfo

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 6 +++--- tcg/tcg.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index b205f02..27b1f5c 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -634,7 +634,7 @@ void tcg_register_helper

[Qemu-devel] [PULL 2/6] s390: provide I/O subsystem reset

2013-08-29 Thread Christian Borntraeger
Provide a function that resets the I/O subsystem. Signed-off-by: Christian Borntraeger --- hw/s390x/s390-virtio-ccw.c | 15 +++ target-s390x/cpu.h | 1 + 2 files changed, 16 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index aebbbf1..8f

[Qemu-devel] [PATCH v2 10/18] tcg: Change relocation offsets to intptr_t

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 2 +- tcg/arm/tcg-target.c | 8 tcg/hppa/tcg-target.c| 6 +++--- tcg/i386/tcg-target.c| 2 +- tcg/ia64/tcg-target.c| 14 +++--- tcg/mips/tcg-target.c| 16 -

[Qemu-devel] [PATCH v2 12/18] tcg: Change tcg_gen_exit_tb argument to uintptr_t

2013-08-29 Thread Richard Henderson
And update all users. Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 4 ++-- target-alpha/translate.c | 8 target-arm/translate.c| 2 +- target-cris/translate.c | 2 +- target-i386/translate.c | 2 +- target-lm3

[Qemu-devel] [PATCH v2 17/18] tcg-i386: Adjust tcg_out_tlb_load for x32

2013-08-29 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 41 +++-- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 247c9d2..cde134f 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-tar

[Qemu-devel] [PULL 1/6] s390/kvm: basic implementation of diagnose 308 subcode 6

2013-08-29 Thread Christian Borntraeger
From: "Eugene (jno) Dvurechenski" Linux uses a check for subcode 6 to decide if other subcodes are available. Provide a minimal implementation. Signed-off-by: Eugene (jno) Dvurechenski Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 46 +++

[Qemu-devel] [PULL 0/6] kdump patches for s390x/kvm

2013-08-29 Thread Christian Borntraeger
Alex, can you either Ack or Pull the following patches: The following changes since commit 951fab990db05d47ab9da5e72521e406c73a3eb9: target-mips: fix get_physical_address() #if 0 build error (2013-08-28 19:28:02 +0200) are available in the git repository at: git://github.com/borntraeger/qe

[Qemu-devel] [PATCH v2 15/18] tcg: Fix jit debug for x32

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 73f4c13..5e6e323 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -49,10 +49,10 @@ #include "tcg-op.h" -#if TCG_TARG

[Qemu-devel] [PATCH v2 03/18] tcg: Change tcg_qemu_tb_exec return to uintptr_t

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- cpu-exec.c | 2 +- tcg/ppc/tcg-target.h | 2 +- tcg/tcg.h| 3 +-- tcg/tci/tcg-target.h | 2 +- tci.c| 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cpu-exec.c b/cpu-exe

[Qemu-devel] [PATCH v2 09/18] tcg: Change memory offsets to intptr_t

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 16 +--- tcg/tcg.h | 8 +++- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index f6fa226..5970185 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -389,7 +389,7 @@ TCGv_

[Qemu-devel] [PATCH v2 06/18] tcg: Define TCG_TYPE_PTR properly

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index b26e557..0c4c60e 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -176,9 +176,12 @@ typedef enum TCGType { TCG_TYPE_RE

[Qemu-devel] [PATCH v2 01/18] qtest: Fix FMT_timeval vs time_t

2013-08-29 Thread Richard Henderson
Since FMT_timeval unconditionally uses %ld for both tv_sec and tv_usec, and already casts tv_usec to long, also cast tv_sec to long. Cc: Andreas Färber Signed-off-by: Richard Henderson --- qtest.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qtest.c b/qtest.c inde

[Qemu-devel] [PATCH v2 05/18] tcg: Allow TCG_TARGET_REG_BITS to be specified independantly

2013-08-29 Thread Richard Henderson
There are several hosts for which it would be useful to use the available 64-bit registers in a 32-bit pointer environment. Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/hppa/tcg-target.c | 4 tcg/hppa/tcg-target.h | 4 tcg/i386/tcg-target.h | 10 ++

[Qemu-devel] [PATCH v2 00/18] tcg: decouple tcg_target_long from pointer size

2013-08-29 Thread Richard Henderson
Changes v1-v2: * Rebased vs master, resolving trivial conflicts * Added a comment in patch 17, as requested during review * For patch 1, Andreas and I appear to disagree on which change is more appropriate. I did re-word the commit message to better explain my rationale, but I did

[Qemu-devel] [PATCH v2 04/18] tcg: Fix next_tb type in cpu_exec

2013-08-29 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- cpu-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu-exec.c b/cpu-exec.c index 14af2ed..5a43995 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -209,7 +209,7 @@ int cpu_exec(CPUArchState *env) int ret

  1   2   3   4   >