Qemu version: qemu-2.2.0 release
Platform: x86_64
From: Halsey Pian [mailto:halsey.p...@gmail.com]
Sent: 2015年3月6日 15:04
To: qemu-devel@nongnu.org
Cc: halsey.p...@gmail.com
Subject: [Qemu-devel][Bug] qemu_coroutine_enter abort and report error
"Co-routine re-entered recursively"
Hi
Hi All,
I have two threads to write two seperate qcow2 files, but after a while, the
writing would be aborted in qemu_coroutine_enter, and report error “"Co-routine
re-entered recursively” .
Qemu should be thread safe, right? It seems that there are some variables is
not thread safe? C
Michael Tokarev writes:
> Another interesting tidbit is in hw/9pfs/virtio-9p-proxy.c.
>
> All filesystem methods use common v9fs_request() function,
> which returns -errno. So far so good.
>
> Now, *all* places which call this function, does this:
>
> retval = v9fs_request(...);
> if (re
At present, ISA bus support is always included in the build for all
targets. However these days there are a number of targets that have
never had ISA, and even more where many of the individual machines
don't have ISA.
Unfortunately there are some awkward dependencies in the core code on
ISA, alt
Currently PC machine types rely on fallback code in the monitor
implementation to correctly implement these hmp commands. Now that we have
MachineClass callbacks to control this properly, instantiate them in
pc_generic_machine_class_init().
Since this sets the MachineClass callbacks correctly for
Currently, the code to handle the legacy ISA bus is always included in
qemu. However there are lots of platforms that don't include ISA legacy
devies, and quite a few that have never used ISA legacy devices at all.
This patch allows the ISA bus code to be disabled in the configuration for
platfor
Currently all ppc targets rely on fallback code in monitor.c to implement
the "irq" and "pic" hmp commands, by calling into the i8259 code. For the
PReP machine type, which does usually have an ISA bridge and legacy IO,
including an i8259, this patch correctly sets the MachineClass callbacks
to im
The more commonly used ppc machine types: spapr, and newworld Mac have
already been converted to the newer MachineClass representation, but some
others still use QEMUMachine.
This patch cleans things up slightly, by converting the "prep" machine
type to the new style.
Signed-off-by: David Gibson
At present, the core device model code for 8250-like serial ports
(serial.c) and the code for serial ports attached to ISA-style legacy IO
(serial-isa.c) are both controlled by the CONFIG_ISA variable.
There are lots and lots of embedded platforms that have 8250-like serial
ports but have never ha
The hmp commands "irq" and "pic" are a bit of a mess. They're implemented
on a number of targets, but not all. On sparc32 and LM32 they do target
specific things, but on the remainder (i386, ppc and mips) they call into
the i8259 PIC code.
But really, what these commands do shouldn't be dependen
On 03/06/2015 02:17 AM, Eduardo Habkost wrote:
On Fri, Feb 13, 2015 at 06:25:24PM +0800, Zhu Guihua wrote:
From: Chen Fan
ICC bus was invented only to provide hotplug capability to
CPU and APIC because at the time being hotplug was available only for
BUS attached devices.
Now this patch is t
On 2015/3/6 1:12, Dr. David Alan Gilbert wrote:
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote:
Signed-off-by: zhanghailiang
Signed-off-by: Gao feng
---
include/net/colo-nic.h | 3 ++-
migration/colo.c | 22 ++
net/colo-nic.c | 19
On 2015/3/6 9:48, zhanghailiang wrote:
On 2015/3/5 21:31, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
Hi Dave,
Hi,
I'm getting COLO running on a couple of our machines here
and wanted to see what was actually going on, so I merged
in my recent rolling-stats code:
On 2015/3/5 21:31, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
Hi Dave,
Hi,
I'm getting COLO running on a couple of our machines here
and wanted to see what was actually going on, so I merged
in my recent rolling-stats code:
http://lists.gnu.org/archive/html/qemu-
On Fri, Mar 6, 2015 at 1:14 AM, Andrey Korolyov wrote:
> Hello,
>
> recently I`ve got a couple of shiny new Intel 2620v2s for future
> replacement of the E5-2620v1, but I experienced relatively many events
> with emulation errors, all traces looks simular to the one below. I am
> running qemu-2.1
A couple of #ifdef changes necessary to use NetBSD's ucontext
structs on sparc64 and arm.
Signed-off-by: Tobias Nygren
---
user-exec.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/user-exec.c b/user-exec.c
index 1ff8673..8f57e8a 100644
--- a/user-exec.c
++
On Thu, Mar 05, 2015 at 11:55:34PM +0200, Marcel Apfelbaum wrote:
> On 03/05/2015 09:52 PM, Michael S. Tsirkin wrote:
> >On Thu, Mar 05, 2015 at 04:55:08PM +0200, Marcel Apfelbaum wrote:
> >>Signed-off-by: Marcel Apfelbaum
> >>---
> >> hw/i386/acpi-build.c | 78
> >> +
Signed-off-by: Hervé Poussineau
---
hw/net/dp8393x.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 4f3e8a2..802f2b0 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -21,16 +21,10 @@
#include "qemu/timer.h"
#in
Signed-off-by: Laurent Vivier
Signed-off-by: Hervé Poussineau
---
hw/mips/mips_jazz.c |1 +
hw/net/dp8393x.c| 18 ++
2 files changed, 19 insertions(+)
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index 16a8368..cb33c9c 100644
--- a/hw/mips/mips_jazz.c
+++ b/h
Signed-off-by: Laurent Vivier
Signed-off-by: Hervé Poussineau
---
hw/mips/mips_jazz.c| 12 +--
hw/net/dp8393x.c | 83 +---
include/hw/mips/mips.h |5 ---
3 files changed, 67 insertions(+), 33 deletions(-)
diff --git a/hw/mips/mip
Signed-off-by: Hervé Poussineau
---
hw/net/dp8393x.c | 112 ++
1 file changed, 28 insertions(+), 84 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 802f2b0..f86a281 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -4
Signed-off-by: Hervé Poussineau
---
hw/net/dp8393x.c | 12
1 file changed, 12 insertions(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 7b658d9..49fa2a8 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -850,6 +850,17 @@ static void dp8393x_realize(DeviceState *de
Now that rc4030 internally uses an AddressSpace for DMA handling, make its root
memory region public. This is especially usefull for dp8393x netcard, which now
uses well known QEMU types and methods.
Signed-off-by: Hervé Poussineau
---
hw/dma/rc4030.c| 14 --
hw/mips/mips_j
Add a new memory region in system address space where DMA address space
definition (the 'translation table') belongs, so we can update on the fly
the DMA address space.
Signed-off-by: Hervé Poussineau
---
hw/dma/rc4030.c | 154 ++-
1 file chan
Hi,
This patchset improves dp8393x network card emulation to current QEMU standards,
mostly decouples it from MIPS rc4030 chipset emulation, and add PROM and
load/save
functionalities.
Only required cleanup has been done on the rc4030 side.
Patchset has been tested on MIPS Jazz emulation and on
Signed-off-by: Hervé Poussineau
---
hw/net/dp8393x.c | 80 --
1 file changed, 41 insertions(+), 39 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index f86a281..809f493 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -1
Hello,
recently I`ve got a couple of shiny new Intel 2620v2s for future
replacement of the E5-2620v1, but I experienced relatively many events
with emulation errors, all traces looks simular to the one below. I am
running qemu-2.1 on x86 on top of 3.10 branch for testing purposes but
can switch to
If userfaultfd is armed on a certain vma we can't "fill" the holes
with zeroes or we'll break the userland on demand paging. The holes if
the userfault is armed, are really missing information (not zeroes)
that the userland has to load from network or elsewhere.
The same issue happens for wrprotec
This implements the uABI of UFFDIO_REMAP.
Notably one mode bitflag is also forwarded (and in turn known) by the
lowlevel remap_pages method.
Signed-off-by: Andrea Arcangeli
---
include/uapi/linux/userfaultfd.h | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
di
On 03/05/2015 09:52 PM, Michael S. Tsirkin wrote:
On Thu, Mar 05, 2015 at 04:55:08PM +0200, Marcel Apfelbaum wrote:
Signed-off-by: Marcel Apfelbaum
---
hw/i386/acpi-build.c | 78
1 file changed, 78 insertions(+)
diff --git a/hw/i386/acpi-
From: Marcel Apfelbaum
Refactoring it as a method of PCIBusClass will allow
different implementations for subclasses.
Signed-off-by: Marcel Apfelbaum
---
hw/i386/kvm/pci-assign.c | 1 +
hw/pci/pci.c | 7 ---
hw/pci/pci_bus.c | 10 ++
hw/scsi/megasas.c|
PCI root buses can be attached to a specific NUMA node.
PCI buses are not attached be default to a NUMA node.
Signed-off-by: Marcel Apfelbaum
---
hw/pci/pci_bus.c | 7 +++
include/hw/pci/pci_bus.h | 6 ++
include/sysemu/sysemu.h | 1 +
3 files changed, 14 insertions(+)
diff --g
This test case checks that image files can be opened even if I/O
produces EIO errors. QEMU should not refuse opening failed disks since
the guest may be configured for multipath I/O where accessing failed
disks is expected.
Signed-off-by: Stefan Hajnoczi
---
tests/qemu-iotests/128 | 82
Since commit c25f53b06eba1575d5d0e92a0132455c97825b83 ("raw: Probe
required direct I/O alignment") QEMU has failed to launch if image files
produce I/O errors.
Previously, QEMU would launch successfully and the guest would see the
errors when attempting I/O.
This is a regression and may prevent m
Guests configured for multipath I/O might be started up with failed disks
attached. QEMU should not refuse starting when a disk returns I/O errors (and
in the past this behavior was implemented correctly).
This patch series fixes a regression that prevents QEMU from opening failed
disks and adds
Add tilegx architecture in "syscall_defs.h", all related features (ioctrl,
and stat) are based on Linux kernel tilegx 64-bit implementation.
Signed-off-by: Chen Gang
---
linux-user/syscall_defs.h | 38 ++
1 file changed, 34 insertions(+), 4 deletions(-)
diff
On Thu, Mar 05, 2015 at 05:44:58PM +0100, Andreas Färber wrote:
> Am 05.03.2015 um 17:42 schrieb Igor Mammedov:
[...]
> >> @@ -2840,7 +2842,6 @@ static void x86_cpu_initfn(Object *obj)
> >> CPUX86State *env = &cpu->env;
> >>
> >> cs->env_ptr = env;
> >> -cpu_exec_init(env);
> > look
They are for target features within qemu which independent from outside.
Signed-off-by: Chen Gang
---
linux-user/tilegx/target_cpu.h | 35 +++
linux-user/tilegx/target_signal.h | 28 ++
linux-user/tilegx/target_structs.h | 48 +
For tilegx, several syscall macros are not supported, so switch them to
avoid building break.
Signed-off-by: Chen Gang
---
linux-user/syscall.c | 50 +-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user
On Thu, Mar 05, 2015 at 12:38:44PM -0300, Eduardo Habkost wrote:
> Eduardo Habkost (6):
> cpu: No need to zero-initialize numa_node
> cpu: Initialize breakpoint/watchpoint lists on cpu_common_initfn()
> cpu: Reorder cpu->as and cpu->thread_id initialization
Andreas, do you want to queue the
> +static int mcopy_atomic_pte(struct mm_struct *dst_mm,
> + pmd_t *dst_pmd,
> + struct vm_area_struct *dst_vma,
> + unsigned long dst_addr,
> + unsigned long src_addr)
> +{
> + struct mem_cgroup *me
Add main working flow feature and loading elf64 tilegx binary feature,
based on Linux kernel tilegx 64-bit implementation.
After this patch, qemu can successfully load elf64 tilegx binary for
linux-user, and the working flow reaches the first correct instruction
position "__start".
Signed-off-by:
After load elf64 tilegx binary for linux-user, the working flow reaches
1st correct instruction "__start". Next, we shall load all instructions
for qemu using.
This patch is based on Linux kernel tile architecture tilegx 64-bit
implementation, and also based on tilegx architecture ABI reference.
It is the configure and build system support for TILE-Gx (tilegx will be
used in configure and real sub-directory name), and at present, it is
linux-user only.
Signed-off-by: Chen Gang
---
configure | 3 +
default-configs/tilegx-linux-user.mak | 1 +
target-tilegx
They are based on Linux kernel tilegx architecture for 64 bit binary,
also based on tilegx ABI reference document.
Signed-off-by: Chen Gang
---
linux-user/tilegx/syscall.h| 80
linux-user/tilegx/syscall_nr.h | 278
linux-user/tilegx/term
> All UFFDIO_COPY/ZEROPAGE/REMAP methods already support CRIU postcopy
> live migration and the UFFD can be passed to a manager process through
> unix domain sockets to satisfy point 5).
Yup :) That's the best (from my POV) point of ufd -- the ability to delegate
the descriptor to some other task
> diff --git a/kernel/fork.c b/kernel/fork.c
> index cf65139..cb215c0 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -425,6 +425,7 @@ static int dup_mmap(struct mm_struct *mm, struct
> mm_struct *oldmm)
> goto fail_nomem_anon_vma_fork;
> tmp->vm_flags &
> +ssize_t remap_pages(struct mm_struct *dst_mm, struct mm_struct *src_mm,
> + unsigned long dst_start, unsigned long src_start,
> + unsigned long len, __u64 mode)
> +{
> + struct vm_area_struct *src_vma, *dst_vma;
> + long err = -EINVAL;
> + pmd_t *src_p
> +int handle_userfault(struct vm_area_struct *vma, unsigned long address,
> + unsigned int flags, unsigned long reason)
> +{
> + struct mm_struct *mm = vma->vm_mm;
> + struct userfaultfd_ctx *ctx;
> + struct userfaultfd_wait_queue uwq;
> +
> + BUG_ON(!rwsem_is_loc
Public bug reported:
This was observed in qemu v2.1.3, running a sample app from
FreeRTOS(FreeRTOSV7.5.2/FreeRTOS/Demo/CORTEX_LM3S_Eclipse/RTOSDemo)
In the sample code compiled with arm-none-eabi-gcc , version 4.8.2
(4.8.2-14ubuntu1+6) .
qemu seems to be executing the wrong instrunction aft
On Thu, Mar 05, 2015 at 04:55:08PM +0200, Marcel Apfelbaum wrote:
> Signed-off-by: Marcel Apfelbaum
> ---
> hw/i386/acpi-build.c | 78
>
> 1 file changed, 78 insertions(+)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index e
On Thu, Mar 5, 2015 at 10:51 AM, Andrea Arcangeli wrote:
>
> Thanks for your idea that the UFFDIO_COPY is faster, the userland code
> we submitted for qemu only uses UFFDIO_COPY|ZEROPAGE, it never uses
> UFFDIO_REMAP.
Ok. So there's no actual expected use of the remap interface. Good.
That makes
On Thu, Mar 05, 2015 at 07:35:17PM +0100, Andreas Färber wrote:
> Am 05.03.2015 um 14:43 schrieb Eduardo Habkost:
> > On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote:
> >> The existing apic_id = cpu_index code has no visible effect: the PC code
> >> already initializes the APIC ID a
* Wen Congyang (we...@cn.fujitsu.com) wrote:
> On 03/05/2015 12:35 AM, Dr. David Alan Gilbert wrote:
> > * Wen Congyang (we...@cn.fujitsu.com) wrote:
> >> Signed-off-by: Wen Congyang
> >> Signed-off-by: Paolo Bonzini
> >> Signed-off-by: Yang Hongyang
> >> Signed-off-by: zhanghailiang
> >> Signe
On Thu, Mar 05, 2015 at 09:39:48AM -0800, Linus Torvalds wrote:
> Is this really worth it? On real loads? That people are expected to use?
I fully agree that it's not worth merging upstream UFFDIO_REMAP until
(and if) a real world usage for it will showup. To further clarify:
would this not have b
On Fri, Feb 13, 2015 at 06:25:32PM +0800, Zhu Guihua wrote:
> From: Chen Fan
>
> Add support to device_add foo-x86_64-cpu, and additional checks of
> apic id are added into x86_cpuid_set_apic_id() to avoid duplicate.
> Besides, in order to support "device/device_add foo-x86_64-cpu"
> which withou
Am 05.03.2015 um 14:43 schrieb Eduardo Habkost:
> On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote:
>> The existing apic_id = cpu_index code has no visible effect: the PC code
>> already initializes the APIC ID according to the topology on
>> pc_new_cpu(), and linux-user memcpy()s th
On Fri, Feb 13, 2015 at 06:25:28PM +0800, Zhu Guihua wrote:
> From: Gu Zheng
>
> Move cpu vmstate register from cpu_exec_init into cpu_common_realizefn,
> and use cc->get_arch_id as the instance id that suggested by Igor to
> fix the migration issue.
If you are implementing something new, please
zhanghailiang writes:
> The original 'status' is an open-coded 'str' type, convert it to use an
> enum type.
> This conversion is backwards compatible, better documented and
> more convenient for future extensibility.
>
> We also rename 'MIGRATION_STATUS_ERROR' to 'MIGRATION_STATUS_FAILED'.
> In
On Fri, Feb 13, 2015 at 06:25:24PM +0800, Zhu Guihua wrote:
> From: Chen Fan
>
> ICC bus was invented only to provide hotplug capability to
> CPU and APIC because at the time being hotplug was available only for
> BUS attached devices.
>
> Now this patch is to drop ICC bus impl, and switch to bu
Michael Tokarev writes:
> I was looking at various interesting functions in hw/9pfs/virtio-9p-local.c
> and noticed local_open2() which basically tries to open a file in a
> filesystem, and if that is successful, it tries to set file credentials
> using a configured mechanism, and if that fails,
On Thu, Mar 05, 2015 at 01:53:57PM +0100, Kevin Wolf wrote:
> Am 04.03.2015 um 23:48 hat Stefan Hajnoczi geschrieben:
> > Since commit c25f53b06eba1575d5d0e92a0132455c97825b83 ("raw: Probe
> > required direct I/O alignment") QEMU has failed to launch if image files
> > produce I/O errors.
> >
> >
On Wed, Mar 04, 2015 at 05:16:51PM +0100, Alberto Garcia wrote:
> On Wed, Mar 04, 2015 at 10:04:27AM -0600, Stefan Hajnoczi wrote:
>
> > > > This pattern suggests throttle_timer_fired() should acquire the
> > > > lock internally instead.
> > >
> > > The idea is that the ThrottleState code itself
On Thu, Mar 5, 2015 at 9:18 AM, Andrea Arcangeli wrote:
> remap_pages is the lowlevel mm helper needed to implement
> UFFDIO_REMAP.
This function is nasty nasty nasty.
Is this really worth it? On real loads? That people are expected to use?
Considering how we just got rid of one special magic V
On Thu, Mar 05, 2015 at 09:05:52PM +0800, Yi Wang wrote:
> Thanks for your reply and Happy Lantern Festival!
> I am afraid you misunderstood what I mean, maybe I didn't express
> clearly :-) My patch works in such case:
> Firstly vm has two disks:
> [root@fox-host vmimg]# virsh domblklist win7
> Ta
On Mon, 2015-03-02 at 09:20 +0800, Chen, Tiejun wrote:
> Is this expected?
Yes. Can you post it as a proper patch please.
I suggest you split the basic stuff and the kind override discussed
below in to two patches.
> >> +(b_info->u.hvm.gfx_passthru &&
> >> + strncmp(b_inf
This adds the vm_userfaultfd_ctx to the vm_area_struct.
Signed-off-by: Andrea Arcangeli
---
include/linux/mm_types.h | 11 +++
kernel/fork.c| 1 +
2 files changed, 12 insertions(+)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 199a03a..fbf21f5 10064
Defines the uAPI of the userfaultfd, notably the ioctl numbers and protocol.
Signed-off-by: Andrea Arcangeli
---
Documentation/ioctl/ioctl-number.txt | 1 +
include/uapi/linux/userfaultfd.h | 81
2 files changed, 82 insertions(+)
create mode 100644 incl
This removes yet another chunk of PC-specific code from target-i386/cpu.c and
moves it to PC code.
WIth this we get closer to being able to change target-i386 to use
cpu_generic_init().
This series is based on my x86 tree, located at:
https://github.com/ehabkost/qemu.git x86
Eduardo Habkost (1
Instead of passing icc_bridge from the PC initialization code to
cpu_x86_create(), make the PC initialization code attach the CPU to
icc_bridge.
The only difference here is that icc_bridge attachment will now be done
after x86_cpu_parse_featurestr() is called. But this shouldn't make any
differenc
CC'ing X86 maintainers.
On 03/04/2015 12:48 PM, Bill Paul wrote:
Hi guys. I seem to have found a bug in the helper_systet() function in
target-i386/seg_helper.c. I downloaded the Intel architecture manual
from here:
http://www.intel.com/content/www/us/en/processors/architectures-software-devel
This implements mcopy_atomic and mfill_zeropage that are the lowlevel
VM methods that are invoked respectively by the UFFDIO_COPY and
UFFDIO_ZEROPAGE userfaultfd commands.
Signed-off-by: Andrea Arcangeli
---
include/linux/userfaultfd_k.h | 6 +
mm/Makefile | 1 +
mm/userfau
These helpers will be used to know if to call handle_userfault() during
wrprotect faults in order to deliver the wrprotect faults to userland.
Signed-off-by: Andrea Arcangeli
---
include/linux/userfaultfd_k.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/linux/userfault
Once an userfaultfd has been created and certain region of the process
virtual address space have been registered into it, the thread
responsible for doing the memory externalization can manage the page
faults in userland by talking to the kernel using the userfaultfd
protocol.
poll() can be used
Kernel header defining the methods needed by the VM common code to
interact with the userfaultfd.
Signed-off-by: Andrea Arcangeli
---
include/linux/userfaultfd_k.h | 79 +++
1 file changed, 79 insertions(+)
create mode 100644 include/linux/userfaultfd_k.h
Hello everyone,
This is a RFC for the userfaultfd syscall API v3 that addresses the
feedback received for the previous v2 submit.
The main change from the v2 is that MADV_USERFAULT/NOUSERFAULT
disappeared (they're replaced by the UFFDIO_REGISTER/UNREGISTER
ioctls). In short userfaults are now onl
This is where the page faults must be modified to call
handle_userfault() if userfaultfd_missing() is true (so if the
vma->vm_flags had VM_UFFD_MISSING set).
handle_userfault() then takes care of blocking the page fault and
delivering it to userland.
The fault flags must also be passed as paramet
remap_pages is the lowlevel mm helper needed to implement
UFFDIO_REMAP.
Signed-off-by: Andrea Arcangeli
---
include/linux/userfaultfd_k.h | 17 ++
mm/huge_memory.c | 120 ++
mm/userfaultfd.c | 526 ++
3 files changed, 663
This remap ioctl allows to atomically move a page in or out of an
userfaultfd address space. It's more expensive than "copy" (and of
course more expensive than "zerofill") as it requires a TLB flush on
the source range for each ioctl, which is an expensive operation on
SMP. Especially if copying on
These two ioctl allows to either atomically copy or to map zeropages
into the virtual address space. This is used by the thread that opened
the userfaultfd to resolve the userfaults.
Signed-off-by: Andrea Arcangeli
---
fs/userfaultfd.c | 100 ++
As far as the rmap code is concerned, rmap_pages only alters the
page->mapping and page->index. It does it while holding the page
lock. However there are a few places that in presence of anon pages
are allowed to do rmap walks without the page lock (split_huge_page
and page_referenced_anon). Those
userfaultfd needs to wake all waitqueues (pass 0 as nr parameter),
instead of the current hardcoded 1 (that would wake just the first
waitqueue in the head list).
Signed-off-by: Andrea Arcangeli
---
include/linux/wait.h | 5 +++--
kernel/sched/wait.c | 7 ---
net/sunrpc/sched.c | 2 +-
3
Provide a new swapfile method for remap_pages() to verify the swap
entry is mapped only in one vma before relocating the swap entry in a
different virtual address. Otherwise if the swap entry is mapped in
multiple vmas, when the page is swapped back in, it could get mapped
in a non linear way in so
This activates the userfaultfd syscall.
Signed-off-by: Andrea Arcangeli
---
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 2 +-
arch/powerpc/include/uapi/asm/unistd.h | 1 +
arch/x86/syscalls/syscall_32.tbl | 1 +
arch/x86/syscalls/syscall_64.tbl
This implements the uABI of UFFDIO_COPY and UFFDIO_ZEROPAGE.
Signed-off-by: Andrea Arcangeli
---
include/uapi/linux/userfaultfd.h | 46 +++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/use
vma->vm_userfaultfd_ctx is yet another vma parameter that vma_merge
must be aware about so that we can merge vmas back like they were
originally before arming the userfaultfd on some memory range.
Signed-off-by: Andrea Arcangeli
---
include/linux/mm.h | 2 +-
mm/madvise.c | 3 ++-
mm/mem
This allows to select the userfaultfd during configuration to build it.
Signed-off-by: Andrea Arcangeli
---
fs/Makefile | 1 +
init/Kconfig | 11 +++
2 files changed, 12 insertions(+)
diff --git a/fs/Makefile b/fs/Makefile
index a88ac48..ba8ab62 100644
--- a/fs/Makefile
+++ b/fs/Makef
These two flags gets set in vma->vm_flags to tell the VM common code
if the userfaultfd is armed and in which mode (only tracking missing
faults, only tracking wrprotect faults or both). If neither flags is
set it means the userfaultfd is not armed on the vma.
Signed-off-by: Andrea Arcangeli
---
Add documentation.
Signed-off-by: Andrea Arcangeli
---
Documentation/vm/userfaultfd.txt | 97
1 file changed, 97 insertions(+)
create mode 100644 Documentation/vm/userfaultfd.txt
diff --git a/Documentation/vm/userfaultfd.txt b/Documentation/vm/userfault
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote:
> Signed-off-by: zhanghailiang
> Signed-off-by: Gao feng
> ---
> include/net/colo-nic.h | 3 ++-
> migration/colo.c | 22 ++
> net/colo-nic.c | 19 +++
> 3 files changed, 39 insertions(+),
Am 05.03.2015 um 17:42 schrieb Igor Mammedov:
> On Thu, 5 Mar 2015 12:38:50 -0300
> Eduardo Habkost wrote:
>
>> To allow new code to ask the CPU classes for CPU model information and
>> allow QOM properties to be queried by qmp_device_list_properties(), we
>> need to be able to safely instantiat
On Thu, 5 Mar 2015 12:38:50 -0300
Eduardo Habkost wrote:
> To allow new code to ask the CPU classes for CPU model information and
> allow QOM properties to be queried by qmp_device_list_properties(), we
> need to be able to safely instantiate a X86CPU object without any
> side-effects.
>
> cpu_
On Thu, Mar 05, 2015 at 05:31:39PM +0100, Igor Mammedov wrote:
> On Thu, 5 Mar 2015 12:38:48 -0300
> Eduardo Habkost wrote:
>
> > Rename the function so that the reason for its existence is clearer: it
> > does x86-specific initialization of TCG structures.
> >
> > Signed-off-by: Eduardo Habkos
On Thu, 5 Mar 2015 12:38:47 -0300
Eduardo Habkost wrote:
> Instead of initializing cpu->as and cpu->thread_id while holding
> cpu_list_lock(), initialize it earlier.
>
> This allows the code handling cpu_index and global CPU list to be
> isolated from the rest.
>
> Signed-off-by: Eduardo Habko
On Thu, 5 Mar 2015 12:38:46 -0300
Eduardo Habkost wrote:
> One small step in the simplification of cpu_exec_init().
>
> Signed-off-by: Eduardo Habkost
Reviewed-by: Igor Mammedov
> ---
> exec.c| 2 --
> qom/cpu.c | 2 ++
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
On Thu, 5 Mar 2015 12:38:48 -0300
Eduardo Habkost wrote:
> Rename the function so that the reason for its existence is clearer: it
> does x86-specific initialization of TCG structures.
>
> Signed-off-by: Eduardo Habkost
> ---
> target-i386/cpu.c | 2 +-
> target-i386/cpu.h | 2 +-
QOM objects are already zero-filled when instantiated, there's no need
to explicitly set numa_node to 0.
Signed-off-by: Eduardo Habkost
---
exec.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/exec.c b/exec.c
index c85321a..3a61e51 100644
--- a/exec.c
+++ b/exec.c
@@ -542,7 +542,6 @@ void c
On Thu, 5 Mar 2015 12:38:45 -0300
Eduardo Habkost wrote:
> QOM objects are already zero-filled when instantiated, there's no need
> to explicitly set numa_node to 0.
>
> Signed-off-by: Eduardo Habkost
Reviewed-by: Igor Mammedov
> ---
> exec.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff
Am 05.03.2015 um 14:37 schrieb Eduardo Habkost:
> On Thu, Mar 05, 2015 at 01:32:02AM +0100, Andreas Färber wrote:
>> Am 04.03.2015 um 03:13 schrieb Eduardo Habkost:
>>> The APIC ID compatibility code is required only for PC, and now that
>>> x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index()
Instead of initializing cpu->as and cpu->thread_id while holding
cpu_list_lock(), initialize it earlier.
This allows the code handling cpu_index and global CPU list to be
isolated from the rest.
Signed-off-by: Eduardo Habkost
---
exec.c | 9 +
1 file changed, 5 insertions(+), 4 deletion
1 - 100 of 210 matches
Mail list logo