Re: [Qemu-devel] [RFC v2 3/8] char-io: fix possible risk on IOWatchPoll

2017-08-27 Thread Peter Xu
On Sat, Aug 26, 2017 at 03:19:39PM +0800, Fam Zheng wrote: > s/risk/race/ for $subject and the whole patch? I think... Yes. :-) Thanks. -- Peter Xu

Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll

2017-08-27 Thread Peter Xu
On Fri, Aug 25, 2017 at 10:30:42AM +0100, Dr. David Alan Gilbert wrote: [...] > > > c) As mentioned on irc there's fun to be had with cur_mon and error > > > handling - in my local world I have cur_mon declared as __thread > > > but never got around to thinking aobut what should set

Re: [Qemu-devel] [PATCH qemu v4 2/3] vfio/spapr: Add a notifier for PPC64 HV/PR KVM about new group attached to LIOBN

2017-08-27 Thread Alexey Kardashevskiy
On 25/08/17 16:21, David Gibson wrote: > On Thu, Jul 20, 2017 at 05:22:30PM +1000, Alexey Kardashevskiy wrote: >> This implements a notification for a new IOMMU group attached to >> sPAPR's logical IO bus (LIOBN) to enable in-kernel TCE acceleration. >> >> This extends the

[Qemu-devel] [PATCH 1/3] target/arm: Remove stale comment

2017-08-27 Thread Pranith Kumar
Update the comment which is not true since MTTCG. Signed-off-by: Pranith Kumar --- target/arm/translate-a64.c | 4 1 file changed, 4 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 2200e25be0..f42b155d7d 100644 ---

[Qemu-devel] [RFC PATCH 2/3] cpus-common: Cache allocated work items

2017-08-27 Thread Pranith Kumar
Using heaptrack, I found that quite a few of our temporary allocations are coming from allocating work items. Instead of doing this continously, we can cache the allocated items and reuse them instead of freeing them. This reduces the number of allocations by 25% (20 -> 15 for ARM64

[Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering semantics

2017-08-27 Thread Pranith Kumar
Currently, we cannot use mttcg for running strong memory model guests on weak memory model hosts due to missing ordering semantics. We implicitly generate fence instructions for stronger guests if an ordering mismatch is detected. We generate fences only for the orders for which fence

Re: [Qemu-devel] [PATCH 0/4] four zpci patches

2017-08-27 Thread Yi Min Zhao
在 2017/8/25 上午12:27, Eric Blake 写道: On 08/24/2017 03:48 AM, Yi Min Zhao wrote: 在 2017/8/24 下午3:13, Cornelia Huck 写道: On Thu, 24 Aug 2017 13:20:12 +0800 Yi Min Zhao wrote: Why can't I receive [Qemu-devel] prefixed patches? I sent patches to

Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll

2017-08-27 Thread Peter Xu
On Fri, Aug 25, 2017 at 04:07:34PM +, Marc-André Lureau wrote: > On Fri, Aug 25, 2017 at 5:33 PM Dr. David Alan Gilbert > wrote: > > > * Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > > > Hi > > > > > > On Wed, Aug 23, 2017 at 8:52 AM Peter Xu

Re: [Qemu-devel] Persistent bitmaps for non-qcow2 formats

2017-08-27 Thread Fam Zheng
On Fri, 08/25 15:44, Max Reitz wrote: > Well, OK. The main argument against supporting anything but qcow2 is > "if you want features, use qcow2; and we are working on making qcow2 as > fast as possible." I think that's a very good argument still. At some > point I (and probably others, too) had

[Qemu-devel] 答复: Re: [PATCHv4 02/03] colo-compare: Use IOThread to Check old packetregularly and Process pactkets of the primary

2017-08-27 Thread wang.yong155
>> static char *compare_get_pri_indev(Object *obj, Error **errp)>> @@ -759,12 >> +764,10 @@ static void colo_compare_complete(UserCreatable *uc, Error >> **errp)>> {>> CompareState *s = COLO_COMPARE(uc)>> Chardev >> *chr>> -char thread_name[64]>> -static int compare_id>>

[Qemu-devel] [PATCH 12/14] hvf: move fields from CPUState to CPUX86State

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit is a small refactoring of hvf's emulation code: it moves the HVFX86EmulatorState field to CPUX86State, and in general changes, for the emulation functions, the parameter with signature 'CPUState *' for 'CPUX86State *' so we don't have to get the 'env' (which is what we really need)

[Qemu-devel] [PATCH 13/14] hvf: refactor event injection code for hvf

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit refactors the event-injection code for hvf through using the appropriate fields already provided by CPUX86State. At vmexit, it fills these fields so that hvf_inject_interrupts can just retrieve them without calling into hvf. Signed-off-by: Sergio Andres Gomez Del Real

[Qemu-devel] [PATCH 08/14] apic: add function to apic that will be used by hvf

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit moves (hides) the function apic_get_highest_priority_irr to apic.c and exports it through the interface in apic.h for use by hvf. Signed-off-by: Sergio Andres Gomez Del Real --- hw/intc/apic.c | 11 +++ include/hw/i386/apic.h | 1 + 2

[Qemu-devel] [PATCH 14/14] hvf: inject General Protection Fault when vmexit through vmcall

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit injects a GP fault when the guest vmexit's by executing a vmcall instruction. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/hvf-all.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/hvf-all.c

[Qemu-devel] [PATCH 03/14] hvf: add conditional macros around hvf code in cpus.c

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit surrounds the hvf parts of cpus.c with conditional macros so that they are rightly ignored on other platforms. Signed-off-by: Sergio Andres Gomez Del Real --- cpus.c | 147 +++

[Qemu-devel] [PATCH 10/14] hvf: refactor cpuid code

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit adds code to request the cpuid features supported by the host and hvf; it calls hvf_get_supported_cpuid if hvf is compiled with QEMU and enabled. Signed-off-by: Sergio Andres Gomez Del Real --- cpus.c| 2 + include/qom/cpu.h | 6

[Qemu-devel] [PATCH 11/14] hvf: implement vga dirty page tracking

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit implements setting the tracking of dirty pages, using hvf's interface to protect guest memory. It uses the MemoryListener callback mechanism through .log_start/stop/sync Signed-off-by: Sergio Andres Gomez Del Real --- include/sysemu/hvf.h | 5

[Qemu-devel] [PATCH 04/14] hvf: add fields to CPUState and CPUX86State; add definitions

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit adds some fields specific to hvf in CPUState and CPUX86State. It also adds some handy #defines. Signed-off-by: Sergio Andres Gomez Del Real --- include/qom/cpu.h | 8 target/i386/cpu.h | 23 +++ 2 files changed, 31

[Qemu-devel] [PATCH 09/14] hvf: implement hvf_get_supported_cpuid

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit implements hvf_get_supported_cpuid, which returns the set of features supported by both the host processor and the hypervisor. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/hvf-utils/x86_cpuid.c | 138 ++

[Qemu-devel] [PATCH 00/14] add support for Hypervisor.framework in QEMU

2017-08-27 Thread Sergio Andres Gomez Del Real
The following patchset adds to QEMU the supporting for macOS's native hypervisor, Hypervisor.framework (hvf). The code base is taken from Google's Android emulator at https://android.googlesource.com/platform/external/qemu/+/emu-master-dev. Apart from general code refactoring, some additional

[Qemu-devel] [PATCH 01/14] hvf: add support for Hypervisor.framework in the configure script

2017-08-27 Thread Sergio Andres Gomez Del Real
This patch adds to the configure script the code to support the --enable-hvf argument. If the OS is Darwin, it checks for presence of HVF in the system. The patch also adds strings related to HVF in the file qemu-options.hx Signed-off-by: Sergio Andres Gomez Del Real

[Qemu-devel] [PATCH 05/14] hvf: use new helper functions for put/get xsave

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit makes use of the helper functions for handling xsave in xsave_helper.c, which are shared with kvm. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/hvf-utils/x86hvf.c | 63 ++ 1 file changed, 8

[Qemu-devel] [PATCH 06/14] hvf: add compilation rules to Makefile.objs

2017-08-27 Thread Sergio Andres Gomez Del Real
This commit adds to target/i386/Makefile.objs the necessary rules so that the new files for hvf are compiled by the build system. It also adds handling of the -enable-hvf argument in the main function in vl.c. Signed-off-by: Sergio Andres Gomez Del Real ---

[Qemu-devel] [PULL 0/1] slirp updates

2017-08-27 Thread Samuel Thibault
warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ The following changes since commit 04d74e07b4542aad5aa4ad03951b38b767f5314a: slirp: fix clearing ifq_so from pending packets (2017-08-26 01:04:12 +0200) are available in the git repository at:

[Qemu-devel] [PULL 1/1] slirp: fix clearing ifq_so from pending packets

2017-08-27 Thread Samuel Thibault
The if_fastq and if_batchq contain not only packets, but queues of packets for the same socket. When sofree frees a socket, it thus has to clear ifq_so from all the packets from the queues, not only the first. Signed-off-by: Samuel Thibault Reviewed-by: Philippe

Re: [Qemu-devel] Qemu 2.10 rc4 build issue on BE (luigi burdo)

2017-08-27 Thread Programmingkid
> Hi all, > > the last rc4 from the qemu website fail in build in some parts on BE hardware. > > attached on this email there is the configure and the build log hope it helps > > > My machine is : PowerMac G5 Quad . > > Distro is Ferdora 25 PPC64. > > > > Thanks > > Luigi It would help

Re: [Qemu-devel] [PATCH v4 11/43] tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK

2017-08-27 Thread Pranith Kumar
Hi Emilio, On Fri, Jul 21, 2017 at 1:59 AM, Emilio G. Cota wrote: > This will enable us to decouple code translation from the value > of parallel_cpus at any given time. It will also help us minimize > TB flushes when generating code via EXCP_ATOMIC. > > Note that the declaration

[Qemu-devel] [RFC] Buffers/caches in VirtIO Balloon driver stats

2017-08-27 Thread Tomáš Golembiovský
Hi, We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from

[Qemu-devel] [PATCH v3] audio: intel-hda: do not use old_mmio accesses

2017-08-27 Thread Matt Parker
intel-hda is currently using the old_mmio accessors for io. This updates the device to use .read and .write accessors instead. Signed-off-by: Matt Parker --- v3: * use MAKE_64BIT_MASK --- hw/audio/intel-hda.c | 58 ++-- 1 file

Re: [Qemu-devel] kvm_intel fails to load on Conroe CPUs running Linux 4.12

2017-08-27 Thread Paolo Bonzini
Il 27 ago 2017 4:48 PM, "Gerhard Wiesinger" ha scritto: On 27.08.2017 14:03, Paolo Bonzini wrote: > > We will revert the patch, but 4.13.0 will not have the fix. Expect it in > later stable kernels (because vacations). > > Thnx. Why will 4.13.0 NOT have the fix? Because

[Qemu-devel] [PATCH] i386: fix 0x66 prefix in disassembler and translator

2017-08-27 Thread Jürgen Buchmüller
The opcodes 0xe8 (call) and 0xe9 (jump), when prefixed by 0x66, do not use a 16 bit offset, but still 32 bits, just like conditional relative jumps. To distinguish between conditional jumps and the unconditional call/jump add a new call_jump_mode and a call_jump_flag. This prerevents data size

[Qemu-devel] Qemu 2.10 rc4 build issue on BE

2017-08-27 Thread luigi burdo
Hi all, the last rc4 from the qemu website fail in build in some parts on BE hardware. attached on this email there is the configure and the build log hope it helps My machine is : PowerMac G5 Quad . Distro is Ferdora 25 PPC64. Thanks Luigi ./configure

Re: [Qemu-devel] kvm_intel fails to load on Conroe CPUs running Linux 4.12

2017-08-27 Thread Gerhard Wiesinger
On 27.08.2017 14:03, Paolo Bonzini wrote: Il 27 ago 2017 9:49 AM, "Gerhard Wiesinger" ha scritto: On 17.08.2017 23:14, Gerhard Wiesinger wrote: On 17.08.2017 22:58, Gerhard Wiesinger wrote: On 07.08.2017 19:50, Paolo Bonzini wrote: Not much to say, unfortunately. It's

Re: [Qemu-devel] kvm_intel fails to load on Conroe CPUs running Linux 4.12

2017-08-27 Thread Gerhard Wiesinger
On 27.08.2017 14:03, Paolo Bonzini wrote: Il 27 ago 2017 9:49 AM, "Gerhard Wiesinger" > ha scritto: On 17.08.2017 23:14, Gerhard Wiesinger wrote: On 17.08.2017 22:58, Gerhard Wiesinger wrote: > > On 07.08.2017 19:50,

[Qemu-devel] Using the latest git version of qemu and usb-tablet.

2017-08-27 Thread Hongyi Zhao
Hi all, Currently, I use the latest git version of qemu, see following for detail: $ qemu-system-x86_64 --version QEMU emulator version 2.9.90 (v2.10.0-rc0-29-ga588c4985e-dirty) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers $ On my Debian Stretch host, I installed the

[Qemu-devel] [Bug 1713328] [NEW] Unable to C-a in -nographic if -serial telnet

2017-08-27 Thread Dario Niedermann
Public bug reported: qemu-system-i386 (version 2.6.1, running on Linux/x86_64) started with: qemu-system-i386 -m 64M -machine type=pc -rtc base=localtime,clock=host -nographic -serial telnet:127.0.0.1:1234,server,nowait -net nic,model=ne2k_pci -net user,hostfwd=tcp:127.0.0.1:2200-:22,tftp=/

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/15] Sam460ex emulation

2017-08-27 Thread BALATON Zoltan
Hello, Just to confirm where we are with this series, let me summarise what I got from the replies and what's my plan for this based on that. Here's the list of patches for reference: [PATCH 01/15] ppc4xx: Move MAL from ppc405_uc to ppc4xx_devs [PATCH 02/15] ppc4xx: Make MAL emulation more

Re: [Qemu-devel] kvm_intel fails to load on Conroe CPUs running Linux 4.12

2017-08-27 Thread Paolo Bonzini
Il 27 ago 2017 9:49 AM, "Gerhard Wiesinger" ha scritto: On 17.08.2017 23:14, Gerhard Wiesinger wrote: > On 17.08.2017 22:58, Gerhard Wiesinger wrote: > > > > On 07.08.2017 19:50, Paolo Bonzini wrote: > > > > >Not much to say, unfortunately. It's pretty much the same

Re: [Qemu-devel] [PATCH 3/5] pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices

2017-08-27 Thread Marcel Apfelbaum
Hi Eduardo, On 24/08/2017 1:14, Eduardo Habkost wrote: Change all devices that set is_express=1 to implement INTERFACE_PCIE_DEVICE. Can this interface *replace* is_express field? Thanks, Marcel Signed-off-by: Eduardo Habkost --- hw/block/nvme.c|

Re: [Qemu-devel] [PATCH 2/5] pci: Add interface names to hybrid PCI devices

2017-08-27 Thread Marcel Apfelbaum
Hi Eduardo, On 25/08/2017 22:18, Eduardo Habkost wrote: On Wed, Aug 23, 2017 at 07:14:42PM -0300, Eduardo Habkost wrote: The following devices support both PCIe and legacy PCI, by including special code to handle the QEMU_PCI_CAP_EXPRESS flag: * vfio-pci (is_express=1, but legacy PCI handled

Re: [Qemu-devel] [PATCH 2/5] pci: Add interface names to hybrid PCI devices

2017-08-27 Thread Marcel Apfelbaum
On 27/08/2017 10:48, Marcel Apfelbaum wrote: On 24/08/2017 1:14, Eduardo Habkost wrote: The following devices support both PCIe and legacy PCI, by including special code to handle the QEMU_PCI_CAP_EXPRESS flag: * vfio-pci (is_express=1, but legacy PCI handled by vfio_populate_device()) *

Re: [Qemu-devel] kvm_intel fails to load on Conroe CPUs running Linux 4.12

2017-08-27 Thread Gerhard Wiesinger
On 17.08.2017 23:14, Gerhard Wiesinger wrote: On 17.08.2017 22:58, Gerhard Wiesinger wrote: > > On 07.08.2017 19:50, Paolo Bonzini wrote: > > >Not much to say, unfortunately. It's pretty much the same capabilities > >as a Prescott/Cedar Mill processor, except that it has MSR bitmaps. It > >also

Re: [Qemu-devel] [PATCH 2/5] pci: Add interface names to hybrid PCI devices

2017-08-27 Thread Marcel Apfelbaum
On 24/08/2017 1:14, Eduardo Habkost wrote: The following devices support both PCIe and legacy PCI, by including special code to handle the QEMU_PCI_CAP_EXPRESS flag: * vfio-pci (is_express=1, but legacy PCI handled by vfio_populate_device()) * vmxnet3 (is_express=0, but PCIe handled by

Re: [Qemu-devel] [PATCH] xio3130_downstream: Report error if pcie_chassis_add_slot() failed

2017-08-27 Thread Marcel Apfelbaum
Hi Eduardo, On 25/08/2017 22:54, Eduardo Habkost wrote: On commit f8cd1b02 ("pci: Convert to realize"), no error_set*() call was added for the pcie_chassis_add_slot() error case. pcie_chassis_add_slot() errors get ignored, making QEMU crash later. e.g.: $ qemu-system-x86_64 -device ioh3420