Using the feat in this way does nothing. You cannot add your proficiency bonus again.
The rules are quite specific. From the Players' Basic Rules, under "Proficiency Bonus":
Your proficiency bonus can’t be added to a single die roll or other number more than once. For example, if two different rules say you can add your proficiency bonus to a Wisdom saving throw, you nevertheless add the bonus only once when you make the save.
Occasionally, your proficiency bonus might be multiplied or divided (doubled or halved, for example) before you apply it. For example, the rogue’s Expertise feature doubles the proficiency bonus for certain ability checks. If a circumstance suggests that your proficiency bonus applies more than once to the same roll, you still add it only once and multiply or divide it only once.
So no, if you're proficient in martial weapons and you take the Weapon Master feat and choose longswords, you don't get any more proficient. The feat is for characters who aren't already proficient.
As an edge case: notice that Fighters and other classes are proficient in "simple and martial weapons" but "all armor and shields" - the wording leaves open the possibility that simple and martial weapons might not cover all of them, and indeed it doesn't cover improvised weapons (though if that's what you're after, Tavern Brawler is probably a better choice.) If you come across an exotic weapon (though Wizards hasn't published any so far), this feat might be useful for these classes as well.
Outside of Complete Scoundrel (14) and Sharn: City of Towers (168), the prestige class exotic weapon master is unmentioned beyond its original appearance in Masters of the Wild (53–4) then its revised appearance in Complete Warrior (30–1). Neither Scoundrel nor Sharn offers anymore insight than Warrior into how to use the exotic weapon master prestige class's extraordinary ability exotic weapon stunt (uncanny blow). That means you're stuck reading the special ability and making a choice.
What uncanny blow says…
The extraordinary ability exotic weapon stunt (uncanny blow) says
When wielding a one-handed exotic melee weapon in two hands, the character can focus the power of his attack so that he deals extra damage equal to his Strength bonus ×2 instead of his Strength bonus ×1-1/2. If he has the Power Attack feat, he treats the weapon as two-handed for purposes of determining his bonus on damage rolls. (31)
(If that last sentence strikes you as a largely unnecessary reminder, it should. This reader suspects that the precise wording of the 3.5 revision's of the feat Power Attack (PH 98) was still being decided when Complete Warrior was published, Warrior appearing on shelves only 5 months after the revised Player's Handbook.)
Anyway, the Player's Handbook description of the bastard sword, in part, says, "A bastard sword… is an exotic weapon. A character can use a bastard sword two-handed as a martial weapon" (121). And the bastard sword appears on Table 7–5: Weapons under the heading Exotic Weapons under the subheading One-handed Weapons (117). For this reader, that's enough: the bastard sword is always a one-handed exotic weapon that can—it just so happens and if the wielder so chooses—also be used as a martial weapon if the wielder employs it two-handed.
Thus this GM would rule—perhaps even a little reluctantly, depending on the optimization level of the campaign and the possible outcome of such a ruling—that a creature that's proficient with all martial weapons, that enters the prestige class exotic weapon master, and that picks the special ability exotic weapon stunt (uncanny blow) can use that special ability with a bastard sword that the creature wields in two hands, despite the creature not possessing the feat Exotic Weapon Proficiency (bastard sword) (PH 94) yet possessing the feat Weapon Focus (bastard sword) (PH 102) (perhaps through a workaround like the swordsage's extraordinary ability discipline focus (Weapon Focus (Diamond Mind)) (Tome of Battle 16).
…Then there's some Sage Advice
The Dragon #316 Wizards Workshop column "Sage Advice: Equipment and Combat Official Answers" (100–4) includes two exchanges relevant to the extraordinary ability exotic weapon stunt (uncanny blow).
Question
So when is a weapon “two-handed?”…
Answer
Table 7–5 in the Player's Handbook lists weapons as light, one-handed, or two-handed strictly as a matter of convenience. These size categories [i.e. the effort required for a creature to wield the weapon] are always relative to the wielder’s size….
When the combat rules speak of “two-handed” weapons, they’re referring to how the weapon is being used. A Medium character using a Medium longsword in two hands is using a “two-handed” weapon. The same character using a Medium lance in one hand while mounted is using a one-handed weapon. (101–2)
So, according to this advice, a creature that's wielding a bastard sword in two hands is using that bastard sword as a two-handed weapon. That means the special ability exotic weapon stunt (uncanny blow) can apply to the bastard sword, and we're good to go, right? Not so fast. The very next question is this one:
Question
Exactly when is a weapon light, one-handed, and two-handed?…
Answer
The bastard sword, lance, and dwarven waraxe are all two-handed weapons that can be used in one hand under the correct circumstances (the bastard sword and dwarven waraxe are shown on Table 7–5 as one-handed exotic weapons, but they’re really two-handed weapons). Treat all three of these weapons as two-handed weapons when determining who can use them and how. For example, a Small character cannot use a lance or bastard sword made for a Medium creature, even when mounted (in the case of a lance) or when the Small character has the Exotic Weapon Proficiency (bastard sword) feat. (57)
(Emphasis in answers mine. The Sage at the time is Monster Manual primary author and dnd-3e co-designer Skip Williams.) So, in sum, the advice tells the reader that Table 7–5: Weapons lists the bastard sword and dwarven waraxe as one-handed weapons only for convenience and that outside of combat, those weapons are totally two-handed weapons, even though in combat those weapons can be considered either one-handed or two-handed weapons depending on how they're used.
So an argument can be made either way. On one hand, the description of the stunt uncanny blow could be describing how a creature must be using the exotic weapon in combat, so the stunt totally falls under the first ruling, making using the stunt with a bastard sword that's used two-handed legit. On the other hand, the description of the stunt could be describing in the abstract the kind of weapon that the creature must wield to experience the stunt's bonuses, and that description is independent of the weapon's wielder, in which case the stunt's not legit for use with the bastard sword or dwarven waraxe because, technically, no matter how they're used those weapons are always two-handed weapons.
This reader tends to favor the former rather than the latter: the universe is hard enough on the mundane warrior without—as it seems to this reader—double-secret rules prohibiting players from their PCs being ever-so-slightly improved and more versatile axeman or swordsman.
Note: These Sage Advice exchanges are repeated nearly verbatim by the Main FAQ on pages 48 and 57, respectively. Issues with the FAQ can be viewed in answer to this question.
Best Answer
So with a bastard sword, you’re in luck, RAW—when kensai had you choose a single weapon, and you chose bastard sword, you chose something that is both a martial weapon and an exotic weapon. The definition of a martial weapon is a weapon you can use with martial weapon proficiency—and a bastard sword is that. The placement of the bastard sword in the exotic weapon table—rather than both, say—is not significant and there is no merit in reading more into that; that decision was almost certainly about saving page space.
If you are not convinced that bastard sword is a martial weapon, then consider this: a class grants Martial Weapon Proficiency as a bonus feat, or for some reason you choose to take that feat instead of Exotic Weapon Proficiency. Can you choose “bastard sword” for that feat? There are references to “Martial Weapon Proficiency (bastard sword)” in the rules, including in the very FAQ that’s been pointed to as a counterpoint, so that strongly suggests the answer is “Yes,” as does, ya know, the fact that the rules explicitly describe having martial proficiency in the bastard sword and what that means (and the fact that this proficiency existing is the very definition of a martial weapon). None of that could exist unless the bastard sword is a martial weapon. It’s just both martial and exotic. Anything that checks for martial status works with the bastard sword, and so also does anything that checks for exotic status, and they even work together at the same time—and that’s all fine, it causes zero problems under the rules.
It’s been this way since D&D 3.5e, and yeah, it could have been clearer then, and Paizo could have explained things better when they were adapting 3.5e to Pathfinder, but neither did and that shouldn’t stop us from understanding the thing correctly.
At any rate, kensai did not say that you gain “martial weapon proficiency” or “exotic weapon proficiency,” it said you gain proficiency with one weapon, that was either martial or exotic—or in this case, both. Your choice here was “bastard sword,” so you’re proficient in that weapon, which implies you’re proficient with all uses of it. That covers you for this purpose: you are proficient with the two-handed martial weapon, “bastard sword,” just as you are proficient with the one-handed exotic weapon, “bastard sword,” so that counts as one towards the student of war prestige class.
All that said, even if you had chosen some other exotic weapon, that wasn’t also a martial weapon, honestly it’d be a pretty terrible GM that said it didn’t count and you need to find another martial weapon. No one says someone with 20 Strength can’t take Power Attack because it requires “Str 13,” and this is the same situation—you have something that is better than martial weapon proficiency, so it should cover the martial weapon requirement. (We’ll ignore, for the moment, how rarely exotic weapons actually are better than martial weapons—the existence of the Exotic Weapon Proficiency feat, and the lack of classes that get proficiency in all exotic weapons, is proof enough of this claim, Paizo’s inanity aside. Also, for this exercise, it’s strictly true because the bastard sword does more damage than any martial one-handed weapon.)
This also explains the FAQ entry that obliquely touches on this situation—they say you get exotic proficiency because it is the better proficiency that lets you do more. I don’t think anyone is going to argue that the cleric described in that FAQ takes non-proficiency penalties when using the bastard sword in two hands. And this is, of course, the whole problem of using FAQs as stealth errata the way Paizo likes to do—strictly speaking, the FAQ is wrong. The cleric is said to get proficiency in the weapon, not some specific feat that gives proficiency in a particular usage of the weapon. But for the purposes of answering the specific question posed, it is an accurate, ish, answer. But does it now stealthily change how the cleric—and other things that use similar wording, like the kensai—work? It’s reasonable to wonder about that, and the fact that such a question even has to be considered is yet another reason why the FAQ is terrible, but the fact remains that extrapolating from the FAQ in that manner leads to nonsense results. So no one should rule that way—again, I’d rather say that any decent GM never would, which says something about any GM who does.
The point of that requirement is “simple weapons do not count.” It’s meant for “martial” characters, people who are serious about fighting with weapons. A kensai is that. Even having to get a second weapon proficiency is inane—the goal there, I imagine, was to keep out war clerics and the like, or force non-warrior characters to spend two feats rather than just one on Martial Weapon Proficiency. Kensai is not really like a cleric, and really ought not to have to jump through any more hoops to use that prestige class.
Finally, whether you need to jump through hoops or not, just fair warning—student of war is a poor prestige class, especially for a magus. It doesn’t progress your spellcasting, which means just taking more levels of magus will do you better than student of war will. Mind over metal and anticipate are pretty nice, but only “pretty nice.” The rest hinge off of know your enemy, which in most fights is going to amount to wasting a turn—and it doesn’t remotely give large enough benefits to justify doing that. If you were a fighter or something who wasn’t giving up very much, maybe you’d consider it for the occasional uses (though even then you should be able to find enough feats worth using to make it not worth it), but as a magus, you’re giving up a lot to get these only-sometimes-useful features. If you’re intentionally looking for something very low-power to match the party or campaign or whatever, sure, but if that isn’t your goal you should know what you might be getting yourself into here.