qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] kvm: add kvm_pv_unhalt
@ 2013-09-18 14:41 Andrew Jones
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1 Andrew Jones
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt Andrew Jones
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Jones @ 2013-09-18 14:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: afaerber, ehabkost

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/kvm_para.h |  1 +
 linux-headers/linux/kvm.h        |  1 +
 linux-headers/linux/kvm_para.h   |  1 +
 linux-headers/linux/vfio.h       | 38 ++++++++++++++++++++++++++++++++++++++
 target-i386/cpu.c                |  2 +-
 5 files changed, 42 insertions(+), 1 deletion(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1
  2013-09-18 14:41 [Qemu-devel] [PATCH 0/2] kvm: add kvm_pv_unhalt Andrew Jones
@ 2013-09-18 14:41 ` Andrew Jones
  2013-09-18 18:05   ` Eduardo Habkost
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt Andrew Jones
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Jones @ 2013-09-18 14:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: afaerber, ehabkost

Signed-off-by: Andrew Jones <drjones@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 a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h
index a1c3d72acd0eb..e41c5c1a28dae 100644
--- a/linux-headers/asm-x86/kvm_para.h
+++ b/linux-headers/asm-x86/kvm_para.h
@@ -23,6 +23,7 @@
 #define KVM_FEATURE_ASYNC_PF		4
 #define KVM_FEATURE_STEAL_TIME		5
 #define KVM_FEATURE_PV_EOI		6
+#define KVM_FEATURE_PV_UNHALT		7
 
 /* The last 8 bits are used to indicate how to interpret the flags field
  * in pvclock structure. If no bits are set, all flags are ignored.
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 56fce1c400b14..13e890c53b110 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -667,6 +667,7 @@ struct kvm_ppc_smmu_info {
 #define KVM_CAP_PPC_RTAS 91
 #define KVM_CAP_IRQ_XICS 92
 #define KVM_CAP_ARM_EL1_32BIT 93
+#define KVM_CAP_SPAPR_MULTITCE 94
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
diff --git a/linux-headers/linux/kvm_para.h b/linux-headers/linux/kvm_para.h
index 7bdcf93c1dba4..2dff7838b4398 100644
--- a/linux-headers/linux/kvm_para.h
+++ b/linux-headers/linux/kvm_para.h
@@ -19,6 +19,7 @@
 #define KVM_HC_MMU_OP			2
 #define KVM_HC_FEATURES			3
 #define KVM_HC_PPC_MAP_MAGIC_PAGE	4
+#define KVM_HC_KICK_CPU			5
 
 /*
  * hypercalls use architecture specific
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index b42b9abd0e05a..17c58e0ede420 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -324,6 +324,44 @@ enum {
 	VFIO_PCI_NUM_IRQS
 };
 
+/**
+ * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12,
+ *					      struct vfio_pci_hot_reset_info)
+ *
+ * Return: 0 on success, -errno on failure:
+ *	-enospc = insufficient buffer, -enodev = unsupported for device.
+ */
+struct vfio_pci_dependent_device {
+	__u32	group_id;
+	__u16	segment;
+	__u8	bus;
+	__u8	devfn; /* Use PCI_SLOT/PCI_FUNC */
+};
+
+struct vfio_pci_hot_reset_info {
+	__u32	argsz;
+	__u32	flags;
+	__u32	count;
+	struct vfio_pci_dependent_device	devices[];
+};
+
+#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO	_IO(VFIO_TYPE, VFIO_BASE + 12)
+
+/**
+ * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13,
+ *				    struct vfio_pci_hot_reset)
+ *
+ * Return: 0 on success, -errno on failure.
+ */
+struct vfio_pci_hot_reset {
+	__u32	argsz;
+	__u32	flags;
+	__u32	count;
+	__s32	group_fds[];
+};
+
+#define VFIO_DEVICE_PCI_HOT_RESET	_IO(VFIO_TYPE, VFIO_BASE + 13)
+
 /* -------- API for Type1 VFIO IOMMU -------- */
 
 /**
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt
  2013-09-18 14:41 [Qemu-devel] [PATCH 0/2] kvm: add kvm_pv_unhalt Andrew Jones
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1 Andrew Jones
@ 2013-09-18 14:41 ` Andrew Jones
  2013-09-18 17:24   ` Eduardo Habkost
  2013-09-18 17:35   ` Andreas Färber
  1 sibling, 2 replies; 7+ messages in thread
From: Andrew Jones @ 2013-09-18 14:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: afaerber, ehabkost

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 <drjones@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
index 42c5de034ecc8..89491e7b1fba1 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -123,7 +123,7 @@ static const char *ext4_feature_name[] = {
 
 static const char *kvm_feature_name[] = {
     "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock",
-    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", NULL,
+    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", "kvm_pv_unhalt",
     NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt Andrew Jones
@ 2013-09-18 17:24   ` Eduardo Habkost
  2013-09-18 17:35   ` Andreas Färber
  1 sibling, 0 replies; 7+ messages in thread
From: Eduardo Habkost @ 2013-09-18 17:24 UTC (permalink / raw)
  To: Andrew Jones; +Cc: qemu-devel, afaerber

On Wed, Sep 18, 2013 at 04:41:45PM +0200, Andrew Jones wrote:
> 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 <drjones@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@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
> index 42c5de034ecc8..89491e7b1fba1 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -123,7 +123,7 @@ static const char *ext4_feature_name[] = {
>  
>  static const char *kvm_feature_name[] = {
>      "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock",
> -    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", NULL,
> +    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", "kvm_pv_unhalt",
>      NULL, NULL, NULL, NULL,
>      NULL, NULL, NULL, NULL,
>      NULL, NULL, NULL, NULL,
> -- 
> 1.8.1.4
> 

-- 
Eduardo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt Andrew Jones
  2013-09-18 17:24   ` Eduardo Habkost
@ 2013-09-18 17:35   ` Andreas Färber
  2013-09-19 17:35     ` Paolo Bonzini
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Färber @ 2013-09-18 17:35 UTC (permalink / raw)
  To: Andrew Jones; +Cc: Paolo Bonzini, qemu-devel, ehabkost

Am 18.09.2013 16:41, schrieb 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 <drjones@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
> index 42c5de034ecc8..89491e7b1fba1 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -123,7 +123,7 @@ static const char *ext4_feature_name[] = {
>  
>  static const char *kvm_feature_name[] = {
>      "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock",
> -    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", NULL,
> +    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", "kvm_pv_unhalt",
>      NULL, NULL, NULL, NULL,
>      NULL, NULL, NULL, NULL,
>      NULL, NULL, NULL, NULL,

Since there's linux-headers updates involved I can't take it through my
qom-cpu queue. If Paolo can tweak the subject to "target-i386: Add
paravirt CPU feature kvm_pv_unhalt" or so I'd be happy for this to go
through his uq/master queue. (qemu-kvm no longer exists, all QEMU
patches are about QEMU anyway and there's no discrete "paravirt"
subsystem or precedent in qemu.git history.)

Patch itself is

Reviewed-by: Andreas Färber <afaerber@suse.de>

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1
  2013-09-18 14:41 ` [Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1 Andrew Jones
@ 2013-09-18 18:05   ` Eduardo Habkost
  0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Habkost @ 2013-09-18 18:05 UTC (permalink / raw)
  To: Andrew Jones; +Cc: qemu-devel, afaerber

On Wed, Sep 18, 2013 at 04:41:44PM +0200, Andrew Jones wrote:
> Signed-off-by: Andrew Jones <drjones@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@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 a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h
> index a1c3d72acd0eb..e41c5c1a28dae 100644
> --- a/linux-headers/asm-x86/kvm_para.h
> +++ b/linux-headers/asm-x86/kvm_para.h
> @@ -23,6 +23,7 @@
>  #define KVM_FEATURE_ASYNC_PF		4
>  #define KVM_FEATURE_STEAL_TIME		5
>  #define KVM_FEATURE_PV_EOI		6
> +#define KVM_FEATURE_PV_UNHALT		7
>  
>  /* The last 8 bits are used to indicate how to interpret the flags field
>   * in pvclock structure. If no bits are set, all flags are ignored.
> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
> index 56fce1c400b14..13e890c53b110 100644
> --- a/linux-headers/linux/kvm.h
> +++ b/linux-headers/linux/kvm.h
> @@ -667,6 +667,7 @@ struct kvm_ppc_smmu_info {
>  #define KVM_CAP_PPC_RTAS 91
>  #define KVM_CAP_IRQ_XICS 92
>  #define KVM_CAP_ARM_EL1_32BIT 93
> +#define KVM_CAP_SPAPR_MULTITCE 94
>  
>  #ifdef KVM_CAP_IRQ_ROUTING
>  
> diff --git a/linux-headers/linux/kvm_para.h b/linux-headers/linux/kvm_para.h
> index 7bdcf93c1dba4..2dff7838b4398 100644
> --- a/linux-headers/linux/kvm_para.h
> +++ b/linux-headers/linux/kvm_para.h
> @@ -19,6 +19,7 @@
>  #define KVM_HC_MMU_OP			2
>  #define KVM_HC_FEATURES			3
>  #define KVM_HC_PPC_MAP_MAGIC_PAGE	4
> +#define KVM_HC_KICK_CPU			5
>  
>  /*
>   * hypercalls use architecture specific
> diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
> index b42b9abd0e05a..17c58e0ede420 100644
> --- a/linux-headers/linux/vfio.h
> +++ b/linux-headers/linux/vfio.h
> @@ -324,6 +324,44 @@ enum {
>  	VFIO_PCI_NUM_IRQS
>  };
>  
> +/**
> + * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12,
> + *					      struct vfio_pci_hot_reset_info)
> + *
> + * Return: 0 on success, -errno on failure:
> + *	-enospc = insufficient buffer, -enodev = unsupported for device.
> + */
> +struct vfio_pci_dependent_device {
> +	__u32	group_id;
> +	__u16	segment;
> +	__u8	bus;
> +	__u8	devfn; /* Use PCI_SLOT/PCI_FUNC */
> +};
> +
> +struct vfio_pci_hot_reset_info {
> +	__u32	argsz;
> +	__u32	flags;
> +	__u32	count;
> +	struct vfio_pci_dependent_device	devices[];
> +};
> +
> +#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO	_IO(VFIO_TYPE, VFIO_BASE + 12)
> +
> +/**
> + * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13,
> + *				    struct vfio_pci_hot_reset)
> + *
> + * Return: 0 on success, -errno on failure.
> + */
> +struct vfio_pci_hot_reset {
> +	__u32	argsz;
> +	__u32	flags;
> +	__u32	count;
> +	__s32	group_fds[];
> +};
> +
> +#define VFIO_DEVICE_PCI_HOT_RESET	_IO(VFIO_TYPE, VFIO_BASE + 13)
> +
>  /* -------- API for Type1 VFIO IOMMU -------- */
>  
>  /**
> -- 
> 1.8.1.4
> 
> 

-- 
Eduardo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt
  2013-09-18 17:35   ` Andreas Färber
@ 2013-09-19 17:35     ` Paolo Bonzini
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2013-09-19 17:35 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Andrew Jones, qemu-devel, ehabkost

Il 18/09/2013 19:35, Andreas Färber ha scritto:
> Am 18.09.2013 16:41, schrieb 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 <drjones@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
>> index 42c5de034ecc8..89491e7b1fba1 100644
>> --- a/target-i386/cpu.c
>> +++ b/target-i386/cpu.c
>> @@ -123,7 +123,7 @@ static const char *ext4_feature_name[] = {
>>  
>>  static const char *kvm_feature_name[] = {
>>      "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock",
>> -    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", NULL,
>> +    "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", "kvm_pv_unhalt",
>>      NULL, NULL, NULL, NULL,
>>      NULL, NULL, NULL, NULL,
>>      NULL, NULL, NULL, NULL,
> 
> Since there's linux-headers updates involved I can't take it through my
> qom-cpu queue. If Paolo can tweak the subject to "target-i386: Add
> paravirt CPU feature kvm_pv_unhalt" or so I'd be happy for this to go
> through his uq/master queue. (qemu-kvm no longer exists, all QEMU
> patches are about QEMU anyway and there's no discrete "paravirt"
> subsystem or precedent in qemu.git history.)
> 
> Patch itself is
> 
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> 
> Regards,
> Andreas
> 

Will do.

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-19 17:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 14:41 [Qemu-devel] [PATCH 0/2] kvm: add kvm_pv_unhalt Andrew Jones
2013-09-18 14:41 ` [Qemu-devel] [PATCH 1/2] linux-headers: update to 3.12-rc1 Andrew Jones
2013-09-18 18:05   ` Eduardo Habkost
2013-09-18 14:41 ` [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt Andrew Jones
2013-09-18 17:24   ` Eduardo Habkost
2013-09-18 17:35   ` Andreas Färber
2013-09-19 17:35     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).