Re: [Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly

2012-10-31 Thread Xiao Guangrong
On 10/31/2012 02:46 PM, Jan Kiszka wrote: >> Please allow me to clarify it more clearly. >> >> The flash is ROMD device means guest can not write it, any kinds of guest >> write >> access on this device can cause vmexit to kvm and return to userspace. >> >> We should pay more attention on it if w

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-31 Thread Jan Kiszka
On 2012-10-29 06:24, liu ping fan wrote: > On Thu, Oct 25, 2012 at 9:34 PM, Jan Kiszka wrote: >> On 2012-10-24 09:29, liu ping fan wrote: >>> On Tue, Oct 23, 2012 at 5:04 PM, Jan Kiszka wrote: On 2012-10-22 11:23, Liu Ping Fan wrote: > Use local lock to protect e1000. When calling the sy

[Qemu-devel] [PATCH v8 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization

2012-10-31 Thread Yeongkyoon Lee
Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when a host is i386 or x86_64. Signed-off-by: Yeongkyoon Lee --- configure |6 ++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index 9c6ac87..4be984e 100755 --- a/configure +++ b/configure @@

[Qemu-devel] [PATCH v8 3/3] tcg: Optimize qemu_ld/st by generating slow paths at the end of a block

2012-10-31 Thread Yeongkyoon Lee
Add optimized TCG qemu_ld/st generation which locates the code of TLB miss cases at the end of a block after generating the other IRs. Currently, this optimization supports only i386 and x86_64 hosts. Signed-off-by: Yeongkyoon Lee --- tcg/i386/tcg-target.c | 404

Re: [Qemu-devel] [PATCH 0/8] add paravirtualization hwrng support (v2)

2012-10-31 Thread Aurelien Jarno
On Tue, Oct 30, 2012 at 06:24:27PM -0700, H. Peter Anvin wrote: > On 10/30/2012 04:02 PM, Anthony Liguori wrote: > > > >My take away from all of the various discussions on what the Right Way to > >use virtio-rng is: > > > > 1) /dev/random should always be used as the entropy source (I've left it >

[Qemu-devel] [PATCH v8 0/3] tcg: enhance code generation quality for qemu_ld/st IRs

2012-10-31 Thread Yeongkyoon Lee
Here is the 8th version of the series optimizing TCG qemu_ld/st code generation. v8: - Rebase v7: - Rebase and fix mistyping v6: - Remove an extra argument of return addr from MMU helpers Instead, embed the fast path addr to the slow path for helpers to use it - Change some bitwise o

[Qemu-devel] [PATCH v8 2/3] tcg: Add extended GETPC mechanism for MMU helpers with ldst optimization

2012-10-31 Thread Yeongkyoon Lee
Add GETPC_EXT which is used by MMU helpers to selectively calculate the code address of accessing guest memory when called from a qemu_ld/st optimized code or a C function. Currently, it supports only i386 and x86-64 hosts. Signed-off-by: Yeongkyoon Lee --- exec-all.h | 36

Re: [Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly

2012-10-31 Thread Jan Kiszka
On 2012-10-31 08:01, Xiao Guangrong wrote: > On 10/31/2012 02:46 PM, Jan Kiszka wrote: > >>> Please allow me to clarify it more clearly. >>> >>> The flash is ROMD device means guest can not write it, any kinds of guest >>> write >>> access on this device can cause vmexit to kvm and return to user

Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-31 Thread Paolo Bonzini
Il 30/10/2012 22:11, H. Peter Anvin ha scritto: >> What I said that passing /dev/hwrng or rdrand would: >> >> - not make /dev/random with virtio-rng-pci worse than without > > It wouldn't, but it would make virtio-rng-pci a potential noop on a > system where it could genuinely do better. True, bu

Re: [Qemu-devel] [PATCH 4/8] rng-random: add an RNG backend that uses /dev/random (v2)

2012-10-31 Thread Paolo Bonzini
Il 31/10/2012 00:02, Anthony Liguori ha scritto: > The filename can be overridden but it expects a non-blocking source of > entropy. > A typical invocation would be: > > qemu -object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0 > > This can also be used with /dev/urandom by using the comma

Re: [Qemu-devel] [PATCH 19/25] aio: add generic thread-pool facility

2012-10-31 Thread Stefan Hajnoczi
On Fri, Oct 26, 2012 at 04:05:49PM +0200, Paolo Bonzini wrote: > +static void event_notifier_ready(EventNotifier *notifier) > +{ > +ThreadPoolElement *elem, *next; > + > +event_notifier_test_and_clear(notifier); > +restart: > +QLIST_FOREACH_SAFE(elem, &head, all, next) { > +if (

Re: [Qemu-devel] [PATCH 00/25] AioContext & threadpool

2012-10-31 Thread Stefan Hajnoczi
On Fri, Oct 26, 2012 at 04:05:30PM +0200, Paolo Bonzini wrote: > Since half of the patches are in common between the two series, here > are both of them together. Under Wine I see a performance regression > due to AIO, but I wouldn't be surprised if it is an emulation artifact > (especially since

Re: [Qemu-devel] [RFC] net: Peer with existing NIC in netdev_add

2012-10-31 Thread Stefan Hajnoczi
On Tue, Oct 30, 2012 at 05:24:06PM +0200, Michael S. Tsirkin wrote: > On Wed, Oct 24, 2012 at 02:49:21PM +0200, Stefan Hajnoczi wrote: > > Allow netdev_del followed by netdev_add to re-peer a NIC and its netdev: > > > > (qemu) info network > > virtio-net-pci.0: type=nic,model=virtio-net-pci,ma

Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)

2012-10-31 Thread Stefan Hajnoczi
On Mon, Oct 29, 2012 at 04:26:58PM +0400, Michael Tokarev wrote: > 29.10.2012 13:18, Stefan Hajnoczi wrote: > > On Sat, Oct 27, 2012 at 05:15:15PM +0400, Michael Tokarev wrote: > >> diff --git a/vl.c b/vl.c > >> index 9f99ef4..db48d62 100644 > >> --- a/vl.c > >> +++ b/vl.c > >> @@ -3413,6 +3413,26

Re: [Qemu-devel] [PATCH] e1000: pre-initialize RAH/RAL registers

2012-10-31 Thread Stefan Hajnoczi
On Tue, Oct 30, 2012 at 01:20:40PM -0400, Gabriel L. Somlo wrote: > Some guest operating systems' drivers (Mac OS X in particular) fail to > properly initialize the Receive Address registers (probably expecting > them to be pre-initialized by an earlier component, such as a proprietary > BIOS). Thi

Re: [Qemu-devel] [PATCH] acpi_piix4: fix migration of gpe fields

2012-10-31 Thread Paolo Bonzini
Il 31/10/2012 00:14, Marcelo Tosatti ha scritto: > > Migrate 16 bytes for en/sts fields (which is the correct size), > increase version to 3, and document how to support incoming > migration from qemu-kvm 1.2. > > Signed-off-by: Marcelo Tosatti > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.

Re: [Qemu-devel] [PATCH v1 00/13] q35 patches for pci tree

2012-10-31 Thread Michael S. Tsirkin
On Tue, Oct 30, 2012 at 02:20:35PM -0500, Anthony Liguori wrote: > Jason Baron writes: > > > Hi, > > > > Re-base of my previous q35 patches on top of Michael Tsirkin's pci > > tree. > > I don't want this to come in through the pci tree. OK so you want to merge directly? > This is not just > an

Re: [Qemu-devel] [PATCH 18/25] qemu-thread: add QemuSemaphore

2012-10-31 Thread Paolo Bonzini
Il 30/10/2012 19:48, Stefan Hajnoczi ha scritto: >> +if (rc < 0) { >> +error_exit(errno, __func__); >> +} > > Forgot to handle EINTR? > >> +return 0; >> +} >> + >> +void qemu_sem_wait(QemuSemaphore *sem) >> +{ >> +int rc; >> + >> +rc = sem_wait(&sem->sem); >> +if (

Re: [Qemu-devel] [PATCH 18/25] qemu-thread: add QemuSemaphore

2012-10-31 Thread Stefan Hajnoczi
On Fri, Oct 26, 2012 at 04:05:48PM +0200, Paolo Bonzini wrote: > +int qemu_sem_timedwait(QemuSemaphore *sem, int ms) > +{ > +int rc; > + > +if (ms <= 0) { > +/* This is cheaper than sem_timedwait. */ > +rc = sem_trywait(&sem->sem); > +if (rc == -1 && errno == EAGAIN

Re: [Qemu-devel] [RFC] net: Peer with existing NIC in netdev_add

2012-10-31 Thread Michael S. Tsirkin
On Wed, Oct 31, 2012 at 09:07:27AM +0100, Stefan Hajnoczi wrote: > On Tue, Oct 30, 2012 at 05:24:06PM +0200, Michael S. Tsirkin wrote: > > On Wed, Oct 24, 2012 at 02:49:21PM +0200, Stefan Hajnoczi wrote: > > > Allow netdev_del followed by netdev_add to re-peer a NIC and its netdev: > > > > > > (

Re: [Qemu-devel] [PATCH v1 13/13] Fixup q35/ich9 Licenses

2012-10-31 Thread Michael S. Tsirkin
On Mon, Oct 29, 2012 at 10:11:31PM -0400, Jason Baron wrote: > From: Jason Baron > > Cleanup the q35/ich9 license headers. > > Signed-off-by: Jason Baron Isaku Yamahata, could you confirm this one please? > --- > hw/acpi_ich9.c | 13 +++-- > hw/lpc_ich9.c | 32

Re: [Qemu-devel] [RFC] Configure option to turn on all debug printerfy

2012-10-31 Thread Igor Mitsyanko
On 10/31/2012 07:10 AM, Peter Crosthwaite wrote: So in a couple of cases now I have done work on mature device models that include #ifdef'd debug printfery that is broken, and have submitted (trivial) patches to fix. Whats happening is tree wide or automated changes (changing types of variables

[Qemu-devel] [PATCH v2] HACKING: List areas where we may rely on impdef C behaviour

2012-10-31 Thread Peter Maydell
Add a section to HACKING saying which version of the C spec we use and describing the bits of implementation defined C compiler behaviour which C code in QEMU is allowed to rely on. Signed-off-by: Peter Maydell --- HACKING | 20 1 file changed, 20 insertions(+) diff --git a

Re: [Qemu-devel] [PATCH] tap-win32: stubs to fix win32 build

2012-10-31 Thread Stefan Hajnoczi
On Tue, Oct 30, 2012 at 06:22:45PM +0200, Michael S. Tsirkin wrote: > On Tue, Oct 30, 2012 at 05:16:45PM +0100, Stefan Hajnoczi wrote: > > On Tue, Oct 30, 2012 at 04:04:50PM +0200, Michael S. Tsirkin wrote: > > > Add missing stubs to win32 to fix link failure. > > > > > > Signed-off-by: Michael S.

Re: [Qemu-devel] [PATCH v1 13/13] Fixup q35/ich9 Licenses

2012-10-31 Thread Isaku Yamahata
Acked-by: Isaku Yamahata On Wed, Oct 31, 2012 at 10:59:18AM +0200, Michael S. Tsirkin wrote: > On Mon, Oct 29, 2012 at 10:11:31PM -0400, Jason Baron wrote: > > From: Jason Baron > > > > Cleanup the q35/ich9 license headers. > > > > Signed-off-by: Jason Baron > > Isaku Yamahata, could you con

[Qemu-devel] [PATCH 01/28] i386: kvm: kvm_arch_get_supported_cpuid: move R_EDX hack outside of for loop

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost The for loop will become a separate function, so clean it up so it can become independent from the bit hacking for R_EDX. No behavior change[1], just code movement. [1] Well, only if the kernel returned CPUID leafs 1 or 0x8001 as unsupported, but there's no kernel

[Qemu-devel] [PATCH 26/28] target-i386: cpu: make -cpu host/check/enforce code KVM-specific

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Rationale: * "-cpu host" is available only when using KVM * The current implementation of -cpu check/enforce (check_features_against_host()) makes sense only when using KVM. So this makes the functions check_features_against_host() and cpu_x86_fill_host() KVM-specific,

[Qemu-devel] [PATCH 17/28] target-i386: Add missing kvm cpuid feature name

2012-10-31 Thread Marcelo Tosatti
From: Don Slutz Currently "-cpu host,-kvmclock,-kvm_nopiodelay,-kvm_mmu" does not turn off all bits in CPUID 0x4001 EAX. The missing ones is KVM_FEATURE_STEAL_TIME. This adds the name kvm_steal_time. Signed-off-by: Don Slutz Signed-off-by: Marcelo Tosatti --- target-i386/cpu.c | 12 ++

[Qemu-devel] [PATCH 23/28] Issue warning when deprecated -tdf option is used

2012-10-31 Thread Marcelo Tosatti
From: Jan Kiszka Releases of qemu-kvm will be interrupted at qemu 1.3.0. Users should switch to plain qemu releases. To avoid breaking scenarios which are setup with command line options specific to qemu-kvm, port these switches from qemu-kvm to qemu.git. Port -tdf option. Signed-off-by: Marcel

[Qemu-devel] [PATCH 07/28] i386: kvm: kvm_arch_get_supported_cpuid: replace if+switch with single 'if'

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Additional fixups will be added, and making them a single 'if/else if' chain makes it clearer than two nested switch statements. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 23 +-- 1 files changed, 9 inserti

[Qemu-devel] [PATCH 00/28] [PULL] qemu-kvm.git uq/master queue

2012-10-31 Thread Marcelo Tosatti
The following changes since commit aee0bf7d8d7564f8f2c40e4501695c492b7dd8d1: tap-win32: stubs to fix win32 build (2012-10-30 19:18:53 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Don Slutz (1): target-i386: Add missing kvm

[Qemu-devel] [PATCH 09/28] i386: kvm: set CPUID_EXT_TSC_DEADLINE_TIMER on kvm_arch_get_supported_cpuid()

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost This moves the CPUID_EXT_TSC_DEADLINE_TIMER CPUID flag hacking from kvm_arch_init_vcpu() to kvm_arch_get_supported_cpuid(). Full git grep for kvm_arch_get_supported_cpuid: kvm.h:uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, target-i386/cpu.c

[Qemu-devel] [PATCH 05/28] i386: kvm: extract CPUID entry lookup to cpuid_find_entry() function

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost No behavior change, just code movement. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index

[Qemu-devel] [PATCH 03/28] i386: kvm: kvm_arch_get_supported_cpuid: use 'entry' variable

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost The reg switch will be moved to a separate function, so store the entry pointer in a variable. No behavior change, just code movement. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c |9 + 1 files changed, 5 insertions(+),

[Qemu-devel] [PATCH 28/28] update-linux-headers.sh: Handle new kernel uapi/ directories

2012-10-31 Thread Marcelo Tosatti
From: Peter Maydell Recent kernels have moved to keeping the userspace headers in uapi/ subdirectories. This breaks the detection of whether an architecture has KVM support in the kernel because kvm.h has moved in the kernel source tree. Update the check to support both the old and new locations.

[Qemu-devel] [PATCH 10/28] i386: kvm: x2apic is not supported without in-kernel irqchip

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost This is necessary so that x2apic is not improperly enabled when the in-kernel irqchip is disabled. This won't generate a warning with "-cpu ...,check" because the current check/enforce code is broken (it checks the host CPU data directly, instead of using kvm_arch_get_suppo

[Qemu-devel] [PATCH 21/28] Use global properties to emulate -no-kvm-pit-reinjection

2012-10-31 Thread Marcelo Tosatti
From: Jan Kiszka Releases of qemu-kvm will be interrupted at qemu 1.3.0. Users should switch to plain qemu releases. To avoid breaking scenarios which are setup with command line options specific to qemu-kvm, port these switches from qemu-kvm to qemu.git. Port -no-kvm-pit-reinjection. Signed-of

[Qemu-devel] [PATCH 02/28] i386: kvm: kvm_arch_get_supported_cpuid: clean up has_kvm_features check

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Instead of a function-specific has_kvm_features variable, simply use a "found" variable that will be checked in case we have to use the legacy get_para_features() interface. No behavior change, just code cleanup. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosat

[Qemu-devel] [PATCH 06/28] i386: kvm: extract try_get_cpuid() loop to get_supported_cpuid() function

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost No behavior change, just code movement. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 19 ++- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index c94897f..d7

[Qemu-devel] [PATCH 16/28] i386: cpu: add missing CPUID[EAX=7, ECX=0] flag names

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost This makes QEMU recognize the following CPU flag names: Flags| Corresponding KVM kernel commit -+ FSGSBASE | 176f61da82435eae09cc96f70b530d1ba0746b8b AVX2, BMI1, BMI2 | fb215366b3c7320ac25dca766

[Qemu-devel] [PATCH] memory: Don't dump disabled regions

2012-10-31 Thread Jan Kiszka
This makes "info mtree" output readable again. Signed-off-by: Jan Kiszka --- memory.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/memory.c b/memory.c index 243cb23..d5150f8 100644 --- a/memory.c +++ b/memory.c @@ -1590,7 +1590,7 @@ static void mtree_print_mr(fprintf

Re: [Qemu-devel] [PATCH v1 02/13] Back out add of i21154

2012-10-31 Thread Michael S. Tsirkin
On Mon, Oct 29, 2012 at 10:11:24PM -0400, Jason Baron wrote: > From: Jason Baron > > As pointed out by Andreas Färber this is covered by dec_pci.c. > > Signed-off-by: Jason Baron Revision is different though, and generally dec_pci looks like it needs some fixups. For now I'll just drop that pa

Re: [Qemu-devel] [PATCH v1 05/13] pc, pc_piix: split out pc nic initialization

2012-10-31 Thread Michael S. Tsirkin
On Mon, Oct 29, 2012 at 10:11:26PM -0400, Jason Baron wrote: > From: Isaku Yamahata > > Factor out pc nic initialization. > This simplifies the pc initialization and will reduce the code > duplication of q35 pc initialization. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Isaku Yamahata > Si

Re: [Qemu-devel] [PATCH v1 13/13] Fixup q35/ich9 Licenses

2012-10-31 Thread Michael S. Tsirkin
Applied, thanks. On Wed, Oct 31, 2012 at 06:34:36PM +0900, Isaku Yamahata wrote: > Acked-by: Isaku Yamahata > > On Wed, Oct 31, 2012 at 10:59:18AM +0200, Michael S. Tsirkin wrote: > > On Mon, Oct 29, 2012 at 10:11:31PM -0400, Jason Baron wrote: > > > From: Jason Baron > > > > > > Cleanup the q

[Qemu-devel] [PATCH 04/28] i386: kvm: extract register switch to cpuid_entry_get_reg() function

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost No behavior change: just code movement. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 37 +++-- 1 files changed, 23 insertions(+), 14 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.

Re: [Qemu-devel] [PATCH v1 06/13] pc: Move ioapic_init() from pc_piix.c to pc.c

2012-10-31 Thread Michael S. Tsirkin
On Mon, Oct 29, 2012 at 10:11:26PM -0400, Jason Baron wrote: > From: Jason Baron > > Move ioapic_init from pc_piix.c to pc.c, to make it a common function. > Rename ioapic_init -> ioapic_init_gsi. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Jason Baron I wonder whether this should be rewo

Re: [Qemu-devel] [PATCH v1 07/13] q35: Introduce q35 pc based chipset emulator

2012-10-31 Thread Michael S. Tsirkin
On Tue, Oct 30, 2012 at 02:18:02PM -0500, Anthony Liguori wrote: > Jason Baron writes: > > > From: Isaku Yamahata > > > > pc q35 based chipset emulator to support pci express natively. Based on > > Anthony Liguori's suggestion, the machine name is 'q35-next', with an alias > > of 'q35'. At this

[Qemu-devel] [PATCH 19/28] Use machine options to emulate -no-kvm-irqchip

2012-10-31 Thread Marcelo Tosatti
From: Jan Kiszka Releases of qemu-kvm will be interrupted at qemu 1.3.0. Users should switch to plain qemu releases. To avoid breaking scenarios which are setup with command line options specific to qemu-kvm, port these switches from qemu-kvm to qemu.git. Port -no-kvm-irqchip option. Signed-off

[Qemu-devel] [PATCH 24/28] Emulate qemu-kvms -no-kvm option

2012-10-31 Thread Marcelo Tosatti
From: Jan Kiszka Releases of qemu-kvm will be interrupted at qemu 1.3.0. Users should switch to plain qemu releases. To avoid breaking scenarios which are setup with command line options specific to qemu-kvm, port these switches from qemu-kvm to qemu.git. Port -no-kvm option. Signed-off-by: Mar

[Qemu-devel] [PATCH 27/28] target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Change the kvm_cpu_fill_host() function to use kvm_arch_get_supported_cpuid() instead of running the CPUID instruction directly, when checking for supported CPUID features. This should solve two problems at the same time: * "-cpu host" was not enabling features that don't

[Qemu-devel] [PATCH 13/28] i386: kvm: filter CPUID feature words earlier, on cpu.c

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost cpu.c contains the code that will check if all requested CPU features are available, so the filtering of KVM features must be there, so we can implement "check" and "enforce" properly. The only point where kvm_arch_init_vcpu() is called on i386 is: - cpu_x86_init() - x86

[Qemu-devel] [PATCH 11/28] i386: kvm: mask cpuid_kvm_features earlier

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Instead of masking the KVM feature bits very late (while building the KVM_SET_CPUID2 data), mask it out on env->cpuid_kvm_features, at the same point where the other feature words are masked out. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i3

[Qemu-devel] [PATCH 25/28] target-i386: make cpu_x86_fill_host() void

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost The return value of that function is always 0, and is always ignored. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/cpu.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c ind

Re: [Qemu-devel] [PATCH v2 3/7] memory: iommu support

2012-10-31 Thread Avi Kivity
On 10/30/2012 09:11 PM, Blue Swirl wrote: > On Tue, Oct 30, 2012 at 11:47 AM, Avi Kivity wrote: >> Add a new memory region type that translates addresses it is given, >> then forwards them to a target address space. This is similar to >> an alias, except that the mapping is more flexible than a l

Re: [Qemu-devel] [PATCH v2 4/7] memory: provide a MemoryRegion for IOMMUs to log faults

2012-10-31 Thread Avi Kivity
On 10/30/2012 09:14 PM, Blue Swirl wrote: > On Tue, Oct 30, 2012 at 11:47 AM, Avi Kivity wrote: >> Accesses which do not translate will hit the fault region, which >> can then log the access. > > Maybe special casing the fault region should be avoided, the IOMMU > could set up suitable fault regi

Re: [Qemu-devel] [PATCH v2 7/7] i440fx: add an iommu

2012-10-31 Thread Avi Kivity
On 10/30/2012 09:18 PM, Blue Swirl wrote: > On Tue, Oct 30, 2012 at 11:47 AM, Avi Kivity wrote: >> This iommu encrypts addresses on the device bus to avoid divuling information >> to hackers equipped with bus analyzers. Following 3DES, addresses are >> encrypted >> multiple times. A XOR cypher

[Qemu-devel] [PATCH 18/28] cirrus_vga: allow configurable vram size

2012-10-31 Thread Marcelo Tosatti
Allow RAM size to be configurable for cirrus, to allow migration compatibility from qemu-kvm. Acked-by: Gerd Hoffmann Signed-off-by: Marcelo Tosatti --- hw/cirrus_vga.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.

[Qemu-devel] [PATCH 20/28] Issue warning when deprecated -no-kvm-pit is used

2012-10-31 Thread Marcelo Tosatti
From: Jan Kiszka Releases of qemu-kvm will be interrupted at qemu 1.3.0. Users should switch to plain qemu releases. To avoid breaking scenarios which are setup with command line options specific to qemu-kvm, port these switches from qemu-kvm to qemu.git. Port -no-kvm-pit option. Signed-off-by:

[Qemu-devel] [PATCH 15/28] i386: kvm: filter CPUID leaf 7 based on GET_SUPPORTED_CPUID, too

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Now that CPUID leaf 7 features can be enabled/disabled on the command-line, we need to filter them properly using GET_SUPPORTED_CPUID, at the same place where other features are filtered out. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/c

Re: [Qemu-devel] [RFC PATCH v3 00/19] ACPI memory hotplug

2012-10-31 Thread Stefan Hajnoczi
On Fri, Sep 21, 2012 at 1:17 PM, Vasilis Liaskovitis wrote: > This is v3 of the ACPI memory hotplug functionality. Only x86_64 target is > supported > for now. Hi Vasilis, Regarding the hot unplug issue we've been discussing, it's possible to progress this patch series without fully solving that

[Qemu-devel] [PATCH 22/28] Issue warning when deprecated drive parameter boot=on|off is used

2012-10-31 Thread Marcelo Tosatti
From: Jan Kiszka Releases of qemu-kvm will be interrupted at qemu 1.3.0. Users should switch to plain qemu releases. To avoid breaking scenarios which are setup with command line options specific to qemu-kvm, port these switches from qemu-kvm to qemu.git. Port drive boot option. From the qemu-kv

[Qemu-devel] [PATCH 14/28] i386: kvm: reformat filter_features_for_kvm() code

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Cosmetic, but it will also help to make futher patches easier to review. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/cpu.c | 28 +--- 1 files changed, 13 insertions(+), 15 deletions(-) diff --git a/target-i386/

Re: [Qemu-devel] [PATCH 19/25] aio: add generic thread-pool facility

2012-10-31 Thread Paolo Bonzini
Il 30/10/2012 20:13, Stefan Hajnoczi ha scritto: > On Fri, Oct 26, 2012 at 04:05:49PM +0200, Paolo Bonzini wrote: >> +static void event_notifier_ready(EventNotifier *notifier) >> +{ >> +ThreadPoolElement *elem, *next; >> + >> +event_notifier_test_and_clear(notifier); >> +restart: >> +QL

Re: [Qemu-devel] [PATCH] Fix off-by-1 error in RAM migration code

2012-10-31 Thread Orit Wasserman
On 10/31/2012 05:43 AM, David Gibson wrote: > The code for migrating (or savevm-ing) memory pages starts off by creating > a dirty bitmap and filling it with 1s. Except, actually, because bit > addresses are 0-based it fills every bit except bit 0 with 1s and puts an > extra 1 beyond the end of th

[Qemu-devel] [PATCH 08/28] i386: kvm: set CPUID_EXT_HYPERVISOR on kvm_arch_get_supported_cpuid()

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Full grep for kvm_arch_get_supported_cpuid: kvm.h:uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, target-i386/cpu.c:x86_cpu_def->cpuid_7_0_ebx_features = kvm_arch_get_supported_cpuid(kvm_state, 0x7, 0, R_EBX); target-i386/cpu.c:

[Qemu-devel] [PATCH 12/28] i386: kvm: mask cpuid_ext4_features bits earlier

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost This way all the filtering by GET_SUPPORTED_CPUID is being done at the same place in the code. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm

Re: [Qemu-devel] [RFC] Configure option to turn on all debug printerfy

2012-10-31 Thread Igor Mitsyanko
On 10/31/2012 01:29 PM, Igor Mitsyanko wrote: On 10/31/2012 07:10 AM, Peter Crosthwaite wrote: So in a couple of cases now I have done work on mature device models that include #ifdef'd debug printfery that is broken, and have submitted (trivial) patches to fix. Whats happening is tree wide or

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Avi Kivity
On 10/24/2012 10:06 AM, liu ping fan wrote: > On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: >> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: >>> +static void dimm_populate(DimmDevice *s) >>> +{ >>> +DeviceState *dev= (DeviceState*)s; >>> +MemoryRegion *new

Re: [Qemu-devel] [RFC PATCH v3 00/19] ACPI memory hotplug

2012-10-31 Thread Avi Kivity
On 10/31/2012 12:58 PM, Stefan Hajnoczi wrote: > On Fri, Sep 21, 2012 at 1:17 PM, Vasilis Liaskovitis > wrote: >> This is v3 of the ACPI memory hotplug functionality. Only x86_64 target is >> supported >> for now. > > Hi Vasilis, > Regarding the hot unplug issue we've been discussing, it's possi

[Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap

2012-10-31 Thread Orit Wasserman
The number of bits is off by one, for example if last_ram_offset is 0x1000 (the guest has one page) we get 0 bits instead of 1. Signed-off-by: Orit Wasserman --- arch_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index b75a4c5..a80c3c8 10064

Re: [Qemu-devel] [PATCH v2 8/9] qmp: add NBD server commands

2012-10-31 Thread Christoph Hellwig
On Mon, Oct 01, 2012 at 04:52:23PM +0200, Paolo Bonzini wrote: > Adding an NBD server inside QEMU is trivial, since all the logic is > in nbd.c and can be shared easily between qemu-nbd and QEMU itself. > The main difference is that qemu-nbd serves a single unnamed export, > while QEMU serves named

Re: [Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap

2012-10-31 Thread Avi Kivity
On 10/31/2012 01:19 PM, Orit Wasserman wrote: > The number of bits is off by one, for example if last_ram_offset > is 0x1000 (the guest has one page) we get 0 bits instead of 1. > > Signed-off-by: Orit Wasserman > --- > arch_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

Re: [Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap

2012-10-31 Thread Peter Maydell
On 31 October 2012 12:19, Orit Wasserman wrote: > The number of bits is off by one, for example if last_ram_offset > is 0x1000 (the guest has one page) we get 0 bits instead of 1. > > Signed-off-by: Orit Wasserman > --- > arch_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > di

[Qemu-devel] [PATCH 0/2] uhci: Don't crash on device disconnect

2012-10-31 Thread Hans de Goede
My recent uhci cleanup series has introduced a regression, where qemu sometimes crashes on a device disconnect. The problem is that the uhci code never checked for a device not / no longer existing, instead it was relying on usb_handle_packet accepting a NULL device. But since we now pass usb_hand

[Qemu-devel] [PATCH 2/2] uhci: Don't crash on device disconnect

2012-10-31 Thread Hans de Goede
My recent uhci cleanup series has introduced a regression, where qemu sometimes crashes on a device disconnect. The problem is that the uhci code never checked for a device not / no longer existing, instead it was relying on usb_handle_packet accepting a NULL device. But since we now pass usb_hand

[Qemu-devel] [PATCH 1/2] uhci: Add a uhci_handle_td_error() helper function

2012-10-31 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 90 +-- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index b6b972f..99ed063 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -

Re: [Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap

2012-10-31 Thread Orit Wasserman
On 10/31/2012 01:24 PM, Avi Kivity wrote: > On 10/31/2012 01:19 PM, Orit Wasserman wrote: >> The number of bits is off by one, for example if last_ram_offset >> is 0x1000 (the guest has one page) we get 0 bits instead of 1. >> >> Signed-off-by: Orit Wasserman >> --- >> arch_init.c | 2 +- >> 1 fi

Re: [Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap

2012-10-31 Thread Orit Wasserman
On 10/31/2012 01:25 PM, Peter Maydell wrote: > On 31 October 2012 12:19, Orit Wasserman wrote: >> The number of bits is off by one, for example if last_ram_offset >> is 0x1000 (the guest has one page) we get 0 bits instead of 1. >> >> Signed-off-by: Orit Wasserman >> --- >> arch_init.c | 2 +- >>

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Stefan Hajnoczi
On Wed, Oct 31, 2012 at 12:15 PM, Avi Kivity wrote: > On 10/24/2012 10:06 AM, liu ping fan wrote: >> On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: >>> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: +static void dimm_populate(DimmDevice *s) +{ +De

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Avi Kivity
On 10/31/2012 02:18 PM, Stefan Hajnoczi wrote: >> >> IMO we should use the same mechanism as proposed for other devices: >> address_space_map() should grab a reference on the dimm device, and >> address_space_unmap() can release it. This way device destruction will >> be deferred as soon as all de

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Stefan Hajnoczi
On Wed, Oct 31, 2012 at 1:34 PM, Avi Kivity wrote: > On 10/31/2012 02:18 PM, Stefan Hajnoczi wrote: >>> >>> IMO we should use the same mechanism as proposed for other devices: >>> address_space_map() should grab a reference on the dimm device, and >>> address_space_unmap() can release it. This wa

Re: [Qemu-devel] 64-on-32 TCG broken

2012-10-31 Thread Aurelien Jarno
On Wed, Oct 31, 2012 at 12:56:36AM +0100, Aurelien Jarno wrote: > On Tue, Oct 30, 2012 at 11:24:34PM +0100, Stefan Weil wrote: > > Am 30.10.2012 09:15, schrieb Paolo Bonzini: > > >Il 29/10/2012 19:29, Aurelien Jarno ha scritto: > > >>On Mon, Oct 29, 2012 at 06:53:14PM +0100, Paolo Bonzini wrote: >

Re: [Qemu-devel] [PATCH v2 8/9] qmp: add NBD server commands

2012-10-31 Thread Paolo Bonzini
Il 31/10/2012 12:23, Christoph Hellwig ha scritto: > On Mon, Oct 01, 2012 at 04:52:23PM +0200, Paolo Bonzini wrote: >> Adding an NBD server inside QEMU is trivial, since all the logic is >> in nbd.c and can be shared easily between qemu-nbd and QEMU itself. >> The main difference is that qemu-nbd s

[Qemu-devel] [PATCH 5/8] usb-redir: Add an usbredir_setup_usb_eps() helper function

2012-10-31 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index d7a08b2..ade5cc6 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1336,17 +1

[Qemu-devel] [RFC] hw/qxl: inject interrupts in any state

2012-10-31 Thread Alon Levy
I cannot find a reason we asserted that injecting interrupts happen only when the vm is running. This is right now the cause of spice crashing due to the new interface_client_set_capabilities being called when the vm is stopped, this happens if a user stops the vm or the vm reboots and a spice conn

Re: [Qemu-devel] [PATCH v1 07/13] q35: Introduce q35 pc based chipset emulator

2012-10-31 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Tue, Oct 30, 2012 at 02:18:02PM -0500, Anthony Liguori wrote: >> Jason Baron writes: >> >> > From: Isaku Yamahata >> > >> > pc q35 based chipset emulator to support pci express natively. Based on >> > Anthony Liguori's suggestion, the machine name is 'q35-next

Re: [Qemu-devel] [PATCH v1 00/13] q35 patches for pci tree

2012-10-31 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Tue, Oct 30, 2012 at 02:20:35PM -0500, Anthony Liguori wrote: >> Jason Baron writes: >> >> > Hi, >> > >> > Re-base of my previous q35 patches on top of Michael Tsirkin's pci >> > tree. >> >> I don't want this to come in through the pci tree. > > OK so you want

Re: [Qemu-devel] [PATCH 1/4] usb: split packet result into actual_length + status

2012-10-31 Thread Hans de Goede
Hi, On 10/19/2012 11:00 AM, Gerd Hoffmann wrote: Hi, This patch unfortunately is somewhat invasive, since makeing the qemu usb core deal with this requires changes everywhere. This patch only prepares the usb core for this, all the hcd / device changes are done in such a way that there are

[Qemu-devel] [PATCH 6/8] usb-redir: Use reject rather the disconnect on bad ep info

2012-10-31 Thread Hans de Goede
So that the client gets a notification about us disconnecting the device. Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index ade5cc6..a3ce815 100644 --- a/hw/usb/redirect.c +++ b/

Re: [Qemu-devel] [PATCH v2 8/9] qmp: add NBD server commands

2012-10-31 Thread Christoph Hellwig
On Wed, Oct 31, 2012 at 01:46:22PM +0100, Paolo Bonzini wrote: > qemu-nbd does support AIO in the latest versions. There's also > --cache=MODE and --aio=MODE command-line options. Oh true, it's just hidden behind coroutines. With --aio-native and --nocache I actually get fairly reasonable perfor

[Qemu-devel] [PATCH] aio: Use g_slice_alloc() for AIOCB pooling

2012-10-31 Thread Stefan Hajnoczi
AIO control blocks are frequently acquired and released because each aio request involves at least one AIOCB. Therefore pool them to avoid heap allocation overhead. The problem with the freelist approach in AIOPool is thread-safety. If we want BlockDriverStates to associate with AioContexts that

[Qemu-devel] usb input pipelining patches v3

2012-10-31 Thread Hans de Goede
Here the not yet merged input pipelining patches. Please pull these into your tree for Anthony. Changes from v2: -dropped the special combined packet device methods, as these are not necessary (as discussed on the list) Thanks & Regards, Hans

[Qemu-devel] [PATCH 2/5] usb-redir: Allow packets to have both data and an error-status

2012-10-31 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 56 --- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index f8493a2..d93f22f 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -

Re: [Qemu-devel] [PATCH v2] chardev: Use timer instead of bottom-half to postpone open event

2012-10-31 Thread Jan Kiszka
On 2012-10-12 09:52, Jan Kiszka wrote: > As the block layer may decide to flush bottom-halfs while the machine is > still initializing (e.g. to read geometry data from the disk), our > postponed open event may be processed before the last frontend > registered with a muxed chardev. > > Until the s

Re: [Qemu-devel] [PATCH v12 07/14] target-mips: Add ASE DSP GPR-based shift instructions

2012-10-31 Thread Jia Liu
Hi Aurelien, Is this time OK? static void gen_mipsdsp_shift(DisasContext *ctx, uint32_t opc, int ret, int v1, int v2) { uint32_t op2; const char *opn = "mipsdsp shift"; TCGv t0; TCGv v1_t; TCGv v2_t; if (ret == 0) { /* Treat as NOP. *

[Qemu-devel] [PATCH 2/8] combined-packet: Add a workaround for Linux usbfs + live migration

2012-10-31 Thread Hans de Goede
Older versions (anything but the latest) of Linux usbfs + libusb(x), will submit larger (bulk) transfers split into multiple 16k submissions, which means that rather then all tds getting linked into the queue in one atomic operarion they get linked in a bunch at a time, which could cause problems i

[Qemu-devel] [PATCH 3/5] ehci: Get rid of the magical PROC_ERR status

2012-10-31 Thread Hans de Goede
Instead make ehci_execute and ehci_fill_queue return the again value. Signed-off-by: Hans de Goede --- hw/usb/hcd-ehci.c | 55 --- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 8041e

[Qemu-devel] [PATCH 0/5] usb: split packet result into actual_length + status v2

2012-10-31 Thread Hans de Goede
Here is v2 of the split packet result into actual_length + status patchset, as requested this version makes sb_handle_packet and the device's handle_control and handle_data methods return void, to make the sync/async packet handling more alike. This turned out to be quite a bit of work! But is all

Re: [Qemu-devel] [PATCH v12 09/14] target-mips: Add ASE DSP bit/manipulation instructions

2012-10-31 Thread Jia Liu
Hi Richard Peter Jovanovic and Aurelien, On Wed, Oct 31, 2012 at 1:26 PM, Richard Henderson wrote: > On 2012-10-31 01:44, Peter Maydell wrote: >> On 30 October 2012 15:34, Jia Liu wrote: >>> On Mon, Oct 29, 2012 at 9:40 PM, Jovanovic, Petar wrote: > imm = (int16_t)(imm << 6) >> 6;

[Qemu-devel] [PATCH 7/8] usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller

2012-10-31 Thread Hans de Goede
From: Jan Kiszka This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as wel

  1   2   3   >