Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307909
b: refs/heads/master
c: 1526bf9
h: refs/heads/master
i:
  307907: 5340524
v: v3
  • Loading branch information
Christian Borntraeger authored and Marcelo Tosatti committed May 18, 2012
1 parent bbaa7a0 commit 180310e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8368af8b46b904def42a0f341d2f4f29001fa77
refs/heads/master: 1526bf9ccf310f1d35c1275b8b477a249d25aaf2
1 change: 1 addition & 0 deletions trunk/arch/s390/include/asm/sclp.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ int sclp_cpu_deconfigure(u8 cpu);
void sclp_facilities_detect(void);
unsigned long long sclp_get_rnmax(void);
unsigned long long sclp_get_rzm(void);
u8 sclp_get_fac85(void);
int sclp_sdias_blk_count(void);
int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
int sclp_chp_configure(struct chp_id chpid);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/pgtable.h>
#include <asm/nmi.h>
#include <asm/switch_to.h>
#include <asm/sclp.h>
#include "kvm-s390.h"
#include "gaccess.h"

Expand Down Expand Up @@ -140,6 +141,9 @@ int kvm_dev_ioctl_check_extension(long ext)
case KVM_CAP_MAX_VCPUS:
r = KVM_MAX_VCPUS;
break;
case KVM_CAP_S390_COW:
r = sclp_get_fac85() & 0x2;
break;
default:
r = 0;
}
Expand Down
12 changes: 11 additions & 1 deletion trunk/drivers/s390/char/sclp_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/memory.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <asm/chpid.h>
#include <asm/sclp.h>
Expand All @@ -38,7 +39,8 @@ struct read_info_sccb {
u64 facilities; /* 48-55 */
u8 _reserved2[84 - 56]; /* 56-83 */
u8 fac84; /* 84 */
u8 _reserved3[91 - 85]; /* 85-90 */
u8 fac85; /* 85 */
u8 _reserved3[91 - 86]; /* 86-90 */
u8 flags; /* 91 */
u8 _reserved4[100 - 92]; /* 92-99 */
u32 rnsize2; /* 100-103 */
Expand All @@ -51,6 +53,7 @@ static int __initdata early_read_info_sccb_valid;

u64 sclp_facilities;
static u8 sclp_fac84;
static u8 sclp_fac85;
static unsigned long long rzm;
static unsigned long long rnmax;

Expand Down Expand Up @@ -112,6 +115,7 @@ void __init sclp_facilities_detect(void)
sccb = &early_read_info_sccb;
sclp_facilities = sccb->facilities;
sclp_fac84 = sccb->fac84;
sclp_fac85 = sccb->fac85;
rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2;
rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2;
rzm <<= 20;
Expand All @@ -127,6 +131,12 @@ unsigned long long sclp_get_rzm(void)
return rzm;
}

u8 sclp_get_fac85(void)
{
return sclp_fac85;
}
EXPORT_SYMBOL_GPL(sclp_get_fac85);

/*
* This function will be called after sclp_facilities_detect(), which gets
* called from early.c code. Therefore the sccb should have valid contents.
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ struct kvm_ppc_smmu_info {
#define KVM_CAP_KVMCLOCK_CTRL 76
#define KVM_CAP_SIGNAL_MSI 77
#define KVM_CAP_PPC_GET_SMMU_INFO 78
#define KVM_CAP_S390_COW 79

#ifdef KVM_CAP_IRQ_ROUTING

Expand Down

0 comments on commit 180310e

Please sign in to comment.