On Fri, Oct 30, 2015 at 6:55 AM, Christian Borntraeger
wrote:
> Am 30.10.2015 um 02:09 schrieb Andy Lutomirski:
>> From: "Michael S. Tsirkin"
>>
>> Once virtio starts using the DMA API, we won't be able to safely DMA
>> from the stack. virtio-net does a couple of config DMA requests
>> from smal
propriate base,
> please suggest rules for selecting the more suitable base]
>
> url:
> https://github.com/0day-ci/linux/commits/Shannon-Zhao/KVM-ARM64-Add-guest-PMU-support/20151030-143148
> config: arm-axm55xx_defconfig (attached as .config)
> reproduce:
> wget
On Saturday 31 October 2015 10:17:22 Benjamin Herrenschmidt wrote:
> On Fri, 2015-10-30 at 11:32 +0100, Arnd Bergmann wrote:
> > On Thursday 29 October 2015 10:10:46 Benjamin Herrenschmidt wrote:
> > >
> > > > Maybe we should at least coordinate IOMMU 'paranoid/fast' modes
> > > > across
> > > > a
On Fri, 2015-10-30 at 11:32 +0100, Arnd Bergmann wrote:
> On Thursday 29 October 2015 10:10:46 Benjamin Herrenschmidt wrote:
> >
> > > Maybe we should at least coordinate IOMMU 'paranoid/fast' modes
> > > across
> > > architectures, and then the DMA_ATTR_IOMMU_BYPASS flag would have
> > > a
> > >
This patch tracks vfp/simd hardware state with a vcpu lazy flag. vCPU lazy
flag is set on guest access and traps to vfp/simd hardware switch handler. On
vm-enter if lazy flag is set skip trap enable and save host fpexc. On
vm-exit if flag is set skip hardware context switch and return to host wi
This patch enables arm64 lazy fp/simd switch, similar to arm described in
second patch. Change from previous version - restore function is moved to
host.
Signed-off-by: Mario Smarduch
---
arch/arm64/include/asm/kvm_host.h | 2 +-
arch/arm64/kernel/asm-offsets.c | 1 +
arch/arm64/kvm/hyp.S
This patch adds vcpu fields to track lazy state, save host FPEXC, and
offsets to fields.
Signed-off-by: Mario Smarduch
---
arch/arm/include/asm/kvm_host.h | 6 ++
arch/arm/kernel/asm-offsets.c | 2 ++
2 files changed, 8 insertions(+)
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm
This short patch series combines the previous armv7 and armv8 versions.
For an FP and lmbench load it reduces fp/simd context switch from 30-50% down
to 2%. Results will vary with load but is no worse then current
approach.
In summary current lazy vfp/simd implementation switches hardware contex
On 10/29/2015 12:31 AM, Xiao Guangrong wrote:
> These instructions are used by NVDIMM drivers and the specification
> locates at:
> https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
>
> There instructions are available on Skylake Server
>
> Signed-off-by: Xiao Guangrong
On Fri, Oct 30, 2015 at 1:25 AM, Cornelia Huck wrote:
> On Thu, 29 Oct 2015 15:50:38 -0700
> Andy Lutomirski wrote:
>
>> Progress! After getting that sort-of-working, I figured out what was
>> wrong with my earlier command, and I got that working, too. Now I
>> get:
>>
>> qemu-system-s390x -fsd
Hi Drew,
On 10/30/2015 09:00 AM, Andrew Jones wrote:
> On Wed, Oct 28, 2015 at 03:12:55PM -0400, Christopher Covington wrote:
>> Calculate the numbers of cycles per instruction (CPI) implied by ARM
>> PMU cycle counter values. The code includes a strict checking facility
>> intended for the -icoun
On Fri, Oct 30, 2015 at 5:05 AM, Christian Borntraeger
wrote:
> Am 30.10.2015 um 13:01 schrieb Cornelia Huck:
>> On Thu, 29 Oct 2015 18:09:47 -0700
>> Andy Lutomirski wrote:
>>
>>> virtio_ring currently sends the device (usually a hypervisor)
>>> physical addresses of its I/O buffers. This is ok
Replace the unsafe read-loops in the x86 kernel image loading
functions with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara
---
x86/kvm.c | 35 ++-
Use the new read_file() wrapper in our arm/arm64 kernel image loading
function instead of the private implementation.
Signed-off-by: Andre Przywara
---
arm/fdt.c | 40 ++--
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/arm/fdt.c b/arm/fdt.c
i
For some reasons (probably to have easy access to the command line)
the kernel loading for arm and arm64 was located in arm/fdt.c.
Move the routines to kvm.c (where other architectures put it) to
only have real device tree code in fdt.c. We use the pointer in
struct kvm to access the command line s
Replace the unsafe read-loops in the powerpc kernel image loading
function with our new and safe read_file() wrapper.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara
---
powerpc/kvm.c | 36
Replace the unsafe read-loops used in the MIPS kernel image loading
with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara
---
mips/kvm.c | 36 ++
Let's face it: Kernel loading is quite architecture specific. Don't
claim otherwise and move the loading routines into each
architecture's responsibility.
This introduces kvm__arch_load_kernel(), which each architecture can
implement accordingly.
Provide bzImage loading for x86 and ELF loading for
In various parts of kvmtool we simply try to read files into memory,
but fail to do so in a safe way. The read(2) syscall can return early
having only parts of the file read, or it may return -1 due to being
interrupted by a signal (in which case we should simply retry).
The ARM code seems to provi
Hi,
this series cleans up kvmtool's kernel loading functionality a bit.
It has been broken out of a previous series I sent [1] and contains
just the cleanup and bug fix parts, which should be less controversial
and thus easier to merge ;-)
I will resend the pipe loading part later on as a separate
On 10/29/2015 07:41 PM, Lan Tianyu wrote:
On 2015年10月30日 00:17, Alexander Duyck wrote:
On 10/29/2015 01:33 AM, Lan Tianyu wrote:
On 2015年10月29日 14:58, Alexander Duyck wrote:
Your code was having to do a bunch of shuffling in order to get things
set up so that you could bring the interface back
On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote:
> Use the whole file size if @size is not specified which is useful
> if we want to directly pass a file to guest
>
> Signed-off-by: Xiao Guangrong
> ---
> backends/hostmem-file.c | 48 ---
While we have an LDFLAGS variable in kvmtool's Makefile, it's not
really used when both doing the feature tests and when finally linking
the lkvm executable.
Add that variable to all the linking steps to allow the user to
specify custom library directories or linker options on the command
line.
Si
When a Makefile variable is set on the make command line, all
Makefile-internal assignments to that very variable are _ignored_.
Since we add quite some essential values to CFLAGS internally,
specifying some CFLAGS on the command line will usually break the
build (and not fix any include file probl
In the past there have been some complaints from cross-compilation
users about missing libraries and include files. Fixing those issues
by pointing make to the proper directories via CFLAGS and LDFLAGS
proved to be complicated.
This series fixes this, so custom CFLAGS and LDFLAGS can be given on
th
On 10/29/2015 11:56 PM, Xiao Guangrong wrote:
> This patch is generated by this script:
>
> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
> | xargs sed -i "s/PC_DIMM/DIMM/g"
>
> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
> | xargs sed -
(Sorry, missed part of this before).
On Thu, 2015-10-29 at 11:01 +0200, Michael S. Tsirkin wrote:
> Isn't this specified by the hypervisor? I don't think this is a good
> way to do this: guest security should be up to guest.
And it is. When the guest sees an IOMMU, it can choose to use it, or
cho
On 30.10.2015 08:56, Xiao Guangrong wrote:
This patch is generated by this script:
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
| xargs sed -i "s/PC_DIMM/DIMM/g"
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
| xargs sed -i "s/PCDIMM/DIM
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote:
> There are three places use the some logic to get the page size on
> the file path or file fd
>
> This patch introduces qemu_file_get_page_size() to unify the code
>
> Signed-off-by: Xiao Guangrong
[...]
> diff --git a/util/oslib-p
2015-10-26 17:32+0100, Paolo Bonzini:
> On 26/10/2015 16:43, Laszlo Ersek wrote:
>>> The code would be cleaner if we had a different approach, but this works
>>> too and is safer for stable. In case you prefer to leave the rewrite for
>>> a future victim,
>>
>> It's hard to express how much I pref
This series bases on "KVM: x86: fix RSM into 64-bit protected mode,
round 2" and reverts it in [3/3]. To avoid regressions after doing so,
[1/2] introduces a helper that is used in [2/2] to hopefully get the
same behavior.
I'll set up test environment next week, unless a random act of kindness
al
We want to read the physical memory when emulating RSM.
X86EMUL_IO_NEEDED is returned on all errors for consistency with other
helpers.
Signed-off-by: Radim Krčmář
---
arch/x86/include/asm/kvm_emulate.h | 10 ++
arch/x86/kvm/x86.c | 10 ++
2 files changed, 20 ins
On 30.10.2015 08:56, Xiao Guangrong wrote:
pc_existing_dimms_capacity() can be static since it is not used out of
pc-dimm.c and drop the pc_ prefix to prepare the work which abstracts
dimm device type from pc-dimm
Signed-off-by: Xiao Guangrong
---
hw/mem/pc-dimm.c | 73 +++
GET_SMSTATE depends on real mode to ensure that smbase+offset is treated
as a physical address, which has already caused a bug after shuffling
the code. Enforce physical addressing.
Signed-off-by: Radim Krčmář
---
arch/x86/kvm/emulate.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(
This reverts 0123456789abc ("KVM: x86: fix RSM into 64-bit protected
mode, round 2"). We've achieved the same by treating SMBASE as a
physical address in the previous patch.
Signed-off-by: Radim Krčmář
---
arch/x86/kvm/emulate.c | 37 +++--
1 file changed, 7 inse
On 30.10.2015 08:56, Xiao Guangrong wrote:
Use the whole file size if @size is not specified which is useful
if we want to directly pass a file to guest
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 48
1 file changed, 44 inserti
On Thu, Oct 29, 2015 at 11:01:41AM +0200, Michael S. Tsirkin wrote:
> Example: you have a mix of assigned devices and virtio devices. You
> don't trust your assigned device vendor not to corrupt your memory so
> you want to limit the damage your assigned device can do to your guest,
> so you use an
inux-next -- if it's inappropriate base,
> please suggest rules for selecting the more suitable base]
>
> url:
> https://github.com/0day-ci/linux/commits/Suresh-Warrier/KVM-PPC-Book3S-HV-Optimize-wakeup-VCPU-from-H_IPI/20151030-081329
> config: powerpc-defconfig (att
On 30.10.2015 08:56, Xiao Guangrong wrote:
- hostmem-file.c is compiled only if CONFIG_LINUX is enabled so that is
unnecessary to do the same check in the source file
- the interface, HostMemoryBackendClass->alloc(), is not called many
times, do not need to check if the memory-region is in
BSP doesn't get INIT so its apic_arb_prio isn't zeroed after reboot.
BSP won't get lowest priority interrupts until other VCPUs get enough
interrupts to match their pre-reboot apic_arb_prio.
That behavior doesn't fit into KVM's round-robin-like interpretation of
lowest priority delivery ... usersp
On Fri, Oct 30, 2015 at 01:55:56PM +0100, Christian Borntraeger wrote:
> It not trivial without understanding the dma mask details. Do I read
> the x86 implementation right, that it limits the dma to 32 bit? Then
> we cannot collapse both implementations. Or maybe we can hide this in
> dma_capable.
On 30.10.2015 08:56, Xiao Guangrong wrote:
Currently, file_ram_alloc() only works on directory - it creates a file
under @path and do mmap on it
This patch tries to allow it to work on file directly, if @path is a
directory it works as before, otherwise it treats @path as the target
file then di
On 30.10.2015 08:56, Xiao Guangrong wrote:
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesystem
So this patch let it work on any kind of path
Signed-off-by: Xiao Guan
Am 30.10.2015 um 02:09 schrieb Andy Lutomirski:
> From: "Michael S. Tsirkin"
>
> Once virtio starts using the DMA API, we won't be able to safely DMA
> from the stack. virtio-net does a couple of config DMA requests
> from small stack buffers -- switch to using dynamically-allocated
> memory.
>
logic is changed:
in old version gethugepagesize on statfs error generates exit(1)
in new it returns getpagesize() in this case (through fd_getpagesize)
(I think, fd_getpagesize should be fixed to handle error)
also, in new version for windows we have getpagesize(), when in old
version t
We are going to require dma_ops for several common drivers, even for
systems that do have an identity mapping. Lets provide some minimal
no-op dma_ops that can be used for that purpose.
Signed-off-by: Christian Borntraeger
---
include/linux/dma-mapping.h | 2 ++
lib/Makefile| 2
Some of the alpha pci noop dma ops are identical to the common ones.
Use them.
Signed-off-by: Christian Borntraeger
---
arch/alpha/kernel/pci-noop.c | 46
1 file changed, 4 insertions(+), 42 deletions(-)
diff --git a/arch/alpha/kernel/pci-noop.c b/ar
As virtio-ccw now has dma ops, we can no longer default to the PCI ones.
Make use of dev_archdata to keep the dma_ops per device. The pci devices
now use that to override the default, and the default is changed to use
the noop ops for everything that is not PCI. To compile without PCI
support we al
here is the 2nd version of providing an DMA API for s390.
There are some attempts to unify the dma ops (Christoph) as well
as some attempts to make virtio use the dma API (Andy).
At kernel summit we concluded that we want to use the same code on all
platforms, whereever possible, so having a dumm
On 10/30/2015 06:14 PM, Stefan Hajnoczi wrote:
On Fri, Oct 30, 2015 at 01:56:21PM +0800, Xiao Guangrong wrote:
static uint64_t
nvdimm_dsm_read(void *opaque, hwaddr addr, unsigned size)
{
-return 0;
+AcpiNVDIMMState *state = opaque;
+MemoryRegion *dsm_ram_mr = &state->ram_mr;
On Wed, Oct 28, 2015 at 03:12:55PM -0400, Christopher Covington wrote:
> Calculate the numbers of cycles per instruction (CPI) implied by ARM
> PMU cycle counter values. The code includes a strict checking facility
> intended for the -icount option in TCG mode but it is not yet enabled
> in the con
Am 28.10.2015 um 01:43 schrieb Joerg Roedel:
> On Tue, Oct 27, 2015 at 11:48:51PM +0100, Christian Borntraeger wrote:
>> @@ -1093,6 +1094,7 @@ static void virtio_ccw_auto_online(void *data,
>> async_cookie_t cookie)
>> struct ccw_device *cdev = data;
>> int ret;
>>
>> +cdev->dev.ar
Am 28.10.2015 um 01:41 schrieb Joerg Roedel:
> Hi Christian,
>
> On Tue, Oct 27, 2015 at 11:48:48PM +0100, Christian Borntraeger wrote:
>> +static dma_addr_t dma_noop_map_page(struct device *dev, struct page *page,
>> + unsigned long offset, size_t size,
>> +
On Fri, 30 Oct 2015 13:26:09 +0100
Christian Borntraeger wrote:
> I am currently reworking this to
>
> static inline struct dma_map_ops *get_dma_ops(struct device *dev)
> {
> if (dev && dev->archdata.dma_ops)
> return dev->archdata.dma_ops;
> return &dma_noop_ops;
>
Am 30.10.2015 um 13:17 schrieb Cornelia Huck:
> On Tue, 27 Oct 2015 23:48:51 +0100
> Christian Borntraeger wrote:
>
>> With all infrastructure in place, lets provide dma_ops for virtio
>> devices on s390.
>>
>> Signed-off-by: Christian Borntraeger
>> ---
>> drivers/s390/virtio/kvm_virtio.c | 2
On Tue, 27 Oct 2015 23:48:51 +0100
Christian Borntraeger wrote:
> With all infrastructure in place, lets provide dma_ops for virtio
> devices on s390.
>
> Signed-off-by: Christian Borntraeger
> ---
> drivers/s390/virtio/kvm_virtio.c | 2 ++
> drivers/s390/virtio/virtio_ccw.c | 2 ++
> 2 files
Hi Shannon,
[auto build test ERROR on kvm/linux-next -- if it's inappropriate base, please
suggest rules for selecting the more suitable base]
url:
https://github.com/0day-ci/linux/commits/Shannon-Zhao/KVM-ARM64-Add-guest-PMU-support/20151030-143148
config: arm-axm55xx_defconfig (att
Am 30.10.2015 um 13:01 schrieb Cornelia Huck:
> On Thu, 29 Oct 2015 18:09:47 -0700
> Andy Lutomirski wrote:
>
>> virtio_ring currently sends the device (usually a hypervisor)
>> physical addresses of its I/O buffers. This is okay when DMA
>> addresses and physical addresses are the same thing, b
On Thu, 29 Oct 2015 18:09:47 -0700
Andy Lutomirski wrote:
> virtio_ring currently sends the device (usually a hypervisor)
> physical addresses of its I/O buffers. This is okay when DMA
> addresses and physical addresses are the same thing, but this isn't
> always the case. For example, this nev
On 10/29/2015 04:45 PM, Jason Wang wrote:
> Hi all:
>
> This series tries to add basic busy polling for vhost net. The idea is
> simple: at the end of tx processing, busy polling for new tx added
> descriptor and rx receive socket for a while. The maximum number of
> time (in us) could be spent o
The vq->is_le field is used to fix endianness when accessing the vring via
the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
1) host is big endian and device is modern virtio
2) host has cross-endian support and device is legacy virtio with a different
endianness than t
On Thursday 29 October 2015 10:10:46 Benjamin Herrenschmidt wrote:
>
> > Maybe we should at least coordinate IOMMU 'paranoid/fast' modes across
> > architectures, and then the DMA_ATTR_IOMMU_BYPASS flag would have a
> > sane meaning in the paranoid mode (and perhaps we'd want an ultra
> > -paranoi
On Fri, Oct 30, 2015 at 01:55:54PM +0800, Xiao Guangrong wrote:
> This patchset can be found at:
> https://github.com/xiaogr/qemu.git nvdimm-v6
>
> It is based on pci branch on Michael's tree and the top commit is:
> commit 6f96a31a06c2a1 (tests: re-enable vhost-user-test).
>
> Changelog in
On Fri, Oct 30, 2015 at 01:56:21PM +0800, Xiao Guangrong wrote:
> static uint64_t
> nvdimm_dsm_read(void *opaque, hwaddr addr, unsigned size)
> {
> -return 0;
> +AcpiNVDIMMState *state = opaque;
> +MemoryRegion *dsm_ram_mr = &state->ram_mr;
> +NvdimmDsmIn *in;
> +GArray *out;
Am 30.10.2015 um 02:09 schrieb Andy Lutomirski:
> This switches virtio to use the DMA API unconditionally. I'm sure
> it breaks things, but it seems to work on x86 using virtio-pci, with
> and without Xen, and using both the modern 1.0 variant and the
> legacy variant.
>
> This appears to work on
Hi Suresh,
[auto build test ERROR on kvm/linux-next -- if it's inappropriate base, please
suggest rules for selecting the more suitable base]
url:
https://github.com/0day-ci/linux/commits/Suresh-Warrier/KVM-PPC-Book3S-HV-Optimize-wakeup-VCPU-from-H_IPI/20151030-081329
config: po
Hi,
On 10/30/2015 09:51 AM, Baptiste Reynal wrote:
> Hi James,
>
> Thanks for this fix.
>
> Acked-by: Baptiste Reynal
> Tested-by: Baptiste Reynal
>
> On Thu, Oct 29, 2015 at 5:50 PM, James Morse wrote:
>> vfio_platform_{read,write}_mmio() call ioremap_nocache() to map
>> a region of io memor
Hi James,
Thanks for this fix.
Acked-by: Baptiste Reynal
Tested-by: Baptiste Reynal
On Thu, Oct 29, 2015 at 5:50 PM, James Morse wrote:
> vfio_platform_{read,write}_mmio() call ioremap_nocache() to map
> a region of io memory, which they store in struct vfio_platform_region to
> be eventually
On Thu, 29 Oct 2015 15:50:38 -0700
Andy Lutomirski wrote:
> Progress! After getting that sort-of-working, I figured out what was
> wrong with my earlier command, and I got that working, too. Now I
> get:
>
> qemu-system-s390x -fsdev
> local,id=virtfs1,path=/,security_model=none,readonly -devic
removing unused variables, found by coccinelle
Signed-off-by: Saurabh Sengar
---
arch/x86/kvm/x86.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9a9a198..ec15294 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/
70 matches
Mail list logo