[Qemu-devel] [PATCH] e1000: cleanup process_tx_desc

2013-06-03 Thread Andrew Jones
be greater than 255 though, as it's assigned only once and to the value of tp-hdr_len, which is an uint8_t. This patch simply gets rid of hdr, replacing it with tp-hdr_len, which makes it consistent with all other tp member use in the function. Signed-off-by: Andrew Jones drjo...@redhat.com --- hw/net

Re: [Qemu-devel] [PATCH] e1000: cleanup process_tx_desc

2013-06-04 Thread Andrew Jones
- Original Message - On 06/03/2013 10:20 AM, Andrew Jones wrote: Coverity complains about two overruns in process_tx_desc(). The complaints are false positives, but we might as well eliminate them. The problem is that hdr is defined as an unsigned int, but then used to offset

[Qemu-devel] [PATCH v2] e1000: cleanup process_tx_desc

2013-06-04 Thread Andrew Jones
Signed-off-by: Andrew Jones drjo...@redhat.com --- hw/net/e1000.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index e6f46f0c511e8..620f947134780 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -556,7 +556,7

Re: [Qemu-devel] [PATCH] e1000: cleanup process_tx_desc

2013-06-04 Thread Andrew Jones
- Original Message - On 4 June 2013 08:34, Andrew Jones drjo...@redhat.com wrote: I could send a v2 that fixes the 1 error and 2 warnings found in the context of this patch, but why? It's out of the scope of the patch (although I did use cleanup in the summary...), and it would

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

2013-10-14 Thread Andrew Jones
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 Jones drjo

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 drjo...@redhat.com 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 ISA bus, whereas

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

[Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt

2013-09-18 Thread Andrew Jones
I don't know yet if want this feature on by default, so for now I'm just adding support for -cpu ...,+kvm_pv_unhalt. Signed-off-by: Andrew Jones drjo...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1

2013-09-18 Thread Andrew Jones
Signed-off-by: Andrew Jones drjo...@redhat.com --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm.h| 1 + linux-headers/linux/kvm_para.h | 1 + linux-headers/linux/vfio.h | 38 ++ 4 files changed, 41 insertions(+) diff --git

[Qemu-devel] [PATCH 0/2] kvm: add kvm_pv_unhalt

2013-09-18 Thread Andrew Jones
pvticketlocks are in v3.12-rc1, teach qemu-kvm about it. Benchmarking is still in progress to determine if we can turn it on by default. So leaving it off for now. Andrew Jones (2): linux-headers: update to 3.12-rc1 qemu-kvm: paravirt: add feature kvm_pv_unhalt linux-headers/asm-x86

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 v2] virtio: Introduce virtio-testdev

2013-12-04 Thread Andrew Jones
--- 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 drjo...@redhat.com --- hw/virtio/Makefile.objs| 1 + hw

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 KVM

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

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 ler...@redhat.com --- +# @guest-set-vcpus: +# +# Attempt to reconfigure (currently: enable/disable) logical processors inside +# the

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

2012-12-04 Thread Andrew Jones
- Original Message - On Thu, Nov 29, 2012 at 1:34 AM, liu ping fan qemul...@gmail.com wrote: On Thu, Nov 29, 2012 at 12:42 PM, Cam Macdonell c...@cs.ualberta.ca wrote: On Tue, Nov 27, 2012 at 7:53 PM, liu ping fan qemul...@gmail.com wrote: On Wed, Nov 28, 2012 at 5:48 AM, Cam

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 drjo...@redhat.com wrote: - Original Message - On Thu, Nov 29, 2012 at 1:34 AM, liu ping fan qemul...@gmail.com wrote: On Thu, Nov 29, 2012 at 12:42 PM, Cam Macdonell c...@cs.ualberta.ca wrote

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 as you

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 stay compatible should this bug be fixed, we + * specify one

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

2013-08-22 Thread Andrew Jones
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 drjo...@redhat.com --- kvm-all.c | 45 +++-- 1 file changed, 27

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 andre.przyw...@amd.com Signed-off-by: Wanlong Gao

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 as you

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 drjo...@redhat.com 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

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, but by always returning the maximum

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

2013-08-23 Thread Andrew Jones
for 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 drjo...@redhat.com --- 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

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-nodes=N-N And we are adding this setting as a suboption

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 the command line, default is use if available. Signed

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 guess it'll take more thought

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 library. Maybe I missed other uses? Yes, in 08/12 we also use mbind

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, but by always returning the maximum number

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: Is this patch still necessary? I thought that dropping the numa_num_configured_nodes

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/26/2013 03:46 PM, Andrew Jones wrote: Is this patch still necessary? I thought

[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 drjo...@redhat.com --- hw/arm/virt.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/arm

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 drjo...@redhat.com wrote: pl031's base address should be 0x9001000, 0x9001. While in there ^ meant to type 'not' here, but guess that was obvious

[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 drjo...@redhat.com --- 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
-by: Andrew Jones drjo...@redhat.com --- 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 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 n.nikol...@virtualopensystems.com --- stubs/Makefile.objs |2 ++ stubs/chr-baum-init.c

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

2014-01-29 Thread Andrew Jones
--- 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 drjo...@redhat.com --- hw/virtio

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 drjo...@redhat.com 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 can be plugged into a virtio-mmio

[Qemu-devel] [PATCH] backends: Introduce chr-testdev

2014-07-11 Thread Andrew Jones
-by: Andrew Jones drjo...@redhat.com --- backends/Makefile.objs | 2 +- backends/testdev.c | 131 + include/sysemu/char.h | 3 ++ qapi-schema.json | 1 + qemu-char.c| 4 ++ 5 files changed, 140 insertions(+), 1 deletion

[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 drjo...@redhat.com --- 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

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 drjo...@redhat.com --- hw/misc/ivshmem.c | 27 +-- 1 file changed

[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 drjo...@redhat.com --- hw/misc/ivshmem.c | 39 +++ 1 file changed, 19 insertions(+), 20

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, ...) calls with error_report. Also make sure

[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 drjo...@redhat.com --- v3: fix indentation of printf

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

2014-11-06 Thread Andrew Jones
) != max_cpus (8) Signed-off-by: Andrew Jones drjo...@redhat.com --- vl.c | 59 ++- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/vl.c b/vl.c index f4a6e5e05bce2..23b21a5fbca50 100644 --- a/vl.c +++ b/vl.c @@ -1270,35 +1270,52

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. Conversely, if maxcpus is not input

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 (%u) * cores (%u) * threads (%u) != max_cpus (%u)\n

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_cpus since we actually allow hot-plug a thread

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 error out if it is lower, and warn if sockets

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, not smp_cpus when calculating

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: On 07/11/2014 10:29

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 topology may support

[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 drjo...@redhat.com --- 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
, and even abort when the complete cpu topology has been input, but isn't correct. Signed-off-by: Andrew Jones drjo...@redhat.com --- 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

[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 drjo...@redhat.com --- vl.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/vl.c

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 currently not sounding any alarms

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: smp_parse allows partial

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 drjo...@redhat.com Date: Fri, 7 Nov 2014 15:45:07 +0100 Subject: [PATCH v2] vl

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

2014-11-12 Thread Andrew Jones
); -} +threads = cpus / (cores * sockets); } max_cpus = qemu_opt_get_number(opts, maxcpus, 0); -- 1.9.3 Reviewed-by: Andrew Jones drjo...@redhat.com

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
); } max_cpus = qemu_opt_get_number(opts, maxcpus, 0); -- 1.9.3 Reviewed-by: Andrew Jones drjo...@redhat.com

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 base

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_oldworld.c, sparc/sun4m.c); we can easily add

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 MMIO (used in ppc/mac_newworld.c, ppc

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 would be

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

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

2015-01-02 Thread Andrew Jones
. ... Signed-off-by: Andrew Jones drjo...@redhat.com --- 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,6 +4960,8 @@ static int

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 imamm...@redhat.com wrote: On Sat, 24 Jan 2015 18:33:50 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jan 23, 2015 at 06:56:20PM +0100, Igor Mammedov wrote:

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 drjo...@redhat.com 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

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 peter.mayd...@linaro.org 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...

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 drjo...@redhat.com 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. It would be worth

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 distracting.

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 the

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 drjo...@redhat.com wrote: D4.5.1 Memory access control:Access permissions for instruction execution states ... In addition: * For the EL10 translation regime, if the value of the AP[2

[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 drjo...@redhat.com --- I didn't test this with secure mode (I didn't even check if that's currently possible), but I did test all other EL10 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.7.2 Execute-never

[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 drjo...@redhat.com --- I didn't test this with secure mode (I didn't even check if that's currently possible), but I did test all other EL10 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
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 1 file changed, 80

[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 drjo...@redhat.com --- 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

[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 drjo...@redhat.com --- 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 even check if that's

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.7.2 Execute-never

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

2015-02-12 Thread Andrew Jones
/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 is_user param to get_rw_prot target-arm

[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: Andrew Jones

[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 drjo

[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 drjo...@redhat.com --- target-arm/helper.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/target-arm/helper.c b/target-arm

[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 drjo...@redhat.com --- 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

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

2015-02-12 Thread Andrew Jones
, but, as the function name implies, it only works for stage 1 translations. Signed-off-by: Andrew Jones drjo...@redhat.com --- target-arm/helper.c | 111 1 file changed, 86 insertions(+), 25 deletions(-) diff --git a/target-arm/helper.c b/target

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 drjo...@redhat.com

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. It can in AArch64

[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 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 drjo...@redhat.com --- 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

[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 drjo...@redhat.com --- include/exec/memory.h | 25 + kvm-all.c | 9 + memory.c | 15

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 mapped by the guest as uncached. KVM

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 emulated devices, where

[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 drjo...@redhat.com --- kvm-all.c | 25 +++-- 1 file changed, 15 insertions(+), 10

[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 drjo...@redhat.com --- 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

  1   2   3   4   5   6   7   8   9   10   >