* [PATCH v2 0/6] Xen PV on HVM fixes and improvements
@ 2011-02-25 17:11 Stefano Stabellini
2011-02-25 17:11 ` [PATCH v2 1/6] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore stefano.stabellini
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Stefano Stabellini @ 2011-02-25 17:11 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xensource.com, Jeremy Fitzhardinge,
Konrad Rzeszutek Wilk, Stefano Stabellini
Hi all,
this patch series is a collection of fixes and improvements for Linux
running as Xen PV on HVM guest.
Changes to the previous version:
- patch 5 and 6 have been squashed together;
- xen_hvm_spinlock_init has been merged into xen_hvm_smp_prepare_cpus.
The list of patches with diffstat follows:
Stefano Stabellini (6):
xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
xen: do not use xen_info on HVM, set pv_info name to "Xen HVM"
xen-blkfront: handle Xen major numbers other than XENVBD
xen: make the ballon driver work for hvm domains
xen: PV on HVM: support PV spinlocks and IPIs
xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled
arch/x86/xen/enlighten.c | 6 ++-
arch/x86/xen/smp.c | 38 ++++++++++++++++++
arch/x86/xen/suspend.c | 2 +
arch/x86/xen/xen-ops.h | 2 +
drivers/block/xen-blkfront.c | 79 +++++++++++++++++++++++++++++++++++--
drivers/xen/balloon.c | 14 ++++--
drivers/xen/manage.c | 17 ++------
drivers/xen/platform-pci.c | 3 -
include/xen/interface/io/blkif.h | 21 ++++++++++
9 files changed, 154 insertions(+), 28 deletions(-)
A branch with these patches on 2.6.38-rc6 is available here:
git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 2.6.38-rc6-pvhvm
Cheers,
Stefano
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/6] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
@ 2011-02-25 17:11 ` stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 2/6] xen: do not use xen_info on HVM, set pv_info name to "Xen HVM" stefano.stabellini
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: stefano.stabellini @ 2011-02-25 17:11 UTC (permalink / raw)
To: linux-kernel
Cc: xen-devel, Jeremy.Fitzhardinge, konrad.wilk, Stefano.Stabellini,
Stefano Stabellini
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Now that xenstore_ready is used correctly for PV on HVM guests too, we
don't need to delay the initialization of xen_setup_shutdown_event
anymore.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
---
drivers/xen/manage.c | 17 ++++-------------
drivers/xen/platform-pci.c | 3 ---
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 2417727..b2a8d78 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -291,27 +291,18 @@ static int shutdown_event(struct notifier_block *notifier,
return NOTIFY_DONE;
}
-static int __init __setup_shutdown_event(void)
-{
- /* Delay initialization in the PV on HVM case */
- if (xen_hvm_domain())
- return 0;
-
- if (!xen_pv_domain())
- return -ENODEV;
-
- return xen_setup_shutdown_event();
-}
-
int xen_setup_shutdown_event(void)
{
static struct notifier_block xenstore_notifier = {
.notifier_call = shutdown_event
};
+
+ if (!xen_domain())
+ return -ENODEV;
register_xenstore_notifier(&xenstore_notifier);
return 0;
}
EXPORT_SYMBOL_GPL(xen_setup_shutdown_event);
-subsys_initcall(__setup_shutdown_event);
+subsys_initcall(xen_setup_shutdown_event);
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index afbe041..319dd0a 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -156,9 +156,6 @@ static int __devinit platform_pci_init(struct pci_dev *pdev,
if (ret)
goto out;
xenbus_probe(NULL);
- ret = xen_setup_shutdown_event();
- if (ret)
- goto out;
return 0;
out:
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/6] xen: do not use xen_info on HVM, set pv_info name to "Xen HVM"
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
2011-02-25 17:11 ` [PATCH v2 1/6] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore stefano.stabellini
@ 2011-02-25 17:11 ` stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 3/6] xen-blkfront: handle Xen major numbers other than XENVBD stefano.stabellini
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: stefano.stabellini @ 2011-02-25 17:11 UTC (permalink / raw)
To: linux-kernel
Cc: xen-devel, Jeremy.Fitzhardinge, konrad.wilk, Stefano.Stabellini,
Stefano Stabellini
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
---
arch/x86/xen/enlighten.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 50542ef..2f67e2e 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1284,8 +1284,7 @@ static int init_hvm_pv_info(int *major, int *minor)
xen_setup_features();
- pv_info = xen_info;
- pv_info.kernel_rpl = 0;
+ pv_info.name = "Xen HVM";
xen_domain_type = XEN_HVM_DOMAIN;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/6] xen-blkfront: handle Xen major numbers other than XENVBD
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
2011-02-25 17:11 ` [PATCH v2 1/6] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 2/6] xen: do not use xen_info on HVM, set pv_info name to "Xen HVM" stefano.stabellini
@ 2011-02-25 17:11 ` stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 4/6] xen: make the ballon driver work for hvm domains stefano.stabellini
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: stefano.stabellini @ 2011-02-25 17:11 UTC (permalink / raw)
To: linux-kernel
Cc: xen-devel, Jeremy.Fitzhardinge, konrad.wilk, Stefano.Stabellini,
Stefano Stabellini
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This patch makes sure blkfront handles correctly virtual device numbers
corresponding to Xen emulated IDE and SCSI disks: in those cases
blkfront translates the major number to XENVBD and the minor number to a
low xvd minor.
Note: this behaviour is different from what old xenlinux PV guests used
to do: they used to steal an IDE or SCSI major number and use it
instead.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
---
drivers/block/xen-blkfront.c | 79 +++++++++++++++++++++++++++++++++++--
include/xen/interface/io/blkif.h | 21 ++++++++++
2 files changed, 95 insertions(+), 5 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index d7aa39e..64d9c6d 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -120,6 +120,10 @@ static DEFINE_SPINLOCK(minor_lock);
#define EXTENDED (1<<EXT_SHIFT)
#define VDEV_IS_EXTENDED(dev) ((dev)&(EXTENDED))
#define BLKIF_MINOR_EXT(dev) ((dev)&(~EXTENDED))
+#define EMULATED_HD_DISK_MINOR_OFFSET (0)
+#define EMULATED_HD_DISK_NAME_OFFSET (EMULATED_HD_DISK_MINOR_OFFSET / 256)
+#define EMULATED_SD_DISK_MINOR_OFFSET (EMULATED_HD_DISK_MINOR_OFFSET + (4 * 16))
+#define EMULATED_SD_DISK_NAME_OFFSET (EMULATED_HD_DISK_NAME_OFFSET + 4)
#define DEV_NAME "xvd" /* name in /dev */
@@ -434,6 +438,65 @@ static void xlvbd_flush(struct blkfront_info *info)
info->feature_flush ? "enabled" : "disabled");
}
+static int xen_translate_vdev(int vdevice, int *minor, unsigned int *offset)
+{
+ int major;
+ major = BLKIF_MAJOR(vdevice);
+ *minor = BLKIF_MINOR(vdevice);
+ switch (major) {
+ case XEN_IDE0_MAJOR:
+ *offset = (*minor / 64) + EMULATED_HD_DISK_NAME_OFFSET;
+ *minor = ((*minor / 64) * PARTS_PER_DISK) +
+ EMULATED_HD_DISK_MINOR_OFFSET;
+ break;
+ case XEN_IDE1_MAJOR:
+ *offset = (*minor / 64) + 2 + EMULATED_HD_DISK_NAME_OFFSET;
+ *minor = (((*minor / 64) + 2) * PARTS_PER_DISK) +
+ EMULATED_HD_DISK_MINOR_OFFSET;
+ break;
+ case XEN_SCSI_DISK0_MAJOR:
+ *offset = (*minor / PARTS_PER_DISK) + EMULATED_SD_DISK_NAME_OFFSET;
+ *minor = *minor + EMULATED_SD_DISK_MINOR_OFFSET;
+ break;
+ case XEN_SCSI_DISK1_MAJOR:
+ case XEN_SCSI_DISK2_MAJOR:
+ case XEN_SCSI_DISK3_MAJOR:
+ case XEN_SCSI_DISK4_MAJOR:
+ case XEN_SCSI_DISK5_MAJOR:
+ case XEN_SCSI_DISK6_MAJOR:
+ case XEN_SCSI_DISK7_MAJOR:
+ *offset = (*minor / PARTS_PER_DISK) +
+ ((major - XEN_SCSI_DISK1_MAJOR + 1) * 16) +
+ EMULATED_SD_DISK_NAME_OFFSET;
+ *minor = *minor +
+ ((major - XEN_SCSI_DISK1_MAJOR + 1) * 16 * PARTS_PER_DISK) +
+ EMULATED_SD_DISK_MINOR_OFFSET;
+ break;
+ case XEN_SCSI_DISK8_MAJOR:
+ case XEN_SCSI_DISK9_MAJOR:
+ case XEN_SCSI_DISK10_MAJOR:
+ case XEN_SCSI_DISK11_MAJOR:
+ case XEN_SCSI_DISK12_MAJOR:
+ case XEN_SCSI_DISK13_MAJOR:
+ case XEN_SCSI_DISK14_MAJOR:
+ case XEN_SCSI_DISK15_MAJOR:
+ *offset = (*minor / PARTS_PER_DISK) +
+ ((major - XEN_SCSI_DISK8_MAJOR + 8) * 16) +
+ EMULATED_SD_DISK_NAME_OFFSET;
+ *minor = *minor +
+ ((major - XEN_SCSI_DISK8_MAJOR + 8) * 16 * PARTS_PER_DISK) +
+ EMULATED_SD_DISK_MINOR_OFFSET;
+ break;
+ case XENVBD_MAJOR:
+ *offset = *minor / PARTS_PER_DISK;
+ break;
+ default:
+ printk(KERN_WARNING "blkfront: your disk configuration is "
+ "incorrect, please use an xvd device instead\n");
+ return -ENODEV;
+ }
+ return 0;
+}
static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
struct blkfront_info *info,
@@ -441,7 +504,7 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
{
struct gendisk *gd;
int nr_minors = 1;
- int err = -ENODEV;
+ int err;
unsigned int offset;
int minor;
int nr_parts;
@@ -456,12 +519,20 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
}
if (!VDEV_IS_EXTENDED(info->vdevice)) {
- minor = BLKIF_MINOR(info->vdevice);
- nr_parts = PARTS_PER_DISK;
+ err = xen_translate_vdev(info->vdevice, &minor, &offset);
+ if (err)
+ return err;
+ nr_parts = PARTS_PER_DISK;
} else {
minor = BLKIF_MINOR_EXT(info->vdevice);
nr_parts = PARTS_PER_EXT_DISK;
+ offset = minor / nr_parts;
+ if (xen_hvm_domain() && offset <= EMULATED_HD_DISK_NAME_OFFSET + 4)
+ printk(KERN_WARNING "blkfront: vdevice 0x%x might conflict with "
+ "emulated IDE disks,\n\t choose an xvd device name"
+ "from xvde on\n", info->vdevice);
}
+ err = -ENODEV;
if ((minor % nr_parts) == 0)
nr_minors = nr_parts;
@@ -475,8 +546,6 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
if (gd == NULL)
goto release;
- offset = minor / nr_parts;
-
if (nr_minors > 1) {
if (offset < 26)
sprintf(gd->disk_name, "%s%c", DEV_NAME, 'a' + offset);
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h
index c2d1fa4..68dd2b4 100644
--- a/include/xen/interface/io/blkif.h
+++ b/include/xen/interface/io/blkif.h
@@ -91,4 +91,25 @@ DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response);
#define VDISK_REMOVABLE 0x2
#define VDISK_READONLY 0x4
+/* Xen-defined major numbers for virtual disks, they look strangely
+ * familiar */
+#define XEN_IDE0_MAJOR 3
+#define XEN_IDE1_MAJOR 22
+#define XEN_SCSI_DISK0_MAJOR 8
+#define XEN_SCSI_DISK1_MAJOR 65
+#define XEN_SCSI_DISK2_MAJOR 66
+#define XEN_SCSI_DISK3_MAJOR 67
+#define XEN_SCSI_DISK4_MAJOR 68
+#define XEN_SCSI_DISK5_MAJOR 69
+#define XEN_SCSI_DISK6_MAJOR 70
+#define XEN_SCSI_DISK7_MAJOR 71
+#define XEN_SCSI_DISK8_MAJOR 128
+#define XEN_SCSI_DISK9_MAJOR 129
+#define XEN_SCSI_DISK10_MAJOR 130
+#define XEN_SCSI_DISK11_MAJOR 131
+#define XEN_SCSI_DISK12_MAJOR 132
+#define XEN_SCSI_DISK13_MAJOR 133
+#define XEN_SCSI_DISK14_MAJOR 134
+#define XEN_SCSI_DISK15_MAJOR 135
+
#endif /* __XEN_PUBLIC_IO_BLKIF_H__ */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 4/6] xen: make the ballon driver work for hvm domains
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
` (2 preceding siblings ...)
2011-02-25 17:11 ` [PATCH v2 3/6] xen-blkfront: handle Xen major numbers other than XENVBD stefano.stabellini
@ 2011-02-25 17:11 ` stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 5/6] xen: PV on HVM: support PV spinlocks and IPIs stefano.stabellini
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: stefano.stabellini @ 2011-02-25 17:11 UTC (permalink / raw)
To: linux-kernel
Cc: xen-devel, Jeremy.Fitzhardinge, konrad.wilk, Stefano.Stabellini,
Stefano Stabellini
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
drivers/xen/balloon.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 43f9f02..9294f25 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -232,7 +232,7 @@ static int increase_reservation(unsigned long nr_pages)
set_phys_to_machine(pfn, frame_list[i]);
/* Link back into the page tables if not highmem. */
- if (pfn < max_low_pfn) {
+ if (!xen_hvm_domain() && pfn < max_low_pfn) {
int ret;
ret = HYPERVISOR_update_va_mapping(
(unsigned long)__va(pfn << PAGE_SHIFT),
@@ -280,7 +280,7 @@ static int decrease_reservation(unsigned long nr_pages)
scrub_page(page);
- if (!PageHighMem(page)) {
+ if (!xen_hvm_domain() && !PageHighMem(page)) {
ret = HYPERVISOR_update_va_mapping(
(unsigned long)__va(pfn << PAGE_SHIFT),
__pte_ma(0), 0);
@@ -392,15 +392,19 @@ static struct notifier_block xenstore_notifier;
static int __init balloon_init(void)
{
- unsigned long pfn, extra_pfn_end;
+ unsigned long pfn, nr_pages, extra_pfn_end;
struct page *page;
- if (!xen_pv_domain())
+ if (!xen_domain())
return -ENODEV;
pr_info("xen_balloon: Initialising balloon driver.\n");
- balloon_stats.current_pages = min(xen_start_info->nr_pages, max_pfn);
+ if (xen_pv_domain())
+ nr_pages = xen_start_info->nr_pages;
+ else
+ nr_pages = max_pfn;
+ balloon_stats.current_pages = min(nr_pages, max_pfn);
balloon_stats.target_pages = balloon_stats.current_pages;
balloon_stats.balloon_low = 0;
balloon_stats.balloon_high = 0;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 5/6] xen: PV on HVM: support PV spinlocks and IPIs
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
` (3 preceding siblings ...)
2011-02-25 17:11 ` [PATCH v2 4/6] xen: make the ballon driver work for hvm domains stefano.stabellini
@ 2011-02-25 17:11 ` stefano.stabellini
2011-02-25 17:12 ` [PATCH v2 6/6] xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled stefano.stabellini
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: stefano.stabellini @ 2011-02-25 17:11 UTC (permalink / raw)
To: linux-kernel
Cc: xen-devel, Jeremy.Fitzhardinge, konrad.wilk, Stefano.Stabellini,
Stefano Stabellini
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Initialize PV spinlocks on boot CPU right after native_smp_prepare_cpus
(that switch to APIC mode and initialize APIC routing); on secondary
CPUs on CPU_UP_PREPARE.
Enable the usage of event channels to send and receive IPIs when
running as a PV on HVM guest.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
arch/x86/xen/enlighten.c | 3 +++
arch/x86/xen/smp.c | 38 ++++++++++++++++++++++++++++++++++++++
arch/x86/xen/xen-ops.h | 2 ++
3 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 2f67e2e..fe02574 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1330,6 +1330,8 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self,
switch (action) {
case CPU_UP_PREPARE:
per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
+ if (xen_have_vector_callback)
+ xen_init_lock_cpu(cpu);
break;
default:
break;
@@ -1354,6 +1356,7 @@ static void __init xen_hvm_guest_init(void)
if (xen_feature(XENFEAT_hvm_callback_vector))
xen_have_vector_callback = 1;
+ xen_hvm_smp_init();
register_cpu_notifier(&xen_hvm_cpu_notifier);
xen_unplug_emulated_devices();
have_vcpu_info_placement = 0;
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 72a4c79..3061244 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -509,3 +509,41 @@ void __init xen_smp_init(void)
xen_fill_possible_map();
xen_init_spinlocks();
}
+
+static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus)
+{
+ native_smp_prepare_cpus(max_cpus);
+ WARN_ON(xen_smp_intr_init(0));
+
+ if (!xen_have_vector_callback)
+ return;
+ xen_init_lock_cpu(0);
+ xen_init_spinlocks();
+}
+
+static int __cpuinit xen_hvm_cpu_up(unsigned int cpu)
+{
+ int rc;
+ rc = native_cpu_up(cpu);
+ WARN_ON (xen_smp_intr_init(cpu));
+ return rc;
+}
+
+static void xen_hvm_cpu_die(unsigned int cpu)
+{
+ unbind_from_irqhandler(per_cpu(xen_resched_irq, cpu), NULL);
+ unbind_from_irqhandler(per_cpu(xen_callfunc_irq, cpu), NULL);
+ unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu), NULL);
+ unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu), NULL);
+ native_cpu_die(cpu);
+}
+
+void __init xen_hvm_smp_init(void)
+{
+ smp_ops.smp_prepare_cpus = xen_hvm_smp_prepare_cpus;
+ smp_ops.smp_send_reschedule = xen_smp_send_reschedule;
+ smp_ops.cpu_up = xen_hvm_cpu_up;
+ smp_ops.cpu_die = xen_hvm_cpu_die;
+ smp_ops.send_call_func_ipi = xen_smp_send_call_function_ipi;
+ smp_ops.send_call_func_single_ipi = xen_smp_send_call_function_single_ipi;
+}
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 9d41bf9..3112f55 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -64,10 +64,12 @@ void xen_setup_vcpu_info_placement(void);
#ifdef CONFIG_SMP
void xen_smp_init(void);
+void __init xen_hvm_smp_init(void);
extern cpumask_var_t xen_cpu_initialized_map;
#else
static inline void xen_smp_init(void) {}
+static inline void xen_hvm_smp_init(void) {}
#endif
#ifdef CONFIG_PARAVIRT_SPINLOCKS
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 6/6] xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
` (4 preceding siblings ...)
2011-02-25 17:11 ` [PATCH v2 5/6] xen: PV on HVM: support PV spinlocks and IPIs stefano.stabellini
@ 2011-02-25 17:12 ` stefano.stabellini
2011-02-25 19:32 ` [PATCH v2 0/6] Xen PV on HVM fixes and improvements Konrad Rzeszutek Wilk
[not found] ` <50e6b629.254d.12e798c9072.Coremail.topperxin@126.com>
7 siblings, 0 replies; 12+ messages in thread
From: stefano.stabellini @ 2011-02-25 17:12 UTC (permalink / raw)
To: linux-kernel
Cc: xen-devel, Jeremy.Fitzhardinge, konrad.wilk, Stefano.Stabellini,
Stefano Stabellini
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
arch/x86/xen/suspend.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
index 9bbd63a..4a3d3dd 100644
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -28,6 +28,7 @@ void xen_pre_suspend(void)
void xen_hvm_post_suspend(int suspend_cancelled)
{
+#ifdef CONFIG_XEN_PVHVM
int cpu;
xen_hvm_init_shared_info();
xen_callback_vector();
@@ -37,6 +38,7 @@ void xen_hvm_post_suspend(int suspend_cancelled)
xen_setup_runstate_info(cpu);
}
}
+#endif
}
void xen_post_suspend(int suspend_cancelled)
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/6] Xen PV on HVM fixes and improvements
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
` (5 preceding siblings ...)
2011-02-25 17:12 ` [PATCH v2 6/6] xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled stefano.stabellini
@ 2011-02-25 19:32 ` Konrad Rzeszutek Wilk
[not found] ` <50e6b629.254d.12e798c9072.Coremail.topperxin@126.com>
7 siblings, 0 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-02-25 19:32 UTC (permalink / raw)
To: Stefano Stabellini
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
Jeremy Fitzhardinge
On Fri, Feb 25, 2011 at 05:11:33PM +0000, Stefano Stabellini wrote:
> Hi all,
> this patch series is a collection of fixes and improvements for Linux
> running as Xen PV on HVM guest.
> Changes to the previous version:
Looks good to me. I am surprised that it was that easy to get the balloon
code to work under HVM..
>
> - patch 5 and 6 have been squashed together;
>
> - xen_hvm_spinlock_init has been merged into xen_hvm_smp_prepare_cpus.
>
>
> The list of patches with diffstat follows:
>
> Stefano Stabellini (6):
> xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
> xen: do not use xen_info on HVM, set pv_info name to "Xen HVM"
> xen-blkfront: handle Xen major numbers other than XENVBD
> xen: make the ballon driver work for hvm domains
> xen: PV on HVM: support PV spinlocks and IPIs
> xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled
>
> arch/x86/xen/enlighten.c | 6 ++-
> arch/x86/xen/smp.c | 38 ++++++++++++++++++
> arch/x86/xen/suspend.c | 2 +
> arch/x86/xen/xen-ops.h | 2 +
> drivers/block/xen-blkfront.c | 79 +++++++++++++++++++++++++++++++++++--
> drivers/xen/balloon.c | 14 ++++--
> drivers/xen/manage.c | 17 ++------
> drivers/xen/platform-pci.c | 3 -
> include/xen/interface/io/blkif.h | 21 ++++++++++
> 9 files changed, 154 insertions(+), 28 deletions(-)
>
> A branch with these patches on 2.6.38-rc6 is available here:
>
> git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 2.6.38-rc6-pvhvm
>
> Cheers,
>
> Stefano
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/6] Xen PV on HVM fixes and improvements
[not found] ` <50e6b629.254d.12e798c9072.Coremail.topperxin@126.com>
@ 2011-03-03 7:58 ` Pasi Kärkkäinen
2011-03-03 15:05 ` Stefano Stabellini
[not found] ` <7ef859a1.d96b.12e933f972a.Coremail.topperxin@126.com>
2 siblings, 0 replies; 12+ messages in thread
From: Pasi Kärkkäinen @ 2011-03-03 7:58 UTC (permalink / raw)
To: topperxin
Cc: Stefano Stabellini, Fitzhardinge, xen-devel@lists.xensource.com,
linux-kernel@vger.kernel.org, Konrad Rzeszutek Wilk
On Thu, Mar 03, 2011 at 10:29:38AM +0800, topperxin wrote:
> Hi stefano,
> It's very great of your work.I think it't useful
> to me, I have checked it out, and I will study it.
> What I care mostly is the pv-on-hvm drivers, now
> my main work is port pvonhvm drivers to various guest
> OS, no matter what OS version, such as ubuntu 10.10,
> debian 505 etc. But I found this work is difficult &
> boring to me, I can't find a general method which can
> easily port the pvonhvm drivers to all kinds guest os.
> Do you have any good ideas?
> I found there are not platform-pci source in your
> project, as we know, in the old pvonhvm drivers version,
> platform-pci module is important, it was used to establish
> the communication mechanism, such as xenbus, evtchn,etc,
> could you please tell me how can you get rid of it? and how
> can you substitute platform-pci, with which?
> Thanks a lot.
Hey,
Not sure if you've seen this wiki page..it has some links to
various versions of pv-on-hvm drivers for linux:
http://wiki.xen.org/xenwiki/XenLinuxPVonHVMdrivers
-- Pasi
>
> At 2011-02-26 01:11:33**"Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com> wrote:
>
> >Hi all,
> >this patch series is a collection of fixes and improvements for Linux
> >running as Xen PV on HVM guest.
> >Changes to the previous version:
> >
> >- patch 5 and 6 have been squashed together;
> >
> >- xen_hvm_spinlock_init has been merged into xen_hvm_smp_prepare_cpus.
> >
> >
> >The list of patches with diffstat follows:
> >
> >Stefano Stabellini (6):
> > xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
> > xen: do not use xen_info on HVM, set pv_info name to "Xen HVM"
> > xen-blkfront: handle Xen major numbers other than XENVBD
> > xen: make the ballon driver work for hvm domains
> > xen: PV on HVM: support PV spinlocks and IPIs
> > xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled
> >
> > arch/x86/xen/enlighten.c | 6 ++-
> > arch/x86/xen/smp.c | 38 ++++++++++++++++++
> > arch/x86/xen/suspend.c | 2 +
> > arch/x86/xen/xen-ops.h | 2 +
> > drivers/block/xen-blkfront.c | 79 +++++++++++++++++++++++++++++++++++--
> > drivers/xen/balloon.c | 14 ++++--
> > drivers/xen/manage.c | 17 ++------
> > drivers/xen/platform-pci.c | 3 -
> > include/xen/interface/io/blkif.h | 21 ++++++++++
> > 9 files changed, 154 insertions(+), 28 deletions(-)
> >
> >A branch with these patches on 2.6.38-rc6 is available here:
> >
> >git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 2.6.38-rc6-pvhvm
> >
> >Cheers,
> >
> >Stefano
> >
> >_______________________________________________
> >Xen-devel mailing list
> >Xen-devel@lists.xensource.com
> >http://lists.xensource.com/xen-devel
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re:[Xen-devel] [PATCH v2 0/6] Xen PV on HVM fixes and improvements
[not found] ` <50e6b629.254d.12e798c9072.Coremail.topperxin@126.com>
2011-03-03 7:58 ` [Xen-devel] " Pasi Kärkkäinen
@ 2011-03-03 15:05 ` Stefano Stabellini
[not found] ` <7ef859a1.d96b.12e933f972a.Coremail.topperxin@126.com>
2 siblings, 0 replies; 12+ messages in thread
From: Stefano Stabellini @ 2011-03-03 15:05 UTC (permalink / raw)
To: topperxin
Cc: Stefano Stabellini, linux-kernel@vger.kernel.org,
xen-devel@lists.xensource.com, Jeremy Fitzhardinge,
Konrad Rzeszutek Wilk
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
On Thu, 3 Mar 2011, topperxin wrote:
> Hi stefano,
>
> It's very great of your work.I think it't useful
> to me, I have checked it out, and I will study it.
> What I care mostly is the pv-on-hvm drivers, now
> my main work is port pvonhvm drivers to various guest
> OS, no matter what OS version, such as ubuntu 10.10,
> debian 505 etc. But I found this work is difficult &
> boring to me, I can't find a general method which can
> easily port the pvonhvm drivers to all kinds guest os.
> Do you have any good ideas?
PV on HVM is upstream now, so it is just a matter of time before all the
distros will have a kernel that supports PV on HVM out of the box.
> I found there are not platform-pci source in your
> project, as we know, in the old pvonhvm drivers version,
> platform-pci module is important, it was used to establish
> the communication mechanism, such as xenbus, evtchn,etc,
> could you please tell me how can you get rid of it? and how
> can you substitute platform-pci, with which?
Yes there is:
drivers/xen/platform-pci.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re:Re:[Xen-devel] [PATCH v2 0/6] Xen PV on HVM fixes and improvements
[not found] ` <7ef859a1.d96b.12e933f972a.Coremail.topperxin@126.com>
@ 2011-03-08 11:17 ` Stefano Stabellini
[not found] ` <37633ce9.14869.12e95634727.Coremail.topperxin@126.com>
1 sibling, 0 replies; 12+ messages in thread
From: Stefano Stabellini @ 2011-03-08 11:17 UTC (permalink / raw)
To: topperxin
Cc: Stefano Stabellini, Jeremy Fitzhardinge, Konrad Rzeszutek Wilk,
linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]
On Tue, 8 Mar 2011, topperxin wrote:
> At 2011-03-03 23:05:09,"Stefano Stabellini" <stefano.stabellini@eu.citrix.com> wrote:
>
> >On Thu, 3 Mar 2011, topperxin wrote:
> >> Hi stefano,
> >>
> >> It's very great of your work.I think it't useful
> >> to me, I have checked it out, and I will study it.
> >> What I care mostly is the pv-on-hvm drivers, now
> >> my main work is port pvonhvm drivers to various guest
> >> OS, no matter what OS version, such as ubuntu 10.10,
> >> debian 505 etc. But I found this work is difficult &
> >> boring to me, I can't find a general method which can
> >> easily port the pvonhvm drivers to all kinds guest os.
> >> Do you have any good ideas?
> >
> >PV on HVM is upstream now, so it is just a matter of time before all the
> >distros will have a kernel that supports PV on HVM out of the box.
> >
> >
> >> I found there are not platform-pci source in your
> >> project, as we know, in the old pvonhvm drivers version,
> >> platform-pci module is important, it was used to establish
> >> the communication mechanism, such as xenbus, evtchn,etc,
> >> could you please tell me how can you get rid of it? and how
> >> can you substitute platform-pci, with which?
> >
> >Yes there is:
> >drivers/xen/platform-pci.c
>
> 1.sorry, I can't find platform-pci.c in your release source.
> 2.6.38-rc5-pvhvm
> 2.another question is when I make; make install under 2.6.38-rc5-pvhvm
> I found the version number change from 2.6.38 to 2.6.34 under
> /lib/modules/2.6.34-rc1
> why?
you must be working on the wrong tree :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re:Re:Re:[Xen-devel] [PATCH v2 0/6] Xen PV on HVM fixes and improvements
[not found] ` <37633ce9.14869.12e95634727.Coremail.topperxin@126.com>
@ 2011-03-08 12:45 ` Stefano Stabellini
0 siblings, 0 replies; 12+ messages in thread
From: Stefano Stabellini @ 2011-03-08 12:45 UTC (permalink / raw)
To: topperxin
Cc: Stefano Stabellini, Jeremy Fitzhardinge, Konrad Rzeszutek Wilk,
linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
On Tue, 8 Mar 2011, topperxin wrote:
> >you must be working on the wrong tree :)
>
> git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 2.6.38-rc6-pvhvm
> isn't it? I get it from this address, you given in the mail.
> cloud you please give me a right address?
> thanks a lot.
You probably cloned my master branch: 2.6.38-rc6-pvhvm is the name of a
branch, if you executed:
git clone git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 2.6.38-rc6-pvhvm
you just cloned the "master" branch in a directory named "2.6.38-rc6-pvhvm".
try:
git remote update
git branch -r
you should get a list of remote branches available, among which
"2.6.38-rc6-pvhvm".
At this point you can checkout the branch 2.6.38-rc6-pvhvm with this
command:
git checkout -b your_branch_name "origin/2.6.38-rc6-pvhvm"
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-03-08 12:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 17:11 [PATCH v2 0/6] Xen PV on HVM fixes and improvements Stefano Stabellini
2011-02-25 17:11 ` [PATCH v2 1/6] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 2/6] xen: do not use xen_info on HVM, set pv_info name to "Xen HVM" stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 3/6] xen-blkfront: handle Xen major numbers other than XENVBD stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 4/6] xen: make the ballon driver work for hvm domains stefano.stabellini
2011-02-25 17:11 ` [PATCH v2 5/6] xen: PV on HVM: support PV spinlocks and IPIs stefano.stabellini
2011-02-25 17:12 ` [PATCH v2 6/6] xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled stefano.stabellini
2011-02-25 19:32 ` [PATCH v2 0/6] Xen PV on HVM fixes and improvements Konrad Rzeszutek Wilk
[not found] ` <50e6b629.254d.12e798c9072.Coremail.topperxin@126.com>
2011-03-03 7:58 ` [Xen-devel] " Pasi Kärkkäinen
2011-03-03 15:05 ` Stefano Stabellini
[not found] ` <7ef859a1.d96b.12e933f972a.Coremail.topperxin@126.com>
2011-03-08 11:17 ` Stefano Stabellini
[not found] ` <37633ce9.14869.12e95634727.Coremail.topperxin@126.com>
2011-03-08 12:45 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox