Re: [Qemu-devel] [PATCH v2] tcg-i386: Use %gs prefixes for x86_64 GUEST_BASE

2012-10-21 Thread Richard Henderson
On 2012-10-21 14:26, Aurelien Jarno wrote: -if (TCG_TARGET_REG_BITS == 64) { -/* ??? We assume all operations have left us with register - contents that are zero extended. So far this appears to - be true. If we want to enforce this, we can

Re: [Qemu-devel] [PATCH 1/2] tcg/i386: remove suboptimal register shifting

2012-10-21 Thread Richard Henderson
On 2012-10-21 03:28, Aurelien Jarno wrote: Now that CONFIG_TCG_PASS_AREG0 has been removed, it's easier to get an optimal code for the load/store functions. First swap the two registers used in tcg_out_tlb_load() so that the address end-up in the second register instead of the first one.

Re: [Qemu-devel] [PATCH 2/2] tcg/i386: remove ld/st third argument register constraint

2012-10-21 Thread Richard Henderson
On 2012-10-21 03:28, Aurelien Jarno wrote: On x86_64, remove the constraint on the third argument register which is not needed: - For loads the helper arguments are env, addr, mem_idx. The addr value should not be in the two first argument registers as they are used in

Re: [Qemu-devel] [PATCH v3 22/26] Add a fallback bios file search, if -L fails.

2012-10-21 Thread Michael Tokarev
On 20.10.2012 00:43, Jason Baron wrote: From: Jason Baron jba...@redhat.com If -L dir is specified, and qemu does not find the bios file in dir, then the search fails. Add infrastructure such that the search will continue in the default paths, if not found in the -L path. Reviewed-by:

Re: [Qemu-devel] [PATCH v3 22/26] Add a fallback bios file search, if -L fails.

2012-10-21 Thread Peter Maydell
On 21 October 2012 08:26, Michael Tokarev m...@tls.msk.ru wrote: On 20.10.2012 00:43, Jason Baron wrote: +char *qemu_find_file(int type, const char *name) +{ +char *filename; + +/* Try the name as a straight path first */ +if (access(name, R_OK) == 0) { +return

Re: [Qemu-devel] [PATCH v3 20/26] q35: smbus: Remove PCI_STATUS_SIG_SYSTEM_ERROR and PCI_STATUS_DETECTED_PARITY from w1cmask

2012-10-21 Thread Michael S. Tsirkin
On Fri, Oct 19, 2012 at 04:43:38PM -0400, Jason Baron wrote: From: Jan Kiszka jan.kis...@siemens.com Both bits are added to the write-1-to-clear mask by default. As the smbus device does not allow writes at all, we have to remove it from that mask, also to avoid triggering a runtime

Re: [Qemu-devel] [PATCH v3 00/26] q35 qemu support

2012-10-21 Thread Michael S. Tsirkin
On Fri, Oct 19, 2012 at 04:43:25PM -0400, Jason Baron wrote: Hi, Qemu bits for q35 support, I'm posting the seabios changes separately. The patches require '-M pc_q35' and -L 'seabios dir with q35 changes' on the qemu command line. Hopefully, we can make it the default for x86 at some

Re: [Qemu-devel] [PATCH v3 00/26] q35 qemu support

2012-10-21 Thread Michael S. Tsirkin
On Fri, Oct 19, 2012 at 04:43:25PM -0400, Jason Baron wrote: Hi, Qemu bits for q35 support, I'm posting the seabios changes separately. The patches require '-M pc_q35' and -L 'seabios dir with q35 changes' on the qemu command line. Hopefully, we can make it the default for x86 at some

Re: [Qemu-devel] [PATCH 01/30] split MRU ram list

2012-10-21 Thread Orit Wasserman
On 10/18/2012 09:29 AM, Juan Quintela wrote: From: Paolo Bonzini pbonz...@redhat.com Outside the execution threads the normal, non-MRU-ized order of the RAM blocks should always be enough. So manage two separate lists, which will have separate locking rules. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 03/30] protect the ramlist with a separate mutex

2012-10-21 Thread Orit Wasserman
On 10/18/2012 09:29 AM, Juan Quintela wrote: From: Umesh Deshpande udesh...@redhat.com Add the new mutex that protects shared state between ram_save_live and the iothread. If the iothread mutex has to be taken together with the ramlist mutex, the iothread shall always be _outside_.

Re: [Qemu-devel] [PATCH 04/30] buffered_file: Move from using a timer to use a thread

2012-10-21 Thread Orit Wasserman
On 10/18/2012 09:30 AM, Juan Quintela wrote: We still protect everything except the wait with the iothread lock. But we moved from a timer to a thread. Steps one by one. We also need to detect when we have finished with a variable complete. Signed-off-by: Juan Quintela quint...@redhat.com

Re: [Qemu-devel] [PATCH 05/30] migration: make qemu_fopen_ops_buffered() return void

2012-10-21 Thread Orit Wasserman
On 10/18/2012 09:30 AM, Juan Quintela wrote: We want the file assignment to happen before the thread is created to avoid locking, so we just do it before creating the thread. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 13 ++--- buffered_file.h | 2 +-

Re: [Qemu-devel] [PATCH 02/30] add a version number to ram_list

2012-10-21 Thread Orit Wasserman
On 10/18/2012 09:29 AM, Juan Quintela wrote: From: Umesh Deshpande udesh...@redhat.com This will be used to detect if last_block might have become invalid across different calls to ram_save_live. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Umesh Deshpande

Re: [Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking

2012-10-21 Thread Orit Wasserman
On 10/18/2012 09:30 AM, Juan Quintela wrote: Instead of testing each page individually, we search what is the next dirty page with a bitmap operation. We have to reorganize the code to move from a for loop, to a while(dirty) loop. Signed-off-by: Juan Quintela quint...@redhat.com ---

[Qemu-devel] [PATCH 1/5] qemu-char: Add new char backend CircularMemCharDriver

2012-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qemu-char.c | 72 +++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b082bae..b174da1 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2588,6

[Qemu-devel] [PATCH 2/5] Expose CirMemCharDriver via command line

2012-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qemu-char.c | 36 qemu-config.c |3 +++ qemu-options.hx | 10 ++ 3 files changed, 49 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b174da1..381bf60 100644

[Qemu-devel] [PATCH 0/5 V4] char: add CirMemCharDriver and provide QMP interface

2012-10-21 Thread Lei Li
This RFC series attempts to convert the MemCharDriver to use a circular buffer for input and output, expose it to users by introducing QMP commands memchar_write and memchar_read and via the command line like the other CharDriverStates. Serial ports in qemu always use CharDriverStates as there

[Qemu-devel] [PATCH 4/5] QAPI: Introduce memchar-read QMP command

2012-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- hmp-commands.hx | 25 + hmp.c| 17 + hmp.h|1 + qapi-schema.json | 27 +++ qemu-char.c | 52

[Qemu-devel] [PATCH 3/5] QAPI: Introduce memchar-write QMP command

2012-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- hmp-commands.hx | 22 + hmp.c| 19 +++ hmp.h|1 + qapi-schema.json | 69 ++ qemu-char.c | 46

[Qemu-devel] [PATCH 5/5] HMP: Introduce console command

2012-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- hmp-commands.hx | 23 +++ hmp.c | 53 + hmp.h |1 + monitor.c | 15 +++ monitor.h |3 +++ 5 files changed, 95

Re: [Qemu-devel] [PATCH 01/30] split MRU ram list

2012-10-21 Thread Peter Maydell
On 18 October 2012 08:29, Juan Quintela quint...@redhat.com wrote: -RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list.blocks) }; +RAMList ram_list = { +.blocks = QLIST_HEAD_INITIALIZER(ram_list.blocks), +.blocks_mru = QLIST_HEAD_INITIALIZER(ram_list.blocks_mru) +}; Maybe

Re: [Qemu-devel] [PATCH] configure: Fix CONFIG_QEMU_HELPERDIR generation

2012-10-21 Thread Michael Tokarev
On 19.10.2012 23:33, Aurelien Jarno wrote: On Wed, Oct 17, 2012 at 07:09:25PM +0200, Jan Kiszka wrote: We need to evaluate $libexecdir in configure, otherwise we literally end up with ${prefix}/libexec instead of the absolute path as CONFIG_QEMU_HELPERDIR. Signed-off-by: Jan Kiszka

Re: [Qemu-devel] [PATCH v3 00/26] tcg: rework liveness analysis and register allocator

2012-10-21 Thread Richard Henderson
On 2012-10-20 07:38, Aurelien Jarno wrote: This patch series rework the liveness analysis and register allocator in order to generate more optimized code, by avoiding a lot of move instructions. I have measured a 9% performance improvement in user mode and 4% in system mode. The idea behind

Re: [Qemu-devel] [PATCH v2] tcg-i386: Use %gs prefixes for x86_64 GUEST_BASE

2012-10-21 Thread Richard Henderson
On 2012-10-21 14:26, Aurelien Jarno wrote: +static inline void setup_guest_base_seg(void) +{ +if (syscall(__NR_arch_prctl, ARCH_SET_GS, GUEST_BASE) == 0) { +guest_base_flags = P_GS; +} Why calling the syscall directly instead of using arch_prctl(2)? Err... there is no

Re: [Qemu-devel] [PATCH] tcg/mips: use MUL instead of MULT on MIPS32 and above

2012-10-21 Thread Richard Henderson
On 2012-10-20 07:25, Aurelien Jarno wrote: MIPS32 and later instruction sets have a multiplication instruction directly operating on GPRs. It only produces a 32-bit result but it is exactly what is needed by QEMU. Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- Reviewed-by: Richard

Re: [Qemu-devel] [PATCH] qemu-timer: Check for usable fields for SIGEV_THREAD_ID

2012-10-21 Thread Richard Henderson
Ping? It's been Reviewed-by... r~ On 2012-10-13 02:26, Richard Henderson wrote: Older glibc (RHEL 5.x, Debian 5.x) does not have the _sigev_un._tid member in its structure definition, while the accompanying kernel headers do define SIGEV_THREAD_ID. We need configure to check for both

Re: [Qemu-devel] [PATCH] Revert target-sparc: Make cpu_dst local to OP=2 insns

2012-10-21 Thread Richard Henderson
On 2012-10-21 09:17, Aurelien Jarno wrote: On Sun, Oct 21, 2012 at 08:48:52AM +1000, Richard Henderson wrote: On 2012-10-21 00:48, Aurelien Jarno wrote: I am not sure it is the real problem, but at least the optimization of using the destination register as a temporary is wrong when the

Re: [Qemu-devel] [PATCH] Revert target-sparc: Make cpu_dst local to OP=2 insns

2012-10-21 Thread Aurelien Jarno
On Mon, Oct 22, 2012 at 07:29:19AM +1000, Richard Henderson wrote: On 2012-10-21 09:17, Aurelien Jarno wrote: On Sun, Oct 21, 2012 at 08:48:52AM +1000, Richard Henderson wrote: On 2012-10-21 00:48, Aurelien Jarno wrote: I am not sure it is the real problem, but at least the optimization of

Re: [Qemu-devel] [PATCH] qemu-timer: Check for usable fields for SIGEV_THREAD_ID

2012-10-21 Thread Aurelien Jarno
On Fri, Oct 12, 2012 at 09:26:55AM -0700, Richard Henderson wrote: Older glibc (RHEL 5.x, Debian 5.x) does not have the _sigev_un._tid member in its structure definition, while the accompanying kernel headers do define SIGEV_THREAD_ID. We need configure to check for both before using it.

[Qemu-devel] [PATCH] target-sparc64: disable VGA cirrus

2012-10-21 Thread Aurelien Jarno
OpenBIOS on sparc64 only support Standard VGA and not Cirrus VGA. Don't build Cirrus VGA support so that it can't be selected. This fixes the breakage introduced by commit f2898771. Reported-by: Richard Henderson r...@twiddle.net Cc: Blue Swirl blauwir...@gmail.com Signed-off-by: Aurelien Jarno

[Qemu-devel] [PATCH v2] tcg-i386: Use %gs prefixes for x86_64 GUEST_BASE

2012-10-21 Thread Richard Henderson
When we allocate a reserved_va for the guest, the kernel will likely choose an address well above 4G. At which point we must use a pair of movabsq+addq to form the host address. If we have OS support, set up a segment register to point to guest_base instead. Signed-off-by: Richard Henderson

Re: [Qemu-devel] [Qemu-ppc] [PATCH 03/15] pseries: Implement qemu initiated shutdowns using EPOW events

2012-10-21 Thread David Gibson
On Thu, Oct 18, 2012 at 04:50:25PM +1100, David Gibson wrote: At present, using 'system_powerdown' from the monitor or otherwise instructing qemu to (cleanly) shut down a pseries guest will not work, because we did not have a method of signalling the shutdown request to the guest. PAPR does

Re: [Qemu-devel] [PATCH 0/6] *** TCG global variables clean-up ***

2012-10-21 Thread Evgeny Voevodin
On 10/19/2012 09:55 PM, Blue Swirl wrote: On Fri, Oct 19, 2012 at 12:42 PM, Evgeny e.voevo...@samsung.com wrote: This set of patches moves global variables to tcg_ctx: gen_opc_ptr gen_opparam_ptr gen_opc_buf gen_opparam_buf Where it was possible I used s-... Where we don't have an interface to

Re: [Qemu-devel] [PATCH 5/6] TCG: Use gen_opparam_buf from context instead of global variable.

2012-10-21 Thread Evgeny Voevodin
On 10/19/2012 09:53 PM, Blue Swirl wrote: On Fri, Oct 19, 2012 at 12:42 PM, Evgeny e.voevo...@samsung.com wrote: Signed-off-by: Evgeny e.voevo...@samsung.com --- tcg/tcg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index

Re: [Qemu-devel] [PATCH 0/6] *** TCG global variables clean-up ***

2012-10-21 Thread Evgeny Voevodin
On 10/22/2012 07:40 AM, Evgeny Voevodin wrote: On 10/19/2012 09:55 PM, Blue Swirl wrote: On Fri, Oct 19, 2012 at 12:42 PM, Evgeny e.voevo...@samsung.com wrote: This set of patches moves global variables to tcg_ctx: gen_opc_ptr gen_opparam_ptr gen_opc_buf gen_opparam_buf Where it was possible

Re: [Qemu-devel] [PATCH 07/14] console: don't set PixelFormat alpha fields for 32bpp

2012-10-21 Thread Gerd Hoffmann
On 10/19/12 19:02, Stefano Stabellini wrote: On Wed, 17 Oct 2012, Gerd Hoffmann wrote: Currently it is inconstent, PixelFormat-amask is left unset whereas abits and amax and ashift are filled. As an alpha channel doesn't make sense for the vga framebuffer leave all alpha fields clear.

Re: [Qemu-devel] [PATCH 11/14] pixman/vnc: use pixman images in vnc.

2012-10-21 Thread Gerd Hoffmann
On 10/19/12 20:04, Stefano Stabellini wrote: On Wed, 17 Oct 2012, Gerd Hoffmann wrote: The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-nr keys). This

Re: [Qemu-devel] [PATCH v3 25/26] q35: fill in usb pci slots with -usb

2012-10-21 Thread Gerd Hoffmann
Hi, +pci_create_simple_multifunction( +host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_EHCI1_FUNC), +true, ich9-usb-ehci1); /* XXX: EHCI */ You can remove that comment now ;) cheers, Gerd

Re: [Qemu-devel] [PATCH v3 00/26] q35 qemu support

2012-10-21 Thread Gerd Hoffmann
Hi, Would it make sense to temporarily rename the machine type e.g. pc-q35-experimental to stress it's not fully supported? I don't think this is needed as piix will continue to be the default. It will also cause trouble with libvirt when pc-q35-experimental goes away some day. cheers,

Re: [Qemu-devel] [PATCH v2] tcg-i386: Use %gs prefixes for x86_64 GUEST_BASE

2012-10-21 Thread Aurelien Jarno
On Mon, Oct 22, 2012 at 12:11:07PM +1000, Richard Henderson wrote: When we allocate a reserved_va for the guest, the kernel will likely choose an address well above 4G. At which point we must use a pair of movabsq+addq to form the host address. If we have OS support, set up a segment