Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-08 Thread Andrew Jones
On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > diff --git a/Documentation/virtual/kvm/pv_event.txt > b/Documentation/virtual/kvm/pv_event.txt > new file mode 100644 > index 000..0ebc890 > --- /dev/null > +++ b/Documentation/virtual/kvm/pv_event.txt > @@ -0,0 +1,32 @@ > +The KV

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-05 Thread Andrew Jones
- Original Message - > On Tue, Dec 4, 2012 at 4:10 AM, Andrew Jones > wrote: > > > > > > - Original Message - > >> On Thu, Nov 29, 2012 at 1:34 AM, liu ping fan > >> wrote: > >> > On Thu, Nov 29, 2012 at 12:42 PM, Cam Macd

Re: [Qemu-devel] [PATCH 1/3] qga: introduce guest-get-vcpus / guest-set-vcpus with stubs

2013-03-05 Thread Andrew Jones
- Original Message - > On 03/05/13 22:08, Eric Blake wrote: > > On 03/04/2013 03:19 PM, Laszlo Ersek wrote: > >> Signed-off-by: Laszlo Ersek > >> --- > > > >> +# @guest-set-vcpus: > >> +# > >> +# Attempt to reconfigure (currently: enable/disable) logical > >> processors inside > >> +# t

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

2013-08-20 Thread Andrew Jones
- Original Message - > Set the guest numa nodes memory policies using the mbind(2) > system call node by node. > After this patch, we are able to set guest nodes memory policies > through the QEMU options, this arms to solve the guest cross > nodes memory access performance issue. > And a

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

2013-08-21 Thread Andrew Jones
- Original Message - > On 08/20/2013 09:41 PM, Andrew Jones wrote: > >> + > >> +/* This is a workaround for a long standing bug in Linux' > >> + * mbind implementation, which cuts off the last specified > >> + * node. To

[Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-22 Thread Andrew Jones
qemu should check KVM_CAP_NR_VCPUS for the recommended number of vcpus. This patch adds a warning if a user specifies a number of cpus between the recommended and max. Signed-off-by: Andrew Jones --- kvm-all.c | 45 +++-- 1 file changed, 27 insertions(+

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-23 Thread Andrew Jones
- Original Message - > Add detection of libnuma (mostly contained in the numactl package) > to the configure script. Can be enabled or disabled on the command line, > default is use if available. > > Signed-off-by: Andre Przywara > Signed-off-by: Wanlong Gao Is this patch still necess

Re: [Qemu-devel] [PATCH V9 08/12] NUMA: set guest numa nodes memory policy

2013-08-23 Thread Andrew Jones
- Original Message - > Set the guest numa nodes memory policies using the mbind(2) > system call node by node. > After this patch, we are able to set guest nodes memory policies > through the QEMU options, this arms to solve the guest cross > nodes memory access performance issue. > And a

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Andrew Jones
- Original Message - > Am 22.08.2013 18:12, schrieb Eduardo Habkost: > > > > On 22/08/2013, at 12:39, Andrew Jones wrote: > > > >> The comment in kvm_max_vcpus() states that it's using the recommended > >> procedure from the kernel API docum

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Andrew Jones
- Original Message - > Il 22/08/2013 17:39, Andrew Jones ha scritto: > > The comment in kvm_max_vcpus() states that it's using the recommended > > procedure from the kernel API documentation to get the max number > > of vcpus that kvm supports. It is, b

[Qemu-devel] [PATCH v2] kvm: warn if num cpus is greater than num recommended

2013-08-23 Thread Andrew Jones
r the fail case was slightly changed, 'exceeds max cpus' to 'exceeds the maximum cpus'. If this is unacceptable change for users like libvirt, then I'll need to spin a v3. Signed-off-by: Andrew Jones --- kvm-all.c | 69 -

Re: [Qemu-devel] [PATCH V9 07/12] NUMA: parse guest numa nodes memory policy

2013-08-23 Thread Andrew Jones
- Original Message - > The memory policy setting format is like: > > policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N > And we are adding this setting as a suboption of "-numa mem,", > the memory policy then can be set like following: > -numa node,node

Re: [Qemu-devel] [PATCH V9 07/12] NUMA: parse guest numa nodes memory policy

2013-08-26 Thread Andrew Jones
- Original Message - > On 08/23/2013 10:11 PM, Andrew Jones wrote: > > > > > > - Original Message - > >> The memory policy setting format is like: > >> > >> policy={default|membind|interleave|preferred}[,relative=true],host-

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-26 Thread Andrew Jones
- Original Message - > On 08/23/2013 04:40 PM, Andrew Jones wrote: > > > > > > - Original Message - > >> Add detection of libnuma (mostly contained in the numactl package) > >> to the configure script. Can be enabled or disabled on t

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-26 Thread Andrew Jones
- Original Message - > Il 23/08/2013 13:33, Andrew Jones ha scritto: > > Does smp_cpus map to the current > > number of cpus, or to the number of possible cpus? If it maps to the number > > of possible cpus, then this is the right place. If the former, then I gues

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-26 Thread Andrew Jones
- Original Message - > On 08/26/2013 03:46 PM, Andrew Jones wrote: > >>> Is this patch still necessary? I thought that dropping the > >>> > > numa_num_configured_nodes() calls from patch 8/12 got rid > >>> > > of the need for this lib

Re: [Qemu-devel] [libvirt] [PATCH v2] kvm: warn if num cpus is greater than num recommended

2013-08-28 Thread Andrew Jones
- Original Message - > On 08/23/2013 07:24 AM, Andrew Jones wrote: > > The comment in kvm_max_vcpus() states that it's using the recommended > > procedure from the kernel API documentation to get the max number > > of vcpus that kvm supports. It is, b

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-29 Thread Andrew Jones
- Original Message - > On 08/28/2013 09:44 PM, Paolo Bonzini wrote: > > Il 26/08/2013 10:43, Andrew Jones ha scritto: > >> > >> - Original Message - > >>>> On 08/26/2013 03:46 PM, Andrew Jones wrote: > >>>>>>

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-29 Thread Andrew Jones
- Original Message - > > > - Original Message - > > On 08/28/2013 09:44 PM, Paolo Bonzini wrote: > > > Il 26/08/2013 10:43, Andrew Jones ha scritto: > > >> > > >> - Original Message ----- > > >>>> On 08/

[Qemu-devel] [PATCH] ivshmem: use error_report

2014-09-18 Thread Andrew Jones
Replace all the fprintf(stderr, ...) calls with error_report. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index bf585b7691998..d285df7d65a9f 100644 --- a

Re: [Qemu-devel] [PATCH] ivshmem: use error_report

2014-09-18 Thread Andrew Jones
On Thu, Sep 18, 2014 at 04:46:55PM -0600, Eric Blake wrote: > On 09/18/2014 04:39 PM, Andrew Jones wrote: > > Replace all the fprintf(stderr, ...) calls with error_report. > > > > Signed-off-by: Andrew Jones > > --- > > hw/misc/ivshmem.c | 27 +-

[Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-18 Thread Andrew Jones
Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-10-07 Thread Andrew Jones
On Mon, Sep 22, 2014 at 02:20:09PM +0300, Michael S. Tsirkin wrote: > On Fri, Sep 19, 2014 at 04:42:59PM +0800, zhanghailiang wrote: > > On 2014/9/19 15:34, zhanghailiang wrote: > > >On 2014/9/19 7:17, Andrew Jones wrote: > > >>Replace all the fprintf(stderr

[Qemu-devel] [PATCH v3] ivshmem: use error_report

2014-10-07 Thread Andrew Jones
Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. While at it cleanup some indentation in the printf argument lists. Signed-off-by: Andrew Jones --- v3: fix indentation of printf argument lists [Hailiang

Re: [Qemu-devel] [PATCH 2/6] libqemustub: add more stubs for qemu-char

2014-06-19 Thread Andrew Jones
On Thu, Jun 19, 2014 at 06:07:40PM +0300, Nikolay Nikolaev wrote: > Additional stubs: > - chr_baum_init > - qemu_chr_open_spice_vmc > - qemu_chr_open_spice_port > > Signed-off-by: Nikolay Nikolaev > --- > stubs/Makefile.objs |2 ++ > stubs/chr-baum-init.c |7 +++ > s

[Qemu-devel] [PATCH] hw/arm/virt: fix pl031 addr typo

2014-07-29 Thread Andrew Jones
pl031's base address should be 0x9001000, 0x9001. While in there also add some spacing and zeros to make it easier to read the map. Signed-off-by: Andrew Jones --- hw/arm/virt.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/arm/virt.c b/h

Re: [Qemu-devel] [PATCH] hw/arm/virt: fix pl031 addr typo

2014-07-29 Thread Andrew Jones
On Tue, Jul 29, 2014 at 04:58:44PM +0100, Peter Maydell wrote: > On 29 July 2014 16:44, Andrew Jones wrote: > > pl031's base address should be 0x9001000, 0x9001. While in there ^ meant to type 'not' here, but guess that

[Qemu-devel] [PATCH v2] hw/arm/virt: fix pl031 addr typo

2014-07-29 Thread Andrew Jones
pl031's base address should be 0x901, not 0x9001, otherwise it sits in ram when configuring a guest with greater than 1G. Signed-off-by: Andrew Jones --- v2: - pl031 needs 64K alignment - don't change the formatting, will send another patch, which may get ignored :-) -

[Qemu-devel] [PATCH] hw/arm/virt: formatting: memory map

2014-07-29 Thread Andrew Jones
Signed-off-by: Andrew Jones --- hw/arm/virt.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 89532bd786436..ba9429806 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -98,17 +98,17 @@ typedef struct VirtBoardInfo { *

Re: [Qemu-devel] [PATCH 1/4] mm: madvise MADV_USERFAULT

2013-05-07 Thread Andrew Jones
On Mon, May 06, 2013 at 09:56:58PM +0200, Andrea Arcangeli wrote: > +++ b/mm/madvise.c > @@ -93,6 +93,21 @@ static long madvise_behavior(struct vm_area_struct * vma, > if (error) > goto out; > break; > + case MADV_USERFAULT: > + if (

Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages()

2013-05-07 Thread Andrew Jones
On Mon, May 06, 2013 at 09:56:57PM +0200, Andrea Arcangeli wrote: > > The current behavior of remap_anon_pages is very strict to avoid any > chance of memory corruption going unnoticed, and it will return > -EFAULT at the first sign of something unexpected (like a page already > mapped in the dest

[Qemu-devel] [PATCH v3] virtio: Introduce virtio-testdev

2014-01-29 Thread Andrew Jones
code --- v3: Convert to QOM realize v2: - No real functional changes, just added some comments and changed register bank accesses to use byte offsets, allowing the driver implementation to better mirror this device's implementation. Signed-off-by: Andrew Jones --- hw/virtio/Makefile.obj

Re: [Qemu-devel] [PATCH v3] virtio: Introduce virtio-testdev

2014-01-30 Thread Andrew Jones
On Thu, Jan 30, 2014 at 07:44:59AM -0500, Mike Day wrote: > > Andrew Jones writes: > > > This is a virtio version of hw/misc/debugexit and should evolve into a > > virtio version of pc-testdev. pc-testdev uses the PC's ISA bus, whereas > > this testdev c

[Qemu-devel] [PATCH v2] virtio: Introduce virtio-testdev

2013-12-04 Thread Andrew Jones
code --- v2: - No real functional changes, just added some comments and changed register bank accesses to use byte offsets, allowing the driver implementation to better mirror this device's implementation. Signed-off-by: Andrew Jones --- hw/virtio/Makefile.objs| 1 + hw/virtio/virtio

Re: [Qemu-devel] [PATCH V16 09/11] NUMA: set guest numa nodes memory policy

2013-11-27 Thread Andrew Jones
On Wed, Nov 27, 2013 at 03:35:53PM +0100, Paolo Bonzini wrote: > > + > > +len = numa_info[nodeid].node_mem; > > +bind_mode = node_parse_bind_mode(nodeid); > > +unsigned long *nodes = numa_info[nodeid].host_mem; > > + > > +/* This is a workaround for a long standing bug in Linux' > >

[Qemu-devel] [PATCH] virtio: Introduce virtio-testdev

2013-10-14 Thread Andrew Jones
code Note, the protocol also requires all data passing through the config space to be in little-endian. See [1] for an example of a driver for this device. [1] https://github.com/rhdrjones/kvm-unit-tests/blob/ff8df5378ffccfbdf25fe79241837e61eb2258e1/lib/virtio-testdev.c Signed-off-by: Andrew

Re: [Qemu-devel] [PATCH] virtio: Introduce virtio-testdev

2013-10-15 Thread Andrew Jones
On Tue, Oct 15, 2013 at 12:26:10PM +0530, Anup Patel wrote: > Hi Andrew, > > On Mon, Oct 14, 2013 at 9:29 PM, Andrew Jones wrote: > > This is a virtio version of hw/misc/debugexit and should evolve into a > > virtio version of pc-testdev. pc-testdev uses the PC's

Re: [Qemu-devel] [PATCH] import kvm-unittest in QEMU source tree

2013-10-30 Thread Andrew Jones
On Wed, Oct 16, 2013 at 10:03:37PM +0300, Michael S. Tsirkin wrote: > This simply imports kvm-unittest git into qemu source tree. > > We can next work on making make check run it > automatically. > > Squashed 'kvm-unittest/' content from commit 2bc0e29 > > git-subtree-dir: kvm-unittest > git-sub

[Qemu-devel] [PATCH 0/5] tcg-arm: LPAE: fix and extend xn control

2015-02-12 Thread Andrew Jones
.gnu.org/archive/html/qemu-devel/2015-01/msg01433.html [2] https://github.com/rhdrjones/kvm-unit-tests/commit/ee553e4bb795b0150e31c794bf8953dfb08d619a Andrew Jones (5): target-arm: convert check_ap to get_rw_prot target-arm: enable get_rw_prot to take simple AP target-arm: add an i

[Qemu-devel] [PATCH 3/5] target-arm: add an is_user param to get_rw_prot

2015-02-12 Thread Andrew Jones
Give callers the ability to get page protection flags for PL0, even if not currently operating in PL0. This puts the burden of determining 'is_user' on the caller (again - it was this way before regime_is_user was introduced), but will be useful in a following patch. Signed-off-by: An

[Qemu-devel] [PATCH 2/5] target-arm: enable get_rw_prot to take simple AP

2015-02-12 Thread Andrew Jones
Teach get_rw_prot about the simple AP format AP[2:1]. An additional switch was added, as opposed to converting ap := AP[2:1] to AP[2:0] with a simple shift - and then modifying cases 0,2,4,6, because the resulting code is easier to read with the switch. Signed-off-by: Andrew Jones --- target

[Qemu-devel] [PATCH 5/5] target-arm: apply get_S1prot to get_phys_addr_v6

2015-02-12 Thread Andrew Jones
Now that we have get_S1prot, we can apply it to get_phys_addr_v6 for a minor code cleanup. Signed-off-by: Andrew Jones --- target-arm/helper.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index

[Qemu-devel] [PATCH 1/5] target-arm: convert check_ap to get_rw_prot

2015-02-12 Thread Andrew Jones
. Signed-off-by: Andrew Jones --- target-arm/helper.c | 47 +-- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 1a1a00577e780..610f305c4d661 100644 --- a/target-arm/helper.c +++ b/target-arm

[Qemu-devel] [PATCH 4/5] target-arm: get_phys_addr_lpae: more xn control

2015-02-12 Thread Andrew Jones
v6 XN determination. It may even work in EL2, when support for that comes, but, as the function name implies, it only works for stage 1 translations. Signed-off-by: Andrew Jones --- target-arm/helper.c | 111 1 file changed, 86 insertions(+),

Re: [Qemu-devel] [PATCH 5/5] target-arm: apply get_S1prot to get_phys_addr_v6

2015-02-12 Thread Andrew Jones
On Thu, Feb 12, 2015 at 04:05:07PM +0100, Andrew Jones wrote: > Now that we have get_S1prot, we can apply it to get_phys_addr_v6 > for a minor code cleanup. Actually, I should point out that this isn't just a cleanup, but also a fix. See below. > > Signed-off-by: Andrew Jones

Re: [Qemu-devel] [PATCH 4/5] target-arm: get_phys_addr_lpae: more xn control

2015-02-12 Thread Andrew Jones
On Thu, Feb 12, 2015 at 04:05:06PM +0100, Andrew Jones wrote: > This patch makes the following changes to the determination of > whether an address is executable, when translating addresses > using LPAE. > > 1. No longer assumes that PL0 can't execute when it can't read.

Re: [Qemu-devel] [PATCH 0/5] tcg-arm: LPAE: fix and extend xn control

2015-02-24 Thread Andrew Jones
On Thu, Feb 12, 2015 at 04:05:02PM +0100, Andrew Jones wrote: > This series fixes and extends the determination of whether or > not an address is executable for LPAE translations. The main > patch is 4/5, and describes the details in its commit message. > Patches 1-3 prepare for th

Re: [Qemu-devel] [PATCH 0/5] tcg-arm: LPAE: fix and extend xn control

2015-02-24 Thread Andrew Jones
On Wed, Feb 25, 2015 at 12:08:16AM +0900, Peter Maydell wrote: > On 25 February 2015 at 00:06, Andrew Jones wrote: > > Ping? This isn't a huge priority, but I wouldn't want it to get lost either. > > I'm on holiday :-) Easy stuff is getting done but things that

Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append()

2015-01-26 Thread Andrew Jones
On Mon, Jan 26, 2015 at 04:09:20PM +0100, Igor Mammedov wrote: > On Mon, 26 Jan 2015 10:57:21 +0100 > Igor Mammedov wrote: > > > On Sat, 24 Jan 2015 18:33:50 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Jan 23, 2015 at 06:56:20PM +0100, Igor Mammedov wrote: > > > > On Fri, 23 Jan 201

Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append()

2015-01-28 Thread Andrew Jones
On Wed, Jan 28, 2015 at 09:56:26AM +0200, Michael S. Tsirkin wrote: > > I've tried redo series with passing alloc list as first argument, > > looks ugly as hell > > I tried too. Not too bad at all. See below: I'm not so sure. Looking at the version below, I find the acpi_arg1(p) the most distract

Re: [Qemu-devel] [PATCH 00/13] convert AML API to QOM

2015-01-28 Thread Andrew Jones
On Wed, Jan 28, 2015 at 10:03:24AM +, Igor Mammedov wrote: > > Example demonstrates use of QOM object for building AML > objects tree and freeing it explicitly when requested. > > Top level ACPI tables blob object is only partially > switched to object model now but I hope it demostrates > th

Re: [Qemu-devel] the arm cache coherency cluster

2015-03-18 Thread Andrew Jones
On Fri, Mar 06, 2015 at 01:49:40PM -0500, Andrew Jones wrote: > In reply to this message I'll send two series' one for KVM and > one for QEMU. The two series' are their respective component > complements, and attempt to implement cache coherency for arm > guests using

[Qemu-devel] the arm cache coherency cluster "v2"

2015-03-18 Thread Andrew Jones
In reply to this message I'll send two series' one for KVM and one for QEMU. The two series' are their respective component complements, and attempt to implement cache coherency for arm guests using emulated devices, where the emulator (qemu) uses cached memory for the device memory, but the guest

[Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-03-18 Thread Andrew Jones
Introduce a new memory region flag, KVM_MEM_UNCACHED, which is needed by ARM. This flag informs KVM that the given memory region is typically mapped by the guest as uncached. KVM for ARM then maps that region as uncached for userspace as well, in order to keep coherency. Andrew Jones (3): KVM

[Qemu-devel] [RFC PATCH 3/3] arm/arm64: KVM: implement KVM_MEM_UNCACHED

2015-03-18 Thread Andrew Jones
When userspace tells us a memory region is uncached, then we need to pin all its pages and set them all to be uncached. Signed-off-by: Andrew Jones --- arch/arm/include/asm/kvm_mmu.h| 9 + arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm/kvm/mmu.c| 71

[Qemu-devel] [RFC PATCH 2/3] arm/arm64: KVM: decouple READONLY and UNCACHED

2015-03-18 Thread Andrew Jones
KVM_MEM_UNCACHED memory will no longer need caches to be flushed for memory as it's faulted in. Just use READONLY directly, in that case, now. Signed-off-by: Andrew Jones --- arch/arm/kvm/mmu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/ar

[Qemu-devel] [RFC PATCH 1/4] kvm-all: put kvm_mem_flags to more work

2015-03-18 Thread Andrew Jones
Currently kvm_mem_flags just translates bools to bits, let's make it also determine the bools first. This avoids its parameter list growing each time we add a flag. Signed-off-by: Andrew Jones --- kvm-all.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-)

[Qemu-devel] [RFC PATCH 1/3] KVM: promote KVM_MEMSLOT_INCOHERENT to uapi

2015-03-18 Thread Andrew Jones
Also rename to KVM_MEM_UNCACHED. Signed-off-by: Andrew Jones --- Documentation/virtual/kvm/api.txt | 16 ++-- arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm/kvm/arm.c| 1 + arch/arm/kvm/mmu.c| 4 ++-- arch/arm64/include/uapi/asm/kvm.h | 1

[Qemu-devel] [RFC PATCH 3/4] memory: add uncached flag

2015-03-18 Thread Andrew Jones
Add an 'uncached' flag, which will result in the KVM_MEM_UNCACHED flag getting set on KVM's corresponding memory slot. Signed-off-by: Andrew Jones --- include/exec/memory.h | 25 + kvm-all.c | 9 + memory.c | 15 +

[Qemu-devel] [RFC PATCH 0/4] support KVM_MEM_UNCACHED

2015-03-18 Thread Andrew Jones
Add support for the new KVM_MEM_UNCACHED flag, and flag appropriate memory. (Only flags vga/vram for now.) Andrew Jones (4): kvm-all: put kvm_mem_flags to more work HACK: linux header update memory: add uncached flag vga: flag vram as uncached hw/display/vga.c | 1 + include

[Qemu-devel] [RFC PATCH 2/4] HACK: linux header update

2015-03-18 Thread Andrew Jones
Should do a proper update-linux-headers.sh update. Signed-off-by: Andrew Jones --- linux-headers/linux/kvm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 60a54c82a3b76..34c03cd80aa69 100644 --- a/linux-headers/linux/kvm.h

[Qemu-devel] [RFC PATCH 4/4] vga: flag vram as uncached

2015-03-18 Thread Andrew Jones
Video RAM is typically mapped as uncached by guests. Flag it as such. Signed-off-by: Andrew Jones --- hw/display/vga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/vga.c b/hw/display/vga.c index c0f7b343bbab5..5c8c249a8d780 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c

Re: [Qemu-devel] the arm cache coherency cluster "v2"

2015-03-18 Thread Andrew Jones
On Wed, Mar 18, 2015 at 03:08:20PM -0400, Andrew Jones wrote: > In reply to this message I'll send two series' one for KVM and > one for QEMU. The two series' are their respective component > complements, and attempt to implement cache coherency for arm > guests using

Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-03-19 Thread Andrew Jones
On Thu, Mar 19, 2015 at 05:56:20PM +0100, Paolo Bonzini wrote: > > > On 18/03/2015 20:10, Andrew Jones wrote: > > Introduce a new memory region flag, KVM_MEM_UNCACHED, which > > is needed by ARM. This flag informs KVM that the given memory > > region is typically mapp

[Qemu-devel] [PATCH] tcg-aarch64: handle additional PXN case

2015-01-02 Thread Andrew Jones
of its actual value. ..." Signed-off-by: Andrew Jones --- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index 3ef0f1f38eda5..96275194a 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -4960

Re: [Qemu-devel] [PATCH] tcg-aarch64: handle additional PXN case

2015-01-05 Thread Andrew Jones
On Mon, Jan 05, 2015 at 11:54:17AM +, Peter Maydell wrote: > On 2 January 2015 at 17:33, Andrew Jones wrote: > > D4.5.1 "Memory access control:Access permissions for instruction > > execution" states > > "... > > In addition: > > * For the EL1&

[Qemu-devel] [PATCH] tcg-arm: more instruction execution control

2015-01-09 Thread Andrew Jones
B3.7.2 when long-descriptors are used. Signed-off-by: Andrew Jones --- I didn't test this with secure mode (I didn't even check if that's currently possible), but I did test all other EL1&0 XN controls with both tcg-arm (cortex-a15) and tcg-aarch64 (cortex-a57) by hacking up some

Re: [Qemu-devel] [PATCH] tcg-arm: more instruction execution control

2015-01-12 Thread Andrew Jones
On Fri, Jan 09, 2015 at 06:06:33PM +0100, Andrew Jones wrote: > Cleanup XN/PXN handling in get_phys_addr_lpae, and implement all but > EL2 support of the following ARMv8 sections > > D4.5.1 Memory access control: Access permissions for instruction > execution > G4

[Qemu-devel] [PATCH v2] tcg-arm: more instruction execution control

2015-01-12 Thread Andrew Jones
B3.7.2 when long-descriptors are used. Signed-off-by: Andrew Jones --- I didn't test this with secure mode (I didn't even check if that's currently possible), but I did test all other EL1&0 XN controls with both tcg-arm (cortex-a15) and tcg-aarch64 (cortex-a57) by hacking up some

[Qemu-devel] [PATCH 0/2] tcg-arm: fix and extend instruction execution control

2015-01-13 Thread Andrew Jones
patch addresses EL1 not faulting when it should, as well as adds in additional execution control. Andrew Jones (2): tcg-aarch64: user doesn't need R/W access to exec tcg-arm: more instruction execution control target-arm/helper.c | 103

[Qemu-devel] [PATCH 1/2] tcg-aarch64: user doesn't need R/W access to exec

2015-01-13 Thread Andrew Jones
Table D4-32 shows that execute access from EL0 doesn't depend on AP[1]. Signed-off-by: Andrew Jones --- target-arm/helper.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 3ef0f1f3

[Qemu-devel] [PATCH 2/2] tcg-arm: more instruction execution control

2015-01-13 Thread Andrew Jones
B3.7.2 when long-descriptors are used. Signed-off-by: Andrew Jones --- v3: - correct logic for (is_user && !(ap & 1)) case - base on "user doesn't need R/W access to exec" patch v2: correct assert in el2 case I didn't test this with secure mode (I didn't ev

Re: [Qemu-devel] [PATCH v2] tcg-arm: more instruction execution control

2015-01-13 Thread Andrew Jones
On Mon, Jan 12, 2015 at 01:46:47PM +0100, Andrew Jones wrote: > Cleanup XN/PXN handling in get_phys_addr_lpae, and implement all but > EL2 support of the following ARMv8 sections > > D4.5.1 Memory access control: Access permissions for instruction > execution > G4

Re: [Qemu-devel] [PATCH 1/2] tcg-aarch64: user doesn't need R/W access to exec

2015-01-19 Thread Andrew Jones
On Fri, Jan 16, 2015 at 02:52:21PM +, Peter Maydell wrote: > On 13 January 2015 at 15:48, Andrew Jones wrote: > > Table D4-32 shows that execute access from EL0 doesn't depend > > on AP[1]. > > This commit message is a bit sparse, which confused me > for a bit.

Re: [Qemu-devel] [PATCH 2/2] tcg-arm: more instruction execution control

2015-01-19 Thread Andrew Jones
On Fri, Jan 16, 2015 at 04:16:02PM +, Peter Maydell wrote: > On 13 January 2015 at 15:48, Andrew Jones wrote: > > Cleanup XN/PXN handling in get_phys_addr_lpae, and implement all but > > EL2 support of the following ARMv8 sections > > > > D4.5.1 Memory access cont

Re: [Qemu-devel] [PATCH 2/2] tcg-arm: more instruction execution control

2015-01-19 Thread Andrew Jones
On Fri, Jan 16, 2015 at 07:02:55PM +, Peter Maydell wrote: > On 16 January 2015 at 16:16, Peter Maydell wrote: > > I think we're very soon going to need to bite the bullet and > > make this code have a concept of the current "translation > > regime", as the ARM ARM terms it... > > In fact I t

[Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-06 Thread Andrew Jones
ores=2,threads=4,maxcpus=8 "cpu topology: sockets (2) * > cores (2) * threads (4) != max_cpus (8)" Signed-off-by: Andrew Jones --- vl.c | 59 ++- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/vl.c b/vl.c ind

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 05:17:44PM -0200, Eduardo Habkost wrote: > On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > > smp_parse has a couple problems. First, it should use max_cpus, > > not smp_cpus when calculating missing topology information. > > Converse

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 11:11:30PM +0100, Paolo Bonzini wrote: > > > On 06/11/2014 17:09, Andrew Jones wrote: > > +if (sockets * cores * threads != max_cpus) { > > +fprintf(stderr, "cpu topology: " > > +"sockets (%

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > On 07/11/2014 10:29, Andrew Jones wrote: > >> > I think this would cause too many failures in the wild. Perhaps error > >> > out if it is lower, and warn if sockets * cores * threads > max

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > > > > On 07/11/2014 10:29, Andrew Jones wrote: > > >> > I think this would cause too many failures in the wild. Perhaps er

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:22:39AM +0100, Andrew Jones wrote: > On Thu, Nov 06, 2014 at 05:17:44PM -0200, Eduardo Habkost wrote: > > On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > > > smp_parse has a couple problems. First, it should use max_cpus, >

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:16:06AM -0200, Eduardo Habkost wrote: > On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > > > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > &

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > smp_parse has a couple problems. First, it should use max_cpus, > not smp_cpus when calculating missing topology information. > Conversely, if maxcpus is not input, then the topology should > dictate max_cpus, as the

[Qemu-devel] [PATCH 0/3] vl: smp_parse sanity checks

2014-11-07 Thread Andrew Jones
See individual patches. Andrew Jones (3): vl: fix max_cpus check vl: sanity check cpu topology vl: warn on topology <-> maxcpus mismatch vl.c | 38 -- 1 file changed, 32 insertions(+), 6 deletions(-) -- 1.9.3

[Qemu-devel] [PATCH 1/3] vl: fix max_cpus check

2014-11-07 Thread Andrew Jones
We should confirm max_cpus, which is >= smp_cpus, is <= the machine's true max_cpus, not just smp_cpus. Signed-off-by: Andrew Jones --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index f4a6e5e05bce2..9d9855092ab4a 100644 --- a/vl.c

[Qemu-devel] [PATCH 2/3] vl: sanity check cpu topology

2014-11-07 Thread Andrew Jones
right, and even abort when the complete cpu topology has been input, but isn't correct. Signed-off-by: Andrew Jones --- vl.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 9d9855092ab4a..c62fe29aa8075 100644 --- a/vl.c +++ b/v

[Qemu-devel] [PATCH 3/3] vl: warn on topology <-> maxcpus mismatch

2014-11-07 Thread Andrew Jones
Start guiding users towards making sure their topology supports the maximum number of cpus they wish to support. A future patch series will enforce this for new machine types. Signed-off-by: Andrew Jones --- vl.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/vl.c b/vl.c index

Re: [Qemu-devel] [PATCH 2/3] vl: sanity check cpu topology

2014-11-11 Thread Andrew Jones
On Tue, Nov 11, 2014 at 10:41:00AM -0200, Eduardo Habkost wrote: > On Fri, Nov 07, 2014 at 05:04:39PM +0100, Andrew Jones wrote: > > smp_parse allows partial or complete cpu topology to be given. > > In either case there may be inconsistencies in the input which > > are curre

Re: [Qemu-devel] [PATCH 2/3] vl: sanity check cpu topology

2014-11-11 Thread Andrew Jones
On Tue, Nov 11, 2014 at 01:48:00PM -0200, Eduardo Habkost wrote: > On Tue, Nov 11, 2014 at 03:37:11PM +0100, Andrew Jones wrote: > > On Tue, Nov 11, 2014 at 10:41:00AM -0200, Eduardo Habkost wrote: > > > On Fri, Nov 07, 2014 at 05:04:39PM +0100, Andrew Jones wrote: > > >

Re: [Qemu-devel] [PATCH 2/3] vl: sanity check cpu topology

2014-11-12 Thread Andrew Jones
On Tue, Nov 11, 2014 at 04:31:24PM -0200, Eduardo Habkost wrote: > On Tue, Nov 11, 2014 at 03:37:11PM +0100, Andrew Jones wrote: > [...] > > Below is a v2 I can post if it looks good to you. > > > > From: Andrew Jones > > Date: Fri, 7 Nov 2014 15:45:07 +0100 >

Re: [Qemu-devel] [PATCH v2 1/3] vl: Avoid unnecessary 'if' nesting

2014-11-12 Thread Andrew Jones
-} else { > -threads = cpus / (cores * sockets); > -} > +threads = cpus / (cores * sockets); > } > > max_cpus = qemu_opt_get_number(opts, "maxcpus", 0); > -- > 1.9.3 > Reviewed-by: Andrew Jones

Re: [Qemu-devel] [PATCH v2 3/3] vl: Don't silently change topology when all -smp options were set

2014-11-12 Thread Andrew Jones
res (%u) * threads (%u) < " > +"smp_cpus (%u)\n", > +sockets, cores, threads, cpus); > +exit(1); > } > > max_cpus = qemu_opt_get_number(opts, "maxcpus", 0); > -- > 1.9.3 > Reviewed-by: Andrew Jones

Re: [Qemu-devel] [qemu PATCH 2/2] arm: add fw_cfg to "virt" board

2014-11-28 Thread Andrew Jones
On Fri, Nov 28, 2014 at 12:18:27AM +0100, Laszlo Ersek wrote: > fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, > ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt" > board. > > The mmio register block of fw_cfg is advertized in the device tree. As > bas

Re: [Qemu-devel] [qemu PATCH 2/2] arm: add fw_cfg to "virt" board

2014-11-28 Thread Andrew Jones
On Fri, Nov 28, 2014 at 11:43:32AM +0100, Laszlo Ersek wrote: > On 11/28/14 11:38, Andrew Jones wrote: > > On Fri, Nov 28, 2014 at 12:18:27AM +0100, Laszlo Ersek wrote: > >> fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, > >> ppc/mac_oldworl

Re: [Qemu-devel] [qemu PATCH 2/2] arm: add fw_cfg to "virt" board

2014-11-28 Thread Andrew Jones
On Fri, Nov 28, 2014 at 11:49:48AM +0100, Laszlo Ersek wrote: > On 11/28/14 11:43, Laszlo Ersek wrote: > > On 11/28/14 11:38, Andrew Jones wrote: > >> On Fri, Nov 28, 2014 at 12:18:27AM +0100, Laszlo Ersek wrote: > >>> fw_cfg already supports exposure over MM

Re: [Qemu-devel] [PATCH v2] arm: add fw_cfg to "virt" board

2014-12-10 Thread Andrew Jones
On Wed, Dec 10, 2014 at 12:13:34PM +0100, Paolo Bonzini wrote: > On 09/12/2014 16:54, Richard W.M. Jones wrote: > > On a slightly related topic, virtio-mmio traps are slow: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1123555 > > I suspect it's not virtio-mmio, but just KVM on ARM. > > It

Re: [Qemu-devel] [PATCH v4 1/8] fw_cfg: max access size and region size are the same for MMIO data reg

2014-12-16 Thread Andrew Jones
On Fri, Dec 12, 2014 at 04:58:45PM +0100, Laszlo Ersek wrote: > Make it clear that the maximum access size to the MMIO data register > determines the full size of the memory region. > > Currently the max access size is 1. Ensure that if a larger size were used > in "fw_cfg_data_mem_ops.valid.max_a

Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-04-29 Thread Andrew Jones
On Wed, Apr 29, 2015 at 10:19:55AM +0100, Peter Maydell wrote: > On 29 April 2015 at 10:03, Alexander Graf wrote: > > > > > > On 18.03.15 20:10, Andrew Jones wrote: > >> Introduce a new memory region flag, KVM_MEM_UNCACHED, which > >> is needed by ARM. This

Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Andrew Jones
On Thu, May 14, 2015 at 11:37:46AM +0100, Peter Maydell wrote: > On 14 May 2015 at 11:31, Andrew Jones wrote: > > Forgot to (4): switch from setting userspace's mapping to > > device memory to normal, non-cacheable. Using device memory > > caused a problem that Alex Gra

  1   2   3   4   5   6   7   8   9   10   >