Hi all!
I am quite new to KVM, and I recently had to struggle with the
kvm->srcu lock a little bit ... documentation for this lock seems
to be quite sparse, I've only found some descriptions in mailing
list archives (the description at the following URL is quite good:
http://www.mail-archive.com
Am Mon, 09 Sep 2013 20:26:49 +0800
schrieb Xiao Guangrong :
> On 09/09/2013 08:13 PM, Paolo Bonzini wrote:
> > Il 09/09/2013 14:00, Thomas Huth ha scritto:
> >>
> >> Hi all!
> >>
> >> I am quite new to KVM, and I recently had to strug
This patch documents the kvm->srcu lock (using the information from
a mail which has been posted by Marcelo Tosatti to the kvm mailing
list some months ago, see the following URL for details:
http://www.mail-archive.com/kvm@vger.kernel.org/msg90040.html )
Signed-off-by: Thomas Huth
Reviewed
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan :
> I would like to have access to the same file system from the host and
> the guest. Can anyone recommend the best way to do this, considering
> ease of use, safety (concurrent access from guest and host does not
> corrupt) and performance?
Hi Frank,
On Fri, 19 Sep 2014 13:54:34 +0200
frank.blasc...@de.ibm.com wrote:
> From: Frank Blaschka
>
> This patch implements the s390 pci instructions in qemu. This allows
> to attach qemu pci devices including vfio. This does not mean the
> devices are functional but at least detection and
"previous" is
refering to here.
> +if (!s->nr_slots) {
> +s->nr_slots = 32;
> +}
> +
> +s->slots = g_malloc0(s->nr_slots * sizeof(KVMSlot));
> +
> +for (i = 0; i < s->nr_slots; i++) {
> +s->slots[i].slot = i;
> +}
> +
> /* check the vcpu limits */
> soft_vcpus_limit = kvm_recommended_vcpus(s);
> hard_vcpus_limit = kvm_max_vcpus(s);
> @@ -1527,6 +1538,7 @@ err:
> if (s->fd != -1) {
> close(s->fd);
> }
> +g_free(s->slots);
> g_free(s);
>
> return ret;
Reviewed-by: Thomas Huth
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 30 Apr 2014 10:07:09 +0200
Heiko Carstens wrote:
> On Tue, Apr 29, 2014 at 03:36:43PM +0200, Christian Borntraeger wrote:
> > +static int handle_mvpg_pei(struct kvm_vcpu *vcpu)
> > +{
> > + unsigned long hostaddr, srcaddr, dstaddr;
> > + psw_t *psw = &vcpu->arch.sie_block->gpsw;
> > +
On 27/10/15 06:13, Paul Mackerras wrote:
> When handling a hypervisor data or instruction storage interrupt (HDSI
> or HISI), we look up the SLB entry for the address being accessed in
> order to translate the effective address to a virtual address which can
> be looked up in the guest HPT. This l
On 03/08/15 16:41, Andrew Jones wrote:
> This series is the first series of a series of series that will
> bring support to kvm-unit-tests for ppc64, and eventually ppc64le.
Hi Andrew,
may I ask about the current state of ppc64 support in the
kvm-unit-tests? Is there a newer version available th
value to me for the time
being (but in the long run, we should really make this dynamically
instead, I think).
Thomas Huth (1):
KVM: PPC: Increase memslots to 320
arch/powerpc/include/asm/kvm_host.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
1.8.3.1
--
To unsubscribe from this
).
And while we're at it, also remove the KVM_MEM_SLOTS_NUM definition
from the powerpc-specific header since this gets defined in the
generic kvm_host.h header anyway.
Signed-off-by: Thomas Huth
---
arch/powerpc/include/asm/kvm_host.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
On 06/11/15 01:24, Andrew Jones wrote:
> It's pretty safe to not even bother checking for NULL when
> using malloc and friends, but if we do check, then fail
> hard.
>
> Signed-off-by: Andrew Jones
> ---
> lib/virtio-mmio.c | 7 ++-
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff
On 09/11/15 21:53, Andrew Jones wrote:
> It's pretty safe to not even bother checking for NULL when
> using malloc and friends, but if we do check, then fail
> hard.
>
> Signed-off-by: Andrew Jones
> ---
> v2: no code in asserts [Thomas Huth]
>
> lib/virtio-mmi
On 13/11/15 07:26, Aravinda Prasad wrote:
>
> On Friday 13 November 2015 07:20 AM, David Gibson wrote:
>> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
[...]
>>> So thinking whether qemu should explicitly enable the new NMI
>>> behavior.
>>
>> So, I think the reasoning above ten
On 04/11/15 10:03, Thomas Huth wrote:
> Only using 32 memslots for KVM on powerpc is way too low, you can
> nowadays hit this limit quite fast by adding a couple of PCI devices
> and/or pluggable memory DIMMs to the guest.
> x86 already increased the limit to 512 in total, to
On 19/11/15 09:37, Christian Borntraeger wrote:
> From: David Hildenbrand
>
> Let's provide a function to lookup a VCPU by id.
>
> Reviewed-by: Christian Borntraeger
> Reviewed-by: Dominik Dingel
> Signed-off-by: David Hildenbrand
> Signed-off-by: Christian Borntraeger
> [split patch from re
watchpoints in gdb of
older guests that only use the H_SET_DABR/X interface instead
of the new H_SET_MODE interface.
Signed-off-by: Thomas Huth
---
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
b
On 20/11/15 09:11, Thomas Huth wrote:
> In the old DABR register, the BT (Breakpoint Translation) bit
> is bit number 61. In the new DAWRX register, the WT (Watchpoint
> Translation) bit is bit number 59. So to move the DABR-BT bit
> into the position of the DAWRX-WT bit, it has to b
On 09/12/15 04:28, Paul Mackerras wrote:
> On Wed, Nov 04, 2015 at 10:03:48AM +0100, Thomas Huth wrote:
>> Only using 32 memslots for KVM on powerpc is way too low, you can
>> nowadays hit this limit quite fast by adding a couple of PCI devices
>> and/or pluggable memory DIMMs
werpc-specific header since this gets defined in the
generic kvm_host.h header anyway.
Signed-off-by: Thomas Huth
---
arch/powerpc/include/asm/kvm_host.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/kvm_host.h
b/arch/powerpc/include/asm/kvm_h
On 16/12/15 06:56, Aravinda Prasad wrote:
> This patch modifies KVM to cause a guest exit with
> KVM_EXIT_NMI instead of immediately delivering a 0x200
> interrupt to guest upon machine check exception in
> guest address. Exiting the guest enables QEMU to build
> error log and deliver machine check
Am Tue, 21 Apr 2015 10:41:51 +1000
schrieb David Gibson :
> On POWER, storage caching is usually configured via the MMU - attributes
> such as cache-inhibited are stored in the TLB and the hashed page table.
>
> This makes correctly performing cache inhibited IO accesses awkward when
> the MMU is
Am Tue, 21 Apr 2015 16:51:21 +1000
schrieb David Gibson :
> On Tue, Apr 21, 2015 at 08:37:02AM +0200, Thomas Huth wrote:
> > Am Tue, 21 Apr 2015 10:41:51 +1000
> > schrieb David Gibson :
> >
> > > On POWER, storage caching is usually configured via the MMU -
Am Thu, 23 Apr 2015 17:26:20 +0200
schrieb Greg Kurz :
> Signed-off-by: Greg Kurz
> ---
> include/linux/virtio_config.h | 17 +++--
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index ca3ed78..bd
Am Thu, 23 Apr 2015 19:22:15 +0200
schrieb Thomas Huth :
> Am Thu, 23 Apr 2015 17:26:20 +0200
> schrieb Greg Kurz :
>
> > Signed-off-by: Greg Kurz
> > ---
> > include/linux/virtio_config.h | 17 +++--
> > 1 file changed, 11 insertions(+), 6 d
, val);
> }
>
> static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
> {
> - return __cpu_to_virtio64(virtio_has_feature(vdev, VIRTIO_F_VERSION_1),
> val);
> + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
> }
Reviewed-by: Thomas
val)
> {
> - return __cpu_to_virtio16(tun->flags & TUN_VNET_LE, val);
> + return __cpu_to_virtio16(tun_is_little_endian(tun), val);
> }
Reviewed-by: Thomas Huth
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
inline __virtio16 cpu_to_macvtap16(struct macvtap_queue *q, u16 val)
> {
> - return __cpu_to_virtio16(q->flags & MACVTAP_VNET_LE, val);
> + return __cpu_to_virtio16(macvtap_is_little_endian(q), val);
> }
Reviewed-by: Thomas Huth
--
To unsubscribe from this list: send t
virtio64_to_cpu(vringh_is_little_endian(vrh), val);
> }
>
> static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val)
> {
> - return __cpu_to_virtio64(vrh->little_endian, val);
> + return __cpu_to_virtio64(vringh_is_little_endian(vrh), val);
> }
static inline __virtio64 cpu_to_vhost64(struct vhost_virtqueue *vq, u64 val)
> {
> - return __cpu_to_virtio64(vhost_has_feature(vq, VIRTIO_F_VERSION_1),
> val);
> + return __cpu_to_virtio64(vhost_is_little_endian(vq), val);
> }
> #endif
Reviewed-by: Thomas Huth
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 23 Apr 2015 17:29:06 +0200
Greg Kurz wrote:
> The current memory accessors logic is:
> - little endian if little_endian
> - native endian (i.e. no byteswap) if !little_endian
>
> If we want to fully support cross-endian vhost, we also need to be
> able to convert to big endian.
>
> Inst
L prefix to the constant
PPC_MPPE_ADDRESS_MASK.
Signed-off-by: Thomas Huth
---
arch/powerpc/include/asm/ppc-opcode.h| 2 +-
arch/powerpc/kvm/book3s.c| 3 ++-
arch/powerpc/kvm/book3s_32_mmu_host.c| 1 +
arch/powerpc/kvm/book3s_64_mmu_host.c| 1 +
arch/powerpc/kvm/b
Since the PPC970 support has been removed from the kvm-hv kernel
module recently, we should also reflect this change in the help
text of the corresponding Kconfig option.
Signed-off-by: Thomas Huth
---
arch/powerpc/kvm/Kconfig | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
On Thu, 2 Jul 2015 11:32:52 +0200
"Michael S. Tsirkin" wrote:
> On Thu, Jul 02, 2015 at 11:12:56AM +0200, Greg Kurz wrote:
> > On Thu, 2 Jul 2015 08:01:28 +0200
> > "Michael S. Tsirkin" wrote:
...
> > > Yea, well - support for legacy BE guests on the new LE hosts is
> > > exactly the motivation
The option for supporting cross-endianness legacy guests in
the vhost and tun code should only be available on systems
that support cross-endian guests.
Signed-off-by: Thomas Huth
---
arch/arm/kvm/Kconfig | 1 +
arch/arm64/kvm/Kconfig | 1 +
arch/powerpc/kvm/Kconfig | 1 +
drivers/net
On Thu, 9 Jul 2015 16:07:47 +0300
"Michael S. Tsirkin" wrote:
> On Thu, Jul 09, 2015 at 02:57:33PM +0200, Paolo Bonzini wrote:
> >
> >
> > On 09/07/2015 11:48, Laurent Vivier wrote:
> > >
> > >
> > > On 09/07/2015 09:49, Thomas Hut
The size of the Problem State Priority Boost Register is only
32 bits, so let's change the type of the corresponding variable
accordingly to avoid future trouble.
Signed-off-by: Thomas Huth
---
arch/powerpc/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
On 02/09/15 00:24, Paul Mackerras wrote:
> On Tue, Sep 01, 2015 at 11:41:18PM +0200, Thomas Huth wrote:
>> The size of the Problem State Priority Boost Register is only
>> 32 bits, so let's change the type of the corresponding variable
>> accordingly to avoid future
On 02/09/15 00:55, Benjamin Herrenschmidt wrote:
> On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote:
>> On Wed, Sep 02, 2015 at 08:25:05AM +1000, Benjamin Herrenschmidt
>> wrote:
>>> On Tue, 2015-09-01 at 23:41 +0200, Thomas Huth wrote:
>>>> The size
On 02/09/15 10:26, Alexander Graf wrote:
>
>> Am 02.09.2015 um 09:26 schrieb Thomas Huth :
>>
>>> On 02/09/15 00:55, Benjamin Herrenschmidt wrote:
>>>> On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote:
>>>> On Wed, Sep 02, 2015 at 08:
t the current code is
broken on big endian hosts: kvmppc_get_one_reg_hv() will only
return zero for this register since it is using the wrong half
of the pspb variable. Let's fix this problem by adjusting the
size of the pspb field in the kvm_vcpu_arch structure.
Signed-off-by: Thomas Huth
Hi all,
now that we get memory hotplugging for the spapr machine on qemu-ppc,
too, it seems like we easily can hit the amount of KVM-internal memory
slots now ("#define KVM_USER_MEM_SLOTS 32" in
arch/powerpc/include/asm/kvm_host.h). For example, start
qemu-system-ppc64 with a couple of "-device
On 04/09/15 12:07, Christian Borntraeger wrote:
> Am 04.09.2015 um 12:04 schrieb Alexander Graf:
>>
>>
>> On 04.09.15 11:59, Christian Borntraeger wrote:
>>> Am 04.09.2015 um 11:35 schrieb Thomas Huth:
>>>>
>>>> Hi all,
>>>>
>
On 04/09/15 12:04, Alexander Graf wrote:
>
>
> On 04.09.15 11:59, Christian Borntraeger wrote:
>> Am 04.09.2015 um 11:35 schrieb Thomas Huth:
>>>
>>> Hi all,
>>>
>>> now that we get memory hotplugging for the spapr machine on qemu-ppc,
>>
On 07/09/15 16:31, Igor Mammedov wrote:
> On Fri, 4 Sep 2015 12:04:41 +0200
> Alexander Graf wrote:
>
>>
>>
>> On 04.09.15 11:59, Christian Borntraeger wrote:
>>> Am 04.09.2015 um 11:35 schrieb Thomas Huth:
>>>>
>>>> Hi all,
>>&
On 08/09/15 09:11, Christian Borntraeger wrote:
> Am 08.09.2015 um 08:05 schrieb Thomas Huth:
>> On 07/09/15 16:31, Igor Mammedov wrote:
>>> On Fri, 4 Sep 2015 12:04:41 +0200
>>> Alexander Graf wrote:
>>>> On 04.09.15 11:59, Christian Borntraeger wrote:
>
On 16/09/15 10:51, Denis Kirjanov wrote:
> Hi,
>
> I see the following trace on qemu startup (ps700 blade):
>
> v4.2-11169-g64d1def
>
>
> [ 143.369638] ===
> [ 143.369640] [ INFO: suspicious RCU usage. ]
> [ 143.369643] 4.2.0-11169-g64d1def #10 Tainted: G S
> [ 1
"suspicious RCU usage"
when lock debugging is enabled.
Fixes: 99342cf8044420eebdf9297ca03a14cb6a7085a1
Signed-off-by: Thomas Huth
---
arch/powerpc/kvm/book3s.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index d75bf32.
e need to wait for the vcpu to finish
> executing inside the guest, and then remove this vcore from the
> preempted vcores list. That way, we avoid leaving this vcpu's vcore
> on the preempted vcores list when the vcpu gets interrupted.
>
> Fixes: ec2571650826
> Reported-by: Thom
On 16/09/15 12:59, Denis Kirjanov wrote:
> On 9/16/15, Thomas Huth wrote:
>> On 16/09/15 10:51, Denis Kirjanov wrote:
>>> Hi,
>>>
>>> I see the following trace on qemu startup (ps700 blade):
>>>
>>> v4.2-11169-g64d1def
>>>
>>&
On 21/09/15 03:37, David Gibson wrote:
> On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote:
>> Access to the kvm->buses (like with the kvm_io_bus_read() and -write()
>> functions) has to be protected via the kvm->srcu lock.
>> The kvmppc_h_logical_ci_load()
; r = KVM_MAX_VCPUS;
> break;
Yes, we'll likely need this soon! 32 slots are not enough...
Reviewed-by: Thomas Huth
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 26/10/15 06:15, Paul Mackerras wrote:
> On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote:
>> Yes, we'll likely need this soon! 32 slots are not enough...
>
> Would anyone object if I raised the limit for PPC to 512 slots?
In the long run we should real
t does ;-))? Or should
I maybe try to pursue another approach?
Thomas Huth (1):
KVM: s390: Add MEMOP ioctls for reading/writing guest memory
Documentation/virtual/kvm/api.txt | 44 +
arch/s390/kvm/gaccess.c | 22 +
arch/s390/kvm/gaccess.h
On s390, we've got to make sure to hold the IPTE lock while accessing
virtual memory. So let's add an ioctl for reading and writing virtual
memory to provide this feature for userspace, too.
Signed-off-by: Thomas Huth
Reviewed-by: Dominik Dingel
Reviewed-by: David H
On Tue, 03 Feb 2015 14:04:43 +0100
Paolo Bonzini wrote:
> On 03/02/2015 13:11, Thomas Huth wrote:
> > On s390, we've got to make sure to hold the IPTE lock while accessing
> > virtual memory. So let's add an ioctl for reading and writing virtual
> > memory to pro
On Tue, 03 Feb 2015 16:22:32 +0100
Paolo Bonzini wrote:
>
>
> On 03/02/2015 16:16, Thomas Huth wrote:
> > Actually, I'd prefer to keep the "virtual" in the defines for the type
> > of operation below: When it comes to s390 storage keys, we likely might
On Wed, 04 Feb 2015 09:26:11 +0100
Christian Borntraeger wrote:
> Am 03.02.2015 um 16:22 schrieb Paolo Bonzini:
> >
> >
> > On 03/02/2015 16:16, Thomas Huth wrote:
> >> Actually, I'd prefer to keep the "virtual" in the defines for the type
> >
On s390, we've got to make sure to hold the IPTE lock while accessing
logical memory. So let's add an ioctl for reading and writing logical
memory to provide this feature for userspace, too.
Signed-off-by: Thomas Huth
---
Documentation/virtual/kvm/api.txt | 45 +++
Synchronized the kvm.h Linux header for the new ioctl.
Signed-off-by: Thomas Huth
---
linux-headers/linux/kvm.h | 21 +
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 12045a1..a5f2c8e 100644
--- a
rework guest
memory access" patch series that has been sent out to the qemu-devel list
by Jens Freimann on last thursday.
Thomas Huth (2):
Update Linux headers with KVM_GUEST_MEM_OP ioctl
s390x/mmu: Use ioctl for reading and writing from/to guest memory
linux-headers/linux/kvm.h | 21
Add code to make use of the new ioctl for reading from / writing to
virtual guest memory. By using the ioctl, the memory accesses are now
protected with the so-called ipte-lock in the kernel.
Signed-off-by: Thomas Huth
---
target-s390x/cpu.h|7 +++
target-s390x/kvm.c
On Thu, 19 Feb 2015 10:47:29 +0100
Cornelia Huck wrote:
> On Mon, 16 Feb 2015 13:16:41 +0100
> Thomas Huth wrote:
>
> > On s390, we've got to make sure to hold the IPTE lock while accessing
> > logical memory. So let's add an ioctl for reading and writing log
kvm_kvfree() provides exactly the same functionality as the
new common kvfree() function - so let's simply replace the
kvm function with the common function.
Signed-off-by: Thomas Huth
---
arch/x86/kvm/x86.c |8
include/linux/kvm_host.h |1 -
virt/kvm/kvm_m
Hi all,
with the recent kernel 3.19, I get a kernel warning when I start my
KVM guest on s390 with virtio balloon enabled:
[0.839687] do not call blocking ops when !TASK_RUNNING; state=1 set at
[<00174a1e>] prepare_to_wait_event+0x7e/0x108
[0.839694] [
ort
> > http://article.gmane.org/gmane.linux.kernel.virtualization/24846
> > for a fuller explanation.
> >
> > To fix, rewrite using wait_woken.
> >
> > Cc: sta...@vger.kernel.org
> > Reported-by: Thomas Huth
> > Signed-off-by: Michael S. T
On Thu, 26 Feb 2015 14:58:18 +0800
Xiubo Li wrote:
> WARNING: quoted string split across lines
> + printk(KERN_INFO "kvm: enabling virtualization on "
> + "CPU%d failed\n", cpu);
>
> When fails to enable virtualization on CPUx for kvm, this log will
> be output in only one line,
On Thu, 26 Feb 2015 11:50:42 +1030
Rusty Russell wrote:
> Thomas Huth writes:
> > Hi all,
> >
> > with the recent kernel 3.19, I get a kernel warning when I start my
> > KVM guest on s390 with virtio balloon enabled:
>
> The deeper problem is that virtio_ccw_
On Tue, 24 Feb 2015 21:29:25 +0100
Thomas Huth wrote:
> kvm_kvfree() provides exactly the same functionality as the
> new common kvfree() function - so let's simply replace the
> kvm function with the common function.
>
> Signed-off-by: Thomas Huth
> ---
> arch/
> Date: Wed, 18 Mar 2015 21:23:48 -0300
> From: Marcelo Tosatti
>
> On Mon, Mar 16, 2015 at 09:51:40AM +0100, Christian Borntraeger wrote:
> > From: Thomas Huth
> >
> > On s390, we've got to make sure to hold the IPTE lock while accessing
> > logical memo
70 matches
Mail list logo